]> git.mjollnir.org Git - moodle.git/commitdiff
replaced incorrectly closed html tags, see bug 365
authorgustav_delius <gustav_delius>
Sun, 25 Jan 2004 20:34:54 +0000 (20:34 +0000)
committergustav_delius <gustav_delius>
Sun, 25 Jan 2004 20:34:54 +0000 (20:34 +0000)
25 files changed:
mod/choice/mod.html
mod/exercise/submissions.php
mod/forum/lib.php
mod/forum/post.html
mod/glossary/edit.html
mod/glossary/formats.php
mod/glossary/import.html
mod/glossary/lib.php
mod/glossary/mod.html
mod/glossary/print.php
mod/journal/lib.php
mod/journal/view.php
mod/quiz/description.html
mod/quiz/editmultianswer.php
mod/quiz/lib.php
mod/quiz/match.html
mod/quiz/multichoice.html
mod/quiz/numerical.html
mod/quiz/randomsamatch.html
mod/quiz/shortanswer.html
mod/quiz/truefalse.html
mod/resource/details.php
mod/resource/mod.html
mod/survey/details.php
mod/survey/lib.php

index 0dce24aad3baded2b7c5fd380403b1d088cb9ebc..169ef37c89fd86f210fc1346761800636d1e398b 100644 (file)
         require("$CFG->dirroot/mod/choice/lib.php");
         choose_from_menu($CHOICE_PUBLISH, "publish", "$form->publish", "");
         ?>
-        <br \>
+        <br />
     </td>
 </tr>
 <tr valign=top>
         $options[1] = get_string("yes");
         choose_from_menu($options, "showunanswered", "$form->showunanswered", "");
         ?>
-        <br \>
+        <br />
     </td>
 </tr>
 
index 39c4ff0776e59fbb9239adcfe87f9c7be2f6579d..54dd4f02de0263783c6fc15703f4208b84d46f13 100644 (file)
@@ -1,21 +1,21 @@
 <?PHP  // $Id: submissions.php,v 1.0 22 Aug 2003
 
 /*************************************************
-       ACTIONS handled are:
+    ACTIONS handled are:
 
-       adminamendtitle
+    adminamendtitle
     adminclearlate
-       adminconfirmdelete
-       admindelete
+    adminconfirmdelete
+    admindelete
     adminlateflag
-       adminlist
-       displayfinalgrades (teachers only)
-       listforassessmentstudent
-       listforassessmentteacher
-       saveweights
-       userconfirmdelete
-       userdelete
-       
+    adminlist
+    displayfinalgrades (teachers only)
+    listforassessmentstudent
+    listforassessmentteacher
+    saveweights
+    userconfirmdelete
+    userdelete
+    
 
 ************************************************/
 
     require("lib.php");
     require("version.php");
 
-       require_variable($id);    // Course Module ID
+    require_variable($id);    // Course Module ID
     
     // get some essential stuff...
-       if (! $cm = get_record("course_modules", "id", $id)) {
-               error("Course Module ID was incorrect");
-       }
+    if (! $cm = get_record("course_modules", "id", $id)) {
+        error("Course Module ID was incorrect");
+    }
 
-       if (! $course = get_record("course", "id", $cm->course)) {
-               error("Course is misconfigured");
-       }
+    if (! $course = get_record("course", "id", $cm->course)) {
+        error("Course is misconfigured");
+    }
 
-       if (! $exercise = get_record("exercise", "id", $cm->instance)) {
-               error("Course module is incorrect");
-       }
+    if (! $exercise = get_record("exercise", "id", $cm->instance)) {
+        error("Course module is incorrect");
+    }
 
     require_login($course->id);
 
     $strexercise  = get_string("modulename", "exercise");
     $strsubmissions = get_string("submissions", "exercise");
 
-       // ... print the header and...
+    // ... print the header and...
     print_header("$course->shortname: $exercise->name", "$course->fullname",
                  "$navigation <A HREF=index.php?id=$course->id>$strexercises</A> -> 
                   <A HREF=\"view.php?id=$cm->id\">$exercise->name</A> -> $strsubmissions", 
                   "", "", true);
 
