Skip to content

Commit

Permalink
Merge branch 'MDL-75116_400' of https://github.com/aolley/moodle into…
Browse files Browse the repository at this point in the history
… MOODLE_400_STABLE
  • Loading branch information
junpataleta committed Jul 7, 2022
2 parents ac87f03 + e088975 commit 839740a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions mod/feedback/item/multichoice/lib.php
Expand Up @@ -438,14 +438,20 @@ public function get_info($item) {
$info->horizontal = false;

$parts = explode(FEEDBACK_MULTICHOICE_TYPE_SEP, $item->presentation);
@list($info->subtype, $info->presentation) = $parts;
$info->subtype = $parts[0];
if (count($parts) > 1) {
$info->presentation = $parts[1];
}
if (!isset($info->subtype)) {
$info->subtype = 'r';
}

if ($info->subtype != 'd') {
$parts = explode(FEEDBACK_MULTICHOICE_ADJUST_SEP, $info->presentation);
@list($info->presentation, $info->horizontal) = $parts;
$info->presentation = $parts[0];
if (count($parts) > 1) {
$info->horizontal = $parts[1];
}
if (isset($info->horizontal) AND $info->horizontal == 1) {
$info->horizontal = true;
} else {
Expand Down
10 changes: 8 additions & 2 deletions mod/feedback/item/multichoicerated/lib.php
Expand Up @@ -376,15 +376,21 @@ public function get_info($item) {
$info->horizontal = false;

$parts = explode(FEEDBACK_MULTICHOICERATED_TYPE_SEP, $item->presentation);
@list($info->subtype, $info->presentation) = $parts;
$info->subtype = $parts[0];
if (count($parts) > 1) {
$info->presentation = $parts[1];
}

if (!isset($info->subtype)) {
$info->subtype = 'r';
}

if ($info->subtype != 'd') {
$parts = explode(FEEDBACK_MULTICHOICERATED_ADJUST_SEP, $info->presentation);
@list($info->presentation, $info->horizontal) = $parts;
$info->presentation = $parts[0];
if (count($parts) > 1) {
$info->horizontal = $parts[1];
}

if (isset($info->horizontal) AND $info->horizontal == 1) {
$info->horizontal = true;
Expand Down

0 comments on commit 839740a

Please sign in to comment.