From 2650f0efd7db9e0e118881aa6a923e4f9c768a24 Mon Sep 17 00:00:00 2001 From: NicoDucou Date: Fri, 10 Mar 2023 15:40:23 +0100 Subject: [PATCH] Exercise: set vertical for default orientation for sequence ordering questions for better management of all use case -refs BT20587 --- main/exercise/Draggable.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main/exercise/Draggable.php b/main/exercise/Draggable.php index 9a130e7156..f53212555c 100644 --- a/main/exercise/Draggable.php +++ b/main/exercise/Draggable.php @@ -51,7 +51,7 @@ class Draggable extends Question $nb_options++; } } elseif (!empty($this->iid)) { - $defaults['orientation'] = in_array($this->extra, ['h', 'v']) ? $this->extra : 'h'; + $defaults['orientation'] = in_array($this->extra, ['h', 'v']) ? $this->extra : 'v'; $answer = new Answer($this->iid); $answer->read(); @@ -77,7 +77,7 @@ class Draggable extends Question $defaults['matches[2]'] = '2'; $defaults['option[1]'] = get_lang('DefaultMatchingOptA'); $defaults['option[2]'] = get_lang('DefaultMatchingOptB'); - $defaults['orientation'] = 'h'; + $defaults['orientation'] = 'v'; } for ($i = 1; $i <= $nb_matches; $i++) { @@ -90,7 +90,7 @@ class Draggable extends Question $form->addRadio( 'orientation', get_lang('ChooseOrientation'), - ['h' => get_lang('Horizontal'), 'v' => get_lang('Vertical')] + ['v' => get_lang('Vertical'), 'h' => get_lang('Horizontal')] ); // DISPLAY MATCHES @@ -157,7 +157,7 @@ class Draggable extends Question if (!empty($this->iid)) { $form->setDefaults($defaults); } else { - $form->setDefaults(['orientation' => 'h']); + $form->setDefaults(['orientation' => 'v']); if (1 == $this->isContent) { $form->setDefaults($defaults);