Completed
Push — master ( 603667...7ce3ae )
by Daniel Neis
01:34
created
version.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
 
25 25
 defined('MOODLE_INTERNAL') || die();
26 26
 
27
-$plugin->version   = 2015042701;        // The current plugin version (Date: YYYYMMDDXX)
28
-$plugin->requires  = 2014110400;        // Requires this Moodle version
27
+$plugin->version   = 2015042701; // The current plugin version (Date: YYYYMMDDXX)
28
+$plugin->requires  = 2014110400; // Requires this Moodle version
29 29
 $plugin->release = 2;
30 30
 $plugin->maturity = MATURITY_STABLE;
31 31
 $plugin->component = 'block_featuredcourses'; // Full name of the plugin (used for diagnostics)
Please login to merge, or discard this patch.
block_featuredcourses.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
     }
113 113
 
114 114
     public function instance_allow_multiple() {
115
-          return false;
115
+            return false;
116 116
     }
117 117
 
118 118
     public function has_config() {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         }
57 57
         if ($this->page->course->id == SITEID) {
58 58
             $courses = self::get_featured_courses();
59
-            require_once($CFG->libdir. '/coursecatlib.php');
59
+            require_once($CFG->libdir.'/coursecatlib.php');
60 60
             $chelper = new coursecat_helper();
61 61
             foreach ($courses as $course) {
62 62
 
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
                 foreach ($course->get_course_overviewfiles() as $file) {
84 84
                     $isimage = $file->is_valid_image();
85 85
                     $url = file_encode_url("{$CFG->wwwroot}/pluginfile.php",
86
-                            '/'. $file->get_contextid(). '/'. $file->get_component(). '/'.
87
-                            $file->get_filearea(). $file->get_filepath(). $file->get_filename(), !$isimage);
86
+                            '/'.$file->get_contextid().'/'.$file->get_component().'/'.
87
+                            $file->get_filearea().$file->get_filepath().$file->get_filename(), !$isimage);
88 88
                     if ($isimage) {
89 89
                         $contentimages .= html_writer::tag('div',
90 90
                                 html_writer::empty_tag('img', array('src' => $url, 'style' => 'max-height: 150px')),
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
                                 array('class' => 'coursefile fp-filename-icon'));
99 99
                     }
100 100
                 }
101
-                $content .= $contentimages. $contentfiles;
101
+                $content .= $contentimages.$contentfiles;
102 102
 
103
-                $this->content->text .= $content. '</div>';
103
+                $this->content->text .= $content.'</div>';
104 104
             }
105 105
         }
106 106
 
Please login to merge, or discard this patch.
delete_featuredcourse.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,10 +59,10 @@
 block discarded – undo
59 59
 
60 60
 echo $OUTPUT->header(),
61 61
 
62
-     $OUTPUT->box_start('generalbox errorboxcontent boxaligncenter boxwidthnormal'),
63
-     html_writer::tag('p', get_string('confirmdelete', 'block_featuredcourses'), array('class' => 'bold'));
62
+        $OUTPUT->box_start('generalbox errorboxcontent boxaligncenter boxwidthnormal'),
63
+        html_writer::tag('p', get_string('confirmdelete', 'block_featuredcourses'), array('class' => 'bold'));
64 64
 
65 65
 $mform->display();
66 66
 
67 67
 echo $OUTPUT->box_end(),
68
-     $OUTPUT->footer();
68
+        $OUTPUT->footer();
Please login to merge, or discard this patch.
edit_form.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 
32 32
         $mform->addElement('header', 'configheader', get_string('blocksettings', 'block'));
33 33
         $mform->addElement('static', 'link',
34
-                           get_string('editlink', 'block_featuredcourses',
35
-                                      $CFG->wwwroot.'/blocks/featuredcourses/featuredcourses.php'));
34
+                            get_string('editlink', 'block_featuredcourses',
35
+                                        $CFG->wwwroot.'/blocks/featuredcourses/featuredcourses.php'));
36 36
     }
37 37
 }
Please login to merge, or discard this patch.
featuredcourses.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,8 +75,8 @@
 block discarded – undo
75 75
 
76 76
 echo $OUTPUT->header(),
77 77
 
78
-     $OUTPUT->heading(get_string('editpagedesc', 'block_featuredcourses')),
78
+        $OUTPUT->heading(get_string('editpagedesc', 'block_featuredcourses')),
79 79
 
