-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The original target of this work was the normalisation of breadcrumbs. At the end of this work, the only aspect that has not yet been definitively put in order is the normalisation of breadcrumbs. The MDL-80602 solution will probably show how to deal with this problem correctly. Using the classic theme, all pages in the module when selected are now highlighted in bold in the navigation block and the administration block. Surveypro logical structure is, as known: [Spro area] surveypro (managed in view.php) - [Area section] cover - [Area section] submissionslist - [Area section] submissionform - [Area section] searchsubmissions [Spro area] layout (managed in layout.php) - [Area section] itemslist - [Area section] itemsetup - [Area section] branchingvalidation - [Area section] preview [Spro area] reports (managed in reports.php) - [report] attachement overview - [report] frequency distribution - [report] late users - [report] responses per user - [report] users per count of responses [Spro area] tools (managed in tools.php) - [Area section] export - [Area section] import [Spro area] user templates (managed in utemplates.php) - [Area section] manage - [Area section] save - [Area section] import - [Area section] apply [Spro area] master templates (managed in mtemplates.php) - [Area section] save - [Area section] apply Page highlighting in the two blocks is extended to each section of each area. The links of the blocks in 'standard' conditions refer to each area in its default section. For the definition of the area default section I introduced the function: surveypro_get_defaults_section_per_area on lib.php. To realise this highlighting I needed to introduce the two variables $area and $section throughout all the code. While writing this code, I realised that the reports listed in the page of [area]: surveypro [section]: cover were different from those listed in the jump menu of [area]: report. I therefore standardised the procedure for identifying the reports allowed based on the user's capability. The definition is in $reportman->is_report_allowed(). In order to prevent any past or future errors from introducing data into the reports that the generic user is not supposed to see (GDPR, EU regulation 2016/679), I introduced at the level of reportbase class the property $onlypersonaldata. This property is true if the user does not have the capability 'mod/surveypro:accessreports' but does have the capability 'mod/surveypro:accessownreports'. A report, with this correction, is shown IF AND ONLY IF the user requesting it has one of these two capabilities: 'mod/surveypro:accessreports' or 'mod/surveypro:accessownreports'. The truth table for accessing reports is the following: | | accessownreports: yes | accessownreports: no | | accessreports: yes | display general report | display general report | | accessreports: no | $onlypersonaldata = true | reports are denied | If $onlypersonaldata == true, a report is shown using as referring database ONLY THE SUBMISSIONS OF THE USER. Because of the introduction of $onlypersonaldata I removed the method $reportman->get_hasstudentreport() as it has not any more a meaning. Each report is accessible to students. In the worst case students will see the report of their own submissions only if $onlypersonaldata = true.
- Loading branch information
Showing
36 changed files
with
557 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.