Compare commits
273 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7de0c0f1ad | |||
| 95abbe12ba | |||
| 2e33ec271b | |||
| 2efbb5dcc0 | |||
| 8a7f86f387 | |||
| 0b5aad45af | |||
| aa97b1530f | |||
| a2a489d1f8 | |||
| c04c03594e | |||
| e3147eec7d | |||
| 37e178e755 | |||
| 3ee7064392 | |||
| de6225210d | |||
| f9dc45fee6 | |||
| d5f387f922 | |||
| c3ef9e4380 | |||
| 99a75cba2c | |||
| 5000628be5 | |||
| 3d348a4638 | |||
| 1d88fac6f6 | |||
| 179762bd02 | |||
| b51509778b | |||
| 245e70eeab | |||
| 98e7475aea | |||
| 6981a6f83b | |||
| d41890c0f7 | |||
| 3f3cace28c | |||
| ba4d2dee9a | |||
| d8cb31ce19 | |||
| aa0f8fd86d | |||
| c4b7a43793 | |||
| 98a450e721 | |||
| f8e02a34a7 | |||
| b8a1748e48 | |||
| b043d306c3 | |||
| dd159713a8 | |||
| 53c8bd1b2f | |||
| ed903633b3 | |||
| a029dfbc5b | |||
| 4aa04de246 | |||
| b1aba64aee | |||
| 51759ac646 | |||
| 0e884990f0 | |||
| 7b2442a913 | |||
| efe8b11186 | |||
| 1dca6b0fcf | |||
| 64f0c4ceaa | |||
| eacdff4e4f | |||
| 1acf5e5da2 | |||
| 49523e0349 | |||
| f63284d2eb | |||
| 08e8818abe | |||
| 9dce35eae8 | |||
| 8c21a3d340 | |||
| 4a7316c071 | |||
| 1f69f00697 | |||
| 7334de1e6c | |||
| ca1929d390 | |||
| 0fb84542b5 | |||
| 2bfb88591a | |||
| 46ebab12cf | |||
| 2baf9a81d8 | |||
| 1da54dc846 | |||
| 0e314a4320 | |||
| 23fe5c9110 | |||
| 4639c08029 | |||
| 3aa3952340 | |||
| 80d85657b7 | |||
| d631bfb4ef | |||
| 6191d50b8a | |||
| 2bcad30213 | |||
| a93b0d75ed | |||
| ec160fed59 | |||
| 7ef1e8818d | |||
| 5f5e77c4ef | |||
| a7a2fb253f | |||
| 14ba75116b | |||
| 07508900e4 | |||
| 7fd442d168 | |||
| b6f9a29a5e | |||
| f753d02aea | |||
| dc8bac39e3 | |||
| 325f268cb1 | |||
| 46e9a19620 | |||
| 67cf6f02c3 | |||
| 14404f91ea | |||
| cdc64ab1dd | |||
| 955937a856 | |||
| 0ae284c15b | |||
| 879946be6a | |||
| 0287fd6499 | |||
| 0d51c25e85 | |||
| d113822e72 | |||
| 8839000d68 | |||
| ceb89d1fb0 | |||
| 53b41d3a84 | |||
| 33c9f1fa48 | |||
| c4cf607c19 | |||
| e8b4c32290 | |||
| a3b6b58f19 | |||
| f18c63e584 | |||
| 46f06e7697 | |||
| ac858f44ae | |||
| dfba6ffe7f | |||
| 5cfa863adc | |||
| 904caddecb | |||
| d8d1c97ef7 | |||
| f026d258b8 | |||
| e4854c6653 | |||
| 9b36c1408e | |||
| 1b8a5338dd | |||
| 5d64e8eef1 | |||
| 2076f32acb | |||
| 28b8712820 | |||
| 5680713966 | |||
| f782dcffdc | |||
| 9e812c35a7 | |||
| 38a64383f1 | |||
| 7d84120a0e | |||
| a4dcb6a26a | |||
| 26a36d2595 | |||
| 10b49eabb1 | |||
| 2b937e35d6 | |||
| d47457b4aa | |||
| fb7a713f4c | |||
| 0cf9600c9b | |||
| 55515e15dc | |||
| d36b3034d0 | |||
| 9353a72693 | |||
| c580658cf0 | |||
| f51040346d | |||
| ee6c9e92ae | |||
| ab44453bde | |||
| 6e3a15df95 | |||
| 01a06cb489 | |||
| f0143c5a5e | |||
| 5dd2654b6f | |||
| 350823fe15 | |||
| 7adb08d1ad | |||
| 247f3431d5 | |||
| 7313f15abc | |||
| 7ea95c10dd | |||
| 06259d40ae | |||
| 678d682b35 | |||
| 9f4959bd87 | |||
| 051d6f74e4 | |||
| 40b81687d6 | |||
| c77c2a8a06 | |||
| 10720c81cd | |||
| 916ca9c774 | |||
| 0f07f03670 | |||
| 600b85f83a | |||
| 7cfc31d809 | |||
| 5543c95ccd | |||
| b791a215ff | |||
| b8846767fe | |||
| bcd7c897d1 | |||
| 7e11f3c83c | |||
| ffbbf7d9f2 | |||
| 2770a205b6 | |||
| 0b44aeaf9d | |||
| 0157d682d5 | |||
| ae0e8015c5 | |||
| 4f91fb9538 | |||
| ad4427fc31 | |||
| 553732088e | |||
| 3cbf774ef0 | |||
| c9d36709fc | |||
| 6b8b1afb50 | |||
| 63aa3dc1af | |||
| aee7b3c316 | |||
| 202c04bbcd | |||
| 8a14da2383 | |||
| 71eba0cb1d | |||
| 871454b2dc | |||
| f8f338c2c8 | |||
| 2207bea33c | |||
| a58897441e | |||
| 0e4e2ce352 | |||
| 946e06bbdc | |||
| 36f588f8fb | |||
| c9b3d8e710 | |||
| c8ac8de2c7 | |||
| c89aaced1a | |||
| 99fb1c8c7b | |||
| 2b22c47ac3 | |||
| a1cb73feea | |||
| ecbd999ca3 | |||
| 35d3396f21 | |||
| 2ce7e21395 | |||
| baa3eec946 | |||
| 67d288f6c2 | |||
| 22ecbc36c7 | |||
| 39789fcbd1 | |||
| b861e09e65 | |||
| e974568f89 | |||
| 28a27595e3 | |||
| 7c5d2ebc95 | |||
| da6bf80c2f | |||
| 325b025522 | |||
| 24a8a6a043 | |||
| 11cfdfb171 | |||
| ac224b87a9 | |||
| 6bc76a5086 | |||
| b23aa517f8 | |||
| 8a2dfa7ea1 | |||
| d59b0eefac | |||
| d6c09ba2f3 | |||
| 62238e0117 | |||
| 5610176e3c | |||
| bde0f62364 | |||
| 2a7d48cd1a | |||
| d47848dbc4 | |||
| 23aae2b6ea | |||
| 7cf1f6d8d5 | |||
| 2f3ef4c515 | |||
| 93fab635bd | |||
| e284dc2042 | |||
| 59af2fc881 | |||
| 4adb26ca32 | |||
| 493ed38380 | |||
| fc22282d3b | |||
| a6006f5a4b | |||
| 9684f897ac | |||
| cce561cdfe | |||
| c53c3bbe03 | |||
| fbfbff8046 | |||
| 8dc48409ab | |||
| 5a1de3de31 | |||
| 6cb12d596f | |||
| 75d82cfa72 | |||
| b0487262ec | |||
| fab4db0994 | |||
| 8504b17c4a | |||
| ae2a7a21cb | |||
| e024a6ca05 | |||
| fe8fcea294 | |||
| d75d48f497 | |||
| bc68cb69ca | |||
| 9b06a22e03 | |||
| a6b048b60b | |||
| d351dc5a59 | |||
| 6cbef68ec2 | |||
| c1bcad4ea7 | |||
| 5701d69f99 | |||
| 5755a823e1 | |||
| c0bbdc4c20 | |||
| 99f0d38c56 | |||
| 602d1c020f | |||
| 87bcae7a57 | |||
| bee49acf1e | |||
| 59aae6ab8c | |||
| 31b6ef812b | |||
| 03b29c9b75 | |||
| c26796c0e7 | |||
| e6d981b3c2 | |||
| a73230bf10 | |||
| 0b7e375d32 | |||
| 4a8da9b005 | |||
| c241a52e12 | |||
| fec1ffae54 | |||
| dbcdedffd6 | |||
| 0242b2596a | |||
| ee3cecc141 | |||
| 719e34fba7 | |||
| a36a01c543 | |||
| 32265ff372 | |||
| 95594d39df | |||
| 7d58ebbb19 | |||
| 5876688def | |||
| 029c0fdb85 | |||
| 5a0a757830 | |||
| bdd0fce48d |
@@ -203,7 +203,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ["**/amd/src/*.js"],
|
||||
files: ["**/amd/src/*.js", "Gruntfile.js"],
|
||||
// Check AMD with some slightly stricter rules.
|
||||
rules: {
|
||||
'no-unused-vars': 'error',
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
**/amd/**
|
||||
/*.js
|
||||
+6
-7
@@ -11,7 +11,10 @@ notifications:
|
||||
|
||||
language: php
|
||||
|
||||
dist: trusty
|
||||
dist: xenial
|
||||
|
||||
services:
|
||||
- mysql
|
||||
|
||||
php:
|
||||
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
|
||||
@@ -20,10 +23,6 @@ php:
|
||||
|
||||
addons:
|
||||
postgresql: "9.6"
|
||||
packages:
|
||||
- mysql-server-5.6
|
||||
- mysql-client-core-5.6
|
||||
- mysql-client-5.6
|
||||
|
||||
# Redis tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628
|
||||
# services:
|
||||
@@ -78,10 +77,10 @@ install:
|
||||
then
|
||||
sudo mkdir /mnt/ramdisk
|
||||
sudo mount -t tmpfs -o size=1024m tmpfs /mnt/ramdisk
|
||||
sudo stop mysql
|
||||
sudo service mysql stop
|
||||
sudo mv /var/lib/mysql /mnt/ramdisk
|
||||
sudo ln -s /mnt/ramdisk/mysql /var/lib/mysql
|
||||
sudo start mysql
|
||||
sudo service mysql restart
|
||||
fi
|
||||
- >
|
||||
if [ "$DB" = 'pgsql' ];
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
* Grunt configuration
|
||||
*/
|
||||
|
||||
/* eslint-env node */
|
||||
module.exports = function(grunt) {
|
||||
var path = require('path'),
|
||||
tasks = {},
|
||||
|
||||
@@ -623,7 +623,7 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
|
||||
echo "</label>\n";
|
||||
}
|
||||
if ($helpicon) {
|
||||
echo '<span class="pull-xs-right text-nowrap">'.$helpicon.'</span>';
|
||||
echo '<span class="float-sm-right text-nowrap">'.$helpicon.'</span>';
|
||||
}
|
||||
echo '</div>';
|
||||
if (isset($this->errors[$name])) {
|
||||
|
||||
@@ -9,6 +9,7 @@ Feature: Manage tokens
|
||||
| username | password | firstname | lastname |
|
||||
| testuser | testuser | Joe | Bloggs |
|
||||
| testuser2 | testuser2 | TestFirstname | TestLastname |
|
||||
And I change window size to "small"
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
|
||||
|
||||
@@ -20,12 +20,12 @@ Feature: Edit capabilities
|
||||
And I set the following system permissions of "Teacher" role:
|
||||
| capability | permission |
|
||||
| block/mnet_hosts:myaddinstance | Allow |
|
||||
| moodle/community:add | Inherit |
|
||||
| moodle/site:messageanyuser | Inherit |
|
||||
| moodle/grade:managesharedforms | Prevent |
|
||||
| moodle/course:request | Prohibit |
|
||||
When I follow "Edit Teacher role"
|
||||
Then "block/mnet_hosts:myaddinstance" capability has "Allow" permission
|
||||
And "moodle/community:add" capability has "Not set" permission
|
||||
And "moodle/site:messageanyuser" capability has "Not set" permission
|
||||
And "moodle/grade:managesharedforms" capability has "Prevent" permission
|
||||
And "moodle/course:request" capability has "Prohibit" permission
|
||||
|
||||
|
||||
@@ -114,15 +114,17 @@ class tool_capability_renderer extends plugin_renderer_base {
|
||||
}
|
||||
|
||||
// Start the list item, and print the context name as a link to the place to make changes.
|
||||
if ($contextid == context_system::instance()->id) {
|
||||
$url = new moodle_url('/admin/roles/manage.php');
|
||||
$title = get_string('changeroles', 'tool_capability');
|
||||
} else {
|
||||
$url = new moodle_url('/admin/roles/override.php', array('contextid' => $contextid));
|
||||
$title = get_string('changeoverrides', 'tool_capability');
|
||||
}
|
||||
$context = context::instance_by_id($contextid);
|
||||
$html = $this->output->heading(html_writer::link($url, $context->get_context_name(), array('title' => $title)), 3);
|
||||
|
||||
if ($context instanceof context_system) {
|
||||
$url = new moodle_url('/admin/roles/manage.php');
|
||||
} else {
|
||||
$url = new moodle_url('/admin/roles/permissions.php', ['contextid' => $contextid]);
|
||||
}
|
||||
|
||||
$title = get_string('permissionsincontext', 'core_role', $context->get_context_name());
|
||||
|
||||
$html = $this->output->heading(html_writer::link($url, $context->get_context_name(), ['title' => $title]), 3);
|
||||
$html .= html_writer::table($table);
|
||||
// If there are any child contexts, print them recursively.
|
||||
if (!empty($contexts[$contextid]->children)) {
|
||||
@@ -133,4 +135,4 @@ class tool_capability_renderer extends plugin_renderer_base {
|
||||
return $html;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,6 +440,9 @@ class purpose extends persistent {
|
||||
}
|
||||
if (!empty($data->sensitivedatareasons) && is_array($data->sensitivedatareasons)) {
|
||||
$data->sensitivedatareasons = implode(',', $data->sensitivedatareasons);
|
||||
} else {
|
||||
// Nothing selected. Set default value of null.
|
||||
$data->sensitivedatareasons = null;
|
||||
}
|
||||
|
||||
// A single value.
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
define(["jquery","core/notification","tool_lp/dialogue","core/str","core/ajax","core/templates"],function(a,b,c,d,e,f){var g=function(b){a(b).on("click",this.configureSettings.bind(this))};return g.prototype._dialogue=null,g.prototype.configureSettings=function(e){var g=a(e.target).closest("a").data("courseid"),h=a(e.target).closest("a").data("pushratingstouserplans"),i={courseid:g,settings:{pushratingstouserplans:h}};e.preventDefault(),f.render("tool_lp/course_competency_settings",i).done(function(a){d.get_string("configurecoursecompetencysettings","tool_lp").done(function(b){this._dialogue=new c(b,a,this.addListeners.bind(this))}.bind(this)).fail(b.exception)}.bind(this)).fail(b.exception)},g.prototype.addListeners=function(){var a=this._find('[data-action="save"]');a.on("click",this.saveSettings.bind(this));var b=this._find('[data-action="cancel"]');b.on("click",this.cancelChanges.bind(this))},g.prototype.cancelChanges=function(a){a.preventDefault(),this._dialogue.close()},g.prototype._find=function(b){return a('[data-region="coursecompetencysettings"]').find(b)},g.prototype.saveSettings=function(a){a.preventDefault();var c=this._find('input[name="pushratingstouserplans"]:checked').val(),d=this._find('input[name="courseid"]').val(),f={pushratingstouserplans:c};e.call([{methodname:"core_competency_update_course_competency_settings",args:{courseid:d,settings:f}}])[0].done(function(){this.refreshCourseCompetenciesPage()}.bind(this)).fail(b.exception)},g.prototype.refreshCourseCompetenciesPage=function(){var c=this._find('input[name="courseid"]').val();e.call([{methodname:"tool_lp_data_for_course_competencies_page",args:{courseid:c}}])[0].done(function(c){f.render("tool_lp/course_competencies_page",c).done(function(b,c){a('[data-region="coursecompetenciespage"]').replaceWith(b),f.runTemplateJS(c),this._dialogue.close()}.bind(this)).fail(b.exception)}.bind(this)).fail(b.exception)},g});
|
||||
define(["jquery","core/notification","tool_lp/dialogue","core/str","core/ajax","core/templates","core/pending"],function(a,b,c,d,e,f,g){var h=function(b){a(b).on("click",this.configureSettings.bind(this))};return h.prototype._dialogue=null,h.prototype.configureSettings=function(e){var h=new g,i=a(e.target).closest("a").data("courseid"),j=a(e.target).closest("a").data("pushratingstouserplans"),k={courseid:i,settings:{pushratingstouserplans:j}};e.preventDefault(),a.when(d.get_string("configurecoursecompetencysettings","tool_lp"),f.render("tool_lp/course_competency_settings",k)).then(function(a,b){return this._dialogue=new c(a,b[0],this.addListeners.bind(this)),this._dialogue}.bind(this)).then(h.resolve)["catch"](b.exception)},h.prototype.addListeners=function(){var a=this._find('[data-action="save"]');a.on("click",this.saveSettings.bind(this));var b=this._find('[data-action="cancel"]');b.on("click",this.cancelChanges.bind(this))},h.prototype.cancelChanges=function(a){a.preventDefault(),this._dialogue.close()},h.prototype._find=function(b){return a('[data-region="coursecompetencysettings"]').find(b)},h.prototype.saveSettings=function(a){var c=new g;a.preventDefault();var d=this._find('input[name="pushratingstouserplans"]:checked').val(),f=this._find('input[name="courseid"]').val(),h={pushratingstouserplans:d};e.call([{methodname:"core_competency_update_course_competency_settings",args:{courseid:f,settings:h}}])[0].then(function(){return this.refreshCourseCompetenciesPage()}.bind(this)).then(c.resolve)["catch"](b.exception)},h.prototype.refreshCourseCompetenciesPage=function(){var c=this._find('input[name="courseid"]').val(),d=new g;e.call([{methodname:"tool_lp_data_for_course_competencies_page",args:{courseid:c}}])[0].then(function(a){return f.render("tool_lp/course_competencies_page",a)}).then(function(b,c){f.replaceNode(a('[data-region="coursecompetenciespage"]'),b,c),this._dialogue.close()}.bind(this)).then(d.resolve)["catch"](b.exception)},h});
|
||||
+1
-1
@@ -1 +1 @@
|
||||
define(["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};return 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);c.val()?b.prop("disabled",!1):b.prop("disabled",!0)}).change(),b.click(function(a){a.preventDefault();var b=c.val();b&&(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 this._render().then(function(a){return f.get_string("rate","tool_lp").then(function(b){this._popup=new d(b,a,this._afterRender.bind(this))}.bind(this))}.bind(this)).fail(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)},g});
|
||||
define(["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};return 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);c.val()?b.prop("disabled",!1):b.prop("disabled",!0)}).change(),b.click(function(a){a.preventDefault();var b=c.val();b&&(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){return this._popup=new d(a,b[0],this._afterRender.bind(this)),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)},g});
|
||||
@@ -1 +1 @@
|
||||
define(["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)),this._planId?(this._methodName="core_competency_grade_competency_in_plan",this._args={competencyid:this._competencyId,planid:this._planId}):this._courseId?(this._methodName="core_competency_grade_competency_in_course",this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}):(this._methodName="core_competency_grade_competency",this._args={userid:this._userId,competencyid:this._competencyId})};return h.prototype=Object.create(f.prototype),h.prototype._setUp=function(){var a=[],d=this,f=g.get_values(d._scaleId);f.done(function(f){a.push({value:"",name:d._chooseStr});for(var g=0;g<f.length;g++){var h=f[g];a.push({value:h.id,name:h.name})}d._dialogue=new e(a),d._dialogue.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(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])})}).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,h});
|
||||
define(["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)),this._planId?(this._methodName="core_competency_grade_competency_in_plan",this._args={competencyid:this._competencyId,planid:this._planId}):this._courseId?(this._methodName="core_competency_grade_competency_in_course",this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}):(this._methodName="core_competency_grade_competency",this._args={userid:this._userId,competencyid:this._competencyId})};return 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;c<b.length;c++){var e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){return 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(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])}),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,h});
|
||||
@@ -27,8 +27,9 @@ define(['jquery',
|
||||
'core/templates',
|
||||
'core/str',
|
||||
'tool_lp/competencypicker',
|
||||
'tool_lp/dragdrop-reorder'],
|
||||
function($, notification, ajax, templates, str, Picker, dragdrop) {
|
||||
'tool_lp/dragdrop-reorder',
|
||||
'core/pending'],
|
||||
function($, notification, ajax, templates, str, Picker, dragdrop, Pending) {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -117,6 +118,7 @@ define(['jquery',
|
||||
* Pick a competency
|
||||
*
|
||||
* @method pickCompetency
|
||||
* @return {Promise}
|
||||
*/
|
||||
competencies.prototype.pickCompetency = function() {
|
||||
var self = this;
|
||||
@@ -132,6 +134,7 @@ define(['jquery',
|
||||
self.pickerInstance = new Picker(self.pageContextId, false, pageContextIncludes);
|
||||
self.pickerInstance.on('save', function(e, data) {
|
||||
var compIds = data.competencyIds;
|
||||
var pendingPromise = new Pending();
|
||||
|
||||
if (self.itemtype === "course") {
|
||||
requests = [];
|
||||
@@ -181,17 +184,20 @@ define(['jquery',
|
||||
pagerender = 'tool_lp/plan_page';
|
||||
pageregion = 'plan-page';
|
||||
}
|
||||
ajax.call(requests)[requests.length - 1].then(function(context) {
|
||||
ajax.call(requests)[requests.length - 1]
|
||||
.then(function(context) {
|
||||
return templates.render(pagerender, context);
|
||||
}).then(function(html, js) {
|
||||
$('[data-region="' + pageregion + '"]').replaceWith(html);
|
||||
templates.runTemplateJS(js);
|
||||
})
|
||||
.then(function(html, js) {
|
||||
templates.replaceNode($('[data-region="' + pageregion + '"]'), html, js);
|
||||
return;
|
||||
}).catch(notification.exception);
|
||||
})
|
||||
.then(pendingPromise.resolve)
|
||||
.catch(notification.exception);
|
||||
});
|
||||
}
|
||||
|
||||
self.pickerInstance.display();
|
||||
return self.pickerInstance.display();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -302,6 +308,7 @@ define(['jquery',
|
||||
if (localthis.itemtype == 'course') {
|
||||
// Course completion rule handling.
|
||||
$('[data-region="coursecompetenciespage"]').on('change', 'select[data-field="ruleoutcome"]', function(e) {
|
||||
var pendingPromise = new Pending();
|
||||
var requests = [];
|
||||
var pagerender = 'tool_lp/course_competencies_page';
|
||||
var pageregion = 'coursecompetenciespage';
|
||||
@@ -314,18 +321,24 @@ define(['jquery',
|
||||
args: {courseid: localthis.itemid}}
|
||||
]);
|
||||
|
||||
requests[1].done(function(context) {
|
||||
templates.render(pagerender, context).done(function(html, js) {
|
||||
$('[data-region="' + pageregion + '"]').replaceWith(html);
|
||||
templates.runTemplateJS(js);
|
||||
}).fail(notification.exception);
|
||||
}).fail(notification.exception);
|
||||
requests[1].then(function(context) {
|
||||
return templates.render(pagerender, context);
|
||||
})
|
||||
.then(function(html, js) {
|
||||
return templates.replaceNode($('[data-region="' + pageregion + '"]'), html, js);
|
||||
})
|
||||
.then(pendingPromise.resolve)
|
||||
.catch(notification.exception);
|
||||
});
|
||||
}
|
||||
|
||||
$('[data-region="actions"] button').click(function(e) {
|
||||
var pendingPromise = new Pending();
|
||||
e.preventDefault();
|
||||
localthis.pickCompetency();
|
||||
|
||||
localthis.pickCompetency()
|
||||
.then(pendingPromise.resolve)
|
||||
.catch();
|
||||
});
|
||||
$('[data-action="delete-competency-link"]').click(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -33,8 +33,12 @@ define(['jquery',
|
||||
'tool_lp/menubar',
|
||||
'tool_lp/competencypicker',
|
||||
'tool_lp/competency_outcomes',
|
||||
'tool_lp/competencyruleconfig'],
|
||||
function($, url, templates, notification, str, ajax, dragdrop, Ariatree, Dialogue, menubar, Picker, Outcomes, RuleConfig) {
|
||||
'tool_lp/competencyruleconfig',
|
||||
'core/pending',
|
||||
],
|
||||
function(
|
||||
$, url, templates, notification, str, ajax, dragdrop, Ariatree, Dialogue, menubar, Picker, Outcomes, RuleConfig, Pending
|
||||
) {
|
||||
|
||||
// Private variables and functions.
|
||||
/** @var {Object} treeModel - This is an object representing the nodes in the tree. */
|
||||
@@ -412,6 +416,7 @@ define(['jquery',
|
||||
if (!pickerInstance) {
|
||||
pickerInstance = new Picker(pageContextId, relatedTarget.competencyframeworkid);
|
||||
pickerInstance.on('save', function(e, data) {
|
||||
var pendingPromise = new Pending();
|
||||
var compIds = data.competencyIds;
|
||||
|
||||
var calls = [];
|
||||
@@ -436,7 +441,9 @@ define(['jquery',
|
||||
templates.runTemplateJS(js);
|
||||
updatedRelatedCompetencies();
|
||||
return;
|
||||
}).catch(notification.exception);
|
||||
})
|
||||
.then(pendingPromise.resolve)
|
||||
.catch(notification.exception);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -31,8 +31,10 @@ define(['jquery',
|
||||
'core/templates',
|
||||
'tool_lp/dialogue',
|
||||
'core/str',
|
||||
'tool_lp/tree'],
|
||||
function($, Notification, Ajax, Templates, Dialogue, Str, Tree) {
|
||||
'tool_lp/tree',
|
||||
'core/pending'
|
||||
],
|
||||
function($, Notification, Ajax, Templates, Dialogue, Str, Tree, Pending) {
|
||||
|
||||
/**
|
||||
* Competency picker class.
|
||||
@@ -157,6 +159,7 @@ define(['jquery',
|
||||
// Add listener for add.
|
||||
self._find('[data-region="competencylinktree"] [data-action="add"]').click(function(e) {
|
||||
e.preventDefault();
|
||||
var pendingPromise = new Pending();
|
||||
if (!self._selectedCompetencies.length) {
|
||||
return;
|
||||
}
|
||||
@@ -168,7 +171,10 @@ define(['jquery',
|
||||
self._trigger('save', {competencyId: self._selectedCompetencies[0]});
|
||||
}
|
||||
|
||||
// The dialogue here is a YUI dialogue and doesn't support Promises at all.
|
||||
// However, it is typically synchronous so this shoudl suffice.
|
||||
self.close();
|
||||
pendingPromise.resolve();
|
||||
});
|
||||
|
||||
// The list of selected competencies will be modified while looping (because of the listeners above).
|
||||
|
||||
@@ -26,8 +26,10 @@ define(['jquery',
|
||||
'tool_lp/dialogue',
|
||||
'core/str',
|
||||
'core/ajax',
|
||||
'core/templates'],
|
||||
function($, notification, Dialogue, str, ajax, templates) {
|
||||
'core/templates',
|
||||
'core/pending'
|
||||
],
|
||||
function($, notification, Dialogue, str, ajax, templates, Pending) {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -48,6 +50,7 @@ define(['jquery',
|
||||
* @method configureSettings
|
||||
*/
|
||||
settingsMod.prototype.configureSettings = function(e) {
|
||||
var pendingPromise = new Pending();
|
||||
var courseid = $(e.target).closest('a').data('courseid');
|
||||
var currentValue = $(e.target).closest('a').data('pushratingstouserplans');
|
||||
var context = {
|
||||
@@ -56,16 +59,21 @@ define(['jquery',
|
||||
};
|
||||
e.preventDefault();
|
||||
|
||||
templates.render('tool_lp/course_competency_settings', context).done(function(html) {
|
||||
str.get_string('configurecoursecompetencysettings', 'tool_lp').done(function(title) {
|
||||
this._dialogue = new Dialogue(
|
||||
title,
|
||||
html,
|
||||
this.addListeners.bind(this)
|
||||
);
|
||||
}.bind(this)).fail(notification.exception);
|
||||
}.bind(this)).fail(notification.exception);
|
||||
$.when(
|
||||
str.get_string('configurecoursecompetencysettings', 'tool_lp'),
|
||||
templates.render('tool_lp/course_competency_settings', context)
|
||||
)
|
||||
.then(function(title, templateResult) {
|
||||
this._dialogue = new Dialogue(
|
||||
title,
|
||||
templateResult[0],
|
||||
this.addListeners.bind(this)
|
||||
);
|
||||
|
||||
return this._dialogue;
|
||||
}.bind(this))
|
||||
.then(pendingPromise.resolve)
|
||||
.catch(notification.exception);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -108,6 +116,7 @@ define(['jquery',
|
||||
* @method saveSettings
|
||||
*/
|
||||
settingsMod.prototype.saveSettings = function(e) {
|
||||
var pendingPromise = new Pending();
|
||||
e.preventDefault();
|
||||
|
||||
var newValue = this._find('input[name="pushratingstouserplans"]:checked').val();
|
||||
@@ -117,9 +126,12 @@ define(['jquery',
|
||||
ajax.call([
|
||||
{methodname: 'core_competency_update_course_competency_settings',
|
||||
args: {courseid: courseId, settings: settings}}
|
||||
])[0].done(function() {
|
||||
this.refreshCourseCompetenciesPage();
|
||||
}.bind(this)).fail(notification.exception);
|
||||
])[0]
|
||||
.then(function() {
|
||||
return this.refreshCourseCompetenciesPage();
|
||||
}.bind(this))
|
||||
.then(pendingPromise.resolve)
|
||||
.catch(notification.exception);
|
||||
|
||||
};
|
||||
|
||||
@@ -131,18 +143,23 @@ define(['jquery',
|
||||
*/
|
||||
settingsMod.prototype.refreshCourseCompetenciesPage = function() {
|
||||
var courseId = this._find('input[name="courseid"]').val();
|
||||
var pendingPromise = new Pending();
|
||||
|
||||
ajax.call([
|
||||
{methodname: 'tool_lp_data_for_course_competencies_page',
|
||||
args: {courseid: courseId}}
|
||||
])[0].done(function(context) {
|
||||
templates.render('tool_lp/course_competencies_page', context).done(function(html, js) {
|
||||
$('[data-region="coursecompetenciespage"]').replaceWith(html);
|
||||
templates.runTemplateJS(js);
|
||||
this._dialogue.close();
|
||||
}.bind(this)).fail(notification.exception);
|
||||
}.bind(this)).fail(notification.exception);
|
||||
])[0]
|
||||
.then(function(context) {
|
||||
return templates.render('tool_lp/course_competencies_page', context);
|
||||
})
|
||||
.then(function(html, js) {
|
||||
templates.replaceNode($('[data-region="coursecompetenciespage"]'), html, js);
|
||||
this._dialogue.close();
|
||||
|
||||
return;
|
||||
}.bind(this))
|
||||
.then(pendingPromise.resolve)
|
||||
.catch(notification.exception);
|
||||
};
|
||||
|
||||
return /** @alias module:tool_lp/configurecoursecompetencysettings */ settingsMod;
|
||||
|
||||
@@ -102,15 +102,20 @@ define(['jquery',
|
||||
* @return {Promise}
|
||||
*/
|
||||
Grade.prototype.display = function() {
|
||||
return this._render().then(function(html) {
|
||||
return Str.get_string('rate', 'tool_lp').then(function(title) {
|
||||
this._popup = new Dialogue(
|
||||
title,
|
||||
html,
|
||||
this._afterRender.bind(this)
|
||||
);
|
||||
}.bind(this));
|
||||
}.bind(this)).fail(Notification.exception);
|
||||
return $.when(
|
||||
Str.get_string('rate', 'tool_lp'),
|
||||
this._render()
|
||||
)
|
||||
.then(function(title, templateResult) {
|
||||
this._popup = new Dialogue(
|
||||
title,
|
||||
templateResult[0],
|
||||
this._afterRender.bind(this)
|
||||
);
|
||||
|
||||
return this._popup;
|
||||
}.bind(this))
|
||||
.catch(Notification.exception);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -95,7 +95,7 @@ define(['jquery',
|
||||
self = this;
|
||||
|
||||
var promise = ScaleValues.get_values(self._scaleId);
|
||||
promise.done(function(scalevalues) {
|
||||
promise.then(function(scalevalues) {
|
||||
options.push({
|
||||
value: '',
|
||||
name: self._chooseStr
|
||||
@@ -109,8 +109,13 @@ define(['jquery',
|
||||
});
|
||||
}
|
||||
|
||||
self._dialogue = new GradeDialogue(options);
|
||||
self._dialogue.on('rated', function(e, data) {
|
||||
return options;
|
||||
})
|
||||
.then(function(options) {
|
||||
return new GradeDialogue(options);
|
||||
})
|
||||
.then(function(dialogue) {
|
||||
dialogue.on('rated', function(e, data) {
|
||||
var args = self._args;
|
||||
args.grade = data.rating;
|
||||
args.note = data.note;
|
||||
@@ -123,7 +128,15 @@ define(['jquery',
|
||||
fail: notification.exception
|
||||
}]);
|
||||
});
|
||||
}).fail(notification.exception);
|
||||
|
||||
return dialogue;
|
||||
})
|
||||
.then(function(dialogue) {
|
||||
self._dialogue = dialogue;
|
||||
|
||||
return;
|
||||
})
|
||||
.fail(notification.exception);
|
||||
};
|
||||
|
||||
/** @type {Number} The scale id for this competency. */
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
<div class="pull-xs-right card card-block">
|
||||
<p>{{{groupselector}}}</p>
|
||||
<form class="user-competency-course-navigation">
|
||||
<input type="hidden" name="userid" value="{{userid}}"/>
|
||||
<input type="hidden" name="competencyid" value="{{competencyid}}"/>
|
||||
<input type="hidden" name="courseid" value="{{courseid}}"/>
|
||||
{{#hasusers}}
|
||||
<span>
|
||||
<label for="user-nav-{{uniqid}}" class="accesshide">{{#str}}jumptouser, tool_lp{{/str}}</label>
|
||||
|
||||
@@ -6,6 +6,7 @@ Feature: Manage competency frameworks
|
||||
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And I change window size to "small"
|
||||
And I am on site homepage
|
||||
|
||||
Scenario: Create a new framework
|
||||
|
||||
@@ -6,6 +6,7 @@ Feature: Manage plearning plan templates
|
||||
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And I change window size to "small"
|
||||
And I am on site homepage
|
||||
|
||||
Scenario: Create a new learning plan template
|
||||
|
||||
@@ -105,7 +105,7 @@ $string['requirevalidation'] = 'Validate sender address';
|
||||
$string['name'] = 'Name';
|
||||
$string['ssl'] = 'SSL (Auto-detect SSL version)';
|
||||
$string['sslv2'] = 'SSLv2 (Force SSL Version 2)';
|
||||
$string['sslv3'] = 'SSLv2 (Force SSL Version 3)';
|
||||
$string['sslv3'] = 'SSLv3 (Force SSL Version 3)';
|
||||
$string['taskcleanup'] = 'Cleanup of unverified incoming email';
|
||||
$string['taskpickup'] = 'Incoming email pickup';
|
||||
$string['tls'] = 'TLS (TLS; started via protocol-level negotiation over unencrypted channel; RECOMMENDED way of initiating secure connection)';
|
||||
|
||||
@@ -382,6 +382,8 @@ class api {
|
||||
$features = array(
|
||||
'NoDelegate_CoreOffline' => new lang_string('offlineuse', 'tool_mobile'),
|
||||
'$mmLoginEmailSignup' => new lang_string('startsignup'),
|
||||
'NoDelegate_CoreComments' => new lang_string('comments'),
|
||||
'NoDelegate_CoreRating' => new lang_string('ratings', 'rating'),
|
||||
"$mainmenu" => array(
|
||||
'$mmSideMenuDelegate_mmCourses' => new lang_string('mycourses'),
|
||||
'$mmSideMenuDelegate_mmaFrontpage' => new lang_string('sitehome'),
|
||||
@@ -390,6 +392,7 @@ class api {
|
||||
'$mmSideMenuDelegate_mmaNotifications' => new lang_string('notifications', 'message'),
|
||||
'$mmSideMenuDelegate_mmaMessages' => new lang_string('messages', 'message'),
|
||||
'$mmSideMenuDelegate_mmaCalendar' => new lang_string('calendar', 'calendar'),
|
||||
'CoreMainMenuDelegate_AddonBlog' => new lang_string('blog', 'blog'),
|
||||
'$mmSideMenuDelegate_mmaFiles' => new lang_string('files'),
|
||||
'$mmSideMenuDelegate_website' => new lang_string('webpage'),
|
||||
'$mmSideMenuDelegate_help' => new lang_string('help'),
|
||||
@@ -403,6 +406,7 @@ class api {
|
||||
'$mmCoursesDelegate_mmaNotes' => new lang_string('notes', 'notes'),
|
||||
'NoDelegate_CoreCourseDownload' => new lang_string('downloadcourse', 'tool_mobile'),
|
||||
'NoDelegate_CoreCoursesDownload' => new lang_string('downloadcourses', 'tool_mobile'),
|
||||
'CoreCourseOptionsDelegate_AddonBlog' => new lang_string('blog', 'blog'),
|
||||
),
|
||||
"$user" => array(
|
||||
'$mmUserDelegate_mmaBadges' => new lang_string('badges', 'badges'),
|
||||
@@ -414,6 +418,7 @@ class api {
|
||||
'$mmUserDelegate_mmaMessages:blockContact' => new lang_string('blockcontact', 'message'),
|
||||
'$mmUserDelegate_mmaNotes:addNote' => new lang_string('addnewnote', 'notes'),
|
||||
'$mmUserDelegate_picture' => new lang_string('userpic'),
|
||||
'CoreCourseOptionsDelegate_AddonBlog' => new lang_string('blog', 'blog'),
|
||||
),
|
||||
"$files" => array(
|
||||
'files_privatefiles' => new lang_string('privatefiles'),
|
||||
|
||||
@@ -81,7 +81,7 @@ $string['mobileappearance'] = 'Mobile appearance';
|
||||
$string['mobileauthentication'] = 'Mobile authentication';
|
||||
$string['mobilecssurl'] = 'CSS';
|
||||
$string['mobilefeatures'] = 'Mobile features';
|
||||
$string['mobilenotificationsdisabledwarning'] = 'Mobile notifications are not enabled. They should be enabled in Manage message outputs.';
|
||||
$string['mobilenotificationsdisabledwarning'] = 'Mobile notifications are not enabled. They should be enabled in Notification settings.';
|
||||
$string['mobilesettings'] = 'Mobile settings';
|
||||
$string['offlineuse'] = 'Offline use';
|
||||
$string['pluginname'] = 'Moodle app tools';
|
||||
|
||||
@@ -30,7 +30,7 @@ require_once($CFG->libdir . '/externallib.php');
|
||||
|
||||
$serviceshortname = required_param('service', PARAM_ALPHANUMEXT);
|
||||
$passport = required_param('passport', PARAM_RAW); // Passport send from the app to validate the response URL.
|
||||
$urlscheme = optional_param('urlscheme', 'moodlemobile', PARAM_NOTAGS); // The URL scheme the app supports.
|
||||
$urlscheme = optional_param('urlscheme', 'moodlemobile', PARAM_ALPHANUM); // The URL scheme the app supports.
|
||||
$confirmed = optional_param('confirmed', false, PARAM_BOOL); // If we are being redirected after user confirmation.
|
||||
$oauthsso = optional_param('oauthsso', 0, PARAM_INT); // Id of the OpenID issuer (for OAuth direct SSO).
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ if ($hassiteconfig) {
|
||||
|
||||
$temp->add(new admin_setting_configtext('tool_mobile/forcedurlscheme',
|
||||
new lang_string('forcedurlscheme_key', 'tool_mobile'),
|
||||
new lang_string('forcedurlscheme', 'tool_mobile'), '', PARAM_NOTAGS));
|
||||
new lang_string('forcedurlscheme', 'tool_mobile'), '', PARAM_ALPHANUM));
|
||||
|
||||
$ADMIN->add('mobileapp', $temp);
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
define(["jquery","core/ajax","core/notification","core/modal_factory","core/modal_events"],function(a,b,c,d,e){var f={VIEW_POLICY:'[data-action="view"]'},g=function(){this.registerEvents()};return g.prototype.registerEvents=function(){a(f.VIEW_POLICY).click(function(f){f.preventDefault();var g=a(this).data("versionid"),h=a(this).data("behalfid"),i={versionid:g,behalfid:h},j={methodname:"tool_policy_get_policy_version",args:i},k=a.Deferred(),l=a.Deferred(),m=d.create({title:k,body:l,large:!0}).then(function(a){return a.getRoot().on(e.hidden,function(){a.destroy()}),a}).then(function(a){return a.show(),a})["catch"](c.exception),n=b.call([j]);a.when(n[0]).then(function(a){if(a.result.policy)return k.resolve(a.result.policy.name),l.resolve(a.result.policy.content),a;throw new Error(a.warnings[0].message)})["catch"](function(a){return m.then(function(a){return a.hide(),a.destroy(),a})["catch"](c.exception),c.addNotification({message:a,type:"error"})})})},{init:function(){return new g}}});
|
||||
define(["jquery","core/ajax","core/notification","core/modal_factory","core/modal_events"],function(a,b,c,d,e){var f=function(a){this.registerEvents(a)};return f.prototype.registerEvents=function(f){f.on("click",function(f){f.preventDefault();var g=a(this).data("versionid"),h=a(this).data("behalfid"),i={versionid:g,behalfid:h},j={methodname:"tool_policy_get_policy_version",args:i},k=a.Deferred(),l=a.Deferred(),m=d.create({title:k,body:l,large:!0}).then(function(a){return a.getRoot().on(e.hidden,function(){a.destroy()}),a}).then(function(a){return a.show(),a})["catch"](c.exception),n=b.call([j]);a.when(n[0]).then(function(a){if(a.result.policy)return k.resolve(a.result.policy.name),l.resolve(a.result.policy.content),a;throw new Error(a.warnings[0].message)})["catch"](function(a){return m.then(function(a){return a.hide(),a.destroy(),a})["catch"](c.exception),c.addNotification({message:a,type:"error"})})})},{init:function(b){return b=a(b),new f(b)}}});
|
||||
@@ -29,27 +29,18 @@ define([
|
||||
'core/modal_events'],
|
||||
function($, Ajax, Notification, ModalFactory, ModalEvents) {
|
||||
|
||||
/**
|
||||
* List of action selectors.
|
||||
*
|
||||
* @type {{VIEW_POLICY: string}}
|
||||
*/
|
||||
var ACTIONS = {
|
||||
VIEW_POLICY: '[data-action="view"]'
|
||||
};
|
||||
|
||||
/**
|
||||
* PolicyActions class.
|
||||
*/
|
||||
var PolicyActions = function() {
|
||||
this.registerEvents();
|
||||
var PolicyActions = function(root) {
|
||||
this.registerEvents(root);
|
||||
};
|
||||
|
||||
/**
|
||||
* Register event listeners.
|
||||
*/
|
||||
PolicyActions.prototype.registerEvents = function() {
|
||||
$(ACTIONS.VIEW_POLICY).click(function(e) {
|
||||
PolicyActions.prototype.registerEvents = function(root) {
|
||||
root.on("click", function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var versionid = $(this).data('versionid');
|
||||
@@ -127,8 +118,9 @@ function($, Ajax, Notification, ModalFactory, ModalEvents) {
|
||||
* @method init
|
||||
* @return {PolicyActions}
|
||||
*/
|
||||
'init': function() {
|
||||
return new PolicyActions();
|
||||
'init': function(root) {
|
||||
root = $(root);
|
||||
return new PolicyActions(root);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -111,7 +111,7 @@ class accept_policy extends \moodleform {
|
||||
}
|
||||
}
|
||||
|
||||
$PAGE->requires->js_call_amd('tool_policy/policyactions', 'init');
|
||||
$PAGE->requires->js_call_amd('tool_policy/policyactions', 'init', ['[data-action="view"]']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -197,4 +197,4 @@ class accept_policy extends \moodleform {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ require(['jquery', 'tool_policy/jquery-eu-cookie-law-popup', 'tool_policy/policy
|
||||
"<ul>{{#policies}}" +
|
||||
"<li>" +
|
||||
"<a href=\"{{pluginbaseurl}}/view.php?versionid={{id}}{{#returnurl}}&returnurl={{.}}{{/returnurl}}\" " +
|
||||
" data-action=\"view\" data-versionid=\"{{id}}\" data-behalfid=\"1\" >" +
|
||||
" data-action=\"view-guest\" data-versionid=\"{{id}}\" data-behalfid=\"1\" >" +
|
||||
"{{{name}}}" +
|
||||
"</a>" +
|
||||
"</li>" +
|
||||
@@ -81,7 +81,7 @@ require(['jquery', 'tool_policy/jquery-eu-cookie-law-popup', 'tool_policy/policy
|
||||
{{/haspolicies}}
|
||||
|
||||
// Initialise the JS for the modal window which displays the policy versions.
|
||||
ActionsMod.init();
|
||||
ActionsMod.init('[data-action="view-guest"]');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -143,6 +143,6 @@
|
||||
{{#js}}
|
||||
// Initialise the JS for the modal window which displays the policy versions.
|
||||
require(['tool_policy/policyactions'], function(ActionsMod) {
|
||||
ActionsMod.init();
|
||||
ActionsMod.init('[data-action="view"]');
|
||||
});
|
||||
{{/js}}
|
||||
|
||||
@@ -73,6 +73,6 @@
|
||||
{{#js}}
|
||||
// Initialise the JS for the modal window which displays the policy versions.
|
||||
require(['tool_policy/policyactions'], function(ActionsMod) {
|
||||
ActionsMod.init();
|
||||
ActionsMod.init('[data-action="view"]');
|
||||
});
|
||||
{{/js}}
|
||||
|
||||
@@ -77,18 +77,22 @@ class provider implements
|
||||
}
|
||||
|
||||
if ($descriptionidentifier !== null) {
|
||||
$time = transform::datetime($value);
|
||||
$tour = \tool_usertours\tour::instance($tourid);
|
||||
try {
|
||||
$tour = \tool_usertours\tour::instance($tourid);
|
||||
$time = transform::datetime($value);
|
||||
|
||||
writer::export_user_preference(
|
||||
'tool_usertours',
|
||||
$name,
|
||||
$time,
|
||||
get_string($descriptionidentifier, 'tool_usertours', (object) [
|
||||
'name' => $tour->get_name(),
|
||||
'time' => $time,
|
||||
])
|
||||
);
|
||||
writer::export_user_preference(
|
||||
'tool_usertours',
|
||||
$name,
|
||||
$time,
|
||||
get_string($descriptionidentifier, 'tool_usertours', (object) [
|
||||
'name' => $tour->get_name(),
|
||||
'time' => $time,
|
||||
])
|
||||
);
|
||||
} catch (\dml_missing_record_exception $ex) {
|
||||
// The tour related to this user preference no longer exists.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,4 +112,37 @@ class tool_usertours_privacy_testcase extends \core_privacy\tests\provider_testc
|
||||
|
||||
$this->assertCount(2, (array) $prefs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure that export_user_preferences excludes deleted tours.
|
||||
*/
|
||||
public function test_export_user_preferences_deleted_tour() {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest();
|
||||
$this->setAdminUser();
|
||||
|
||||
$user = \core_user::get_user_by_username('admin');
|
||||
|
||||
$alltours = $DB->get_records('tool_usertours_tours');
|
||||
|
||||
$tour1 = tour::instance(array_shift($alltours)->id);
|
||||
$tour1->mark_user_completed();
|
||||
|
||||
$tour2 = tour::instance(array_shift($alltours)->id);
|
||||
$tour2->mark_user_completed();
|
||||
$tour2->remove();
|
||||
|
||||
$writer = writer::with_context(\context_system::instance());
|
||||
|
||||
provider::export_user_preferences($user->id);
|
||||
$this->assertTrue($writer->has_any_data());
|
||||
|
||||
// We should have one preference.
|
||||
$prefs = $writer->get_user_preferences('tool_usertours');
|
||||
$this->assertCount(1, (array) $prefs);
|
||||
|
||||
// The preference should be related to the first tour.
|
||||
$this->assertContains($tour1->get_name(), reset($prefs)->description);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,8 @@ class login implements renderable, templatable {
|
||||
public $username;
|
||||
/** @var string The csrf token to limit login to requests that come from the login form. */
|
||||
public $logintoken;
|
||||
/** @var string Maintenance message, if Maintenance is enabled. */
|
||||
public $maintenance;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
@@ -109,6 +111,10 @@ class login implements renderable, templatable {
|
||||
$this->instructions = get_string('loginsteps', 'core', 'signup.php');
|
||||
}
|
||||
|
||||
if ($CFG->maintenance_enabled == true && !empty($CFG->maintenance_message)) {
|
||||
$this->maintenance = $CFG->maintenance_message;
|
||||
}
|
||||
|
||||
// Identity providers.
|
||||
$this->identityproviders = \auth_plugin_base::get_identity_providers($authsequence);
|
||||
$this->logintoken = \core\session\manager::get_login_token();
|
||||
@@ -145,6 +151,7 @@ class login implements renderable, templatable {
|
||||
$data->signupurl = $this->signupurl->out(false);
|
||||
$data->username = $this->username;
|
||||
$data->logintoken = $this->logintoken;
|
||||
$data->maintenance = format_text($this->maintenance, FORMAT_MOODLE);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -92,3 +92,25 @@ Feature: availability_grouping
|
||||
# P1 should show but not B2.
|
||||
Then I should see "P1" in the "region-main" "region"
|
||||
And I should not see "P2" in the "region-main" "region"
|
||||
|
||||
@javascript
|
||||
Scenario: Check grouping access restriction message on course homepage
|
||||
Given the following "groupings" exist:
|
||||
| name | course | idnumber |
|
||||
| Grouping A | C1 | GA |
|
||||
And the following "grouping groups" exist:
|
||||
| grouping | group |
|
||||
| GA | GI1 |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | groupmode | grouping |
|
||||
| assign | Test assign | Assign description | C1 | assign1 | 1 | GA |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I turn editing mode on
|
||||
And I open "Test assign" actions menu
|
||||
And I choose "Edit settings" in the open action menu
|
||||
And I expand all fieldsets
|
||||
And the field "groupingid" matches value "Grouping A"
|
||||
And I press "Add group/grouping access restriction"
|
||||
When I press "Save and return to course"
|
||||
Then I should see "Not available unless: You belong to a group in Grouping A"
|
||||
|
||||
@@ -128,15 +128,6 @@ abstract class backup_check {
|
||||
// Now, if backup mode is hub or import, check userid has permissions for those modes
|
||||
// other modes will perform common checks only (backupxxxx capabilities in $typecapstocheck)
|
||||
switch ($mode) {
|
||||
case backup::MODE_HUB:
|
||||
if (!has_capability('moodle/backup:backuptargethub', $coursectx, $userid)) {
|
||||
$a = new stdclass();
|
||||
$a->userid = $userid;
|
||||
$a->courseid = $courseid;
|
||||
$a->capability = 'moodle/backup:backuptargethub';
|
||||
throw new backup_controller_exception('backup_user_missing_capability', $a);
|
||||
}
|
||||
break;
|
||||
case backup::MODE_IMPORT:
|
||||
if (!has_capability('moodle/backup:backuptargetimport', $coursectx, $userid)) {
|
||||
$a = new stdclass();
|
||||
|
||||
@@ -90,15 +90,6 @@ abstract class restore_check {
|
||||
// Now, if restore mode is hub or import, check userid has permissions for those modes
|
||||
// other modes will perform common checks only (restorexxxx capabilities in $typecapstocheck)
|
||||
switch ($mode) {
|
||||
case backup::MODE_HUB:
|
||||
if (!has_capability('moodle/restore:restoretargethub', $coursectx, $userid)) {
|
||||
$a = new stdclass();
|
||||
$a->userid = $userid;
|
||||
$a->courseid = $courseid;
|
||||
$a->capability = 'moodle/restore:restoretargethub';
|
||||
throw new restore_controller_exception('restore_user_missing_capability', $a);
|
||||
}
|
||||
break;
|
||||
case backup::MODE_IMPORT:
|
||||
if (!has_capability('moodle/restore:restoretargetimport', $coursectx, $userid)) {
|
||||
$a = new stdclass();
|
||||
|
||||
@@ -375,8 +375,10 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
$html .= $this->output->heading(get_string('importdatafrom'), 2, array('class' => 'header'));
|
||||
$html .= $this->backup_detail_pair(get_string('selectacourse', 'backup'), $this->render($courses));
|
||||
$attrs = array('type' => 'submit', 'value' => get_string('continue'), 'class' => 'btn btn-primary');
|
||||
$html .= html_writer::start_tag('div', array('class' => 'mt-3'));
|
||||
$html .= $this->backup_detail_pair('', html_writer::empty_tag('input', $attrs));
|
||||
$html .= html_writer::end_tag('div');
|
||||
$html .= html_writer::end_tag('div');
|
||||
$html .= html_writer::end_tag('form');
|
||||
$html .= html_writer::end_tag('div');
|
||||
return $html;
|
||||
@@ -704,7 +706,7 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
if ($component->get_count() === 0) {
|
||||
$output .= $this->output->notification(get_string('nomatchingcourses', 'backup'));
|
||||
|
||||
$output .= html_writer::start_tag('div', array('class' => 'ics-search'));
|
||||
$output .= html_writer::start_tag('div', array('class' => 'ics-search form-inline'));
|
||||
$attrs = array(
|
||||
'type' => 'text',
|
||||
'name' => restore_course_search::$VAR_SEARCH,
|
||||
@@ -716,7 +718,7 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
'type' => 'submit',
|
||||
'name' => 'searchcourses',
|
||||
'value' => get_string('search'),
|
||||
'class' => 'btn btn-secondary'
|
||||
'class' => 'btn btn-secondary ml-1'
|
||||
);
|
||||
$output .= html_writer::empty_tag('input', $attrs);
|
||||
$output .= html_writer::end_tag('div');
|
||||
@@ -762,7 +764,7 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
$output .= html_writer::table($table);
|
||||
$output .= html_writer::end_tag('div');
|
||||
|
||||
$output .= html_writer::start_tag('div', array('class' => 'ics-search'));
|
||||
$output .= html_writer::start_tag('div', array('class' => 'ics-search form-inline'));
|
||||
$attrs = array(
|
||||
'type' => 'text',
|
||||
'name' => restore_course_search::$VAR_SEARCH,
|
||||
@@ -773,7 +775,7 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
'type' => 'submit',
|
||||
'name' => 'searchcourses',
|
||||
'value' => get_string('search'),
|
||||
'class' => 'btn btn-secondary'
|
||||
'class' => 'btn btn-secondary ml-1'
|
||||
);
|
||||
$output .= html_writer::empty_tag('input', $attrs);
|
||||
$output .= html_writer::end_tag('div');
|
||||
|
||||
@@ -112,7 +112,7 @@ class award_criteria_badge extends award_criteria {
|
||||
if ($this->id !== 0) {
|
||||
$selected = array_keys($this->params);
|
||||
}
|
||||
$settings = array('multiple' => 'multiple', 'size' => 20, 'class' => 'selectbadge');
|
||||
$settings = array('multiple' => 'multiple', 'size' => 20, 'class' => 'selectbadge', 'required' => 'required');
|
||||
$mform->addElement('select', 'badge_badges', get_string('addbadge', 'badges'), $select, $settings);
|
||||
$mform->addRule('badge_badges', get_string('requiredbadge', 'badges'), 'required');
|
||||
$mform->addHelpButton('badge_badges', 'addbadge', 'badges');
|
||||
@@ -243,7 +243,6 @@ class award_criteria_badge extends award_criteria {
|
||||
if ($this->method == BADGE_CRITERIA_AGGREGATION_ANY) {
|
||||
// User has received ANY of the required badges.
|
||||
$join = " LEFT JOIN {badge_issued} bi2 ON bi2.userid = u.id";
|
||||
$where = "AND (";
|
||||
$i = 0;
|
||||
foreach ($this->params as $param) {
|
||||
if ($i == 0) {
|
||||
@@ -254,7 +253,10 @@ class award_criteria_badge extends award_criteria {
|
||||
$params['badgeid'.$i] = $param['badge'];
|
||||
$i++;
|
||||
}
|
||||
$where .= ") ";
|
||||
// MDL-66032 Do not create expression if there are no badges in criteria.
|
||||
if (!empty($where)) {
|
||||
$where = ' AND (' . $where . ') ';
|
||||
}
|
||||
return array($join, $where, $params);
|
||||
} else {
|
||||
// User has received ALL of the required badges.
|
||||
|
||||
@@ -48,54 +48,11 @@ class block_community extends block_list {
|
||||
}
|
||||
|
||||
function get_content() {
|
||||
global $CFG, $OUTPUT, $USER;
|
||||
|
||||
$coursecontext = context::instance_by_id($this->instance->parentcontextid);
|
||||
|
||||
if (!has_capability('moodle/community:add', $coursecontext)
|
||||
or $this->content !== NULL) {
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
$this->content = new stdClass();
|
||||
$this->content->items = array();
|
||||
$this->content->icons = array();
|
||||
$this->content->footer = '';
|
||||
|
||||
if (!isloggedin()) {
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
$icon = $OUTPUT->pix_icon('i/group', get_string('group'));
|
||||
$addcourseurl = new moodle_url('/blocks/community/communitycourse.php',
|
||||
array('add' => true, 'courseid' => $this->page->course->id));
|
||||
$searchlink = html_writer::tag('a', $icon . get_string('addcourse', 'block_community'),
|
||||
array('href' => $addcourseurl->out(false)));
|
||||
$this->content->items[] = $searchlink;
|
||||
|
||||
require_once($CFG->dirroot . '/blocks/community/locallib.php');
|
||||
$communitymanager = new block_community_manager();
|
||||
$courses = $communitymanager->block_community_get_courses($USER->id);
|
||||
if ($courses) {
|
||||
$this->content->items[] = html_writer::empty_tag('hr');
|
||||
$this->content->icons[] = '';
|
||||
$this->content->items[] = get_string('mycommunities', 'block_community');
|
||||
$this->content->icons[] = '';
|
||||
foreach ($courses as $course) {
|
||||
//delete link
|
||||
$deleteicon = $OUTPUT->pix_icon('t/delete', get_string('removecommunitycourse', 'block_community'));
|
||||
$deleteurl = new moodle_url('/blocks/community/communitycourse.php',
|
||||
array('remove' => true,
|
||||
'courseid' => $this->page->course->id,
|
||||
'communityid' => $course->id, 'sesskey' => sesskey()));
|
||||
$deleteatag = html_writer::tag('a', $deleteicon, array('href' => $deleteurl));
|
||||
|
||||
$courselink = html_writer::tag('a', $course->coursename,
|
||||
array('href' => $course->courseurl));
|
||||
$this->content->items[] = $courselink . ' ' . $deleteatag;
|
||||
$this->content->icons[] = '';
|
||||
}
|
||||
}
|
||||
$this->content->items[] = get_string('functionalityremoved', 'error');
|
||||
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ $string['enroldownload_help'] = 'Some courses listed in the selected hub are bei
|
||||
Others are course templates provided for you to download and use on your own Moodle site.';
|
||||
$string['enrollable'] = 'courses I can enrol in';
|
||||
$string['enrollablecourses'] = 'Enrollable courses';
|
||||
$string['errorcourselisting'] = 'An error occurred when retrieving the course listing from the selected hub, please try again later. ({$a})';
|
||||
$string['errorcourselisting'] = 'Please note: It is no longer possible to search for community courses on moodle.net. Previously shared courses for download are now available on archive.moodle.net. See <a href="https://docs.moodle.org/en/Sunsetting_moodle.net">Sunsetting moodle.net</a> for further details.';
|
||||
$string['errorhublisting'] = 'An error occurred when retrieving the hub listing from Moodle.org, please try again later. ({$a})';
|
||||
$string['fileinfo'] = 'Language: {$a->lang} - License: {$a->license} - Time updated: {$a->timeupdated}';
|
||||
$string['hideall'] = 'Hide hubs';
|
||||
|
||||
@@ -50,8 +50,22 @@ function xmldb_block_recentlyaccesseditems_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
if ($oldversion < 2018120302) {
|
||||
$sql = "courseid NOT IN (SELECT c.id from {course} c) OR cmid NOT IN (SELECT cm.id from {course_modules} cm)";
|
||||
$DB->delete_records_select("block_recentlyaccesseditems", $sql);
|
||||
// Query the items to be deleted as a list of IDs. We cannot delete directly from this as a
|
||||
// subquery because MySQL does not support delete with subqueries.
|
||||
$fordeletion = $DB->get_fieldset_sql("
|
||||
SELECT rai.id
|
||||
FROM {block_recentlyaccesseditems} rai
|
||||
LEFT JOIN {course} c ON c.id = rai.courseid
|
||||
LEFT JOIN {course_modules} cm ON cm.id = rai.cmid
|
||||
WHERE c.id IS NULL OR cm.id IS NULL");
|
||||
|
||||
// Delete the array in chunks of 500 (Oracle does not support more than 1000 parameters,
|
||||
// let's leave some leeway, there are likely only one chunk anyway).
|
||||
$chunks = array_chunk($fordeletion, 500);
|
||||
foreach ($chunks as $chunk) {
|
||||
$DB->delete_records_list('block_recentlyaccesseditems', 'id', $chunk);
|
||||
}
|
||||
|
||||
upgrade_block_savepoint(true, 2018120302, 'recentlyaccesseditems', false);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ function blog_rss_print_link($context, $filtertype, $filterselect = 0, $tagid =
|
||||
|
||||
$url = blog_rss_get_url($context->id, $userid, $filtertype, $filterselect, $tagid);
|
||||
$rsspix = $OUTPUT->pix_icon('i/rss', get_string('rss'), 'core', array('title' => $tooltiptext));
|
||||
print '<div class="pull-xs-right"><a href="'. $url .'">' . $rsspix . '</a></div>';
|
||||
print '<div class="float-sm-right"><a href="'. $url .'">' . $rsspix . '</a></div>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+2
-1
@@ -150,7 +150,8 @@ class cachestore_redis extends cache_store implements cache_is_key_aware, cache_
|
||||
*/
|
||||
protected function new_redis($server, $prefix = '', $password = '') {
|
||||
$redis = new Redis();
|
||||
$port = null;
|
||||
// Check if it isn't a Unix socket to set default port.
|
||||
$port = ($server[0] === '/') ? null : 6379;
|
||||
if (strpos($server, ':')) {
|
||||
$serverconf = explode(':', $server);
|
||||
$server = $serverconf[0];
|
||||
|
||||
@@ -673,7 +673,7 @@ class core_calendar_external extends external_api {
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Calendar events.
|
||||
* Create calendar events.
|
||||
*
|
||||
* @param array $events A list of events to create.
|
||||
* @return array array of events created.
|
||||
@@ -1027,8 +1027,8 @@ class core_calendar_external extends external_api {
|
||||
public static function get_calendar_monthly_view_parameters() {
|
||||
return new external_function_parameters(
|
||||
[
|
||||
'year' => new external_value(PARAM_INT, 'Month to be viewed', VALUE_REQUIRED),
|
||||
'month' => new external_value(PARAM_INT, 'Year to be viewed', VALUE_REQUIRED),
|
||||
'year' => new external_value(PARAM_INT, 'Year to be viewed', VALUE_REQUIRED),
|
||||
'month' => new external_value(PARAM_INT, 'Month to be viewed', VALUE_REQUIRED),
|
||||
'courseid' => new external_value(PARAM_INT, 'Course being viewed', VALUE_DEFAULT, SITEID, NULL_ALLOWED),
|
||||
'categoryid' => new external_value(PARAM_INT, 'Category being viewed', VALUE_DEFAULT, null, NULL_ALLOWED),
|
||||
'includenavigation' => new external_value(
|
||||
|
||||
+42
-17
@@ -104,6 +104,11 @@ define('CALENDAR_IMPORT_FROM_FILE', 0);
|
||||
*/
|
||||
define('CALENDAR_IMPORT_FROM_URL', 1);
|
||||
|
||||
/**
|
||||
* CALENDAR_IMPORT_EVENT_UPDATED_SKIPPED - imported event was skipped
|
||||
*/
|
||||
define('CALENDAR_IMPORT_EVENT_SKIPPED', -1);
|
||||
|
||||
/**
|
||||
* CALENDAR_IMPORT_EVENT_UPDATED - imported event was updated
|
||||
*/
|
||||
@@ -2862,11 +2867,23 @@ function calendar_add_icalendar_event($event, $unused = null, $subscriptionid, $
|
||||
|
||||
if ($updaterecord = $DB->get_record('event', array('uuid' => $eventrecord->uuid,
|
||||
'subscriptionid' => $eventrecord->subscriptionid))) {
|
||||
$eventrecord->id = $updaterecord->id;
|
||||
$return = CALENDAR_IMPORT_EVENT_UPDATED; // Update.
|
||||
|
||||
// Compare iCal event data against the moodle event to see if something has changed.
|
||||
$result = array_diff((array) $eventrecord, (array) $updaterecord);
|
||||
|
||||
// Unset timemodified field because it's always going to be different.
|
||||
unset($result['timemodified']);
|
||||
|
||||
if (count($result)) {
|
||||
$eventrecord->id = $updaterecord->id;
|
||||
$return = CALENDAR_IMPORT_EVENT_UPDATED; // Update.
|
||||
} else {
|
||||
return CALENDAR_IMPORT_EVENT_SKIPPED;
|
||||
}
|
||||
} else {
|
||||
$return = CALENDAR_IMPORT_EVENT_INSERTED; // Insert.
|
||||
}
|
||||
|
||||
if ($createdevent = \calendar_event::create($eventrecord, false)) {
|
||||
if (!empty($event->properties['RRULE'])) {
|
||||
// Repeating events.
|
||||
@@ -3000,18 +3017,13 @@ function calendar_import_icalendar_events($ical, $unused = null, $subscriptionid
|
||||
$return = '';
|
||||
$eventcount = 0;
|
||||
$updatecount = 0;
|
||||
$skippedcount = 0;
|
||||
|
||||
// Large calendars take a while...
|
||||
if (!CLI_SCRIPT) {
|
||||
\core_php_time_limit::raise(300);
|
||||
}
|
||||
|
||||
// Mark all events in a subscription with a zero timestamp.
|
||||
if (!empty($subscriptionid)) {
|
||||
$sql = "UPDATE {event} SET timemodified = :time WHERE subscriptionid = :id";
|
||||
$DB->execute($sql, array('time' => 0, 'id' => $subscriptionid));
|
||||
}
|
||||
|
||||
// Grab the timezone from the iCalendar file to be used later.
|
||||
if (isset($ical->properties['X-WR-TIMEZONE'][0]->value)) {
|
||||
$timezone = $ical->properties['X-WR-TIMEZONE'][0]->value;
|
||||
@@ -3019,8 +3031,9 @@ function calendar_import_icalendar_events($ical, $unused = null, $subscriptionid
|
||||
$timezone = 'UTC';
|
||||
}
|
||||
|
||||
$return = '';
|
||||
$icaluuids = [];
|
||||
foreach ($ical->components['VEVENT'] as $event) {
|
||||
$icaluuids[] = $event->properties['UID'][0]->value;
|
||||
$res = calendar_add_icalendar_event($event, null, $subscriptionid, $timezone);
|
||||
switch ($res) {
|
||||
case CALENDAR_IMPORT_EVENT_UPDATED:
|
||||
@@ -3029,6 +3042,9 @@ function calendar_import_icalendar_events($ical, $unused = null, $subscriptionid
|
||||
case CALENDAR_IMPORT_EVENT_INSERTED:
|
||||
$eventcount++;
|
||||
break;
|
||||
case CALENDAR_IMPORT_EVENT_SKIPPED:
|
||||
$skippedcount++;
|
||||
break;
|
||||
case 0:
|
||||
$return .= '<p>' . get_string('erroraddingevent', 'calendar') . ': ';
|
||||
if (empty($event->properties['SUMMARY'])) {
|
||||
@@ -3041,18 +3057,27 @@ function calendar_import_icalendar_events($ical, $unused = null, $subscriptionid
|
||||
}
|
||||
}
|
||||
|
||||
$return .= "<p>" . get_string('eventsimported', 'calendar', $eventcount) . "</p> ";
|
||||
$return .= "<p>" . get_string('eventsupdated', 'calendar', $updatecount) . "</p>";
|
||||
|
||||
// Delete remaining zero-marked events since they're not in remote calendar.
|
||||
if (!empty($subscriptionid)) {
|
||||
$deletecount = $DB->count_records('event', array('timemodified' => 0, 'subscriptionid' => $subscriptionid));
|
||||
if (!empty($deletecount)) {
|
||||
$DB->delete_records('event', array('timemodified' => 0, 'subscriptionid' => $subscriptionid));
|
||||
$return .= "<p> " . get_string('eventsdeleted', 'calendar') . ": {$deletecount} </p>\n";
|
||||
$eventsuuids = $DB->get_records_menu('event', ['subscriptionid' => $subscriptionid], '', 'id, uuid');
|
||||
|
||||
$icaleventscount = count($icaluuids);
|
||||
$tobedeleted = [];
|
||||
if (count($eventsuuids) > $icaleventscount) {
|
||||
foreach ($eventsuuids as $eventid => $eventuuid) {
|
||||
if (!in_array($eventuuid, $icaluuids)) {
|
||||
$tobedeleted[] = $eventid;
|
||||
}
|
||||
}
|
||||
if (!empty($tobedeleted)) {
|
||||
$DB->delete_records_list('event', 'id', $tobedeleted);
|
||||
$return .= "<p> " . get_string('eventsdeleted', 'calendar') . ": " . count($tobedeleted) . "</p> ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$return .= "<p>" . get_string('eventsimported', 'calendar', $eventcount) . "</p> ";
|
||||
$return .= "<p>" . get_string('eventsskipped', 'calendar', $skippedcount) . "</p> ";
|
||||
$return .= "<p>" . get_string('eventsupdated', 'calendar', $updatecount) . "</p>";
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ class core_calendar_renderer extends plugin_renderer_base {
|
||||
$deletelink = null;
|
||||
}
|
||||
|
||||
$commands = html_writer::start_tag('div', array('class' => 'commands pull-xs-right'));
|
||||
$commands = html_writer::start_tag('div', array('class' => 'commands float-sm-right'));
|
||||
$commands .= html_writer::start_tag('a', array('href' => $editlink));
|
||||
$str = get_string('tt_editevent', 'calendar');
|
||||
$commands .= $this->output->pix_icon('t/edit', $str);
|
||||
@@ -205,9 +205,9 @@ class core_calendar_renderer extends plugin_renderer_base {
|
||||
$output .= html_writer::tag('div', $event->courselink);
|
||||
}
|
||||
if (!empty($event->time)) {
|
||||
$output .= html_writer::tag('span', $event->time, array('class' => 'date pull-xs-right m-r-1'));
|
||||
$output .= html_writer::tag('span', $event->time, array('class' => 'date float-sm-right m-r-1'));
|
||||
} else {
|
||||
$attrs = array('class' => 'date pull-xs-right m-r-1');
|
||||
$attrs = array('class' => 'date float-sm-right m-r-1');
|
||||
$output .= html_writer::tag('span', calendar_time_representation($event->timestart), $attrs);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,5 +46,9 @@
|
||||
{{> core_calendar/header}}
|
||||
{{> core_calendar/day_navigation }}
|
||||
{{> core/overlay_loading}}
|
||||
{{> core_calendar/event_list }}
|
||||
{{< core_calendar/event_list }}
|
||||
{{$noeventsmessage}}
|
||||
{{#str}} daywithnoevents, core_calendar {{/str}}
|
||||
{{/noeventsmessage}}
|
||||
{{/core_calendar/event_list}}
|
||||
</div>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
{{/events}}
|
||||
{{^events}}
|
||||
<span class="calendar-information calendar-no-results">
|
||||
{{#str}}daywithnoevents, calendar{{/str}}
|
||||
{{$noeventsmessage}}{{/noeventsmessage}}
|
||||
</span>
|
||||
{{/events}}
|
||||
</div>
|
||||
@@ -34,5 +34,9 @@
|
||||
<div class="calendarwrapper" data-view="upcoming" data-context-id="{{defaulteventcontext}}" data-courseid="{{courseid}}">
|
||||
{{> core_calendar/header}}
|
||||
{{> core/overlay_loading}}
|
||||
{{> core_calendar/event_list }}
|
||||
{{< core_calendar/event_list }}
|
||||
{{$noeventsmessage}}
|
||||
{{#str}} noupcomingevents, core_calendar {{/str}}
|
||||
{{/noeventsmessage}}
|
||||
{{/core_calendar/event_list}}
|
||||
</div>
|
||||
|
||||
@@ -1205,7 +1205,7 @@ class api {
|
||||
$result = array();
|
||||
|
||||
// TODO We could improve the performance of this into one single query.
|
||||
$coursemodulecompetencies = course_competency::list_course_module_competencies($cm->id);
|
||||
$coursemodulecompetencies = course_module_competency::list_course_module_competencies($cm->id);
|
||||
$competencies = course_module_competency::list_competencies($cm->id);
|
||||
|
||||
// Build the return values.
|
||||
|
||||
@@ -2757,6 +2757,16 @@ class core_competency_api_testcase extends advanced_testcase {
|
||||
$result = api::list_course_module_competencies_in_course_module($cm->id);
|
||||
$this->assertEquals($result[0]->get('competencyid'), $c->get('id'));
|
||||
$this->assertEquals($result[1]->get('competencyid'), $c2->get('id'));
|
||||
|
||||
// Now get the course competency and coursemodule competency together.
|
||||
$result = api::list_course_module_competencies($cm->id);
|
||||
// Now we should have an array and each element of the array should have a competency and
|
||||
// a coursemodulecompetency.
|
||||
foreach ($result as $instance) {
|
||||
$cmc = $instance['coursemodulecompetency'];
|
||||
$c = $instance['competency'];
|
||||
$this->assertEquals($cmc->get('competencyid'), $c->get('id'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "6.5.*",
|
||||
"phpunit/dbunit": "3.0.*",
|
||||
"moodlehq/behat-extension": "3.36.0",
|
||||
"moodlehq/behat-extension": "3.36.1",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"instaclick/php-webdriver": "dev-local as 1.x-dev"
|
||||
}
|
||||
|
||||
Generated
+175
-177
@@ -4,46 +4,42 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "5e0abe9c9ff839fb4f477f127ef0b734",
|
||||
"content-hash": "c5f05bdc99eb03364db93ed9b7f6d17e",
|
||||
"packages": [],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "behat/behat",
|
||||
"version": "v3.3.1",
|
||||
"version": "v3.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Behat/Behat.git",
|
||||
"reference": "44a58c1480d6144b2dc2c2bf02b9cef73c83840d"
|
||||
"reference": "e4bce688be0c2029dc1700e46058d86428c63cab"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Behat/Behat/zipball/44a58c1480d6144b2dc2c2bf02b9cef73c83840d",
|
||||
"reference": "44a58c1480d6144b2dc2c2bf02b9cef73c83840d",
|
||||
"url": "https://api.github.com/repos/Behat/Behat/zipball/e4bce688be0c2029dc1700e46058d86428c63cab",
|
||||
"reference": "e4bce688be0c2029dc1700e46058d86428c63cab",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"behat/gherkin": "^4.4.4",
|
||||
"behat/gherkin": "^4.5.1",
|
||||
"behat/transliterator": "^1.2",
|
||||
"container-interop/container-interop": "^1.1",
|
||||
"container-interop/container-interop": "^1.2",
|
||||
"ext-mbstring": "*",
|
||||
"php": ">=5.3.3",
|
||||
"psr/container": "^1.0",
|
||||
"symfony/class-loader": "~2.1||~3.0",
|
||||
"symfony/config": "~2.3||~3.0",
|
||||
"symfony/console": "~2.5||~3.0",
|
||||
"symfony/dependency-injection": "~2.1||~3.0",
|
||||
"symfony/event-dispatcher": "~2.1||~3.0",
|
||||
"symfony/translation": "~2.3||~3.0",
|
||||
"symfony/yaml": "~2.1||~3.0"
|
||||
"symfony/config": "~2.3||~3.0||~4.0",
|
||||
"symfony/console": "~2.7.40||^2.8.33||~3.3.15||^3.4.3||^4.0.3",
|
||||
"symfony/dependency-injection": "~2.1||~3.0||~4.0",
|
||||
"symfony/event-dispatcher": "~2.1||~3.0||~4.0",
|
||||
"symfony/translation": "~2.3||~3.0||~4.0",
|
||||
"symfony/yaml": "~2.1||~3.0||~4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"herrera-io/box": "~1.6.1",
|
||||
"phpunit/phpunit": "~4.5",
|
||||
"symfony/process": "~2.5|~3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"behat/mink-extension": "for integration with Mink testing framework",
|
||||
"behat/symfony2-extension": "for integration with Symfony2 web framework",
|
||||
"behat/yii-extension": "for integration with Yii web framework"
|
||||
"phpunit/phpunit": "^4.8.36|^6.3",
|
||||
"symfony/process": "~2.5|~3.0|~4.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/behat"
|
||||
@@ -51,7 +47,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.2.x-dev"
|
||||
"dev-master": "3.5.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -87,7 +83,7 @@
|
||||
"symfony",
|
||||
"testing"
|
||||
],
|
||||
"time": "2017-05-15T16:49:16+00:00"
|
||||
"time": "2018-08-10T18:56:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "behat/gherkin",
|
||||
@@ -739,33 +735,37 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.5.2",
|
||||
"version": "1.6.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "9f83dded91781a01c63574e387eaa769be769115"
|
||||
"reference": "239400de7a173fe9901b9ac7c06497751f00727a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115",
|
||||
"reference": "9f83dded91781a01c63574e387eaa769be769115",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
|
||||
"reference": "239400de7a173fe9901b9ac7c06497751f00727a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"psr/http-message": "~1.0",
|
||||
"ralouphie/getallheaders": "^2.0.5"
|
||||
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
|
||||
},
|
||||
"provide": {
|
||||
"psr/http-message-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-zlib": "*",
|
||||
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
|
||||
},
|
||||
"suggest": {
|
||||
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.5-dev"
|
||||
"dev-master": "1.6-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -802,7 +802,7 @@
|
||||
"uri",
|
||||
"url"
|
||||
],
|
||||
"time": "2018-12-04T20:46:45+00:00"
|
||||
"time": "2019-07-01T23:21:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "instaclick/php-webdriver",
|
||||
@@ -810,12 +810,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/moodlehq/php-webdriver.git",
|
||||
"reference": "e311e55bf2c4746db9df72707f3cf1a731ad98aa"
|
||||
"reference": "3df827208ec104a9716aa8c30741e330da620c1e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/moodlehq/php-webdriver/zipball/e311e55bf2c4746db9df72707f3cf1a731ad98aa",
|
||||
"reference": "e311e55bf2c4746db9df72707f3cf1a731ad98aa",
|
||||
"url": "https://api.github.com/repos/moodlehq/php-webdriver/zipball/3df827208ec104a9716aa8c30741e330da620c1e",
|
||||
"reference": "3df827208ec104a9716aa8c30741e330da620c1e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -863,27 +863,27 @@
|
||||
"support": {
|
||||
"source": "https://github.com/moodlehq/php-webdriver/tree/local"
|
||||
},
|
||||
"time": "2019-06-03T22:55:37+00:00"
|
||||
"time": "2019-08-14T02:10:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mikey179/vfsStream",
|
||||
"version": "v1.6.6",
|
||||
"name": "mikey179/vfsstream",
|
||||
"version": "v1.6.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/bovigo/vfsStream.git",
|
||||
"reference": "095238a0711c974ae5b4ebf4c4534a23f3f6c99d"
|
||||
"reference": "2b544ac3a21bcc4dde5d90c4ae8d06f4319055fb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/bovigo/vfsStream/zipball/095238a0711c974ae5b4ebf4c4534a23f3f6c99d",
|
||||
"reference": "095238a0711c974ae5b4ebf4c4534a23f3f6c99d",
|
||||
"url": "https://api.github.com/repos/bovigo/vfsStream/zipball/2b544ac3a21bcc4dde5d90c4ae8d06f4319055fb",
|
||||
"reference": "2b544ac3a21bcc4dde5d90c4ae8d06f4319055fb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.5"
|
||||
"phpunit/phpunit": "^4.5|^5.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -903,35 +903,34 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "Frank Kleine",
|
||||
"homepage": "http://frankkleine.de/",
|
||||
"role": "Developer"
|
||||
"role": "Developer",
|
||||
"homepage": "http://frankkleine.de/"
|
||||
}
|
||||
],
|
||||
"description": "Virtual file system to mock the real file system in unit tests.",
|
||||
"homepage": "http://vfs.bovigo.org/",
|
||||
"time": "2019-04-08T13:54:32+00:00"
|
||||
"time": "2019-08-01T01:38:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "moodlehq/behat-extension",
|
||||
"version": "v3.36.0",
|
||||
"version": "v3.36.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/moodlehq/moodle-behat-extension.git",
|
||||
"reference": "ba8c4b8b323e05f7af128604f3f3dc60c953135a"
|
||||
"reference": "a3c38c2864e7259b1de834218abfe49eecc03417"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/moodlehq/moodle-behat-extension/zipball/ba8c4b8b323e05f7af128604f3f3dc60c953135a",
|
||||
"reference": "ba8c4b8b323e05f7af128604f3f3dc60c953135a",
|
||||
"url": "https://api.github.com/repos/moodlehq/moodle-behat-extension/zipball/a3c38c2864e7259b1de834218abfe49eecc03417",
|
||||
"reference": "a3c38c2864e7259b1de834218abfe49eecc03417",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"behat/behat": "3.3.*",
|
||||
"behat/behat": "3.5.*",
|
||||
"behat/mink": "~1.7",
|
||||
"behat/mink-extension": "~2.2",
|
||||
"behat/mink-goutte-driver": "~1.2",
|
||||
"behat/mink-selenium2-driver": "~1.3",
|
||||
"guzzlehttp/guzzle": "^6.3",
|
||||
"php": ">=5.4.4",
|
||||
"symfony/process": "2.8.*"
|
||||
},
|
||||
@@ -948,9 +947,9 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "David Monllaó",
|
||||
"role": "Developer",
|
||||
"email": "david.monllao@gmail.com",
|
||||
"homepage": "http://moodle.com",
|
||||
"role": "Developer"
|
||||
"homepage": "http://moodle.com"
|
||||
}
|
||||
],
|
||||
"description": "Moodle behat extension",
|
||||
@@ -959,7 +958,7 @@
|
||||
"Behat",
|
||||
"moodle"
|
||||
],
|
||||
"time": "2018-02-04T18:04:02+00:00"
|
||||
"time": "2019-07-18T08:33:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/deep-copy",
|
||||
@@ -1044,18 +1043,18 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arne Blankerts",
|
||||
"email": "arne@blankerts.de",
|
||||
"role": "Developer"
|
||||
"role": "Developer",
|
||||
"email": "arne@blankerts.de"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Heuer",
|
||||
"email": "sebastian@phpeople.de",
|
||||
"role": "Developer"
|
||||
"role": "Developer",
|
||||
"email": "sebastian@phpeople.de"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "Developer"
|
||||
"role": "Developer",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
|
||||
@@ -1091,18 +1090,18 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arne Blankerts",
|
||||
"email": "arne@blankerts.de",
|
||||
"role": "Developer"
|
||||
"role": "Developer",
|
||||
"email": "arne@blankerts.de"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Heuer",
|
||||
"email": "sebastian@phpeople.de",
|
||||
"role": "Developer"
|
||||
"role": "Developer",
|
||||
"email": "sebastian@phpeople.de"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "Developer"
|
||||
"role": "Developer",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Library for handling version information and constraints",
|
||||
@@ -1262,16 +1261,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
"version": "1.8.0",
|
||||
"version": "1.8.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpspec/prophecy.git",
|
||||
"reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06"
|
||||
"reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
|
||||
"reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
|
||||
"reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1292,8 +1291,8 @@
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Prophecy\\": "src/"
|
||||
"psr-4": {
|
||||
"Prophecy\\": "src/Prophecy"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
@@ -1321,7 +1320,7 @@
|
||||
"spy",
|
||||
"stub"
|
||||
],
|
||||
"time": "2018-08-05T17:53:17+00:00"
|
||||
"time": "2019-06-13T12:50:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/dbunit",
|
||||
@@ -1426,8 +1425,8 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
"role": "lead",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
|
||||
@@ -1474,8 +1473,8 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
"role": "lead",
|
||||
"email": "sb@sebastian-bergmann.de"
|
||||
}
|
||||
],
|
||||
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
|
||||
@@ -1516,8 +1515,8 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
"role": "lead",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Simple template engine.",
|
||||
@@ -1565,8 +1564,8 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
"role": "lead",
|
||||
"email": "sb@sebastian-bergmann.de"
|
||||
}
|
||||
],
|
||||
"description": "Utility class for timing",
|
||||
@@ -1696,8 +1695,8 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
"role": "lead",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "The PHP Unit Testing framework.",
|
||||
@@ -1917,24 +1916,24 @@
|
||||
},
|
||||
{
|
||||
"name": "ralouphie/getallheaders",
|
||||
"version": "2.0.5",
|
||||
"version": "3.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ralouphie/getallheaders.git",
|
||||
"reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa"
|
||||
"reference": "120b605dfeb996808c31b6477290a714d356e822"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa",
|
||||
"reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa",
|
||||
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
|
||||
"reference": "120b605dfeb996808c31b6477290a714d356e822",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3"
|
||||
"php": ">=5.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~3.7.0",
|
||||
"satooshi/php-coveralls": ">=1.0"
|
||||
"php-coveralls/php-coveralls": "^2.1",
|
||||
"phpunit/phpunit": "^5 || ^6.5"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -1953,7 +1952,7 @@
|
||||
}
|
||||
],
|
||||
"description": "A polyfill for getallheaders.",
|
||||
"time": "2016-02-11T07:05:27+00:00"
|
||||
"time": "2019-03-08T08:55:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/code-unit-reverse-lookup",
|
||||
@@ -2168,16 +2167,16 @@
|
||||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
"version": "3.1.0",
|
||||
"version": "3.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/exporter.git",
|
||||
"reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
|
||||
"reference": "06a9a5947f47b3029d76118eb5c22802e5869687"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
|
||||
"reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/06a9a5947f47b3029d76118eb5c22802e5869687",
|
||||
"reference": "06a9a5947f47b3029d76118eb5c22802e5869687",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2204,6 +2203,10 @@
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
},
|
||||
{
|
||||
"name": "Jeff Welch",
|
||||
"email": "whatthejeff@gmail.com"
|
||||
@@ -2212,17 +2215,13 @@
|
||||
"name": "Volker Dusch",
|
||||
"email": "github@wallbash.com"
|
||||
},
|
||||
{
|
||||
"name": "Bernhard Schussek",
|
||||
"email": "bschussek@2bepublished.at"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
},
|
||||
{
|
||||
"name": "Adam Harvey",
|
||||
"email": "aharvey@php.net"
|
||||
},
|
||||
{
|
||||
"name": "Bernhard Schussek",
|
||||
"email": "bschussek@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Provides the functionality to export PHP variables for visualization",
|
||||
@@ -2231,7 +2230,7 @@
|
||||
"export",
|
||||
"exporter"
|
||||
],
|
||||
"time": "2017-04-03T13:19:02+00:00"
|
||||
"time": "2019-08-11T12:43:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/global-state",
|
||||
@@ -2506,8 +2505,8 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
"role": "lead",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
|
||||
@@ -2516,16 +2515,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/browser-kit",
|
||||
"version": "v3.4.28",
|
||||
"version": "v3.4.31",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/browser-kit.git",
|
||||
"reference": "7f2b0843d5045468225f9a9b27a0cb171ae81828"
|
||||
"reference": "1a3406a6b9b61b492592a816ca056afcc9e976c0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/7f2b0843d5045468225f9a9b27a0cb171ae81828",
|
||||
"reference": "7f2b0843d5045468225f9a9b27a0cb171ae81828",
|
||||
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/1a3406a6b9b61b492592a816ca056afcc9e976c0",
|
||||
"reference": "1a3406a6b9b61b492592a816ca056afcc9e976c0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2569,20 +2568,20 @@
|
||||
],
|
||||
"description": "Symfony BrowserKit Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-04-06T19:33:58+00:00"
|
||||
"time": "2019-08-26T07:52:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/class-loader",
|
||||
"version": "v3.4.28",
|
||||
"version": "v3.4.31",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/class-loader.git",
|
||||
"reference": "4459eef5298dedfb69f771186a580062b8516497"
|
||||
"reference": "e212b06996819a2bce026a63da03b7182d05a690"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/class-loader/zipball/4459eef5298dedfb69f771186a580062b8516497",
|
||||
"reference": "4459eef5298dedfb69f771186a580062b8516497",
|
||||
"url": "https://api.github.com/repos/symfony/class-loader/zipball/e212b06996819a2bce026a63da03b7182d05a690",
|
||||
"reference": "e212b06996819a2bce026a63da03b7182d05a690",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2625,20 +2624,20 @@
|
||||
],
|
||||
"description": "Symfony ClassLoader Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-01-16T09:39:14+00:00"
|
||||
"time": "2019-08-20T13:31:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/config",
|
||||
"version": "v3.4.28",
|
||||
"version": "v3.4.31",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/config.git",
|
||||
"reference": "177a276c01575253c95cefe0866e3d1b57637fe0"
|
||||
"reference": "24a60c0d7ad98a0fa5d1f892e9286095a389404f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/config/zipball/177a276c01575253c95cefe0866e3d1b57637fe0",
|
||||
"reference": "177a276c01575253c95cefe0866e3d1b57637fe0",
|
||||
"url": "https://api.github.com/repos/symfony/config/zipball/24a60c0d7ad98a0fa5d1f892e9286095a389404f",
|
||||
"reference": "24a60c0d7ad98a0fa5d1f892e9286095a389404f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2689,7 +2688,7 @@
|
||||
],
|
||||
"description": "Symfony Config Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-02-23T15:06:07+00:00"
|
||||
"time": "2019-08-26T07:52:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
@@ -2761,16 +2760,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/css-selector",
|
||||
"version": "v3.4.28",
|
||||
"version": "v3.4.31",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/css-selector.git",
|
||||
"reference": "8ca29297c29b64fb3a1a135e71cb25f67f9fdccf"
|
||||
"reference": "e18c5c4b35e7f17513448a25d02f7af34a4bdb41"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/8ca29297c29b64fb3a1a135e71cb25f67f9fdccf",
|
||||
"reference": "8ca29297c29b64fb3a1a135e71cb25f67f9fdccf",
|
||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/e18c5c4b35e7f17513448a25d02f7af34a4bdb41",
|
||||
"reference": "e18c5c4b35e7f17513448a25d02f7af34a4bdb41",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2795,14 +2794,14 @@
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jean-François Simon",
|
||||
"email": "jeanfrancois.simon@sensiolabs.com"
|
||||
},
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Jean-François Simon",
|
||||
"email": "jeanfrancois.simon@sensiolabs.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
@@ -2810,20 +2809,20 @@
|
||||
],
|
||||
"description": "Symfony CssSelector Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-01-16T09:39:14+00:00"
|
||||
"time": "2019-08-20T13:31:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/debug",
|
||||
"version": "v3.4.28",
|
||||
"version": "v3.4.31",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/debug.git",
|
||||
"reference": "671fc55bd14800668b1d0a3708c3714940e30a8c"
|
||||
"reference": "0b600300918780001e2821db77bc28b677794486"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/debug/zipball/671fc55bd14800668b1d0a3708c3714940e30a8c",
|
||||
"reference": "671fc55bd14800668b1d0a3708c3714940e30a8c",
|
||||
"url": "https://api.github.com/repos/symfony/debug/zipball/0b600300918780001e2821db77bc28b677794486",
|
||||
"reference": "0b600300918780001e2821db77bc28b677794486",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2866,7 +2865,7 @@
|
||||
],
|
||||
"description": "Symfony Debug Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-05-18T13:32:47+00:00"
|
||||
"time": "2019-08-20T13:31:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dependency-injection",
|
||||
@@ -2940,16 +2939,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/dom-crawler",
|
||||
"version": "v3.4.28",
|
||||
"version": "v3.4.31",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/dom-crawler.git",
|
||||
"reference": "d40023c057393fb25f7ca80af2a56ed948c45a09"
|
||||
"reference": "8558d1bc4554f5cb0b66e50377457967a8969263"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/d40023c057393fb25f7ca80af2a56ed948c45a09",
|
||||
"reference": "d40023c057393fb25f7ca80af2a56ed948c45a09",
|
||||
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/8558d1bc4554f5cb0b66e50377457967a8969263",
|
||||
"reference": "8558d1bc4554f5cb0b66e50377457967a8969263",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2993,20 +2992,20 @@
|
||||
],
|
||||
"description": "Symfony DomCrawler Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-02-23T15:06:07+00:00"
|
||||
"time": "2019-08-26T07:52:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v3.4.28",
|
||||
"version": "v3.4.31",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||
"reference": "a088aafcefb4eef2520a290ed82e4374092a6dff"
|
||||
"reference": "3e922c4c3430b9de624e8a285dada5e61e230959"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a088aafcefb4eef2520a290ed82e4374092a6dff",
|
||||
"reference": "a088aafcefb4eef2520a290ed82e4374092a6dff",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3e922c4c3430b9de624e8a285dada5e61e230959",
|
||||
"reference": "3e922c4c3430b9de624e8a285dada5e61e230959",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3056,20 +3055,20 @@
|
||||
],
|
||||
"description": "Symfony EventDispatcher Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-04-02T08:51:52+00:00"
|
||||
"time": "2019-08-23T08:05:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
"version": "v3.4.28",
|
||||
"version": "v3.4.31",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/filesystem.git",
|
||||
"reference": "acf99758b1df8e9295e6b85aa69f294565c9fedb"
|
||||
"reference": "00e3a6ddd723b8bcfe4f2a1b6f82b98eeeb51516"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/filesystem/zipball/acf99758b1df8e9295e6b85aa69f294565c9fedb",
|
||||
"reference": "acf99758b1df8e9295e6b85aa69f294565c9fedb",
|
||||
"url": "https://api.github.com/repos/symfony/filesystem/zipball/00e3a6ddd723b8bcfe4f2a1b6f82b98eeeb51516",
|
||||
"reference": "00e3a6ddd723b8bcfe4f2a1b6f82b98eeeb51516",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3106,20 +3105,20 @@
|
||||
],
|
||||
"description": "Symfony Filesystem Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-02-04T21:34:32+00:00"
|
||||
"time": "2019-08-20T13:31:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.11.0",
|
||||
"version": "v1.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "82ebae02209c21113908c229e9883c419720738a"
|
||||
"reference": "550ebaac289296ce228a706d0867afc34687e3f4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a",
|
||||
"reference": "82ebae02209c21113908c229e9883c419720738a",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
|
||||
"reference": "550ebaac289296ce228a706d0867afc34687e3f4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3131,7 +3130,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.11-dev"
|
||||
"dev-master": "1.12-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -3147,13 +3146,13 @@
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
},
|
||||
{
|
||||
"name": "Gert de Pagter",
|
||||
"email": "BackEndTea@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for ctype functions",
|
||||
@@ -3164,20 +3163,20 @@
|
||||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"time": "2019-02-06T07:57:58+00:00"
|
||||
"time": "2019-08-06T08:03:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.11.0",
|
||||
"version": "v1.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "fe5e94c604826c35a32fa832f35bd036b6799609"
|
||||
"reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609",
|
||||
"reference": "fe5e94c604826c35a32fa832f35bd036b6799609",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17",
|
||||
"reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3189,7 +3188,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.11-dev"
|
||||
"dev-master": "1.12-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -3223,7 +3222,7 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2019-02-06T07:57:58+00:00"
|
||||
"time": "2019-08-06T08:03:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
@@ -3396,16 +3395,16 @@
|
||||
},
|
||||
{
|
||||
"name": "theseer/tokenizer",
|
||||
"version": "1.1.2",
|
||||
"version": "1.1.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/theseer/tokenizer.git",
|
||||
"reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8"
|
||||
"reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/1c42705be2b6c1de5904f8afacef5895cab44bf8",
|
||||
"reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8",
|
||||
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
|
||||
"reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3427,25 +3426,25 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arne Blankerts",
|
||||
"email": "arne@blankerts.de",
|
||||
"role": "Developer"
|
||||
"role": "Developer",
|
||||
"email": "arne@blankerts.de"
|
||||
}
|
||||
],
|
||||
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
|
||||
"time": "2019-04-04T09:56:43+00:00"
|
||||
"time": "2019-06-13T22:48:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
"version": "1.4.0",
|
||||
"version": "1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/webmozart/assert.git",
|
||||
"reference": "83e253c8e0be5b0257b881e1827274667c5c17a9"
|
||||
"reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9",
|
||||
"reference": "83e253c8e0be5b0257b881e1827274667c5c17a9",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
|
||||
"reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3453,8 +3452,7 @@
|
||||
"symfony/polyfill-ctype": "^1.8"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.6",
|
||||
"sebastian/version": "^1.0.1"
|
||||
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -3483,7 +3481,7 @@
|
||||
"check",
|
||||
"validate"
|
||||
],
|
||||
"time": "2018-12-25T11:19:39+00:00"
|
||||
"time": "2019-08-24T08:43:50+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
define(["jquery","core/ajax"],function(a,b){var c=function(a,c,d,e){var f={classification:a};"undefined"!=typeof c&&(f.limit=c),"undefined"!=typeof d&&(f.offset=d),"undefined"!=typeof e&&(f.sort=e);var g={methodname:"core_course_get_enrolled_courses_by_timeline_classification",args:f};return b.call([g])[0]},d=function(a,c,d,e){var f={};"undefined"!=typeof a&&(f.limit=c),"undefined"!=typeof c&&(f.limit=c),"undefined"!=typeof d&&(f.offset=d),"undefined"!=typeof e&&(f.sort=e);var g={methodname:"core_course_get_recent_courses",args:f};return b.call([g])[0]};return{getEnrolledCoursesByTimelineClassification:c,getLastAccessedCourses:d}});
|
||||
define(["jquery","core/ajax"],function(a,b){var c=function(a,c,d,e){var f={classification:a};"undefined"!=typeof c&&(f.limit=c),"undefined"!=typeof d&&(f.offset=d),"undefined"!=typeof e&&(f.sort=e);var g={methodname:"core_course_get_enrolled_courses_by_timeline_classification",args:f};return b.call([g])[0]},d=function(a,c,d,e){var f={};"undefined"!=typeof a&&(f.userid=a),"undefined"!=typeof c&&(f.limit=c),"undefined"!=typeof d&&(f.offset=d),"undefined"!=typeof e&&(f.sort=e);var g={methodname:"core_course_get_recent_courses",args:f};return b.call([g])[0]};return{getEnrolledCoursesByTimelineClassification:c,getLastAccessedCourses:d}});
|
||||
@@ -71,7 +71,7 @@ define(['jquery', 'core/ajax'], function($, Ajax) {
|
||||
var args = {};
|
||||
|
||||
if (typeof userid !== 'undefined') {
|
||||
args.limit = limit;
|
||||
args.userid = userid;
|
||||
}
|
||||
|
||||
if (typeof limit !== 'undefined') {
|
||||
|
||||
+5
-1
@@ -166,7 +166,11 @@ if ($editform->is_cancelled()) {
|
||||
|
||||
if (!empty($CFG->creatornewroleid) and !is_viewing($context, NULL, 'moodle/role:assign') and !is_enrolled($context, NULL, 'moodle/role:assign')) {
|
||||
// Deal with course creators - enrol them internally with default role.
|
||||
enrol_try_internal_enrol($course->id, $USER->id, $CFG->creatornewroleid);
|
||||
if (user_can_assign($context, $CFG->creatornewroleid)) {
|
||||
enrol_try_internal_enrol($course->id, $USER->id, $CFG->creatornewroleid);
|
||||
} else {
|
||||
enrol_try_internal_enrol($course->id, $USER->id);
|
||||
}
|
||||
}
|
||||
|
||||
// The URL to take them to if they chose save and display.
|
||||
|
||||
@@ -36,6 +36,9 @@ class format_singleactivity extends format_base {
|
||||
/** @var cm_info the current activity. Use get_activity() to retrieve it. */
|
||||
private $activity = false;
|
||||
|
||||
/** @var int The category ID guessed from the form data. */
|
||||
private $categoryid = false;
|
||||
|
||||
/**
|
||||
* The URL to use for the specified course
|
||||
*
|
||||
@@ -145,6 +148,30 @@ class format_singleactivity extends format_base {
|
||||
*/
|
||||
public function course_format_options($foreditform = false) {
|
||||
static $courseformatoptions = false;
|
||||
|
||||
$fetchtypes = $courseformatoptions === false;
|
||||
$fetchtypes = $fetchtypes || ($foreditform && !isset($courseformatoptions['activitytype']['label']));
|
||||
|
||||
if ($fetchtypes) {
|
||||
$availabletypes = $this->get_supported_activities();
|
||||
if ($this->course) {
|
||||
// The course exists. Test against the course.
|
||||
$testcontext = context_course::instance($this->course->id);
|
||||
} else if ($this->categoryid) {
|
||||
// The course does not exist yet, but we have a category ID that we can test against.
|
||||
$testcontext = context_coursecat::instance($this->categoryid);
|
||||
} else {
|
||||
// The course does not exist, and we somehow do not have a category. Test capabilities against the system context.
|
||||
$testcontext = context_system::instance();
|
||||
}
|
||||
foreach (array_keys($availabletypes) as $activity) {
|
||||
$capability = "mod/{$activity}:addinstance";
|
||||
if (!has_capability($capability, $testcontext)) {
|
||||
unset($availabletypes[$activity]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($courseformatoptions === false) {
|
||||
$config = get_config('format_singleactivity');
|
||||
$courseformatoptions = array(
|
||||
@@ -153,9 +180,13 @@ class format_singleactivity extends format_base {
|
||||
'type' => PARAM_TEXT,
|
||||
),
|
||||
);
|
||||
|
||||
if (!empty($availabletypes) && !isset($availabletypes[$config->activitytype])) {
|
||||
$courseformatoptions['activitytype']['default'] = array_keys($availabletypes)[0];
|
||||
}
|
||||
}
|
||||
|
||||
if ($foreditform && !isset($courseformatoptions['activitytype']['label'])) {
|
||||
$availabletypes = $this->get_supported_activities();
|
||||
$courseformatoptionsedit = array(
|
||||
'activitytype' => array(
|
||||
'label' => new lang_string('activitytype', 'format_singleactivity'),
|
||||
@@ -183,6 +214,11 @@ class format_singleactivity extends format_base {
|
||||
*/
|
||||
public function create_edit_form_elements(&$mform, $forsection = false) {
|
||||
global $PAGE;
|
||||
|
||||
if (!$this->course && $submitvalues = $mform->getSubmitValues()) {
|
||||
$this->categoryid = $submitvalues['category'];
|
||||
}
|
||||
|
||||
$elements = parent::create_edit_form_elements($mform, $forsection);
|
||||
if (!$forsection && ($course = $PAGE->course) && !empty($course->format) &&
|
||||
$course->format !== 'site' && $course->format !== 'singleactivity') {
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
@format @format_singleactivity
|
||||
Feature: Courses can be created in Single Activity mode
|
||||
In order to create a single activity course
|
||||
As a manager
|
||||
I need to create courses and set default values on them
|
||||
|
||||
Scenario: Create a course as a custom course creator
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| kevin | Kevin | the | kevin@example.com |
|
||||
And the following "roles" exist:
|
||||
| shortname | name | archetype |
|
||||
| creator | Creator | |
|
||||
And the following "system role assigns" exist:
|
||||
| user | role | contextlevel |
|
||||
| kevin | creator | System |
|
||||
And I log in as "admin"
|
||||
And I set the following system permissions of "Creator" role:
|
||||
| capability | permission |
|
||||
| moodle/course:create | Allow |
|
||||
| moodle/course:update | Allow |
|
||||
| moodle/course:manageactivities | Allow |
|
||||
| moodle/course:viewparticipants | Allow |
|
||||
| moodle/role:assign | Allow |
|
||||
| mod/quiz:addinstance | Allow |
|
||||
And I log out
|
||||
And I log in as "kevin"
|
||||
And I am on site homepage
|
||||
When I press "Add a new course"
|
||||
And I set the following fields to these values:
|
||||
| Course full name | My first course |
|
||||
| Course short name | myfirstcourse |
|
||||
| Format | Single activity format |
|
||||
And I press "Update format"
|
||||
Then I should see "Quiz" in the "Type of activity" "field"
|
||||
And I should not see "Forum" in the "Type of activity" "field"
|
||||
And I press "Save and display"
|
||||
And I should see "Adding a new Quiz"
|
||||
+22
-3
@@ -1289,16 +1289,36 @@ function course_module_flag_for_async_deletion($cmid) {
|
||||
* Checks whether the given course has any course modules scheduled for adhoc deletion.
|
||||
*
|
||||
* @param int $courseid the id of the course.
|
||||
* @param bool $onlygradable whether to check only gradable modules or all modules.
|
||||
* @return bool true if the course contains any modules pending deletion, false otherwise.
|
||||
*/
|
||||
function course_modules_pending_deletion($courseid) {
|
||||
function course_modules_pending_deletion($courseid, bool $onlygradable = false) : bool {
|
||||
if (empty($courseid)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($onlygradable) {
|
||||
// Fetch modules with grade items.
|
||||
if (!$coursegradeitems = grade_item::fetch_all(['itemtype' => 'mod', 'courseid' => $courseid])) {
|
||||
// Return early when there is none.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$modinfo = get_fast_modinfo($courseid);
|
||||
foreach ($modinfo->get_cms() as $module) {
|
||||
if ($module->deletioninprogress == '1') {
|
||||
return true;
|
||||
if ($onlygradable) {
|
||||
// Check if the module being deleted is in the list of course modules with grade items.
|
||||
foreach ($coursegradeitems as $coursegradeitem) {
|
||||
if ($coursegradeitem->itemmodule == $module->modname && $coursegradeitem->iteminstance == $module->instance) {
|
||||
// The module being deleted is within the gradable modules.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -3981,7 +4001,6 @@ function course_get_user_administration_options($course, $context) {
|
||||
$options->outcomes = !empty($CFG->enableoutcomes) && has_capability('moodle/course:update', $context);
|
||||
$options->badges = !empty($CFG->enablebadges);
|
||||
$options->import = has_capability('moodle/restore:restoretargetimport', $context);
|
||||
$options->publish = has_capability('moodle/course:publish', $context);
|
||||
$options->reset = has_capability('moodle/course:reset', $context);
|
||||
$options->roles = has_capability('moodle/role:switchroles', $context);
|
||||
} else {
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
<?php
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// This file is part of Moodle - http://moodle.org/ //
|
||||
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
|
||||
// //
|
||||
// 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/>. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* This page display the publication backup form
|
||||
*
|
||||
* @package course
|
||||
* @subpackage publish
|
||||
* @author Jerome Mouneyrac <jerome@mouneyrac.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
|
||||
* @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
|
||||
*/
|
||||
|
||||
define('NO_OUTPUT_BUFFERING', true);
|
||||
|
||||
require_once('../../config.php');
|
||||
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
|
||||
require_once($CFG->dirroot . '/backup/moodle2/backup_plan_builder.class.php');
|
||||
require_once($CFG->libdir . '/filelib.php');
|
||||
|
||||
|
||||
//retrieve initial page parameters
|
||||
$id = required_param('id', PARAM_INT);
|
||||
$hubcourseid = required_param('hubcourseid', PARAM_INT);
|
||||
|
||||
//some permissions and parameters checking
|
||||
$course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST);
|
||||
require_login($course);
|
||||
if (!has_capability('moodle/course:publish', context_course::instance($id))
|
||||
or !confirm_sesskey()) {
|
||||
throw new moodle_exception('nopermission');
|
||||
}
|
||||
|
||||
//page settings
|
||||
$PAGE->set_url('/course/publish/backup.php');
|
||||
$PAGE->set_pagelayout('incourse');
|
||||
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
|
||||
//BEGIN backup processing
|
||||
$backupid = optional_param('backup', false, PARAM_ALPHANUM);
|
||||
if (!($bc = backup_ui::load_controller($backupid))) {
|
||||
$bc = new backup_controller(backup::TYPE_1COURSE, $id, backup::FORMAT_MOODLE,
|
||||
backup::INTERACTIVE_YES, backup::MODE_HUB, $USER->id);
|
||||
}
|
||||
$backup = new backup_ui($bc,
|
||||
array('id' => $id, 'hubcourseid' => $hubcourseid, 'huburl' => HUB_MOODLEORGHUBURL, 'hubname' => 'Moodle.net'));
|
||||
$backup->process();
|
||||
if ($backup->get_stage() == backup_ui::STAGE_FINAL) {
|
||||
$backup->execute();
|
||||
} else {
|
||||
$backup->save_controller();
|
||||
}
|
||||
|
||||
if ($backup->get_stage() !== backup_ui::STAGE_COMPLETE) {
|
||||
$renderer = $PAGE->get_renderer('core', 'backup');
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(get_string('publishcourseon', 'hub', 'Moodle.net'), 3, 'main');
|
||||
if ($backup->enforce_changed_dependencies()) {
|
||||
debugging('Your settings have been altered due to unmet dependencies', DEBUG_DEVELOPER);
|
||||
}
|
||||
echo $renderer->progress_bar($backup->get_progress_bar());
|
||||
echo $backup->display($renderer);
|
||||
echo $OUTPUT->footer();
|
||||
die();
|
||||
}
|
||||
|
||||
//$backupfile = $backup->get_stage_results();
|
||||
$backupfile = $bc->get_results();
|
||||
$backupfile = $backupfile['backup_destination'];
|
||||
//END backup processing
|
||||
|
||||
//display the sending file page
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(get_string('sendingcourse', 'hub'), 3, 'main');
|
||||
$renderer = $PAGE->get_renderer('core', 'course');
|
||||
echo $renderer->sendingbackupinfo($backupfile);
|
||||
if (ob_get_level()) {
|
||||
ob_flush();
|
||||
}
|
||||
flush();
|
||||
|
||||
//send backup file to the hub
|
||||
\core\hub\publication::upload_course_backup($hubcourseid, $backupfile);
|
||||
|
||||
//delete the temp backup file from user_tohub aera
|
||||
$backupfile->delete();
|
||||
$bc->destroy();
|
||||
|
||||
//Output sending success
|
||||
echo $renderer->sentbackupinfo($id, HUB_MOODLEORGHUBURL, 'Moodle.net');
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// This file is part of Moodle - http://moodle.org/ //
|
||||
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
|
||||
// //
|
||||
// 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/>. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* @package course
|
||||
* @subpackage publish
|
||||
* @author Jerome Mouneyrac <jerome@mouneyrac.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
|
||||
* @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
|
||||
*
|
||||
* The forms used for course publication
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
debugging('Support for alternative hubs has been removed from Moodle in 3.4. For communication with moodle.net ' .
|
||||
'see lib/classes/hub/ .', DEBUG_DEVELOPER);
|
||||
@@ -1,96 +0,0 @@
|
||||
<?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/>.
|
||||
|
||||
/*
|
||||
* @package course
|
||||
* @subpackage publish
|
||||
* @author Jerome Mouneyrac <jerome@mouneyrac.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
|
||||
* @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
|
||||
*
|
||||
* The user selects if he wants to publish the course on Moodle.org hub or
|
||||
* on a specific hub. The site must be registered on a hub to be able to
|
||||
* publish a course on it.
|
||||
*/
|
||||
|
||||
require('../../config.php');
|
||||
|
||||
$courseid = required_param('id', PARAM_INT); // Course id.
|
||||
$publicationid = optional_param('publicationid', 0, PARAM_INT); // Id of course publication to unpublish.
|
||||
|
||||
require_login($courseid);
|
||||
$shortname = format_string($COURSE->shortname);
|
||||
|
||||
$PAGE->set_url('/course/publish/index.php', array('id' => $courseid));
|
||||
$PAGE->set_pagelayout('incourse');
|
||||
$PAGE->set_title(get_string('publish', 'core_hub') . ': ' . $COURSE->fullname);
|
||||
$PAGE->set_heading($COURSE->fullname);
|
||||
|
||||
require_capability('moodle/course:publish', context_course::instance($courseid));
|
||||
|
||||
// If the site is not registered display an error page.
|
||||
if (!\core\hub\registration::is_registered()) {
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(get_string('publishcourseon', 'hub', 'Moodle.net'), 3, 'main');
|
||||
echo $OUTPUT->box(get_string('notregisteredonhub', 'hub'));
|
||||
if (has_capability('moodle/site:config', context_system::instance())) {
|
||||
echo $OUTPUT->single_button(new moodle_url('/admin/registration/index.php'), get_string('register', 'admin'));
|
||||
}
|
||||
echo $OUTPUT->footer();
|
||||
die();
|
||||
}
|
||||
|
||||
// When hub listing status is requested update statuses of all published courses.
|
||||
$updatestatusid = optional_param('updatestatusid', false, PARAM_INT);
|
||||
if (!empty($updatestatusid) && confirm_sesskey()) {
|
||||
if (core\hub\publication::get_publication($updatestatusid, $courseid)) {
|
||||
core\hub\publication::request_status_update();
|
||||
redirect($PAGE->url);
|
||||
}
|
||||
}
|
||||
|
||||
$renderer = $PAGE->get_renderer('core', 'course');
|
||||
|
||||
// Unpublish course.
|
||||
if ($publication = \core\hub\publication::get_publication($publicationid, $courseid)) {
|
||||
$confirm = optional_param('confirm', 0, PARAM_BOOL);
|
||||
if ($confirm && confirm_sesskey()) {
|
||||
\core\hub\publication::unpublish($publication);
|
||||
} else {
|
||||
// Display confirmation page for unpublishing.
|
||||
$publication = \core\hub\publication::get_publication($publicationid, $courseid, MUST_EXIST);
|
||||
$publication->courseshortname = format_string($COURSE->shortname);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(get_string('unpublishcourse', 'hub', $shortname), 3, 'main');
|
||||
echo $renderer->confirmunpublishing($publication);
|
||||
echo $OUTPUT->footer();
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
// List current publications and "Publish" buttons.
|
||||
echo $OUTPUT->header();
|
||||
|
||||
echo $OUTPUT->heading(get_string('publishcourse', 'hub', $shortname), 3, 'main');
|
||||
echo $renderer->publicationselector($courseid);
|
||||
|
||||
$publications = \core\hub\publication::get_course_publications($courseid);
|
||||
if (!empty($publications)) {
|
||||
echo $OUTPUT->heading(get_string('publishedon', 'hub'), 3, 'main');
|
||||
echo $renderer->registeredonhublisting($courseid, $publications);
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
@@ -1,189 +0,0 @@
|
||||
<?php
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// This file is part of Moodle - http://moodle.org/ //
|
||||
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
|
||||
// //
|
||||
// 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/>. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
* @package course
|
||||
* @subpackage publish
|
||||
* @author Jerome Mouneyrac <jerome@mouneyrac.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
|
||||
* @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
|
||||
*
|
||||
* This page display the publication metadata form
|
||||
*/
|
||||
|
||||
require_once('../../config.php');
|
||||
require_once($CFG->libdir . '/filelib.php');
|
||||
|
||||
|
||||
//check user access capability to this page
|
||||
$id = required_param('id', PARAM_INT);
|
||||
|
||||
$course = $DB->get_record('course', array('id' => $id), '*', MUST_EXIST);
|
||||
require_login($course);
|
||||
|
||||
//page settings
|
||||
$PAGE->set_url('/course/publish/metadata.php', array('id' => $course->id));
|
||||
$PAGE->set_pagelayout('incourse');
|
||||
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
|
||||
require_capability('moodle/course:publish', context_course::instance($id));
|
||||
|
||||
// Retrieve hub name and hub url.
|
||||
require_sesskey();
|
||||
|
||||
// Set the publication form.
|
||||
$advertise = optional_param('advertise', false, PARAM_BOOL);
|
||||
$publicationid = optional_param('publicationid', false, PARAM_INT);
|
||||
$formparams = array('course' => $course, 'advertise' => $advertise);
|
||||
if ($publicationid) {
|
||||
$publication = \core\hub\publication::get_publication($publicationid, $course->id, MUST_EXIST);
|
||||
$formparams['publication'] = $publication;
|
||||
$advertise = $formparams['advertise'] = $publication->enrollable;
|
||||
}
|
||||
$share = !$advertise;
|
||||
$coursepublicationform = new \core\hub\course_publication_form('', $formparams);
|
||||
$fromform = $coursepublicationform->get_data();
|
||||
|
||||
if (!empty($fromform)) {
|
||||
|
||||
// Retrieve the course information.
|
||||
$courseinfo = new stdClass();
|
||||
$courseinfo->fullname = $fromform->name;
|
||||
$courseinfo->shortname = $fromform->courseshortname;
|
||||
$courseinfo->description = $fromform->description;
|
||||
$courseinfo->language = $fromform->language;
|
||||
$courseinfo->publishername = $fromform->publishername;
|
||||
$courseinfo->publisheremail = $fromform->publisheremail;
|
||||
$courseinfo->contributornames = $fromform->contributornames;
|
||||
$courseinfo->coverage = $fromform->coverage;
|
||||
$courseinfo->creatorname = $fromform->creatorname;
|
||||
$courseinfo->licenceshortname = $fromform->licence;
|
||||
$courseinfo->subject = $fromform->subject;
|
||||
$courseinfo->audience = $fromform->audience;
|
||||
$courseinfo->educationallevel = $fromform->educationallevel;
|
||||
$creatornotes = $fromform->creatornotes;
|
||||
$courseinfo->creatornotes = $creatornotes['text'];
|
||||
$courseinfo->creatornotesformat = $creatornotes['format'];
|
||||
$courseinfo->sitecourseid = $id;
|
||||
if (!empty($fromform->deletescreenshots)) {
|
||||
$courseinfo->deletescreenshots = $fromform->deletescreenshots;
|
||||
}
|
||||
if ($share) {
|
||||
$courseinfo->demourl = $fromform->demourl;
|
||||
$courseinfo->enrollable = false;
|
||||
} else {
|
||||
$courseinfo->courseurl = $fromform->courseurl;
|
||||
$courseinfo->enrollable = true;
|
||||
}
|
||||
|
||||
// Retrieve the outcomes of this course.
|
||||
require_once($CFG->libdir . '/grade/grade_outcome.php');
|
||||
$outcomes = grade_outcome::fetch_all_available($id);
|
||||
if (!empty($outcomes)) {
|
||||
foreach ($outcomes as $outcome) {
|
||||
$sentoutcome = new stdClass();
|
||||
$sentoutcome->fullname = $outcome->fullname;
|
||||
$courseinfo->outcomes[] = $sentoutcome;
|
||||
}
|
||||
}
|
||||
|
||||
// Retrieve the content information from the course.
|
||||
$coursecontext = context_course::instance($course->id);
|
||||
$courseblocks = \core\hub\publication::get_block_instances_by_context($coursecontext->id);
|
||||
|
||||
if (!empty($courseblocks)) {
|
||||
$blockname = '';
|
||||
foreach ($courseblocks as $courseblock) {
|
||||
if ($courseblock->blockname != $blockname) {
|
||||
if (!empty($blockname)) {
|
||||
$courseinfo->contents[] = $content;
|
||||
}
|
||||
|
||||
$blockname = $courseblock->blockname;
|
||||
$content = new stdClass();
|
||||
$content->moduletype = 'block';
|
||||
$content->modulename = $courseblock->blockname;
|
||||
$content->contentcount = 1;
|
||||
} else {
|
||||
$content->contentcount = $content->contentcount + 1;
|
||||
}
|
||||
}
|
||||
$courseinfo->contents[] = $content;
|
||||
}
|
||||
|
||||
$activities = get_fast_modinfo($course, $USER->id);
|
||||
foreach ($activities->instances as $activityname => $activitydetails) {
|
||||
$content = new stdClass();
|
||||
$content->moduletype = 'activity';
|
||||
$content->modulename = $activityname;
|
||||
$content->contentcount = count($activities->instances[$activityname]);
|
||||
$courseinfo->contents[] = $content;
|
||||
}
|
||||
|
||||
// Save into screenshots field the references to the screenshot content hash
|
||||
// (it will be like a unique id from the hub perspective).
|
||||
if (!empty($fromform->deletescreenshots) or $share) {
|
||||
$courseinfo->screenshots = 0;
|
||||
} else {
|
||||
$courseinfo->screenshots = $fromform->existingscreenshotnumber;
|
||||
}
|
||||
$files = [];
|
||||
if (!empty($fromform->screenshots)) {
|
||||
$fs = get_file_storage();
|
||||
$files = $fs->get_area_files(context_user::instance($USER->id)->id, 'user', 'draft', $fromform->screenshots,
|
||||
'filepath, filename', false);
|
||||
$files = array_filter($files, function(stored_file $file) {
|
||||
return $file->is_valid_image();
|
||||
});
|
||||
$courseinfo->screenshots += count($files);
|
||||
}
|
||||
|
||||
// PUBLISH ACTION.
|
||||
$hubcourseid = \core\hub\publication::publish_course($courseinfo, $files);
|
||||
|
||||
// Redirect to the backup process page.
|
||||
if ($share) {
|
||||
$params = array('sesskey' => sesskey(), 'id' => $id, 'hubcourseid' => $hubcourseid);
|
||||
$backupprocessurl = new moodle_url("/course/publish/backup.php", $params);
|
||||
redirect($backupprocessurl);
|
||||
} else {
|
||||
// Redirect to the index publis page.
|
||||
redirect(new moodle_url('/course/publish/index.php', ['id' => $id]),
|
||||
get_string('coursepublished', 'hub', 'Moodle.net'), null, \core\output\notification::NOTIFY_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
// OUTPUT SECTION.
|
||||
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(get_string('publishcourseon', 'hub', 'Moodle.net'), 3, 'main');
|
||||
|
||||
// Display hub information (logo, name, description).
|
||||
$renderer = $PAGE->get_renderer('core', 'course');
|
||||
if ($hubinfo = \core\hub\registration::get_moodlenet_info()) {
|
||||
echo $renderer->hubinfo($hubinfo);
|
||||
}
|
||||
|
||||
// Display metadata form.
|
||||
$coursepublicationform->display();
|
||||
echo $OUTPUT->footer();
|
||||
@@ -2082,128 +2082,6 @@ class core_course_renderer extends plugin_renderer_base {
|
||||
return $this->output->render_from_template('core_course/activity_navigation', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the selector to advertise or publish a course
|
||||
* @param int $courseid
|
||||
*/
|
||||
public function publicationselector($courseid) {
|
||||
$text = '';
|
||||
|
||||
$advertiseurl = new moodle_url("/course/publish/metadata.php",
|
||||
array('sesskey' => sesskey(), 'id' => $courseid, 'advertise' => true));
|
||||
$advertisebutton = new single_button($advertiseurl, get_string('advertise', 'hub'));
|
||||
$text .= $this->output->render($advertisebutton);
|
||||
$text .= html_writer::tag('div', get_string('advertisepublication_help', 'hub'),
|
||||
array('class' => 'publishhelp'));
|
||||
|
||||
$text .= html_writer::empty_tag('br'); // TODO Delete.
|
||||
|
||||
$uploadurl = new moodle_url("/course/publish/metadata.php",
|
||||
array('sesskey' => sesskey(), 'id' => $courseid, 'share' => true));
|
||||
$uploadbutton = new single_button($uploadurl, get_string('share', 'hub'));
|
||||
$text .= $this->output->render($uploadbutton);
|
||||
$text .= html_writer::tag('div', get_string('sharepublication_help', 'hub'),
|
||||
array('class' => 'publishhelp'));
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the listing of hub where a course is registered on
|
||||
* @param int $courseid
|
||||
* @param array $publications
|
||||
*/
|
||||
public function registeredonhublisting($courseid, $publications) {
|
||||
global $CFG;
|
||||
$table = new html_table();
|
||||
$table->head = array(get_string('type', 'hub'),
|
||||
get_string('date'), get_string('status', 'hub'), get_string('operation', 'hub'));
|
||||
$table->size = array('20%', '30%', '%20', '%25');
|
||||
|
||||
$brtag = html_writer::empty_tag('br');
|
||||
|
||||
foreach ($publications as $publication) {
|
||||
|
||||
$params = array('id' => $publication->courseid, 'publicationid' => $publication->id);
|
||||
$cancelurl = new moodle_url("/course/publish/index.php", $params);
|
||||
$cancelbutton = new single_button($cancelurl, get_string('removefromhub', 'hub'));
|
||||
$cancelbutton->class = 'centeredbutton';
|
||||
$cancelbuttonhtml = $this->output->render($cancelbutton);
|
||||
|
||||
if ($publication->enrollable) {
|
||||
$params = array('sesskey' => sesskey(), 'id' => $publication->courseid, 'publicationid' => $publication->id);
|
||||
$updateurl = new moodle_url("/course/publish/metadata.php", $params);
|
||||
$updatebutton = new single_button($updateurl, get_string('update', 'hub'));
|
||||
$updatebutton->class = 'centeredbutton';
|
||||
$updatebuttonhtml = $this->output->render($updatebutton);
|
||||
|
||||
$operations = $updatebuttonhtml . $brtag . $cancelbuttonhtml;
|
||||
} else {
|
||||
$operations = $cancelbuttonhtml;
|
||||
}
|
||||
|
||||
// If the publication check time if bigger than May 2010, it has been checked.
|
||||
if ($publication->timechecked > 1273127954) {
|
||||
if ($publication->status == 0) {
|
||||
$status = get_string('statusunpublished', 'hub');
|
||||
} else {
|
||||
$status = get_string('statuspublished', 'hub');
|
||||
if (!empty($publication->link)) {
|
||||
$status = html_writer::link($publication->link, $status);
|
||||
}
|
||||
}
|
||||
|
||||
$status .= $brtag . html_writer::tag('a', get_string('updatestatus', 'hub'),
|
||||
array('href' => $CFG->wwwroot . '/course/publish/index.php?id='
|
||||
. $courseid . "&updatestatusid=" . $publication->id
|
||||
. "&sesskey=" . sesskey())) .
|
||||
$brtag . get_string('lasttimechecked', 'hub') . ": "
|
||||
. format_time(time() - $publication->timechecked);
|
||||
} else {
|
||||
$status = get_string('neverchecked', 'hub') . $brtag
|
||||
. html_writer::tag('a', get_string('updatestatus', 'hub'),
|
||||
array('href' => $CFG->wwwroot . '/course/publish/index.php?id='
|
||||
. $courseid . "&updatestatusid=" . $publication->id
|
||||
. "&sesskey=" . sesskey()));
|
||||
}
|
||||
// Add button cells.
|
||||
$cells = array($publication->enrollable ?
|
||||
get_string('advertised', 'hub') : get_string('shared', 'hub'),
|
||||
userdate($publication->timepublished,
|
||||
get_string('strftimedatetimeshort')), $status, $operations);
|
||||
$row = new html_table_row($cells);
|
||||
$table->data[] = $row;
|
||||
}
|
||||
|
||||
$contenthtml = html_writer::table($table);
|
||||
|
||||
return $contenthtml;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display unpublishing confirmation page
|
||||
* @param stdClass $publication
|
||||
* $publication->courseshortname
|
||||
* $publication->courseid
|
||||
* $publication->hubname
|
||||
* $publication->huburl
|
||||
* $publication->id
|
||||
*/
|
||||
public function confirmunpublishing($publication) {
|
||||
$optionsyes = array('sesskey' => sesskey(), 'id' => $publication->courseid,
|
||||
'hubcourseid' => $publication->hubcourseid,
|
||||
'cancel' => true, 'publicationid' => $publication->id, 'confirm' => true);
|
||||
$optionsno = array('sesskey' => sesskey(), 'id' => $publication->courseid);
|
||||
$publication->hubname = html_writer::tag('a', 'Moodle.net',
|
||||
array('href' => HUB_MOODLEORGHUBURL));
|
||||
$formcontinue = new single_button(new moodle_url("/course/publish/index.php",
|
||||
$optionsyes), get_string('unpublish', 'hub'), 'post');
|
||||
$formcancel = new single_button(new moodle_url("/course/publish/index.php",
|
||||
$optionsno), get_string('cancel'), 'get');
|
||||
return $this->output->confirm(get_string('unpublishconfirmation', 'hub', $publication),
|
||||
$formcontinue, $formcancel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display waiting information about backup size during uploading backup process
|
||||
* @param object $backupfile the backup stored_file
|
||||
@@ -2217,23 +2095,6 @@ class core_course_renderer extends plugin_renderer_base {
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display upload successfull message and a button to the publish index page
|
||||
* @param int $id the course id
|
||||
* @return $html string
|
||||
*/
|
||||
public function sentbackupinfo($id) {
|
||||
$html = html_writer::tag('div', get_string('sent', 'hub'),
|
||||
array('class' => 'courseuploadtextinfo'));
|
||||
$publishindexurl = new moodle_url('/course/publish/index.php',
|
||||
array('sesskey' => sesskey(), 'id' => $id,
|
||||
'published' => true));
|
||||
$continue = $this->output->render(
|
||||
new single_button($publishindexurl, get_string('continue')));
|
||||
$html .= html_writer::tag('div', $continue, array('class' => 'sharecoursecontinue'));
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hub information (logo - name - description - link)
|
||||
* @param object $hubinfo
|
||||
|
||||
@@ -68,3 +68,48 @@ Feature: Managers can create courses
|
||||
| id_enddate_day | 24 |
|
||||
| id_enddate_month | October |
|
||||
| id_enddate_year | 2016 |
|
||||
|
||||
Scenario: Create a course as a custom course creator
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| kevin | Kevin | the | kevin@example.com |
|
||||
And the following "roles" exist:
|
||||
| shortname | name | archetype |
|
||||
| creator | Creator | |
|
||||
And the following "system role assigns" exist:
|
||||
| user | role | contextlevel |
|
||||
| kevin | creator | System |
|
||||
And I log in as "admin"
|
||||
And I set the following system permissions of "Creator" role:
|
||||
| capability | permission |
|
||||
| moodle/course:create | Allow |
|
||||
| moodle/course:manageactivities | Allow |
|
||||
| moodle/course:viewparticipants | Allow |
|
||||
| moodle/role:assign | Allow |
|
||||
And I log out
|
||||
And I log in as "kevin"
|
||||
And I am on site homepage
|
||||
When I press "Add a new course"
|
||||
And I set the following fields to these values:
|
||||
| Course full name | My first course |
|
||||
| Course short name | myfirstcourse |
|
||||
And I press "Save and display"
|
||||
And I follow "Participants"
|
||||
Then I should see "Kevin the"
|
||||
And I should not see "Teacher"
|
||||
And I log out
|
||||
Given I log in as "admin"
|
||||
And I define the allowed role assignments for the "Creator" role as:
|
||||
| Teacher | Assignable |
|
||||
And I log out
|
||||
And I log in as "kevin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
When I press "Add a new course"
|
||||
And I set the following fields to these values:
|
||||
| Course full name | My second course |
|
||||
| Course short name | mysecondcourse |
|
||||
And I press "Save and display"
|
||||
And I follow "Participants"
|
||||
Then I should see "Kevin the"
|
||||
And I should see "Teacher"
|
||||
|
||||
@@ -3193,7 +3193,6 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
$this->assertFalse($adminoptions->outcomes);
|
||||
$this->assertTrue($adminoptions->badges);
|
||||
$this->assertTrue($adminoptions->import);
|
||||
$this->assertTrue($adminoptions->publish);
|
||||
$this->assertTrue($adminoptions->reset);
|
||||
$this->assertTrue($adminoptions->roles);
|
||||
}
|
||||
@@ -3225,7 +3224,6 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
$this->assertFalse($adminoptions->outcomes);
|
||||
$this->assertTrue($adminoptions->badges);
|
||||
$this->assertFalse($adminoptions->import);
|
||||
$this->assertFalse($adminoptions->publish);
|
||||
$this->assertFalse($adminoptions->reset);
|
||||
$this->assertFalse($adminoptions->roles);
|
||||
|
||||
@@ -5092,4 +5090,50 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
$this->assertCount(3, $result);
|
||||
$this->assertArrayNotHasKey($courses[0]->id, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Data provider for test_course_modules_pending_deletion.
|
||||
*
|
||||
* @return array An array of arrays contain test data
|
||||
*/
|
||||
public function provider_course_modules_pending_deletion() {
|
||||
return [
|
||||
'Non-gradable activity, check all' => [['forum'], 0, false, true],
|
||||
'Gradable activity, check all' => [['assign'], 0, false, true],
|
||||
'Non-gradable activity, check gradables' => [['forum'], 0, true, false],
|
||||
'Gradable activity, check gradables' => [['assign'], 0, true, true],
|
||||
'Non-gradable within multiple, check all' => [['quiz', 'forum', 'assign'], 1, false, true],
|
||||
'Non-gradable within multiple, check gradables' => [['quiz', 'forum', 'assign'], 1, true, false],
|
||||
'Gradable within multiple, check all' => [['quiz', 'forum', 'assign'], 2, false, true],
|
||||
'Gradable within multiple, check gradables' => [['quiz', 'forum', 'assign'], 2, true, true],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the function course_modules_pending_deletion.
|
||||
*
|
||||
* @param string[] $modules A complete list aff all available modules before deletion
|
||||
* @param int $indextodelete The index of the module in the $modules array that we want to test with
|
||||
* @param bool $gradable The value to pass to the gradable argument of the course_modules_pending_deletion function
|
||||
* @param bool $expected The expected result
|
||||
* @dataProvider provider_course_modules_pending_deletion
|
||||
*/
|
||||
public function test_course_modules_pending_deletion(array $modules, int $indextodelete, bool $gradable, bool $expected) {
|
||||
$this->resetAfterTest();
|
||||
|
||||
// Ensure recyclebin is enabled.
|
||||
set_config('coursebinenable', true, 'tool_recyclebin');
|
||||
|
||||
// Create course and modules.
|
||||
$generator = $this->getDataGenerator();
|
||||
$course = $generator->create_course();
|
||||
|
||||
$moduleinstances = [];
|
||||
foreach ($modules as $module) {
|
||||
$moduleinstances[] = $generator->create_module($module, array('course' => $course->id));
|
||||
}
|
||||
|
||||
course_delete_module($moduleinstances[$indextodelete]->cmid, true); // Try to delete the instance asynchronously.
|
||||
$this->assertEquals($expected, course_modules_pending_deletion($course->id, $gradable));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2141,12 +2141,11 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
|
||||
$this->assertFalse($adminoptions->outcomes);
|
||||
$this->assertFalse($adminoptions->badges);
|
||||
$this->assertFalse($adminoptions->import);
|
||||
$this->assertFalse($adminoptions->publish);
|
||||
$this->assertFalse($adminoptions->reset);
|
||||
$this->assertFalse($adminoptions->roles);
|
||||
$this->assertFalse($adminoptions->editcompletion);
|
||||
} else {
|
||||
$this->assertCount(15, $course['options']);
|
||||
$this->assertCount(14, $course['options']);
|
||||
$this->assertFalse($adminoptions->update);
|
||||
$this->assertFalse($adminoptions->filters);
|
||||
$this->assertFalse($adminoptions->reports);
|
||||
@@ -2158,7 +2157,6 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
|
||||
$this->assertFalse($adminoptions->outcomes);
|
||||
$this->assertTrue($adminoptions->badges);
|
||||
$this->assertFalse($adminoptions->import);
|
||||
$this->assertFalse($adminoptions->publish);
|
||||
$this->assertFalse($adminoptions->reset);
|
||||
$this->assertFalse($adminoptions->roles);
|
||||
$this->assertFalse($adminoptions->editcompletion);
|
||||
|
||||
@@ -124,7 +124,7 @@ class converter implements \core_files\converter_interface {
|
||||
$uploadurl;
|
||||
// Google returns a location header with the location for the upload.
|
||||
foreach ($headers as $header) {
|
||||
if (strpos($header, 'Location:') === 0) {
|
||||
if (stripos($header, 'Location:') === 0) {
|
||||
$uploadurl = trim(substr($header, strpos($header, ':') + 1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,9 @@ class converter implements \core_files\converter_interface {
|
||||
|
||||
$conversions = conversion::get_conversions_for_file($testdocx, $format);
|
||||
foreach ($conversions as $conversion) {
|
||||
$conversion->delete();
|
||||
if ($conversion->get('id')) {
|
||||
$conversion->delete();
|
||||
}
|
||||
}
|
||||
|
||||
$conversion = new conversion(0, (object) [
|
||||
|
||||
@@ -23,6 +23,7 @@ Feature: Converting rubric score to grades
|
||||
| activity | name | intro | course | idnumber | grade | advancedgradingmethod_submissions |
|
||||
| assign | Test assignment 1 | Test | C1 | assign1 | <grade> | rubric |
|
||||
When I log in as "teacher1"
|
||||
And I change window size to "large"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I go to "Test assignment 1" advanced grading definition page
|
||||
And I set the following fields to these values:
|
||||
|
||||
@@ -26,6 +26,7 @@ Feature: Rubrics can have levels with negative scores
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | grade | advancedgradingmethod_submissions |
|
||||
| assign | Test assignment 1 | Test | C1 | assign1 | 100 | rubric |
|
||||
And I change window size to "large"
|
||||
When I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I go to "Test assignment 1" advanced grading definition page
|
||||
|
||||
+1
-1
@@ -986,7 +986,7 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null,
|
||||
|
||||
// Put a warning on all gradebook pages if the course has modules currently scheduled for background deletion.
|
||||
require_once($CFG->dirroot . '/course/lib.php');
|
||||
if (course_modules_pending_deletion($courseid)) {
|
||||
if (course_modules_pending_deletion($courseid, true)) {
|
||||
\core\notification::add(get_string('gradesmoduledeletionpendingwarning', 'grades'),
|
||||
\core\output\notification::NOTIFY_WARNING);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ Feature: A teacher checks the grade history report in a course
|
||||
| Student 2 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 |
|
||||
| Student 2 | Rewarding assignment | 60.00 | 80.00 | Teacher 2 |
|
||||
# Test filtering by assignment.
|
||||
And I click on "The greatest assignment ever" "option" in the "#id_itemid" "css_element"
|
||||
And I set the field "Grade item" to "The greatest assignment ever"
|
||||
And I press "Submit"
|
||||
And the following should exist in the "gradereport_history" table:
|
||||
| First name/Surname | Grade item | Original grade | Revised grade | Grader |
|
||||
@@ -87,7 +87,7 @@ Feature: A teacher checks the grade history report in a course
|
||||
| Student 1 | Rewarding assignment | | 60.00 | Teacher 1 |
|
||||
| Student 1 | Rewarding assignment | 60.00 | 80.00 | Teacher 2 |
|
||||
# Test filtering by grader.
|
||||
And I click on "Teacher 1" "option" in the "#id_grader" "css_element"
|
||||
And I set the field "Grader" to "Teacher 1"
|
||||
And I press "Submit"
|
||||
And the following should exist in the "gradereport_history" table:
|
||||
| First name/Surname | Grade item | Original grade | Revised grade | Grader |
|
||||
|
||||
@@ -93,7 +93,8 @@ class dropdown_attribute extends element {
|
||||
'value' => $option,
|
||||
'selected' => $selected == $option
|
||||
];
|
||||
}, array_keys($options))
|
||||
}, array_keys($options)),
|
||||
'label' => get_string('gradefor', 'gradereport_singleview', $this->label),
|
||||
);
|
||||
|
||||
return $OUTPUT->render_from_template('gradereport_singleview/dropdown_attribute', $context);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
{{!
|
||||
Dropdown attribute.
|
||||
}}
|
||||
<label for="{{name}}" class="accesshide">{{label}}</label>
|
||||
<select id="{{name}}" name="{{name}}" tabindex="1" {{#disabled}}disabled{{/disabled}}>
|
||||
{{#options}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
|
||||
@@ -87,7 +87,7 @@ Feature: We can use Single view
|
||||
And the field "Grade for james (Student) 1" matches value "12.05"
|
||||
And the field "Exclude for holly (Student) 2" matches value "1"
|
||||
And I select "new grade item 1" from the "Select grade item..." singleselect
|
||||
And I click on "Very good" "option"
|
||||
And I set the field "Grade for james (Student) 1" to "Very good"
|
||||
And I press "Save"
|
||||
Then I should see "Grades were set for 1 items"
|
||||
And I press "Continue"
|
||||
@@ -98,7 +98,7 @@ Feature: We can use Single view
|
||||
And I log in as "teacher2"
|
||||
And I am on "Course 1" course homepage
|
||||
Given I navigate to "View > Single view" in the course gradebook
|
||||
And I click on "Student 4" "option"
|
||||
And I select "Student 4" from the "Select user..." singleselect
|
||||
And the "Exclude for Test assignment one" "checkbox" should be disabled
|
||||
And the "Override for Test assignment one" "checkbox" should be enabled
|
||||
|
||||
|
||||
@@ -372,6 +372,30 @@ body {
|
||||
background-color: rgb(245, 245, 245);
|
||||
padding: 8px 15px;
|
||||
}
|
||||
|
||||
.w-100 {
|
||||
width: 100%!important;
|
||||
}
|
||||
.flex-row-reverse {
|
||||
flex-direction: row-reverse!important;
|
||||
}
|
||||
.btn-group, .btn-group-vertical {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.mb-3, .my-3 {
|
||||
margin-bottom: 1rem!important;
|
||||
}
|
||||
.mr-auto, .mx-auto {
|
||||
margin-right: auto!important;
|
||||
}
|
||||
.ml-auto, .mx-auto {
|
||||
margin-left: auto!important;
|
||||
}
|
||||
.ml-1, .mx-1 {
|
||||
margin-left: .25rem!important;
|
||||
}
|
||||
/*
|
||||
End of MDL-43839 IE9 specific CSS.
|
||||
*/
|
||||
|
||||
@@ -89,7 +89,7 @@ $string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Podařilo se vám úspěšně nainstalovat a spustit balíček <strong>{$a->packname} {$a->packversion}</strong>. Gratulujeme!';
|
||||
$string['welcomep30'] = 'Tato verze <strong>{$a->installername}</strong> obsahuje aplikace k vytvoření prostředí, ve kterém bude provozován váš <strong>Moodle</strong>. Jmenovitě se jedná o:';
|
||||
$string['welcomep40'] = 'Balíček rovněž obsahuje <strong>Moodle ve verzi {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'Použití všech aplikací v tomto balíčku je vázáno jejich příslušnými licencemi. Kompletní balíček <strong>{$a->installername}</strong> je software s <a href="http://www.opensource.org/docs/definition_plain.html"> otevřeným kódem (open source)</a> a je šířen pod licencí <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
|
||||
$string['welcomep50'] = 'Použití všech aplikací v tomto balíčku je vázáno jejich příslušnými licencemi. Kompletní balíček <strong>{$a->installername}</strong> je software s <a href="https://www.opensource.org/docs/definition_plain.html"> otevřeným kódem (open source)</a> a je šířen pod licencí <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a>.';
|
||||
$string['welcomep60'] = 'Následující stránky vás v několik jednoduchých krocích nastavením <strong>Moodlu</strong> na vašem počítači. Můžete přijmout výchozí nastavení, nebo si je upravit podle svých potřeb.';
|
||||
$string['welcomep70'] = 'Stisknutím níže uvedeného tlačítka "Další" pokračujte v nastavení vaší instalace Moodlu.';
|
||||
$string['wwwroot'] = 'Webová adresa';
|
||||
|
||||
@@ -88,7 +88,7 @@ $string['welcomep20'] = 'Du ser denne side fordi du har installeret og åbnet pa
|
||||
Tillykke med det!';
|
||||
$string['welcomep30'] = 'Denne version af <strong>{$a->installername}</strong> indeholder programmerne til at oprette et miljø, hvori <strong>Moodle</strong> vil operere, nemlig:';
|
||||
$string['welcomep40'] = 'Pakken indeholder også <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'Brugen af programmerne i denne pakke reguleres af deres respektive licenser. Hele <strong>{$a->installername}</strong>-pakken er <a href="http://www.opensource.org/docs/definition_plain.html">open source</a> og distribueret under <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>-licensen.';
|
||||
$string['welcomep50'] = 'Brugen af programmerne i denne pakke reguleres af deres respektive licenser. Hele <strong>{$a->installername}</strong>-pakken er <a href="https://www.opensource.org/docs/definition_plain.html">open source</a> og distribueret under <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a>-licensen.';
|
||||
$string['welcomep60'] = 'De følgende sider vil hjælpe dig gennem nogle nemme trin til konfiguration og opsætning af <strong>Moodle</strong> på din computer. Du kan acceptere standardindstillingerne, eller vælge at ændre dem så de bedre svarer til dine egne behov.';
|
||||
$string['welcomep70'] = 'Klik på "Næste" herunder for at forsætte opsætningen af <strong>Moodle</strong>.';
|
||||
$string['wwwroot'] = 'Webadresse';
|
||||
|
||||
@@ -40,7 +40,7 @@ $string['cannotsavemd5file'] = 'Αδυναμία αποθήκευσης αρχε
|
||||
$string['cannotsavezipfile'] = 'Αδυναμία αποθήκευσης συμπιεσμένου αρχείου';
|
||||
$string['cannotunzipfile'] = 'Αδυναμία αποσυμπίεσης αρχείου';
|
||||
$string['componentisuptodate'] = 'Το στοιχείο λογισμικού είναι ενημερωμένο.';
|
||||
$string['dmlexceptiononinstall'] = '<p>Παρουσιάστηκε σφάλμα βάσης δεδομένων [{$a->errorcode}].<br />{$a->debuginfo}</p>';
|
||||
$string['dmlexceptiononinstall'] = '<p>Παρουσιάστηκε κάποιο σφάλμα βάσης δεδομένων [{$a->errorcode}].<br />{$a->debuginfo}</p>';
|
||||
$string['downloadedfilecheckfailed'] = 'Αποτυχία ελέγχου αρχείου που έγινε λήψη';
|
||||
$string['invalidmd5'] = 'Μη έγκυρο md5';
|
||||
$string['missingrequiredfield'] = 'Κάποιο απαιτούμενο πεδίο λείπει';
|
||||
|
||||
@@ -85,7 +85,7 @@ $string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Βλέπετε αυτή τη σελίδα γιατί εγκαταστήσατε και ξεκινήσατε με επιτυχία το πακέτο <strong>{$a->packname} {$a->packversion}</strong> στον υπολογιστή σας. Συγχαρητήρια!';
|
||||
$string['welcomep30'] = 'Αυτή η έκδοση/διανομή <strong>{$a->installername}</strong> περιλαμβάνει τις εφαρμογές για τη δημιουργία ενός περιβάλλοντος μέσα στο οποίο θα λειτουργεί το <strong>Moodle</strong>, ονομαστικά:';
|
||||
$string['welcomep40'] = 'Το πακέτο περιλαμβάνει επίσης το <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'Η χρήση όλων των εφαρμογών σε αυτό το πακέτο υπόκειται στις αντίστοιχες άδειες. Ολόκληρο το πακέτο <strong>{$a->installername}</strong> είναι <a href="http://www.opensource.org/docs/definition_plain.html">λογισμικό ανοικτού κώδικα</a> και διανέμεται με την <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> άδεια.';
|
||||
$string['welcomep50'] = 'Η χρήση όλων των εφαρμογών σε αυτό το πακέτο υπόκειται στις αντίστοιχες άδειες. Ολόκληρο το πακέτο <strong>{$a->installername}</strong> είναι <a href="https://www.opensource.org/docs/definition_plain.html">λογισμικό ανοικτού κώδικα</a> και διανέμεται με την <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a> άδεια.';
|
||||
$string['welcomep60'] = 'Οι παρακάτω σελίδες θα σας καθοδηγήσουν με εύκολα βήματα στην εγκατάσταση και ρύθμιση του <strong>Moodle</strong> στον Η/Υ σας. Μπορείτε να δεχθείτε τις προεπιλεγμένες ρυθμίσεις ή προαιρετικά, να τις τροποποιήσετε ανάλογα με τις ανάγκες σας.';
|
||||
$string['welcomep70'] = 'Πατήστε το κουμπί «Συνέχεια» για να συνεχίσετε με την εγκατάσταση του <strong>Moodle</strong>.';
|
||||
$string['wwwroot'] = 'Διεύθυνση ιστού';
|
||||
|
||||
@@ -85,7 +85,7 @@ $string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Vous voyez cette page, car vous avez installé Moodle correctement et lancé le logiciel <b>{$a->packname} {$a->packversion}</b> sur votre ordinateur. Félicitations !';
|
||||
$string['welcomep30'] = 'Cette version de <b>{$a->installername}</b> comprend des logiciels qui créent un environnement dans lequel <b>Moodle</b> va fonctionner, à savoir :';
|
||||
$string['welcomep40'] = 'Ce paquet contient également <b>Moodle {$a->moodlerelease} ({$a->moodleversion})</b>.';
|
||||
$string['welcomep50'] = 'L\'utilisation de tous les logiciels de ce paquet est soumis à l\'acceptation de leurs licences respectives. Le paquet <b>{$a->installername}</b> est un <a href="http://www.opensource.org/docs/definition_plain.html">logiciel libre</a>. Il est distribué sous licence <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
|
||||
$string['welcomep50'] = 'L\'utilisation de tous les logiciels de ce paquetage est soumis à l\'acceptation de leurs licences respectives. Le paquetage complet <strong>{$a->installername}</strong> est un <a href="https://www.opensource.org/docs/definition_plain.html">logiciel libre</a>. Il est distribué sous licence <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a>.';
|
||||
$string['welcomep60'] = 'Les pages suivantes vous aideront pas à pas à configurer et mettre en place <b>Moodle</b> sur votre ordinateur. Il vous sera possible d\'accepter les réglages par défaut ou, facultativement, de les adapter à vos propres besoins.';
|
||||
$string['welcomep70'] = 'Cliquer sur le bouton « Suivant » ci-dessous pour continuer l\'installation de <b>Moodle</b>.';
|
||||
$string['wwwroot'] = 'Adresse web';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -14,4 +15,20 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = 'fr';
|
||||
$string['thislanguage'] = 'Français pour Workplace';
|
||||
@@ -36,12 +36,28 @@ $string['chooselanguagehead'] = 'Pilih bahasa';
|
||||
$string['chooselanguagesub'] = 'Silakan pilih bahasa untuk instalasi. Bahasa ini juga akan digunakan sebagai bahasa default untuk situs, meskipun mungkin akan diubah kemudian.';
|
||||
$string['clialreadyconfigured'] = 'Berkas konfigurasi config.php sudah ada. Silakan gunakan admin /cli/install_database.php untuk menginstal Moodle untuk situs ini.';
|
||||
$string['clialreadyinstalled'] = 'File konfigurasi config.php sudah ada. Silakan gunakan admin/cli/install_database.php untuk menginstal Moodle untuk situs ini.';
|
||||
$string['cliinstallheader'] = 'Program pemasangan baris perintah Moodle {$a}';
|
||||
$string['databasehost'] = 'Host basis data';
|
||||
$string['databasename'] = 'Nama basis data';
|
||||
$string['databasetypehead'] = 'Pilih pengandar basis data';
|
||||
$string['dataroot'] = 'Direktori data';
|
||||
$string['datarootpermission'] = 'Izin direktori data';
|
||||
$string['dbprefix'] = 'Prefiks tabel';
|
||||
$string['dirroot'] = 'Direktori Moodle';
|
||||
$string['environmenthead'] = 'Memeriksa sistem Anda ...';
|
||||
$string['environmentsub2'] = 'Setiap rilis Moodle memiliki beberapa persyaratan versi PHP minimum dan sejumlah ekstensi PHP wajib. Pemeriksaan komponen sistem akan dilakukan sebelum pemasangan dan peningkatan versi. Silakan hubungi administrator peladen jika Anda tidak tahu cara mamasang versi baru atau mengaktifkan ekstensi PHP.';
|
||||
$string['errorsinenvironment'] = 'Pemeriksaan sistem gagal!';
|
||||
$string['installation'] = 'Instalasi';
|
||||
$string['langdownloaderror'] = 'Sayangnya bahasa "{$a}" tidak dapat diunduh. Proses instalasi akan dilanjutkan dalam bahasa Inggris.';
|
||||
$string['memorylimithelp'] = '<p> Batas memori PHP untuk server Anda saat ini diatur ke {$a}. </p> <p> Ini dapat menyebabkan Moodle memiliki masalah memori di kemudian hari, terutama jika Anda memiliki banyak modul yang diaktifkan dan/atau banyak pengguna. </p> <p> Kami menyarankan Anda mengkonfigurasi PHP dengan batas yang lebih tinggi jika memungkinkan, seperti 40M. Ada beberapa cara untuk melakukan ini yang dapat Anda coba: </p>
|
||||
<ol> <li> Jika Anda bisa, kompilasi ulang PHP dengan <i> --enable-memory-limit </i>. Ini memungkinkan Moodle untuk mengatur batas memori itu sendiri. </li>
|
||||
<li> Jika Anda memiliki akses ke file php.ini, Anda dapat mengubah pengaturan <b> memory_limit </b> di sana menjadi sekitar 40M. Jika Anda tidak memiliki akses, Anda mungkin dapat meminta administrator untuk melakukan ini untuk Anda. </li>
|
||||
<li> Pada beberapa server PHP, Anda dapat membuat file .htaccess di direktori Moodle yang berisi baris ini: <blockquote> <div> php_value memory_limit 40M </div> </blockquote> <p> Namun, pada beberapa server ini tidak diizinkan <b> semua </b> halaman PHP tidak berfungsi (Anda akan melihat kesalahan ketika Anda melihat halaman) sehingga Anda Anda harus menghapus file .htaccess. </p> </li> </ol>';
|
||||
$string['paths'] = 'Jalur';
|
||||
$string['pathserrcreatedataroot'] = 'Direktori data ({$a->dataroot}) tidak dapat dibuat oleh installer.';
|
||||
$string['pathshead'] = 'Konfirmasi jalur';
|
||||
$string['pathsrodataroot'] = 'Direktori data root tidak dapat ditulisi.';
|
||||
$string['pathsroparentdataroot'] = 'Direktori induk ({$a->parent}) tidak dapat ditulisi. Direktori data ({$a->dataroot}) tidak dapat dibuat oleh installer.';
|
||||
$string['pathssubadmindir'] = 'Beberapa hosting menggunakan / admin sebagai URL khusus untuk Anda mengakses panel kontrol atau sesuatu. Sayangnya ini bertentangan dengan lokasi standar untuk halaman admin Moodle. Anda dapat memperbaikinya dengan mengganti nama direktori admin di instalasi Anda, dan meletakkan nama baru itu di sini. Misalnya: <em> moodleadmin </em>. Ini akan memperbaiki tautan admin di Moodle.';
|
||||
$string['pathssubdataroot'] = '<p> Direktori tempat Moodle akan menyimpan semua konten file yang diunggah oleh pengguna. </p> <p> Direktori ini harus dapat dibaca dan ditulis oleh pengguna server web (biasanya \'www-data\', \'nobody\', atau \' apache \'). </p> <p> Itu tidak boleh diakses secara langsung melalui web. </p> <p> Jika direktori saat ini tidak ada, proses instalasi akan berusaha membuatnya. </p>';
|
||||
$string['pathssubdirroot'] = '<p> Jalur lengkap ke direktori yang berisi kode Moodle. </p>';
|
||||
|
||||
@@ -40,6 +40,6 @@ $string['cliunknowoption'] = 'Nieznana opcja:
|
||||
{$a}
|
||||
Proszę użyć pomocy.';
|
||||
$string['cliyesnoprompt'] = 'wpisz y (czyli tak) lub n (czyli nie)';
|
||||
$string['environmentrequireinstall'] = 'jest niezbędnę, żeby było zainstalowane/włączone';
|
||||
$string['environmentrequireinstall'] = 'jest niezbędne, aby było zainstalowane i włączone';
|
||||
$string['environmentrequireversion'] = 'wersja {$a->needed} jest niezbędna a ty używasz wersji {$a->current}';
|
||||
$string['upgradekeyset'] = 'Zaktualizuj klucz (pozostaw puste jeśli nie jest to skonfigurowane)';
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['clianswerno'] = 'n';
|
||||
$string['cliansweryes'] = 'y';
|
||||
$string['cliincorrectvalueretry'] = 'Valoarea nu este corectă, încercați din nou';
|
||||
$string['environmentrequireinstall'] = 'trebuie să fie instalat și activat';
|
||||
$string['environmentrequireversion'] = 'versiunea {$a->needed} este necesară iar dumneavoastră rulați {$a->current}';
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['language'] = 'Limbă';
|
||||
$string['moodlelogo'] = 'Logo Moodle';
|
||||
$string['next'] = 'Următoarea';
|
||||
$string['previous'] = 'Anterior';
|
||||
$string['reload'] = 'Reîncarcă';
|
||||
@@ -87,7 +87,7 @@ $string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Ову страницу видите зато што сте успешно инсталирали и покренули <strong>{$a->packname} {$a->packversion}</strong> пакет на свом серверу. Честитамо!';
|
||||
$string['welcomep30'] = 'Ово издање <strong>{$a->installername}</strong> укључује апликације за креирање окружења у којем ће <strong>Moodle</strong> успешно функционисати, конкретно:';
|
||||
$string['welcomep40'] = 'Овај пакет обухвата и <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'Коришћење свих апликација овог пакета је уређено њиховим лиценцама. Комплетан<strong>{$a->installername}</strong> пакет је <a href="http://www.opensource.org/docs/definition_plain.html">отвореног кода</a> и дистрибуира се под <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> лиценцом.';
|
||||
$string['welcomep50'] = 'Коришћење свих апликација овог пакета је уређено њиховим лиценцама. Комплетан<strong>{$a->installername}</strong> пакет је <a href="https://www.opensource.org/docs/definition_plain.html">отвореног кода</a> и дистрибуира се под <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a> лиценцом.';
|
||||
$string['welcomep60'] = 'Наредне странице ће вас провести кроз неколико једноставних корака током којих ћете конфигурисати и подесити <strong>Moodle</strong> на свом рачунару. Можете прихватити подразумевана подешавања или их, опционо, прилагодити сопственим потребама.';
|
||||
$string['welcomep70'] = 'Кликните на дугме за наставак да бисте даље подешавали <strong>Moodle</strong>.';
|
||||
$string['wwwroot'] = 'Веб адреса';
|
||||
|
||||
@@ -84,7 +84,7 @@ $string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Ovu stranicu vidite zato što ste uspešno instalirali i pokrenuli <strong>{$a->packname} {$a->packversion}</strong> paket na svom serveru. Čestitamo!';
|
||||
$string['welcomep30'] = 'Ovo izdanje <strong>{$a->installername}</strong> uključuje aplikacije za kreiranje okruženja u kojem će <strong>Moodle</strong> uspešno funkcionisati, konkretno:';
|
||||
$string['welcomep40'] = 'Ovaj paket obuhvata i <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'Korišćenje svih aplikacija ovog paketa je uređeno njihovim licencama. Kompletan<strong>{$a->installername}</strong> paket je <a href="http://www.opensource.org/docs/definition_plain.html">otvorenog koda</a> i distribuira se pod <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> licencom.';
|
||||
$string['welcomep50'] = 'Korišćenje svih aplikacija ovog paketa je uređeno njihovim licencama. Kompletan<strong>{$a->installername}</strong> paket je <a href="https://www.opensource.org/docs/definition_plain.html">otvorenog koda</a> i distribuira se pod <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a> licencom.';
|
||||
$string['welcomep60'] = 'Naredne stranice će vas provesti kroz nekoliko jednostavnih koraka tokom kojih ćete konfigurisati i podesiti <strong>Moodle</strong> na svom računaru. Možete prihvatiti podrazumevana podešavanja ili ih, opciono, prilagoditi sopstvenim potrebama.';
|
||||
$string['welcomep70'] = 'Kliknite na dugme za nastavak da biste dalje podešavali <strong>Moodle</strong>.';
|
||||
$string['wwwroot'] = 'Web adresa';
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['language'] = 'மொழி';
|
||||
$string['moodlelogo'] = 'Moodle சின்னம்';
|
||||
$string['next'] = 'அடுத்தது';
|
||||
$string['previous'] = 'முன்னைய';
|
||||
$string['reload'] = 'மீள ஏற்றுக';
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = 'zh_cn';
|
||||
$string['thislanguage'] = 'Workplace 简体中文版';
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = 'zh_tw';
|
||||
$string['thislanguage'] = 'Workplace 繁體中文版';
|
||||
@@ -29,6 +29,8 @@ $string['accessstatement'] = 'Accessibility statement';
|
||||
$string['activitynext'] = 'Next activity';
|
||||
$string['activityprev'] = 'Previous activity';
|
||||
$string['breadcrumb'] = 'Navigation bar';
|
||||
$string['eventcontextlocked'] = 'Context frozen';
|
||||
$string['eventcontextunlocked'] = 'Context unfrozen';
|
||||
$string['hideblocka'] = 'Hide {$a} block';
|
||||
$string['showblocka'] = 'Show {$a} block';
|
||||
$string['sitemap'] = 'Site map';
|
||||
|
||||
+4
-4
@@ -202,7 +202,7 @@ $string['configdebugdisplay'] = 'Set to on, the error reporting will go to the H
|
||||
$string['configdebugpageinfo'] = 'Enable if you want page information printed in page footer.';
|
||||
$string['configdebugsmtp'] = 'Enable verbose debug information during sending of email messages to SMTP server. For this setting to take effect, the \'Debug messages\' setting must be set to \'Developer\'.';
|
||||
$string['configdebugvalidators'] = 'Enable if you want to have links to external validator servers in page footer. You may need to create new user with username <em>w3cvalidator</em>, and enable guest access. These changes may allow unauthorized access to server, do not enable on production sites!';
|
||||
$string['configdefaulthomepage'] = 'This determines the home page for logged in users';
|
||||
$string['configdefaulthomepage'] = 'This determines the first link in the navigation for logged-in users.';
|
||||
$string['configdefaultrequestcategory'] = 'Courses requested by users will be automatically placed in this category.';
|
||||
$string['configdefaultrequestedcategory'] = 'Default category to put courses that were requested into, if they\'re approved.';
|
||||
$string['configdefaultuserroleid'] = 'All logged in users will be given the capabilities of the role you specify here, at the site level, in ADDITION to any other roles they may have been given. The default is the Authenticated user role. Note that this will not conflict with other roles they have unless you prohibit capabilities, it just ensures that all users have capabilities that are not assignable at the course level (eg post blog entries, manage own calendar, etc).';
|
||||
@@ -452,7 +452,7 @@ $string['debugvalidators'] = 'Show validator links';
|
||||
$string['defaultcity'] = 'Default city';
|
||||
$string['defaultcity_help'] = 'A city entered here will be the default city when creating new user accounts.';
|
||||
$string['defaultformatnotset'] = 'Error determining default course format. Please check site settings.';
|
||||
$string['defaulthomepage'] = 'Default home page for users';
|
||||
$string['defaulthomepage'] = 'Home page for users';
|
||||
$string['defaultrequestcategory'] = 'Default category for course requests';
|
||||
$string['defaultsettinginfo'] = 'Default: {$a}';
|
||||
$string['defaultuserroleid'] = 'Default role for all users';
|
||||
@@ -993,7 +993,7 @@ $string['quizattemptsupgradedmessage'] = 'In Moodle 2.1 there was a major upgrad
|
||||
$string['recaptchaprivatekey'] = 'ReCAPTCHA secret key';
|
||||
$string['recaptchapublickey'] = 'ReCAPTCHA site key';
|
||||
$string['register'] = 'Register your site';
|
||||
$string['registermoodlenet'] = '<p>We\'d love to stay in touch and provide you with important things for your Moodle site!</p><p>By registering:</p><ul><li>You\'ll be one of the first to find out about important notifications such as security alerts and new Moodle releases.</li><li>You can access and activate mobile push notifications from your Moodle site through our free <a href="https://download.moodle.org/mobile/">Moodle app</a>.</li><li>You are contributing to our <a href="https://moodle.net/stats/">Moodle statistics</a> of the worldwide community, which help us improve Moodle and our community sites.</li><li>If you wish, your site can be included in the <a href="https://moodle.net/sites/">list of registered Moodle sites</a> in your country.</li></ul>';
|
||||
$string['registermoodlenet'] = '<p>We\'d love to stay in touch and provide you with important things for your Moodle site!</p><p>By registering:</p><ul><li>You can subscribe to receive notifications of new Moodle releases, security alerts and other important news.</li><li>You can access and activate mobile push notifications from your Moodle site through our free <a href="https://download.moodle.org/mobile/">Moodle app</a>.</li><li>You are contributing to our <a href="https://moodle.net/stats/">Moodle statistics</a> of the worldwide community, which help us improve Moodle and our community sites.</li><li>If you wish, your site can be included in the <a href="https://moodle.net/sites/">list of registered Moodle sites</a> in your country.</li></ul>';
|
||||
$string['registermoodleorg'] = 'When you register your site';
|
||||
$string['registermoodleorgli1'] = 'You are added to a low-volume mailing list for important notifications such as security alerts and new releases of Moodle.';
|
||||
$string['registermoodleorgli2'] = 'Statistics about your site will be added to the {$a} of the worldwide Moodle community.';
|
||||
@@ -1231,6 +1231,7 @@ $string['unbookmarkthispage'] = 'Unbookmark this page';
|
||||
$string['unicoderequired'] = 'It is required that you store all your data in Unicode format (UTF-8). New installations must be performed into databases that have their default character set as Unicode. If you are upgrading, you should perform the UTF-8 migration process (see the Admin page).';
|
||||
$string['uninstallplugin'] = 'Uninstall';
|
||||
$string['unlockaccount'] = 'Unlock account';
|
||||
$string['unoconvwarning'] = 'The version of unoconv you have installed is not supported.';
|
||||
$string['unsettheme'] = 'Unset theme';
|
||||
$string['unsupported'] = 'Unsupported';
|
||||
$string['unsupporteddbfileformat'] = 'Your database uses Antelope as the file format. Full UTF-8 support in MySQL and MariaDB requires the Barracuda file format. Please switch to the Barracuda file format. See the documentation <a href="https://docs.moodle.org/en/admin/environment/custom check/mysql full unicode support">MySQL full unicode support</a> for details.';
|
||||
@@ -1346,7 +1347,6 @@ $string['cacheapplicationhelp'] = 'Cached items are shared among all users and e
|
||||
// Deprecated since Moodle 3.3.
|
||||
$string['loginpasswordautocomplete'] = 'Prevent password autocompletion on login form';
|
||||
$string['loginpasswordautocomplete_help'] = 'If enabled, users are not allowed to save their account password in their browser.';
|
||||
$string['unoconvwarning'] = 'The version of unoconv you have installed is not supported.';
|
||||
// Deprecated since Moodle 3.4
|
||||
$string['moodleorghubname'] = 'Moodle';
|
||||
$string['hubs'] = 'Hubs';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user