1.6 cannot see week label numbers

1.6 cannot see week label numbers

by Lisa Lane -
Number of replies: 4
When I upgraded to 1.6, I lost the week label numbers. I've read through the forums and know some people want them not to appear, but I want to see them.


Thanks

Lisa
Average of ratings: -
In reply to Lisa Lane

Re: 1.6 cannot see week label numbers

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Lisa,

You'll have to hack this Moodle file: moodle\course\format\weeks\format.php, around line 170, add the $section variable which contains the section number (in red).

echo '<td class="left side">'.$section.'&nbsp;</td>';

Hope that helps,

Joseph

In reply to Joseph Rézeau

Re: 1.6 cannot see week label numbers

by Lisa Lane -
Thanks, that worked! Having read so many posts about people trying to remove these numbers, I'm confused as to why I had to edit the code to get them to show.

It looked like this was correct in the code of the weeklycss format, but it doesn't show there either. Any ideas there?

Thanks again,

Lisa
In reply to Lisa Lane

Re: 1.6 cannot see week label numbers

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
To make week numbers appear if you are using the weeklycss format, it is a bit more tricky. In file moodle\course\format\weekscss\format.php, around line 235, add what is in red below:

echo $section.'<div class="content">';

However, the result looks like (1) in screenshot (using the formal_white theme). To make it look a little better, you could try this:

echo '<div style=" float:left;margin-left:5px;margin-top:5px; font-weight:bold";">'.$section.</div>'.'<div class="content">';

See screenshot (2).

You might also consider creating a new class in your one of your theme's CSS files, and to declare it in the div, rather than resorting to in-line CSS.

Hope that helps,

Joseph

Attachment image-0000.jpg