diff --git a/question/type/ddimageortext/rendererbase.php b/question/type/ddimageortext/rendererbase.php
index f1b4e1b43cb..3187b279318 100644
--- a/question/type/ddimageortext/rendererbase.php
+++ b/question/type/ddimageortext/rendererbase.php
@@ -85,6 +85,7 @@ class qtype_ddtoimage_renderer_base extends qtype_with_combined_feedback_rendere
$classes = [
'group' . $groupno,
'draghome',
+ 'user-select-none',
'choice' . $choiceno
];
if ($dragimage->infinite) {
diff --git a/question/type/ddimageortext/tests/walkthrough_test.php b/question/type/ddimageortext/tests/walkthrough_test.php
index ddf94222822..79373ed08d2 100644
--- a/question/type/ddimageortext/tests/walkthrough_test.php
+++ b/question/type/ddimageortext/tests/walkthrough_test.php
@@ -864,8 +864,10 @@ class walkthrough_test extends \qbehaviour_walkthrough_test_base {
$this->check_current_state(question_state::$todo);
$this->check_current_mark(null);
$this->check_current_output(
- new \question_pattern_expectation('~
la
~'),
- new \question_pattern_expectation('~ma
~')
+ new \question_pattern_expectation(
+ '~la
~'),
+ new \question_pattern_expectation(
+ '~ma
~')
);
}
}
diff --git a/question/type/ddmarker/renderer.php b/question/type/ddmarker/renderer.php
index 6ea52782dd1..48f4c298592 100644
--- a/question/type/ddmarker/renderer.php
+++ b/question/type/ddmarker/renderer.php
@@ -69,7 +69,7 @@ class qtype_ddmarker_renderer extends qtype_ddtoimage_renderer_base {
$orderedgroup = $question->get_ordered_choices(1);
$hiddenfields = '';
foreach ($orderedgroup as $choiceno => $drag) {
- $classes = ['marker', 'choice' . $choiceno];
+ $classes = ['marker', 'user-select-none', 'choice' . $choiceno];
$attr = [];
if ($drag->infinite) {
$classes[] = 'infinite';
diff --git a/question/type/ddwtos/renderer.php b/question/type/ddwtos/renderer.php
index 29ce77de473..ebd2131788a 100644
--- a/question/type/ddwtos/renderer.php
+++ b/question/type/ddwtos/renderer.php
@@ -117,13 +117,13 @@ class qtype_ddwtos_renderer extends qtype_elements_embedded_in_question_text_ren
$infinite = ' infinite';
}
- $boxes .= html_writer::tag('span', $content, array(
- 'class' => 'draghome choice' . $key . ' group' .
- $choice->draggroup . $infinite)) . ' ';
+ $boxes .= html_writer::tag('span', $content, [
+ 'class' => 'draghome user-select-none choice' . $key . ' group' .
+ $choice->draggroup . $infinite]) . ' ';
}
return html_writer::nonempty_tag('div', $boxes,
- array('class' => 'draggrouphomes' . $choice->draggroup));
+ ['class' => 'user-select-none draggrouphomes' . $choice->draggroup]);
}
/**