Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inserting a section within course may co-opt a subpage section #6

Open
emdalton opened this issue Aug 28, 2013 · 1 comment
Open

Inserting a section within course may co-opt a subpage section #6

emdalton opened this issue Aug 28, 2013 · 1 comment

Comments

@emdalton
Copy link

One of our instructors had created a course with subpages in each topic; let's call them subpage1, subpage2, etc. She then inserted a new section between topic 1 and topic 2 in her course. Now subpage1 points to the new section and its contents. The old contents of subpage1 are still visible as "topic 16" at the end of the course.

This is Moodle 2.4, which allows new sections to be added to a course from the course page. It seems likely that there is a conflict in the logic that alters how many sections are visible in a course vs. orphaned when a new section is added from the main page, and the logic that creates and manages "orphaned" sections for each subpage.

Oddly, the instructor also inserted a new section between topic 2 and topic 3, and this did not seem to alter the contents of any of the subpages. However, in this case the extra content for Subpage2 is not in an orphaned section, but instead appears at the end of the course, but the section is set to be invisible.

@sammarshallou
Copy link
Member

It is strange that this happened, but there are various similar things that can definitely happen. Basically, subpage uses sections that normally start from (I think) section 110 - you can configure this in the settings, but the idea is that you should pick a number that's more than you ever actually have real sections on a course main page. These may display as orphaned sections if you are using a course format that displays orphaned sections.

Sections are actually 'linked' to a subpage by their internal id, not by their section number. For example, even though the first subpage is using section number 110, it will refer to it by its id which might be 11462 for example. So even if you insert a section and Moodle renumbers section 110 to section 111 because one was inserted, this shouldn't change its id, so the subpage should still own that section.

The only thing I can think of is that maybe Moodle somehow, instead of renumbering the existing sections when you inserted one, actually moved all the items from each section (11462 in this example) into a different section. That seems crazy - it would be difficult to code and I think it would cause other problems - but I suppose it's possible. (If it does happen, we can't fix it within subpage - vote for MDL-37702 if you'd like to increase the chance that subpage-like modules are properly possible in core Moodle at some point, which would allow us to fix all the weird behaviour.)

If you came up with steps to reproduce this starting from a new blank course, that might be useful to clarify the issue, but I suspect we might not be able to fix it anyhow...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants