General help

1.6 cannot see week label numbers

 
Picture of Lisa Lane
1.6 cannot see week label numbers
 
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: -
Picture of Joseph Rézeau
Re: 1.6 cannot see week label numbers
Core developersParticularly helpful MoodlersPlugin developersTestersTranslators

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

 
Average of ratings: -
Picture of Lisa Lane
Re: 1.6 cannot see week label numbers
 
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
 
Average of ratings: -
Picture of Joseph Rézeau
Re: 1.6 cannot see week label numbers
Core developersParticularly helpful MoodlersPlugin developersTestersTranslators
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


 
Average of ratings: -
Picture of Lisa Lane
Re: 1.6 cannot see week label numbers
 
Fabulous! Thank you so much!

Lisa
 
Average of ratings: -