From c3efffdb72aa7221f84c7a6cd79fed642aa78550 Mon Sep 17 00:00:00 2001 From: Jamie Pratt Date: Sat, 31 Mar 2012 14:42:37 +0700 Subject: [PATCH] MDL-47494 ddmarker: NOBUG improvement in wording of messages for the user --- question/type/ddmarker/imagetargetconverter.php | 2 +- question/type/ddmarker/lang/en/qtype_ddmarker.php | 14 +++++++++----- question/type/ddmarker/questionlists.php | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/question/type/ddmarker/imagetargetconverter.php b/question/type/ddmarker/imagetargetconverter.php index 93423dd73e5..08c8090a16a 100644 --- a/question/type/ddmarker/imagetargetconverter.php +++ b/question/type/ddmarker/imagetargetconverter.php @@ -128,7 +128,7 @@ if (!$confirm) { $cancelurl = new moodle_url($PAGE->url); echo $OUTPUT->confirm(get_string('confirmimagetargetconversion', 'qtype_ddmarker'), $cofirmedurl, $cancelurl); } else { - echo $contextlist->render('listitem', true, $top); + echo $contextlist->render('listitemlist', true, $top); } } else if (confirm_sesskey()) { $questionlist->prepare_for_processing($top); diff --git a/question/type/ddmarker/lang/en/qtype_ddmarker.php b/question/type/ddmarker/lang/en/qtype_ddmarker.php index 1503967ed10..41211b816c1 100644 --- a/question/type/ddmarker/lang/en/qtype_ddmarker.php +++ b/question/type/ddmarker/lang/en/qtype_ddmarker.php @@ -56,11 +56,15 @@ $string['formerror_unrecognisedwidthheightpart'] = 'We do not recognise the widt $string['formerror_unrecognisedxypart'] = 'We do not recognise the x,y coordinates you have specified. Your coordinates for a {$a->shape} should be expressed as - {$a->coordsstring}.'; $string['imagetargetconverter'] = 'Convert image target questions to drag and drop marker'; $string['infinite'] = 'Infinite'; -$string['listitemactioncategory'] = 'Convert all imagetarget questions in category "{$a->name}" (contains {$a->qcount} imagetarget questions)'; -$string['listitemactioncontext'] = 'Convert all imagetarget questions in context "{$a->name}" (contains {$a->qcount} imagetarget questions)'; -$string['listitemcategory'] = 'Questions in category "{$a->name}" (contains {$a->qcount} imagetarget questions)'; -$string['listitemcontext'] = 'Questions in context "{$a->name}" (contains {$a->qcount} imagetarget questions)'; -$string['listitemquestion'] = 'Question "{$a->name}"'; +$string['listitemactioncategory'] = 'About to convert all imagetarget questions in category "{$a->name}" (contains {$a->qcount} imagetarget questions)'; +$string['listitemactioncontext'] = 'About to convert all imagetarget questions in context "{$a->name}" (contains {$a->qcount} imagetarget questions)'; +$string['listitemactionquestion'] = 'About to convert question "{$a->name}"'; +$string['listitemlistcategory'] = 'Select all imagetarget questions in category "{$a->name}" (contains {$a->qcount} imagetarget questions)'; +$string['listitemlistcontext'] = 'Select all imagetarget questions in context "{$a->name}" (contains {$a->qcount} imagetarget questions)'; +$string['listitemlistquestion'] = 'Select question "{$a->name}"'; +$string['listitemprocessingcategory'] = 'Converting all imagetarget questions in category "{$a->name}" (contains {$a->qcount} imagetarget questions)'; +$string['listitemprocessingcontext'] = 'Converting all imagetarget questions in context "{$a->name}" (contains {$a->qcount} imagetarget questions)'; +$string['listitemprocessingquestion'] = 'Converted question "{$a->name}"'; $string['marker'] = 'Marker'; $string['marker_n'] = 'Marker {no}'; $string['markers'] = 'Markers'; diff --git a/question/type/ddmarker/questionlists.php b/question/type/ddmarker/questionlists.php index ecb5f4f93f2..5bbdbcb42e1 100644 --- a/question/type/ddmarker/questionlists.php +++ b/question/type/ddmarker/questionlists.php @@ -61,7 +61,7 @@ abstract class qtype_ddmarker_list_item { if (null === $progresstrace) { $progresstrace = new html_list_progress_trace(); } - $progresstrace->output((string)$this, $depth); + $progresstrace->output($this->render('listitemprocessing', false), $depth); $this->process_children($progresstrace, $depth); } @@ -143,7 +143,7 @@ class qtype_ddmarker_question_list_item extends qtype_ddmarker_list_item { global $PAGE; $a = new stdClass(); $a->name = $this->record->name; - $thisitem = get_string('listitemquestion', 'qtype_ddmarker', $a); + $thisitem = get_string($stringidentifier.'question', 'qtype_ddmarker', $a); if ($link) { $actionurl = new moodle_url($PAGE->url, array('questionid'=> $this->record->id)); $thisitem = html_writer::tag('a', $thisitem, array('href' => $actionurl));