Skip to content

Commit

Permalink
Merge branch 'MDL-66999-master' of git://github.com/bmbrands/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
abgreeve committed Dec 23, 2019
2 parents bd287fa + 072fcde commit f00542c
Show file tree
Hide file tree
Showing 69 changed files with 1,487 additions and 2,168 deletions.
2 changes: 1 addition & 1 deletion admin/mnet/peer_forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function definition() {
if ($mnet_peer && !empty($mnet_peer->deleted)) {
$radioarray = array();
$radioarray[] = $mform->createElement('static', 'deletedinfo', '',
$OUTPUT->container(get_string('deletedhostinfo', 'mnet'), 'deletedhostinfo'));
$OUTPUT->container(get_string('deletedhostinfo', 'mnet'), 'alert alert-warning'));
$radioarray[] = $mform->createElement('radio', 'deleted', '', get_string('yes'), 1);
$radioarray[] = $mform->createElement('radio', 'deleted', '', get_string('no'), 0);
$mform->addGroup($radioarray, 'radioar', get_string('deleted'), array(' ', ' '), false);
Expand Down
2 changes: 1 addition & 1 deletion admin/qbehaviours.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
if ($version) {
$row[] = $version;
} else {
$row[] = html_writer::tag('span', get_string('nodatabase', 'admin'), array('class' => 'disabled'));
$row[] = html_writer::tag('span', get_string('nodatabase', 'admin'), array('class' => 'text-muted'));
}

// Other question types required by this one.
Expand Down
2 changes: 1 addition & 1 deletion admin/qtypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
if ($version) {
$row[] = $version;
} else {
$row[] = html_writer::tag('span', get_string('nodatabase', 'admin'), array('class' => 'disabled'));
$row[] = html_writer::tag('span', get_string('nodatabase', 'admin'), array('class' => 'text-muted'));
}

// Other question types required by this one.
Expand Down
22 changes: 11 additions & 11 deletions admin/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public function upgrade_confirm_abort_install_page(array $abortable, moodle_url
$out .= $this->output->container(get_string('cancelinstallinfodir', 'core_plugin', $pluginfo->rootdir));
if ($repotype = $pluginman->plugin_external_source($pluginfo->component)) {
$out .= $this->output->container(get_string('uninstalldeleteconfirmexternal', 'core_plugin', $repotype),
'uninstalldeleteconfirmexternal');
'alert alert-warning mt-2');
}
}

Expand Down Expand Up @@ -432,7 +432,7 @@ public function plugin_uninstall_results_removable_page(core_plugin_manager $plu

if ($repotype = $pluginman->plugin_external_source($pluginfo->component)) {
$confirm .= $this->output->container(get_string('uninstalldeleteconfirmexternal', 'core_plugin', $repotype),
'uninstalldeleteconfirmexternal');
'alert alert-warning mt-2');
}

