From: tjhunt Date: Mon, 5 Jun 2006 16:59:58 +0000 (+0000) Subject: Bug #5672: Make calculated questions less confusing to create. Merged from MOODLE_16_... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3e734b607d8425f50d1a81481a7cc39f225733e6;p=moodle.git Bug #5672: Make calculated questions less confusing to create. Merged from MOODLE_16_STABLE. --- diff --git a/lang/en_utf8/quiz.php b/lang/en_utf8/quiz.php index b43e4b09bb..82076f932f 100644 --- a/lang/en_utf8/quiz.php +++ b/lang/en_utf8/quiz.php @@ -111,6 +111,7 @@ $string['createfirst'] = 'You must create some short-answer questions first. '; $string['createmultiple'] = 'Add several random questions to quiz'; $string['createnewquestion'] = 'Create new question'; $string['custom'] = 'Custom format'; +$string['dataitemneed'] = 'You need to add at least one set of data items to get a valid question'; $string['datasetdefinitions'] = 'Reusable dataset definitions for category $a'; $string['datasetnumber'] = 'Number'; $string['daysavailable'] = 'Days available'; diff --git a/question/type/datasetdependent/datasetitems.php b/question/type/datasetdependent/datasetitems.php index 41748984af..36cc7d85e4 100644 --- a/question/type/datasetdependent/datasetitems.php +++ b/question/type/datasetdependent/datasetitems.php @@ -17,6 +17,7 @@ $streditdatasets = get_string("editdatasets", "quiz"); $strreuseifpossible = get_string('reuseifpossible', 'quiz'); $strforceregeneration = get_string('forceregeneration', 'quiz'); + $strdataitemneed = get_string('dataitemneed', 'quiz'); if (empty($question->id)) { $datasetdefs = $this->get_dataset_definitions( @@ -270,14 +271,17 @@ "; print_table($table); echo ''; + + echo "


+ id\"/> + category\"/> + qtype\"/> + + + +
\n"; + } else { + notify( $strdataitemneed ); } - echo "


- id\"/> - category\"/> - qtype\"/> - - - -
\n"; ?>