From: moodler Date: Wed, 11 Aug 2004 06:46:59 +0000 (+0000) Subject: Removed PHP code from strings! 8-o X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=338c772cc53410244dff62e3d298893a2ca5897c;p=moodle.git Removed PHP code from strings! 8-o --- diff --git a/lang/en/quiz.php b/lang/en/quiz.php index 33abeab27a..bf02cfbe25 100644 --- a/lang/en/quiz.php +++ b/lang/en/quiz.php @@ -85,7 +85,9 @@ $string['editingshortanswer'] = 'Editing a Short-Answer question'; $string['editingtruefalse'] = 'Editing a True/False question'; $string['editquestions'] = 'Edit questions'; $string['errorsdetected'] = '$a error(s) detected'; -$string['existingcategory'] = 'a \".(1==$a ? \'literal\' :(2==$a ? \'file\' :(3==$a ? \'link\' : $a))).\" from an already existing set of \".(1==$a ? \'literals\' :(2==$a ? \'files\' : (3==$a ? \'links\' : $a))).\" that are also used by other questions in this category'; +$string['existingcategory1'] = 'a literal from an already existing set of literals that are also used by other questions in this category'; +$string['existingcategory2'] = 'a file from an already existing set of files that are also used by other questions in this category'; +$string['existingcategory3'] = 'a link from an already existing set of links that are also used by other questions in this category'; $string['exportfilename'] = 'quiz'; $string['exportname'] = 'File name'; $string['exportnameformat'] = '%%Y%%m%%d-%%H%%M'; @@ -120,8 +122,12 @@ $string['indivresp'] = 'Responses of Individuals to Each Item'; $string['introduction'] = 'Introduction'; $string['itemanal'] = 'Item Response Analysis'; $string['itemdefinition'] = 'Definition'; -$string['keptcategory'] = 'a \".(1==$a ? \'literal\' :(2==$a ? \'file\' :(3==$a ? \'link\' : $a))).\" from the same category reusable set of \".(1==$a ? \'literals\' :(2==$a ? \'files\' : (3==$a ? \'links\' : $a))).\" as before'; -$string['keptlocal'] = 'a \".(1==$a ? \'literal\' :(2==$a ? \'file\' :(3==$a ? \'link\' : $a))).\" from the same question private set of \".(1==$a ? \'literals\' :(2==$a ? \'files\' : (3==$a ? \'links\' : $a))).\" as before'; +$string['keptcategory1'] = 'a literal from the same category reusable set of literals as before'; +$string['keptcategory2'] = 'a file from the same category reusable set of files as before'; +$string['keptcategory3'] = 'a link from the same category reusable set of links as before'; +$string['keptlocal1'] = 'a literal from the same question private set of literals as before'; +$string['keptlocal2'] = 'a file from the same question private set of files as before'; +$string['keptlocal3'] = 'a link from the same question private set of links as before'; $string['link'] = 'Link'; $string['listitems'] = 'Listing of Items in Quiz'; $string['literal'] = 'Literal'; @@ -144,8 +150,12 @@ $string['multianswer'] = 'Embedded Answers (Cloze)'; $string['multichoice'] = 'Multiple Choice'; $string['multiplier'] = 'Multiplier'; $string['name'] = 'Name'; -$string['newcategory'] = 'a \".(1==$a ? \'literal\' :(2==$a ? \'file\' :(3==$a ? \'link\' : $a))).\" from a new set of \".(1==$a ? \'literals\' :(2==$a ? \'files\' : (3==$a ? \'links\' : $a))).\" that may also be used by other questions in this category'; -$string['newlocal'] = 'a \".(1==$a ? \'literal\' :(2==$a ? \'file\' :(3==$a ? \'link\' : $a))).\" from a new set of \".(1==$a ? \'literals\' :(2==$a ? \'files\' : (3==$a ? \'links\' : $a))).\" that will only be used by this question'; +$string['newcategory1'] = 'a literal from a new set of literals that may also be used by other questions in this category'; +$string['newcategory2'] = 'a file from a new set of files that may also be used by other questions in this category'; +$string['newcategory3'] = 'a link from a new set of links that may also be used by other questions in this category'; +$string['newlocal1'] = 'a literal from a new set of literals that will only be used by this question'; +$string['newlocal2'] = 'a file from a new set of files that will only be used by this question'; +$string['newlocal3'] = 'a link from a new set of links that will only be used by this question'; $string['noanswers'] = 'No answers were selected!'; $string['noattempts'] = 'No attempts have been made on this quiz'; $string['nodataset'] = 'nothing - it is not a wild card'; diff --git a/mod/quiz/questiontypes/datasetdependent/abstractqtype.php b/mod/quiz/questiontypes/datasetdependent/abstractqtype.php index 413f04c9e7..a1aaa821ff 100644 --- a/mod/quiz/questiontypes/datasetdependent/abstractqtype.php +++ b/mod/quiz/questiontypes/datasetdependent/abstractqtype.php @@ -110,9 +110,9 @@ class quiz_dataset_dependent_questiontype extends quiz_default_questiontype { $key = "$type-0-$name"; if ($currentdatasetdef->type == $type and $currentdatasetdef->category == 0) { - $options[$key] = get_string('keptlocal', 'quiz', $type); + $options[$key] = get_string("keptlocal$type", 'quiz'); } else { - $options[$key] = get_string('newlocal', 'quiz', $type); + $options[$key] = get_string("newlocal$type", 'quiz'); } } @@ -130,16 +130,15 @@ class quiz_dataset_dependent_questiontype extends quiz_default_questiontype { and $categorydef = $categorydatasetdefs[$type]) { if ($currentdatasetdef->type == $type and $currentdatasetdef->id == $categorydef->id) { - $options[$key] = get_string('keptcategory', 'quiz', $type); + $options[$key] = get_string("keptcategory$type", 'quiz'); } else { - $options[$key] = get_string('existingcategory', - 'quiz', $type); + $options[$key] = get_string("existingcategory$type", 'quiz'); } } else { - $options[$key] = get_string('newcategory', 'quiz', $type); + $options[$key] = get_string("newcategory$type", 'quiz'); } } - + // All done! return array($options, $currentdatasetdef->type ? "$currentdatasetdef->type-$currentdatasetdef->category-$name"