Improve error messages.

This commit is contained in:
tjhunt
2007-12-13 17:24:54 +00:00
parent 0cfabab671
commit df06c4bb88
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ class question_calculated_qtype extends question_dataset_dependent_questiontype
"WHERE a.question = $question->id " .
"AND a.id = c.answer ".
"ORDER BY a.id ASC")) {
notify('Error: Missing question answer!');
notify('Error: Missing question answer for calculated question ' . $question->id . '!');
return false;
}
+1 -1
View File
@@ -39,7 +39,7 @@ class question_numerical_qtype extends question_shortanswer_qtype {
"WHERE a.question = $question->id " .
" AND a.id = n.answer " .
"ORDER BY a.id ASC")) {
notify('Error: Missing question answer!');
notify('Error: Missing question answer for numerical question ' . $question->id . '!');
return false;
}
$this->get_numerical_units($question);
+1 -1
View File
@@ -32,7 +32,7 @@ class question_shortanswer_qtype extends default_questiontype {
if (!$question->options->answers = get_records('question_answers', 'question',
$question->id, 'id ASC')) {
notify('Error: Missing question answers!');
notify('Error: Missing question answers for shortanswer question ' . $question->id . '!');
return false;
}
return true;
+1 -1
View File
@@ -107,7 +107,7 @@ class question_truefalse_qtype extends default_questiontype {
}
// Load the answers
if (!$question->options->answers = get_records('question_answers', 'question', $question->id, 'id ASC')) {
notify('Error: Missing question answers!');
notify('Error: Missing question answers for truefalse question ' . $question->id . '!');
return false;
}