Merge branch 'MDL-55254_m32v3' of https://github.com/sbourget/moodle

This commit is contained in:
David Monllao 2016-07-26 04:27:48 +08:00
commit fa2e488520
4 changed files with 15 additions and 1 deletions

View File

@ -724,6 +724,7 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
$context = context_course::instance($course->id);
$roleid = $this->assignUserCapability('moodle/course:view', $context->id);
$this->assignUserCapability('moodle/course:update', $context->id, $roleid);
$this->assignUserCapability('mod/data:view', $context->id, $roleid);
$conditions = array('course' => $course->id, 'section' => 2);
$DB->set_field('course_sections', 'summary', 'Text with iframe <iframe src="https://moodle.org"></iframe>', $conditions);

View File

@ -251,6 +251,18 @@ $capabilities = array(
'editingteacher' => CAP_ALLOW,
)
),
'mod/data:view' => array(
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => array(
'guest' => CAP_ALLOW,
'student' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
)
);

View File

@ -99,6 +99,7 @@ $string['data:viewanyrating'] = 'View total ratings that anyone received';
$string['data:viewentry'] = 'View entries';
$string['data:viewrating'] = 'View the total rating you received';
$string['data:writeentry'] = 'Write entries';
$string['data:view'] = 'View database activity';
$string['date'] = 'Date';
$string['dateentered'] = 'Date entered';
$string['defaultfielddelimiter'] = '(default is the comma character)';

View File

@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2016052300; // The current module version (Date: YYYYMMDDXX)
$plugin->version = 2016071500; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2016051900; // Requires this Moodle version
$plugin->component = 'mod_data'; // Full name of the plugin (used for diagnostics)
$plugin->cron = 0;