course)) { error("This course doesn't exist"); } require_login($course->id); if (!isteacher($course->id)) { error("You can't modify this course!"); } $stredit = get_string("edit"); $strediting = get_string("editingaresource", "resource"); $strname = get_string("name"); $strtypename = $RESOURCE_TYPE["$form->type"]; $strexample = get_string("example", "resource"); $strresources = get_string("modulenameplural", "resource"); print_header("$course->shortname: $strediting", "$course->shortname: $strediting", "wwwroot/course/view.php?id=$course->id\">$course->shortname -> id\">$strresources -> $form->name ($stredit)"); 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"); echo "
destination\">"; echo ""; echo ""; switch ($form->type) { case REFERENCE: $strexamplereference = get_string("examplereference", "resource"); ?> reference)) { $form->reference = $CFG->resource_defaulturl; } ?> reference)) { $form->reference = $CFG->resource_defaulturl; } foreach ($RESOURCE_WINDOW_OPTIONS as $optionname) { $stringname = "str$optionname"; $$stringname = get_string("new$optionname", "resource"); $window->$optionname = ""; $jsoption[] = "\"$optionname\""; } $alljsoptions = implode(",", $jsoption); if ($form->instance) { // Re-editing if (!$form->alltext) { $newwindow = ""; // Disable the new window } 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 { foreach ($RESOURCE_WINDOW_OPTIONS as $optionname) { $defaultvalue = "resource_popup$optionname"; $window->$optionname = $CFG->$defaultvalue; } $newwindow = $CFG->resource_popup; } echo $alloptions; ?> $optionname = ""; $jsoption[] = "\"$optionname\""; } $alljsoptions = implode(",", $jsoption); if ($form->instance) { // Re-editing if (!$form->alltext) { $newwindow = ""; // Disable the new window } 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 { foreach ($RESOURCE_WINDOW_OPTIONS as $optionname) { $defaultvalue = "resource_popup$optionname"; $window->$optionname = $CFG->$defaultvalue; } $newwindow = $CFG->resource_popup; } echo $alloptions; ?>

$strname:

$form->name

:

()

:

resource_websearch', 'websearch', 'menubar=1,location=1,directories=1,toolbar=1,scrollbars,resizable,width=800,height=600');\">\n"; ?>
 

:

resource_websearch', 'websearch', 'menubar=1,location=1,directories=1,toolbar=1,scrollbars,resizable,width=800,height=600');\">\n"; ?>
 

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 ""; } ?>

:

reference\"> "; button_to_popup_window ("/mod/resource/coursefiles.php?id=$course->id", "coursefiles", $strchooseafile, 500, 750, $strchooseafile); ?>

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 ""; } ?>

:

 

:





:




:




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