Пример #1
0
        // show the add page even if the url didn't specify layoutid=0
        $layoutid = 0;

    }
*/
//------------------------------------------------------
// Fetch current layout
$currentlayoutentries = array();
$recommendedon = true;
// Whether by default we turn on modules that aren't already in the layout we're looking at
$layoutname = 'Layout ' . date('Y-m-d H:i:s');
if ($layoutid > 0) {
    $layout = new SloodleLayout();
    $layout->load($layoutid);
    $currentlayoutentries = $sloodle_course->get_layout_entries_for_layout_id($layoutid);
    $recommendedon = false;
    // The user got a chance to use our recommended defaults when they added. Now we'll only turn on things that they did.
    $layoutname = $layout_names[$layoutid];
}
//------------------------------------------------------
// Fetch possible options
//
if ($layoutid >= 0) {
    // add or edit layout
    $modinfo =& get_fast_modinfo($COURSE);
    $cmsmodules = $modinfo->cms;
    $instancemodulearrays = $modinfo->instances;
    $instancemodules = array();
    if (count($instancemodulearrays) > 0) {
        foreach ($instancemodulearrays as $ima) {