Skip to content

Commit 8978f4f

Browse files
The added white space after commas and Removed extra newline
1 parent 0e32d1f commit 8978f4f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

block_profile_redirect.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
class block_profile_redirect extends block_base {
2626
public function init() {
2727
$this->title = get_string('blockname', 'block_profile_redirect');
28-
}
28+
}
2929

3030
function applicable_formats() {
3131
return array('all' => false, 'site' => true, 'my' => true);
@@ -38,9 +38,8 @@ function get_content() {
3838
}
3939

4040
$context = context_system::instance();
41-
4241
if (has_capability('moodle/site:config', $context)) { // 'moodle/site:doanything' no longer exists.
43-
$content = get_string('sysadmin','block_profile_redirect');
42+
$content = get_string('sysadmin', 'block_profile_redirect');
4443
} else {
4544
$config = get_config('blocks/profile_redirect');
4645
if (isset($config->profilefield)) {
@@ -65,11 +64,11 @@ function get_content() {
6564
}
6665
// $courefieldvalue must not be empty (if it's empty it redirects infinitly).
6766
// It also MUST return 1 record.
68-
$course = $DB->get_record('course',array($config->coursefield => $coursefieldvalue));
67+
$course = $DB->get_record('course', array($config->coursefield => $coursefieldvalue));
6968

7069
if (!empty($coursefieldvalue) and !empty($course)) {
7170
// Since M2 doesn't output any code we can redirect cleanly.
72-
redirect($CFG->wwwroot.'/course/view.php?id='.$course->id,'',0);
71+
redirect($CFG->wwwroot.'/course/view.php?id='.$course->id, '', 0);
7372
$content = ''; // Moodle complains if this isn't set.
7473
} else {
7574
$content = '';
@@ -84,11 +83,9 @@ function get_content() {
8483

8584
return $this->content;
8685
}
87-
8886
function hide_header() {
8987
return true;
9088
}
91-
9289
function has_config() {
9390
return true;
9491
}

0 commit comments

Comments
 (0)