-       //...get the action!
-       require_variable($action);
-       
-
-       /******************* admin amend title ************************************/
-       if ($action == 'adminamendtitle' ) {
-
-               if (!isteacher($course->id)) {
-                       error("Only teachers can look at this page");
-                       }
-               if (empty($_GET['sid'])) {
-                       error("Admin Amend Title: submission id missing");
-                       }
-               
-               $submission = get_record("exercise_submissions", "id", $_GET['sid']);
-               print_heading(get_string("amendtitle", "exercise"));
-               ?>
-               <form name="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 $_REQUEST['sid'] ?>">
-               <center>
-               <table celpadding="5" border="1">
-               <?PHP
-
-               // now get the comment
-               echo "<tr valign=\"top\">\n";
-               echo "  <td align=\"right\"><P><B>". get_string("title", "exercise").":</b></p></td>\n";
-               echo "  <td>\n";
-               echo "          <input type=\"text\" name=\"title\" size=\"60\" maxlength=\"100\" value=\"$submission->title\">\n";
-               echo "  </td></tr></table>\n";
-               echo "<input type=submit VALUE=\"".get_string("amendtitle", "exercise")."\">\n";
-               echo "</center></form>\n";
-
-               }
-       
-
-       /******************* admin clear late (flag) ************************************/
-       elseif ($action == 'adminclearlate' ) {
-
-               if (!isteacher($course->id)) {
-                       error("Only teachers can look at this page");
-               }
-               if (empty($_GET['sid'])) {
-                       error("Admin clear late flag: submission id missing");
-               }
-       
-               if (!$submission = get_record("exercise_submissions", "id", $_GET['sid'])) {
-                       error("Admin clear late flag: can not get submission record");
-               }
-               if (set_field("exercise_submissions", "late", 0, "id", $_GET['sid'])) {
-                       print_heading(get_string("clearlateflag", "exercise")." ".get_string("ok"));
-               }
+    //...get the action!
+    require_variable($action);
+    
+
+    /******************* admin amend title ************************************/
+    if ($action == 'adminamendtitle' ) {
+
+        if (!isteacher($course->id)) {
+            error("Only teachers can look at this page");
+            }
+        if (empty($_GET['sid'])) {
+            error("Admin Amend Title: submission id missing");
+            }
+        
+        $submission = get_record("exercise_submissions", "id", $_GET['sid']);
+        print_heading(get_string("amendtitle", "exercise"));
+        ?>
+        <form name="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 $_REQUEST['sid'] ?>">
+        <center>
+        <table celpadding="5" border="1">
+        <?PHP
+
+        // now get the comment
+        echo "<tr valign=\"top\">\n";
+        echo "    <td align=\"right\"><P><B>". get_string("title", "exercise").":</b></p></td>\n";
+        echo "    <td>\n";
+        echo "        <input type=\"text\" name=\"title\" size=\"60\" maxlength=\"100\" value=\"$submission->title\">\n";
+        echo "    </td></tr></table>\n";
+        echo "<input type=submit VALUE=\"".get_string("amendtitle", "exercise")."\">\n";
+        echo "</center></form>\n";
+
+        }
+    
+
+    /******************* admin clear late (flag) ************************************/
+    elseif ($action == 'adminclearlate' ) {
+
+        if (!isteacher($course->id)) {
+            error("Only teachers can look at this page");
+        }
+        if (empty($_GET['sid'])) {
+            error("Admin clear late flag: submission id missing");
+        }
+    
+        if (!$submission = get_record("exercise_submissions", "id", $_GET['sid'])) {
+            error("Admin clear late flag: can not get submission record");
+        }
+        if (set_field("exercise_submissions", "late", 0, "id", $_GET['sid'])) {
+            print_heading(get_string("clearlateflag", "exercise")." ".get_string("ok"));
+        }
         
         add_to_log($course->id, "exercise", "late flag cleared", "view.php?id=$cm->id", "submission $submission->id");
-               
-               print_continue("submissions.php?id=$cm->id&action=adminlist");
-       }
-       
-
-       /******************* admin confirm delete ************************************/
-       elseif ($action == 'adminconfirmdelete' ) {
-
-               if (!isteacher($course->id)) {
-                       error("Only teachers can look at this page");
-                       }
-               if (empty($_GET['sid'])) {
-                       error("Admin confirm delete: submission id missing");
-                       }
-               if (!$submission = get_record("exercise_submissions", "id", $_GET['sid'])) {
-                       error("Admin delete: can not get submission record");
-                       }
+        
+        print_continue("submissions.php?id=$cm->id&action=adminlist");
+    }
+    
+
+    /******************* admin confirm delete ************************************/
+    elseif ($action == 'adminconfirmdelete' ) {
+
+        if (!isteacher($course->id)) {
+            error("Only teachers can look at this page");
+            }
+        if (empty($_GET['sid'])) {
+            error("Admin confirm delete: submission id missing");
+            }
+        if (!$submission = get_record("exercise_submissions", "id", $_GET['sid'])) {
+            error("Admin delete: can not get submission record");
+            }
 
         if (isteacher($course->id, $submission->userid)) {
             if (!isteacheredit($course->id)) {
                 error("Only teacher with editing permissions can delete teacher submissions.");
             }
         }
-               notice_yesno(get_string("confirmdeletionofthisitem","exercise", get_string("submission", "exercise")), 
-                        "submissions.php?action=admindelete&id=$cm->id&sid=$_GET[sid]", "submissions.php?id=$cm->id&action=adminlist");
-               }
-       
-
-       /******************* admin delete ************************************/
-       elseif ($action == 'admindelete' ) {
-
-               if (!isteacher($course->id)) {
-                       error("Only teachers can look at this page");
-                       }
-               if (empty($_GET['sid'])) {
-                       error("Admin delete: submission id missing");
-                       }
-       
-               if (!$submission = get_record("exercise_submissions", "id", $_GET['sid'])) {
-                       error("Admin delete: can not get submission record");
-                       }
-               print_string("deleting", "exercise");
-               // first get any assessments...
-               if ($assessments = exercise_get_assessments($submission)) {
-                       foreach($assessments as $assessment) {
-                               // ...and all the associated records...
-                               delete_records("exercise_grades", "assessmentid", $assessment->id);
-                               echo ".";
-                               }
-                       // ...now delete the assessments...
-                       delete_records("exercise_assessments", "submissionid", $submission->id);
-                       }
-               // ...and the submission record...
-               delete_records("exercise_submissions", "id", $submission->id);
-               // ..and finally the submitted file
-               exercise_delete_submitted_files($exercise, $submission);
+        notice_yesno(get_string("confirmdeletionofthisitem","exercise", get_string("submission", "exercise")), 
+             "submissions.php?action=admindelete&id=$cm->id&sid=$_GET[sid]", "submissions.php?id=$cm->id&action=adminlist");
+        }
+    
+
+    /******************* admin delete ************************************/
+    elseif ($action == 'admindelete' ) {
+
+        if (!isteacher($course->id)) {
+            error("Only teachers can look at this page");
+            }
+        if (empty($_GET['sid'])) {
+            error("Admin delete: submission id missing");
+            }
+    
+        if (!$submission = get_record("exercise_submissions", "id", $_GET['sid'])) {
+            error("Admin delete: can not get submission record");
+            }
+        print_string("deleting", "exercise");
+        // first get any assessments...
+        if ($assessments = exercise_get_assessments($submission)) {
+            foreach($assessments as $assessment) {
+                // ...and all the associated records...
+                delete_records("exercise_grades", "assessmentid", $assessment->id);
+                echo ".";
+                }
+            // ...now delete the assessments...
+            delete_records("exercise_assessments", "submissionid", $submission->id);
+            }
+        // ...and the submission record...
+        delete_records("exercise_submissions", "id", $submission->id);
+        // ..and finally the submitted file
+        exercise_delete_submitted_files($exercise, $submission);
         add_to_log($course->id, "exercise", "delete", "view.php?id=$cm->id", "submission $submission->id");
-               
-               print_continue("submissions.php?id=$cm->id&action=adminlist");
-               }
-       
-
-       /******************* admin (confirm) late flag ************************************/
-       elseif ($action == 'adminlateflag' ) {
-
-               if (!isteacher($course->id)) {
-                       error("Only teachers can look at this page");
-                       }
-               if (empty($_GET['sid'])) {
-                       error("Admin confirm late flag: submission id missing");
-                       }
-               if (!$submission = get_record("exercise_submissions", "id", $_GET['sid'])) {
-                       error("Admin confirm late flag: can not get submission record");
-                       }
-
-               notice_yesno(get_string("clearlateflag","exercise")."?", 
-                        "submissions.php?action=adminclearlate&id=$cm->id&sid=$_GET[sid]", 
+        
+        print_continue("submissions.php?id=$cm->id&action=adminlist");
+        }
+    
+
+    /******************* admin (confirm) late flag ************************************/
+    elseif ($action == 'adminlateflag' ) {
+
+        if (!isteacher($course->id)) {
+            error("Only teachers can look at this page");
+            }
+        if (empty($_GET['sid'])) {
+            error("Admin confirm late flag: submission id missing");
+            }
+        if (!$submission = get_record("exercise_submissions", "id", $_GET['sid'])) {
+            error("Admin confirm late flag: can not get submission record");
+            }
+
+        notice_yesno(get_string("clearlateflag","exercise")."?", 
+             "submissions.php?action=adminclearlate&id=$cm->id&sid=$_GET[sid]", 
              "submissions.php?id=$cm->id&action=adminlist");
-               }
-       
+        }
+    
 
-       /******************* list all submissions ************************************/
-       elseif ($action == 'adminlist' ) {
+    /******************* list all submissions ************************************/
+    elseif ($action == 'adminlist' ) {
 
-               if (!isteacher($course->id)) {
-                       error("Only teachers can look at this page");
-               }
-       
+        if (!isteacher($course->id)) {
+            error("Only teachers can look at this page");
+        }
+    
         echo "<p><small>Exercise Version-> $module->version</small></p>";
-               exercise_list_submissions_for_admin($exercise);
-               print_continue("view.php?id=$cm->id");
-               
-       }
-       
-
-       /******************* admin update title ************************************/
-       elseif ($action == 'adminupdatetitle' ) {
-
-               if (!isteacher($course->id)) {
-                       error("Only teachers can look at this page");
-                       }
-               if (empty($_POST['sid'])) {
-                       error("Admin Update Title: submission id missing");
-                       }
-       
-               if (set_field("exercise_submissions", "title", $_POST['title'], "id", $_POST['sid'])) {
-                       print_heading(get_string("amendtitle", "exercise")." ".get_string("ok"));
-                       }
-               print_continue("submissions.php?id=$cm->id&action=adminlist");
-               }
-       
-
-       /*************** display final grades (by teacher) ***************************/
-       elseif ($action == 'displayfinalgrades') {
-               // Get all the students
-               if (!$users = get_course_students($course->id, "u.firstname, u.lastname")) {
-                       print_heading(get_string("nostudentsyet"));
-                       print_footer($course);
-                       exit;
-               }
-               
-               // get the final weights from the database
-               $teacherweight = get_field("exercise","teacherweight", "id", $exercise->id);
-               $gradingweight = get_field("exercise","gradingweight", "id", $exercise->id);
-               // show the final grades as stored in the tables...
-               print_heading_with_help(get_string("displayoffinalgrades", "exercise"), "finalgrades", "exercise");
-               echo "<center><table border=\"1\" width=\"90%\"><tr>\n";
-               echo "<td bgcolor=\"$THEME->cellheading2\"><b>".$course->student."</b></td>";
-               echo "<td bgcolor=\"$THEME->cellheading2\"><b>".get_string("submission", "exercise")."</b></td>";
-               echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("gradeforassessment", "exercise")."</b></td>";
-               echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("gradeforsubmission", "exercise")."</b></td>";
-               echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("overallgrade", "exercise")."</b></td></TR>\n";
-               // now the weights
-               echo "<tr><td bgcolor=\"$THEME->cellheading2\"><b>".get_string("weights", "exercise")."</b></td>";
-               echo "<td bgcolor=\"$THEME->cellheading2\"><b>&nbsp;</b></td>\n";
-               echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>$EXERCISE_FWEIGHTS[$gradingweight]</b></td>\n";
-               echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>$EXERCISE_FWEIGHTS[$teacherweight]</b></td>\n";
-               echo "<td bgcolor=\"$THEME->cellheading2\"><b>&nbsp;</b></td></tr>\n";
-               foreach ($users as $user) {
-                       // first get user's own assessment reord, it should contain their grading grade
-                       if ($ownassessments = exercise_get_user_assessments($exercise, $user)) {
-                               foreach ($ownassessments as $ownassessment) {
-                                       break; // there should only be one
-                               }
-                       }
-                       else {
-                               $ownassessment->gradinggrade = 0;
-                       }
-                       if ($submissions = exercise_get_user_submissions($exercise, $user)) {
-                               foreach ($submissions as $submission) {
-                                       if ($assessments = exercise_get_assessments($submission)) {
-                                               foreach ($assessments as $assessment) { // (normally there should only be one
+        exercise_list_submissions_for_admin($exercise);
+        print_continue("view.php?id=$cm->id");
+        
+    }
+    
+
+    /******************* admin update title ************************************/
+    elseif ($action == 'adminupdatetitle' ) {
+
+        if (!isteacher($course->id)) {
+            error("Only teachers can look at this page");
+            }
+        if (empty($_POST['sid'])) {
+            error("Admin Update Title: submission id missing");
+            }
+    
+        if (set_field("exercise_submissions", "title", $_POST['title'], "id", $_POST['sid'])) {
+            print_heading(get_string("amendtitle", "exercise")." ".get_string("ok"));
+            }
+        print_continue("submissions.php?id=$cm->id&action=adminlist");
+        }
+    
+
+    /*************** display final grades (by teacher) ***************************/
+    elseif ($action == 'displayfinalgrades') {
+        // Get all the students
+        if (!$users = get_course_students($course->id, "u.firstname, u.lastname")) {
+            print_heading(get_string("nostudentsyet"));
+            print_footer($course);
+            exit;
+        }
+        
+        // get the final weights from the database
+        $teacherweight = get_field("exercise","teacherweight", "id", $exercise->id);
+        $gradingweight = get_field("exercise","gradingweight", "id", $exercise->id);
+        // show the final grades as stored in the tables...
+        print_heading_with_help(get_string("displayoffinalgrades", "exercise"), "finalgrades", "exercise");
+        echo "<center><table border=\"1\" width=\"90%\"><tr>\n";
+        echo "<td bgcolor=\"$THEME->cellheading2\"><b>".$course->student."</b></td>";
+        echo "<td bgcolor=\"$THEME->cellheading2\"><b>".get_string("submission", "exercise")."</b></td>";
+        echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("gradeforassessment", "exercise")."</b></td>";
+        echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("gradeforsubmission", "exercise")."</b></td>";
+        echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("overallgrade", "exercise")."</b></td></TR>\n";
+        // now the weights
+        echo "<tr><td bgcolor=\"$THEME->cellheading2\"><b>".get_string("weights", "exercise")."</b></td>";
+        echo "<td bgcolor=\"$THEME->cellheading2\"><b>&nbsp;</b></td>\n";
+        echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>$EXERCISE_FWEIGHTS[$gradingweight]</b></td>\n";
+        echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>$EXERCISE_FWEIGHTS[$teacherweight]</b></td>\n";
+        echo "<td bgcolor=\"$THEME->cellheading2\"><b>&nbsp;</b></td></tr>\n";
+        foreach ($users as $user) {
+            // first get user's own assessment reord, it should contain their grading grade
+            if ($ownassessments = exercise_get_user_assessments($exercise, $user)) {
+                foreach ($ownassessments as $ownassessment) {
+                    break; // there should only be one
+                }
+            }
+            else {
+                $ownassessment->gradinggrade = 0;
+            }
+            if ($submissions = exercise_get_user_submissions($exercise, $user)) {
+                foreach ($submissions as $submission) {
+                    if ($assessments = exercise_get_assessments($submission)) {
+                        foreach ($assessments as $assessment) { // (normally there should only be one
                             $grade = number_format($assessment->grade * $exercise->grade / 100.0, 1);
                             $overallgrade = number_format(((($assessment->grade * 
                                 $EXERCISE_FWEIGHTS[$teacherweight] / 100.0) + 
                                 $grade = "<font color=\"red\">(".$grade.")</font>";
                                 $overallgrade = "<font color=\"red\">(".$overallgrade.")</font>";
                             }
-                                                       echo "<tr><td>$user->firstname $user->lastname</td>\n";
-                                                       echo "<td>".exercise_print_submission_title($exercise, $submission)."</td>\n";
-                                                       echo "<td align=\"center\">".number_format($ownassessment->gradinggrade * $exercise->grade / COMMENTSCALE, 1)."</td>";
-                                                       echo "<td align=\"center\">$grade</td>";
-                                                       echo "<td align=\"center\">$overallgrade</td></tr>\n";
-                                               }
-                                       }
-                               }
-                       }
-               }
-               echo "</table><br clear=\"all\">\n";
-               if ($exercise->showleaguetable) {
+                            echo "<tr><td>$user->firstname $user->lastname</td>\n";
+                            echo "<td>".exercise_print_submission_title($exercise, $submission)."</td>\n";
+                            echo "<td align=\"center\">".number_format($ownassessment->gradinggrade * $exercise->grade / COMMENTSCALE, 1)."</td>";
+                            echo "<td align=\"center\">$grade</td>";
+                            echo "<td align=\"center\">$overallgrade</td></tr>\n";
+                        }
+                    }
+                }
+            }
+        }
+        echo "</table><br clear=\"all\">\n";
+        if ($exercise->showleaguetable) {
             exercise_print_league_table($exercise);
-                   echo "<br \>\n";
+            echo "<br />\n";
         }
         print_string("allgradeshaveamaximumof", "exercise", $exercise->grade)."\n";
-               print_continue("view.php?id=$cm->id");
-       }
-
-
-       /******************* list for assessment student (submissions) ************************************/
-       elseif ($action == 'listforassessmentstudent' ) {
-               if (!$users = get_course_students($course->id)) {
-                       print_heading(get_string("nostudentsyet"));
-                       print_footer($course);
-                       exit;
-                       }
-               if (!isteacher($course->id)) {
-                       error("Only teachers can look at this page");
-                       }
-               exercise_list_unassessed_student_submissions($exercise, $USER);
-               print_continue("view.php?id=$cm->id");
-               
-               }
-       
-
-       /******************* list for assessment teacher (submissions) ************************************/
-       elseif ($action == 'listforassessmentteacher' ) {
-               if (!$users = get_course_students($course->id)) {
-                       print_heading(get_string("nostudentsyet"));
-                       print_footer($course);
-                       exit;
-                       }
-               exercise_list_unassessed_teacher_submissions($exercise, $USER);
-               print_continue("view.php?id=$cm->id");
-               
-               }
-       
-
-       /****************** save league table entries and anonimity setting (by teacher) **************/
-       elseif ($action == 'saveleaguetable') {
-
-               $form = (object)$_POST;
-               
-               if (!isteacher($course->id)) {
-                       error("Only teachers can look at this page");
-                       }
-
-               // save the number of league table entries from the form...
-               if ($form->nentries == 'All') {
+        print_continue("view.php?id=$cm->id");
+    }
+
+
+    /******************* list for assessment student (submissions) ************************************/
+    elseif ($action == 'listforassessmentstudent' ) {
+        if (!$users = get_course_students($course->id)) {
+            print_heading(get_string("nostudentsyet"));
+            print_footer($course);
+            exit;
+            }
+        if (!isteacher($course->id)) {
+            error("Only teachers can look at this page");
+            }
+        exercise_list_unassessed_student_submissions($exercise, $USER);
+        print_continue("view.php?id=$cm->id");
+        
+        }
+    
+
+    /******************* list for assessment teacher (submissions) ************************************/
+    elseif ($action == 'listforassessmentteacher' ) {
+        if (!$users = get_course_students($course->id)) {
+            print_heading(get_string("nostudentsyet"));
+            print_footer($course);
+            exit;
+            }
+        exercise_list_unassessed_teacher_submissions($exercise, $USER);
+        print_continue("view.php?id=$cm->id");
+        
+        }
+    
+
+    /****************** save league table entries and anonimity setting (by teacher) **************/
+    elseif ($action == 'saveleaguetable') {
+
+        $form = (object)$_POST;
+        
+        if (!isteacher($course->id)) {
+            error("Only teachers can look at this page");
+            }
+
+        // save the number of league table entries from the form...
+        if ($form->nentries == 'All') {
             $nentries = 99;
         } else {
             $nentries = $form->nentries;
         }
-               // ...and save it 
-               set_field("exercise", "showleaguetable", $nentries, "id", "$exercise->id");
-               
-               // ...and save the anonimity setting 
-               set_field("exercise", "anonymous", $form->anonymous, "id", "$exercise->id");
-       
-               redirect("submissions.php?id=$cm->id&action=adminlist", get_string("entriessaved", "exercise"));
-               }
-                               
-               /*************** save weights (by teacher) ***************************/
-       elseif ($action == 'saveweights') {
-
-               $form = (object)$_POST;
-               
-               if (!isteacher($course->id)) {
-                       error("Only teachers can look at this page");
-                       }
-
-               // save the weights from the form...
-               if (isset($form->teacherweight)) {
-                       $teacherweight = $form->teacherweight;
-                       // ...and save them 
-                       set_field("exercise", "teacherweight", $teacherweight, "id", "$exercise->id");
-                       }
-               
-               if (isset($form->gradingweight)) {
-                       $gradingweight = $form->gradingweight;
-                       // ...and save them 
-                       set_field("exercise", "gradingweight", $gradingweight, "id", "$exercise->id");
-                       }
-       
-               redirect("submissions.php?id=$cm->id&action=adminlist", get_string("weightssaved", "exercise"));
-               }
-                               
-       
-       /******************* user confirm delete ************************************/
-       elseif ($action == 'userconfirmdelete' ) {
-
-               if (empty($_GET['sid'])) {
-                       error("User Confirm Delete: submission id missing");
-                       }
-                       
-               notice_yesno(get_string("confirmdeletionofthisitem","exercise", get_string("submission", "exercise")), 
-                        "submissions.php?action=userdelete&id=$cm->id&sid=$_GET[sid]", "view.php?id=$cm->id");
-               }
-       
-
-       /******************* user delete ************************************/
-       elseif ($action == 'userdelete' ) {
-
-               if (empty($_GET['sid'])) {
-                       error("User Delete: submission id missing");
-                       }
-       
-               if (!$submission = get_record("exercise_submissions", "id", $_GET['sid'])) {
-                       error("User Delete: can not get submission record");
-                       }
-               print_string("deleting", "exercise");
-               // first get any assessments...
-               if ($assessments = exercise_get_assessments($submission)) {
-                       foreach($assessments as $assessment) {
-                               // ...and all the associated records...
-                               delete_records("exercise_grades", "assessmentid", $assessment->id);
-                               echo ".";
-                               }
-                       // ...now delete the assessments...
-                       delete_records("exercise_assessments", "submissionid", $submission->id);
-                       }
-               // ...and the submission record...
-               delete_records("exercise_submissions", "id", $submission->id);
-               // ..and finally the submitted file
-               exercise_delete_submitted_files($exercise, $submission);
+        // ...and save it 
+        set_field("exercise", "showleaguetable", $nentries, "id", "$exercise->id");
+        
+        // ...and save the anonimity setting 
+        set_field("exercise", "anonymous", $form->anonymous, "id", "$exercise->id");
+    
+        redirect("submissions.php?id=$cm->id&action=adminlist", get_string("entriessaved", "exercise"));
+        }
+                
+        /*************** save weights (by teacher) ***************************/
+    elseif ($action == 'saveweights') {
+
+        $form = (object)$_POST;
+        
+        if (!isteacher($course->id)) {
+            error("Only teachers can look at this page");
+            }
+
+        // save the weights from the form...
+        if (isset($form->teacherweight)) {
+            $teacherweight = $form->teacherweight;
+            // ...and save them 
+            set_field("exercise", "teacherweight", $teacherweight, "id", "$exercise->id");
+            }
+        
+        if (isset($form->gradingweight)) {
+            $gradingweight = $form->gradingweight;
+            // ...and save them 
+            set_field("exercise", "gradingweight", $gradingweight, "id", "$exercise->id");
+            }
+    
+        redirect("submissions.php?id=$cm->id&action=adminlist", get_string("weightssaved", "exercise"));
+        }
+                
+    
+    /******************* user confirm delete ************************************/
+    elseif ($action == 'userconfirmdelete' ) {
+
+        if (empty($_GET['sid'])) {
+            error("User Confirm Delete: submission id missing");
+            }
+            
+        notice_yesno(get_string("confirmdeletionofthisitem","exercise", get_string("submission", "exercise")), 
+             "submissions.php?action=userdelete&id=$cm->id&sid=$_GET[sid]", "view.php?id=$cm->id");
+        }
+    
+
+    /******************* user delete ************************************/
+    elseif ($action == 'userdelete' ) {
+
+        if (empty($_GET['sid'])) {
+            error("User Delete: submission id missing");
+            }
+    
+        if (!$submission = get_record("exercise_submissions", "id", $_GET['sid'])) {
+            error("User Delete: can not get submission record");
+            }
+        print_string("deleting", "exercise");
+        // first get any assessments...
+        if ($assessments = exercise_get_assessments($submission)) {
+            foreach($assessments as $assessment) {
+                // ...and all the associated records...
+                delete_records("exercise_grades", "assessmentid", $assessment->id);
+                echo ".";
+                }
+            // ...now delete the assessments...
+            delete_records("exercise_assessments", "submissionid", $submission->id);
+            }
+        // ...and the submission record...
+        delete_records("exercise_submissions", "id", $submission->id);
+        // ..and finally the submitted file
+        exercise_delete_submitted_files($exercise, $submission);
         add_to_log($course->id, "exercise", "delete", "view.php?id=$cm->id", "submission $submission->id");
-               
-               print_continue("view.php?id=$cm->id");
-               }
-       
+        
+        print_continue("view.php?id=$cm->id");
+        }
+    
+
+    /*************** no man's land **************************************/
 
-       /*************** no man's land **************************************/\r
-       else {\r
-               error("Fatal Error: Unknown Action: ".$action."\n");\r
-               }\r
+    else {
 
-       print_footer($course);
+        error("Fatal Error: Unknown Action: ".$action."\n");
+
+        }
+
+
+    print_footer($course);
  
 ?>
-
index de751a5a51ac01ce8d4a64767949546a2b84cd40..a44cd72c970e84ae4eecc7f0e77470e85e1629a6 100644 (file)
@@ -1192,7 +1192,7 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
         echo "<td bgcolor=\"$THEME->cellheading2\" class=\"forumpostheadertopic\" width=\"100%\">";
     }
     echo "<p>";
-    echo "<font size=3><b>$post->subject</b></font><br \>";
+    echo "<font size=3><b>$post->subject</b></font><br />";
     echo "<font size=2>";
 
     $fullname = fullname($post, $isteacher);
index a496b727f75597e56dc5802ec13dd3ccbe47261f..5a85c18c44ef3aa2fc4f555569e09279b2daa991 100644 (file)
@@ -84,7 +84,7 @@
 
 
 <tr valign=top>
-    <td align=right><p><b><?php print_string("attachment", "forum") ?>:<br \>(<?php print_string("optional") ?>)&nbsp;</b></p></td>
+    <td align=right><p><b><?php print_string("attachment", "forum") ?>:<br />(<?php print_string("optional") ?>)&nbsp;</b></p></td>
     <td>
     <?php $maxbytes = get_max_upload_file_size($CFG->maxbytes, $course->maxbytes, $forum->maxbytes); ?>
     <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $maxbytes ?>">
index f3f879121d25402606ba8abef69eba816035b312..02f5f94e09a93a0a9961816d6aa44ee623256333 100644 (file)
@@ -144,7 +144,7 @@ if (isset($errors)) {
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><p><b><?php print_string("attachment", "glossary") ?>:<br \>(<?php print_string("optional") ?>)&nbsp;</b></p></td>
+    <td align=right><p><b><?php print_string("attachment", "glossary") ?>:<br />(<?php print_string("optional") ?>)&nbsp;</b></p></td>
     <td>
     <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo get_max_upload_file_size() ?>">
     <input type="file" name="attachment" size=40> 
index 323a00b61f54b1e09ae0cd4eb62b7e3c0e1de1bc..b1e9a2ccc821587dc1b1d8104e0a23ad74a6a965 100644 (file)
         </SELECT>
         </td>
         <td width="60%">
-        <?php print_string("cnfrelatedview", "glossary") ?><br \><br \>
+        <?php print_string("cnfrelatedview", "glossary") ?><br /><br />
         </td>
     </tr>
     <tr valign=top>
         </SELECT>
         </td>
         <td width="60%">
-        <?php print_string("cnfdefaultmode", "glossary") ?><br \><br \>
+        <?php print_string("cnfdefaultmode", "glossary") ?><br /><br />
         </td>
     </tr>
     <tr valign=top>
         </SELECT>
         </td>
         <td width="60%">
-        <?php print_string("cnfdefaulthook", "glossary") ?><br \><br \>
+        <?php print_string("cnfdefaulthook", "glossary") ?><br /><br />
         </td>
     </tr>
     <tr valign=top>
         </SELECT>
         </td>
         <td width="60%">
-        <?php print_string("cnfsortkey", "glossary") ?><br \><br \>
+        <?php print_string("cnfsortkey", "glossary") ?><br /><br />
         </td>
     </tr>
     <tr valign=top>
         </SELECT>
         </td>
         <td width="60%">
-        <?php print_string("cnfsortorder", "glossary") ?><br \><br \>
+        <?php print_string("cnfsortorder", "glossary") ?><br /><br />
         </td>
     </tr>
     <tr valign=top>
         </SELECT>
         </td>
         <td width="60%">
-        <?php print_string("cnfshowgroup", "glossary") ?><br \><br \>
+        <?php print_string("cnfshowgroup", "glossary") ?><br /><br />
         </td>
     </tr>
        <tr>
index 157422ee1a92b25f6c69a2e7a8cd47c28a268b36..59464d4b269f79845714dd11b334bc46aaad8fbb 100644 (file)
@@ -4,7 +4,7 @@
     <td align=right valign=top width="30%"><p><b><?php print_string("filetoimport","glossary") ?>:</b></p></td>
     <td width="70%">
     <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo get_max_upload_file_size() ?>">
-    <input type="file" name="file" size=40> <br \>
+    <input type="file" name="file" size=40> <br />
     <?php 
        helpbutton("filetoimport", get_string("filetoimport", "glossary"), "glossary"); 
        print_string("maxsize", "", display_size(get_max_upload_file_size())); 
@@ -48,4 +48,4 @@
 <input type="hidden" name="l" value="<?PHP p($l) ?>">
 <input type="hidden" name="lasttab" value="<?PHP p($lasttab) ?>">
 <input type="hidden" name="step" value="1">
-</form>
\ No newline at end of file
+</form> 
\ No newline at end of file
index 6308183a2e6d6fec590f598d45f13ea570a1623a..a8b42340b5787ad8f5e5238b43d05e81033811f6 100644 (file)
@@ -1199,7 +1199,7 @@ function glossary_print_alphabet_menu($cm, $glossary, $mode, $hook, $sortkey='',
 
 function glossary_print_author_menu($cm, $glossary,$mode, $hook, $sortkey = '', $sortorder = '') {
     if ($glossary->showalphabet and $glossary->displayformat != GLOSSARY_FORMAT_CONTINUOUS) {
-        echo '<center>' . get_string("explainalphabet","glossary") . '<br \>';
+        echo '<center>' . get_string("explainalphabet","glossary") . '<br />';
     }
 
     glossary_print_sorting_links($cm, $mode, $sortkey,$sortorder);
@@ -1398,7 +1398,7 @@ global $CFG;
      }
 
      echo "<br>$sort: $sbtag<a title=\"$ssort $sordertitle\" href=\"$CFG->wwwroot/mod/glossary/view.php?id=$cm->id&sortkey=$sorder$sneworder&mode=$mode\">$ssort$sicon</a>$sendbtag | ".
-                          "$fbtag<a title=\"$fsort $fordertitle\" href=\"$CFG->wwwroot/mod/glossary/view.php?id=$cm->id&sortkey=$forder$fneworder&mode=$mode\">$fsort$ficon</a>$fendbtag<br \>";
+                          "$fbtag<a title=\"$fsort $fordertitle\" href=\"$CFG->wwwroot/mod/glossary/view.php?id=$cm->id&sortkey=$forder$fneworder&mode=$mode\">$fsort$ficon</a>$fendbtag<br />";
 }
 
 function glossary_sort_entries ( $entry0, $entry1 ) {
@@ -1427,7 +1427,7 @@ function glossary_print_comment($course, $cm, $glossary, $entry, $comment) {
     echo "</td>";
     echo "<td bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\" width=\"100%\">";
     echo "<p>";
-    echo "<font size=2><a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$fullname</a></font><br \>";
+    echo "<font size=2><a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$fullname</a></font><br />";
     echo "<font size=1>".get_string("lastedited").": ".userdate($comment->timemodified)."</font>";
     echo "</p></td></tr>";
 
index 74abde940798668597e69d8a12caf63fb33b8b4b..6cf3cafd1faf096a98c90bf5636cf7471da930bb 100644 (file)
@@ -61,9 +61,9 @@ if (!isset($form->showspecial)) {
      <font size="1">
      <?php
         helpbutton("description", get_string("description"), "glossary", true, true);
-        echo "<br \>";
+        echo "<br />";
         helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
-        echo "<br \>";
+        echo "<br />";
         helpbutton("text", get_string("helptext"), "moodle", true, true);
      ?>
      <br />
index 36c14d5f827b1dfe7c9054c524369425efbadcdd..fa8fe7082ad90af5daf2ec66e3ffa7e08ce1c8fb 100644 (file)
     $site = get_record("course","id",1);
     echo '<p align="right"><font size=-1>' . userdate(time()) . '</font></p>';
     echo '<strong>' . $site->fullname . '</strong><br>';
-    echo get_string("course") . ': <strong>' . $course->fullname . '</strong><br \>';
+    echo get_string("course") . ': <strong>' . $course->fullname . '</strong><br />';
     echo get_string("modulename","glossary") . ': <strong>' . $glossary->name . '</strong><p>';
     if ( $allentries ) {
         foreach ($allentries as $entry) {
index 0d2494bb38570dca9e52b58f7c0598a6405030fc..1e120b248b525073d088f0d33e1cdab67eeb32e9 100644 (file)
@@ -209,7 +209,7 @@ function journal_print_recent_activity($course, $isteacher, $timestart) {
         print_headline(get_string("newjournalentries", "journal").":");
         foreach ($journals as $journal) {
             $date = userdate($journal->time, $strftimerecent);
-            echo "<p><font size=1>$date - ".fullname($journal)."<br \>";
+            echo "<p><font size=1>$date - ".fullname($journal)."<br />";
             echo "\"<a href=\"$CFG->wwwroot/mod/journal/$journal->url\">";
             echo "$journal->name";
             echo "</a>\"</font></p>";
index 2fbc904254c65ad673ca70668470a1b475e0874f..bbb625e2401ca0599d3e4be3995c34f0c8fc8d6a 100644 (file)
@@ -47,7 +47,7 @@
     
     print_simple_box( text_to_html($journal->intro,  $journal->introformat) , "center");
 
-    echo "<br \>";
+    echo "<br />";
 
     $timenow = time();
 
index 9910a419782b56449c64772b75d4c9d2c02ed353..050d12f32142ef184c4b59afd791044bcfc208cf 100644 (file)
@@ -19,7 +19,7 @@
     <TD>\r
         <?php  if (isset($err["questiontext"])) {\r
                formerr($err["questiontext"]); \r
-               echo "<BR \>";\r
+               echo "<BR />";\r
            }\r
            print_textarea($usehtmleditor, 15, 60, 630, 300, "questiontext", $question->questiontext);\r
            if ($usehtmleditor) {\r
index b8c485f4f887ec9c490bb10541510577e8f4ca1c..104db5896c0293273f7a52e76437aaab58ff309a 100644 (file)
 
                formerr($err["questiontext"]); 
 
-               echo "<BR \>";
+               echo "<BR />";
 
            }
 
index 22b1786f4f9eef0248bb78e580cef21090ee39d3..de862aecbff560e89ded9f9d92cb000c5422b02c 100644 (file)
@@ -805,7 +805,7 @@ function quiz_print_question($number, $question, $grade, $quizid,
                        if ($randomanswers[$responseanswer[$key]] == $correct[$key]) {
                            echo '<span="highlight">';
                            choose_from_menu($randomanswers, "q$realquestion->id"."r$randomquestion->id", $responseanswer[$key]);
-                           echo '</span><br \>';
+                           echo '</span><br />';
                        } else {
                            choose_from_menu($randomanswers, "q$realquestion->id"."r$randomquestion->id", $responseanswer[$key]);
                            quiz_print_correctanswer($correct[$key]);
index 7f329347c35fad979cca3800fa209d0edc00ed4e..69ecfcf011c2ffd93f52b70ddf6339d1fb1da3a6 100644 (file)
@@ -19,7 +19,7 @@
     <TD>\r
         <?php  if (isset($err["questiontext"])) {\r
                formerr($err["questiontext"]); \r
-               echo "<BR \>";\r
+               echo "<BR />";\r
            }\r
            print_textarea($usehtmleditor, 15, 60, 630, 300, "questiontext", $question->questiontext);\r
            if ($usehtmleditor) {\r
@@ -56,7 +56,7 @@
     <TD align=right><P><B><?php  echo get_string("question", "quiz")." $i";  ?> :</B></P></TD>\r
     <TD>\r
         <textarea name="subquestions[]" rows=5 cols=50><?php  p($subquestions[$i-1]) ?></textarea>\r
-        <br \>\r
+        <br />\r
         <?php  echo get_string("matchanswer", "quiz")." $i";  ?>&nbsp;&nbsp;\r
         <INPUT type="text" name="subanswers[]" size=50 value="<?php  p($subanswers[$i-1]) ?>">\r
     </TD>\r
index a865a1454f163c6cd18aa2cffa63731fb97f2033..379ab092dacc52b770bdf44938da385324f4d718 100644 (file)
@@ -19,7 +19,7 @@
     <TD>\r
         <?php  if (isset($err["questiontext"])) {\r
                formerr($err["questiontext"]); \r
-               echo "<BR \>";\r
+               echo "<BR />";\r
            }\r
            print_textarea($usehtmleditor, 15, 60, 630, 300, "questiontext", $question->questiontext);\r
            if ($usehtmleditor) {\r
index 3b8f5c09defec9cbb7f12868cab3296934d042f9..393f126c4f7afad99ac23b1bb475618e37d52876 100644 (file)
@@ -19,7 +19,7 @@
     <TD>
         <?php  if (isset($err["questiontext"])) {
                formerr($err["questiontext"]); 
-               echo "<BR \>";
+               echo "<BR />";
            }
            print_textarea($usehtmleditor, 15, 60, 630, 300, "questiontext", $question->questiontext);
            if ($usehtmleditor) {
index 2406a7ebce6439a75e9a6fd26f4e158995d3dc9f..5cb2c4bd7aca41903f8f6aaf5548d50132bd3b51 100644 (file)
@@ -25,7 +25,7 @@
     <TD>\r
         <?php  if (isset($err["questiontext"])) {\r
                formerr($err["questiontext"]); \r
-               echo "<BR \>";\r
+               echo "<BR />";\r
            }\r
            if (empty($question->questiontext)) {\r
                $question->questiontext =  get_string("randomsamatchintro", "quiz");\r
index 867f198474135c3faddc977cb62ed5b682e23d5f..1f799b3740370c158d558e76f0268c8c0dc4c0b5 100644 (file)
@@ -19,7 +19,7 @@
     <TD>\r
         <?php  if (isset($err["questiontext"])) {\r
                formerr($err["questiontext"]); \r
-               echo "<BR \>";\r
+               echo "<BR />";\r
            }\r
            print_textarea($usehtmleditor, 15, 60, 630, 300, "questiontext", $question->questiontext);\r
            if ($usehtmleditor) {\r
index 59cf5358f7261236c89095699cc1a61378588a9d..9ccef4b1748ebaf3eb19fc920a198924c1111fbe 100644 (file)
@@ -19,7 +19,7 @@
     <TD>\r
         <?php  if (isset($err["questiontext"])) {\r
                formerr($err["questiontext"]); \r
-               echo "<BR \>";\r
+               echo "<BR />";\r
            }\r
            print_textarea($usehtmleditor, 15, 60, 630, 300, "questiontext", $question->questiontext);\r
            if ($usehtmleditor) {\r
index cd3c71731023876497a47b21b6dd16de227f4ed4..a67694472b0881decc1730dff53347af4d53979b 100644 (file)
                 ?>
                 <tr valign="top">
                     <td align="right" nowrap="true">
-                        <p><b><?php echo $strfulltext?>:</b></p><br \>
+                        <p><b><?php echo $strfulltext?>:</b></p><br />
                         <font size="1">
                         <?php  helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?><br />
                         <?php  helpbutton("wiki", get_string("helpwiki"), "moodle", true, true) ?> <br />
index 67d60d5af5042f7c5e1765c81438171f60a6cc2d..1ae7bb196b31e4f7d5a86492454ab608e50dd328 100644 (file)
@@ -45,9 +45,9 @@
      <font size="1">
      <?php
         helpbutton("summary", get_string("summary"), "resource", true, true);
-        echo "<br \>";
+        echo "<br />";
         helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
-        echo "<br \>";
+        echo "<br />";
         helpbutton("text", get_string("helptext"), "moodle", true, true);
      ?>
      <br />
index 96477a2047527db34513d867f06ca75783d08ba0..1ac72bffd0315ec773022e57d5aa23137c36a3d9 100644 (file)
@@ -35,9 +35,9 @@
             <td align=right nowrap>
                 <p><b><?php print_string("introtext", "survey") ?>:</b></p><br>
                 <font size="1">
-                <?php helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?> <br \>
-                <?php helpbutton("text", get_string("helptext"), "moodle", true, true) ?> <br \>
-                <?php emoticonhelpbutton("form", "intro"); ?> <br \>
+                <?php helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?> <br />
+                <?php helpbutton("text", get_string("helptext"), "moodle", true, true) ?> <br />
+                <?php emoticonhelpbutton("form", "intro"); ?> <br />
                 </font>
             </td>
             <td>
index c0b2319e2b27d677e3d8a07030c6362938dcf007..64ab2da23061dc64d6c9c81e7f63c0737b2bde1f 100644 (file)
@@ -134,7 +134,7 @@ function survey_print_recent_activity($course, $isteacher, $timestart) {
         print_headline(get_string("newsurveyresponses", "survey").":");
         foreach ($surveys as $survey) {
             $date = userdate($survey->time, $strftimerecent);
-            echo "<p><font size=1>$date - ".fullname($survey)."<br \>";
+            echo "<p><font size=1>$date - ".fullname($survey)."<br />";
             echo "\"<a href=\"$CFG->wwwroot/mod/survey/$survey->url\">";
             echo "$survey->name";
             echo "</a>\"</font></p>";