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 "
type == HTML) { print_richedit_javascript("theform", "alltext", "yes"); } print_simple_box_end(); print_footer($course); } else { error("This script was called incorrectly"); } ?>