MDL-15768 - added general capability for exporting any content to portfolio
This commit is contained in:
@@ -103,6 +103,7 @@ $string['overriderolesin'] = 'Override roles in $a';
|
||||
$string['overrides'] = 'Overrides';
|
||||
$string['permissions'] = 'Permissions';
|
||||
$string['potentialusers'] = '$a potential users';
|
||||
$string['portfolio:export'] = 'Export to portfolios';
|
||||
$string['prevent'] = 'Prevent';
|
||||
$string['prohibit'] = 'Prohibit';
|
||||
$string['question:add'] = 'Add new questions';
|
||||
|
||||
@@ -1273,6 +1273,18 @@ $moodle_capabilities = array(
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
)
|
||||
),
|
||||
|
||||
'moodle/portfolio:export' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'user' => CAP_ALLOW,
|
||||
'student' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
+1
-2
@@ -239,12 +239,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($userindexpage) && $user->id == $USER->id && !empty($CFG->portfolioenabled)) {
|
||||
if (empty($userindexpage) && $user->id == $USER->id && !empty($CFG->portfolioenabled) && has_capability('moodle/portfolio:export', get_system_context())) {
|
||||
|
||||
/// Portfolio tab
|
||||
require_once($CFG->libdir . '/portfoliolib.php');
|
||||
if (portfolio_instances(true, false)) {
|
||||
// @todo penny permissions check?
|
||||
$toprow[] = new tabobject('portfolios', $CFG->wwwroot .'/user/portfolio.php', get_string('portfolios', 'portfolio'));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
// This is compared against the values stored in the database to determine
|
||||
// whether upgrades should be performed (see lib/db/*.php)
|
||||
|
||||
$version = 2008080701; // YYYYMMDD = date of the last version bump
|
||||
$version = 2008081200; // YYYYMMDD = date of the last version bump
|
||||
// XX = daily increments
|
||||
|
||||
$release = '2.0 dev (Build: 20080812)'; // Human-friendly version name
|
||||
|
||||
Reference in New Issue
Block a user