Compare commits
93 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e619076cb | |||
| 6a17f29147 | |||
| cafc042bf6 | |||
| d2e303436b | |||
| fb0d5acf4c | |||
| 376d34142f | |||
| 8eb7f7e366 | |||
| c3018e9ee7 | |||
| 996c94fd08 | |||
| fd7c3c4834 | |||
| c3b7f2f974 | |||
| 8589fbda8c | |||
| f1a681c983 | |||
| 8a66849a57 | |||
| 20318b8b7d | |||
| d84d6f57a3 | |||
| 01ec0ee85b | |||
| 91b23a2caa | |||
| 053a433d74 | |||
| b1a2e67326 | |||
| 40553ed459 | |||
| 9127c17778 | |||
| 8f28fbee11 | |||
| be7bda671e | |||
| c58101cde3 | |||
| 6e5b0b5c20 | |||
| c201456f20 | |||
| 02b3d5aacf | |||
| dde1ead9fe | |||
| 3915147b9b | |||
| 55c7fe15a0 | |||
| 82dba4d510 | |||
| 9ecff3766a | |||
| 4fb85c9c9f | |||
| 6ea5922916 | |||
| 287e8f16e6 | |||
| 846422a90f | |||
| ea6621e00e | |||
| 44ffa8a801 | |||
| a1d5911159 | |||
| c38e38d6b4 | |||
| f5b5f97f56 | |||
| 5528302282 | |||
| 995f0a3a58 | |||
| 894ebe38a2 | |||
| 0609febf16 | |||
| 1d6c1cc0ae | |||
| d783f12861 | |||
| f324c2d16c | |||
| 5486975097 | |||
| d4b6b26f4f | |||
| 996dd0b0b9 | |||
| b44588aaba | |||
| 95fbf4d8e5 | |||
| 6f78024717 | |||
| 7b2e257157 | |||
| bb344d07e7 | |||
| 959c2cb84e | |||
| ee7b438f61 | |||
| dc0241306b | |||
| 89ce4db476 | |||
| 55a1405a84 | |||
| 57b920b8b7 | |||
| bae07c1bfb | |||
| 4f7016f2da | |||
| 7af8441403 | |||
| 7ba95339a6 | |||
| b6c37f2926 | |||
| b8408c3582 | |||
| fb625069cf | |||
| d4297993a4 | |||
| 2104324ded | |||
| 153b2cb484 | |||
| c72adaa749 | |||
| 3c2ed1533c | |||
| b9518bf811 | |||
| 4f0f1bd84f | |||
| e2ef786003 | |||
| 5b134b5de5 | |||
| 62c4da281a | |||
| 4c27f858b9 | |||
| 6ced5c26d0 | |||
| ccd504115d | |||
| 647e5d8021 | |||
| 6a7042d980 | |||
| 7532b032bb | |||
| b5c1d17da5 | |||
| 56a7d91066 | |||
| 93d636a95b | |||
| 7ca771e4ac | |||
| 6e7e7e1241 | |||
| 8b43f32f8c | |||
| a30eb7d16c |
+9
-1
@@ -15,6 +15,7 @@ dist: xenial
|
||||
|
||||
services:
|
||||
- mysql
|
||||
- docker
|
||||
|
||||
php:
|
||||
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
|
||||
@@ -61,8 +62,9 @@ cache:
|
||||
- $HOME/.npm
|
||||
|
||||
before_install:
|
||||
- docker run -d -p 127.0.0.1:8080:80 --name exttests moodlehq/moodle-exttests
|
||||
# Avoid IPv6 default binding as service (causes redis not to start).
|
||||
sudo service redis-server start --bind 127.0.0.1
|
||||
- sudo service redis-server start --bind 127.0.0.1
|
||||
|
||||
install:
|
||||
- >
|
||||
@@ -169,6 +171,10 @@ before_script:
|
||||
-e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
|
||||
-e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
|
||||
config.php ;
|
||||
# Enable test external resources
|
||||
sed -i \
|
||||
-e "/require_once/i \\define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://127.0.0.1:8080');" \
|
||||
config.php ;
|
||||
# Redis cache store tests
|
||||
sed -i \
|
||||
-e "/require_once/i \\define('TEST_CACHESTORE_REDIS_TESTSERVERS', '127.0.0.1');" \
|
||||
@@ -248,6 +254,8 @@ script:
|
||||
if [ "$TASK" = 'PHPUNIT' ];
|
||||
then
|
||||
vendor/bin/phpunit --fail-on-risky --disallow-test-output --verbose;
|
||||
EXTTESTS_HITS=$(docker logs exttests 2>&1 | grep -Fv -e 'AH00558' -e '[pid 1]' | wc -l)
|
||||
echo -e "\nTest local resources number of hits: ${EXTTESTS_HITS}.\n"
|
||||
fi
|
||||
|
||||
- >
|
||||
|
||||
@@ -645,14 +645,14 @@ if ($hassiteconfig) {
|
||||
|
||||
// Content bank content types.
|
||||
if ($hassiteconfig) {
|
||||
$ADMIN->add('modules', new admin_category('contenbanksettings', new lang_string('contentbank')));
|
||||
$ADMIN->add('modules', new admin_category('contentbanksettings', new lang_string('contentbank')));
|
||||
$temp = new admin_settingpage('managecontentbanktypes', new lang_string('managecontentbanktypes'));
|
||||
$temp->add(new admin_setting_managecontentbankcontenttypes());
|
||||
$ADMIN->add('contenbanksettings', $temp);
|
||||
$ADMIN->add('contentbanksettings', $temp);
|
||||
$plugins = core_plugin_manager::instance()->get_plugins_of_type('contenttype');
|
||||
foreach ($plugins as $plugin) {
|
||||
/** @var \core\plugininfo\contentbank $plugin */
|
||||
$plugin->load_settings($ADMIN, 'contenbanksettings', $hassiteconfig);
|
||||
$plugin->load_settings($ADMIN, 'contentbanksettings', $hassiteconfig);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -261,10 +261,28 @@ if ($hassiteconfig) {
|
||||
$temp->add($setting);
|
||||
|
||||
// See {@link https://gdpr-info.eu/art-8-gdpr/}.
|
||||
// See {@link https://www.betterinternetforkids.eu/web/portal/practice/awareness/detail?articleId=3017751}.
|
||||
$ageofdigitalconsentmap = implode(PHP_EOL, [
|
||||
'*, 16',
|
||||
'AT, 14',
|
||||
'BE, 13',
|
||||
'BG, 14',
|
||||
'CY, 14',
|
||||
'CZ, 15',
|
||||
'DK, 13',
|
||||
'EE, 13',
|
||||
'ES, 14',
|
||||
'FI, 13',
|
||||
'FR, 15',
|
||||
'GB, 13',
|
||||
'GR, 15',
|
||||
'IT, 14',
|
||||
'LT, 14',
|
||||
'LV, 13',
|
||||
'MT, 13',
|
||||
'NO, 13',
|
||||
'PT, 13',
|
||||
'SE, 13',
|
||||
'US, 13'
|
||||
]);
|
||||
$setting = new admin_setting_agedigitalconsentmap('agedigitalconsentmap',
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ echo $OUTPUT->header();
|
||||
// Output the search form.
|
||||
echo $OUTPUT->render_from_template('core_admin/tasklogs', (object) [
|
||||
'action' => $pageurl->out(),
|
||||
'filter' => $filter,
|
||||
'filter' => htmlentities($filter),
|
||||
'resultfilteroptions' => [
|
||||
(object) [
|
||||
'value' => -1,
|
||||
|
||||
@@ -164,6 +164,8 @@ if ($options['install']) {
|
||||
mtrace("Acceptance tests site installed");
|
||||
}
|
||||
|
||||
// Note: Do not build the themes here. This is done during the 'enable' stage.
|
||||
|
||||
} else if ($options['drop']) {
|
||||
// Ensure no tests are running.
|
||||
test_lock::acquire('behat');
|
||||
@@ -182,6 +184,10 @@ if ($options['install']) {
|
||||
// Enable test mode.
|
||||
behat_util::start_test_mode($options['add-core-features-to-theme'], $options['optimize-runs'], $parallel, $run);
|
||||
|
||||
// Themes are only built in the 'enable' command.
|
||||
behat_util::build_themes();
|
||||
mtrace("Testing environment themes built");
|
||||
|
||||
// This is only displayed once for parallel install.
|
||||
if (empty($run)) {
|
||||
// Notify user that 2.5 profile has been converted to 3.5.
|
||||
|
||||
@@ -41,5 +41,8 @@ function xmldb_tool_cohortroles_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2020020600, 'tool', 'cohortroles');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -41,5 +41,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ $string['customlang:view'] = 'View local translation';
|
||||
$string['filter'] = 'Filter strings';
|
||||
$string['filtercomponent'] = 'Show strings of these components';
|
||||
$string['filtercustomized'] = 'Customised only';
|
||||
$string['filtermodified'] = 'Modified only';
|
||||
$string['filtermodified'] = 'Modified in this session only';
|
||||
$string['filteronlyhelps'] = 'Help only';
|
||||
$string['filtershowstrings'] = 'Show strings';
|
||||
$string['filterstringid'] = 'String identifier';
|
||||
|
||||
@@ -322,10 +322,29 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2019121700) {
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2020061501) {
|
||||
|
||||
// Define field commentsformat to be added to tool_dataprivacy_request.
|
||||
$table = new xmldb_table('tool_dataprivacy_request');
|
||||
$field = new xmldb_field('commentsformat', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'comments');
|
||||
|
||||
// Conditionally launch add field commentsformat.
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
|
||||
// Define field dpocommentformat to be added to tool_dataprivacy_request.
|
||||
$field = new xmldb_field('dpocommentformat', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'dpocomment');
|
||||
|
||||
// Conditionally launch add field dpocommentformat.
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
|
||||
// Define field systemapproved to be added to tool_dataprivacy_request.
|
||||
$table = new xmldb_table('tool_dataprivacy_request');
|
||||
$field = new xmldb_field('systemapproved', XMLDB_TYPE_INTEGER, '4', null, XMLDB_NOTNULL, null, '0', 'dpocommentformat');
|
||||
|
||||
// Conditionally launch add field systemapproved.
|
||||
@@ -334,7 +353,7 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
|
||||
}
|
||||
|
||||
// Dataprivacy savepoint reached.
|
||||
upgrade_plugin_savepoint(true, 2019121700, 'tool', 'dataprivacy');
|
||||
upgrade_plugin_savepoint(true, 2020061501, 'tool', 'dataprivacy');
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$plugin->version = 2020061500;
|
||||
$plugin->version = 2020061501;
|
||||
$plugin->requires = 2020060900;
|
||||
$plugin->component = 'tool_dataprivacy';
|
||||
|
||||
@@ -45,5 +45,8 @@ function xmldb_tool_log_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,5 +46,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,5 +46,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
define ("tool_lp/dialogue",["core/yui"],function(a){var b=function(b,c,d,e,f){this.yuiDialogue=null;var g=this;if("undefined"==typeof f){f=!1}a.use("moodle-core-notification","timers",function(){var h="480px";if(f){h="800px"}g.yuiDialogue=new M.core.dialogue({headerContent:b,bodyContent:c,draggable:!0,visible:!1,center:!0,modal:!0,width:h});g.yuiDialogue.after("visibleChange",function(b){if(b.newVal){if("undefined"!=typeof d){a.soon(function(){d(g);g.yuiDialogue.centerDialogue()})}}else{if("undefined"!=typeof e){a.soon(function(){e(g)})}}});g.yuiDialogue.show()})};b.prototype.close=function(){this.yuiDialogue.hide();this.yuiDialogue.destroy()};b.prototype.getContent=function(){return this.yuiDialogue.bodyNode.getDOMNode()};return b});
|
||||
define ("tool_lp/dialogue",["core/yui"],function(a){var b=function(b,c,d,e,f){M.util.js_pending("tool_lp/dialogue:dialogue");this.yuiDialogue=null;var g=this;if("undefined"==typeof f){f=!1}a.use("moodle-core-notification","timers",function(){var h="480px";if(f){h="800px"}g.yuiDialogue=new M.core.dialogue({headerContent:b,bodyContent:c,draggable:!0,visible:!1,center:!0,modal:!0,width:h});g.yuiDialogue.before("visibleChange",function(){M.util.js_pending("tool_lp/dialogue:before:visibleChange")});g.yuiDialogue.after("visibleChange",function(b){if(b.newVal){if("undefined"!=typeof d){a.soon(function(){d(g);g.yuiDialogue.centerDialogue();M.util.js_complete("tool_lp/dialogue:before:visibleChange")})}else{M.util.js_complete("tool_lp/dialogue:before:visibleChange")}}else{if("undefined"!=typeof e){a.soon(function(){e(g);M.util.js_complete("tool_lp/dialogue:before:visibleChange")})}else{M.util.js_complete("tool_lp/dialogue:before:visibleChange")}}});g.yuiDialogue.show();M.util.js_complete("tool_lp/dialogue:dialogue")})};b.prototype.close=function(){this.yuiDialogue.hide();this.yuiDialogue.destroy()};b.prototype.getContent=function(){return this.yuiDialogue.bodyNode.getDOMNode()};return b});
|
||||
//# sourceMappingURL=dialogue.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,2 +1,2 @@
|
||||
define ("tool_lp/grade_dialogue",["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]);this._ratingOptions=a};g.prototype=Object.create(e.prototype);g.prototype._popup=null;g.prototype._ratingOptions=null;g.prototype._afterRender=function(){var b=this._find("[data-action=\"rate\"]"),c=this._find("[name=\"rating\"]"),d=this._find("[name=\"comment\"]");this._find("[data-action=\"cancel\"]").click(function(a){a.preventDefault();this._trigger("cancelled");this.close()}.bind(this));c.change(function(){var c=a(this);if(!c.val()){b.prop("disabled",!0)}else{b.prop("disabled",!1)}}).change();b.click(function(a){a.preventDefault();var b=c.val();if(!b){return}this._trigger("rated",{rating:b,note:d.val()});this.close()}.bind(this))};g.prototype.close=function(){this._popup.close();this._popup=null};g.prototype.display=function(){return a.when(f.get_string("rate","tool_lp"),this._render()).then(function(a,b){this._popup=new d(a,b[0],this._afterRender.bind(this));return this._popup}.bind(this)).catch(b.exception)};g.prototype._find=function(b){return a(this._popup.getContent()).find(b)};g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)};return g});
|
||||
define ("tool_lp/grade_dialogue",["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]);this._ratingOptions=a};g.prototype=Object.create(e.prototype);g.prototype._popup=null;g.prototype._ratingOptions=null;g.prototype._afterRender=function(){var b=this._find("[data-action=\"rate\"]"),c=this._find("[name=\"rating\"]"),d=this._find("[name=\"comment\"]");this._find("[data-action=\"cancel\"]").click(function(a){a.preventDefault();this._trigger("cancelled");this.close()}.bind(this));c.change(function(){var c=a(this);if(!c.val()){b.prop("disabled",!0)}else{b.prop("disabled",!1)}}).change();b.click(function(a){a.preventDefault();var b=c.val();if(!b){return}this._trigger("rated",{rating:b,note:d.val()});this.close()}.bind(this))};g.prototype.close=function(){this._popup.close();this._popup=null};g.prototype.display=function(){M.util.js_pending("tool_lp/grade_dialogue:display");return a.when(f.get_string("rate","tool_lp"),this._render()).then(function(a,b){this._popup=new d(a,b[0],function(){this._afterRender();M.util.js_complete("tool_lp/grade_dialogue:display")}.bind(this));return this._popup}.bind(this)).catch(b.exception)};g.prototype._find=function(b){return a(this._popup.getContent()).find(b)};g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)};return g});
|
||||
//# sourceMappingURL=grade_dialogue.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
define ("tool_lp/grade_user_competency_inline",["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length){throw new Error("Could not find the trigger")}this._scaleId=c;this._competencyId=d;this._userId=e;this._planId=g;this._courseId=h;this._chooseStr=i;this._setUp();j.click(function(a){a.preventDefault();this._dialogue.display()}.bind(this));if(this._planId){this._methodName="core_competency_grade_competency_in_plan";this._args={competencyid:this._competencyId,planid:this._planId}}else if(this._courseId){this._methodName="core_competency_grade_competency_in_course";this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}}else{this._methodName="core_competency_grade_competency";this._args={userid:this._userId,competencyid:this._competencyId}}};h.prototype=Object.create(f.prototype);h.prototype._setUp=function(){var a=[],d=this,f=g.get_values(d._scaleId);f.then(function(b){a.push({value:"",name:d._chooseStr});for(var c=0,e;c<b.length;c++){e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){a.on("rated",function(a,e){var f=d._args;f.grade=e.rating;f.note=e.note;c.call([{methodname:d._methodName,args:f,done:function done(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])});return a}).then(function(a){d._dialogue=a}).fail(b.exception)};h.prototype._scaleId=null;h.prototype._competencyId=null;h.prototype._userId=null;h.prototype._planId=null;h.prototype._courseId=null;h.prototype._chooseStr=null;h.prototype._dialogue=null;return h});
|
||||
define ("tool_lp/grade_user_competency_inline",["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length){throw new Error("Could not find the trigger")}this._scaleId=c;this._competencyId=d;this._userId=e;this._planId=g;this._courseId=h;this._chooseStr=i;this._setUp();j.click(function(a){a.preventDefault();this._dialogue.display()}.bind(this));if(this._planId){this._methodName="core_competency_grade_competency_in_plan";this._args={competencyid:this._competencyId,planid:this._planId}}else if(this._courseId){this._methodName="core_competency_grade_competency_in_course";this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}}else{this._methodName="core_competency_grade_competency";this._args={userid:this._userId,competencyid:this._competencyId}}};h.prototype=Object.create(f.prototype);h.prototype._setUp=function(){var a=[],d=this;M.util.js_pending("tool_lp/grade_user_competency_inline:_setUp");var f=g.get_values(d._scaleId);f.then(function(b){a.push({value:"",name:d._chooseStr});for(var c=0,e;c<b.length;c++){e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){a.on("rated",function(a,e){var f=d._args;f.grade=e.rating;f.note=e.note;c.call([{methodname:d._methodName,args:f,done:function done(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])});return a}).then(function(a){d._dialogue=a;M.util.js_complete("tool_lp/grade_user_competency_inline:_setUp")}).fail(b.exception)};h.prototype._scaleId=null;h.prototype._competencyId=null;h.prototype._userId=null;h.prototype._planId=null;h.prototype._courseId=null;h.prototype._chooseStr=null;h.prototype._dialogue=null;return h});
|
||||
//# sourceMappingURL=grade_user_competency_inline.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -35,6 +35,8 @@ define(['core/yui'], function(Y) {
|
||||
* @param {Boolean} wide Specify we want an extra wide dialogue (the size is standard, but wider than the default).
|
||||
*/
|
||||
var dialogue = function(title, content, afterShow, afterHide, wide) {
|
||||
M.util.js_pending('tool_lp/dialogue:dialogue');
|
||||
|
||||
this.yuiDialogue = null;
|
||||
var parent = this;
|
||||
|
||||
@@ -59,6 +61,10 @@ define(['core/yui'], function(Y) {
|
||||
width: width
|
||||
});
|
||||
|
||||
parent.yuiDialogue.before('visibleChange', function() {
|
||||
M.util.js_pending('tool_lp/dialogue:before:visibleChange');
|
||||
});
|
||||
|
||||
parent.yuiDialogue.after('visibleChange', function(e) {
|
||||
if (e.newVal) {
|
||||
// Delay the callback call to the next tick, otherwise it can happen that it is
|
||||
@@ -67,18 +73,25 @@ define(['core/yui'], function(Y) {
|
||||
Y.soon(function() {
|
||||
afterShow(parent);
|
||||
parent.yuiDialogue.centerDialogue();
|
||||
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
|
||||
});
|
||||
} else {
|
||||
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
|
||||
}
|
||||
} else {
|
||||
if ((typeof afterHide !== 'undefined')) {
|
||||
Y.soon(function() {
|
||||
afterHide(parent);
|
||||
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
|
||||
});
|
||||
} else {
|
||||
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
parent.yuiDialogue.show();
|
||||
M.util.js_complete('tool_lp/dialogue:dialogue');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -102,6 +102,7 @@ define(['jquery',
|
||||
* @return {Promise}
|
||||
*/
|
||||
Grade.prototype.display = function() {
|
||||
M.util.js_pending('tool_lp/grade_dialogue:display');
|
||||
return $.when(
|
||||
Str.get_string('rate', 'tool_lp'),
|
||||
this._render()
|
||||
@@ -110,7 +111,10 @@ define(['jquery',
|
||||
this._popup = new Dialogue(
|
||||
title,
|
||||
templateResult[0],
|
||||
this._afterRender.bind(this)
|
||||
function() {
|
||||
this._afterRender();
|
||||
M.util.js_complete('tool_lp/grade_dialogue:display');
|
||||
}.bind(this)
|
||||
);
|
||||
|
||||
return this._popup;
|
||||
|
||||
@@ -94,6 +94,7 @@ define(['jquery',
|
||||
var options = [],
|
||||
self = this;
|
||||
|
||||
M.util.js_pending('tool_lp/grade_user_competency_inline:_setUp');
|
||||
var promise = ScaleValues.get_values(self._scaleId);
|
||||
promise.then(function(scalevalues) {
|
||||
options.push({
|
||||
@@ -134,6 +135,7 @@ define(['jquery',
|
||||
.then(function(dialogue) {
|
||||
self._dialogue = dialogue;
|
||||
|
||||
M.util.js_complete('tool_lp/grade_user_competency_inline:_setUp');
|
||||
return;
|
||||
})
|
||||
.fail(notification.exception);
|
||||
|
||||
@@ -489,6 +489,7 @@ class api {
|
||||
'$mmSideMenuDelegate_mmaFiles' => new lang_string('files'),
|
||||
'$mmSideMenuDelegate_website' => new lang_string('webpage'),
|
||||
'$mmSideMenuDelegate_help' => new lang_string('help'),
|
||||
'CoreMainMenuDelegate_QrReader' => new lang_string('scanqrcode', 'tool_mobile'),
|
||||
),
|
||||
"$course" => array(
|
||||
'NoDelegate_CourseBlocks' => new lang_string('blocks'),
|
||||
@@ -527,6 +528,12 @@ class api {
|
||||
$features["$remoteaddons"] = $remoteaddonslist;
|
||||
}
|
||||
|
||||
if (!empty($availablemods['lti'])) {
|
||||
$ltidisplayname = $availablemods['lti']->displayname;
|
||||
$features["$ltidisplayname"]['CoreCourseModuleDelegate_AddonModLti:openInAppBrowser'] =
|
||||
new lang_string('openusingembeddedbrowser', 'tool_mobile');
|
||||
}
|
||||
|
||||
// Display OAuth 2 identity providers.
|
||||
if (is_enabled_auth('oauth2')) {
|
||||
$identityproviderslist = array();
|
||||
|
||||
@@ -48,5 +48,8 @@ function xmldb_tool_mobile_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -105,6 +105,7 @@ $string['notificationssentnotifications'] = 'Notifications sent';
|
||||
$string['notificationscurrentactivedevices'] = 'Devices receiving notifications this month';
|
||||
$string['oauth2identityproviders'] = 'OAuth 2 identity providers';
|
||||
$string['offlineuse'] = 'Offline use';
|
||||
$string['openusingembeddedbrowser'] = 'Open using embedded browser';
|
||||
$string['pluginname'] = 'Moodle app tools';
|
||||
$string['pluginnotenabledorconfigured'] = 'Plugin not enabled or configured.';
|
||||
$string['qrcodedisabled'] = 'Access via QR code disabled';
|
||||
@@ -118,6 +119,7 @@ $string['qrcodetypeurl'] = 'QR code with site URL';
|
||||
$string['qrcodetypelogin'] = 'QR code with automatic login';
|
||||
$string['readingthisemailgettheapp'] = 'Reading this in an email? <a href="{$a}">Download the mobile app and receive notifications on your mobile device</a>.';
|
||||
$string['remoteaddons'] = 'Remote add-ons';
|
||||
$string['scanqrcode'] = 'Scan QR code';
|
||||
$string['selfsignedoruntrustedcertificatewarning'] = 'It seems that the HTTPS certificate is self-signed or not trusted. The mobile app will only work with trusted sites.';
|
||||
$string['setuplink'] = 'App download page';
|
||||
$string['setuplink_desc'] = 'URL of page with options to download the mobile app from the App Store and Google Play. The app download page link is displayed in the page footer and in a user\'s profile. Leave blank to not display a link.';
|
||||
|
||||
@@ -45,5 +45,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -102,5 +102,8 @@ function xmldb_tool_moodlenet_upgrade(int $oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2020061502, 'tool', 'moodlenet');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -69,5 +69,8 @@ function xmldb_tool_policy_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ class tool_task_renderer extends plugin_renderer_base {
|
||||
$showloglink = \core\task\logmanager::has_log_report();
|
||||
|
||||
$table = new html_table();
|
||||
$table->caption = get_string('scheduledtasks', 'tool_task');
|
||||
$table->head = [
|
||||
get_string('name'),
|
||||
get_string('component', 'tool_task'),
|
||||
@@ -180,7 +181,7 @@ class tool_task_renderer extends plugin_renderer_base {
|
||||
$plugininfo->init_display_name();
|
||||
|
||||
$componentname = $plugininfo->displayname;
|
||||
if (!$plugininfo->is_enabled()) {
|
||||
if ($plugininfo->is_enabled() === false) {
|
||||
$componentname .= ' ' . html_writer::span(
|
||||
get_string('disabled', 'tool_task'), 'badge badge-secondary');
|
||||
}
|
||||
|
||||
@@ -65,3 +65,9 @@ Feature: Manage scheduled tasks
|
||||
| Name | Component | Minute | Hour | Day | Day of week | Month |
|
||||
| Log table cleanup | Standard log | */5 | 1 | 2 | 4 | 3 |
|
||||
And I should see "Log table cleanup" in the "tr.table-primary" "css_element"
|
||||
|
||||
Scenario: Disabled plugin's tasks are labelled as disabled too
|
||||
When "CAS users sync job \auth_cas\task\sync_task" row "Next run" column of "Scheduled tasks" table should contain "Plugin disabled"
|
||||
Then "CAS users sync job \auth_cas\task\sync_task" row "Component" column of "Scheduled tasks" table should contain "Disabled"
|
||||
And "Background processing for scheduled allocation \workshopallocation_scheduled\task\cron_task" row "Next run" column of "Scheduled tasks" table should not contain "Plugin disabled"
|
||||
And "Background processing for scheduled allocation \workshopallocation_scheduled\task\cron_task" row "Component" column of "Scheduled tasks" table should not contain "Disabled"
|
||||
|
||||
@@ -54,5 +54,8 @@ function xmldb_tool_usertours_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2020061501, 'tool', 'usertours');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_auth_db_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_auth_email_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_auth_none_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -455,8 +455,9 @@ class auth extends \auth_plugin_base {
|
||||
}
|
||||
}
|
||||
|
||||
$issuer = $client->get_issuer();
|
||||
// First we try and find a defined mapping.
|
||||
$linkedlogin = api::match_username_to_user($userinfo['username'], $client->get_issuer());
|
||||
$linkedlogin = api::match_username_to_user($userinfo['username'], $issuer);
|
||||
|
||||
if (!empty($linkedlogin) && empty($linkedlogin->get('confirmtoken'))) {
|
||||
$mappeduser = get_complete_user_data('id', $linkedlogin->get('userid'));
|
||||
@@ -474,7 +475,7 @@ class auth extends \auth_plugin_base {
|
||||
$SESSION->loginerrormsg = get_string('invalidlogin');
|
||||
$client->log_out();
|
||||
redirect(new moodle_url('/login/index.php'));
|
||||
} else if ($mappeduser && $mappeduser->confirmed) {
|
||||
} else if ($mappeduser && ($mappeduser->confirmed || !$issuer->get('requireconfirmation'))) {
|
||||
// Update user fields.
|
||||
$userinfo = $this->update_user($userinfo, $mappeduser);
|
||||
$userwasmapped = true;
|
||||
@@ -503,7 +504,7 @@ class auth extends \auth_plugin_base {
|
||||
redirect(new moodle_url('/login/index.php'));
|
||||
}
|
||||
|
||||
$issuer = $client->get_issuer();
|
||||
|
||||
if (!$issuer->is_valid_login_domain($oauthemail)) {
|
||||
// Trigger login failed event.
|
||||
$failurereason = AUTH_LOGIN_UNAUTHORISED;
|
||||
|
||||
@@ -81,5 +81,8 @@ function xmldb_auth_oauth2_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_auth_shibboleth_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -342,13 +342,13 @@ class block_activity_results extends block_base {
|
||||
|
||||
$rank = 0;
|
||||
if (!empty($best)) {
|
||||
$this->content->text .= '<table class="grades"><caption>';
|
||||
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
|
||||
if ($numbest == 1) {
|
||||
$this->content->text .= get_string('bestgroupgrade', 'block_activity_results');
|
||||
} else {
|
||||
$this->content->text .= get_string('bestgroupgrades', 'block_activity_results', $numbest);
|
||||
}
|
||||
$this->content->text .= '</caption><colgroup class="number" />';
|
||||
$this->content->text .= '</h6></caption><colgroup class="number" />';
|
||||
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
|
||||
foreach ($best as $groupid => $averagegrade) {
|
||||
switch ($nameformat) {
|
||||
@@ -398,13 +398,13 @@ class block_activity_results extends block_base {
|
||||
$rank = 0;
|
||||
if (!empty($worst)) {
|
||||
$worst = array_reverse($worst, true);
|
||||
$this->content->text .= '<table class="grades"><caption>';
|
||||
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
|
||||
if ($numworst == 1) {
|
||||
$this->content->text .= get_string('worstgroupgrade', 'block_activity_results');
|
||||
} else {
|
||||
$this->content->text .= get_string('worstgroupgrades', 'block_activity_results', $numworst);
|
||||
}
|
||||
$this->content->text .= '</caption><colgroup class="number" />';
|
||||
$this->content->text .= '</h6></caption><colgroup class="number" />';
|
||||
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
|
||||
foreach ($worst as $groupid => $averagegrade) {
|
||||
switch ($nameformat) {
|
||||
@@ -529,13 +529,13 @@ class block_activity_results extends block_base {
|
||||
|
||||
$rank = 0;
|
||||
if (!empty($best)) {
|
||||
$this->content->text .= '<table class="grades"><caption>';
|
||||
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
|
||||
if ($numbest == 1) {
|
||||
$this->content->text .= get_string('bestgrade', 'block_activity_results');
|
||||
} else {
|
||||
$this->content->text .= get_string('bestgrades', 'block_activity_results', $numbest);
|
||||
}
|
||||
$this->content->text .= '</caption><colgroup class="number" />';
|
||||
$this->content->text .= '</h6></caption><colgroup class="number" />';
|
||||
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
|
||||
foreach ($best as $userid => $gradeid) {
|
||||
switch ($nameformat) {
|
||||
@@ -592,13 +592,13 @@ class block_activity_results extends block_base {
|
||||
$rank = 0;
|
||||
if (!empty($worst)) {
|
||||
$worst = array_reverse($worst, true);
|
||||
$this->content->text .= '<table class="grades"><caption>';
|
||||
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
|
||||
if ($numbest == 1) {
|
||||
$this->content->text .= get_string('worstgrade', 'block_activity_results');
|
||||
} else {
|
||||
$this->content->text .= get_string('worstgrades', 'block_activity_results', $numworst);
|
||||
}
|
||||
$this->content->text .= '</caption><colgroup class="number" />';
|
||||
$this->content->text .= '</h6></caption><colgroup class="number" />';
|
||||
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
|
||||
foreach ($worst as $userid => $gradeid) {
|
||||
switch ($nameformat) {
|
||||
@@ -678,17 +678,17 @@ class block_activity_results extends block_base {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the Link to the activity module when displaed outside of the module
|
||||
* Generates the Link to the activity module when displayed outside of the module.
|
||||
* @param stdclass $activity
|
||||
* @param stdclass $cm
|
||||
* @return string
|
||||
*/
|
||||
private function activity_link($activity, $cm) {
|
||||
|
||||
$o = html_writer::start_tag('h3');
|
||||
$o = html_writer::start_tag('h5');
|
||||
$o .= html_writer::link(new moodle_url('/mod/'.$activity->itemmodule.'/view.php',
|
||||
array('id' => $cm->id)), format_string(($activity->itemname), true, ['context' => context_module::instance($cm->id)]));
|
||||
$o .= html_writer::end_tag('h3');
|
||||
$o .= html_writer::end_tag('h5');
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,3 @@
|
||||
.block_activity_results table.grades .grade {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.block_activity_results table.grades caption {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
@@ -57,5 +57,8 @@ function xmldb_block_badges_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -99,10 +99,14 @@ class block_blog_menu extends block_base {
|
||||
// Prepare the footer for this block
|
||||
if (has_capability('moodle/blog:search', context_system::instance())) {
|
||||
// Full-text search field
|
||||
$form = html_writer::tag('label', get_string('search', 'admin'), array('for'=>'blogsearchquery', 'class'=>'accesshide'));
|
||||
$form .= html_writer::empty_tag('input', array('id'=>'blogsearchquery', 'type'=>'text', 'name'=>'search'));
|
||||
$form .= html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('search')));
|
||||
$this->content->footer = html_writer::tag('form', html_writer::tag('div', $form), array('class'=>'blogsearchform', 'method'=>'get', 'action'=>new moodle_url('/blog/index.php')));
|
||||
$form = html_writer::tag('label', get_string('search', 'admin'), array('for' => 'blogsearchquery',
|
||||
'class' => 'accesshide'));
|
||||
$form .= html_writer::empty_tag('input', array('id' => 'blogsearchquery', 'class' => 'form-control mr-1',
|
||||
'type' => 'text', 'name' => 'search'));
|
||||
$form .= html_writer::empty_tag('input', array('type' => 'submit', 'class' => 'btn btn-secondary',
|
||||
'value' => get_string('search')));
|
||||
$this->content->footer = html_writer::tag('form', html_writer::tag('div', $form), array(
|
||||
'class' => 'blogsearchform form-inline', 'method' => 'get', 'action' => new moodle_url('/blog/index.php')));
|
||||
} else {
|
||||
// No footer to display
|
||||
$this->content->footer = '';
|
||||
|
||||
@@ -57,5 +57,8 @@ function xmldb_block_calendar_month_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -57,5 +57,8 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -60,5 +60,8 @@ function xmldb_block_completionstatus_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -60,5 +60,8 @@ function xmldb_block_course_summary_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -45,5 +45,8 @@ function xmldb_block_html_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -78,5 +78,8 @@ function xmldb_block_myoverview_upgrade($oldversion) {
|
||||
upgrade_block_savepoint(true, 2019111801, 'myoverview', false);
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -67,5 +67,8 @@ function xmldb_block_navigation_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -57,5 +57,8 @@ function xmldb_block_quiz_results_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -59,5 +59,8 @@ function xmldb_block_recent_activity_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -72,5 +72,8 @@ function xmldb_block_recentlyaccesseditems_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -45,5 +45,8 @@ function xmldb_block_rss_client_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -61,5 +61,8 @@ function xmldb_block_section_links_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -60,5 +60,8 @@ function xmldb_block_selfcompletion_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -67,5 +67,8 @@ function xmldb_block_settings_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
define ("core_calendar/calendar_filter",["jquery","core_calendar/selectors","core_calendar/events","core/str","core/templates"],function(a,b,c,d,e){var f=function(d){d.on("click",b.eventFilterItem,function(b){var c=a(b.currentTarget);g(c);b.preventDefault()});a("body").on(c.viewUpdated,function(){var c=d.find(b.eventFilterItem);c.each(function(b,c){c=a(c);if(c.data("eventtype-hidden")){var d=i(c);h(d)}})})},g=function(a){var b=i(a);b.hidden=!b.hidden;return d.get_string("eventtype"+b.eventtype,"calendar").then(function(a){b.name=a;b.icon=!0;b.key="i/"+b.eventtype+"event";b.component="core";return b}).then(function(a){return e.render("core_calendar/event_filter_key",a)}).then(function(b,c){return e.replaceNode(a,b,c)}).then(function(){h(b)})},h=function(b){M.util.js_pending("month-mini-filterChanged");a("body").trigger(c.filterChanged,{type:b.eventtype,hidden:b.hidden});M.util.js_complete("month-mini-filterChanged")},i=function(a){return{eventtype:a.data("eventtype"),hidden:a.data("eventtype-hidden")}};return{init:function init(b){b=a(b);f(b)}}});
|
||||
define ("core_calendar/calendar_filter",["jquery","core_calendar/selectors","core_calendar/events","core/str","core/templates"],function(a,b,c,d,e){var f=function(d){d.on("click",b.eventFilterItem,function(b){var c=a(b.currentTarget);g(c);b.preventDefault()});a("body").on(c.viewUpdated,function(){var c=d.find(b.eventFilterItem);c.each(function(b,c){c=a(c);if(c.data("eventtype-hidden")){var d=i(c);h(d)}})})},g=function(a){var b=i(a);b.hidden=!b.hidden;M.util.js_pending("core_calendar/calendar_filter:toggleFilter");return d.get_string("eventtype"+b.eventtype,"calendar").then(function(a){b.name=a;b.icon=!0;b.key="i/"+b.eventtype+"event";b.component="core";return b}).then(function(a){return e.render("core_calendar/event_filter_key",a)}).then(function(b,c){return e.replaceNode(a,b,c)}).then(function(){h(b);M.util.js_complete("core_calendar/calendar_filter:toggleFilter")})},h=function(b){M.util.js_pending("month-mini-filterChanged");a("body").trigger(c.filterChanged,{type:b.eventtype,hidden:b.hidden});M.util.js_complete("month-mini-filterChanged")},i=function(a){return{eventtype:a.data("eventtype"),hidden:a.data("eventtype-hidden")}};return{init:function init(b){b=a(b);f(b)}}});
|
||||
//# sourceMappingURL=calendar_filter.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -64,6 +64,7 @@ function(
|
||||
// Toggle the hidden. We need to render the template before we change the value.
|
||||
data.hidden = !data.hidden;
|
||||
|
||||
M.util.js_pending("core_calendar/calendar_filter:toggleFilter");
|
||||
return Str.get_string('eventtype' + data.eventtype, 'calendar')
|
||||
.then(function(nameStr) {
|
||||
data.name = nameStr;
|
||||
@@ -81,6 +82,7 @@ function(
|
||||
})
|
||||
.then(function() {
|
||||
fireFilterChangedEvent(data);
|
||||
M.util.js_complete("core_calendar/calendar_filter:toggleFilter");
|
||||
return;
|
||||
});
|
||||
};
|
||||
|
||||
@@ -898,13 +898,6 @@ $CFG->admin = 'admin';
|
||||
// ),
|
||||
// );
|
||||
//
|
||||
// You can force the browser session (not user's sessions) to restart after N seconds. This could
|
||||
// be useful if you are using a cloud-based service with time restrictions in the browser side.
|
||||
// Setting this value the browser session that Behat is using will be restarted. Set the time in
|
||||
// seconds. Is not recommended to use this setting if you don't explicitly need it.
|
||||
// Example:
|
||||
// $CFG->behat_restart_browser_after = 7200; // Restarts the browser session after 2 hours
|
||||
//
|
||||
// All this page's extra Moodle settings are compared against a white list of allowed settings
|
||||
// (the basic and behat_* ones) to avoid problems with production environments. This setting can be
|
||||
// used to expand the default white list with an array of extra settings.
|
||||
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
define ("core_contentbank/actions",["jquery","core/ajax","core/notification","core/str","core/templates","core/url","core/modal_factory","core/modal_events"],function(a,b,c,d,e,f,g,h){var k={DELETE_CONTENT:"[data-action=\"deletecontent\"]",RENAME_CONTENT:"[data-action=\"renamecontent\"]"},l=function(){this.registerEvents()};l.prototype.registerEvents=function(){a(k.DELETE_CONTENT).click(function(b){b.preventDefault();var e=a(this).data("contentname"),f=a(this).data("contentid"),j=a(this).data("contextid"),k="";d.get_strings([{key:"deletecontent",component:"core_contentbank"},{key:"deletecontentconfirm",component:"core_contentbank",param:{name:e}},{key:"delete",component:"core"}]).then(function(a){var b=a[0],c=a[1];k=a[2];return g.create({title:b,body:c,type:g.types.SAVE_CANCEL,large:!0})}).done(function(a){a.setSaveButtonText(k);a.getRoot().on(h.save,function(){return i(f,j)});a.getRoot().on(h.hidden,function(){a.destroy()});a.show()}).catch(c.exception)});a(k.RENAME_CONTENT).click(function(b){b.preventDefault();var f=a(this).data("contentname"),i=a(this).data("contentid"),k="";d.get_strings([{key:"renamecontent",component:"core_contentbank"},{key:"rename",component:"core_contentbank"}]).then(function(a){var b=a[0];k=a[1];return g.create({title:b,body:e.render("core_contentbank/renamecontent",{contentid:i,name:f}),type:g.types.SAVE_CANCEL})}).then(function(b){b.setSaveButtonText(k);b.getRoot().on(h.save,function(){var b=a("#newname").val();return j(i,b)});b.getRoot().on(h.hidden,function(){b.destroy()});b.show()}).catch(c.exception)})};function i(a,e){var g="success";b.call([{methodname:"core_contentbank_delete_content",args:{contentids:{contentid:a}}}])[0].then(function(a){if(a.result){return d.get_string("contentdeleted","core_contentbank")}g="error";return d.get_string("contentnotdeleted","core_contentbank")}).done(function(a){var b={contextid:e};if("success"==g){b.statusmsg=a}else{b.errormsg=a}window.location.href=f.relativeUrl("contentbank/index.php",b,!1)}).fail(c.exception)}function j(a,e){var g="success";b.call([{methodname:"core_contentbank_rename_content",args:{contentid:a,name:e}}])[0].then(function(a){if(a){return d.get_string("contentrenamed","core_contentbank")}g="error";return d.get_string("contentnotrenamed","core_contentbank")}).then(function(b){var d=null;if("success"==g){d={id:a,statusmsg:b};window.location.href=f.relativeUrl("contentbank/view.php",d,!1)}else{c.addNotification({message:b,type:"error"});c.fetchNotifications()}}).catch(c.exception)}return{init:function init(){return new l}}});
|
||||
define ("core_contentbank/actions",["jquery","core/ajax","core/notification","core/str","core/templates","core/url","core/modal_factory","core/modal_events"],function(a,b,c,d,e,f,g,h){var k={DELETE_CONTENT:"[data-action=\"deletecontent\"]",RENAME_CONTENT:"[data-action=\"renamecontent\"]"},l=function(){this.registerEvents()};l.prototype.registerEvents=function(){a(k.DELETE_CONTENT).click(function(b){b.preventDefault();var e=a(this).data("contentname"),f=a(this).data("contentid"),j=a(this).data("contextid"),k="";d.get_strings([{key:"deletecontent",component:"core_contentbank"},{key:"deletecontentconfirm",component:"core_contentbank",param:{name:e}},{key:"delete",component:"core"}]).then(function(a){var b=a[0],c=a[1];k=a[2];return g.create({title:b,body:c,type:g.types.SAVE_CANCEL,large:!0})}).done(function(a){a.setSaveButtonText(k);a.getRoot().on(h.save,function(){return i(f,j)});a.getRoot().on(h.hidden,function(){a.destroy()});a.show()}).catch(c.exception)});a(k.RENAME_CONTENT).click(function(b){b.preventDefault();var f=a(this).data("contentname"),i=a(this).data("contentid"),k="";d.get_strings([{key:"renamecontent",component:"core_contentbank"},{key:"rename",component:"core_contentbank"}]).then(function(a){var b=a[0];k=a[1];return g.create({title:b,body:e.render("core_contentbank/renamecontent",{contentid:i,name:f}),type:g.types.SAVE_CANCEL})}).then(function(b){b.setSaveButtonText(k);b.getRoot().on(h.save,function(){var b=a("#newname").val();return j(i,b)});b.getRoot().on(h.hidden,function(){b.destroy()});b.show()}).catch(c.exception)})};function i(a,d){var e="success";b.call([{methodname:"core_contentbank_delete_content",args:{contentids:{contentid:a}}}])[0].then(function(a){if(a.result){return"contentdeleted"}e="error";return"contentnotdeleted"}).done(function(a){var b={contextid:d};if("success"==e){b.statusmsg=a}else{b.errormsg=a}window.location.href=f.relativeUrl("contentbank/index.php",b,!1)}).fail(c.exception)}function j(a,d){var e="success";b.call([{methodname:"core_contentbank_rename_content",args:{contentid:a,name:d}}])[0].then(function(a){if(a){return"contentrenamed"}e="error";return"contentnotrenamed"}).then(function(b){var d=null;if("success"==e){d={id:a,statusmsg:b};window.location.href=f.relativeUrl("contentbank/view.php",d,!1)}else{c.addNotification({message:b,type:"error"});c.fetchNotifications()}}).catch(c.exception)}return{init:function init(){return new l}}});
|
||||
//# sourceMappingURL=actions.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -176,10 +176,10 @@ function($, Ajax, Notification, Str, Templates, Url, ModalFactory, ModalEvents)
|
||||
var requestType = 'success';
|
||||
Ajax.call([request])[0].then(function(data) {
|
||||
if (data.result) {
|
||||
return Str.get_string('contentdeleted', 'core_contentbank');
|
||||
return 'contentdeleted';
|
||||
}
|
||||
requestType = 'error';
|
||||
return Str.get_string('contentnotdeleted', 'core_contentbank');
|
||||
return 'contentnotdeleted';
|
||||
|
||||
}).done(function(message) {
|
||||
var params = {
|
||||
@@ -212,10 +212,10 @@ function($, Ajax, Notification, Str, Templates, Url, ModalFactory, ModalEvents)
|
||||
var requestType = 'success';
|
||||
Ajax.call([request])[0].then(function(data) {
|
||||
if (data) {
|
||||
return Str.get_string('contentrenamed', 'core_contentbank');
|
||||
return 'contentrenamed';
|
||||
}
|
||||
requestType = 'error';
|
||||
return Str.get_string('contentnotrenamed', 'core_contentbank');
|
||||
return 'contentnotrenamed';
|
||||
|
||||
}).then(function(message) {
|
||||
var params = null;
|
||||
|
||||
@@ -59,7 +59,7 @@ abstract class content {
|
||||
if (!class_exists($typeclass)) {
|
||||
throw new coding_exception(get_string('contenttypenotfound', 'error', $record->contenttype));
|
||||
}
|
||||
// A record with the id must exist in 'contenbank_content' table.
|
||||
// A record with the id must exist in 'contentbank_content' table.
|
||||
// To improve performance, we are only checking the id is set, but no querying the database.
|
||||
if (!isset($record->id)) {
|
||||
throw new coding_exception(get_string('invalidcontentid', 'error'));
|
||||
@@ -103,7 +103,7 @@ abstract class content {
|
||||
public function update_content(): bool {
|
||||
global $USER, $DB;
|
||||
|
||||
// A record with the id must exist in 'contenbank_content' table.
|
||||
// A record with the id must exist in 'contentbank_content' table.
|
||||
// To improve performance, we are only checking the id is set, but no querying the database.
|
||||
if (!isset($this->content->id)) {
|
||||
throw new coding_exception(get_string('invalidcontentid', 'error'));
|
||||
|
||||
@@ -32,8 +32,8 @@ $context = context::instance_by_id($contextid, MUST_EXIST);
|
||||
|
||||
require_capability('moodle/contentbank:access', $context);
|
||||
|
||||
$statusmsg = optional_param('statusmsg', '', PARAM_RAW);
|
||||
$errormsg = optional_param('errormsg', '', PARAM_RAW);
|
||||
$statusmsg = optional_param('statusmsg', '', PARAM_ALPHANUMEXT);
|
||||
$errormsg = optional_param('errormsg', '', PARAM_ALPHANUMEXT);
|
||||
|
||||
$title = get_string('contentbank');
|
||||
\core_contentbank\helper::get_page_ready($context, $title);
|
||||
@@ -44,7 +44,7 @@ $PAGE->set_url('/contentbank/index.php');
|
||||
$PAGE->set_context($context);
|
||||
$PAGE->set_title($title);
|
||||
$PAGE->set_heading($title);
|
||||
$PAGE->set_pagetype('contenbank');
|
||||
$PAGE->set_pagetype('contentbank');
|
||||
|
||||
// Get all contents managed by active plugins where the user has permission to render them.
|
||||
$cb = new \core_contentbank\contentbank();
|
||||
@@ -98,9 +98,11 @@ echo $OUTPUT->header();
|
||||
echo $OUTPUT->box_start('generalbox');
|
||||
|
||||
// If needed, display notifications.
|
||||
if ($errormsg !== '') {
|
||||
if ($errormsg !== '' && get_string_manager()->string_exists($errormsg, 'core_contentbank')) {
|
||||
$errormsg = get_string($errormsg, 'core_contentbank');
|
||||
echo $OUTPUT->notification($errormsg);
|
||||
} else if ($statusmsg !== '') {
|
||||
} else if ($statusmsg !== '' && get_string_manager()->string_exists($statusmsg, 'core_contentbank')) {
|
||||
$statusmsg = get_string($statusmsg, 'core_contentbank');
|
||||
echo $OUTPUT->notification($statusmsg, 'notifysuccess');
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ $PAGE->set_context($context);
|
||||
$PAGE->navbar->add(get_string('upload', 'contentbank'));
|
||||
$PAGE->set_title($title);
|
||||
$PAGE->set_heading($title);
|
||||
$PAGE->set_pagetype('contenbank');
|
||||
$PAGE->set_pagetype('contentbank');
|
||||
|
||||
$maxbytes = $CFG->userquota;
|
||||
$maxareabytes = $CFG->userquota;
|
||||
|
||||
@@ -35,8 +35,8 @@ $record = $DB->get_record('contentbank_content', ['id' => $id], '*', MUST_EXIST)
|
||||
$context = context::instance_by_id($record->contextid, MUST_EXIST);
|
||||
require_capability('moodle/contentbank:access', $context);
|
||||
|
||||
$statusmsg = optional_param('statusmsg', '', PARAM_RAW);
|
||||
$errormsg = optional_param('errormsg', '', PARAM_RAW);
|
||||
$statusmsg = optional_param('statusmsg', '', PARAM_ALPHANUMEXT);
|
||||
$errormsg = optional_param('errormsg', '', PARAM_ALPHANUMEXT);
|
||||
|
||||
$returnurl = new \moodle_url('/contentbank/index.php', ['contextid' => $context->id]);
|
||||
$plugin = core_plugin_manager::instance()->get_plugin_info($record->contenttype);
|
||||
@@ -56,7 +56,7 @@ $PAGE->navbar->add($record->name);
|
||||
$PAGE->set_heading($record->name);
|
||||
$title .= ": ".$record->name;
|
||||
$PAGE->set_title($title);
|
||||
$PAGE->set_pagetype('contenbank');
|
||||
$PAGE->set_pagetype('contentbank');
|
||||
|
||||
$contenttypeclass = "\\$record->contenttype\\contenttype";
|
||||
$contentclass = "\\$record->contenttype\\content";
|
||||
@@ -111,9 +111,11 @@ $PAGE->add_header_action(html_writer::div(
|
||||
echo $OUTPUT->header();
|
||||
|
||||
// If needed, display notifications.
|
||||
if ($errormsg !== '') {
|
||||
if ($errormsg !== '' && get_string_manager()->string_exists($errormsg, 'core_contentbank')) {
|
||||
$errormsg = get_string($errormsg, 'core_contentbank');
|
||||
echo $OUTPUT->notification($errormsg);
|
||||
} else if ($statusmsg !== '') {
|
||||
} else if ($statusmsg !== '' && get_string_manager()->string_exists($statusmsg, 'core_contentbank')) {
|
||||
$statusmsg = get_string($statusmsg, 'core_contentbank');
|
||||
echo $OUTPUT->notification($statusmsg, 'notifysuccess');
|
||||
}
|
||||
if ($contenttype->can_access()) {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -136,7 +136,7 @@ const registerListenerEvents = (courseId, chooserConfig) => {
|
||||
const data = await fetchModuleData();
|
||||
|
||||
// Apply the section id to all the module instance links.
|
||||
const builtModuleData = sectionIdMapper(data, caller.dataset.sectionid);
|
||||
const builtModuleData = sectionIdMapper(data, caller.dataset.sectionid, caller.dataset.sectionreturnid);
|
||||
|
||||
ChooserDialogue.displayChooser(
|
||||
sectionModal,
|
||||
@@ -161,13 +161,14 @@ const registerListenerEvents = (courseId, chooserConfig) => {
|
||||
* @method sectionIdMapper
|
||||
* @param {Object} webServiceData Our original data from the Web service call
|
||||
* @param {Number} id The ID of the section we need to append to the links
|
||||
* @param {Number|null} sectionreturnid The ID of the section return we need to append to the links
|
||||
* @return {Array} [modules] with URL's built
|
||||
*/
|
||||
const sectionIdMapper = (webServiceData, id) => {
|
||||
const sectionIdMapper = (webServiceData, id, sectionreturnid) => {
|
||||
// We need to take a fresh deep copy of the original data as an object is a reference type.
|
||||
const newData = JSON.parse(JSON.stringify(webServiceData));
|
||||
newData.content_items.forEach((module) => {
|
||||
module.link += '§ion=' + id;
|
||||
module.link += '§ion=' + id + '&sr=' + (sectionreturnid ?? 0);
|
||||
});
|
||||
return newData.content_items;
|
||||
};
|
||||
|
||||
@@ -203,7 +203,8 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
|
||||
'class' => 'section main clearfix'.$sectionstyle,
|
||||
'role' => 'region',
|
||||
'aria-labelledby' => "sectionid-{$section->id}-title",
|
||||
'data-sectionid' => $section->section
|
||||
'data-sectionid' => $section->section,
|
||||
'data-sectionreturnid' => $sectionreturn
|
||||
]);
|
||||
|
||||
$leftcontent = $this->section_left_content($section, $course, $onsectionpage);
|
||||
|
||||
@@ -45,5 +45,8 @@ function xmldb_format_topics_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -45,5 +45,8 @@ function xmldb_format_weeks_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -376,6 +376,7 @@ class core_course_renderer extends plugin_renderer_base {
|
||||
'class' => 'section-modchooser-link btn btn-link',
|
||||
'data-action' => 'open-chooser',
|
||||
'data-sectionid' => $section,
|
||||
'data-sectionreturnid' => $sectionreturn,
|
||||
]
|
||||
);
|
||||
$ajaxcontrol .= html_writer::end_tag('div');
|
||||
|
||||
@@ -38,6 +38,29 @@ Feature: Course paged mode
|
||||
| topics | "Topic 1" | "Topic 2" | "Topic 3" | "Topic 0" | "Topic 4" |
|
||||
| weeks | "1 January - 7 January" | "8 January - 14 January" | "15 January - 21 January" | "25 December - 31 December" | "22 January - 28 January" |
|
||||
|
||||
@javascript
|
||||
Scenario Outline: Paged section redirect after creating an activity
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname | category | format | coursedisplay | numsections | startdate |
|
||||
| Course 1 | C1 | 0 | <courseformat> | 1 | 3 | 0 |
|
||||
And I log in as "admin"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I click on <section1> "link" in the <section1> "section"
|
||||
And I should see <section1> in the "div.single-section" "css_element"
|
||||
And I should see <section2> in the ".single-section span.mdl-right" "css_element"
|
||||
And I should not see <prevunexistingsection> in the ".single-section" "css_element"
|
||||
When I add a "Chat" to section "1" and I fill the form with:
|
||||
| Name of this chat room | Chat room |
|
||||
| Description | Chat description |
|
||||
Then I should see <section1> in the "div.single-section" "css_element"
|
||||
And I should see <section2> in the ".single-section span.mdl-right" "css_element"
|
||||
And I should not see <prevunexistingsection> in the ".single-section" "css_element"
|
||||
|
||||
Examples:
|
||||
| courseformat | section1 | section2 | prevunexistingsection |
|
||||
| topics | "Topic 1" | "Topic 2" | "Topic 0" |
|
||||
| weeks | "1 January - 7 January" | "8 January - 14 January" | "25 December - 31 December" |
|
||||
|
||||
Scenario Outline: Weekly and topics course formats with Javascript disabled
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname | category | format | coursedisplay | numsections | startdate |
|
||||
|
||||
@@ -39,5 +39,8 @@ function xmldb_enrol_database_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -39,5 +39,8 @@ function xmldb_enrol_flatfile_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -39,5 +39,8 @@ function xmldb_enrol_guest_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -45,5 +45,8 @@ function xmldb_enrol_imsenterprise_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ $string['categoryseparator'] = 'Category separator character';
|
||||
$string['categoryseparator_desc'] = 'Required when "Category idnumber" is enabled. Character to separate the category name and idnumber.';
|
||||
$string['coursesettings'] = 'Course data options';
|
||||
$string['createnewcategories'] = 'Create new (hidden) course categories if not found in Moodle';
|
||||
$string['createnewcategories_desc'] = 'If the <org><orgunit> element is present in a course\'s incoming data, its content will be used to specify a category if the course is to be created from scratch. The plugin will NOT re-categorise existing courses.
|
||||
$string['createnewcategories_desc'] = 'If the <org><orgunit> element is present in a course\'s incoming data, its content will be used to specify a category if the course is to be created from scratch. The plugin will NOT re-categorise existing courses.
|
||||
|
||||
If no category exists with the desired name, then a hidden category will be created.';
|
||||
$string['createnewcourses'] = 'Create new (hidden) courses if not found in Moodle';
|
||||
|
||||
@@ -51,5 +51,8 @@ function xmldb_enrol_lti_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -100,6 +100,13 @@ switch ($action) {
|
||||
|
||||
if (empty($roleid)) {
|
||||
$roleid = null;
|
||||
} else {
|
||||
if (!has_capability('moodle/role:assign', $context)) {
|
||||
throw new enrol_ajax_exception('assignnotpermitted');
|
||||
}
|
||||
if (!array_key_exists($roleid, get_assignable_roles($context, ROLENAME_ALIAS, false))) {
|
||||
throw new enrol_ajax_exception('invalidrole');
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($startdate)) {
|
||||
|
||||
@@ -39,5 +39,8 @@ function xmldb_enrol_manual_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -39,5 +39,8 @@ function xmldb_enrol_mnet_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -138,5 +138,8 @@ function xmldb_enrol_paypal_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -39,5 +39,8 @@ function xmldb_enrol_self_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -57,5 +57,8 @@ function xmldb_filter_displayh5p_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2020031700, 'filter', 'displayh5p');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -55,5 +55,8 @@ function xmldb_filter_mathjaxloader_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2020050401, 'filter', 'mathjaxloader');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_filter_mediaplugin_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_filter_tex_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -49,5 +49,8 @@ function xmldb_gradingform_guide_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -45,5 +45,8 @@ function xmldb_gradingform_rubric_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -43,5 +43,8 @@ function xmldb_gradereport_history_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2019111801, 'gradereport', 'history');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,5 +44,8 @@ function xmldb_gradereport_overview_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -41,5 +41,8 @@ function xmldb_gradereport_user_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ class behat_grade extends behat_base {
|
||||
$inputxpath = "//input[@class='idnumber'][" .
|
||||
"parent::li[@class='item'][text()='" . $gradeitem . "']" .
|
||||
" | " .
|
||||
"parent::li[@class='categoryitem' | @class='courseitem']" .
|
||||
"parent::li[@class='categoryitem' or @class='courseitem']" .
|
||||
"/parent::ul/parent::li[starts-with(text(),'" . $gradeitem . "')]" .
|
||||
"]";
|
||||
$this->execute('behat_forms::i_set_the_field_with_xpath_to', array($inputxpath, $idnumber));
|
||||
|
||||
@@ -80,8 +80,7 @@ $string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Sie haben das Paket <strong>{$a->packname} {$a->packversion}</strong> erfolgreich auf Ihrem Computer installiert.';
|
||||
$string['welcomep30'] = 'Diese Version von <strong>{$a->installername}</strong> enthält folgende Anwendungen, mit denen Sie <strong>Moodle</strong> ausführen können:';
|
||||
$string['welcomep40'] = 'Das Paket enthält: <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'Die Nutzung dieser Anwendungen ist lizenzrechtlich geprüft. Alle Anwendungen von <strong>{$a->installername}</strong> sind
|
||||
<a href="http://www.opensource.org/docs/definition_plain.html"> Open Source </a> und unterliegen der <a href="http://www.gnu.org/copyleft/gpl.html"> GPL</a> Lizenz.';
|
||||
$string['welcomep50'] = 'Die Verwendung aller Anwendungen in diesem Paket unterliegt den jeweiligen Lizenzen. Das vollständige Paket <strong>{$a->installername}</strong> ist <a href="https://www.opensource.org/docs/definition_plain.html">Open Source</a> und wird unter mit der Lizenz <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a> angeboten.';
|
||||
$string['welcomep60'] = 'Die folgenden Webseiten führen Sie in einfachen Schritten durch die Installation von <strong>Moodle</strong> auf Ihrem Computer. Sie können die vorgeschlagenen Einstellungen übernehmen oder an eigene Bedürfnisse anpassen.';
|
||||
$string['welcomep70'] = 'Klicken Sie auf die Taste \'Weiter\', um mit der Installation von Moodle fortzufahren.';
|
||||
$string['wwwroot'] = 'Webadresse';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user