MDL-44070 Conditional availability enhancements (2): subsystem, API
This commit defines the new /availability root folder, with
/availability/classes, /availability/tests, and
/availability/condition where the condition plugins will live.
Condition plugin prefix is availability_, e.g. availability_date.
Rationale for this organisation:
1. I was originally going to put this in /lib/availability but
it has been pointed out that putting even more junk in lib
is probably bad.
2. 'availability' and 'condition' are the two names used in code
to refer to this system ($CFG->enableavailability).
3. The prefix has to be short enough to allow database tables
(although in practice I assume that condition plugins will not
normally contain database tables).
The new API includes a Boolean tree structure that controls the
availability of an item.
AMOS BEGIN
CPY [availabilityconditions,core_condition],[restrictaccess,core_availability]
CPY [enableavailability,core_condition],[enableavailability,core_availability]
CPY [configenableavailability,core_condition],[enableavailability_desc,core_availability]
AMOS END
2014-03-26 12:02:30 +00:00
< ? php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A 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 Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Strings for availability system .
*
* @ package core_availability
* @ copyright 2014 The Open University
* @ license http :// www . gnu . org / copyleft / gpl . html GNU GPL v3 or later
*/
$string [ 'accessrestrictions' ] = 'Access restrictions' ;
$string [ 'addrestriction' ] = 'Add restriction...' ;
$string [ 'and' ] = 'and' ;
$string [ 'condition_group' ] = 'Restriction set' ;
$string [ 'condition_group_info' ] = 'Add a set of nested restrictions to apply complex logic.' ;
2015-11-02 22:12:06 +01:00
$string [ 'enableavailability' ] = 'Enable restricted access' ;
MDL-44070 Conditional availability enhancements (2): subsystem, API
This commit defines the new /availability root folder, with
/availability/classes, /availability/tests, and
/availability/condition where the condition plugins will live.
Condition plugin prefix is availability_, e.g. availability_date.
Rationale for this organisation:
1. I was originally going to put this in /lib/availability but
it has been pointed out that putting even more junk in lib
is probably bad.
2. 'availability' and 'condition' are the two names used in code
to refer to this system ($CFG->enableavailability).
3. The prefix has to be short enough to allow database tables
(although in practice I assume that condition plugins will not
normally contain database tables).
The new API includes a Boolean tree structure that controls the
availability of an item.
AMOS BEGIN
CPY [availabilityconditions,core_condition],[restrictaccess,core_availability]
CPY [enableavailability,core_condition],[enableavailability,core_availability]
CPY [configenableavailability,core_condition],[enableavailability_desc,core_availability]
AMOS END
2014-03-26 12:02:30 +00:00
$string [ 'enableavailability_desc' ] = 'When enabled, this lets you set conditions (based on date, grade, or completion) that control whether an activity or resource can be accessed.' ;
$string [ 'error_list_nochildren' ] = 'Restriction sets should contain at least one condition.' ;
$string [ 'hidden_marker' ] = '(hidden otherwise)' ;
$string [ 'hidden_individual' ] = 'Hidden entirely if user does not meet this condition' ;
$string [ 'invalid' ] = 'Please set' ;
$string [ 'itemheading' ] = '{$a->number} {$a->type} restriction' ;
2014-05-14 11:47:53 +01:00
$string [ 'item_unknowntype' ] = 'These restrictions use a plugin which is no longer available (if it is okay to remove that restriction, delete it below)' ;
MDL-44070 Conditional availability enhancements (2): subsystem, API
This commit defines the new /availability root folder, with
/availability/classes, /availability/tests, and
/availability/condition where the condition plugins will live.
Condition plugin prefix is availability_, e.g. availability_date.
Rationale for this organisation:
1. I was originally going to put this in /lib/availability but
it has been pointed out that putting even more junk in lib
is probably bad.
2. 'availability' and 'condition' are the two names used in code
to refer to this system ($CFG->enableavailability).
3. The prefix has to be short enough to allow database tables
(although in practice I assume that condition plugins will not
normally contain database tables).
The new API includes a Boolean tree structure that controls the
availability of an item.
AMOS BEGIN
CPY [availabilityconditions,core_condition],[restrictaccess,core_availability]
CPY [enableavailability,core_condition],[enableavailability,core_availability]
CPY [configenableavailability,core_condition],[enableavailability_desc,core_availability]
AMOS END
2014-03-26 12:02:30 +00:00
$string [ 'shown_individual' ] = 'Displayed greyed-out if user does not meet this condition' ;
$string [ 'hide_verb' ] = 'Click to hide' ;
$string [ 'show_verb' ] = 'Click to show' ;
$string [ 'hidden_all' ] = 'Hidden entirely if user does not meet conditions' ;
$string [ 'shown_all' ] = 'Displayed greyed-out if user does not meet conditions' ;
$string [ 'label_multi' ] = 'Required restrictions' ;
$string [ 'label_sign' ] = 'Restriction type' ;
$string [ 'list_and' ] = 'All of:' ;
$string [ 'list_and_hidden' ] = 'All of (hidden otherwise):' ;
$string [ 'list_or' ] = 'Any of:' ;
$string [ 'list_or_hidden' ] = 'Any of (hidden otherwise):' ;
$string [ 'list_root_and' ] = 'Not available unless:' ;
$string [ 'list_root_and_hidden' ] = 'Not available (hidden) unless:' ;
$string [ 'list_root_or' ] = 'Not available unless any of:' ;
$string [ 'list_root_or_hidden' ] = 'Not available (hidden) unless any of:' ;
$string [ 'listheader_sign_before' ] = 'Student' ;
$string [ 'listheader_sign_pos' ] = 'must' ;
$string [ 'listheader_sign_neg' ] = 'must not' ;
$string [ 'listheader_single' ] = 'match the following' ;
$string [ 'listheader_multi_after' ] = 'of the following' ;
$string [ 'listheader_multi_and' ] = 'all' ;
$string [ 'listheader_multi_before' ] = 'match' ;
$string [ 'listheader_multi_or' ] = 'any' ;
$string [ 'manageplugins' ] = 'Manage restrictions' ;
$string [ 'missingplugin' ] = 'Missing restriction plugin' ;
$string [ 'or' ] = 'or' ;
$string [ 'restrictaccess' ] = 'Restrict access' ;
2014-10-13 18:05:02 +01:00
$string [ 'restrictbygroup' ] = 'Add group/grouping access restriction' ;
MDL-44070 Conditional availability enhancements (2): subsystem, API
This commit defines the new /availability root folder, with
/availability/classes, /availability/tests, and
/availability/condition where the condition plugins will live.
Condition plugin prefix is availability_, e.g. availability_date.
Rationale for this organisation:
1. I was originally going to put this in /lib/availability but
it has been pointed out that putting even more junk in lib
is probably bad.
2. 'availability' and 'condition' are the two names used in code
to refer to this system ($CFG->enableavailability).
3. The prefix has to be short enough to allow database tables
(although in practice I assume that condition plugins will not
normally contain database tables).
The new API includes a Boolean tree structure that controls the
availability of an item.
AMOS BEGIN
CPY [availabilityconditions,core_condition],[restrictaccess,core_availability]
CPY [enableavailability,core_condition],[enableavailability,core_availability]
CPY [configenableavailability,core_condition],[enableavailability_desc,core_availability]
AMOS END
2014-03-26 12:02:30 +00:00
$string [ 'setheading' ] = '{$a->number} Set of {$a->count} restriction(s)' ;
$string [ 'unknowncondition' ] = 'Unknown condition (deleted condition plugin)' ;