Skip to content

Releases: bdecentgmbh/moodle-availability_sectioncompleted

Version 1.2

Choose a tag to compare

@stefanscholz stefanscholz released this 14 Oct 15:48
7e61107

Restriction by other section completion 1.2 supports Moodle 4.5 to 5.3. It fixes a performance problem that could keep badge and other background tasks running for hours. Teachers get more control over what counts as "section completed", and the plugin now works with subsections.

Before you upgrade

  • Moodle 4.5 or later is required. Sites on older versions should stay on 1.1.
  • Subsections now count for their section. A restriction on a section is now only met when the activities in its subsections are completed too. Before 1.2, these activities were ignored.
  • The restriction is only offered where it can work. It appears in "Add restriction…" when the course tracks completion. The section list only shows sections with completion-tracked activities.
    • An existing restriction on a section that has no tracked activities never restricted anything.
    • When you edit such a restriction, choose a section again or remove it.

New

  • At least a number of activities. Require all of a section's completion-tracked activities, as before, or only a minimum number of them.
  • Pass or fail grade. Require the activities to be complete with pass grade, or with fail grade, for example to open extra help after a failed quiz. Activities completed without a grade, such as pages, count as completed, but neither as passed nor as failed.
  • Progress for students. Students who don't meet the restriction see how far they are, for example "Week 1 completed. (2 of 3 so far)".
  • Unlocked content appears immediately. When students mark the last activity they need as done, the course page reloads and the newly available content shows up.
  • Subsections (Moodle 4.5+). Subsections can be chosen as "Section › Subsection".
    • "Previous section" works for activities inside subsections.
    • A section can't be restricted by itself, its own subsections or its parent section, because that would lock students out.

Fixed

  • Performance (#14). Checking the restriction for another user, as badge, forum, completion and report tasks do, no longer rebuilds the course cache for every user. Completion is now read in one query per check. With chained section restrictions, badge tasks could previously take hours.
  • Backup and restore. Restored and imported courses now point the restriction to their own sections. Before, a restored restriction silently stopped working.
  • Error message. The form showed an unknown string instead of an error message when no section was selected.
  • Deleted sections. A restriction on a deleted section, or on a section without tracked activities, doesn't restrict anything. This now also holds when the restriction is inverted ("must not").
  • Reports (#10). Reports for other users use that user's completion. This was fixed in 1.1 and is now covered by tests.
  • PHP 8.4. No more deprecation warnings.

Quality

  • Tests. PHPUnit tests and Behat scenarios, run for every change on Moodle 4.5, 5.0, 5.1, 5.2 and 5.3.
  • Security review. Reviewed with MDL Shield: grade A, with no security findings.

Thanks

To Nicolas Jacquemet for finding the performance problem and fixing it (#14, #15), and to everyone who reported issues and ideas: @suvires (#10), @hamzaelbarmaki1994 (#12), @ltwebster (#13) and @nicolasjacquemet (#14).

Full changelog: v1.1-r1...v1.2-r1

Version 1.1

Choose a tag to compare

@stefanscholz stefanscholz released this 11 Apr 10:26
702c339

Moodle 4.5 compatibility

Version 1.05

Choose a tag to compare

@stefanscholz stefanscholz released this 04 Mar 09:53
51b033c
  • Compatibility for Moodle 4.1-4.3
  • New feature: Added "previous section" option
  • Bugfix: #6 Mod Assign error
  • Improvement: #3 Performance: Do we need to load the section from the database?

Version 1.03

Choose a tag to compare

@stefanscholz stefanscholz released this 28 May 20:32
  • Coding style improvements
  • Behat test added
  • Unit tests added

Version 1.02

Choose a tag to compare

@stefanscholz stefanscholz released this 17 May 18:07

Moodle 3.11 support

Version 1.01

Choose a tag to compare

@stefanscholz stefanscholz released this 17 May 18:03

Minor fixes:

  • Code checker fixes
  • Language strings
  • Behat feature test added

Version 1.0

Choose a tag to compare

@stefanscholz stefanscholz released this 30 Apr 20:24
c616df8

Initial, fully functional release