mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-62974 lesson: Suppress HTML font tags
This commit is contained in:
parent
dafcc3cf7b
commit
d1e24c1275
@ -88,23 +88,19 @@ if ($usesections) {
|
||||
// Get all deadlines.
|
||||
$deadlines = lesson_get_user_deadline($course->id);
|
||||
foreach ($lessons as $lesson) {
|
||||
if (!$lesson->visible) {
|
||||
//Show dimmed if the mod is hidden
|
||||
$link = "<a class=\"dimmed\" href=\"view.php?id=$lesson->coursemodule\">".format_string($lesson->name,true)."</a>";
|
||||
} else {
|
||||
//Show normal if the mod is visible
|
||||
$link = "<a href=\"view.php?id=$lesson->coursemodule\">".format_string($lesson->name,true)."</a>";
|
||||
}
|
||||
$cm = get_coursemodule_from_instance('lesson', $lesson->id);
|
||||
$context = context_module::instance($cm->id);
|
||||
|
||||
$class = $lesson->visible ? null : array('class' => 'dimmed'); // Hidden modules are dimmed.
|
||||
$link = html_writer::link(new moodle_url('view.php', array('id' => $cm->id)), format_string($lesson->name, true), $class);
|
||||
|
||||
$deadline = $deadlines[$lesson->id]->userdeadline;
|
||||
if ($deadline == 0) {
|
||||
$due = $strnodeadline;
|
||||
} else if ($deadline > $timenow) {
|
||||
$due = userdate($deadline);
|
||||
} else {
|
||||
$due = "<font color=\"red\">" . userdate($deadline) . "</font>";
|
||||
$due = html_writer::tag('span', userdate($deadline), array('class' => '.text-danger'));
|
||||
}
|
||||
|
||||
if ($usesections) {
|
||||
|
@ -310,15 +310,15 @@ if ($action === 'delete') {
|
||||
$table->attributes['class'] = 'generaltable';
|
||||
unset($table->data);
|
||||
if ($page->grayout) { // set the color of text
|
||||
$fontstart = "<span class=\"dimmed\">";
|
||||
$fontend = "</font>";
|
||||
$fontstart = html_writer::start_tag('span', array('class' => 'dimmed_text'));
|
||||
$fontend = html_writer::end_tag('span');
|
||||
$fontstart2 = $fontstart;
|
||||
$fontend2 = $fontend;
|
||||
} else {
|
||||
$fontstart = "";
|
||||
$fontend = "";
|
||||
$fontstart2 = "";
|
||||
$fontend2 = "";
|
||||
$fontstart = '';
|
||||
$fontend = '';
|
||||
$fontstart2 = '';
|
||||
$fontend2 = '';
|
||||
}
|
||||
|
||||
$table->head = array($fontstart2.$page->qtype.": ".format_string($page->title).$fontend2, $fontstart2.get_string("classstats", "lesson").$fontend2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user