Skip to content

Commit

Permalink
MDL-68216 block_recent_activity: Format elements more nicely.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed May 5, 2020
1 parent a09eb26 commit 439c8c5
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 17 deletions.
4 changes: 2 additions & 2 deletions blocks/recent_activity/renderer.php
Expand Up @@ -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;

Expand All @@ -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);
}
Expand Down
5 changes: 0 additions & 5 deletions 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;
}
Expand Down
2 changes: 1 addition & 1 deletion mod/assign/lib.php
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions mod/chat/lib.php
Expand Up @@ -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;
Expand All @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion mod/folder/lib.php
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion mod/forum/lib.php
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion mod/glossary/lib.php
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion mod/survey/lib.php
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion mod/wiki/lib.php
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions mod/workshop/lib.php
Expand Up @@ -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) {
Expand All @@ -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));
Expand Down

0 comments on commit 439c8c5

Please sign in to comment.