mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
mod/exercise: HTML fixes
Fixed errors in HTML causing parser errors in Firefox when in developers debug mode. Author: Matt Clarkson <mattc@catalyst.net.nz>
This commit is contained in:
parent
04bc70fc26
commit
f8c609e4a9
3 changed files with 23 additions and 22 deletions
|
@ -302,7 +302,7 @@
|
|||
for ($i=0; $i<$exercise->nelements; $i++) {
|
||||
$iplus1 = $i+1;
|
||||
echo "<tr valign=\"top\">\n";
|
||||
echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></td>\n";
|
||||
echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></p></td>\n";
|
||||
echo "<td><textarea name=\"description[]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">".
|
||||
$elements[$i]->description."</textarea>\n";
|
||||
echo " </td></tr>\n";
|
||||
|
@ -321,7 +321,7 @@
|
|||
for ($i=0; $i<$exercise->nelements; $i++) {
|
||||
$iplus1 = $i+1;
|
||||
echo "<tr valign=\"top\">\n";
|
||||
echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></td>\n";
|
||||
echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></p></td>\n";
|
||||
echo "<td><textarea name=\"description[]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">".
|
||||
$elements[$i]->description."</textarea>\n";
|
||||
echo " </td></tr>\n";
|
||||
|
@ -332,7 +332,7 @@
|
|||
if ($elements[$i]->weight == '') { // not set
|
||||
$elements[$i]->weight = 11; // unity
|
||||
}
|
||||
echo "</tr>\n";
|
||||
echo "</td></tr>\n";
|
||||
echo "<tr valign=\"top\"><td align=\"right\"><b>".get_string("elementweight", "exercise").
|
||||
":</b></td><td>\n";
|
||||
exercise_choose_from_menu($EXERCISE_EWEIGHTS, "weight[]", $elements[$i]->weight, "");
|
||||
|
@ -348,7 +348,7 @@
|
|||
for ($i=0; $i<$exercise->nelements; $i++) {
|
||||
$iplus1 = $i+1;
|
||||
echo "<tr valign=\"top\">\n";
|
||||
echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></td>\n";
|
||||
echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></p></td>\n";
|
||||
echo "<td><textarea name=\"description[$i]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">".
|
||||
$elements[$i]->description."</textarea>\n";
|
||||
echo " </td></tr>\n";
|
||||
|
@ -366,7 +366,7 @@
|
|||
echo "</tr>\n";
|
||||
}
|
||||
echo "</center></table><br />\n";
|
||||
echo "<p><center><b>".get_string("gradetable","exercise")."</b></center>\n";
|
||||
echo "<p><center><b>".get_string("gradetable","exercise")."</b></p></center>\n";
|
||||
echo "<center><table cellpadding=\"5\" border=\"1\"><tr><td align=\"CENTER\">".
|
||||
get_string("numberofnegativeresponses", "exercise");
|
||||
echo "</td><td>". get_string("suggestedgrade", "exercise")."</td></tr>\n";
|
||||
|
@ -392,7 +392,7 @@
|
|||
$iplus1 = $i+1;
|
||||
echo "<tr valign=\"top\">\n";
|
||||
|
||||
echo " <td align=\"right\"><p><b>". get_string("criterion","exercise")." $iplus1:</b></td>\n";
|
||||
echo " <td align=\"right\"><p><b>". get_string("criterion","exercise")." $iplus1:</b></p></td>\n";
|
||||
echo "<td><textarea name=\"description[$i]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">".
|
||||
$elements[$i]->description."</textarea>\n";
|
||||
echo " </td></tr>\n";
|
||||
|
@ -418,7 +418,7 @@
|
|||
for ($i=0; $i<$exercise->nelements; $i++) {
|
||||
$iplus1 = $i+1;
|
||||
echo "<tr valign=\"top\">\n";
|
||||
echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></td>\n";
|
||||
echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></p></td>\n";
|
||||
echo "<td><textarea name=\"description[$i]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">".
|
||||
$elements[$i]->description."</textarea>\n";
|
||||
echo " </td></tr>\n";
|
||||
|
@ -434,7 +434,7 @@
|
|||
$rubrics[$i][$j] = "";
|
||||
}
|
||||
echo "<tr valign=\"top\">\n";
|
||||
echo " <td align=\"right\"><p><b>". get_string("grade")." $j:</b></td>\n";
|
||||
echo " <td align=\"right\"><p><b>". get_string("grade")." $j:</b></p></td>\n";
|
||||
echo "<td><textarea name=\"rubric[$i][$j]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">".
|
||||
$rubrics[$i][$j]."</textarea>\n";
|
||||
echo " </td></tr>\n";
|
||||
|
@ -992,7 +992,7 @@
|
|||
error("Could not insert exercise element!");
|
||||
}
|
||||
$grade = ($elements[intval($error + 0.5)]->maxscore + $form->grade[$i]) * 100 / $exercise->grade;
|
||||
echo "<p><b>".get_string("weightederrorcount", "exercise", intval($error + 0.5))."</b>\n";
|
||||
echo "<p><b>".get_string("weightederrorcount", "exercise", intval($error + 0.5))."</b></p>\n";
|
||||
break;
|
||||
|
||||
case 3: // criteria grading
|
||||
|
|
|
@ -101,7 +101,7 @@ function exercise_choose_from_menu ($options, $name, $selected="", $nothing="cho
|
|||
$javascript = "";
|
||||
}
|
||||
|
||||
$output = "<select name=$name $javascript>\n";
|
||||
$output = "<select name=\"$name\" $javascript>\n";
|
||||
if ($nothing) {
|
||||
$output .= " <option value=\"$nothingvalue\"\n";
|
||||
if ($nothingvalue == $selected) {
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
echo "</table><br clear=\"all\" />\n";
|
||||
echo "</table></center><br clear=\"all\" />\n";
|
||||
if ($exercise->showleaguetable) {
|
||||
exercise_print_league_table($exercise);
|
||||
}
|
||||
|
@ -195,7 +195,7 @@
|
|||
// show student's assessment (linked to the teacher's exercise/submission
|
||||
print_heading(get_string("yourassessment", "exercise"));
|
||||
exercise_list_teacher_submissions($exercise, $USER);
|
||||
echo "<hr size=\"1\" noshade>";
|
||||
echo "<hr size=\"1\" noshade=\"noshade\" />";
|
||||
if ($submissions = exercise_get_user_submissions($exercise, $USER)) {
|
||||
print_heading(get_string("yoursubmission", "exercise"));
|
||||
print_simple_box_start("center");
|
||||
|
@ -229,11 +229,11 @@
|
|||
// always allow student to resubmit
|
||||
if (exercise_test_for_resubmission($exercise, $USER)) {
|
||||
// if resubmission requested print upload form
|
||||
echo "<hr size=\"1\" noshade>";
|
||||
echo "<hr size=\"1\" noshade=\"noshade\" />";
|
||||
print_heading(get_string("pleasesubmityourwork", "exercise").":");
|
||||
exercise_print_upload_form($exercise);
|
||||
}
|
||||
echo "<hr size=\"1\" noshade>";
|
||||
echo "<hr size=\"1\" noshade=\"noshade\" />";
|
||||
}
|
||||
|
||||
|
||||
|
@ -295,15 +295,15 @@
|
|||
// may resubmit if allowed
|
||||
else {
|
||||
exercise_list_teacher_submissions($exercise, $USER);
|
||||
echo "<hr size=\"1\" noshade>";
|
||||
echo "<hr size=\"1\" noshade=\"noshade\" />";
|
||||
print_heading(get_string("yoursubmission", "exercise"));
|
||||
exercise_list_user_submissions($exercise, $USER);
|
||||
if (exercise_test_for_resubmission($exercise, $USER)) {
|
||||
// if resubmission requested print upload form
|
||||
echo "<hr size=\"1\" noshade>";
|
||||
echo "<hr size=\"1\" noshade=\"noshade\" />";
|
||||
print_heading(get_string("pleasesubmityourwork", "exercise").":");
|
||||
exercise_print_upload_form($exercise);
|
||||
echo "<hr size=\"1\" noshade>";
|
||||
echo "<hr size=\"1\" noshade=\"noshade\" />";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -322,7 +322,7 @@
|
|||
// list previous submissions from this user
|
||||
exercise_list_user_submissions($exercise, $USER);
|
||||
|
||||
echo "<hr size=\"1\" NOSHADE>";
|
||||
echo "<hr size=\"1\" noshade=\"noshade\" />";
|
||||
|
||||
// print upload form
|
||||
print_heading(get_string("submitexercisedescription", "exercise").":");
|
||||
|
@ -378,10 +378,10 @@
|
|||
case 1: // set up assignment
|
||||
if (isteacheredit($course->id)) {
|
||||
echo "<p><b><a href=\"assessments.php?id=$cm->id&action=editelements\">".
|
||||
get_string("amendassessmentelements", "exercise")."</a></b> \n";
|
||||
get_string("amendassessmentelements", "exercise")."</a></b></p> \n";
|
||||
helpbutton("elements", get_string("amendassessmentelements", "exercise"), "exercise");
|
||||
echo "<p><b><a href=\"view.php?id=$cm->id&action=submitassignment\">".
|
||||
get_string("submitexercisedescription", "exercise")."</a></b> \n";
|
||||
get_string("submitexercisedescription", "exercise")."</a></b></p> \n";
|
||||
helpbutton("submissionofdescriptions", get_string("submitexercisedescription", "exercise"), "exercise");
|
||||
}
|
||||
break;
|
||||
|
@ -391,7 +391,7 @@
|
|||
// the submissions
|
||||
echo "<p><b><a href=\"submissions.php?id=$cm->id&action=listforassessmentstudent\">".
|
||||
get_string("studentsubmissionsforassessment", "exercise",
|
||||
exercise_count_unassessed_student_submissions($exercise))."</a></b> \n";
|
||||
exercise_count_unassessed_student_submissions($exercise))."</a></b></p> \n";
|
||||
helpbutton("grading", get_string("studentsubmissionsforassessment", "exercise"),
|
||||
"exercise");
|
||||
break;
|
||||
|
@ -399,7 +399,7 @@
|
|||
case 3: // show final grades
|
||||
echo "<p><b><a href=\"submissions.php?id=$cm->id&action=listforassessmentstudent\">".
|
||||
get_string("studentsubmissionsforassessment", "exercise",
|
||||
exercise_count_unassessed_student_submissions($exercise))."</a></b> \n";
|
||||
exercise_count_unassessed_student_submissions($exercise))."</a></b></p> \n";
|
||||
helpbutton("grading", get_string("studentsubmissionsforassessment", "exercise"),
|
||||
"exercise");
|
||||
print_heading("<a href=\"submissions.php?id=$cm->id&action=displayfinalgrades\">".
|
||||
|
@ -407,6 +407,7 @@
|
|||
}
|
||||
print_heading("<a href=\"submissions.php?id=$cm->id&action=adminlist\">".
|
||||
get_string("administration")."</a>");
|
||||
echo "</center>\n";
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue