-
Bug
-
Resolution: Fixed
-
Minor
-
2.7
-
MOODLE_27_STABLE
-
MOODLE_28_STABLE
-
MDL-47033_master -
In badges/view.php, badges/index.php, badges/edit.php and badges/newbadge.php the following line sets the layout:
$PAGE->set_pagelayout('course');
|
(Usually this is after checking it's not at the site level, where it uses "admin" instead).
Since that's the layout for the main course index page it should presumably be:
$PAGE->set_pagelayout('incourse');
|
To use the layout for course modules. Otherwise anything that tries to target the main course page via "course" will hit the badge pages as well.
While looking at this, I noticed there may be more pages with issues:
git grep "pagelayout(.course.)"
|
|
badges/edit.php:56: $PAGE->set_pagelayout('course');
|
badges/index.php:88: $PAGE->set_pagelayout('course');
|
badges/newbadge.php:50: $PAGE->set_pagelayout('course');
|
badges/view.php:74: $PAGE->set_pagelayout('course');
|
blocks/community/communitycourse.php:43:$PAGE->set_pagelayout('course');
|
course/info.php:37: $PAGE->set_pagelayout('course');
|
course/publish/backup.php:57:$PAGE->set_pagelayout('course');
|
course/publish/hubselector.php:37:$PAGE->set_pagelayout('course');
|
course/publish/index.php:44:$PAGE->set_pagelayout('course');
|
course/publish/metadata.php:48:$PAGE->set_pagelayout('course');
|
course/resources.php:32:$PAGE->set_pagelayout('course');
|
course/view.php:158: $PAGE->set_pagelayout('course');
|
enrol/index.php:49:$PAGE->set_pagelayout('course');
|
files/coursefilesedit.php:46:$PAGE->set_pagelayout('course');
|
files/index.php:71:$PAGE->set_pagelayout('course');
|
message/index.php:129: $PAGE->set_pagelayout('course');
|
mod/glossary/showentry.php:42:$PAGE->set_pagelayout('course');
|
notes/index.php:97:$PAGE->set_pagelayout('course');
|
I think maybe only course/view.php should be using that layout.
- Testing discovered
-
MDL-47482 Consistently use pagelayout ('course', 'incourse', 'admin', etc.)
-
- Closed
-