mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 08:22:07 +02:00
Merge branch 'MDL-74808-master' of https://github.com/lameze/moodle
This commit is contained in:
commit
b8d7a5e39b
@ -37,8 +37,8 @@
|
||||
{{/icon}}
|
||||
</span>
|
||||
<span class="typename">{{label}}</span>
|
||||
<span class="typesummary">
|
||||
{{{description}}}
|
||||
</span>
|
||||
</label>
|
||||
<div class="typesummary">
|
||||
{{{description}}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -58,7 +58,7 @@
|
||||
{{/params}}
|
||||
<button type="submit" class="btn {{#primary}}btn-primary{{/primary}}{{^primary}}btn-secondary{{/primary}}"
|
||||
id="{{id}}"
|
||||
title="{{tooltip}}"
|
||||
{{#tooltip}}title="{{tooltip}}"{{/tooltip}}
|
||||
{{#disabled}}disabled{{/disabled}}
|
||||
{{#attributes}} {{name}}="{{value}}" {{/attributes}}>{{label}}</button>
|
||||
</form>
|
||||
|
@ -78,9 +78,13 @@ class editquestion_helper {
|
||||
if ($canadd) {
|
||||
$params['category'] = $categoryid;
|
||||
$url = new \moodle_url('/question/bank/editquestion/addquestion.php', $params);
|
||||
$buttonparams = ['disabled' => $disabled];
|
||||
if (!empty($tooltip)) {
|
||||
$buttonparams['title'] = $tooltip;
|
||||
}
|
||||
$addquestiondisplay['buttonhtml'] = $OUTPUT->single_button($url,
|
||||
get_string('createnewquestion', 'question'),
|
||||
'get', array('disabled' => $disabled, 'title' => $tooltip));
|
||||
'get', $buttonparams);
|
||||
$addquestiondisplay['qtypeform'] = self::print_choose_qtype_to_add_form(array());
|
||||
}
|
||||
return $PAGE->get_renderer('qbank_editquestion')->render_create_new_question_button($addquestiondisplay);
|
||||
|
@ -33,19 +33,17 @@ class question_name_idnumber_tags_column extends viewquestionname_column_helper
|
||||
protected function display_content($question, $rowclasses): void {
|
||||
global $OUTPUT;
|
||||
|
||||
$layoutclasses = 'd-inline-flex flex-nowrap overflow-hidden w-100';
|
||||
echo \html_writer::start_tag('div', ['class' => 'd-inline-flex flex-nowrap overflow-hidden w-100']);
|
||||
|
||||
$questionname = format_string($question->name);
|
||||
$labelfor = $this->label_for($question);
|
||||
if ($labelfor) {
|
||||
echo \html_writer::start_tag('label', ['for' => $labelfor, 'class' => $layoutclasses]);
|
||||
$closetag = \html_writer::end_tag('label');
|
||||
echo \html_writer::label($questionname, $labelfor);
|
||||
} else {
|
||||
echo \html_writer::start_tag('span', ['class' => $layoutclasses]);
|
||||
echo \html_writer::end_tag('span');
|
||||
// Question name.
|
||||
echo \html_writer::span($questionname, 'questionname flex-grow-1 flex-shrink-1 text-truncate');
|
||||
}
|
||||
|
||||
// Question name.
|
||||
echo \html_writer::span(format_string($question->name), 'questionname flex-grow-1 flex-shrink-1 text-truncate');
|
||||
|
||||
// Question idnumber.
|
||||
if ($question->idnumber !== null && $question->idnumber !== '') {
|
||||
echo ' ' . \html_writer::span(
|
||||
@ -59,7 +57,7 @@ class question_name_idnumber_tags_column extends viewquestionname_column_helper
|
||||
echo $OUTPUT->tag_list($tags, null, 'd-inline flex-shrink-1 text-truncate ml-1', 0, null, true);
|
||||
}
|
||||
|
||||
echo $closetag; // Computed above to ensure it matches.
|
||||
echo \html_writer::end_tag('div');
|
||||
}
|
||||
|
||||
public function get_required_fields(): array {
|
||||
|
@ -137,7 +137,7 @@ class category_condition extends condition {
|
||||
global $PAGE;
|
||||
$displaydata = [];
|
||||
if ($this->recurse) {
|
||||
$displaydata['checked'] = 'checked="true"';
|
||||
$displaydata['checked'] = 'checked';
|
||||
}
|
||||
return $PAGE->get_renderer('core_question', 'bank')->render_category_condition_advanced($displaydata);
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ class hidden_condition extends condition {
|
||||
global $PAGE;
|
||||
$displaydata = [];
|
||||
if (!$this->hide) {
|
||||
$displaydata['checked'] = 'checked="true"';
|
||||
$displaydata['checked'] = 'checked';
|
||||
}
|
||||
return $PAGE->get_renderer('core_question', 'bank')->render_hidden_condition_advanced($displaydata);
|
||||
}
|
||||
|
@ -28,6 +28,6 @@
|
||||
}}
|
||||
<div>
|
||||
<input type="hidden" name="qbshowtext" value="0" id="qbshowtext_off">
|
||||
<input id="qbshowtext_on" class="searchoptions mr-1" type="checkbox" value="1" name="qbshowtext" {{#checked}} checked="checked" {{/checked}}>
|
||||
<input id="qbshowtext_on" class="searchoptions mr-1" type="checkbox" value="1" name="qbshowtext" {{#checked}} checked{{/checked}}>
|
||||
<label for="qbshowtext_on">{{#str}} showquestiontext, question {{/str}}</label>
|
||||
</div>
|
||||
|
@ -28,7 +28,7 @@ li.activity.label,
|
||||
|
||||
// Some of this dialog is sized in ems so a different font size
|
||||
// effects the whole layout.
|
||||
.choosercontainer #chooseform .option label {
|
||||
.choosercontainer #chooseform .option {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
@ -19698,7 +19698,7 @@ li.activity.label,
|
||||
text-align: right;
|
||||
padding: 8px; }
|
||||
|
||||
.choosercontainer #chooseform .option label {
|
||||
.choosercontainer #chooseform .option {
|
||||
font-size: 12px; }
|
||||
|
||||
/* block.invisible vs .invisible
|
||||
|
@ -19698,7 +19698,7 @@ li.activity.label,
|
||||
text-align: right;
|
||||
padding: 8px; }
|
||||
|
||||
.choosercontainer #chooseform .option label {
|
||||
.choosercontainer #chooseform .option {
|
||||
font-size: 12px; }
|
||||
|
||||
/* block.invisible vs .invisible
|
||||
|
Loading…
x
Reference in New Issue
Block a user