Skip to content

Commit

Permalink
Merge branch 'MDL-72321_master-squashed' of https://github.com/marxjo…
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Aug 31, 2023
2 parents 37aaae3 + d9a75f5 commit 1ce54ee
Show file tree
Hide file tree
Showing 175 changed files with 5,131 additions and 2,018 deletions.
23 changes: 19 additions & 4 deletions backup/moodle2/restore_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -6218,15 +6218,30 @@ public function process_question_set_reference($data) {
$data = (object) $data;
$data->usingcontextid = $this->get_mappingid('context', $data->usingcontextid);
$data->itemid = $this->get_new_parentid('quiz_question_instance');
$filtercondition = json_decode($data->filtercondition);
if ($category = $this->get_mappingid('question_category', $filtercondition->questioncategoryid)) {
$filtercondition->questioncategoryid = $category;
$filtercondition = json_decode($data->filtercondition, true);

if (!isset($filtercondition['filter'])) {
// Pre-4.3, convert the old filtercondition format to the new format.
$filtercondition = \core_question\question_reference_manager::convert_legacy_set_reference_filter_condition(
$filtercondition);
}
$data->filtercondition = json_encode($filtercondition);

// Map category id used for category filter condition and corresponding context id.
$oldcategoryid = $filtercondition['filter']['category']['values'][0];
$newcategoryid = $this->get_mappingid('question_category', $oldcategoryid);
$filtercondition['filter']['category']['values'][0] = $newcategoryid;

if ($context = $this->get_mappingid('context', $data->questionscontextid)) {
$data->questionscontextid = $context;
}

$filtercondition['cat'] = implode(',', [
$filtercondition['filter']['category']['values'][0],
$data->questionscontextid,
]);

$data->filtercondition = json_encode($filtercondition);

$DB->insert_record('question_set_references', $data);
}
}
Expand Down
3 changes: 3 additions & 0 deletions comment/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,9 @@ public function output($return = true) {

$html .= html_writer::start_tag('div', array('class' => 'comment-area'));
$html .= html_writer::start_tag('div', array('class' => 'db'));
$html .= html_writer::tag('label',
get_string('comment', 'comment'),
['for' => 'dlg-content-'.$this->cid, 'class' => 'sr-only']);
$html .= html_writer::tag('textarea', '', $textareaattrs);
$html .= html_writer::end_tag('div'); // .db

Expand Down
3 changes: 2 additions & 1 deletion lang/en/question.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@
$string['markedoutofmax'] = 'Marked out of {$a}';
$string['markoutofmax'] = 'Mark {$a->mark} out of {$a->max}';
$string['marks'] = 'Marks';
$string['noconditionspecified'] = 'Please specify a condition';
$string['noresponse'] = '[No response]';
$string['notanswered'] = 'Not answered';
$string['notgraded'] = 'Not graded';
Expand Down Expand Up @@ -465,9 +466,9 @@
$string['rightanswer_help'] = 'An automatically generated summary of the correct response. This can be limited, so you may wish to consider explaining the correct solution in the general feedback for the question, and turning this option off.';
$string['saved'] = 'Saved: {$a}';
$string['settingsformultipletries'] = 'Multiple tries';
$string['showhidden'] = 'Show hidden questions';
$string['shortversioninfo'] = 'v{$a->version} (of {$a->latestversion})';
$string['shortversioninfolatest'] = 'v{$a->version} (latest)';
$string['showhidden'] = 'Also show old questions';
$string['showmarkandmax'] = 'Show mark and max';
$string['showmaxmarkonly'] = 'Show max mark only';
$string['showquestiontext'] = 'Show question text in the question list?';
Expand Down
2 changes: 1 addition & 1 deletion lib/amd/build/datafilter.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/amd/build/datafilter.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/amd/build/datafilter/filtertype.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/amd/build/datafilter/filtertype.min.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions lib/amd/build/datafilter/filtertypes/binary.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/amd/build/datafilter/filtertypes/binary.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/amd/build/datafilter/selectors.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1ce54ee

Please sign in to comment.