From 439c8c5933e4681401225fa704d9b632c8da10b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Mon, 3 Feb 2020 21:09:28 +0100 Subject: [PATCH] MDL-68216 block_recent_activity: Format elements more nicely. --- blocks/recent_activity/renderer.php | 4 ++-- blocks/recent_activity/styles.css | 5 ----- mod/assign/lib.php | 2 +- mod/chat/lib.php | 4 ++-- mod/folder/lib.php | 2 +- mod/forum/lib.php | 2 +- mod/glossary/lib.php | 2 +- mod/survey/lib.php | 2 +- mod/wiki/lib.php | 2 +- mod/workshop/lib.php | 4 ++-- 10 files changed, 12 insertions(+), 17 deletions(-) diff --git a/blocks/recent_activity/renderer.php b/blocks/recent_activity/renderer.php index 2e96eeb0f88ab..c5f86bbe2a03d 100644 --- a/blocks/recent_activity/renderer.php +++ b/blocks/recent_activity/renderer.php @@ -53,7 +53,7 @@ public function recent_activity($course, $timestart, $recentenrolments, $structu $output .= html_writer::tag('div', html_writer::link(new moodle_url('/course/recent.php', array('id' => $course->id)), get_string('recentactivityreport')), - array('class' => 'activityhead')); + array('class' => 'activityhead mb-3')); $content = false; @@ -79,7 +79,7 @@ public function recent_activity($course, $timestart, $recentenrolments, $structu // Next, have there been any modifications to the course structure? if (!empty($structuralchanges)) { $content = true; - $output .= $this->heading(get_string("courseupdates").':', 3); + $output .= $this->heading(get_string("courseupdates") . ':', 6); foreach ($structuralchanges as $changeinfo => $change) { $output .= $this->structural_change($change); } diff --git a/blocks/recent_activity/styles.css b/blocks/recent_activity/styles.css index 3d1d9e3b6dad8..f1e2c2a21c2c6 100644 --- a/blocks/recent_activity/styles.css +++ b/blocks/recent_activity/styles.css @@ -1,8 +1,3 @@ -.block_recent_activity .activitydate, -.block_recent_activity .activityhead { - text-align: center; -} - .block_recent_activity .unlist li { margin-bottom: 1em; } diff --git a/mod/assign/lib.php b/mod/assign/lib.php index d982def6179ea..5f65f2e846b83 100644 --- a/mod/assign/lib.php +++ b/mod/assign/lib.php @@ -664,7 +664,7 @@ function assign_print_recent_activity($course, $viewfullnames, $timestart) { return false; } - echo $OUTPUT->heading(get_string('newsubmissions', 'assign').':', 3); + echo $OUTPUT->heading(get_string('newsubmissions', 'assign') . ':', 6); foreach ($show as $submission) { $cm = $modinfo->get_cm($submission->cmid); diff --git a/mod/chat/lib.php b/mod/chat/lib.php index 5c98776f342bf..503023c1ef9b1 100644 --- a/mod/chat/lib.php +++ b/mod/chat/lib.php @@ -334,7 +334,7 @@ function chat_print_recent_activity($course, $viewfullnames, $timestart) { $strftimerecent = get_string('strftimerecent'); if ($past) { - echo $OUTPUT->heading(get_string("pastchats", 'chat').':', 3); + echo $OUTPUT->heading(get_string("pastchats", 'chat') . ':', 6); foreach ($past as $cm) { $link = $CFG->wwwroot.'/mod/chat/view.php?id='.$cm->id; @@ -345,7 +345,7 @@ function chat_print_recent_activity($course, $viewfullnames, $timestart) { } if ($current) { - echo $OUTPUT->heading(get_string("currentchats", 'chat').':', 3); + echo $OUTPUT->heading(get_string("currentchats", 'chat') . ':', 6); $oldest = floor((time() - $CFG->chat_old_ping) / 10) * 10; // Better db caching. diff --git a/mod/folder/lib.php b/mod/folder/lib.php index 7b8b61268ecd3..0e36aa90a9425 100644 --- a/mod/folder/lib.php +++ b/mod/folder/lib.php @@ -739,7 +739,7 @@ function folder_print_recent_activity($course, $viewfullnames, $timestart) { } // Build list of files. - echo $OUTPUT->heading(get_string('newfoldercontent', 'folder').':', 3); + echo $OUTPUT->heading(get_string('newfoldercontent', 'folder') . ':', 6); $list = html_writer::start_tag('ul', ['class' => 'unlist']); foreach ($newfiles as $file) { $filename = $file->get_filename(); diff --git a/mod/forum/lib.php b/mod/forum/lib.php index bc9c91ab8800b..e1462938e5c0a 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -766,7 +766,7 @@ function forum_print_recent_activity($course, $viewfullnames, $timestart) { return false; } - echo $OUTPUT->heading(get_string('newforumposts', 'forum').':', 3); + echo $OUTPUT->heading(get_string('newforumposts', 'forum') . ':', 6); $list = html_writer::start_tag('ul', ['class' => 'unlist']); foreach ($printposts as $post) { diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index 2615e43e4561b..66933cc7b4d2b 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -587,7 +587,7 @@ function glossary_print_recent_activity($course, $viewfullnames, $timestart) { return false; } - echo $OUTPUT->heading(get_string('newentries', 'glossary').':', 3); + echo $OUTPUT->heading(get_string('newentries', 'glossary') . ':', 6); $strftimerecent = get_string('strftimerecent'); $entrycount = 0; foreach ($entries as $entry) { diff --git a/mod/survey/lib.php b/mod/survey/lib.php index a43d319b374ca..82820ad1f6afc 100644 --- a/mod/survey/lib.php +++ b/mod/survey/lib.php @@ -270,7 +270,7 @@ function survey_print_recent_activity($course, $viewfullnames, $timestart) { return false; } - echo $OUTPUT->heading(get_string('newsurveyresponses', 'survey').':', 3); + echo $OUTPUT->heading(get_string('newsurveyresponses', 'survey') . ':', 6); foreach ($surveys as $survey) { $url = $CFG->wwwroot.'/mod/survey/view.php?id='.$survey->cmid; print_recent_activity_note($survey->time, $survey, $survey->name, $url, false, $viewfullnames); diff --git a/mod/wiki/lib.php b/mod/wiki/lib.php index 3a07fa5a43f49..cb42b9f7826dc 100644 --- a/mod/wiki/lib.php +++ b/mod/wiki/lib.php @@ -338,7 +338,7 @@ function wiki_print_recent_activity($course, $viewfullnames, $timestart) { if (!$wikis) { return false; } - echo $OUTPUT->heading(get_string("updatedwikipages", 'wiki') . ':', 3); + echo $OUTPUT->heading(get_string("updatedwikipages", 'wiki') . ':', 6); foreach ($wikis as $wiki) { $cm = $modinfo->instances['wiki'][$wiki->wikiid]; $link = $CFG->wwwroot . '/mod/wiki/view.php?pageid=' . $wiki->id; diff --git a/mod/workshop/lib.php b/mod/workshop/lib.php index b9dbf9a35216c..c38199af69ff8 100644 --- a/mod/workshop/lib.php +++ b/mod/workshop/lib.php @@ -685,7 +685,7 @@ function workshop_print_recent_activity($course, $viewfullnames, $timestart) { if (!empty($submissions)) { $shown = true; - echo $OUTPUT->heading(get_string('recentsubmissions', 'workshop'), 3); + echo $OUTPUT->heading(get_string('recentsubmissions', 'workshop') . ':', 6); foreach ($submissions as $id => $submission) { $link = new moodle_url('/mod/workshop/submission.php', array('id'=>$id, 'cmid'=>$submission->cmid)); if ($submission->authornamevisible) { @@ -699,7 +699,7 @@ function workshop_print_recent_activity($course, $viewfullnames, $timestart) { if (!empty($assessments)) { $shown = true; - echo $OUTPUT->heading(get_string('recentassessments', 'workshop'), 3); + echo $OUTPUT->heading(get_string('recentassessments', 'workshop') . ':', 6); core_collator::asort_objects_by_property($assessments, 'timemodified'); foreach ($assessments as $id => $assessment) { $link = new moodle_url('/mod/workshop/assessment.php', array('asid' => $id));