How Can I Add The Year Into The Date Range Shown In The Weekly Format
Charles Kelly's Moodle Things

File to Change

course/format/weeks/format.php

Changes to Make (Moodle 1.8)

Change line 158 from:

    $strftimedateshort = ' '.get_string('strftimedateshort');

to:

    $strftimedateshort = ' '.get_string('strftimedate');

Why you might want to do this.

  • If you are teaching English as a foreign language, you might want your students to get accustomed to seeing full dates.

Note (April 4, 2007): This is a bug fix that I reported

  • Moodle 1.8, on April 4, 2007, wasn't correctly displaying a hyphen between the two dates.
  • If it has not yet been corrected in your version, you may want to change this too.

This is how I fixed it on my local copy of Moodle 1.8

This is the file that I changed:

course/format/weeks/format.php

I changed line 214 from:

                $weekperiod = $weekday.' '.$endweekday; 

to:

                $weekperiod = $weekday.' - '.$endweekday; 
Page last modified on April 05, 2007, at 05:18 AM
Copyright © 2006-2008 by Charles Kelly
Login