Skip to content

Commit

Permalink
MDL-73358 report: Add page content heading for report pages
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Jan 14, 2022
1 parent e78184d commit a926979
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 10 deletions.
1 change: 0 additions & 1 deletion admin/tool/monitor/managerules.php
Expand Up @@ -117,7 +117,6 @@
$managerules = get_string('managerules', 'tool_monitor');
report_helper::print_report_selector($managerules);

echo $OUTPUT->heading(get_string('managerules', 'tool_monitor'));
$status = get_config('tool_monitor', 'enablemonitor');
$help = new help_icon('enablehelp', 'tool_monitor');

Expand Down
3 changes: 2 additions & 1 deletion lib/classes/report_helper.php
Expand Up @@ -78,9 +78,10 @@ public static function print_report_selector(string $pluginname):void {

$select = new url_select($menuarray, $activeurl, null, 'choosecoursereport');
$select->set_label(get_string('reporttype'), ['class' => 'accesshide']);
$select->class .= " mb-3";
$select->class .= " mb-1";
echo $OUTPUT->render($select);
}
echo $OUTPUT->heading($pluginname, 2, 'mb-3');
}

/**
Expand Down
1 change: 0 additions & 1 deletion report/competency/index.php
Expand Up @@ -96,7 +96,6 @@
$top .= $output->context_header($userheading, 3);
}
echo $output->container($top, 'clearfix');
echo $output->heading($title, 3);

if ($currentuser > 0) {
$page = new \report_competency\output\report($course->id, $currentuser, $currentmodule);
Expand Down
4 changes: 3 additions & 1 deletion report/insights/insights.php
Expand Up @@ -118,7 +118,9 @@
}

$insightinfo = new stdClass();
$insightinfo->contextname = $context->get_context_name();
// Don't show prefix for course-level context.
$withprefix = $context->contextlevel <> CONTEXT_COURSE;
$insightinfo->contextname = $context->get_context_name($withprefix);
$insightinfo->insightname = $model->get_target()->get_name();

if (!$model->is_enabled()) {
Expand Down
2 changes: 1 addition & 1 deletion report/insights/templates/insights_list.mustache
Expand Up @@ -106,7 +106,7 @@

<div class="insight-container" data-context-id="{{contextid}}" data-model-id="{{modelid}}">

<h2 class="mb-2">{{insightname}}</h2>
<h3 class="mb-2">{{insightname}}</h3>

{{{insightdescription}}}

Expand Down
2 changes: 1 addition & 1 deletion report/log/index.php
Expand Up @@ -192,7 +192,7 @@
// Print selector dropdown.
$pluginname = get_string('pluginname', 'report_log');
report_helper::print_report_selector($pluginname);
echo $output->heading(get_string('chooselogs') .':');
echo $output->heading(get_string('chooselogs') .':', 3);
echo $output->render($reportlog);
}
}
Expand Down
5 changes: 3 additions & 2 deletions report/loglive/index.php
Expand Up @@ -80,15 +80,16 @@

$PAGE->set_url($url);
$PAGE->set_context($context);
$PAGE->set_title("$coursename: $strlivelogs ($strupdatesevery)");
$PAGE->set_heading("$coursename: $strlivelogs ($strupdatesevery)");
$PAGE->set_title("$coursename: $strlivelogs");
$PAGE->set_heading($coursename);

$output = $PAGE->get_renderer('report_loglive');
echo $output->header();

// Print selector dropdown.
$pluginname = get_string('pluginname', 'report_loglive');
report_helper::print_report_selector($pluginname);
echo html_writer::div(get_string('livelogswithupdate', 'report_loglive', $strupdatesevery), 'mb-3');
echo $output->reader_selector($renderable);
echo $output->toggle_liveupdate_button($renderable);
echo $output->render($renderable);
Expand Down
1 change: 1 addition & 0 deletions report/loglive/lang/en/report_loglive.php
Expand Up @@ -31,6 +31,7 @@
$string['eventorigin'] = 'Origin';
$string['eventrelatedfullnameuser'] = 'Affected user';
$string['livelogs'] = 'Live logs from the past hour';
$string['livelogswithupdate'] = 'Live logs from the past hour ({$a})';
$string['loglive:view'] = 'View live logs';
$string['nologreaderenabled'] = 'No log reader enabled';
$string['pause'] = 'Pause live updates';
Expand Down
1 change: 0 additions & 1 deletion report/outline/index.php
Expand Up @@ -93,7 +93,6 @@
// Print selector drop down.
$pluginname = get_string('pluginname', 'report_outline');
report_helper::print_report_selector($pluginname);
echo $OUTPUT->heading(format_string($course->fullname));

list($uselegacyreader, $useinternalreader, $minloginternalreader, $logtable) = report_outline_get_common_log_variables();

Expand Down
2 changes: 1 addition & 1 deletion report/stats/locallib.php
Expand Up @@ -236,7 +236,7 @@ function report_stats_report($course, $report, $mode, $user, $roleid, $time) {
' - ' .
get_string('statsreport' . $report) .
$rolename .
$userdisplayname
$userdisplayname, 3
);

if ($mode == STATS_MODE_DETAILED) {
Expand Down

0 comments on commit a926979

Please sign in to comment.