summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
562dbe4)
$course = $this->getDataGenerator()->create_course(array('numsections'=>10), array('createsections'=>true));
$oldsections = array();
$sections = array();
$course = $this->getDataGenerator()->create_course(array('numsections'=>10), array('createsections'=>true));
$oldsections = array();
$sections = array();
- foreach ($DB->get_records('course_sections', array('course'=>$course->id)) as $section) {
+ foreach ($DB->get_records('course_sections', array('course'=>$course->id), 'id') as $section) {
$oldsections[$section->section] = $section->id;
$sections[$section->id] = $section->section;
}
$oldsections[$section->section] = $section->id;
$sections[$section->id] = $section->section;
}