// After any uninstall we must execute full upgrade to finish the cleanup!
Expand Down Expand Up @@ -511,7 +511,7 @@ public function environment_check_page($versions, $version, $envstatus, $environ
* @return string HTML to output.
*/
protected function warning($message, $type = 'warning') {
return $this->box($message, 'generalbox admin' . $type);
return $this->box($message, 'generalbox alert alert-' . $type);
}

/**
Expand All @@ -526,7 +526,7 @@ protected function insecure_dataroot_warning($insecuredataroot) {
return $this->warning(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot));

} else if ($insecuredataroot == INSECURE_DATAROOT_ERROR) {
return $this->warning(get_string('datarootsecurityerror', 'admin', $CFG->dataroot), 'error');
return $this->warning(get_string('datarootsecurityerror', 'admin', $CFG->dataroot), 'danger');

} else {
return '';
Expand All @@ -544,7 +544,7 @@ protected function development_libs_directories_warning($devlibdir) {
if ($devlibdir) {
$moreinfo = new moodle_url('/report/security/index.php');
$warning = get_string('devlibdirpresent', 'core_admin', ['moreinfourl' => $moreinfo->out()]);
return $this->warning($warning, 'error');
return $this->warning($warning, 'danger');

} else {
return '';
Expand Down Expand Up @@ -721,7 +721,7 @@ protected function maturity_warning($maturity) {
return $this->warning(
$this->container(get_string('maturitycorewarning', 'admin', $maturitylevel)) .
$this->container($this->doc_link('admin/versions', get_string('morehelp'))),
'error');
'danger');
}

/*
Expand All @@ -737,7 +737,7 @@ protected function test_site_warning($testsite) {
}

$warning = (get_string('testsiteupgradewarning', 'admin', $testsite));
return $this->warning($warning, 'error');
return $this->warning($warning, 'danger');
}

/**
Expand Down Expand Up @@ -772,7 +772,7 @@ protected function maturity_info($maturity) {
$level = 'warning';

if ($maturity == MATURITY_ALPHA) {
$level = 'error';
$level = 'danger';
}

$maturitylevel = get_string('maturity' . $maturity, 'admin');
Expand Down Expand Up @@ -954,7 +954,7 @@ protected function moodle_available_update_info(\core\update\info $updateinfo) {
protected function release_notes_link() {
$releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/dev/Releases');
$releasenoteslink = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $releasenoteslink); // extremely ugly validation hack
return $this->box($releasenoteslink, 'generalbox releasenoteslink');
return $this->box($releasenoteslink, 'generalbox alert alert-info');
}

/**
Expand Down Expand Up @@ -1902,7 +1902,7 @@ public function environment_check_table($result, $environment_results) {
get_string('status'),
);
$servertable->colclasses = array('centeralign name', 'centeralign info', 'leftalign report', 'leftalign plugin', 'centeralign status');
$servertable->attributes['class'] = 'admintable environmenttable generaltable';
$servertable->attributes['class'] = 'admintable environmenttable generaltable table-sm';
$servertable->id = 'serverstatus';

$serverdata = array('ok'=>array(), 'warn'=>array(), 'error'=>array());
Expand All @@ -1915,7 +1915,7 @@ public function environment_check_table($result, $environment_results) {
get_string('status'),
);
$othertable->colclasses = array('aligncenter info', 'alignleft report', 'alignleft plugin', 'aligncenter status');
$othertable->attributes['class'] = 'admintable environmenttable generaltable';
$othertable->attributes['class'] = 'admintable environmenttable generaltable table-sm';
$othertable->id = 'otherserverstatus';

$otherdata = array('ok'=>array(), 'warn'=>array(), 'error'=>array());
Expand Down
2 changes: 1 addition & 1 deletion admin/roles/classes/capability_table_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ abstract class core_role_capability_table_base {
protected $id;

/** Added to the class="" attribute on output. */
protected $classes = array('rolecap');
protected $classes = array('rolecap table-hover');

/** Default number of capabilities in the table for the search UI to be shown. */
const NUM_CAPS_FOR_SEARCH = 12;
Expand Down
1 change: 1 addition & 0 deletions admin/roles/classes/check_capability_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function __construct($context, $user, $contextname) {
$this->contextname = $contextname;
$this->stryes = get_string('yes');
$this->strno = get_string('no');
$this->add_classes(['table-striped']);
}

protected function add_header_cells() {
Expand Down
1 change: 1 addition & 0 deletions admin/roles/classes/define_role_table_advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public function __construct($context, $roleid) {
foreach ($levels as $level => $classname) {
$this->allcontextlevels[$level] = context_helper::get_level_name($level);
}
$this->add_classes(['table-striped']);
}

protected function load_current_permissions() {
Expand Down
4 changes: 2 additions & 2 deletions admin/roles/classes/override_permissions_table_advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ protected function get_row_attributes($capability) {
$rowattributes = parent::get_row_attributes($capability);
if ($this->permissions[$capability->name] !== 0) {
if (empty($rowattributes['class'])) {
$rowattributes['class'] = "overriddenpermission";
$rowattributes['class'] = "overriddenpermission table-warning";
} else {
$rowattributes['class'] .= " overriddenpermission";
$rowattributes['class'] .= " overriddenpermission table-warning";
}
}
return $rowattributes;
Expand Down
4 changes: 2 additions & 2 deletions admin/templates/setting.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
<label {{#labelfor}}for="{{labelfor}}"{{/labelfor}}>
{{{title}}}
{{#override}}
<div class="form-overridden">{{override}}</div>
<div class="alert alert-info">{{override}}</div>
{{/override}}
{{#warning}}
<div class="form-warning">{{warning}}</div>
<div class="alert alert-warning">{{warning}}</div>
{{/warning}}
</label>
<span class="form-shortname d-block small text-muted">{{{name}}}</span>
Expand Down
2 changes: 1 addition & 1 deletion admin/templates/settings_search_results.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<h3 class="adminpagetitle"><a href="{{url}}">{{{title}}}</a></h3>
<ul class="adminpagepath" aria-label="{{#str}} pagepath, core {{/str}}">
{{#path}}
<li>{{.}}</li>
<li class="small text-muted">{{.}}</li>
{{/path}}
</ul>
<fieldset class="adminsettings">
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/capability/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function print_report_tree($contextid, $contexts, $allroles) {
// If there are any role overrides here, print them.
if (!empty($contexts[$contextid]->rolecapabilities)) {
$rowcounter = 0;
echo '<table class="generaltable rolecaps"><tbody>';
echo '<table class="generaltable table-striped"><tbody>';
foreach ($allroles as $role) {
if (isset($contexts[$contextid]->rolecapabilities[$role->id])) {
$permission = $contexts[$contextid]->rolecapabilities[$role->id];
Expand Down
10 changes: 5 additions & 5 deletions admin/tool/dataprivacy/templates/component_status.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<hr />
<div class="p-l-3">
<dl class="row">
<dt class="col-xs-3">
<dt class="col-3">
{{#link}}
<a href="#{{name}}"><strong style="word-wrap:break-word">{{name}}</strong></a>
{{/link}}
Expand All @@ -84,13 +84,13 @@
{{/link}}
<div class="small text-muted" style="word-wrap:break-word">{{type}}</div>
</dt>
<dd class="col-xs-9">{{summary}}</dd>
<dd class="col-9">{{summary}}</dd>
</dl>
<dl>
{{#fields}}
<div class="row">
<dt class="col-xs-3 font-weight-normal" style="word-wrap:break-word">{{field_name}}</dt>
<dd class="col-xs-9">{{field_summary}}</dd>
<dt class="col-3 font-weight-normal" style="word-wrap:break-word">{{field_name}}</dt>
<dd class="col-9">{{field_summary}}</dd>
</div>
{{/fields}}
</dl>
Expand All @@ -100,7 +100,7 @@
<hr />
<div class="p-l-3">
<div class="row">
<div class="col-xs-12">
<div class="col-12">
{{nullprovider}}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/filetypes/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function edit_table(array $filetypes, array $deleted, $restricted) {
$out = $this->heading(get_string('pluginname', 'tool_filetypes'));
if ($restricted) {
$out .= html_writer::div(
html_writer::div(get_string('configoverride', 'admin'), 'form-overridden'),
html_writer::div(get_string('configoverride', 'admin'), 'alert alert-info'),
'', array('id' => 'adminsettings'));
}
if (count($combined) > 1) {
Expand Down
7 changes: 0 additions & 7 deletions admin/tool/filetypes/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,3 @@
.path-admin-tool-filetypes .generaltable .nonstandard {
font-weight: bold;
}

/* Spacing around the 'Defined in config.php' stripe */
.path-admin-tool-filetypes .form-overridden {
display: inline-block;
margin-bottom: 1em;
padding: 4px 6px;
}
3 changes: 2 additions & 1 deletion admin/tool/xmldb/actions/main_view/main_view.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ function invoke() {
$result = $this->launch('get_db_directories');
// Display list of DB directories if everything is ok
if ($result && !empty($XMLDB->dbdirs)) {
$o .= '<table id="listdirectories" border="0" cellpadding="5" cellspacing="1" class="admintable generaltable">';
$o .= '<table id="listdirectories" border="0" cellpadding="5" cellspacing="1"' .
' class="table-striped table-sm admintable generaltable">';
$row = 0;
foreach ($XMLDB->dbdirs as $key => $dbdir) {
// Detect if this is the lastused dir
Expand Down
2 changes: 1 addition & 1 deletion admin/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
$table->head = array ();
$table->colclasses = array();
$table->head[] = $fullnamedisplay;
$table->attributes['class'] = 'admintable generaltable';
$table->attributes['class'] = 'admintable generaltable table-sm';
foreach ($extracolumns as $field) {
$table->head[] = ${$field};
}
Expand Down
4 changes: 2 additions & 2 deletions backup/util/ui/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ public function render_restore_course_search(restore_course_search $component) {
$url = $component->get_url();

$output = html_writer::start_tag('div', array('class' => 'restore-course-search form-inline mb-1'));
$output .= html_writer::start_tag('div', array('class' => 'rcs-results w-75'));
$output .= html_writer::start_tag('div', array('class' => 'rcs-results table-sm w-75'));

$table = new html_table();
$table->head = array('', get_string('shortnamecourse'), get_string('fullnamecourse'));
Expand Down Expand Up @@ -877,7 +877,7 @@ public function render_restore_category_search(restore_category_search $componen
$url = $component->get_url();

$output = html_writer::start_tag('div', array('class' => 'restore-course-search form-inline mb-1'));
$output .= html_writer::start_tag('div', array('class' => 'rcs-results w-75'));
$output .= html_writer::start_tag('div', array('class' => 'rcs-results table-sm w-75'));

$table = new html_table();
$table->head = array('', get_string('name'), get_string('description'));
Expand Down
4 changes: 2 additions & 2 deletions badges/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ protected function render_badge_collection(\core_badges\output\badge_collection
$paging = new paging_bar($badges->totalcount, $badges->page, $badges->perpage, $this->page->url, 'page');
$htmlpagingbar = $this->render($paging);
$table = new html_table();
$table->attributes['class'] = 'collection';
$table->attributes['class'] = 'table table-bordered table-striped';

$sortbyname = $this->helper_sortable_heading(get_string('name'),
'name', $badges->sort, $badges->dir);
Expand Down Expand Up @@ -743,7 +743,7 @@ protected function render_badge_management(\core_badges\output\badge_management

$htmlpagingbar = $this->render($paging);
$table = new html_table();
$table->attributes['class'] = 'collection';
$table->attributes['class'] = 'table table-bordered table-striped';

$sortbyname = $this->helper_sortable_heading(get_string('name'),
'name', $badges->sort, $badges->dir);
Expand Down
40 changes: 20 additions & 20 deletions calendar/templates/event_details.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -56,60 +56,60 @@
}
}}
<div class="row">
<div class="col-xs-1">{{#pix}} i/calendareventtime, core, {{#str}} when, core_calendar {{/str}} {{/pix}}</div>
<div class="col-xs-11">{{{formattedtime}}}</div>
<div class="col-1">{{#pix}} i/calendareventtime, core, {{#str}} when, core_calendar {{/str}} {{/pix}}</div>
<div class="col-11">{{{formattedtime}}}</div>
</div>
{{#normalisedeventtypetext}}
<div class="row mt-1">
<div class="col-xs-1">{{#pix}} i/calendar, core, {{#str}} eventtype, core_calendar {{/str}} {{/pix}}</div>
<div class="col-xs-11">{{normalisedeventtypetext}}</div>
<div class="col-1">{{#pix}} i/calendar, core, {{#str}} eventtype, core_calendar {{/str}} {{/pix}}</div>
<div class="col-11">{{normalisedeventtypetext}}</div>
</div>
{{/normalisedeventtypetext}}
{{#description}}
<div class="row mt-1">
<div class="col-xs-1">{{#pix}} i/calendareventdescription, core, {{#str}} description {{/str}} {{/pix}}</div>
<div class="description-content col-xs-11">{{{.}}}</div>
<div class="col-1">{{#pix}} i/calendareventdescription, core, {{#str}} description {{/str}} {{/pix}}</div>
<div class="description-content col-11">{{{.}}}</div>
</div>
{{/description}}
{{#location}}
<div class="row mt-1">
<div class="col-xs-1">{{#pix}} i/location, core, {{#str}} location {{/str}} {{/pix}}</div>
<div class="location-content col-xs-11">{{{.}}}</div>
<div class="col-1">{{#pix}} i/location, core, {{#str}} location {{/str}} {{/pix}}</div>
<div class="location-content col-11">{{{.}}}</div>
</div>
{{/location}}
{{#isactionevent}}
<div class="row mt-1">
<div class="col-xs-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
<div class="col-xs-11"><a href="{{course.viewurl}}">{{{course.fullname}}}</a></div>
<div class="col-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
<div class="col-11"><a href="{{course.viewurl}}">{{{course.fullname}}}</a></div>
</div>
{{/isactionevent}}
{{#iscategoryevent}}
<div class="row mt-1">
<div class="col-xs-1">{{#pix}} i/categoryevent, core, {{#str}} category {{/str}} {{/pix}}</div>
<div class="col-xs-11">{{{category.nestedname}}}</div>
<div class="col-1">{{#pix}} i/categoryevent, core, {{#str}} category {{/str}} {{/pix}}</div>
<div class="col-11">{{{category.nestedname}}}</div>
</div>
{{/iscategoryevent}}
{{#iscourseevent}}
<div class="row mt-1">
<div class="col-xs-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
<div class="col-xs-11"><a href="{{url}}">{{{course.fullname}}}</a></div>
<div class="col-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
<div class="col-11"><a href="{{url}}">{{{course.fullname}}}</a></div>
</div>
{{/iscourseevent}}
{{#groupname}}
<div class="row mt-1">
<div class="col-xs-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
<div class="col-xs-11"><a href="{{url}}">{{{course.fullname}}}</a></div>
<div class="col-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
<div class="col-11"><a href="{{url}}">{{{course.fullname}}}</a></div>
</div>
<div class="row mt-1">
<div class="col-xs-1">{{#pix}} i/groupevent, core, {{#str}} group {{/str}} {{/pix}}</div>
<div class="col-xs-11">{{{groupname}}}</div>
<div class="col-1">{{#pix}} i/groupevent, core, {{#str}} group {{/str}} {{/pix}}</div>
<div class="col-11">{{{groupname}}}</div>
</div>
{{/groupname}}
{{#subscription}}
{{#displayeventsource}}
<div class="row mt-1">
<div class="col-xs-1">{{#pix}} i/rss, core, {{#str}} eventsource, core_calendar {{/str}} {{/pix}}</div>
<div class="col-xs-11">
<div class="col-1">{{#pix}} i/rss, core, {{#str}} eventsource, core_calendar {{/str}} {{/pix}}</div>
<div class="col-11">
{{#subscriptionurl}}
<p><a href="{{subscriptionurl}}">{{#str}}subscriptionsource, core_calendar, {{{subscriptionname}}}{{/str}}</a></p>
{{/subscriptionurl}}
Expand Down
Loading

0 comments on commit f00542c

Please sign in to comment.