]> git.mjollnir.org Git - moodle.git/commitdiff
[Fix] question_process_comment now processes the correct form values
authormark-nielsen <mark-nielsen>
Tue, 11 Apr 2006 02:02:44 +0000 (02:02 +0000)
committermark-nielsen <mark-nielsen>
Tue, 11 Apr 2006 02:02:44 +0000 (02:02 +0000)
[Fix] changed the print_string to get_string so it may be passed to notify
[Change] The close window button is now centered
[Change] Refreshes the parent window when the close window button is pushed

mod/quiz/comment.php

index 7fbd831ea55f91f440689c10e10320f42f4fccaf..49e993b1353fb5805ab9a6ab34f73c7f4321b9f3 100644 (file)
 
     if ($data = data_submitted() and confirm_sesskey()) {
         // the following will update the state and attempt
-        question_process_comment($question, $state, $attempt, $data->comment, $data->grade);
+        question_process_comment($question, $state, $attempt, $data->response['comment'], $data->response['grade']);
         // If the state has changed save it and update the quiz grade
         if ($state->changed) {
             save_question_session($question, $state);
             quiz_save_best_grade($quiz);
         }
 
-        notify(print_string('changessaved'));
-        echo '<input type="button" onclick="window.close()" value="' .
-         get_string('closewindow') . "\" />";
+        notify(get_string('changessaved'));
+        echo '<center><input type="button" onclick="window.opener.location.reload(1); self.close();return false;" value="' .
+         get_string('closewindow') . "\" /></center>";
          
         print_footer();
         exit;