mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-68233 renderers/block: fix reported coding style issues
This commit is contained in:
parent
1dcd0d3499
commit
19f221961e
@ -127,7 +127,8 @@ class renderer extends plugin_renderer_base {
|
||||
}
|
||||
|
||||
if (!CLI_SCRIPT) {
|
||||
$output .= $this->output->single_button(new \moodle_url('/admin/tool/analytics/index.php'), get_string('continue'), 'get');
|
||||
$output .= $this->output->single_button(new \moodle_url('/admin/tool/analytics/index.php'),
|
||||
get_string('continue'), 'get');
|
||||
}
|
||||
|
||||
return $output;
|
||||
@ -152,14 +153,17 @@ class renderer extends plugin_renderer_base {
|
||||
|
||||
if ($trainresults) {
|
||||
if ($trainresults->status == 0) {
|
||||
$output .= $this->output->notification(get_string('trainingprocessfinished', 'tool_analytics'),
|
||||
$output .= $this->output->notification(
|
||||
get_string('trainingprocessfinished', 'tool_analytics'),
|
||||
\core\output\notification::NOTIFY_SUCCESS);
|
||||
} else if ($trainresults->status === \core_analytics\model::NO_DATASET ||
|
||||
$trainresults->status === \core_analytics\model::NOT_ENOUGH_DATA) {
|
||||
$output .= $this->output->notification(get_string('nodatatotrain', 'tool_analytics'),
|
||||
$output .= $this->output->notification(
|
||||
get_string('nodatatotrain', 'tool_analytics'),
|
||||
\core\output\notification::NOTIFY_WARNING);
|
||||
} else {
|
||||
$output .= $this->output->notification(get_string('generalerror', 'tool_analytics', $trainresults->status),
|
||||
$output .= $this->output->notification(
|
||||
get_string('generalerror', 'tool_analytics', $trainresults->status),
|
||||
\core\output\notification::NOTIFY_ERROR);
|
||||
}
|
||||
}
|
||||
@ -172,19 +176,23 @@ class renderer extends plugin_renderer_base {
|
||||
}
|
||||
|
||||
if ($predictresults || (!empty($predictlogs) && debugging())) {
|
||||
$output .= $this->output->heading(get_string('predictionresults', 'tool_analytics'), 3, 'main mt-3');
|
||||
$output .= $this->output->heading(
|
||||
get_string('predictionresults', 'tool_analytics'), 3, 'main mt-3');
|
||||
}
|
||||
|
||||
if ($predictresults) {
|
||||
if ($predictresults->status == 0) {
|
||||
$output .= $this->output->notification(get_string('predictionprocessfinished', 'tool_analytics'),
|
||||
$output .= $this->output->notification(
|
||||
get_string('predictionprocessfinished', 'tool_analytics'),
|
||||
\core\output\notification::NOTIFY_SUCCESS);
|
||||
} else if ($predictresults->status === \core_analytics\model::NO_DATASET ||
|
||||
$predictresults->status === \core_analytics\model::NOT_ENOUGH_DATA) {
|
||||
$output .= $this->output->notification(get_string('nodatatopredict', 'tool_analytics'),
|
||||
$output .= $this->output->notification(
|
||||
get_string('nodatatopredict', 'tool_analytics'),
|
||||
\core\output\notification::NOTIFY_WARNING);
|
||||
} else {
|
||||
$output .= $this->output->notification(get_string('generalerror', 'tool_analytics', $predictresults->status),
|
||||
$output .= $this->output->notification(
|
||||
get_string('generalerror', 'tool_analytics', $predictresults->status),
|
||||
\core\output\notification::NOTIFY_ERROR);
|
||||
}
|
||||
}
|
||||
@ -197,7 +205,8 @@ class renderer extends plugin_renderer_base {
|
||||
}
|
||||
|
||||
if (!CLI_SCRIPT) {
|
||||
$output .= $this->output->single_button(new \moodle_url('/admin/tool/analytics/index.php'), get_string('continue'), 'get');
|
||||
$output .= $this->output->single_button(new \moodle_url('/admin/tool/analytics/index.php'),
|
||||
get_string('continue'), 'get');
|
||||
}
|
||||
|
||||
return $output;
|
||||
@ -238,7 +247,8 @@ class renderer extends plugin_renderer_base {
|
||||
$this->page->set_heading(get_string('pluginname', 'tool_analytics'));
|
||||
|
||||
$output = $this->output->header();
|
||||
$output .= $this->output->notification(get_string('analyticsdisabled', 'analytics'), \core\output\notification::NOTIFY_INFO);
|
||||
$output .= $this->output->notification(get_string('analyticsdisabled', 'analytics'),
|
||||
\core\output\notification::NOTIFY_INFO);
|
||||
$output .= \html_writer::tag('a', get_string('continue'), ['class' => 'btn btn-primary',
|
||||
'href' => (new \moodle_url('/'))->out()]);
|
||||
$output .= $this->output->footer();
|
||||
|
@ -866,8 +866,8 @@ class core_renderer extends renderer_base {
|
||||
html_writer::link($purgeurl, get_string('purgecaches', 'admin')) . '</div>';
|
||||
}
|
||||
if (!empty($CFG->debugvalidators)) {
|
||||
// NOTE: this is not a nice hack, $this->page->url is not always accurate and $FULLME neither,
|
||||
// it is not a bug if it fails. --skodak
|
||||
// NOTE: this is not a nice hack, $this->page->url is not always accurate and
|
||||
// $FULLME neither, it is not a bug if it fails. --skodak.
|
||||
$output .= '<div class="validators"><ul class="list-unstyled ml-1">
|
||||
<li><a href="http://validator.w3.org/check?verbose=1&ss=1&uri=' . urlencode(qualified_me()) . '">Validate HTML</a></li>
|
||||
<li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&url1=' . urlencode(qualified_me()) . '">Section 508 Check</a></li>
|
||||
@ -2628,7 +2628,7 @@ class core_renderer extends renderer_base {
|
||||
$strloading = get_string('loading', 'repository');
|
||||
$strdndenabled = get_string('dndenabled_inbox', 'moodle');
|
||||
$strdroptoupload = get_string('droptoupload', 'moodle');
|
||||
$icon_progress = $this->pix_icon('i/loading_small', $strloading).'';
|
||||
$iconprogress = $this->pix_icon('i/loading_small', $strloading).'';
|
||||
|
||||
$currentfile = $options->currentfile;
|
||||
if (empty($currentfile)) {
|
||||
@ -2653,7 +2653,7 @@ class core_renderer extends renderer_base {
|
||||
}
|
||||
$html = <<<EOD
|
||||
<div class="filemanager-loading mdl-align" id='filepicker-loading-{$client_id}'>
|
||||
$icon_progress
|
||||
$iconprogress
|
||||
</div>
|
||||
<div id="filepicker-wrapper-{$client_id}" class="mdl-left w-100" style="display:none">
|
||||
<div>
|
||||
|
@ -299,7 +299,8 @@ class mod_choice_renderer extends plugin_renderer_base {
|
||||
], true);
|
||||
$actiondata .= $this->output->render($selectallcheckbox);
|
||||
|
||||
$actionurl = new moodle_url($this->page->url, array('sesskey'=>sesskey(), 'action'=>'delete_confirmation()'));
|
||||
$actionurl = new moodle_url($this->page->url,
|
||||
['sesskey' => sesskey(), 'action' => 'delete_confirmation()']);
|
||||
$actionoptions = array('delete' => get_string('delete'));
|
||||
foreach ($choices->options as $optionid => $option) {
|
||||
if ($optionid > 0) {
|
||||
|
@ -75,7 +75,8 @@ class renderer extends plugin_renderer_base {
|
||||
$this->page->set_heading($insightinfo->contextname);
|
||||
|
||||
$output = $this->output->header();
|
||||
$output .= $this->output->notification(get_string('disabledmodel', 'report_insights'), \core\output\notification::NOTIFY_INFO);
|
||||
$output .= $this->output->notification(get_string('disabledmodel', 'report_insights'),
|
||||
\core\output\notification::NOTIFY_INFO);
|
||||
$output .= $this->output->footer();
|
||||
|
||||
return $output;
|
||||
@ -94,7 +95,8 @@ class renderer extends plugin_renderer_base {
|
||||
$this->page->set_heading($context->get_context_name());
|
||||
|
||||
$output = $this->output->header();
|
||||
$output .= $this->output->notification(get_string('noinsights', 'analytics'), \core\output\notification::NOTIFY_INFO);
|
||||
$output .= $this->output->notification(get_string('noinsights', 'analytics'),
|
||||
\core\output\notification::NOTIFY_INFO);
|
||||
$output .= $this->output->footer();
|
||||
|
||||
return $output;
|
||||
@ -113,7 +115,8 @@ class renderer extends plugin_renderer_base {
|
||||
$this->page->set_heading($context->get_context_name());
|
||||
|
||||
$output = $this->output->header();
|
||||
$output .= $this->output->notification(get_string('noinsightsmodel', 'analytics'), \core\output\notification::NOTIFY_INFO);
|
||||
$output .= $this->output->notification(get_string('noinsightsmodel', 'analytics'),
|
||||
\core\output\notification::NOTIFY_INFO);
|
||||
$output .= $this->output->footer();
|
||||
|
||||
return $output;
|
||||
@ -132,7 +135,8 @@ class renderer extends plugin_renderer_base {
|
||||
$this->page->set_heading(get_string('pluginname', 'report_insights'));
|
||||
|
||||
$output = $this->output->header();
|
||||
$output .= $this->output->notification(get_string('analyticsdisabled', 'analytics'), \core\output\notification::NOTIFY_INFO);
|
||||
$output .= $this->output->notification(get_string('analyticsdisabled', 'analytics'),
|
||||
\core\output\notification::NOTIFY_INFO);
|
||||
$output .= \html_writer::tag('a', get_string('continue'), ['class' => 'btn btn-primary',
|
||||
'href' => (new \moodle_url('/'))->out()]);
|
||||
$output .= $this->output->footer();
|
||||
|
Loading…
x
Reference in New Issue
Block a user