* @package
*/
+defined('MOODLE_INTERNAL') || die();
+
require_once($CFG->libdir.'/filelib.php');
$topic = optional_param('topic', -1, PARAM_INT);
$section = 0;
$thissection = $sections[$section];
+unset($sections[0]);
if ($thissection->summary or $thissection->sequence or $PAGE->user_is_editing()) {
echo "</li>\n";
}
+ unset($sections[$section]);
$section++;
}
+
+if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
+ // print stealth sections if present
+ $modinfo = get_fast_modinfo($course);
+ foreach ($sections as $section=>$thissection) {
+ if (empty($modinfo->sections[$section])) {
+ continue;
+ }
+
+ $strstealth = 'Invisible topic'; //TODO: MDL-24316 to be localised after we decide how to call this (skodak)
+
+ echo '<li id="section-'.$section.'" class="section main clearfix stealth hidden">'; //'<div class="left side"> </div>';
+
+ echo '<div class="left side">';
+ echo $strstealth;
+ echo '</div>';
+ // Note, 'right side' is BEFORE content.
+ echo '<div class="right side">';
+ echo $strstealth;
+ echo '</div>';
+ echo '<div class="content">';
+ print_section($course, $thissection, $mods, $modnamesused);
+ echo '<br />';
+ if ($PAGE->user_is_editing()) {
+ print_section_add_menus($course, $section, $modnames);
+ }
+ echo '</div>';
+ echo "</li>\n";
+ }
+}
+
+
echo "</ul>\n";
if (!empty($sectionmenu)) {
* @package
*/
+defined('MOODLE_INTERNAL') || die();
+
require_once($CFG->libdir.'/filelib.php');
$week = optional_param('week', -1, PARAM_INT);
$section = 0;
$thissection = $sections[$section];
+ unset($sections[0]);
if ($thissection->summary or $thissection->sequence or $PAGE->user_is_editing()) {
echo "</li>\n";
}
+ unset($sections[$section]);
$section++;
$weekdate = $nextweekdate;
}
+
+ if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
+ // print stealth sections if present
+ $modinfo = get_fast_modinfo($course);
+ foreach ($sections as $section=>$thissection) {
+ if (empty($modinfo->sections[$section])) {
+ continue;
+ }
+
+ $strstealth = 'Invisible week'; //TODO: MDL-24316 to be localised after we decide how to call this (skodak)
+
+ echo '<li id="section-'.$section.'" class="section main clearfix stealth hidden">'; //'<div class="left side"> </div>';
+
+ echo '<div class="left side">';
+ echo $strstealth;
+ echo '</div>';
+ // Note, 'right side' is BEFORE content.
+ echo '<div class="right side">';
+ echo $strstealth;
+ echo '</div>';
+ echo '<div class="content">';
+ print_section($course, $thissection, $mods, $modnamesused);
+ echo '<br />';
+ if ($PAGE->user_is_editing()) {
+ print_section_add_menus($course, $section, $modnames);
+ }
+ echo '</div>';
+ echo "</li>\n";
+ }
+ }
+
echo "</ul>\n";
if (!empty($sectionmenu)) {