diff --git a/blocks/community/communitycourse.php b/blocks/community/communitycourse.php index 8daffbf5e1615..dbd9e075d77f5 100644 --- a/blocks/community/communitycourse.php +++ b/blocks/community/communitycourse.php @@ -128,7 +128,7 @@ $remove = optional_param('remove', '', PARAM_INTEGER); $communityid = optional_param('communityid', '', PARAM_INTEGER); if ($remove != -1 and !empty($communityid) and confirm_sesskey()) { - $communitymanager->block_community_remove_course($communityid, $USER->id); + $communitymanager->block_community_remove_course($communityid, $USER->id); echo $OUTPUT->header(); echo $renderer->remove_success(new moodle_url(get_referer(false))); echo $OUTPUT->footer(); @@ -245,4 +245,4 @@ } } -echo $OUTPUT->footer(); \ No newline at end of file +echo $OUTPUT->footer(); diff --git a/blocks/community/locallib.php b/blocks/community/locallib.php index f76088fc34ce1..5c39f75348e9b 100644 --- a/blocks/community/locallib.php +++ b/blocks/community/locallib.php @@ -82,7 +82,7 @@ public function block_community_download_course_backup($course) { global $CFG, $USER; require_once($CFG->libdir . "/filelib.php"); require_once($CFG->dirroot. "/course/publish/lib.php"); - + $params['courseid'] = $course->id; $params['filetype'] = HUB_BACKUP_FILE_TYPE; @@ -104,7 +104,7 @@ public function block_community_download_course_backup($course) { $token = $registeredhub->token; $curlurl .= '&token='.$token; } - + $ch = curl_init($curlurl); curl_setopt($ch, CURLOPT_FILE, $fp); $data = curl_exec($ch); @@ -143,4 +143,4 @@ public function block_community_remove_course($communityid, $userid) { array('userid' => $userid, 'id' => $communityid)); } -} \ No newline at end of file +} diff --git a/blocks/community/renderer.php b/blocks/community/renderer.php index 1df8f82cb47df..4fb6c508bf03d 100644 --- a/blocks/community/renderer.php +++ b/blocks/community/renderer.php @@ -124,7 +124,7 @@ public function course_list($courses, $huburl, $contextcourseid) { //create title html $coursename = html_writer::tag('h3', $course->fullname, array('class' => 'hubcoursetitle')); - $coursenamehtml = html_writer::tag('div', $coursename, + $coursenamehtml = html_writer::tag('div', $coursename, array('class' => 'hubcoursetitlepanel')); // create screenshots html diff --git a/blocks/community/yui/imagegallery/imagegallery.js b/blocks/community/yui/imagegallery/imagegallery.js index 4671ad29ba67a..f91abb08e4203 100644 --- a/blocks/community/yui/imagegallery/imagegallery.js +++ b/blocks/community/yui/imagegallery/imagegallery.js @@ -44,12 +44,12 @@ YUI.add('moodle-block_community-imagegallery', function(Y) { this.overlay.render(); this.overlay.hide(); - + //attach a show event on the image divs () for (var i=0;i←"; var nextimagelink = "
"; - + /// need to load the images in the overlay var overlay = Y.one('#imageoverlay'); overlay.setContent(''); - + overlay.append(Y.Node.create('
')); this.overlay.destroy(); this.overlay = new M.core.dialogue({ - headerContent:previousimagelink + '
Image ' + headerContent:previousimagelink + '
Image ' + screennumber + ' / ' + this.imageidnumbers[imageid] + '
' + nextimagelink, bodyContent:Y.one('#imageoverlay').get('innerHTML'), visible: false, //by default it is not displayed @@ -127,7 +127,7 @@ YUI.add('moodle-block_community-imagegallery', function(Y) { if(overlaywidth > screenshot.width) { overlaywidth = screenshot.width; } - + this.overlay.set('width', overlaywidth); this.overlay.set("centered", true); this.overlay.show(); @@ -196,4 +196,4 @@ YUI.add('moodle-block_community-imagegallery', function(Y) { }, '@VERSION@', { requires:['base','node','overlay', 'moodle-enrol-notification'] -}); \ No newline at end of file +}); diff --git a/blocks/dock.js b/blocks/dock.js index c01445fb67f7d..5560a32d7aa7f 100644 --- a/blocks/dock.js +++ b/blocks/dock.js @@ -478,7 +478,7 @@ M.core_dock.delayEvent = function(event, options, target) { */ M.core_dock.fixTitleOrientation = function(item, title, text) { var Y = this.Y; - + var title = Y.one(title); if(M.core_dock.cfg.orientation != 'vertical') { @@ -809,7 +809,7 @@ M.core_dock.genericblock.prototype = { */ initialise_block : function(Y, node) { M.core_dock.init(Y); - + this.Y = Y; if (!node) { return false; @@ -919,7 +919,7 @@ M.core_dock.genericblock.prototype = { // Register an event so that when it is removed we can put it back as a block dockitem.on('dockeditem:itemremoved', this.return_to_block, this, dockitem); dock.add(dockitem); - + if (!this.skipsetposition) { // save the users preference M.util.set_user_preference('docked_block_instance_'+this.id, 1); diff --git a/blocks/navigation/block_navigation.php b/blocks/navigation/block_navigation.php index 8bfa9b7179f10..57d7f46a72223 100644 --- a/blocks/navigation/block_navigation.php +++ b/blocks/navigation/block_navigation.php @@ -192,7 +192,7 @@ function get_content() { $options = array(); $options['linkcategories'] = (!empty($this->config->linkcategories) && $this->config->linkcategories == 'yes'); - + // Grab the items to display $renderer = $this->page->get_renderer('block_navigation'); $this->content = new stdClass(); diff --git a/blocks/navigation/renderer.php b/blocks/navigation/renderer.php index b62d4db60c661..47a6a98bd2f1b 100644 --- a/blocks/navigation/renderer.php +++ b/blocks/navigation/renderer.php @@ -1,7 +1,14 @@ add_class('navigation_node'); $content = $this->navigation_node(array($navigation), array('class'=>'block_tree list'), $expansionlimit, $options); @@ -116,4 +123,4 @@ protected function navigation_node($items, $attrs=array(), $expansionlimit=null, } } -} \ No newline at end of file +} diff --git a/blocks/section_links/config_instance.html b/blocks/section_links/config_instance.html index af42b297beb22..efc2fbc4238f5 100644 --- a/blocks/section_links/config_instance.html +++ b/blocks/section_links/config_instance.html @@ -19,7 +19,7 @@ * Section links block * * @package moodlecore - * @Author Jason Hardin + * @Author Jason Hardin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/course/completion.php b/course/completion.php index 354c6a11ba7f6..e6ffef893e973 100644 --- a/course/completion.php +++ b/course/completion.php @@ -144,12 +144,12 @@ // Update course total passing grade if (!empty($data->criteria_grade)) { - if ($grade_item = grade_category::fetch_course_category($course->id)->grade_item) { - $grade_item->gradepass = $data->criteria_grade_value; - if (method_exists($grade_item, 'update')) { - $grade_item->update('course/completion.php'); - } - } + if ($grade_item = grade_category::fetch_course_category($course->id)->grade_item) { + $grade_item->gradepass = $data->criteria_grade_value; + if (method_exists($grade_item, 'update')) { + $grade_item->update('course/completion.php'); + } + } } redirect($CFG->wwwroot."/course/view.php?id=$course->id", get_string('changessaved')); diff --git a/course/publish/forms.php b/course/publish/forms.php index 84a9852f01d83..3b5e8df0a3abc 100644 --- a/course/publish/forms.php +++ b/course/publish/forms.php @@ -333,7 +333,7 @@ public function definition() { $editoroptions = array('maxfiles' => 0, 'maxbytes' => 0, 'trusttext' => false, 'forcehttps' => false); $mform->addElement('editor', 'creatornotes', get_string('creatornotes', 'hub'), '', $editoroptions); - $mform->addRule('creatornotes', $strrequired, 'required', null, 'client'); + $mform->addRule('creatornotes', $strrequired, 'required', null, 'client'); $mform->setType('creatornotes', PARAM_CLEANHTML); $mform->addHelpButton('creatornotes', 'creatornotes', 'hub'); diff --git a/course/publish/index.php b/course/publish/index.php index 962775051c84f..f868ca39a73ab 100644 --- a/course/publish/index.php +++ b/course/publish/index.php @@ -110,11 +110,11 @@ } $renderer = $PAGE->get_renderer('core', 'publish'); - + /// UNPUBLISH $cancel = optional_param('cancel', 0, PARAM_BOOL); if (!empty($cancel) and confirm_sesskey()) { - $confirm = optional_param('confirm', 0, PARAM_BOOL); + $confirm = optional_param('confirm', 0, PARAM_BOOL); $hubcourseid = optional_param('hubcourseid', 0, PARAM_INT); $publicationid = optional_param('publicationid', 0, PARAM_INT); $timepublished = optional_param('timepublished', 0, PARAM_INT); @@ -161,7 +161,7 @@ empty($hubname)?$huburl:$hubname), 'notifysuccess'); } - + /// OUTPUT echo $OUTPUT->header(); echo $confirmmessage; @@ -177,4 +177,4 @@ echo $OUTPUT->footer(); -} \ No newline at end of file +} diff --git a/course/publish/lib.php b/course/publish/lib.php index 4d166eb090565..fe13219fce9a2 100644 --- a/course/publish/lib.php +++ b/course/publish/lib.php @@ -279,7 +279,7 @@ public function get_sorted_subjects() { $subsublevel[substr($key, 0, 8)][substr($key, 0, 10)][$key] = $option; } } - + //recreate the initial structure returned by get_string_manager() $subjects = array(); foreach ($toplevel as $key => $name) { diff --git a/course/publish/metadata.php b/course/publish/metadata.php index b8a8caa638543..9067f795848bd 100644 --- a/course/publish/metadata.php +++ b/course/publish/metadata.php @@ -184,10 +184,10 @@ } // PUBLISH ACTION - + //publish the course information $function = 'hub_register_courses'; - $params = array('courses' => array($courseinfo)); + $params = array('courses' => array($courseinfo)); try { $courseids = $xmlrpcclient->call($function, $params); } catch (Exception $e) { diff --git a/course/publish/renderer.php b/course/publish/renderer.php index 64483e8bca5b3..970fed51db49a 100644 --- a/course/publish/renderer.php +++ b/course/publish/renderer.php @@ -119,7 +119,7 @@ public function registeredonhublisting($courseid, $publications) { . $courseid . "&updatestatusid=" . $publication->id . "&sesskey=" . sesskey())); } - //add button cells + //add button cells $cells = array($publication->enrollable ? get_string('advertised', 'hub') : get_string('shared', 'hub'), $hubname, userdate($publication->timepublished, @@ -207,7 +207,7 @@ public function hubinfo($hubinfo) { $hubdescription .= html_writer::tag('a', $hubinfo['name'], array('class' => 'hublink', 'href' => $hubinfo['url'], 'onclick' => 'this.target="_blank"')); - + $hubdescription .= html_writer::tag('div', format_text($hubinfo['description'], FORMAT_PLAIN), array('class' => 'hubdescription')); $hubdescription = html_writer::tag('div', $hubdescription, array('class' => 'hubinfo')); diff --git a/enrol/cohort/ajax.php b/enrol/cohort/ajax.php index 87d319bbd630c..e65d1ed845672 100644 --- a/enrol/cohort/ajax.php +++ b/enrol/cohort/ajax.php @@ -79,7 +79,7 @@ require_capability('enrol/cohort:config', $context); $roleid = required_param('roleid', PARAM_INT); $cohortid = required_param('cohortid', PARAM_INT); - + $roles = $manager->get_assignable_roles(); if (!enrol_cohort_can_view_cohort($cohortid) || !array_key_exists($roleid, $roles)) { throw new enrol_ajax_exception('errorenrolcohort'); @@ -112,4 +112,4 @@ } echo json_encode($outcome); -die(); \ No newline at end of file +die(); diff --git a/enrol/locallib.php b/enrol/locallib.php index fb2663e13fd0d..e7cdf29dc1ada 100644 --- a/enrol/locallib.php +++ b/enrol/locallib.php @@ -119,7 +119,7 @@ public function __construct(moodle_page $moodlepage, $course, $instancefilter = /** * Returns the current moodle page - * @return moodle_page + * @return moodle_page */ public function get_moodlepage() { return $this->moodlepage; @@ -1269,4 +1269,4 @@ abstract public function get_identifier(); * @param stdClass $properties */ abstract public function process(course_enrolment_manager $manager, array $users, stdClass $properties); -} \ No newline at end of file +} diff --git a/filter/algebra/AlgParser.pm b/filter/algebra/AlgParser.pm index 804e8328198e7..411ee98e43c7a 100644 --- a/filter/algebra/AlgParser.pm +++ b/filter/algebra/AlgParser.pm @@ -553,10 +553,10 @@ sub tolatex { if ($args[2]->[0] =~ /binop[12]|numberE|unop1/) {($p3,$p4)=qw{ \left( \right) };} if ($args[0] eq '/'){ -# return('\frac{' . $p1 . $args[1]->tolatex() . $p2 . '}'. +# return('\frac{' . $p1 . $args[1]->tolatex() . $p2 . '}'. # '{' . $p3 . $args[2]->tolatex() . $p4 . '}' ); return('\frac{' . $args[1]->tolatex() . '}'. - '{' . $args[2]->tolatex() . '}' ); + '{' . $args[2]->tolatex() . '}' ); } else{ return ($p1 . $args[1]->tolatex() . $p2 . $args[0] . $p3 . diff --git a/grade/edit/scale/edit_form.php b/grade/edit/scale/edit_form.php index fa6af485daf96..c6091b564c6d0 100644 --- a/grade/edit/scale/edit_form.php +++ b/grade/edit/scale/edit_form.php @@ -138,23 +138,23 @@ function validation($data, $files) { if (count($scalearray) < 2) { $errors['scale'] = get_string('badlyformattedscale', 'grades'); } else { - $thescale = implode(',',$scalearray); + $thescale = implode(',',$scalearray); - $textlib = textlib_get_instance(); + $textlib = textlib_get_instance(); //this check strips out whitespace from the scale we're validating but not from those already in the DB - $count = $DB->count_records_select('scale', "courseid=:courseid AND ".$DB->sql_compare_text('scale', $textlib->strlen($thescale)).'=:scale', - array('courseid'=>$courseid, 'scale'=>$thescale)); + $count = $DB->count_records_select('scale', "courseid=:courseid AND ".$DB->sql_compare_text('scale', $textlib->strlen($thescale)).'=:scale', + array('courseid'=>$courseid, 'scale'=>$thescale)); if ($count) { //if this is a new scale but we found a duplice in the DB //or we found a duplicate in another course report the error if (empty($old->id) or $old->courseid != $courseid) { - $errors['scale'] = get_string('duplicatescale', 'grades'); + $errors['scale'] = get_string('duplicatescale', 'grades'); } else if ($old->scale !== $thescale and $old->scale !== $data['scale']) { //if the old scale from DB is different but we found a duplicate then we're trying to modify a scale to be a duplicate - $errors['scale'] = get_string('duplicatescale', 'grades'); - } - } + $errors['scale'] = get_string('duplicatescale', 'grades'); + } + } } } diff --git a/grade/report/overview/renderer.php b/grade/report/overview/renderer.php index 1090d2fae26fb..d6be4761b687f 100644 --- a/grade/report/overview/renderer.php +++ b/grade/report/overview/renderer.php @@ -35,7 +35,7 @@ class gradereport_overview_renderer extends plugin_renderer_base { public function graded_users_selector($report, $course, $userid, $groupid, $includeall) { global $USER; - + $select = grade_get_graded_users_select($report, $course, $userid, $groupid, $includeall); $output = html_writer::tag('div', $this->output->render($select), array('id'=>'graded_users_selector')); $output .= html_writer::tag('p', '', array('style'=>'page-break-after: always;'));