mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-35339 coding style corrections
This commit is contained in:
parent
2e4c0d05e1
commit
44aa854e93
5 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ foreach ($sections as $i => $section) {
|
|||
echo "<table cellpadding=\"4\" cellspacing=\"0\">";
|
||||
}
|
||||
|
||||
foreach($modinfo->sections[$i] as $cmid) {
|
||||
foreach ($modinfo->sections[$i] as $cmid) {
|
||||
$mod = $modinfo->cms[$cmid];
|
||||
|
||||
if (empty($mod->uservisible)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue