Пример #1
0
            $entry->rotation = $rotation;
            $entry->layout = $layoutid;
            // NB if this is a new entry, layoutid will be 0 and will need to be set on insert
            $configoptions = array('sloodlemoduleid', 'sloodleserveraccesslevel', 'sloodleobjectaccesslevelctrl', 'sloodleobjectaccessleveluse');
            foreach ($configoptions as $configoption) {
                $paramname = 'layout_entry_config_' . $configoption . '_' . $i;
                $configval = optional_param($paramname, null, PARAM_TEXT);
                if ($configval != null) {
                    $entry->set_config($configoption, $configval);
                }
            }
            $entries[] = $entry;
        }
    }
    // Define parameter names we will ignore
    $result = $sloodle_course->save_layout_by_id($layoutid, $layoutname, $entries, $add = false);
    if ($result) {
        $next = 'view_course.php?id=' . $courseid . '#layouts';
        //print '<a href="'.$next.'">next</a>';
        redirect($next);
    } else {
        print "<h3>" . get_string('layoutmanager:savefailed', 'sloodle') . "</h3>";
        exit;
    }
}
//------------------------------------------------------
// Edmund Edgar, 2009-02-07: Killing this stuff for now - we'll use the list on the sloodle course page instead
/*
    if (count($layout_names) > 0) {

        echo "<center>";