marinaglancy / moodle-format_flexsections

25 stars 25 forks source link

Downloadcenter only downloads first 4 sections of the course #76

Closed t-schroeder closed 10 months ago

t-schroeder commented 10 months ago

Due to the format option "numsections" being set to 4 by this course format plugin the downloadcenter plugin only shows and downloads the first 4 sections of the course.

Since I'm not sure where this should be fixed I've reported this in both plugins. See https://github.com/academic-moodle-cooperation/moodle-local_downloadcenter/issues/30

t-schroeder commented 10 months ago

I think this only affects courses that were created with the format flexsections. It doesn't affect courses created with another format that later got changed to format_flexsections. See https://github.com/marinaglancy/moodle-format_flexsections/blob/0c9dfbacddbefeb7a4114b16eb6a18bc87ea4a90/lib.php#L509-L519

marinaglancy commented 10 months ago

format_flexsections does not have a 'numsections' property. I do not know why you have it in your database, maybe the course was converted from another format initially?

I commented on the linked issue

t-schroeder commented 10 months ago

Sorry. I hadn't tested my assumption. I just saw that in our production system only a handful of courses had the "numsections" format option set and all of them were using the format flexsections. But I'm not able to reproduce getting a course into this state. The only other course format we have that actually legitimally uses the format option "numsections" is format_grid. But switching from that to flexsections removes the "numsections" option from the database again. So I'm closing this again.