Course Program

Blocks ::: block_course_program
Maintained by Mike K
This block makes it possible to show/hide course sections (topics or weeks) or activities within sections automatically, based on the date and time. Includes english and polish localizations.

Course Program 2.x

Moodle 2.0, 2.1, 2.2
Released: 수요일, 14 3월 2012, 4:14 PM
Course Program block by mko_san, original by Mark Neilson (Humboldt State University)

For Moodle 2.x, tested with 2.1

This block makes it possible to show/hide course sections (topics or weeks) or activities within sections automatically, based on the date and time.
Includes english and polish localizations.

Installation:
- copy to block folder
- install the block normally via notifications
- make manual change to format.php files:

In file:
/course/format/topics/format.php

Find:
/// Print Section 0 with general activities

Add after:

// section hiding mod================================
if ($blockid = $DB->get_field("block", "id", array("name" => "course_program"))) {
$blocks = $DB->get_records('block', array(), "name ASC");
foreach ($blocks as $singleblock) {
if ($singleblock->id == $blockid) {
require_once($CFG->dirroot."/blocks/course_program/displaylib.php");
$sections = display_sections_visibility($sections, $course->id);
$mods = display_mods_visibility($mods, $course->id);
break;
}
}
}
//====================================================

In file:
/course/format/weeks/format.php

Find:
/// Print Section 0 with general activities

Add after:

// section hiding mod================================
if ($blockid = $DB->get_field("block", "id", array("name" => "course_program"))) {
$blocks = $DB->get_records('block', array(), "name ASC");
foreach ($blocks as $singleblock) {
if ($singleblock->id == $blockid) {
require_once($CFG->dirroot."/blocks/course_program/displaylib.php");
$sections = display_sections_visibility($sections, $course->id);
$mods = display_mods_visibility($mods, $course->id);
break;
}
}
}
//====================================================


Original mod forum topic by Michael Penney:
http://moodle.org/mod/forum/discuss.php?d=12339

Version information

Version build number
2012031400
Version release name
2.x
Maturity
안정 버전
MD5 Sum
aef2b13aaaf824d971d604c29a335f41
Supported software
Moodle 2.1, Moodle 2.0, Moodle 2.2
  • Latest release for Moodle 2.0
  • Latest release for Moodle 2.1
  • Latest release for Moodle 2.2

Default installation instructions for plugins of the type Blocks

  1. Make sure you have all the required versions.
  2. Download and unpack the block folder.
  3. Place the folder (eg "myblock") in the "blocks" subdirectory.
  4. Visit http://yoursite.com/admin to complete the installation
  5. Turn editing on in any home or course page.
  6. Add the block to the page
  7. Visit the config link in the block for more options.