mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
blocklib: MDL-19010 eliminate remaining calls to blocks_repopulate_page
This commit is contained in:
parent
cf37931b7f
commit
6cbcbf0fb3
7 changed files with 15 additions and 17 deletions
|
@ -607,8 +607,8 @@ function create_course ($course,$skip_fix_course_sortorder=0){
|
|||
$section->course = $newcourseid; // Create a default section.
|
||||
$section->section = 0;
|
||||
$section->id = $DB->insert_record("course_sections", $section);
|
||||
$page = page_create_object(PAGE_COURSE_VIEW, $newcourseid);
|
||||
blocks_repopulate_page($page); // Return value no
|
||||
$course = $DB->get_record('course', array('id' => $newcourseid));
|
||||
blocks_add_default_course_blocks($course);
|
||||
|
||||
if (!$skip_fix_course_sortorder){
|
||||
fix_course_sortorder();
|
||||
|
|
|
@ -536,11 +536,11 @@ function process_group_tag($tagcontents){
|
|||
// Choose a sort order that puts us at the start of the list!
|
||||
$course->sortorder = 0;
|
||||
|
||||
if($course->id = $DB->insert_record('course', $course)){
|
||||
if ($courseid = $DB->insert_record('course', $course)) {
|
||||
|
||||
// Setup the blocks
|
||||
$page = page_create_object(PAGE_COURSE_VIEW, $course->id);
|
||||
blocks_repopulate_page($page); // Return value not checked because you can always edit later
|
||||
$course = $DB->get_record('course', array('id' => $courseid));
|
||||
blocks_add_default_course_blocks($course);
|
||||
|
||||
$section = new object();
|
||||
$section->course = $course->id; // Create a default section.
|
||||
|
|
|
@ -593,8 +593,8 @@ function create_course ($course_ext,$skip_fix_course_sortorder=0){
|
|||
$section->course = $newcourseid; // Create a default section.
|
||||
$section->section = 0;
|
||||
$section->id = $DB->insert_record("course_sections", $section);
|
||||
$page = page_create_object(PAGE_COURSE_VIEW, $newcourseid);
|
||||
blocks_repopulate_page($page); // Return value no
|
||||
$course = $DB->get_record('course', array('id' => $newcourseid));
|
||||
blocks_add_default_course_blocks($course);
|
||||
|
||||
if (!$skip_fix_course_sortorder){
|
||||
fix_course_sortorder();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue