mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
Pass the whole $course variable to block_print_blocks_admin()
so we have more information.
This commit is contained in:
parent
a2ebe6a55c
commit
6236ed990d
5 changed files with 8 additions and 8 deletions
|
@ -355,8 +355,8 @@ function block_find($blockid, $leftblocks, $rightblocks) {
|
|||
}
|
||||
|
||||
//This function prints the block to admin blocks as necessary
|
||||
function block_print_blocks_admin($courseid, $missingblocks) {
|
||||
if (isediting($courseid)) {
|
||||
function block_print_blocks_admin($course, $missingblocks) {
|
||||
if (isediting($course->id)) {
|
||||
$strblocks = get_string('blocks');
|
||||
$stradd = get_string('add');
|
||||
if (!empty($missingblocks)) {
|
||||
|
@ -370,13 +370,13 @@ function block_print_blocks_admin($courseid, $missingblocks) {
|
|||
$menu[$block->id] = $blockobject->get_title();
|
||||
}
|
||||
|
||||
if($courseid == 1) {
|
||||
if($course->id == 1) {
|
||||
$target = 'index.php';
|
||||
}
|
||||
else {
|
||||
$target = 'view.php';
|
||||
}
|
||||
$content = popup_form($target.'?id='.$courseid.'&blockaction=add&blockid=',
|
||||
$content = popup_form($target.'?id='.$course->id.'&blockaction=add&blockid=',
|
||||
$menu, 'add_block', '', "$stradd...", '', '', true);
|
||||
$content = '<div align="center">'.$content.'</div>';
|
||||
print_side_block($strblocks, $content, NULL, NULL, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue