Question commentary is some text that gets shown to the
+
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.
+the same general feedback text is shown to all students.
-
You can control when commentary is shown to students using
+
You can control when general feedback is shown to students using
the "Students may review:" check-boxes on the quiz editing form.
-
You can use the commentary to give students some background
+
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.
\ No newline at end of file
diff --git a/lang/en_utf8/help/quiz/index.html b/lang/en_utf8/help/quiz/index.html
index 412e0eb6c1..6a85a4eb4a 100644
--- a/lang/en_utf8/help/quiz/index.html
+++ b/lang/en_utf8/help/quiz/index.html
@@ -8,7 +8,6 @@
diff --git a/lang/en_utf8/quiz.php b/lang/en_utf8/quiz.php
index c8c03d1960..b327222d02 100644
--- a/lang/en_utf8/quiz.php
+++ b/lang/en_utf8/quiz.php
@@ -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';
diff --git a/mod/quiz/db/migrate2utf8.php b/mod/quiz/db/migrate2utf8.php
index 282b05bc2a..0bbfaca1cc 100755
--- a/mod/quiz/db/migrate2utf8.php
+++ b/mod/quiz/db/migrate2utf8.php
@@ -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
diff --git a/mod/quiz/db/mysql.php b/mod/quiz/db/mysql.php
index 2d6dd99e3b..1cc905b302 100644
--- a/mod/quiz/db/mysql.php
+++ b/mod/quiz/db/mysql.php
@@ -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;
diff --git a/mod/quiz/db/mysql.sql b/mod/quiz/db/mysql.sql
index 2b14cce152..bac5c73c7e 100644
--- a/mod/quiz/db/mysql.sql
+++ b/mod/quiz/db/mysql.sql
@@ -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 '',
diff --git a/mod/quiz/db/postgres7.php b/mod/quiz/db/postgres7.php
index 5037ae2703..d5d9d8754d 100644
--- a/mod/quiz/db/postgres7.php
+++ b/mod/quiz/db/postgres7.php
@@ -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;
diff --git a/mod/quiz/db/postgres7.sql b/mod/quiz/db/postgres7.sql
index 02b04664ad..143f6d1e7c 100644
--- a/mod/quiz/db/postgres7.sql
+++ b/mod/quiz/db/postgres7.sql
@@ -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',
diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php
index be9229a097..dbf04a2fbd 100644
--- a/mod/quiz/lib.php
+++ b/mod/quiz/lib.php
@@ -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);
}
diff --git a/mod/quiz/locallib.php b/mod/quiz/locallib.php
index 365af7172c..b2d8a27c10 100644
--- a/mod/quiz/locallib.php
+++ b/mod/quiz/locallib.php
@@ -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;
diff --git a/mod/quiz/reviewoptions.html b/mod/quiz/reviewoptions.html
index ac3f5fc0f5..fcbc483f34 100644
--- a/mod/quiz/reviewoptions.html
+++ b/mod/quiz/reviewoptions.html
@@ -16,7 +16,7 @@