diff --git a/blocks/community/communitycourse.php b/blocks/community/communitycourse.php index 8daffbf5e16..dbd9e075d77 100644 --- a/blocks/community/communitycourse.php +++ b/blocks/community/communitycourse.php @@ -128,7 +128,7 @@ if ($usercandownload and $download != -1 and !empty($downloadcourseid) and confi $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 @@ if (!empty($courses)) { } } -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 f76088fc34c..5c39f75348e 100644 --- a/blocks/community/locallib.php +++ b/blocks/community/locallib.php @@ -82,7 +82,7 @@ class block_community_manager { 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 @@ class block_community_manager { $token = $registeredhub->token; $curlurl .= '&token='.$token; } - + $ch = curl_init($curlurl); curl_setopt($ch, CURLOPT_FILE, $fp); $data = curl_exec($ch); @@ -143,4 +143,4 @@ class block_community_manager { array('userid' => $userid, 'id' => $communityid)); } -} \ No newline at end of file +} diff --git a/blocks/community/renderer.php b/blocks/community/renderer.php index 1df8f82cb47..4fb6c508bf0 100644 --- a/blocks/community/renderer.php +++ b/blocks/community/renderer.php @@ -124,7 +124,7 @@ class block_community_renderer extends plugin_renderer_base { //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 4671ad29ba6..f91abb08e42 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 c01445fb67f..5560a32d7aa 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 8bfa9b7179f..57d7f46a722 100644 --- a/blocks/navigation/block_navigation.php +++ b/blocks/navigation/block_navigation.php @@ -192,7 +192,7 @@ class block_navigation extends block_base { $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/db/upgrade.php b/blocks/navigation/db/upgrade.php index 874fdfd5238..afd3697faf2 100644 --- a/blocks/navigation/db/upgrade.php +++ b/blocks/navigation/db/upgrade.php @@ -58,7 +58,7 @@ function xmldb_block_navigation_upgrade($oldversion, $block) { if ($oldversion < 2010091400) { - $sql = "SELECT bp.id FROM {block_instances} bi + $sql = "SELECT bp.id FROM {block_instances} bi LEFT JOIN {block_positions} bp ON bp.blockinstanceid=bi.id WHERE bi.blockname='navigation' AND bp.visible=0"; $blockpositions = $DB->get_records_sql($sql); @@ -79,4 +79,4 @@ function xmldb_block_navigation_upgrade($oldversion, $block) { // Put any upgrade step following this return true; -} \ No newline at end of file +} diff --git a/blocks/navigation/renderer.php b/blocks/navigation/renderer.php index b62d4db60c6..17fc67a8fa8 100644 --- a/blocks/navigation/renderer.php +++ b/blocks/navigation/renderer.php @@ -1,7 +1,7 @@ add_class('navigation_node'); $content = $this->navigation_node(array($navigation), array('class'=>'block_tree list'), $expansionlimit, $options); @@ -116,4 +116,4 @@ class block_navigation_renderer extends plugin_renderer_base { } } -} \ No newline at end of file +} diff --git a/blocks/section_links/config_instance.html b/blocks/section_links/config_instance.html index af42b297beb..efc2fbc4238 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 354c6a11ba7..e6ffef893e9 100644 --- a/course/completion.php +++ b/course/completion.php @@ -144,12 +144,12 @@ if ($form->is_cancelled()){ // 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 84a9852f01d..3b5e8df0a3a 100644 --- a/course/publish/forms.php +++ b/course/publish/forms.php @@ -333,7 +333,7 @@ class course_publication_form extends moodleform { $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 962775051c8..f868ca39a73 100644 --- a/course/publish/index.php +++ b/course/publish/index.php @@ -110,11 +110,11 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE, } $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 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE, empty($hubname)?$huburl:$hubname), 'notifysuccess'); } - + /// OUTPUT echo $OUTPUT->header(); echo $confirmmessage; @@ -177,4 +177,4 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE, echo $OUTPUT->footer(); -} \ No newline at end of file +} diff --git a/course/publish/lib.php b/course/publish/lib.php index 4d166eb0905..fe13219fce9 100644 --- a/course/publish/lib.php +++ b/course/publish/lib.php @@ -279,7 +279,7 @@ class course_publish_manager { $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 b8a8caa6385..9067f795848 100644 --- a/course/publish/metadata.php +++ b/course/publish/metadata.php @@ -184,10 +184,10 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE, } // 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 64483e8bca5..970fed51db4 100644 --- a/course/publish/renderer.php +++ b/course/publish/renderer.php @@ -119,7 +119,7 @@ class core_publish_renderer extends plugin_renderer_base { . $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 @@ class core_publish_renderer extends plugin_renderer_base { $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 87d319bbd63..e65d1ed8456 100644 --- a/enrol/cohort/ajax.php +++ b/enrol/cohort/ajax.php @@ -79,7 +79,7 @@ switch ($action) { 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 @@ switch ($action) { } echo json_encode($outcome); -die(); \ No newline at end of file +die(); diff --git a/enrol/locallib.php b/enrol/locallib.php index fb2663e13fd..e7cdf29dc1a 100644 --- a/enrol/locallib.php +++ b/enrol/locallib.php @@ -119,7 +119,7 @@ class course_enrolment_manager { /** * Returns the current moodle page - * @return moodle_page + * @return moodle_page */ public function get_moodlepage() { return $this->moodlepage; @@ -1269,4 +1269,4 @@ abstract class enrol_bulk_enrolment_operation { * @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 804e8328198..411ee98e43c 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 db75e8e791a..1e08b4bdff8 100644 --- a/grade/edit/scale/edit_form.php +++ b/grade/edit/scale/edit_form.php @@ -131,23 +131,23 @@ class edit_scale_form extends moodleform { 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 7de6733f5b3..a4d488b11d4 100644 --- a/grade/report/overview/renderer.php +++ b/grade/report/overview/renderer.php @@ -36,7 +36,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;')); @@ -44,4 +44,4 @@ class gradereport_overview_renderer extends plugin_renderer_base { return $output; } -} \ No newline at end of file +}