]> git.mjollnir.org Git - moodle.git/commitdiff
Renamed new commentary feature to 'general feedback'.
authortjhunt <tjhunt>
Tue, 19 Sep 2006 13:35:42 +0000 (13:35 +0000)
committertjhunt <tjhunt>
Tue, 19 Sep 2006 13:35:42 +0000 (13:35 +0000)
20 files changed:
lang/en_utf8/help/quiz/generalfeedback.html [moved from lang/en_utf8/help/quiz/commentary.html with 50% similarity]
lang/en_utf8/help/quiz/index.html
lang/en_utf8/quiz.php
mod/quiz/db/migrate2utf8.php
mod/quiz/db/mysql.php
mod/quiz/db/mysql.sql
mod/quiz/db/postgres7.php
mod/quiz/db/postgres7.sql
mod/quiz/lib.php
mod/quiz/locallib.php
mod/quiz/reviewoptions.html
mod/quiz/version.php
question/backuplib.php
question/format/xml/format.php
question/question.php
question/restorelib.php
question/type/editquestionstart.html
question/type/question.html
question/type/questiontype.php
theme/standard/styles_layout.css

similarity index 50%
rename from lang/en_utf8/help/quiz/commentary.html
rename to lang/en_utf8/help/quiz/generalfeedback.html
index 46e0b178f52b878b5f5f61ef5750f2f789b97e7b..6080223f1270431578ba9c3eadd8fef8bf18d88c 100644 (file)
@@ -1,14 +1,14 @@
-<p align="center"><b>Question commentary</b></p>
+<p align="center"><b>Question general feedback</b></p>
 
-<p>Question commentary is some text that gets shown to the
+<p>Question general feedback is some text that gets shown to the
 student after they have attempted the question. Unlike feedback, 
 which depends on the question type and what response the student gave,
-the same commentary text is shown to all students.</p>
+the same general feedback text is shown to all students.</p>
 
-<p>You can control when commentary is shown to students using 
+<p>You can control when general feedback is shown to students using 
 the "Students may review:" check-boxes on the quiz editing form.</p>
 
-<p>You can use the commentary to give students some background
+<p>You can use the general feedback to give students some background
 to what knownledge the question was testing. Or to give them a 
 link to more information they can use if they did not understand the
 questions.</p>
\ No newline at end of file
index 412e0eb6c1573a9250e13a1e9fbe1a63934913d5..6a85a4eb4a917d19d8aa33e5aab0f1c9142669b3 100644 (file)
@@ -8,7 +8,6 @@
   <li><a href="help.php?module=quiz&amp;file=calculated.html">Calculated questions</a></li>
   <li><a href="help.php?module=quiz&amp;file=categories.html">Categories</a></li>
   <li><a href="help.php?module=quiz&amp;file=categories_edit.html">Question Categories</a></li>
-  <li><a href="help.php?module=quiz&amp;file=commentary.html">Question commentary</a></li>
   <li><a href="help.php?module=quiz&amp;file=correctanswers.html">Correct answers</a></li>
   <li><a href="help.php?module=quiz&amp;file=createmultiple.html">Creating multiple quizzes</a></li>
   <li><a href="help.php?module=quiz&amp;file=decimalpoints.html">Decimal digits</a></li>
@@ -17,6 +16,7 @@
   <li><a href="help.php?module=quiz&amp;file=export.html"></a></li>
   <li><a href="help.php?module=quiz&amp;file=repeatattempts.html">Each attempt builds on the last</a></li>
   <li><a href="help.php?module=quiz&amp;file=multianswer.html">Embedded Answers (Cloze)</a></li>
+  <li><a href="help.php?module=quiz&amp;file=generalfeedback.html">Question general feedback</a></li>
   <li><a href="help.php?module=quiz&amp;file=grademethod.html">Grading method</a></li>
   <li><a href="help.php?module=quiz&amp;file=import.html">Importing questions</a></li>
   <li><a href="help.php?module=quiz&amp;file=formataiken.html">Importing Aiken format files</a></li>
index c8c03d1960efc0cc561d3c4e110d1d9d0b20afc1..b327222d02e78078feef6a07e7c24c527c259262 100644 (file)
@@ -83,7 +83,6 @@ $string['close'] = 'Close window';
 $string['closepreview'] = 'Close preview';
 $string['closereview'] = 'Close review';
 $string['comment'] = 'Comment';
-$string['commentary'] = 'Commentary';
 $string['commentorgrade'] = 'Make comment or override grade';
 $string['completedon'] = 'Completed on';
 $string['confirmclose'] = 'You are about to close this attempt. Once you close the attempt you will no longer be able to change your answers.';
@@ -203,6 +202,7 @@ $string['functiontakesnoargs'] = 'The function $a does not take any arguments';
 $string['functiontakesonearg'] = 'The function $a must have exactly one argument';
 $string['functiontakesoneortwoargs'] = 'The function $a must have either one or two arguments';
 $string['functiontakestwoargs'] = 'The function $a must have exactly two arguments';
+$string['generalfeedback'] = 'General feedback';
 $string['generatevalue'] = 'Generate a new value between';
 $string['geometric'] = 'Geometric';
 $string['gift'] = 'GIFT format';
index 282b05bc2a002e2341f7f3af1eaa3e8f8ab8063c..0bbfaca1ccf167b2e62d1ebb5fa694e91972db7d 100755 (executable)
@@ -354,7 +354,7 @@ function migrate2utf8_question_questiontext($recordid){
     return $result;
 }
 