80
-     $editform->render(),
80
+        $editform->render(),
81 81
 
82
-     $OUTPUT->footer();
82
+        $OUTPUT->footer();
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 $site = get_site();
72 72
 
73 73
 $PAGE->set_title(get_string('editpagetitle', 'block_featuredcourses'));
74
-$PAGE->set_heading($site->fullname . ' - ' .  get_string('pluginname', 'block_featuredcourses'));
74
+$PAGE->set_heading($site->fullname.' - '.get_string('pluginname', 'block_featuredcourses'));
75 75
 
76 76
 echo $OUTPUT->header(),
77 77
 
Please login to merge, or discard this patch.
featuredcourses_form.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         // Forms to edit existing featured courses.
49 49
         foreach ($featuredcourses as $c) {
50 50
             $mform->addElement('header', 'featured',
51
-                               get_string('featuredcourse', 'block_featuredcourses', $c->shortname . ' - '. $c->fullname));
51
+                                get_string('featuredcourse', 'block_featuredcourses', $c->shortname . ' - '. $c->fullname));
52 52
 
53 53
             $mform->addElement('hidden', 'featured['.$c->id.'][id]', null);
54 54
             $mform->setType('featured['.$c->id.'][id]', PARAM_INT);
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
             $mform->setDefault('featured['.$c->id.'][sortorder]', $c->sortorder);
62 62
 
63 63
             $mform->addElement('static', 'link',
64
-                               get_string('deletelink', 'block_featuredcourses',
65
-                                          $CFG->wwwroot.'/blocks/featuredcourses/delete_featuredcourse.php?courseid='.$c->id));
64
+                                get_string('deletelink', 'block_featuredcourses',
65
+                                            $CFG->wwwroot.'/blocks/featuredcourses/delete_featuredcourse.php?courseid='.$c->id));
66 66
 
67 67
         }
68 68
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $mform->addElement('checkbox', 'doadd', get_string('doadd', 'block_featuredcourses'));
73 73
 
74 74
         $mform->addElement('select', 'newfeatured[courseid]',
75
-                           get_string('courseid', 'block_featuredcourses'), $availablecourseslist);
75
+                            get_string('courseid', 'block_featuredcourses'), $availablecourseslist);
76 76
         $mform->addRule('newfeatured[courseid]', get_string('missingcourseid', 'block_featuredcourses'),
77 77
                         'required', null, 'client');
78 78
         $mform->disabledIf('newfeatured[courseid]', 'doadd', 'notchecked');
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,17 +38,17 @@
 block discarded – undo
38 38
         global $CFG;
39 39
 
40 40
         $mform = $this->_form;
41
-        $availablecourses  = $this->_customdata['availablecourses'];
42
-        $featuredcourses  = $this->_customdata['featuredcourses'];
41
+        $availablecourses = $this->_customdata['availablecourses'];
42
+        $featuredcourses = $this->_customdata['featuredcourses'];
43 43
         $availablecourseslist = array();
44 44
         foreach ($availablecourses as $c) {
45
-            $availablecourseslist[$c->id] = $c->shortname . ' : ' . $c->fullname;
45
+            $availablecourseslist[$c->id] = $c->shortname.' : '.$c->fullname;
46 46
         }
47 47
 
48 48
         // Forms to edit existing featured courses.
49 49
         foreach ($featuredcourses as $c) {
50 50
             $mform->addElement('header', 'featured',
51
-                               get_string('featuredcourse', 'block_featuredcourses', $c->shortname . ' - '. $c->fullname));
51
+                               get_string('featuredcourse', 'block_featuredcourses', $c->shortname.' - '.$c->fullname));
52 52
 
53 53
             $mform->addElement('hidden', 'featured['.$c->id.'][id]', null);
54 54
             $mform->setType('featured['.$c->id.'][id]', PARAM_INT);
Please login to merge, or discard this patch.
delete_featuredcourse_form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 class block_featuredcourses_delete_featuredcourse_form extends moodleform {
30 30
 
31 31
     public function definition() {
32
-        $mform =& $this->_form;
32
+        $mform = & $this->_form;
33 33
 
34 34
         $mform->addElement('hidden', 'id');
35 35
         $mform->setType('id', PARAM_INT);
Please login to merge, or discard this patch.