$strmovedown = get_string("movedown");
}
$isediting = isediting($course->id);
$isteacher = has_capability('moodle/grade:viewall', $cobject->context);
/// Add the selected_week to the course object (so it can be used elsewhere).
$course->selected_week = $selected_week;
/// Layout the whole page as three big columns.
echo '<table id="layout-table" cellspacing="0"><tr valign="top">';
/// If we are using mandatory activities, until they are completed only show them.
if (!empty($course->usemandatory) && !$cobject->all_mandatory_completed($course->id, $cobject->mods)) {
    /// Start main column
    echo '<td id="middle-column" align="center">';
    echo '<table class="weeks" width="*" cellpadding="8">';
    echo "<tr>";
    echo "<td valign=top class=\"fnweeklycontent\" width=\"100%\">";
    $cobject->print_mandatory_section();
    echo '</td></tr></table>';
    echo '</td>';
} else {
    /// The left column ...
    if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $editing) {
        echo '<td style="vertical-align: top; width: ' . $preferred_width_left . 'px;" id="left-column">';
        blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
        echo '</td>';
    }
    /// Start main column
    echo '<td id="middle-column">';
    //        /// Added a center blocks position
    //        if (blocks_have_content($pageblocks, BLOCK_POS_CENTER) || $editing) {
    //            blocks_print_group($PAGE, $pageblocks, BLOCK_POS_CENTER);
    //        }