Skip to content

Commit

Permalink
Improve error messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhunt committed Dec 13, 2007
1 parent 6a729d0 commit ddd8279
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion question/type/calculated/questiontype.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function get_question_options(&$question) {
"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;
}

Expand Down
2 changes: 1 addition & 1 deletion question/type/numerical/questiontype.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function get_question_options(&$question) {
"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);
Expand Down
2 changes: 1 addition & 1 deletion question/type/shortanswer/questiontype.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function get_question_options(&$question) {

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;
Expand Down
2 changes: 1 addition & 1 deletion question/type/truefalse/questiontype.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function get_question_options(&$question) {
}
// 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;
}

Expand Down

0 comments on commit ddd8279

Please sign in to comment.