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

WR422914 Subplugin refactor #161

Draft
wants to merge 5 commits into
base: MOODLE_403_STABLE
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,36 @@ PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>.

## Version 2024040300 refactor ##

Post version `2024040300` this plugin was completely refactored to support more reports and modules.

Each report is now a subplugin within the `report` directory
The subplugins report class should extend from the \local_assessfreq\report_base class

Capability checks were reworked to be relative to the location that they are being loading from. The initial version
has the following capabilities:

- local/assessfreq:view
- assessfreqreport/activity_dashboard:view
- assessfreqreport/activities_in_progress:view
- assessfreqreport/heatmap:view
- assessfreqreport/summary_graphs:view

however each future subplugin can define their own access checks by using the abstract `has_access` method.
Accessing the reports from a course (link now added to the course report screen) will do the capability check at the
course context level, otherwise system level will be used.

The reports themselves should also be restricted based on the $PAGE->course if it is not the SITEID as this is set
during the intial load of the index.php file.

Each module is now a subplugin within the `source` directory
The subplugins source class should extend from the \local_assessfreq\source_base class


Along with general performance improvements additional settings have been added to reduce the load on the reports:

* Assign and quiz sources have a setting called "windowexclusion" which will allow the admin to specify a length of time to exclude long running assessments
* The activity dashboard has "trendlimit" and "trendcount" settings to reduce the number of trend records it attempts to load
* User tables have been update to only return users that have attempt data
9 changes: 0 additions & 9 deletions amd/build/calendar.min.js

This file was deleted.

1 change: 0 additions & 1 deletion amd/build/calendar.min.js.map

This file was deleted.

10 changes: 0 additions & 10 deletions amd/build/chart_data.min.js

This file was deleted.

1 change: 0 additions & 1 deletion amd/build/chart_data.min.js.map

This file was deleted.

Loading
Loading