From 34ec5ad14dd141ac5456148945ce5d8a41c24931 Mon Sep 17 00:00:00 2001 From: Jamie Pratt Date: Sat, 7 Apr 2012 14:23:18 +0700 Subject: [PATCH] MDL-47494 ddmarker: NOBUG made string for label into a constant so it is easy to change --- question/type/ddmarker/lib.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/question/type/ddmarker/lib.php b/question/type/ddmarker/lib.php index 2c7cdae3da3..fc09c0cfb8b 100644 --- a/question/type/ddmarker/lib.php +++ b/question/type/ddmarker/lib.php @@ -27,6 +27,11 @@ defined('MOODLE_INTERNAL') || die(); +/** + * + * @var string label to use for drag items when converting image target questions to ddmarker question type + */ +define('QTYPE_DDMARKER_LABEL_FOR_MARKER_FOR_IMAGE_TARGET_QS', 'X'); /** * Checks file access for essay questions. @@ -89,7 +94,7 @@ function qtype_ddmarker_convert_image_target_question($question, $imgfilename, $ $drag = new stdClass(); $drag->questionid = $question->id; $drag->no = 1; - $drag->label = "X"; + $drag->label = QTYPE_DDMARKER_LABEL_FOR_MARKER_FOR_IMAGE_TARGET_QS; $drag->infinite = 0; $DB->insert_record('qtype_ddmarker_drags', $drag);