course)) { error("This course doesn't exist"); } require_login($course->id); if (!isteacher($course->id)) { error("You can't modify this course!"); } $strediting = get_string("editingaresource", "resource"); $strname = get_string("name"); print_header("$course->shortname: $strediting", "$course->shortname: $strediting", "wwwroot/course/view.php?id=$course->id\">$course->shortname -> $strediting"); if (!$form->name or !$form->type or !$form->summary) { error(get_string("filloutallfields"), $_SERVER["HTTP_REFERER"]); } $form->alltext = ""; if ($form->instance) { $form->alltext = get_field("resource", "alltext", "id", "$form->instance"); } print_simple_box_start("center", "", "$THEME->cellheading"); if ($usehtmleditor and $form->type == HTML) { $onsubmit = "onsubmit=\"copyrichtext(theform.alltext);\""; } else { $onsubmit = ""; } echo "
destination\">"; echo ""; echo ""; $strtypename = $RESOURCE_TYPE["$form->type"]; $strexample = get_string("example", "resource"); switch ($form->type) { case REFERENCE: $strexamplereference = get_string("examplereference", "resource"); ?> $optionname = ""; $jsoption[] = "\"$optionname\""; } $alljsoptions = implode(",", $jsoption); if ($form->instance) { // Re-editing if (!$form->alltext) { $newwindow = ""; $window->resizable = "checked"; // Defaults $window->scrollbars = "checked"; $window->status = "checked"; $window->location = "checked"; $window->width = 620; $window->height = 450; } else { $newwindow = "checked"; $rawoptions = explode(',', $form->alltext); foreach ($rawoptions as $rawoption) { $option = explode('=', trim($rawoption)); $optionname = $option[0]; $optionvalue = $option[1]; if ($optionname == "height" or $optionname == "width") { $window->$optionname = $optionvalue; } else if ($optionvalue) { $window->$optionname = "checked"; } } } } else { $newwindow = "checked"; $window->resizable = "checked"; $window->scrollbars = "checked"; $window->status = "checked"; $window->location = "checked"; $window->width = 620; $window->height = 450; } echo $alloptions; ?> wwwroot/files/index.php?id=$course->id"); ?>

$strname:

$form->name

:

()

:

 

:

 

onclick="return lockoptions('theform','newwindow', subitems)">
    $value) { if ($name == "height" or $name == "width") { continue; } echo ""; echo "$name.">"; $stringname = "str$name"; echo $$stringname."
    "; } ?>

    "; echo "lockoptions('theform','newwindow', subitems);"; echo ""; } ?>

:

 

:

dataroot."/".$course->id; $coursedirs = get_directory_list($rootdir, $CFG->moddata); foreach ($coursedirs as $dir) { $options["$dir"] = $dir; } choose_from_menu ($options, "reference", $form->reference); ?>

:

:





:




:




alltext); ?>
"> ">
type == HTML) { print_richedit_javascript("theform", "alltext", "yes"); } print_simple_box_end(); print_footer($course); } else { error("This script was called incorrectly"); } ?>