admin_externalpage_print_header($adminroot);
print_simple_box(get_string('configauthenticationplugins', 'admin'), 'center', '700');
-echo "<form $CFG->frametarget name=\"authmenu\" method=\"post\" action=\"auth.php\">";
+echo "<form $CFG->frametarget id=\"authmenu\" method=\"post\" action=\"auth.php\">";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">";
print_table($table);
admin_externalpage_print_header($adminroot);
// choose an authentication method
-echo "<form $CFG->frametarget name=\"authmenu\" method=\"post\" action=\"auth_config.php\">\n";
+echo "<form $CFG->frametarget id=\"authmenu\" method=\"post\" action=\"auth_config.php\">\n";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">\n";
-echo "<div align=\"center\"><p><b>\n";
-echo get_string('chooseauthmethod').': ';
-choose_from_menu ($options, "auth", $auth, '', "document.location='auth_config.php?sesskey=$USER->sesskey&auth='+document.authmenu.auth.options[document.authmenu.auth.selectedIndex].value", '');
-echo "</b></p></div>\n\n";
// auth plugin description
print_simple_box_start('center', '80%');
foreach ($user_fields as $field) {
// Define some vars we'll work with
- optional_variable($pluginconfig->{"field_map_$field"}, '');
- optional_variable($pluginconfig->{"field_updatelocal_$field"}, '');
- optional_variable($pluginconfig->{"field_updateremote_$field"}, '');
- optional_variable($pluginconfig->{"field_lock_$field"}, '');
+ if (isset($pluginconfig->{"field_map_$field"})) {
+ $pluginconfig->{"field_map_$field"} = '';
+ }
+ if (isset($pluginconfig->{"field_updatelocal_$field"})) {
+ $pluginconfig->{"field_updatelocal_$field"} = '';
+ }
+ if (isset($pluginconfig->{"field_updateremote_$field"})) {
+ $pluginconfig->{"field_updateremote_$field"} = '';
+ }
+ if (isset($pluginconfig->{"field_lock_$field"})) {
+ $pluginconfig->{"field_lock_$field"} = '';
+ }
// define the fieldname we display to the user
$fieldname = $field;
print_simple_box(get_string('configenrolmentplugins', 'admin'), 'center', '700');
- echo "<form $CFG->frametarget name=\"enrolmenu\" method=\"post\" action=\"enrol.php\">";
+ echo "<form $CFG->frametarget id=\"enrolmenu\" method=\"post\" action=\"enrol.php\">";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\" />";
$table = new stdClass();
admin_externalpage_print_header($adminroot);
- echo "<form $CFG->frametarget name=\"enrolmenu\" method=\"post\" action=\"enrol_config.php\">";
+ echo "<form $CFG->frametarget id=\"enrolmenu\" method=\"post\" action=\"enrol_config.php\">";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">";
- echo "<div align=\"center\"><p><b>";
-
-
-/// Choose an enrolment method
- echo get_string('chooseenrolmethod').': ';
- choose_from_menu ($options, "enrol", $enrol, "",
- "document.location='enrol_config.php?enrol='+document.enrolmenu.enrol.options[document.enrolmenu.enrol.selectedIndex].value", "");
-
- echo "</b></p></div>";
/// Print current enrolment type description
print_simple_box_start("center", "80%");
@include("$langdir/$currentfile");
if ($editable) {
- echo "<form name=\"$currentfile\" action=\"lang.php\" method=\"post\">";
+ echo "<form id=\"$currentfile\" action=\"lang.php\" method=\"post\">";
}
echo "<table summary=\"\" width=\"100%\" cellpadding=\"2\" cellspacing=\"3\" border=\"0\" class=\"generalbox\">";
$linescounter = 0;
echo "<td align=\"center\">\n";
if ($editable) {
- echo "<form name=\"$currentfile\" action=\"langdoc.php\" method=\"post\">";
+ echo "<form id=\"$currentfile\" action=\"langdoc.php\" method=\"post\">";
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo '<input type="hidden" name="currentfile" value="'.$currentfile.'" />';
print_simple_box_start('center','60%');
echo '<table summary="" width="100%">';
echo '<tr><td align="center" valign="top">';
- echo '<form name="uninstallform" action="langimport.php?mode=4" method="post">';
+ echo '<form id="uninstallform" action="langimport.php?mode=4" method="post">';
echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
unset($CFG->langlist); // ignore admin's langlist
$installedlangs = get_list_of_languages();
echo '</select>';
echo '<br /><input type="submit" value="'.get_string('uninstall','admin').'" />';
echo '</form>';
- echo '<form name="updateform" action="langimport.php?mode=5" method="post">';
+ echo '<form id="updateform" action="langimport.php?mode=5" method="post">';
echo '<br /><input type="submit" value="'.get_string('updatelangs','admin').'" />';
echo '</form>';
/// if this language pack is not already installed, then we allow installation
- echo '<form name="installform" method="post" action="langimport.php?mode=2">';
+ echo '<form id="installform" method="post" action="langimport.php?mode=2">';
echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
echo '<label for="pack">'.get_string('availablelangs','admin')."</label><br />\n";
if ($remote) {
?>
<div class="mnetaddtoaclform">
- <form name="mnetaddtoacl" method="post">
+ <form id="mnetaddtoacl" method="post">
<input type="hidden" name="sesskey" value="<?php echo $sesskey; ?>">
<?php
print_simple_box_start("center", "");
- echo "<form name=\"form\" action=\"http://moodle.org/register/\" method=\"post\">\n";
+ echo "<form id=\"form\" action=\"http://moodle.org/register/\" method=\"post\">\n";
echo "<table cellpadding=\"9\" border=\"0\">\n";
echo "<tr valign=\"top\">\n";
echo "<td align=\"center\" colspan=\"2\">".get_string("location")."</td>\n";
-<form name="assignform" id="assignform" method="post" action="">
+<form id="assignform" method="post" action="">
<input type="hidden" name="previoussearch" value="<?php p($previoussearch) ?>" />
<input type="hidden" name="userid" value="<?php p($userid) ?>" />
<input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
<label for="removeselect"><?php print_string('existingusers', 'role', count($contextusers)); ?></label>
<br />
<select name="removeselect[]" size="20" id="removeselect" multiple="multiple"
- onfocus="document.assignform.add.disabled=true;
- document.assignform.remove.disabled=false;
- document.assignform.addselect.selectedIndex=-1;">
+ onfocus="getElementById('assignform').add.disabled=true;
+ getElementById('assignform').remove.disabled=false;
+ getElementById('assignform').addselect.selectedIndex=-1;">
<?php
foreach ($contextusers as $contextuser) {
$fullname = fullname($contextuser, true);
<label for="addselect"><?php print_string('potentialusers', 'role', $usercount); ?></label>
<br />
<select name="addselect[]" size="20" id="addselect" multiple="multiple"
- onfocus="document.assignform.add.disabled=false;
- document.assignform.remove.disabled=true;
- document.assignform.removeselect.selectedIndex=-1;">
+ onfocus="getElementById('assignform').add.disabled=false;
+ getElementById('assignform').remove.disabled=true;
+ getElementById('assignform').removeselect.selectedIndex=-1;">
<?php
if (!empty($searchtext)) {
<br />
<label for="searchtext" class="accesshide"><?php p($strsearch) ?></label>
<input type="text" name="searchtext" id="searchtext" size="30" value="<?php p($searchtext, true) ?>"
- onfocus ="document.assignform.add.disabled=true;
- document.assignform.remove.disabled=true;
- document.assignform.removeselect.selectedIndex=-1;
- document.assignform.addselect.selectedIndex=-1;"
+ onfocus ="getElementById('assignform').add.disabled=true;
+ getElementById('assignform').remove.disabled=true;
+ getElementById('assignform').removeselect.selectedIndex=-1;
+ getElementById('assignform').addselect.selectedIndex=-1;"
onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
if (keyCode == 13) {
- document.assignform.previoussearch.value=1;
- document.assignform.submit();
+ getElementById('assignform').previoussearch.value=1;
+ getElementById('assignform').submit();
} " />
<input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
<?php
<div align="right">
<a href="manage.php?roleid=<?php p($roleid); ?>&action=duplicate"><?php print_string('duplicaterole'); ?></a>
</div>
-<form name="rolesform" action="manage.php" method="post">
+<form id="rolesform" action="manage.php" method="post">
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<input type="hidden" name="action" value="<?php if ($action != 'view') { echo p($action); } ?>" />
echo '<div align="center" class="selector">';
if ($action == 'view') {
echo get_string('selectrole', 'role').': ';
- echo '<form style="display:inline;" name="switchrole" action="manage.php" method="get">';
+ echo '<form style="display:inline;" id="switchrole" action="manage.php" method="get">';
echo '<input type="hidden" name="action" value="view" />';
choose_from_menu ($roleoptions, 'roleid', $roleid, get_string('listallroles', 'role').'...', $script='switchrole.submit()');
echo '</form>';
- echo '<form style="display:inline;" name="editrole" action="manage.php" method="get">';
+ echo '<form style="display:inline;" id="editrole" action="manage.php" method="get">';
echo '<input type="hidden" name="roleid" value="'.$roleid.'" />';
echo '<input type="hidden" name="action" value="edit" />';
echo '<input type="submit" value="'.get_string('edit').'" />';
$strprohibit = get_string('prohibit','role');
?>
-<form name="overrideform" action="override.php" method="post">
+<form id="overrideform" action="override.php" method="post">
<input type="hidden" name="contextid" value="<?php p($contextid) ?>" />
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
$resultshtml = search_settings_html(admin_get_root(), $query);
-echo '<form action="search.php" method="post" name="adminsettings" id="adminsettings">';
+echo '<form action="search.php" method="post" id="adminsettings">';
echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
echo '<input type="hidden" name="query" value="' . s($query) . '" />';
echo '<fieldset>';
// ---------------------------------------------------------------------------------------------------------------
-echo '<form action="settings.php" method="post" name="adminsettings" id="adminsettings">';
+echo '<form action="settings.php" method="post" id="adminsettings">';
echo '<input type="hidden" name="section" value="' . $PAGE->section . '" />';
echo '<input type="hidden" name="sesskey" value="' . $USER->sesskey . '" />';
echo '<input type="hidden" name="return" value="' . $return . '" />';
print_simple_box(get_string('upgradesettingsintro','admin'),'','100%','',5,'generalbox','');
-echo '<form action="upgradesettings.php" method="post" name="adminsettings" id="adminsettings">';
+echo '<form action="upgradesettings.php" method="post" id="adminsettings">';
echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
echo '<fieldset>';
echo '<div class="clearer"><!-- --></div>';
$origstructure =& $dbdir->xml_file->getStructure();
/// Add the main form
- $o = '<form name="form" id="form" action="index.php" method="post">';
+ $o = '<form id="form" action="index.php" method="post">';
$o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
$o.= ' <input type="hidden" name ="table" value="' . $tableparam .'" />';
$o.= ' <input type="hidden" name ="field" value="' . $fieldparam .'" />';
$origstructure =& $dbdir->xml_file->getStructure();
/// Add the main form
- $o = '<form name="form" id="form" action="index.php" method="post">';
+ $o = '<form id="form" action="index.php" method="post">';
$o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
$o.= ' <input type="hidden" name ="table" value="' . $tableparam .'" />';
$o.= ' <input type="hidden" name ="index" value="' . $indexparam .'" />';
$origstructure =& $dbdir->xml_file->getStructure();
/// Add the main form
- $o = '<form name="form" id="form" action="index.php" method="post">';
+ $o = '<form id="form" action="index.php" method="post">';
$o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
$o.= ' <input type="hidden" name ="table" value="' . $tableparam .'" />';
$o.= ' <input type="hidden" name ="key" value="' . $keyparam .'" />';
$values = $statement->getValuesFromInsertSentence($sentence);
/// Add the main form
- $o = '<form name="form" id="form" action="index.php" method="post">';
+ $o = '<form id="form" action="index.php" method="post">';
$o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
$o.= ' <input type="hidden" name ="statement" value="' . $statementparam .'" />';
$o.= ' <input type="hidden" name ="sentence" value="' . $sentenceparam .'" />';
(<?php print_string("cookiesenabled");?>)
<?php helpbutton("cookies", get_string("cookiesenabled"))?><br /><?php formerr($errormsg) ?>
</p>
- <form action="index.php" method="post" name="login" id="login">
+ <form action="index.php" method="post" id="login">
<table border="0" align="center" style="font-size: small">
<tr>
<td width="100%">
- <input type="hidden" name="username" value="cas" />
- <input type="hidden" name="password" value="cas" />
+ <input type="hidden" name="username" id="username" value="cas" />
+ <input type="hidden" name="password" id="password" value="cas" />
<input type="submit" value="<?php print_string("auth_cas_logincas", "auth") ?>" />
</td>
</tr>
<?php if ($CFG->guestloginbutton) { ?>
<hr width="80%" />
<p><?php print_string("someallowguest") ?>:</p>
- <form action="index.php" method="post" name="guestlogin">
+ <form action="index.php" method="post" id="guestlogin">
<input type="hidden" name="username" value="guest" />
<input type="hidden" name="password" value="guest" />
<input type="submit" value="<?php print_string("loginguest") ?>" />
?>
<hr width="80%" />
<p><?php print_string("forgotten") ?></p>
- <form action="<?php p($changepassword) ?>" method="get" name="changepassword">
+ <form action="<?php p($changepassword) ?>" method="get" id="changepassword">
<input type="submit" value="<?php p($changebuttonname) ?>" />
</form>
<?php } ?>
print_string("loginsteps", "", "signup.php");
?>
<div align="center">
- <form action="signup.php" method="get" name="signup">
+ <form action="signup.php" method="get" id="signup">
<input type="submit" value="<?php print_string("startsignup") ?>" />
</form>
</div>
?>
<div align="center">
- <form action="signup.php" method="get" name="signup">
+ <form action="signup.php" method="get" id="signup">
<input type="submit" value="<?php print_string("startsignup") ?>" />
</form>
</div>
}
?>
-<form name="form" method="post" action="backup.php">
+<form id="form" method="post" action="backup.php">
<table cellpadding="5">
<?php
-->
</script>
-<form name="form1" id="form1" method="post" action="backup.php">
+<form id="form1" method="post" action="backup.php">
<table cellpadding="5">
<?php
//Now, check modules and info and show posibilities
-->
</script>
-<form name="form1" id="form1" method="post" action="restore.php">
+<form id="form1" method="post" action="restore.php">
<table cellpadding="5">
<?php
<title></title>
<h1></h1>
-<form method="post" id="vbankform" name="vbankform">
+<form method="post" id="vbankform">
<table>
<tr>
<td colspan="2">'.get_string('amountofloan','block_loancalc').'</td>
if (empty($USER->loggedin) or isguest()) { // Show the block
- $this->content->text .= "\n".'<form class="loginform" name="login" method="post" action="'.$wwwroot.'/login/index.php">';
+ $this->content->text .= "\n".'<form class="loginform" id="login" method="post" action="'.$wwwroot.'/login/index.php">';
$this->content->text .= '<div class="c1"><label for="login_username">'.get_string('username').'</label>: ';
$this->content->text .= '<input type="text" name="username" id="login_username" value="'.$username.'" /></div>';
//basic search form
$this->content->text =
- '<form name="query" method="get" action="'. $CFG->wwwroot .'/search/query.php"><div>'
+ '<form id="searchquery" method="get" action="'. $CFG->wwwroot .'/search/query.php"><div>'
. '<label for="block_search_q">'. $label .'</label>'
. '<input id="block_search_q" type="text" name="query_string" length="50" />'
. '<input type="submit" value="'.$button.'" />'
-<form method="post" action="preferences.php" name="entry" id="entry">
+<form method="post" action="preferences.php" id="entry">
<table cellpadding="9" cellspacing="0">
<tr>
<td><?php print_string('pagesize', 'blog');?>:</td>
<table style="margin: auto;">
<tr>
<td>
- <form method="get" action="event.php" name="delete">
+ <form method="get" action="event.php" id="delete">
<p>
<input type="submit" value=" <?php print_string('delete') ?> " />
</td>
<?php if($repeatcount > 1) { ?>
<td>
- <form method="get" action="event.php" name="delete">
+ <form method="get" action="event.php" id="delete">
<p>
<input type="submit" value=" <?php print_string('deleteall') ?> " />
</td>
<?php } ?>
<td>
- <form method="get" action="view.php" name="cancel">
+ <form method="get" action="view.php" id="cancel">
<p>
<input type="submit" value=" <?php print_string('cancel') ?> ">
-<form method="post" action="event.php" name="eventform">
+<form method="post" action="event.php" id="eventform">
<table cellpadding="5" cellspacing="0">
<tr>
<td style="vertical-align: top; text-align: right;">
// The following is a hack to fix bug 1488
$course = get_record('course', 'id', ($form->courseid) ? $form->courseid : $site->id);
?>
-<form method="post" action="event.php" name="eventform">
+<form method="post" action="event.php" id="eventform">
<table cellpadding="5">
<tr>
<td style="vertical-align: top; text-align: right;">
-<form method="post" action="preferences.php" name="form">
+<form method="post" action="preferences.php" id="prefform">
<table class="formtable">
<tr>
$strrequireskey = get_string("requireskey");
- echo '<form name="movecourses" action="category.php" method="post">';
+ echo '<form id="movecourses" action="category.php" method="post">';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<table align="center" border="0" cellspacing="2" cellpadding="4" class="generalbox"><tr>';
echo '<th scope="col">'.$strcourses.'</th>';
echo '<tr><td colspan="3" align="right">';
echo '<br />';
unset($displaylist[$category->id]);
- choose_from_menu ($displaylist, "moveto", "", get_string("moveselectedcoursesto"), "javascript:document.movecourses.submit()");
+ choose_from_menu ($displaylist, "moveto", "", get_string("moveselectedcoursesto"), "javascript: getElementById('movecourses').submit()");
echo '<input type="hidden" name="id" value="'.$category->id.'" />';
echo '</td></tr>';
}
if (has_capability('moodle/category:update', $context)) { /// Print form to rename the category
$strrename= get_string('rename');
- echo '<form name="renameform" action="category.php" method="post">';
+ echo '<form id="renameform" action="category.php" method="post">';
echo '<input type="hidden" name="id" value="'.$category->id.'" />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo '<input type="text" size="30" name="rename" value="'.s($category->name).'" alt="'.$strrename.'" />';
<center>
-<form name="theform" method="post" action="editsection.php">
+<form id="theform" method="post" action="editsection.php">
<table cellpadding="5">
<tr valign="top">
<td align="right"><p><b><?php print_string("summary") ?>:</b></p>
//]]>
</script>
- <form id="rolesform1" name="rolesform1" action="groups.php" method="get">
+ <form id="rolesform1" action="groups.php" method="get">
<input type="hidden" name="id" value="<?php echo $courseid ?>" />
<div align="center"><?php echo get_string('currentrole', 'role') ?>:
<?php choose_from_menu ($roleoptions, 'roleid', $roleid, '', 'document.getElementById(\'rolesform1\').submit()') ?>
<tr align="center" valign="top">
<td class="generalboxcontent">
<label for="nonmembers"><?php p($strmemberincourse) ?></label>
- <form name="form1" id="form1" method="post" action="groups.php">
+ <form id="form1" method="post" action="groups.php">
<input type="hidden" name="id" value="<?php p($course->id) ?>" />
<input type="hidden" name="groupid" value="<?php p($selectedgroup) ?>" />
<input type="hidden" name="sesskey" value="<?php p($sesskey) ?>" />
</td>
<td class="generalboxcontent">
<label for="groups"><?php p($strgroups) ?></label>
- <form name="form2" id="form2" method="post" action="groups.php">
+ <form id="form2" method="post" action="groups.php">
<input type="hidden" name="id" value="<?php p($course->id) ?>" />
<input type="hidden" name="sesskey" value="<?php p($sesskey) ?>" />
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
<td class="generalboxcontent">
<label for="members"><?php p($strgroupmembersselected) ?></label>
- <form name="form3" id="form3" method="post" action="groups.php">
+ <form id="form3" method="post" action="groups.php">
<input type="hidden" name="id" value="<?php p($course->id) ?>" />
<input type="hidden" name="groupid" value="<?php p($selectedgroup) ?>" />
<input type="hidden" name="sesskey" value="<?php p($sesskey) ?>" />
-<form name="studentform" id="studentform" method="post" action="importstudents.php">
+<form id="studentform" method="post" action="importstudents.php">
<input type="hidden" name="previoussearch" value="<?php echo $previoussearch ?>" />
<input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
<input type="hidden" name="id" value="<?php echo $id?>" />
<label for="removeselect"><?php echo count($alreadycourses) . " ". $stralreadycourses ?></label>
<br />
<select name="removeselect[]" size="20" id="removeselect" multiple
- onFocus="document.studentform.add.disabled=true;
- document.studentform.remove.disabled=false;
- document.studentform.addselect.selectedIndex=-1;">
+ onFocus="getElementById('studentform').add.disabled=true;
+ getElementById('studentform').remove.disabled=false;
+ getElementById('studentform').addselect.selectedIndex=-1;">
<?php
foreach ($alreadycourses as $course) {
echo "<option value=\"$course->id\">".course_format_name($course,60)."</option>\n";
<label for="addselect"><?php echo $numcourses . " " . $strpotentialcourses ?></label>
<br />
<select name="addselect[]" size="20" id="addselect" multiple
- onFocus="document.studentform.add.disabled=false;
- document.studentform.remove.disabled=true;
- document.studentform.removeselect.selectedIndex=-1;">
+ onFocus="getElementById('studentform').add.disabled=false;
+ getElementById('studentform').remove.disabled=true;
+ getElementById('studentform').removeselect.selectedIndex=-1;">
<?php
if (!empty($searchcourses)) {
<br />
<label for="searchtext" class="accesshide"><?php p($strsearch) ?></label>
<input type="text" name="searchtext" id="searchtext" size="30" value="<?php p($searchtext, true) ?>"
- onFocus ="document.studentform.add.disabled=true;
- document.studentform.remove.disabled=true;
- document.studentform.removeselect.selectedIndex=-1;
- document.studentform.addselect.selectedIndex=-1;"
+ onFocus ="getElementById('studentform').add.disabled=true;
+ getElementById('studentform').remove.disabled=true;
+ getElementById('studentform').removeselect.selectedIndex=-1;
+ getElementById('studentform').addselect.selectedIndex=-1;"
onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
if (keyCode == 13) {
- document.studentform.previoussearch.value=1;
- document.studentform.submit();
+ getElementById('studentform').previoussearch.value=1;
+ getElementById('studentform').submit();
} " />
<input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
<?php
print_header("$course->shortname: $strassigncourses",
"$site->fullname",
"<a href=\"view.php?id=$course->id\">$course->shortname</a> -> $strassigncourses",
- "studentform.searchtext");
+ "searchtext");
/// Print a help notice about the need to use this page
/// Print form for creating new categories
if (has_capability('moodle/category:create', $context)) {
echo "<center>";
- echo "<form name=\"addform\" action=\"index.php\" method=\"post\">";
+ echo "<form id=\"addform\" action=\"index.php\" method=\"post\">";
echo "<input type=\"text\" size=\"30\" alt=\"$straddnewcategory\" name=\"addcategory\" />";
echo "<input type=\"submit\" value=\"$straddnewcategory\" />";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />";
$strsearchcourses= get_string("searchcourses");
if ($format == 'plain') {
- $output = '<form name="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
+ $output = '<form id="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
$output .= '<center><p align="center" class="coursesearchbox">';
$output .= '<input type="text" size="30" name="search" alt="'.s($strsearchcourses).'" value="'.s($value, true).'" />';
$output .= '<input type="submit" value="'.s($strsearchcourses).'" />';
$output .= '</p></center></form>';
} else if ($format == 'short') {
- $output = '<form name="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
+ $output = '<form id="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
$output .= '<center><p align="center" class="coursesearchbox">';
$output .= '<input type="text" size="12" name="search" alt="'.s($strsearchcourses).'" value="'.s($value, true).'" />';
$output .= '<input type="submit" value="'.s($strsearchcourses).'" />';
$output .= '</p></center></form>';
} else if ($format == 'navbar') {
- $output = '<form name="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
+ $output = '<form id="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
$output .= '<table border="0" cellpadding="0" cellspacing="0"><tr><td nowrap="nowrap">';
$output .= '<input type="text" size="20" name="search" alt="'.s($strsearchcourses).'" value="'.s($value, true).'" />';
$output .= '<input type="submit" value="'.s($strsearchcourses).'" />';
-<form name="form" method="post" action="<?php echo "$CFG->wwwroot/course/mod.php" ?>">
+<form id="form" method="post" action="<?php echo "$CFG->wwwroot/course/mod.php" ?>">
<input type="hidden" name="mode" value="delete" />
<input type="hidden" name="section" value="<?php p($form->section) ?>" />
-<form action="pending.php" method="post" name="reject">
+<form action="pending.php" method="post" id="reject">
<input type="hidden" name="reject" value="<?php p($reject->id); ?>" />
<textarea name="rejectnotice" rows="10" cols="50"></textarea><br />
<input type="submit" value="<?php print_string("savechanges");?>" />
//]]>
</script>
';
- echo '<form action="'.$CFG->wwwroot.'/user/action_redir.php" method="post" name="studentsform" onSubmit="return checksubmit(this);">';
+ echo '<form action="'.$CFG->wwwroot.'/user/action_redir.php" method="post" id="studentsform" onSubmit="return checksubmit(this);">';
echo '<input type="hidden" name="id" value="'.$id.'" />';
echo '<input type="hidden" name="returnto" value="'.$_SERVER['REQUEST_URI'].'" />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
print_simple_box(get_string('resetinfo'), 'center', '60%');
- echo '<form name="reset" action="reset.php" method="POST">';
+ echo '<form id="reset" action="reset.php" method="POST">';
print_heading(get_string('course'), 'left', 3);
$scale->scale = $form->scalescale;
$scale->description = $form->description;
}
- echo "<form method=\"post\" action=\"scales.php\" name=\"form$scale->id\">";
+ echo "<form method=\"post\" action=\"scales.php\" id=\"form$scale->id\">";
echo "<table cellpadding=\"9\" cellspacing=\"0\" align=\"center\" class=\"generalbox\">";
echo "<tr valign=\"top\">";
if (!empty($errors[$scale->id]->name)) {
}
} else { // slightly more sophisticated
- echo "<form name=\"movecourses\" action=\"search.php\" method=\"post\">";
+ echo "<form id=\"movecourses\" action=\"search.php\" method=\"post\">";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\">";
echo "<input type=\"hidden\" name=\"search\" value=\"".s($search, true)."\">";
echo "<input type=\"hidden\" name=\"page\" value=\"$page\">";
echo "<br />";
echo "<input type=\"button\" onclick=\"checkall()\" value=\"$strselectall\" />\n";
echo "<input type=\"button\" onclick=\"uncheckall()\" value=\"$strdeselectall\" />\n";
- choose_from_menu ($displaylist, "moveto", "", get_string("moveselectedcoursesto"), "javascript:document.movecourses.submit()");
+ choose_from_menu ($displaylist, "moveto", "", get_string("moveselectedcoursesto"), "javascript: getElementById('movecourses').submit()");
echo "</td></tr>";
echo "</table>";
<p align="center"><?php if (! empty($this->errormsg)) {formerr($this->errormsg);} ?></p>
- <form name="form" method="post" action="enrol.php">
+ <form method="post" action="enrol.php">
<table align="center" width="100%">
<tr>
<td align="right"><?php print_string("enrolmentkey") ?>:</td>
if ($course->guest and !isguest()) {
print_simple_box_start('center');
?>
- <form name="form" method="post" action="enrol.php">
+ <form method="post" action="enrol.php">
<table align="center" cellpadding="20">
<tr>
<td><?php print_string('allowguests') ?>: </td>
?>
<div class="allowedcoursesdiv">
- <form name="allowedcoursesform" method="post">
+ <form id="allowedcoursesform" method="post">
<input type="hidden" name="sesskey" value="<?php echo $sesskey; ?>">
<?php
<tr>
<td valign="top">
<select name="removecategories[]" size="20" id="removecategories" multiple
- onFocus="document.allowedcoursesform.addcategory.disabled=true;
- document.allowedcoursesform.removecategory.disabled=false;
- document.allowedcoursesform.addcategories.selectedIndex=-1;" />
+ onFocus="getElementById('allowedcoursesform').addcategory.disabled=true;
+ getElementById('allowedcoursesform').removecategory.disabled=false;
+ getElementById('allowedcoursesform').addcategories.selectedIndex=-1;" />
<?php
foreach ($allowedcategories as $category) {
echo "<option value=\"$category->id\"> $category->name </option>\n";
<td valign="top">
<select name="addcategories[]" size="20" id="addcategories" multiple
- onFocus="document.allowedcoursesform.addcategory.disabled=false;
- document.allowedcoursesform.removecategory.disabled=true;
- document.allowedcoursesform.removecategories.selectedIndex=-1;">
+ onFocus="getElementById('allowedcoursesform').addcategory.disabled=false;
+ getElementById('allowedcoursesform').removecategory.disabled=true;
+ getElementById('allowedcoursesform').removecategories.selectedIndex=-1;">
<?php
foreach ($potentialcategories as $category) {
echo "<option value=\"$category->id\"> $category->name </option>\n";
<tr>
<td valign="top">
<select name="removecourses[]" size="20" id="removecourses" multiple
- onFocus="document.allowedcoursesform.addcourse.disabled=true;
- document.allowedcoursesform.removecourse.disabled=false;
- document.allowedcoursesform.addcourses.selectedIndex=-1;" />
+ onFocus="getElementById('allowedcoursesform').addcourse.disabled=true;
+ getElementById('allowedcoursesform').removecourse.disabled=false;
+ getElementById('allowedcoursesform').addcourses.selectedIndex=-1;" />
<?php
foreach ($allowedcourses as $course) {
echo "<option value=\"$course->id\"> $course->shortname </option>\n";
<td valign="top">
<select name="addcourses[]" size="20" id="addcourses" multiple
- onFocus="document.allowedcoursesform.addcourse.disabled=false;
- document.allowedcoursesform.removecourse.disabled=true;
- document.allowedcoursesform.removecourses.selectedIndex=-1;">
+ onFocus="getElementById('allowedcoursesform').addcourse.disabled=false;
+ getElementById('allowedcoursesform').removecourse.disabled=true;
+ getElementById('allowedcoursesform').removecourses.selectedIndex=-1;">
<?php
foreach ($potentialcourses as $course) {
echo "<option value=\"$course->id\"> $course->shortname </option>\n";
-<form name="assignform" id="assignform" method="post" action="">
+<form id="assignform" id="assignform" method="post" action="">
<input type="hidden" name="previoussearch" value="<?php p($previoussearch) ?>" />
<input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
<input type="hidden" name="host" value="<?php p($mnethost->id) ?>" />
<tr>
<td valign="top">
<select name="removeselect[]" size="20" id="removeselect" multiple
- onFocus="document.assignform.add.disabled=true;
- document.assignform.remove.disabled=false;
- document.assignform.addselect.selectedIndex=-1;" />
+ onFocus="getElementById('assignform').add.disabled=true;
+ getElementById('assignform').remove.disabled=false;
+ getElementById('assignform').addselect.selectedIndex=-1;" />
<?php
foreach ($enrolledusers as $enrolleduser) {
$fullname = fullname($enrolleduser, true);
</td>
<td valign="top">
<select name="addselect[]" size="20" id="addselect" multiple
- onFocus="document.assignform.add.disabled=false;
- document.assignform.remove.disabled=true;
- document.assignform.removeselect.selectedIndex=-1;">
+ onFocus="getElementById('assignform').add.disabled=false;
+ getElementById('assignform').remove.disabled=true;
+ getElementById('assignform').removeselect.selectedIndex=-1;">
<?php
if (!empty($searchtext)) {
</select>
<br />
<input type="text" name="searchtext" size="30" value="<?php p($searchtext, true) ?>"
- onFocus ="document.assignform.add.disabled=true;
- document.assignform.remove.disabled=true;
- document.assignform.removeselect.selectedIndex=-1;
- document.assignform.addselect.selectedIndex=-1;"
+ onFocus ="getElementById('assignform').add.disabled=true;
+ getElementById('assignform').remove.disabled=true;
+ getElementById('assignform').removeselect.selectedIndex=-1;
+ getElementById('assignform').addselect.selectedIndex=-1;"
onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
if (keyCode == 13) {
- document.assignform.previoussearch.value=1;
- document.assignform.submit();
+ getElementById('assignform').previoussearch.value=1;
+ getElementById('assignform').submit();
} " />
<input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
<?php
$httpreferer = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER'];
$requesturi = empty($_SERVER['REQUEST_URI']) ? '' : $_SERVER['REQUEST_URI'];
- print_header($site->fullname .':Error', $site->fullname .': Error 404', '', 'form.text');
+ print_header($site->fullname .':Error', $site->fullname .': Error 404', '', 'text');
print_simple_box('<p align="center">'. get_string('pagenotexist', 'error'). '<br />'.s($requesturi).'</p>', 'center');
?>
<center>
<p><?php echo get_string('pleasereport', 'error'); ?>
- <p><form action="<?php echo $CFG->wwwroot ?>/error/index.php" name="form" method="post">
- <textarea rows="3" cols="50" name="text"></textarea><br />
+ <p><form action="<?php echo $CFG->wwwroot ?>/error/index.php" method="post">
+ <textarea rows="3" cols="50" name="text" id="text"></textarea><br />
<input type="hidden" name="referer" value="<?php p($httpreferer) ?>">
<input type="hidden" name="requested" value="<?php p($requesturi) ?>">
<input type="submit" value="<?php echo get_string('sendmessage', 'error'); ?>">
html_header($course, $wdir, "form.name");
echo "<p>$strrenamefileto:</p>";
echo "<table><tr><td>";
- echo "<form action=\"index.php\" method=\"post\" name=\"form\">";
+ echo "<form action=\"index.php\" method=\"post\">";
echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
html_header($course, $wdir, "form.name");
echo "<p>$strcreatefolder:</p>";
echo "<table><tr><td>";
- echo "<form action=\"index.php\" method=\"post\" name=\"form\">";
+ echo "<form action=\"index.php\" method=\"post\">";
echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
print_heading("$streditfile");
echo "<table><tr><td colspan=\"2\">";
- echo "<form action=\"index.php\" method=\"post\" name=\"form\">";
+ echo "<form action=\"index.php\" method=\"post\">";
echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
echo "<br />";
echo "<p align=\"center\">".get_string("whattocallzip")."</p>";
echo "<table><tr><td>";
- echo "<form action=\"index.php\" method=\"post\" name=\"form\">";
+ echo "<form action=\"index.php\" method=\"post\">";
echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
$strfile = get_string("file");
- echo "<form action=\"index.php\" method=\"post\" name=\"dirform\">";
+ echo "<form action=\"index.php\" method=\"post\" id=\"dirform\">";
echo '<input type="hidden" name="choose" value="'.$choose.'" />';
echo "<hr width=\"640\" align=\"center\" noshade=\"noshade\" size=\"1\" />";
echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\" width=\"640\" class=\"files\">";
?>
function updategrade_item() {
- document.form1.grade_itemid.value = document.form2.grade_items.value;
- document.form3.grade_itemid.value = document.form2.grade_items.value;
+ getElementById('form1').grade_itemid.value = getElementById('form2').grade_items.value;
+ getElementById('form3').grade_itemid.value = getElementById('form2').grade_items.value;
}
username = grade_item.username;
userid = grade_item.userid;
- document.form3['members[]'].length = username.length;
+ getElementById('form3')['members[]'].length = username.length;
for (i=0;i<username.length;i++) {
- document.form3['members[]'].options[i].value = userid[i];
- document.form3['members[]'].options[i].text = username[i];
+ getElementById('form3')['members[]'].options[i].value = userid[i];
+ getElementById('form3')['members[]'].options[i].text = username[i];
}
eval('grade_item_inc=grade_item_inc'+selectgrade_item.value);
username = grade_item_inc.username;
userid = grade_item_inc.userid;
- document.form1['nonmembers[]'].length = username.length;
+ getElementById('form1')['nonmembers[]'].length = username.length;
for (i=0;i<username.length;i++) {
- document.form1['nonmembers[]'].options[i].value = userid[i];
- document.form1['nonmembers[]'].options[i].text = username[i];
+ getElementById('form1')['nonmembers[]'].options[i].value = userid[i];
+ getElementById('form1')['nonmembers[]'].options[i].text = username[i];
}
updategrade_item();
</tr>
<tr align="center" valign="top">
<td class="generalboxcontent">
- <form name="form1" id="form1" method="post" action="exceptions.php">
+ <form id="form1" method="post" action="exceptions.php">
<input type="hidden" name="id" value="<?php p($course->id) ?>" />
<input type="hidden" name="grade_itemid" value="<?php p($selectedgrade_item) ?>" />
<input type="hidden" name="action" value="excepts" />
</form>
</td>
<td class="generalboxcontent">
- <form name="form2" id="form2" method="post" action="grade_items.php">
+ <form id="form2" method="post" action="grade_items.php">
<input type="hidden" name="id" value="<?php p($course->id) ?>" />
<input type="hidden" name="action" value="excepts" />
<input type="hidden" name="sesskey" value="<?php p($USER->sesskey) ?>"/>
<td class="generalboxcontent">
- <form name="form3" id="form3" method="post" action="exceptions.php">
+ <form id="form3" method="post" action="exceptions.php">
<input type="hidden" name="id" value="<?php p($course->id) ?>" />
<input type="hidden" name="grade_itemid" value="<?php p($selectedgrade_item) ?>" />
<input type="hidden" name="sesskey" value="<?php p($USER->sesskey) ?>"/>
$categories = get_records('grade_category', 'courseid', $course->id);
if ($categories) {
- echo '<form name="grade_weights" action="./index.php" method="post">';
+ echo '<form id="grade_weights" action="./index.php" method="post">';
echo '<table border="0" cellspacing="2" cellpadding="5" align="center" class="generalbox">';
echo '<tr><th colspan="5" class="header" scope="col">'.get_string('setweights','grades');
helpbutton('weight', get_string('gradeweighthelp','grades'), 'grade');
echo '<td align="center" class="generaltableheader">'.get_string('maxgrade','grades').'</td>';
echo '<td align="center" class="generaltableheader">'.get_string('curveto','grades').'</td>';
echo '<td align="center" class="generaltableheader">'.get_string('extracredit','grades').'</td></tr>';
- echo '<form name="set_categories" method="post" action="./index.php" >';
+ echo '<form id="set_categories" method="post" action="./index.php" >';
echo '<input type="hidden" name="action" value="assign_categories" />';
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
/// just a simple text box with submit
global $course;
global $USER;
- echo '<form name="new_category">';
+ echo '<form id="new_category">';
echo get_string('addcategory','grades').':<input type="text" name="name" size="20" />';
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
echo '<input type="hidden" name="action" value="insert_category" />';
// outputs a form to delete a category
global $course;
global $USER;
- echo '<form name="delete_category">';
+ echo '<form id="delete_category">';
echo get_string('deletecategory','grades').': <select name="category_id">';
grade_category_select();
echo '</select><input type="hidden" name="id" value="'.$course->id.'" />';
print_single_button('index.php', $buttonoptions, $buttonlabel, 'post');
echo '<br /></center>';
- echo '<form name="set_grade_preferences" method="post" action="./index.php">';
+ echo '<form id="set_grade_preferences" method="post" action="./index.php">';
echo '<input type="hidden" name="action" value="set_grade_preferences" />';
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
$letters[10]->courseid = $course->id;
}
- echo '<form name="grade_letter"><input type="hidden" name="id" value="'.$course->id.'" />';
+ echo '<form id="grade_letter"><input type="hidden" name="id" value="'.$course->id.'" />';
echo '<table border="0" cellspacing="2" cellpadding="5" align="center" class="generalbox"><tr>';
echo '<th colspan="3" class="header" scope="col">'.get_string('setgradeletters','grades');
helpbutton('letter', get_string('gradeletterhelp','grades'), 'grade');
$straddfeed = get_string('addfeed', 'block_rss_client');
$returnstring = '<table align="center"><tbody><tr><td>'."\n";
- $returnstring .= '<form action="'. $CFG->wwwroot .'/blocks/rss_client/block_rss_client_action.php" method="POST" name="block_rss">'."\n";
+ $returnstring .= '<form action="'. $CFG->wwwroot .'/blocks/rss_client/block_rss_client_action.php" method="post" id="block_rss">'."\n";
if ($act == 'rssedit') {
$returnstring .= $strupdatefeed;
$returnstring .= '<input type="hidden" name="user" value="'. $USER->id .'" />'."\n";
$returnstring .= '<br /><input type="submit" value="';
$validatestring = "<a href=\"#\"
-onClick=\"window.open('http://feedvalidator.org/check.cgi?url='+document.block_rss.elements['url'].value,'validate','width=640,height=480,scrollbars=yes,status=yes,resizable=yes');return true;\">". get_string('validatefeed', 'block_rss_client')."</a>";
+onClick=\"window.open('http://feedvalidator.org/check.cgi?url='+getElementId('block_rss').elements['url'].value,'validate','width=640,height=480,scrollbars=yes,status=yes,resizable=yes');return true;\">". get_string('validatefeed', 'block_rss_client')."</a>";
if ($act == 'rssedit') {
$returnstring .= $stredit;
}
function init_spell() {
- var controlForm = document.spellcheck;
+ var controlForm = getElementById('spellcheck');
// create a new controlWindow object
controlWindowObj = new controlWindow( controlForm );
<body class="controlWindowBody" onLoad="init_spell();">
-<form name="spellcheck">
+<form id="spellcheck">
<table border="0" cellpadding="0" cellspacing="0" border="0">
<tr>
-<form name="personsearch" action="index.php" method="post">
+<form id="personsearch" action="index.php" method="post">
<input type="hidden" name="tab" value="search" />
echo '<body class="message course-1" id="message-send">';
echo '<center>';
- echo '<form name="editing" method="post" action="send.php">';
+ echo '<form id="editing" method="post" action="send.php">';
echo '<input type="hidden" name="id" value="'.$user->id.'" />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
-<form name="message_settings" action="index.php" method="post">
+<form id="message_settings" action="index.php" method="post">
<input type="hidden" name="tab" value="settings" />
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
<input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
<table cellpadding="9" cellspacing="0" >
print_user_picture($teacher->id, $this->course->id, $teacher->picture);
echo '</td>';
echo '<td class="content">';
- echo '<form name="submitform" action="submissions.php" method="post">';
+ echo '<form id="submitform" action="submissions.php" method="post">';
echo '<input type="hidden" name="offset" value="'.++$offset.'">';
echo '<input type="hidden" name="userid" value="'.$userid.'" />';
echo '<input type="hidden" name="id" value="'.$this->cm->id.'" />';
/// Print quickgrade form around the table
if ($quickgrade){
- echo '<form action="submissions.php" name="fastg" method="post">';
+ echo '<form action="submissions.php" id="fastg" method="post">';
echo '<input type="hidden" name="id" value="'.$this->cm->id.'">';
echo '<input type="hidden" name="mode" value="fastgrade">';
echo '<input type="hidden" name="page" value="'.$page.'">';
/// Mini form for setting user preference
echo '<br />';
- echo '<form name="options" action="submissions.php?id='.$this->cm->id.'" method="post">';
+ echo '<form id="options" action="submissions.php?id='.$this->cm->id.'" method="post">';
echo '<input type="hidden" id="updatepref" name="updatepref" value="1" />';
echo '<table id="optiontable" align="center">';
echo '<tr align="right"><td>';
-<form name="form" method="post" action="<?php p($action) ?>">
+<form id="form" method="post" action="<?php p($action) ?>">
<?php
$form->sesskey = sesskey();
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
<table cellpadding="9" cellspacing="0" >
if(waitFlag) return false;
waitFlag = true;
var input_chat_message = document.getElementById('input_chat_message');
- document.sendForm.chat_message.value = input_chat_message.value;
+ getElementById('sendForm').chat_message.value = input_chat_message.value;
input_chat_message.value = '';
input_chat_message.className = 'wait';
- document.sendForm.submit();
+ getElementById('sendForm').submit();
enableForm();
return false;
}
<?php
$meta = ob_get_clean();
- print_header('', '', '', 'inputForm.chat_message', $meta, false);
+ print_header('', '', '', 'input_chat_message', $meta, false);
?>
- <form action="../empty.php" method="post" target="empty" name="inputForm"
+ <form action="../empty.php" method="post" target="empty" id="inputForm"
onsubmit="return empty_field_and_submit()">
>><input type="text" id="input_chat_message" name="chat_message" size="60" value="" />
<?php helpbutton('chatting', get_string('helpchatting', 'chat'), 'chat', true, false); ?>
</form>
- <form action="insert.php" method="post" target="empty" name="sendForm">
+ <form action="insert.php" method="post" target="empty" id="sendForm">
<input type="hidden" name="chat_sid" value="<?php echo $chat_sid ?>" />
<input type="hidden" name="chat_message" />
</form>
has_capability('mod/choice:choose', $context) ) {
// They haven't made their choice yet or updates allowed and choice is open
- echo '<form name="form" method="post" action="view.php">';
+ echo '<form id="form" method="post" action="view.php">';
choice_show_form($choice, $USER, $cm);
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
<table cellpadding="9" cellspacing="0" >
if ($fields = get_records('data_fields','dataid',$data->id)) {
echo '<div class="sortdefault" align="center">';
- echo '<form name="sortdefault" action="'.$CFG->wwwroot.'/mod/data/field.php" method="get">';
+ echo '<form id="sortdefault" action="'.$CFG->wwwroot.'/mod/data/field.php" method="get">';
echo '<input type="hidden" name="d" value="'.$data->id.'" />';
echo '<input type="hidden" name="mode" value="sort" />';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
}
print_simple_box_start('center','80%');
- echo '<form name="editfield" action="'.$CFG->wwwroot.'/mod/data/field.php" method="post">'."\n";
+ echo '<form id="editfield" action="'.$CFG->wwwroot.'/mod/data/field.php" method="post">'."\n";
echo '<input type="hidden" name="d" value="'.$this->data->id.'" />'."\n";
if (empty($this->field->id)) {
echo '<input type="hidden" name="mode" value="add" />'."\n";
************************************************************************/
function data_print_preference_form($data, $perpage, $search, $sort='', $order='ASC'){
echo '<br /><div class="datapreferences" align="center">';
- echo '<form name="options" action="view.php" method="get">';
+ echo '<form id="options" action="view.php" method="get">';
echo '<input type="hidden" name="d" value="'.$data->id.'" />';
echo '<label for="pref_perpage">'.get_string('pagesize','data').'</label> ';
$pagesizes = array(2=>2,3=>3,4=>4,5=>5,6=>6,7=>7,8=>8,9=>9,10=>10,15=>15,
$ratingsmenuused = false;
echo '<div class="ratings" align="center">';
- echo '<form name="form" method="post" action="rate.php">';
+ echo '<form id="form" method="post" action="rate.php">';
if (has_capability('mod/data:rate', $context) and !data_isowner($record->id)) {
data_print_ratings_mean($record->id, $ratingsscale, has_capability('mod/data:viewrating', $context));
helpbutton('importfromfile', '', 'data');
echo '</td><td>';
-echo '<form name="uploadpreset" method="post" action="preset.php">';
+echo '<form id="uploadpreset" method="post" action="preset.php">';
echo '<input type="hidden" name="d" value="'.$data->id.'" />';
echo '<input type="hidden" name="action" value="importzip" />';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
helpbutton('usepreset', '', 'data');
echo '</td><td>';
-echo '<form name="presets" method="post" action="preset.php" >';
+echo '<form id="presets" method="post" action="preset.php" >';
echo '<input type="hidden" name="d" value="'.$data->id.'" />';
echo '<input type="hidden" name="action" value="importpreset" />';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
$bodytag = 'onload="';
$bodytag .= 'if (typeof('.$editorobj.') != \'undefined\') { currEditor = '.$editorobj.'; } ';
- $bodytag .= 'currTextarea = document.tempform.template;';
+ $bodytag .= 'currTextarea = getElementById(\'tempform\').template;';
$bodytag .= '" ';
// Javascript to insert the field tags into the textarea.
}
- echo '<form name="tempform" action="templates.php?d='.$data->id.'&mode='.$mode.'" method="post">';
+ echo '<form id="tempform" action="templates.php?d='.$data->id.'&mode='.$mode.'" method="post">';
echo '<input name="sesskey" value="'.sesskey().'" type="hidden" />';
// Print button to autogen all forms, if all templates are empty
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<table cellpadding="9" cellspacing="0" >
&& $course->id != SITEID)) {
echo '<div class="singlebutton forumaddnew">';
- echo "<form name=\"newdiscussionform\" method=\"get\" action=\"$CFG->wwwroot/mod/forum/post.php\">";
+ echo "<form id=\"newdiscussionform\" method=\"get\" action=\"$CFG->wwwroot/mod/forum/post.php\">";
echo "<input type=\"hidden\" name=\"forum\" value=\"$forum->id\" />";
echo '<input type="submit" value="';
echo ($forum->type == 'news') ? get_string('addanewtopic', 'forum')
$ratings->allow = $canrate;
if ($ratings->allow) {
- echo '<form name="form" method="post" action="rate.php">';
+ echo '<form id="form" method="post" action="rate.php">';
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
echo '<input type="hidden" name="forumid" value="'.$forum->id.'" />';
}
-<form name="prune" method="get" action="post.php">
+<form id="pruneform" method="get" action="post.php">
<table border="0" cellpadding="5">
<tr valign="top">
<td align="right"><b><?php print_string("discussionname", "forum"); ?>:</b></td>
-<form name="subscriberform" id="subscriberform" method="post" action="subscribers.php">
+<form id="subscriberform" method="post" action="subscribers.php">
<input type="hidden" name="previoussearch" value="<?php echo $previoussearch ?>" />
<input type="hidden" name="id" value="<?php echo $id?>" />
<table align="center" border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<select name="removeselect[]" size="20" id="removeselect" multiple
- onFocus="document.subscriberform.add.disabled=true;
- document.subscriberform.remove.disabled=false;
- document.subscriberform.addselect.selectedIndex=-1;">
+ onFocus="getElementById('subscriberform').add.disabled=true;
+ getElementById('subscriberform').remove.disabled=false;
+ getElementById('subscriberform').addselect.selectedIndex=-1;">
<?php
foreach ($subscribers as $subscriber) {
$fullname = fullname($subscriber, true);
</td>
<td valign="top">
<select name="addselect[]" size="20" id="addselect" multiple
- onFocus="document.subscriberform.add.disabled=false;
- document.subscriberform.remove.disabled=true;
- document.subscriberform.removeselect.selectedIndex=-1;">
+ onFocus="getElementById('subscriberform').add.disabled=false;
+ getElementById('subscriberform').remove.disabled=true;
+ getElementById('subscriberform').removeselect.selectedIndex=-1;">
<?php
if (!empty($searchusers)) {
echo "<optgroup label=\"$strsearchresults (" . count($searchusers) . ")\">\n";
</select>
<br />
<input type="text" name="searchtext" size="30" value="<?php echo $searchtext ?>"
- onFocus ="document.subscriberform.add.disabled=true;
- document.subscriberform.remove.disabled=true;
- document.subscriberform.removeselect.selectedIndex=-1;
- document.subscriberform.addselect.selectedIndex=-1;"
+ onFocus ="getElementById('subscriberform').add.disabled=true;
+ getElementById('subscriberform').remove.disabled=true;
+ getElementById('subscriberform').removeselect.selectedIndex=-1;
+ getElementById('subscriberform').addselect.selectedIndex=-1;"
onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
if (keyCode == 13) {
- document.subscriberform.previoussearch.value=1;
- document.subscriberform.submit();
+ getElementById('subscriberform').previoussearch.value=1;
+ getElementById('subscriberform').submit();
} " />
<input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
<?php
$yes = get_string("yes");
$no = get_string("no");
?>
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
<table cellpadding=9 cellspacing=0 >
require_once("../../config.php");
?>
<center>
-<form name="form" method="post" action="editcategories.php">
+<form id="form" method="post" action="editcategories.php">
<table class="generalbox" cellpadding="5">
<tr valign="top">
<td align="right"><b><?php echo get_string("name") ?>:</b></td>
echo "<p>";
print_string("areyousuredelete","glossary");
?>
- <form name="form" method="post" action="editcategories.php">
+ <form id="form" method="post" action="editcategories.php">
<input type="hidden" name="id" value="<?php p($cm->id) ?>" />
<input type="hidden" name="action" value="delete" />
<div align="center">
-<form name="theform" method="post" action="editcategories.php">
+<form method="post" action="editcategories.php">
<table width="40%" class="generalbox" cellpadding="5">
<tr>
<td width="90%" align="center"><b>
$yes = get_string("yes");
$no = get_string("no");
- echo '<form method="post" action="formats.php" name="form">';
+ echo '<form method="post" action="formats.php" id="form">';
echo '<table width="90%" align="center" class="generalbox">';
?>
<tr>
-<form method="post" action="import.php" name="form" enctype="multipart/form-data">
+<form method="post" action="import.php" enctype="multipart/form-data">
<table border="0" cellpadding="3" cellspacing="3" width="100%">
<tr>
<td align="right" valign="top" width="30%"><b><?php print_string("filetoimport","glossary") ?>:<br />
$ratings->allow = true;
}
- echo "<form name=\"form\" method=\"post\" action=\"rate.php\">";
+ echo "<form method=\"post\" action=\"rate.php\">";
echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
}
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
<INPUT type="hidden" name="sesskey" value="<?PHP print isset($USER->sesskey) ? $USER->sesskey : '' ?>">
<TABLE cellpadding="9" cellspacing="0">
$replace .= '\\2';
}
if ($form_name) {
- $replace = '<form action="'.$CFG->wwwroot.'/mod/hotpot/attempt.php" method="POST" name="'.$form_name.'" '.$CFG->frametarget.'">'.$replace.'</form>';
+ $replace = '<form action="'.$CFG->wwwroot.'/mod/hotpot/attempt.php" method="post" name="'.$form_name.'" '.$CFG->frametarget.'">'.$replace.'</form>';
}
if ($center) {
$replace = '<div style="margin-left:auto; margin-right:auto; text-align: center;">'.$replace.'</div>';
if ($options['reportformat']=='htm' && has_capability('mod/hotpot:viewreport',get_context_instance(CONTEXT_COURSE, $course->id))) {
$strdeletecheck = get_string('deleteattemptcheck','quiz');
$table->start = $this->deleteform_javascript();
- $table->start .= '<form method="post" action="report.php" name="deleteform" onsubmit="'."return deletecheck('".$strdeletecheck."', 'selection')".'">'."\n";
+ $table->start .= '<form method="post" action="report.php" id="deleteform" onsubmit="'."return deletecheck('".$strdeletecheck."', 'selection')".'">'."\n";
$table->start .= '<input type="hidden" name="del" value="selection">'."\n";
$table->start .= '<input type="hidden" name="id" value="'.$cm->id.'">'."\n";
$table->finish = '<center>'."\n";
$table->finish .= '<input type="submit" value="'.get_string("deleteselected").'"> '."\n";
if ($abandoned) {
- $table->finish .= '<input type=button value="'.get_string('deleteabandoned', 'hotpot').'" onClick="if(deletecheck('."'".addslashes(get_string('deleteabandonedcheck', 'hotpot', $abandoned))."', 'abandoned', true".'))document.deleteform.submit();">'."\n";
+ $table->finish .= '<input type=button value="'.get_string('deleteabandoned', 'hotpot').'" onClick="if(deletecheck('."'".addslashes(get_string('deleteabandonedcheck', 'hotpot', $abandoned))."', 'abandoned', true".')) getElementById(\'deleteform\').submit();">'."\n";
}
- $table->finish .= '<input type=button value="'.get_string("deleteall").'" onClick="if(deletecheck('."'".addslashes($strdeletecheck)."', 'all', true".'))document.deleteform.submit();">'."\n";
+ $table->finish .= '<input type=button value="'.get_string("deleteall").'" onClick="if(deletecheck('."'".addslashes($strdeletecheck)."', 'all', true".'))getElementById(\'deleteform\').submit();">'."\n";
$table->finish .= '</center>'."\n";
$table->finish .= '</form>'."\n";
}
function deletecheck(p, v, x) {
var r = false; // result
// get length of form elements
- var f = document.deleteform;
+ var f = getElementById('deleteform');
var l = f ? f.elements.length : 0;
// count selected items, if necessary
if (!x) {
print_simple_box_end();
print "<br />\n";
}
- print '<form name="passwordform" method="post" action="view.php?id='.$cm->id.'">'."\n";
+ print '<form id="passwordform" method="post" action="view.php?id='.$cm->id.'">'."\n";
print_simple_box_start($boxalign, $boxwidth);
print '<div align="center">';
print get_string('requirepasswordmessage', 'quiz').'<br /><br />';
-<form name="theform" method="post" action="edit.php">
+<form id="theform" method="post" action="edit.php">
<table cellpadding="10" cellspacing="0" class="generalbox">
<tr><td align="right">
<?php
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
<table cellpadding="9" cellspacing="0">
// give teacher a blank proforma
print_heading_with_help(get_string("addabranchtable", "lesson"), "overview", "lesson");
?>
- <form name="form" method="post" action="lesson.php">
+ <form id="form" method="post" action="lesson.php">
<input type="hidden" name="id" value="<?PHP echo $cm->id ?>" />
<input type="hidden" name="action" value="insertpage" />
<input type="hidden" name="pageid" value="<?PHP echo $pageid ?>" />
// give teacher a blank proforma
print_heading_with_help(get_string("addaquestionpage", "lesson"), "overview", "lesson");
?>
- <form name="form" method="post" action="lesson.php">
+ <form id="form" method="post" action="lesson.php">
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="action" value="insertpage" />
<input type="hidden" name="pageid" value="<?php echo $pageid ?>" />
<?php if (isset($USER->modattempts[$lesson->id])) { // User is modifying attempts - save button and some instructions ?>
- <form name="endoflesson" method ="post" action="<?php echo $CFG->wwwroot ?>/mod/lesson/view.php">
+ <form id="endoflesson" method ="post" action="<?php echo $CFG->wwwroot ?>/mod/lesson/view.php">
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="pageid" value="<?php echo LESSON_EOL; ?>" />
<?php if ($lesson->review && !$correctanswer && !$noanswer && !$isessayquestion) { // Review button back ?>
- <form name="reviewback" method ="post" action="<?php echo $CFG->wwwroot ?>/mod/lesson/view.php">
+ <form id="reviewback" method ="post" action="<?php echo $CFG->wwwroot ?>/mod/lesson/view.php">
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="pageid" value="<?php echo $pageid; ?>" />
}
// give teacher a proforma
?>
- <form name="editpage" method="post" action="lesson.php">
+ <form id="editpage" method="post" action="lesson.php">
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="action" value="updatepage" />
<input type="hidden" name="pageid" value="<?php echo $pageid ?>" />
echo helpbutton("questiontypes", get_string("questiontype", "lesson"), "lesson")."<br />";
lesson_qtype_menu($LESSON_QUESTION_TYPE, $page->qtype,
"lesson.php?id=$cm->id&action=editpage&pageid=$page->id",
- "document.editpage.redisplay.value=1;document.editpage.submit();");
+ "getElementById('editpage').redisplay.value=1;getElementById('editpage').submit();");
echo "<p><b><label for=\"qoption\">".get_string('multianswer', 'lesson').":</label></b> \n";
if ($page->qoption) {
echo "<input type=\"checkbox\" id=\"qoption\" name=\"qoption\" value=\"1\" checked=\"checked\" />";
echo helpbutton("questiontypes", get_string("questiontype", "lesson"), "lesson")."<br />";
lesson_qtype_menu($LESSON_QUESTION_TYPE, $page->qtype,
"lesson.php?id=$cm->id&action=editpage&pageid=$page->id",
- "document.editpage.redisplay.value=1;document.editpage.submit();");
+ "getElementById('editpage').redisplay.value=1;getElementById('editpage').submit();");
echo "<p><b><label for=\"qoption\">".get_string('casesensitive', 'lesson').":</label></b> \n";
if ($page->qoption) {
echo "<input type=\"checkbox\" id=\"qoption\" name=\"qoption\" value=\"1\" checked=\"checked\" />";
echo helpbutton("questiontypes", get_string("questiontype", "lesson"), "lesson")."<br />";
lesson_qtype_menu($LESSON_QUESTION_TYPE, $page->qtype,
"lesson.php?id=$cm->id&action=editpage&pageid=$page->id",
- "document.editpage.redisplay.value=1;document.editpage.submit();");
+ "getElementById('editpage').redisplay.value=1;getElementById('editpage').submit();");
break;
}
?>
?>
</table><br />
<input type="button" value="<?php print_string("redisplaypage", "lesson") ?>"
- onClick="document.editpage.redisplay.value=1;document.editpage.submit();" />
+ onClick="getElementById('editpage').redisplay.value=1;getElementById('editpage').submit();" />
<input type="submit" value="<?php print_string("savepage", "lesson") ?>" />
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
</center>
// Expects the following to be set: $attemptid, $answer, $user, $page, $attempt
echo '<div class="grade">
- <form name="essaygrade" method="post" action="'.$CFG->wwwroot.'/mod/lesson/essay.php">
+ <form id="essaygrade" method="post" action="'.$CFG->wwwroot.'/mod/lesson/essay.php">
<input type="hidden" name="id" value="'.$cm->id.'" />
<input type="hidden" name="mode" value="update" />
<input type="hidden" name="attemptid" value="'.$attemptid.'" />
case 'add':
print_simple_box_start('center');
echo '<div align="center">
- <form name="nickname" method ="post" action="'.$CFG->wwwroot.'/mod/lesson/highscores.php">
+ <form id="nickname" method ="post" action="'.$CFG->wwwroot.'/mod/lesson/highscores.php">
<input type="hidden" name="id" value="'.$cm->id.'" />
<input type="hidden" name="mode" value="save" />
<input type="hidden" name="sesskey" value="'.sesskey().'" />';
print_heading_with_help($strimportppt, "importppt", "lesson");
print_simple_box_start("center");
- echo "<form name=\"theform\" enctype=\"multipart/form-data\" method=\"post\">";
+ echo "<form id=\"theform\" enctype=\"multipart/form-data\" method=\"post\">";
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n";
echo "<input type=\"hidden\" name=\"pageid\" value=\"$pageid\" />\n";
echo "<table cellpadding=\"5\">";
}
// print it all out !
if (has_capability('mod/lesson:edit', $context)) {
- echo "<form id=\"theform\" name=\"theform\" method=\"post\" action=\"report.php\">\n
+ echo "<form id=\"theform\" method=\"post\" action=\"report.php\">\n
<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />\n
<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n
<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n";
lesson_print_header($cm, $course, $lesson);
echo "<div class=\"password-form\">\n";
print_simple_box_start('center');
- echo '<form name="password" method="post" action="'.$CFG->wwwroot.'/mod/lesson/view.php">' . "\n";
+ echo '<form id="password" method="post" action="'.$CFG->wwwroot.'/mod/lesson/view.php">' . "\n";
echo '<input type="hidden" name="id" value="'. $cm->id .'" />' . "\n";
if (optional_param('userpassword', 0, PARAM_CLEAN)) {
notify(get_string('loginfail', 'lesson'));
// get the answers in a set order, the id order
if ($answers = get_records("lesson_answers", "pageid", $page->id, "id")) {
- echo "<form name=\"answerform\" method =\"post\" action=\"lesson.php\">";
+ echo "<form id=\"answerform\" method =\"post\" action=\"lesson.php\">";
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />";
echo "<input type=\"hidden\" name=\"action\" value=\"continue\" />";
echo "<input type=\"hidden\" name=\"pageid\" value=\"$pageid\" />";
$class = 'standardbutton';
}
// Each button must have its own form inorder for it to work with JavaScript turned off
- $button = "<form name=\"answerform$i\" method=\"post\" action=\"$CFG->wwwroot/mod/lesson/lesson.php\">\n".
+ $button = "<form id=\"answerform$i\" method=\"post\" action=\"$CFG->wwwroot/mod/lesson/lesson.php\">\n".
"<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n".
"<input type=\"hidden\" name=\"action\" value=\"continue\" />\n".
"<input type=\"hidden\" name=\"pageid\" value=\"$pageid\" />\n".
echo "</form>\n";
} else {
// a page without answers - find the next (logical) page
- echo "<form name=\"pageform\" method =\"post\" action=\"$CFG->wwwroot/mod/lesson/view.php\">\n";
+ echo "<form id=\"pageform\" method =\"post\" action=\"$CFG->wwwroot/mod/lesson/view.php\">\n";
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n";
if ($lesson->nextpagedefault) {
// in Flash Card mode...
}
echo "<br />\n";
- echo "<form name=\"passwordform\" method=\"post\" action=\"attempt.php?id=$cm->id\" autocomplete=\"off\">\n";
+ echo "<form id=\"passwordform\" method=\"post\" action=\"attempt.php?id=$cm->id\" autocomplete=\"off\">\n";
print_simple_box_start("center");
echo "<div align=\"center\">\n";
?>
<script type="text/javascript">
//<![CDATA[
- document.write("<form name=\"responseform\" id=\"responseform\" method=\"post\" action=\"attempt.php\" autocomplete=\"off\">\n");
+ document.write("<form id=\"responseform\" method=\"post\" action=\"attempt.php\" autocomplete=\"off\">\n");
//]]>
</script>
<noscript>
</noscript>
<?php
} else {
- echo "<form name=\"responseform\" id=\"responseform\" method=\"post\" action=\"attempt.php\" autocomplete=\"off\">\n";
+ echo "<form id=\"responseform\" method=\"post\" action=\"attempt.php\" autocomplete=\"off\">\n";
}
// Add a hidden field with the quiz id
<script type="text/javascript">
//<![CDATA[
function navigate(page) {
- var ourForm = document.forms['responseform'];
+ var ourForm = getElementById('responseform');
ourForm.page.value=page;
if (ourForm.onsubmit) {
ourForm.onsubmit();
echo "</form>\n";
/// Form to choose to show pagebreaks and to repaginate quiz
- echo '<form method="post" action="edit.php" name="showbreaks">';
+ echo '<form method="post" action="edit.php" id="showbreaks">';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo '<input type="hidden" name="showbreaks" value="0" />';
echo '<input type="checkbox" name="showbreaks" value="1"';
if ($showbreaks) {
echo ' checked="checked"';
}
- echo ' onchange="document.showbreaks.submit(); return true;" />';
+ echo ' onchange="getElementById(\'showbreaks\').submit(); return true;" />';
print_string('showbreaks', 'quiz');
if ($showbreaks) {
if ($reordertool) {
echo ' checked="checked"';
}
- echo ' onchange="document.showbreaks.submit(); return true;" />';
+ echo ' onchange="getElementById(\'showbreaks\').submit(); return true;" />';
print_string('reordertool', 'quiz');
echo ' ';
helpbutton('reorderingtool', get_string('reorderingtool', 'quiz'), 'quiz');
</tr>
<tr>
<td id="QuizTimer" class="generaltablecell" align="center" width="100%">
- <form name="clock"><input onfocus="blur()" type="text" name="time"
+ <form id="clock"><input onfocus="blur()" type="text" id="time"
style="background-color: transparent; border: none; width: 70%; font-family: sans-serif; font-size: 14pt; font-weight: bold; text-align: center;" />
</form>
</td>
function print_options_form($quiz, $cm, $attempts, $lowlimit=0, $pagesize=10) {
global $CFG, $USER;
echo '<div class="controls">';
- echo '<form id="options" name="options" action="report.php" method="post">';
+ echo '<form id="options" action="report.php" method="post">';
echo '<p class="quiz-report-options">'.get_string('analysisoptions', 'quiz').': </p>';
echo '<input type="hidden" name="id" value="'.$cm->id.'" />';
echo '<input type="hidden" name="q" value="'.$quiz->id.'" />';
}
// Print display options
echo '<div class="controls">';
- echo '<form id="options" name="options" action="report.php" method="post">';
+ echo '<form id="options" action="report.php" method="post">';
echo '<p>'.get_string('displayoptions', 'quiz').': </p>';
echo '<input type="hidden" name="id" value="'.$cm->id.'" />';
echo '<input type="hidden" name="q" value="'.$quiz->id.'" />';
}
?>
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
<table cellpadding="9" cellspacing="0" >
?>
<div class='center'>
<?php print_string('organizations','scorm') ?>
- <form name='changeorg' method='post' action='<?php echo $action ?>'>
+ <form id='changeorg' method='post' action='<?php echo $action ?>'>
<?php choose_from_menu($orgs, 'organization', "$organization", '','submit()') ?>
</form>
</div>
print_simple_box_end();
?>
<div class="center">
- <form name="theform" method="post" action="<?php echo $CFG->wwwroot ?>/mod/scorm/player.php?id=<?php echo $cm->id ?>"<?php echo $scorm->popup == 1?' target="newwin"':'' ?>>
+ <form id="theform" method="post" action="<?php echo $CFG->wwwroot ?>/mod/scorm/player.php?id=<?php echo $cm->id ?>"<?php echo $scorm->popup == 1?' target="newwin"':'' ?>>
<?php
if ($scorm->hidebrowse == 0) {
print_string("mode","scorm");
$nohtmleditorneeded = true;
?>
-<form name="form" method="post" action="../mod/survey/details.php">
+<form id="form" method="post" action="../mod/survey/details.php">
<table cellpadding="5">
<tr valign="top">
<td align="right"><b><?php print_string("surveyname", "survey") ?>:</b></td>
}
echo "<hr noshade=\"noshade\" size=\"1\" />";
echo "<center>";
- echo "<form action=\"report.php\" method=\"post\" name=\"form\">";
+ echo "<form action=\"report.php\" method=\"post\">";
echo "<h3>$strnotes:</h3>";
echo "<blockquote>";
echo "<textarea name=\"notes\" rows=\"10\" cols=\"60\">";
// Start the survey form
add_to_log($course->id, "survey", "view form", "view.php?id=$cm->id", $survey->id, $cm->id);
- echo "<form name=\"form\" method=\"post\" action=\"save.php\">";
+ echo "<form method=\"post\" action=\"save.php\">";
echo "<input type=\"hidden\" name=\"id\" value=\"$id\" />";
print_simple_box(format_text($survey->intro), 'center', '70%', '', 5, 'generalbox', 'intro');
}
echo '<tr><td colspan="2">';
- echo '<form name="otherwikis" action="'.$CFG->wwwroot.'/mod/wiki/admin.php">';
+ echo '<form id="otherwikis" action="'.$CFG->wwwroot.'/mod/wiki/admin.php">';
echo '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>';
echo '<td class="sideblockheading"> '
.$WIKI_TYPES[$wiki->wtype].' '
echo '<td class="sideblockheading" align="right">'
.get_string('otherwikis', 'wiki').': ';
- $script = 'self.location=document.otherwikis.wikiselect.options[document.otherwikis.wikiselect.selectedIndex].value';
+ $script = 'self.location=getElementById(\'otherwikis\').wikiselect.options[getElementById(\'otherwikis\').wikiselect.selectedIndex].value';
/// Add Admin-Action
reset($wiki_list);
function wiki_print_search_form($cmid, $search="", $userid, $groupid, $return=false) {
global $CFG;
# TODO: Add Group and User !!!
- $output = "<form name=\"search\" action=\"$CFG->wwwroot/mod/wiki/view.php\">";
+ $output = "<form id=\"search\" action=\"$CFG->wwwroot/mod/wiki/view.php\">";
$output .= "<font size=\"-1\">";
$output .= "<input value=\"".get_string("searchwiki", "wiki").":\" type=\"submit\" />";
$output .= "<input name=\"id\" type=\"hidden\" value=\"$cmid\" />";
}
?>
-<form name="form" method="post" action="mod.php">
+<form id="form" method="post" action="mod.php">
<center>
<table cellpadding="5">
<tr valign="top">
}
echo '<tr><td colspan="2">';
- echo '<form name="otherwikis" action="'.$CFG->wwwroot.'/mod/wiki/view.php">';
+ echo '<form id="otherwikis" action="'.$CFG->wwwroot.'/mod/wiki/view.php">';
echo '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>';
echo '<td class="sideblockheading"> '
.$WIKI_TYPES[$wiki->wtype].' '
echo '<td class="sideblockheading" align="right">'
.get_string('otherwikis', 'wiki').': ';
- $script = 'self.location=document.otherwikis.wikiselect.options[document.otherwikis.wikiselect.selectedIndex].value';
+ $script = 'self.location=getElementById(\'otherwikis\').wikiselect.options[getElementById(\'otherwikis\').wikiselect.selectedIndex].value';
choose_from_menu($wiki_list, "wikiselect", $selected, "choose", $script);
echo '</td>';
echo '</tr></table>';
$assessment->teachercomment = '';
}
?>
-<form name="gradingform" action="assessments.php" method="post">
+<form id="gradingform" action="assessments.php" method="post">
<input type="hidden" name="action" value="updategrading" />
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="redirect" value="<?php echo $redirect ?>" />
error("Submission not found");
}
?>
- <form name="commentform" action="assessments.php" method="post">
+ <form id="commentform" action="assessments.php" method="post">
<input type="hidden" name="action" value="insertcomment" />
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="aid" value="<?php echo $aid ?>" />
// now print the grading form with the grading grade if any
// FORM is needed for Mozilla browsers, else radio bttons are not checked
?>
- <form name="assessmentform" method="post" action="assessments.php">
+ <form id="assessmentform" method="post" action="assessments.php">
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="aid" value="<?php echo $assessment->id ?>" />
<input type="hidden" name="action" value="updateassessment" />
}
?>
-<form name="form" method="post" action="mod.php">
+<form id="form" method="post" action="mod.php">
<table cellpadding="5">
<tr valign="top">
<td align="right"><b><?php print_string("title", "workshop") ?>:</b></td>
$submission = get_record("workshop_submissions", "id", $sid);
print_heading(get_string("amendtitle", "workshop"));
?>
- <form name="amendtitleform" action="submissions.php" method="post">
+ <form id="amendtitleform" action="submissions.php" method="post">
<input type="hidden" name="action" value="adminupdatetitle" />
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="sid" value="<?php echo $sid ?>" />
if (!$correctpass) {
print_simple_box_start("center");
- echo "<form name=\"password\" method=\"post\" action=\"view.php\">\n";
+ echo "<form id=\"password\" method=\"post\" action=\"view.php\">\n";
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n";
echo "<table cellpadding=\"7px\">";
if (isset($_POST['userpassword'])) {
}
?>
-<form name="query" method="get" action="query.php">
+<form id="query" method="get" action="query.php">
<?php if (!$advanced) { ?>
<input type="text" name="query_string" length="50" value="<?php print stripslashes(htmlentities($query_string)) ?>" />
<input type="submit" value="Search" />
print_header();
notify('Your session has expired. Please log in again.');
?>
- <form action="login.php" method="post" name="login" id="login">
+ <form action="login.php" method="post" id="login">
<table border="0" align="center">
<tr>
<td width="80%">
}
?>
-<form method="post" name="form" enctype="multipart/form-data" action="edit.php">
+<form method="post" name="editform" enctype="multipart/form-data" action="edit.php">
<table class="formtable">
<?php
if (has_capability('moodle/user:update', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
if (isset($authplugin->config->{$configvariable})) {
if ( $authplugin->config->{$configvariable} === 'locked'
or ($authplugin->config->{$configvariable} === 'unlockedifempty' and !empty($user->$field))) {
- echo "eval('document.form.$field.disabled=true');\n";
+ echo "eval('getElementById('editform').$field.disabled=true');\n";
}
}
}
}
print_heading(get_string('extendenrol'));
-echo "<form method=\"post\" action=\"extendenrol.php\" name=\"form\">\n";
+echo "<form method=\"post\" action=\"extendenrol.php\">\n";
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
$table->head = array (get_string('fullname'), get_string('enrolmentstart'), get_string('enrolmentend'), get_string('extendperiod'));
//]]>
</script>
';
- echo '<form action="action_redir.php" method="post" name="participantsform" onSubmit="return checksubmit(this);">';
+ echo '<form action="action_redir.php" method="post" id="participantsform" onSubmit="return checksubmit(this);">';
echo '<input type="hidden" name="returnto" value="'.$_SERVER['REQUEST_URI'].'" />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
}
-<form name="theform" method="post" action="messageselect.php">
+<form id="theform" method="post" action="messageselect.php">
<input type="hidden" name="id" value="<?php p($id) ?>" />
<input type="hidden" name="returnto" value="<?php p($returnto) ?>" />
<input type="hidden" name="deluser" value="" />