From: pilpi Date: Fri, 28 Nov 2008 14:07:06 +0000 (+0000) Subject: quiz editing: MDL-17398 cleaned up random question display in the edit subtab X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9cdcf8266513c660e6b5117b4908f7ea85a7aa72;p=moodle.git quiz editing: MDL-17398 cleaned up random question display in the edit subtab made the link in an empty random question more readable, added a link to show category contents after the list of sample questions of a random question --- diff --git a/lang/en_utf8/quiz.php b/lang/en_utf8/quiz.php index f5bfc43abb..132d0f8596 100644 --- a/lang/en_utf8/quiz.php +++ b/lang/en_utf8/quiz.php @@ -26,7 +26,7 @@ $string['addingshortanswer'] = 'Adding a Short-Answer question'; $string['addingtruefalse'] = 'Adding a True/False question'; $string['addmoreoverallfeedbacks'] = 'Add {no} more feedback fields'; $string['addnewpagesafterselected'] = 'Add new pages after selected questions'; -$string['addnewquestionsqbank'] = 'Add questions to the category $a->catname in the \'Question bank contents\' tool $a->arrow'; +$string['addnewquestionsqbank'] = 'Add questions to the category $a->catname: $a->link'; $string['addpagehere'] = 'Add page here'; $string['addquestion'] = 'Add question'; $string['addquestions'] = 'Add questions'; @@ -630,6 +630,7 @@ $string['shortanswer'] = 'Short Answer'; $string['show'] = 'Show'; $string['showall'] = 'Show all questions on one page'; $string['showbreaks'] = 'Show page breaks'; +$string['showcategorycontents'] = 'Show category contents $a->arrow'; $string['showcorrectanswer'] = 'In feedback, show correct answers?'; $string['showdetailedmarks'] = 'Show mark details'; $string['showfeedback'] = 'After answering, show feedback?'; diff --git a/mod/quiz/editlib.php b/mod/quiz/editlib.php index b9fd42dd4c..690dc6b16c 100644 --- a/mod/quiz/editlib.php +++ b/mod/quiz/editlib.php @@ -819,25 +819,30 @@ function quiz_print_randomquestion(&$question, &$pageurl, &$quiz,$quiz_qbanktool echo '
'; $randomquestionlistsize=3; if(!$questioncount){ + //No questions in category, give an error plus instructions + //error echo ''; print_string("noquestionsnotinuse", "quiz"); + echo ''; echo '
'; - if(!$quiz_qbanktool){ - echo '1, - "cat"=>$category->id.','.$category->contextid)). - '">'; - } + + //create link to open question bank $a = new stdClass; - $a->catname = '' . $category->name . ''; $a->arrow = $THEME->rarrow; + $strshowcategorycontents=get_string('showcategorycontents','quiz', $a); + $linkcategorycontents=' 1, + "cat"=>$category->id.','.$category->contextid)). + '">'.$strshowcategorycontents.''; + + // embed the link into the string with instructions + $a = new stdClass; + $a->catname = '' . $category->name . ''; + $a->link = $linkcategorycontents; echo get_string('addnewquestionsqbank','quiz', $a); - if(!$quiz_qbanktool){ - echo ''; - } - echo ''; }else{ + //Category has questions, list a sample of them echo ""; } diff --git a/theme/standard/styles_color.css b/theme/standard/styles_color.css index add490ee88..75498c912f 100644 --- a/theme/standard/styles_color.css +++ b/theme/standard/styles_color.css @@ -1130,7 +1130,9 @@ bank window's title is prominent enough*/ } #mod-quiz-edit .questioncontentcontainer div.randomquestionqlist{ background-color:#eee; - color:#777; +} +#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist ul{ + color:#555; } #mod-quiz-edit .questioncontentcontainer div.randomquestionqlist .totalquestionsinrandomqcategory{ color:#000;