From 44aa854e937214c88a037f5cfbdeafa824792f8e Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Mon, 15 Oct 2012 16:57:25 +0800 Subject: [PATCH] MDL-35339 coding style corrections --- course/lib.php | 2 +- course/recent.php | 2 +- lib/deprecatedlib.php | 2 +- lib/tests/conditionlib_test.php | 2 +- report/outline/user.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/course/lib.php b/course/lib.php index a84ebfc1843..ec2cedfb4e9 100644 --- a/course/lib.php +++ b/course/lib.php @@ -2741,7 +2741,7 @@ function course_create_sections_if_missing($courseorid, $sections) { * end of the section * @return int The course_sections ID where the module is inserted */ -function course_add_cm_to_section($courseorid, $modid, $sectionnum, $beforemod = NULL) { +function course_add_cm_to_section($courseorid, $modid, $sectionnum, $beforemod = null) { global $DB, $COURSE; if (is_object($beforemod)) { $beforemod = $beforemod->id; diff --git a/course/recent.php b/course/recent.php index c6f6306db5e..df0f0d515d0 100644 --- a/course/recent.php +++ b/course/recent.php @@ -141,7 +141,7 @@ foreach ($sections as $sectionnum => $section) { continue; } - foreach($modinfo->sections[$sectionnum] as $cmid) { + foreach ($modinfo->sections[$sectionnum] as $cmid) { $cm = $modinfo->cms[$cmid]; if (!$cm->uservisible) { diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index 2e98925ee5c..1a2b205c15e 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -2970,7 +2970,7 @@ function get_all_sections($courseid) { * @param int $beforemod An existing ID which we will insert the new module before * @return int The course_sections ID where the mod is inserted */ -function add_mod_to_section($mod, $beforemod=NULL) { +function add_mod_to_section($mod, $beforemod = null) { debugging('Function add_mod_to_section() is deprecated, please use course_add_cm_to_section()', DEBUG_DEVELOPER); global $DB; return course_add_cm_to_section($mod->course, $mod->coursemodule, $mod->section, $beforemod); diff --git a/lib/tests/conditionlib_test.php b/lib/tests/conditionlib_test.php index 6079b6a108a..75fed3cf3d2 100644 --- a/lib/tests/conditionlib_test.php +++ b/lib/tests/conditionlib_test.php @@ -204,7 +204,7 @@ class conditionlib_testcase extends advanced_testcase { foreach($params as $name=>$value) { $settings->{$name}=$value; } - $cmid = $DB->insert_record('course_modules',$settings); + $cmid = $DB->insert_record('course_modules', $settings); rebuild_course_cache($courseid, true); return $cmid; } diff --git a/report/outline/user.php b/report/outline/user.php index 2e34a2cfe89..d1918614266 100644 --- a/report/outline/user.php +++ b/report/outline/user.php @@ -87,7 +87,7 @@ foreach ($sections as $i => $section) { echo ""; } - foreach($modinfo->sections[$i] as $cmid) { + foreach ($modinfo->sections[$i] as $cmid) { $mod = $modinfo->cms[$cmid]; if (empty($mod->uservisible)) {