I wanted to be able to write a course in weekly format, but not have the weeks appear until the start date for that week had passed. The only way I could figure to do this was manually using the close/open eye icon.
So, I've had at look at the code in course/format/weeks/format.php and modififed the line of $showsection to:
$showsection = (isteacher($course->id) or (($thissection->visible) and ($weekdate < $timenow)) or !$course->hiddensections);
This seems to have the desired effect. I'm not familiar with PHP, so would appreciate it if anyone else can see any problems with doing this. Alternatively, is there a way to do this in Moodle already that I've missed?
Courses and course formats
Only see past and current weeks
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.