Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.7.3, 1.7.4, 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.9
-
Fix Version/s: None
-
Component/s: General
-
Labels:None
-
Affected Branches:MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
Description
When I activate "Show the course blocks" in the resource compose a web page and then I choose "Turn editing off" in Administration block, I obtain the following error "Course Module ID was incorrect".
Perhaps you should change the link because when you are on a resource and not on the course page, the path oh the relative link is wrong.
The problem here is that the resource page is created with the page_course() subclass (in lib/pagelib.php). This subclass is for creating course pages - it doesn't know anything about resource pages. The created page object contains the course info., but has no id or other info for the resource. There are several problems this causes:
1. This one - incorrect turn editing on/off link in the administration block.
2. If the administration block isn't present, there is no way to turn editing on or off (no edit button elsewhere).
3. The breadcrumb navigation is wrong, and the 'jump to' activity menu is missing - see MDL-10991 and
MDL-7288.4. Adding, deleting, showing, hiding, editing, or moving blocks loads the course page instead of the resource page.
There are 2 possible solutions:
1. Use a subclass of page_generic_activity() to create the page instead of using page_course(). This will make the resource page behave like an activity page (e.g. quiz), with limited blocks, instead of like a course page with all the blocks.
2. Create a new page_resource() subclass that displays all the course blocks, contains information about the resource, and has correct navigation and links, and a "blocks editing" button.
Any thoughts on which approach would be better? I do have a working fix for option 1, and I'm almost there with option 2.
MDL-7288. 4. Adding, deleting, showing, hiding, editing, or moving blocks loads the course page instead of the resource page. There are 2 possible solutions: 1. Use a subclass of page_generic_activity() to create the page instead of using page_course(). This will make the resource page behave like an activity page (e.g. quiz), with limited blocks, instead of like a course page with all the blocks. 2. Create a new page_resource() subclass that displays all the course blocks, contains information about the resource, and has correct navigation and links, and a "blocks editing" button. Any thoughts on which approach would be better? I do have a working fix for option 1, and I'm almost there with option 2.