Permalink
Browse files

Merge branch 'MOODLE_26_STABLE' into install_26_STABLE

  • Loading branch information...
2 parents 20b0dd3 + 0afcad7 commit 9ae6b73cafbf8d27221e1634fc2d8bd98531801f AMOS bot committed Apr 23, 2014
Showing with 252 additions and 69 deletions.
  1. +2 −0 auth/shibboleth/index.php
  2. +4 −4 backup/util/ui/renderer.php
  3. +2 −1 blocks/mentees/block_mentees.php
  4. +1 −1 grade/import/xml/lib.php
  5. +3 −3 lang/en/badges.php
  6. +2 −0 lib/alfresco/README_MOODLE.txt
  7. +2 −2 lib/alfresco/Service/WebService/AlfrescoWebService.php
  8. +6 −1 lib/blocklib.php
  9. +1 −0 lib/filelib.php
  10. +4 −1 lib/form/dndupload.js
  11. +2 −2 lib/weblib.php
  12. +21 −8 lib/yui/build/moodle-core-blocks/moodle-core-blocks-debug.js
  13. +2 −2 lib/yui/build/moodle-core-blocks/moodle-core-blocks-min.js
  14. +21 −8 lib/yui/build/moodle-core-blocks/moodle-core-blocks.js
  15. +3 −1 lib/yui/build/moodle-core-dock/moodle-core-dock-debug.js
  16. +3 −3 lib/yui/build/moodle-core-dock/moodle-core-dock-min.js
  17. +3 −1 lib/yui/build/moodle-core-dock/moodle-core-dock.js
  18. +1 −1 lib/yui/src/blocks/js/blocks.js
  19. +20 −7 lib/yui/src/blocks/js/manager.js
  20. +3 −1 lib/yui/src/dock/js/dock.js
  21. +2 −2 mod/chat/lib.php
  22. +2 −1 mod/quiz/overridedelete.php
  23. +3 −2 mod/survey/lib.php
  24. +70 −0 mod/wiki/tests/behat/edit_tags.feature
  25. +42 −0 my/tests/behat/restrict_available_blocks.feature
  26. +1 −1 question/classes/statistics/responses/analysis_for_class.php
  27. +1 −1 question/type/numerical/question.php
  28. +6 −0 question/type/numerical/tests/question_test.php
  29. +3 −0 report/completion/styles.css
  30. +1 −0 report/progress/styles.css
  31. +1 −1 repository/alfresco/lang/en/repository_alfresco.php
  32. +1 −1 user/filters/courserole.php
  33. +2 −2 user/profile/definelib.php
  34. +7 −7 user/profile/index.php
  35. +2 −2 user/profile/index_category_form.php
  36. +2 −2 version.php
@@ -4,7 +4,9 @@
require('../../config.php');
+ $context = context_system::instance();
$PAGE->set_url('/auth/shibboleth/index.php');
+ $PAGE->set_context($context);
// Support for WAYFless URLs.
$target = optional_param('target', '', PARAM_LOCALURL);
@@ -221,11 +221,11 @@ public function backup_details_nonstandard($nextstageurl, array $details) {
*/
public function backup_details_unknown(moodle_url $nextstageurl) {
- $html = html_writer::start_tag('div', array('class' => 'unknownformat'));
- $html .= $this->output->heading(get_string('errorinvalidformat', 'backup'), 2, 'notifyproblem');
- $html .= html_writer::tag('div', get_string('errorinvalidformatinfo', 'backup'), array('class' => 'notifyproblem'));
+ $html = html_writer::start_div('unknownformat');
+ $html .= $this->output->heading(get_string('errorinvalidformat', 'backup'), 2);
+ $html .= $this->output->notification(get_string('errorinvalidformatinfo', 'backup'), 'notifyproblem');
$html .= $this->output->single_button($nextstageurl, get_string('continue'), 'post');
- $html .= html_writer::end_tag('div');
+ $html .= html_writer::end_div();
return $html;
}
@@ -28,7 +28,8 @@ function get_content() {
$this->content = new stdClass();
// get all the mentees, i.e. users you have a direct assignment to
- if ($usercontexts = $DB->get_records_sql("SELECT c.instanceid, c.instanceid, u.firstname, u.lastname
+ $allusernames = get_all_user_name_fields(true, 'u');
+ if ($usercontexts = $DB->get_records_sql("SELECT c.instanceid, c.instanceid, $allusernames
FROM {role_assignments} ra, {context} c, {user} u
WHERE ra.userid = ?
AND ra.contextid = c.id
@@ -82,7 +82,7 @@ function import_xml_grades($text, $course, &$error) {
$newgrade->importer = $USER->id;
// check grade value exists and is a numeric grade
- if (isset($result['#']['score'][0]['#'])) {
+ if (isset($result['#']['score'][0]['#']) && $result['#']['score'][0]['#'] !== '-') {
if (is_numeric($result['#']['score'][0]['#'])) {
$newgrade->finalgrade = $result['#']['score'][0]['#'];
} else {
View
@@ -64,15 +64,15 @@
$string['backpackavailability'] = 'External badge verification';
$string['backpackavailability_help'] = 'For badge recipients to be able to prove they earned their badges from you, an external backpack service should be able to access your site and verify badges issued from it. Your site does not currently appear to be accessible, which means that badges you have already issued or will issue in the future cannot be verified.
-##Why am I seeing this message?
+**Why am I seeing this message?**
It may be that your firewall prevents access from users outside your network, your site is password protected, or you are running the site on a computer that is not available from the Internet (such as a local development machine).
-##Is this a problem?
+**Is this a problem?**
You should fix this issue on any production site where you are planning to issue badges, otherwise the recipients will not be able to prove they earned their badges from you. If your site is not yet live you can create and issue test badges, as long as the site is accessible before you go live.
-##What if I can\'t make my whole site publicly accessible?
+**What if I can\'t make my whole site publicly accessible?**
The only URL required for verification is [your-site-url]/badges/assertion.php so if you are able to modify your firewall to allow external access to that file, badge verification will still work.';
$string['backpackbadges'] = 'You have {$a->totalbadges} badge(s) displayed from {$a->totalcollections} collection(s). <a href="mybackpack.php">Change backpack settings</a>.';
@@ -34,6 +34,8 @@
- AlfrescoWebService::__soapCall() arguments do not match SoapClient::__soapCall()
- AlfrescoWebService::__doRequest() arguments do not match SoapClient::__soapCall()
+6. Apply the changes from MDL-41975 in regard with the timestamp
+
== Alfresco PHP Library ==
Installation and developer documentation for the Alfresco PHP Library can be found on the Alfresco Wiki.
@@ -79,8 +79,8 @@ public function __doRequest($request, $location, $action, $version, $one_way = 0
// Construct Timestamp Header
$timeStamp = $dom->createElementNS($this->wsUtilityNS, "Timestamp");
- $createdDate = date("Y-m-d\TH:i:s\Z", mktime(date("H")+24, date("i"), date("s"), date("m"), date("d"), date("Y")));
- $expiresDate = date("Y-m-d\TH:i:s\Z", mktime(date("H")+25, date("i"), date("s"), date("m"), date("d"), date("Y")));
+ $createdDate = gmdate("Y-m-d\TH:i:s\Z", gmmktime(gmdate("H"), gmdate("i"), gmdate("s"), gmdate("m"), gmdate("d"), gmdate("Y")));
+ $expiresDate = gmdate("Y-m-d\TH:i:s\Z", gmmktime(gmdate("H")+1, gmdate("i"), gmdate("s"), gmdate("m"), gmdate("d"), gmdate("Y")));
$created = new DOMElement("Created", $createdDate, $this->wsUtilityNS);
$expires = new DOMElement("Expires", $expiresDate, $this->wsUtilityNS);
$timeStamp->appendChild($created);
View
@@ -481,6 +481,7 @@ public function add_fake_block($bc, $region) {
if (!isset($bc->attributes['data-block'])) {
$bc->attributes['data-block'] = '_fake';
}
+ $bc->attributes['class'] .= ' block_fake';
$this->extracontent[$region][] = $bc;
}
@@ -518,7 +519,11 @@ public function region_completely_docked($region, $output) {
$this->check_is_loaded();
$this->ensure_content_created($region, $output);
- foreach($this->visibleblockcontent[$region] as $instance) {
+ if (!$this->region_has_content($region, $output)) {
+ // If the region has no content then nothing is docked at all of course.
+ return false;
+ }
+ foreach ($this->visibleblockcontent[$region] as $instance) {
if (!empty($instance->content) && !get_user_preferences('docked_block_instance_'.$instance->blockinstanceid, 0)) {
return false;
}
View
@@ -1559,6 +1559,7 @@ function &get_mimetypes_array() {
'webm' => array ('type'=>'video/webm', 'icon'=>'video', 'groups'=>array('video'), 'string'=>'video'),
'wmv' => array ('type'=>'video/x-ms-wmv', 'icon'=>'wmv', 'groups'=>array('video'), 'string'=>'video'),
'asf' => array ('type'=>'video/x-ms-asf', 'icon'=>'wmv', 'groups'=>array('video'), 'string'=>'video'),
+ 'wma' => array ('type'=>'audio/x-ms-wma', 'icon'=>'audio', 'groups'=>array('audio'), 'string'=>'audio'),
'xbk' => array ('type'=>'application/x-smarttech-notebook', 'icon'=>'archive'),
'xdp' => array ('type'=>'application/pdf', 'icon'=>'pdf'),
@@ -355,7 +355,10 @@ M.form_dndupload.init = function(Y, options) {
* @return boolean true if event has files
*/
has_files: function(e) {
- var types = e._event.dataTransfer.types;
+ // In some browsers, dataTransfer.types may be null for a
+ // 'dragover' event, so ensure a valid Array is always
+ // inspected.
+ var types = e._event.dataTransfer.types || [];
for (var i=0; i<types.length; i++) {
if (types[i] == 'Files') {
return true;
View
@@ -2920,7 +2920,7 @@ function debugging($message = '', $level = DEBUG_NORMAL, $backtrace = null) {
if (!$backtrace) {
$backtrace = debug_backtrace();
}
- $from = format_backtrace($backtrace, CLI_SCRIPT);
+ $from = format_backtrace($backtrace, CLI_SCRIPT || NO_DEBUG_DISPLAY);
if (PHPUNIT_TEST) {
if (phpunit_util::debugging_triggered($message, $level, $from)) {
// We are inside test, the debug message was logged.
@@ -2931,7 +2931,7 @@ function debugging($message = '', $level = DEBUG_NORMAL, $backtrace = null) {
if (NO_DEBUG_DISPLAY) {
// Script does not want any errors or debugging in output,
// we send the info to error log instead.
- error_log('Debugging: ' . $message . $from);
+ error_log('Debugging: ' . $message . ' in '. PHP_EOL . $from);
} else if ($forcedebug or $CFG->debugdisplay) {
if (!defined('DEBUGGING_PRINTED')) {
@@ -363,7 +363,7 @@ M.core.blockdraganddrop.is_using_blocks_render_method = function() {
var goodregions = Y.all('.block-region[data-blockregion]').size();
var allregions = Y.all('.block-region').size();
this._isusingnewblocksmethod = (allregions === goodregions);
- if (goodregions > 0 && allregions > 0) {
+ if (goodregions > 0 && allregions > 0 && goodregions !== allregions) {
Y.log('Both core_renderer::blocks and core_renderer::blocks_for_region have been used.', 'warn', 'moodle-core_blocks');
}
}
@@ -455,7 +455,6 @@ MANAGER.prototype = {
i = 0,
region,
regionname,
- droptarget,
dragdelegation;
// Evil required by M.core.dragdrop.
@@ -484,7 +483,7 @@ MANAGER.prototype = {
// Setting blockregion as droptarget (the case when it is empty)
// The region-post (the right one)
// is very narrow, so add extra padding on the left to drop block on it.
- droptarget = new Y.DD.Drop({
+ new Y.DD.Drop({
node: region.get_droptarget(),
groups: this.groups,
padding: '40 240 40 240'
@@ -496,17 +495,18 @@ MANAGER.prototype = {
nodes: '.'+CSS.BLOCK,
target: true,
handles: [SELECTOR.DRAGHANDLE],
- invalid: '.block-hider-hide, .block-hider-show, .moveto',
+ invalid: '.block-hider-hide, .block-hider-show, .moveto, .block_fake',
dragConfig: {groups: this.groups}
});
dragdelegation.dd.plug(Y.Plugin.DDProxy, {
// Don't move the node at the end of the drag
moveOnEnd: false
});
dragdelegation.dd.plug(Y.Plugin.DDWinScroll);
- // On the mouse down event we will enable all block regions so that they can be dragged to.
- // This is VERY important as without it dnd won't work for empty block regions.
- dragdelegation.on('drag:mouseDown', this.enable_all_regions, this);
+
+ // On the DD Manager start operation, we enable all block regions so that they can be drop targets. This
+ // must be done *before* drag:start but after dragging has been initialised.
+ Y.DD.DDM.on('ddm:start', this.enable_all_regions, this);
region.change_block_move_icons(this);
}
@@ -548,12 +548,25 @@ MANAGER.prototype = {
/**
* Enables all fo the regions so that they are all visible while dragging is occuring.
+ *
* @method enable_all_regions
* @returns {undefined}
*/
enable_all_regions : function() {
- var i = 0;
+ var groups = Y.DD.DDM.activeDrag.get('groups');
+
+ // As we're called by Y.DD.DDM, we can't be certain that the call
+ // relates specifically to a block drag/drop operation. Test
+ // whether the relevant group applies here.
+ if (!groups || Y.Array.indexOf(groups, 'block') === -1) {
+ return;
+ }
+
+ var i;
for (i in this.regionobjects) {
+ if (!this.regionobjects.hasOwnProperty(i)) {
+ continue;
+ }
this.regionobjects[i].enable();
}
},
Oops, something went wrong.

0 comments on commit 9ae6b73

Please sign in to comment.