Skip to content

Commit

Permalink
Separate out 'Activity information' as a separate reset, new capabili…
Browse files Browse the repository at this point in the history
…ty 'changeactivitymeta' and fix the 'forum' module in the list of enabled plugins so that it can be enabled and the others disabled and 'showadditionalmoddata' still take effect.
  • Loading branch information
gjb2048 committed Oct 13, 2021
1 parent 90aff4b commit a9fa4de
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 55 deletions.
3 changes: 3 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Version 3.11.0.4 - TBR
6. Refactor - add stealth section template.
7. Refactor - add single section template.
8. Refactor - add section template.
9. Separate out 'Activity information' as a separate reset, new capability 'changeactivitymeta' and fix the
'forum' module in the list of enabled plugins so that it can be enabled and the others disabled and 'showadditionalmoddata'
still take effect.

Version 3.11.0.3 - 30/09/2021
-----------------------------
Expand Down
9 changes: 9 additions & 0 deletions db/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,14 @@
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
),

'format/topcoll:changeactivitymeta' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => array(
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
)
);
49 changes: 27 additions & 22 deletions lang/en/format_topcoll.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,31 @@
$string['showadditionalmoddata_help'] = 'Allow all users to see the activity deadline and users with grading permission to see the number of submissions on the course page for activities.';
$string['defaultshowadditionalmoddata'] = 'Default course \'Show additional information\' if not already set';
$string['defaultshowadditionalmoddatadesc'] = 'If an activity is set at site level (below) to show additional information then this setting states the default state of the course specific instance of it.';
$string['resetactivitymeta'] = 'Additional module information';
$string['resetallactivitymeta'] = 'All additional module information';
$string['resetactivitymeta_help'] = 'Resets the additional module information to follow the site default value.';
$string['resetallactivitymeta_help'] = 'Resets all the additional module information to follow the site default value.';

$string['coursesectionactivityfurtherinformation'] = 'Course page further information';
$string['coursesectionactivityfurtherinformationassign'] = 'Show assignment information';
$string['coursesectionactivityfurtherinformationassigndesc'] = 'Show assignment information. For teachers / admins, show number of submissions.';
$string['coursesectionactivityfurtherinformationquiz'] = 'Show quiz information';
$string['coursesectionactivityfurtherinformationquizdesc'] = 'Show quiz information. For teachers / admins, show number of submissions.';
$string['coursesectionactivityfurtherinformationchoice'] = 'Show choice information';
$string['coursesectionactivityfurtherinformationchoicedesc'] = 'Show choice information. For teachers / admins, show number of submissions.';
$string['coursesectionactivityfurtherinformationfeedback'] = 'Show feedback information';
$string['coursesectionactivityfurtherinformationfeedbackdesc'] = 'Show feedback information. For teachers / admins, show number of submissions.';
$string['coursesectionactivityfurtherinformationforum'] = 'Show forum information';
$string['coursesectionactivityfurtherinformationforumdesc'] = 'Show forum information. For teachers / admins, show number of contributions when whole forum grading is on.';
$string['coursesectionactivityfurtherinformationlesson'] = 'Show lesson information';
$string['coursesectionactivityfurtherinformationlessondesc'] = 'Show lesson information. For teachers / admins, show number of submissions.';
$string['coursesectionactivityfurtherinformationdata'] = 'Show database information';
$string['coursesectionactivityfurtherinformationdatadesc'] = 'Show data information. For teachers / admins, show number of submissions.';

$string['cachedef_activitystudentrolescache'] = 'Caches the student roles.';
$string['cachedef_activitymodulecountcache'] = 'Caches the number of students who can access a given module on a given course.';
$string['cachedef_activitystudentscache'] = 'Caches the ids of the students on a given course.';
$string['cannotgetmodulecountcachelock'] = 'Cannot get module count cache lock for course id {$a}.';

// Colour enhancement - Moodle Tracker CONTRIB-3529.
$string['setcolour'] = 'Colour';
Expand Down Expand Up @@ -177,7 +202,7 @@
$string['resettogglealignment'] = 'Toggle alignment';
$string['resetalltogglealignment'] = 'Toggle alignments';
$string['resettogglealignment_help'] = 'Resets the toggle alignment to follow the site default value.';
$string['resetalltogglealignment_help'] = 'Resets the toggle alignment to follow the site default value.';
$string['resetalltogglealignment_help'] = 'Resets all the toggle alignment to follow the site default value.';

// Icon position - CONTRIB-4470.
$string['settoggleiconposition'] = 'Icon position';
Expand Down Expand Up @@ -365,6 +390,7 @@
$string['topcoll:changecolour'] = 'Change or reset the colour';
$string['topcoll:changetogglealignment'] = 'Change or reset the toggle alignment';
$string['topcoll:changetoggleiconset'] = 'Change or reset the toggle icon set';
$string['topcoll:changeactivitymeta'] = 'Change or reset the activity meta';

// Instructions.
$string['instructions'] = 'Instructions: Clicking on the section name will show / hide the section.';
Expand All @@ -391,27 +417,6 @@
$string['xsubmitted'] = '{$a->completed} submitted';
$string['xungraded'] = '{$a} ungraded';

$string['coursesectionactivityfurtherinformation'] = 'Course page further information';
$string['coursesectionactivityfurtherinformationassign'] = 'Show assignment information';
$string['coursesectionactivityfurtherinformationassigndesc'] = 'Show assignment information. For teachers / admins, show number of submissions.';
$string['coursesectionactivityfurtherinformationquiz'] = 'Show quiz information';
$string['coursesectionactivityfurtherinformationquizdesc'] = 'Show quiz information. For teachers / admins, show number of submissions.';
$string['coursesectionactivityfurtherinformationchoice'] = 'Show choice information';
$string['coursesectionactivityfurtherinformationchoicedesc'] = 'Show choice information. For teachers / admins, show number of submissions.';
$string['coursesectionactivityfurtherinformationfeedback'] = 'Show feedback information';
$string['coursesectionactivityfurtherinformationfeedbackdesc'] = 'Show feedback information. For teachers / admins, show number of submissions.';
$string['coursesectionactivityfurtherinformationforum'] = 'Show forum information';
$string['coursesectionactivityfurtherinformationforumdesc'] = 'Show forum information. For teachers / admins, show number of contributions when whole forum grading is on.';
$string['coursesectionactivityfurtherinformationlesson'] = 'Show lesson information';
$string['coursesectionactivityfurtherinformationlessondesc'] = 'Show lesson information. For teachers / admins, show number of submissions.';
$string['coursesectionactivityfurtherinformationdata'] = 'Show database information';
$string['coursesectionactivityfurtherinformationdatadesc'] = 'Show data information. For teachers / admins, show number of submissions.';

$string['cachedef_activitystudentrolescache'] = 'Caches the student roles.';
$string['cachedef_activitymodulecountcache'] = 'Caches the number of students who can access a given module on a given course.';
$string['cachedef_activitystudentscache'] = 'Caches the ids of the students on a given course.';
$string['cannotgetmodulecountcachelock'] = 'Cannot get module count cache lock for course id {$a}.';

// Duplicate section.
$string['creatingsection'] = 'Creating new section';
$string['duplicate'] = 'Duplicate';
Expand Down
Loading

0 comments on commit a9fa4de

Please sign in to comment.