-function migrate2utf8_question_commentarytext($recordid){
+function migrate2utf8_question_generalfeedback($recordid){
     global $CFG, $globallang;
 
 /// Some trivial checks
@@ -393,11 +393,11 @@ function migrate2utf8_question_commentarytext($recordid){
     
 /// Convert the text
     if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
-        $result = utfconvert($quizquestions->commentarytext, $fromenc);
+        $result = utfconvert($quizquestions->generalfeedback, $fromenc);
 
         $newquizquestion = new object;
         $newquizquestion->id = $recordid;
-        $newquizquestion->commentarytext = $result;
+        $newquizquestion->generalfeedback = $result;
         update_record('question',$newquizquestion);
     }
 /// And finally, just return the converted field
index 2d6dd99e3b54e1e4c427c78b41ede329817dd4c4..1cc905b302f0dbd07f9cbb641f171b2f8fa76fa2 100644 (file)
@@ -1100,16 +1100,16 @@ function quiz_upgrade($oldversion) {
     }
 
     if ($oldversion < 2006081000) {
-        // Add a column to the the question table to store the question commentary.
+        // Add a column to the the question table to store the question general feedback.
         $success = $success && table_column('question', '', 'commentarytext', 'text', '', '', '', 'not null', 'image');
 
-        // Adjust the quiz review options so that commentary is displayed whenever feedback is.
+        // Adjust the quiz review options so that general feedback is displayed whenever feedback is.
         $success = $success && execute_sql('UPDATE ' . $CFG->prefix . 'quiz SET review = ' .
-                '(review & ~' . QUIZ_REVIEW_COMMENTARY . ') | ' . // Clear any existing junk from the commenary bits.
-                '((review & ' . QUIZ_REVIEW_FEEDBACK . ') * 8)'); // Set the commentary bits to be the same as the feedback ones.
+                '(review & ~' . QUIZ_REVIEW_GENERALFEEDBACK . ') | ' . // Clear any existing junk from the commenary bits.
+                '((review & ' . QUIZ_REVIEW_FEEDBACK . ') * 8)'); // Set the general feedback bits to be the same as the feedback ones.
 
         // Same adjustment to the defaults for new quizzes.
-        $success = $success && set_config('quiz_review', ($CFG->quiz_review & ~QUIZ_REVIEW_COMMENTARY) |
+        $success = $success && set_config('quiz_review', ($CFG->quiz_review & ~QUIZ_REVIEW_GENERALFEEDBACK) |
                 (($CFG->quiz_review & QUIZ_REVIEW_FEEDBACK) << 3));
     }
     
@@ -1137,7 +1137,11 @@ function quiz_upgrade($oldversion) {
     }
 
     if ($success && $oldversion < 2006091900) {
-        $success = $success && table_column('question_dataset_items', 'number', 'itemnumber', 'text', '', '', '');
+        $success = $success && table_column('question_dataset_items', 'number', 'itemnumber', 'integer');
+    }
+
+    if ($success && $oldversion < 2006091901) {
+        $success = $success && table_column('question', 'commentarytext', 'generalfeedback', 'text', '', '', '');
     }
 
     return $success;
index 2b14cce1528aca55e7a1a9df05a209440c5bfda8..bac5c73c7e0def86b523d7da0918ed78b5853445 100644 (file)
@@ -134,7 +134,7 @@ CREATE TABLE prefix_question (
   questiontext text NOT NULL,
   questiontextformat tinyint(2) NOT NULL default '0',
   image varchar(255) NOT NULL default '',
-  commentarytext text NOT NULL,
+  generalfeedback text NOT NULL,
   defaultgrade int(10) unsigned NOT NULL default '1',
   penalty float NOT NULL default '0.1',
   qtype varchar(20) NOT NULL default '',
index 5037ae2703fc16983e9b1e50921a01523fca95a2..d5d9d8754d836f0830ae1ed4fb540f88e28f62f8 100644 (file)
@@ -1422,16 +1422,16 @@ function quiz_upgrade($oldversion) {
     }
 
     if ($oldversion < 2006081000) {
-        // Add a column to the the question table to store the question commentary.
+        // Add a column to the the question table to store the question general feedback.
         $success = $success && table_column('question', '', 'commentarytext', 'text', '', '', '', 'not null', 'image');
 
-        // Adjust the quiz review options so that commentary is displayed whenever feedback is.
+        // Adjust the quiz review options so that general feedback is displayed whenever feedback is.
         $success = $success && execute_sql('UPDATE ' . $CFG->prefix . 'quiz SET review = ' .
-                '(review & ~' . QUIZ_REVIEW_COMMENTARY . ') | ' . // Clear any existing junk from the commenary bits.
-                '((review & ' . QUIZ_REVIEW_FEEDBACK . ') * 8)'); // Set the commentary bits to be the same as the feedback ones.
+                '(review & ~' . QUIZ_REVIEW_GENERALFEEDBACK . ') | ' . // Clear any existing junk from the commenary bits.
+                '((review & ' . QUIZ_REVIEW_FEEDBACK . ') * 8)'); // Set the general feedback bits to be the same as the feedback ones.
 
         // Same adjustment to the defaults for new quizzes.
-        $success = $success && set_config('quiz_review', ($CFG->quiz_review & ~QUIZ_REVIEW_COMMENTARY) |
+        $success = $success && set_config('quiz_review', ($CFG->quiz_review & ~QUIZ_REVIEW_GENERALFEEDBACK) |
                 (($CFG->quiz_review & QUIZ_REVIEW_FEEDBACK) << 3));
     }
     
@@ -1459,7 +1459,11 @@ function quiz_upgrade($oldversion) {
     }
 
     if ($success && $oldversion < 2006091900) {
-        $success = $success && table_column('question_dataset_items', 'number', 'itemnumber', 'text', '', '', '');
+        $success = $success && table_column('question_dataset_items', 'number', 'itemnumber', 'integer');
+    }
+
+    if ($success && $oldversion < 2006091901) {
+        $success = $success && table_column('question', 'commentarytext', 'generalfeedback', 'text', '', '', '');
     }
 
     return $success;
index 02b04664add6afb6a026cd5326a2aa618bab2d97..143f6d1e7c41efb26cb571c9cb537288085dadb2 100644 (file)
@@ -128,7 +128,7 @@ CREATE TABLE prefix_question (
   questiontext text NOT NULL default '',
   questiontextformat integer NOT NULL default '0',
   image varchar(255) NOT NULL default '',
-  commentarytext text NOT NULL default '',
+  generalfeedback text NOT NULL default '',
   defaultgrade integer NOT NULL default '1',
   penalty real NOT NULL default '0.1',
   qtype varchar(20) NOT NULL default '0',
index be9229a097933e93cb84e985fc6afe5b9d178fb8..dbf04a2fbdf26cef517659467f2191aed13909a4 100644 (file)
@@ -40,7 +40,7 @@ define('QUIZ_REVIEW_ANSWERS',     8*0x1041); // Show correct answers
 // Some handling of worked solutions is already in the code but not yet fully supported
 // and not switched on in the user interface.
 define('QUIZ_REVIEW_SOLUTIONS',  16*0x1041); // Show solutions
-define('QUIZ_REVIEW_COMMENTARY', 32*0x1041); // Show commentary
+define('QUIZ_REVIEW_GENERALFEEDBACK', 32*0x1041); // Show general feedback
 /**#@-*/
 
 /**
@@ -625,16 +625,16 @@ function quiz_process_options(&$quiz) {
         unset($quiz->solutionsclosed);
     }
 
-    if (isset($quiz->commentaryimmediately)) {
-        $review += (QUIZ_REVIEW_COMMENTARY & QUIZ_REVIEW_IMMEDIATELY);
+    if (isset($quiz->generalfeedbackimmediately)) {
+        $review += (QUIZ_REVIEW_GENERALFEEDBACK & QUIZ_REVIEW_IMMEDIATELY);
         unset($quiz->solutionsimmediately);
     }
-    if (isset($quiz->commentaryopen)) {
-        $review += (QUIZ_REVIEW_COMMENTARY & QUIZ_REVIEW_OPEN);
+    if (isset($quiz->generalfeedbackopen)) {
+        $review += (QUIZ_REVIEW_GENERALFEEDBACK & QUIZ_REVIEW_OPEN);
         unset($quiz->solutionsopen);
     }
-    if (isset($quiz->commentaryclosed)) {
-        $review += (QUIZ_REVIEW_COMMENTARY & QUIZ_REVIEW_CLOSED);
+    if (isset($quiz->generalfeedbackclosed)) {
+        $review += (QUIZ_REVIEW_GENERALFEEDBACK & QUIZ_REVIEW_CLOSED);
         unset($quiz->solutionsclosed);
     }
 
index 365af7172c132c63308ef7b80b550b330f803855..b2d8a27c10bb476b9a5036198f87e4a94af50519 100644 (file)
@@ -619,8 +619,8 @@ function quiz_get_renderoptions($reviewoptions, $state) {
     // Show correct responses in readonly mode if the quiz allows it
     $options->correct_responses = $options->readonly && ($reviewoptions & QUIZ_REVIEW_ANSWERS & QUIZ_REVIEW_IMMEDIATELY);
 
-    // Show commentary if the question has been graded and the quiz allows it.
-    $options->commentary = question_state_is_graded($state) && ($reviewoptions & QUIZ_REVIEW_COMMENTARY & QUIZ_REVIEW_IMMEDIATELY);
+    // Show general feedback if the question has been graded and the quiz allows it.
+    $options->generalfeedback = question_state_is_graded($state) && ($reviewoptions & QUIZ_REVIEW_GENERALFEEDBACK & QUIZ_REVIEW_IMMEDIATELY);
 
     // Always show responses and scores
     $options->responses = true;
@@ -639,7 +639,7 @@ function quiz_get_renderoptions($reviewoptions, $state) {
  *          normally the context for the quiz module instance.
  * 
  * @return object an object with boolean fields responses, scores, feedback,
- *          correct_responses, solutions and commentary
+ *          correct_responses, solutions and general feedback
  */
 function quiz_get_reviewoptions($quiz, $attempt, $context=null) {
 
@@ -656,7 +656,7 @@ function quiz_get_reviewoptions($quiz, $attempt, $context=null) {
         $options->feedback = true;
         $options->correct_responses = true;
         $options->solutions = false;
-        $options->commentary = true;
+        $options->generalfeedback = true;
         
         // Show a link to the comment box only for closed attempts
         if ($attempt->timefinish) {
@@ -675,7 +675,7 @@ function quiz_get_reviewoptions($quiz, $attempt, $context=null) {
         $options->feedback = ($quiz->review & $quiz_state_mask & QUIZ_REVIEW_FEEDBACK) ? 1 : 0;
         $options->correct_responses = ($quiz->review & $quiz_state_mask & QUIZ_REVIEW_ANSWERS) ? 1 : 0;
         $options->solutions = ($quiz->review & $quiz_state_mask & QUIZ_REVIEW_SOLUTIONS) ? 1 : 0;
-        $options->commentary = ($quiz->review & $quiz_state_mask & QUIZ_REVIEW_COMMENTARY) ? 1 : 0;
+        $options->generalfeedback = ($quiz->review & $quiz_state_mask & QUIZ_REVIEW_GENERALFEEDBACK) ? 1 : 0;
     }
     
     return $options;
index ac3f5fc0f541f0fa4ab695e224426ebf85da060d..fcbc483f34425a23f3e9973155a692e33281c784 100644 (file)
@@ -16,7 +16,7 @@
       <td align="center"><?php print_string('feedback', 'quiz') ?></td>
       <td align="center"><?php print_string('answers', 'quiz') ?></td>
 <!--      <td align="center"><?php print_string('solutions', 'quiz') ?></td>-->
-      <td align="center"><?php print_string('commentary', 'quiz') ?></td>
+      <td align="center"><?php print_string('generalfeedback', 'quiz') ?></td>
       <td>
         <?php helpbutton("review2", get_string("allowreview","quiz"), "quiz"); ?>
       </td>
@@ -40,7 +40,7 @@
       </td>
 -->
       <td align="center">
-        <input type="checkbox" name="commentaryimmediately" value="Yes" <?php echo ($form->review & QUIZ_REVIEW_COMMENTARY & QUIZ_REVIEW_IMMEDIATELY) ? 'checked="checked"' : '' ?> />
+        <input type="checkbox" name="generalfeedbackimmediately" value="Yes" <?php echo ($form->review & QUIZ_REVIEW_GENERALFEEDBACK & QUIZ_REVIEW_IMMEDIATELY) ? 'checked="checked"' : '' ?> />
       </td>
     </tr>
     <tr>
@@ -62,7 +62,7 @@
       </td>
 -->
       <td align="center">
-        <input type="checkbox" name="commentaryopen" value="Yes" <?php echo ($form->review & QUIZ_REVIEW_COMMENTARY & QUIZ_REVIEW_OPEN) ? 'checked="checked"' : '' ?> />
+        <input type="checkbox" name="generalfeedbackopen" value="Yes" <?php echo ($form->review & QUIZ_REVIEW_GENERALFEEDBACK & QUIZ_REVIEW_OPEN) ? 'checked="checked"' : '' ?> />
       </td>
     </tr>
     <tr>
@@ -84,7 +84,7 @@
       </td>
 -->
       <td align="center">
-        <input type="checkbox" name="commentaryclosed" value="Yes" <?php echo ($form->review & QUIZ_REVIEW_COMMENTARY & QUIZ_REVIEW_CLOSED) ? 'checked="checked"' : '' ?> />
+        <input type="checkbox" name="generalfeedbackclosed" value="Yes" <?php echo ($form->review & QUIZ_REVIEW_GENERALFEEDBACK & QUIZ_REVIEW_CLOSED) ? 'checked="checked"' : '' ?> />
       </td>
     </tr>
   </table>
index 47cd36e42f3fb9c66be52a9c8fbdde1e93e2f8e0..d1f9bad56c77feb757ddfe931fe6cdf9da720e33 100644 (file)
@@ -5,7 +5,7 @@
 //  This fragment is called by moodle_needs_upgrading() and /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
-$module->version  = 2006091900;   // The (date) version of this module
+$module->version  = 2006091901;   // The (date) version of this module
 $module->requires = 2006080900;   // Requires this Moodle version
 $module->cron     = 0;            // How often should cron check this module (seconds)?
 
index 5a42ae43cb54241a2fe2bc9f17cbce3633b04a46..1555f916b914795ad4340be70416cb5e329b9deb 100644 (file)
                 fwrite ($bf,full_tag("QUESTIONTEXT",6,false,$question->questiontext));
                 fwrite ($bf,full_tag("QUESTIONTEXTFORMAT",6,false,$question->questiontextformat));
                 fwrite ($bf,full_tag("IMAGE",6,false,$question->image));
-                fwrite ($bf,full_tag("COMMENTARYTEXT",6,false,$question->commentarytext));
+                fwrite ($bf,full_tag("GENERALFEEDBACK",6,false,$question->generalfeedback));
                 fwrite ($bf,full_tag("DEFAULTGRADE",6,false,$question->defaultgrade));
                 fwrite ($bf,full_tag("PENALTY",6,false,$question->penalty));
                 fwrite ($bf,full_tag("QTYPE",6,false,$question->qtype));
index d1583dbb174a56be3a6ce86560b494d133984d88..5b8972b241cae48d61ef5ba2d2ca55444b7d3d9b 100755 (executable)
@@ -112,10 +112,10 @@ class qformat_xml extends qformat_default {
             $image_base64 = stripslashes( trim( $question['#']['image_base64'][0]['#'] ) );
             $image = $this->importimagefile( $image, $image_base64 );
         }
-        if (array_key_exists('commentarytext', $question['#'])) {
-            $commentarytext = $this->import_text( $question['#']['commentarytext'][0]['#']['text'] );
+        if (array_key_exists('generalfeedback', $question['#'])) {
+            $generalfeedback = $this->import_text( $question['#']['generalfeedback'][0]['#']['text'] );
         } else {
-            $commentarytext = '';
+            $generalfeedback = '';
         }
         if (!empty($question['#']['defaultgrade'][0]['#'])) {
             $qo->defaultgrade = $question['#']['defaultgrade'][0]['#'];
@@ -127,7 +127,7 @@ class qformat_xml extends qformat_default {
         $qo->questiontext = $qtext;
         $qo->questiontextformat = $this->trans_format( $qformat );
         $qo->image = ((!empty($image)) ?  $image : '');
-        $qo->commentarytext = $commentarytext;
+        $qo->generalfeedback = $generalfeedback;
         $qo->penalty = $penalty;
 
         return $qo;
@@ -646,7 +646,7 @@ class qformat_xml extends qformat_default {
             $name_text = $this->writetext( $question->name );
             $qtformat = $this->get_format($question->questiontextformat);
             $question_text = $this->writetext( $question->questiontext );
-            $commentary_text = $this->writetext( $question->commentarytext );
+            $generalfeedback = $this->writetext( $question->generalfeedback );
             $expout .= "  <question type=\"$question_type\">\n";   
             $expout .= "    <name>$name_text</name>\n";
             $expout .= "    <questiontext format=\"$qtformat\">\n";
@@ -654,9 +654,9 @@ class qformat_xml extends qformat_default {
             $expout .= "    </questiontext>\n";   
             $expout .= "    <image>{$question->image}</image>\n";
             $expout .= $this->writeimage($question->image);
-            $expout .= "    <commentarytext>\n";
-            $expout .= $commentary_text;
-            $expout .= "    </commentarytext>\n";
+            $expout .= "    <generalfeedback>\n";
+            $expout .= $generalfeedback;
+            $expout .= "    </generalfeedback>\n";
             $expout .= "    <defaultgrade>{$question->defaultgrade}</defaultgrade>\n";
             $expout .= "    <penalty>{$question->penalty}</penalty>\n";
             $expout .= "    <hidden>{$question->hidden}</hidden>\n";
index 70072e06d88649f2cbf2413addc6a166fa2309f2..d42e17b20b9266994d8e8c2b9f000da725d0e9c0 100644 (file)
     if (!isset($question->defaultgrade)) {
         $question->defaultgrade = 1;
     }
-    if (empty($question->commentarytext)) {
-        $question->commentarytext = "";
+    if (empty($question->generalfeedback)) {
+        $question->generalfeedback = "";
     }
 
     // Set up some Richtext editing if necessary
index 0481a2ca56aae50e9bd45994076a77541f1926cf..d8c0c637866ed8398e62a63b72d70c29c5fe16a4 100644 (file)
             $question->questiontext = backup_todb($que_info['#']['QUESTIONTEXT']['0']['#']);
             $question->questiontextformat = backup_todb($que_info['#']['QUESTIONTEXTFORMAT']['0']['#']);
             $question->image = backup_todb($que_info['#']['IMAGE']['0']['#']);
-            if (array_key_exists('COMMENTARYTEXT', $que_info['#'])) {
-                $question->commentarytext = backup_todb($que_info['#']['COMMENTARYTEXT']['0']['#']);
+            if (array_key_exists('GENERALFEEDBACK', $que_info['#'])) {
+                $question->generalfeedback = backup_todb($que_info['#']['GENERALFEEDBACK']['0']['#']);
             } else {
-                $question->commentarytext = '';
+                $question->generalfeedback = '';
             }
             $question->defaultgrade = backup_todb($que_info['#']['DEFAULTGRADE']['0']['#']);
             $question->penalty = backup_todb($que_info['#']['PENALTY']['0']['#']);
index 810c49b16c65bdd9c3f6bdeec583b68f152785cd..d1144454fcc39aaf51d301a81456c7f99de1b8eb 100644 (file)
   ?>
 
   <tr valign="top">
-    <td align="right"><b><?php print_string("commentary", "quiz") ?>:</b>
+    <td align="right"><b><?php print_string("generalfeedback", "quiz") ?>:</b>
       <br /><br /><br />
       <?php
-      helpbutton("commentary", get_string("commentary", "quiz"), "quiz", true, true);
+      helpbutton("generalfeedback", get_string("generalfeedback", "quiz"), "quiz", true, true);
       ?>
     </td>
     <td align="left">
       <?php
-      if (isset($err["commentarytext"])) {
-        formerr($err["commentarytext"]);
+      if (isset($err["generalfeedback"])) {
+        formerr($err["generalfeedback"]);
         echo "<br />";
       }
-      print_textarea(false, 10, 60, 630, 200, "commentarytext", $question->commentarytext);
+      print_textarea(false, 10, 60, 630, 200, "generalfeedback", $question->generalfeedback);
       ?>
     </td>
   </tr>
index 0e61c0de4743a86d38e2f2fda72cc87fd84a5cc8..96c89ccef789adac1d19489e7a9490d2258a0742 100644 (file)
@@ -30,9 +30,9 @@
     </div>
   <?php }
   echo $commentlink;
-  if ($commentary) { ?>
-    <div class="commentary">
-      <?php echo $commentary ?>
+  if ($generalfeedback) { ?>
+    <div class="generalfeedback">
+      <?php echo $generalfeedback ?>
     </div>
   <?php }
   if ($history) { ?>
index f7143b98c8fe57053b058319e1949962291b530e..77a166ab7ad0cf52009533efd780c3b3f5247227 100644 (file)
@@ -107,10 +107,10 @@ class default_questiontype {
             $question->image = $form->image;
         }
 
-        if (empty($form->commentarytext)) {
-            $question->commentarytext = '';
+        if (empty($form->generalfeedback)) {
+            $question->generalfeedback = '';
         } else {
-            $question->commentarytext = trim($form->commentarytext);
+            $question->generalfeedback = trim($form->generalfeedback);
         }
 
         if (empty($question->name)) {
@@ -535,9 +535,9 @@ class default_questiontype {
             $editlink = link_to_popup_window('/question/question.php?id='.$question->id, $stredit, $linktext, 450, 550, $stredit, '', true);
         }
 
-        $commentary = '';
-        if ($isgraded && $options->commentary) {
-            $commentary = $this->format_text($question->commentarytext,
+        $generalfeedback = '';
+        if ($isgraded && $options->generalfeedback) {
+            $generalfeedback = $this->format_text($question->generalfeedback,
                     $question->questiontextformat, $cmoptions);
         }
 
@@ -1069,7 +1069,7 @@ class default_questiontype {
 
     /**
      * Print the start of the question editing form, including the question category,
-     * questionname, questiontext, image, defaultgrade, penalty and commentary fields.
+     * questionname, questiontext, image, defaultgrade, penalty and generalfeedback fields.
      * 
      * Three of the fields, image, defaultgrade, penalty, are optional, and
      * can be removed from the from using the $hidefields argument. 
index 09620ef687d1386a7e5f7c7e81d8d402b0340586..947228ea47ea71e6724e58a95e81a5f543a42a6c 100644 (file)
@@ -1283,7 +1283,7 @@ body#message-messages {
 .que .grading,
 .que .comment,
 .que .commentlink,
-.que .commentary,
+.que .generalfeedback,
 .que .history {
   float: right;
   margin: 5px;