Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Trivial
-
Resolution: Unresolved
-
Affects Version/s: 1.6
-
Fix Version/s: None
-
Component/s: Course
-
Labels:None
-
Environment:All
-
Database:Any
-
Affected Branches:MOODLE_16_STABLE
Description
Moodle never really deletes a section from the database. This is probably a good thing. Otherwise a teacher could lose part of the course by accidently setting the number of sections too low.
One of our teachers, however, was trying to convert a weekly format course with 44 sections into a topics format class with only 6 sections. He made the necessary changes in course settings and everything looked fine. Yet whenever he tried to move a section, all 44 sections would show up again.
I searched the code and found that the move_section() function in course/lib.php does a Check for duplicates (line 1679). This resets numsections to the total number of sections in the database (line 1690). When I commented out the entire duplicate check (lines 1681-1693), the issue went away.
How necessary is the duplicate section number check? The comment says it is for a very rare case. Could the code just be removed or should it be rewritten?
Issue Links
| This issue has been marked as being related by: | ||||
| MDL-10405 | Delete sections |
|
|
|
Thanks for reporting this issue.
We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.
If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.
Michael d;
lqjjLKA0p6