Skip to content

Commit

Permalink
WR422914 Subplugin refactor
Browse files Browse the repository at this point in the history
Complete refactor of the plugin to move reports and modules into
report and source subplugins respectively.
  • Loading branch information
SimonThornett committed Dec 3, 2024
1 parent 8dd7433 commit 9bac8fb
Show file tree
Hide file tree
Showing 260 changed files with 12,836 additions and 12,148 deletions.
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

0 comments on commit 9bac8fb

Please sign in to comment.