if ($isediting) {
     echo " <a title=\"{$streditsummary}\" " . " href=\"editsection.php?id={$cobjectsection->id}\"><img height=11 width=11 src=\"{$CFG->pixpath}/t/edit.gif\" " . " border=0 alt=\"{$streditsummary}\"></a><br />";
 }
 echo '<br clear="all">';
 /// If showannouncements is off, remove the news forum from the mod list.
 if (empty($cobject->course->showannouncements)) {
     $news = forum_get_course_forum($course->id, 'news');
     $modnum = get_field('modules', 'id', 'name', 'forum');
     foreach ($mods as $key => $mod) {
         if ($mod->module == $modnum && $mod->instance == $news->id) {
             unset($mods[$key]);
             break;
         }
     }
 }
 $cobject->print_section_fn($cobjectsection);
 if ($isediting) {
     $cobject->print_section_add_menus($section);
 }
 echo '</td></tr></table>';
 echo '</td>';
 echo '<td class="right side">&nbsp;</td>';
 echo '</tr>';
 //            echo "</td>";
 //            echo "<td nowrap class=\"fnweeklyside\" valign=top align=center width=10>";
 //            echo "&nbsp;</td></tr>";
 if ($course->numsections > 0) {
     echo "<tr><td colspan=3><img src=\"../pix/spacer.gif\" width=1 height=1></td></tr>";
 } else {
     echo "<tr height=\"20\"><td colspan=\"3\"></td></tr>";
 }
Ejemplo n.º 2
0
    echo '<div class ="content">';
    if (!empty($thissection->name)) {
        echo $OUTPUT->heading($thissection->name, 3, 'sectionname');
    }
    echo '<div class="summary">';
    $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
    $summarytext = file_rewrite_pluginfile_urls($thissection->summary, 'pluginfile.php', $coursecontext->id, 'course', 'section', $thissection->id);
    $summaryformatoptions = new stdClass();
    $summaryformatoptions->noclean = true;
    $summaryformatoptions->overflowdiv = true;
    echo format_text($summarytext, FORMAT_HTML, $summaryformatoptions);
    if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
        echo '<p><a title="' . $streditsummary . '" ' . ' href="editsection.php?id=' . $thissection->id . '"><img src="' . $OUTPUT->pix_url('t/edit') . '" ' . ' class="iconsmall edit" alt="' . $streditsummary . '" /></a></p>';
    }
    echo '</div>';
    $cobject->print_section_fn($course, $thissection, $mods, $modnamesused, $resubmission);
    if ($PAGE->user_is_editing()) {
        $cobject->print_section_add_menus($course, $section, $modnames);
    }
    echo '</div>';
    echo "</li>\n";
}
/// Now all the normal modules by week
/// Everything below uses "section" terminology - each "section" is a week.
$courseformatoptions = course_get_format($course)->get_format_options();
//$course->numsections = $courseformatoptions['numsections'];
$course->numsections = $cobject->get_last_lection();
//$course->hiddensections = $courseformatoptions['hiddensections'];
//$course->coursedisplay = $courseformatoptions['coursedisplay'];
if (empty($course->showonlysection0)) {
    /// Now all the weekly sections