Merge branch 'MDL-76308-401' of https://github.com/BruceGoodGuy/moodle into MOODLE_401_STABLE

This commit is contained in:
Sara Arjona 2023-01-03 14:13:00 +01:00
commit 87b3be343e
4 changed files with 10 additions and 7 deletions

View File

@ -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) {

View File

@ -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('~<div class="group1 draghome choice1"><span lang="fr">la</span></div>~'),
new \question_pattern_expectation('~<div class="group1 draghome choice2"><span lang="fr">ma</span></div>~')
new \question_pattern_expectation(
'~<div class="group1 draghome user-select-none choice1"><span lang="fr">la</span></div>~'),
new \question_pattern_expectation(
'~<div class="group1 draghome user-select-none choice2"><span lang="fr">ma</span></div>~')
);
}
}

View File

@ -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';

View File

@ -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]);
}
/**