Permalink
Browse files

Merge branch 'MOODLE_25_STABLE' into install_25_STABLE

  • Loading branch information...
2 parents 5db57bd + 689f9aa commit 035b6840d98e63ea058e20db2451958085caff3c AMOS bot committed Apr 23, 2014
@@ -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);
@@ -203,11 +203,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;
}
View
@@ -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
@@ -478,6 +478,7 @@ public function add_fake_block($bc, $region) {
throw new coding_exception('block_manager has already prepared the blocks in region ' .
$region . 'for output. It is too late to add a fake block.');
}
+ $bc->attributes['class'] .= ' block_fake';
$this->extracontent[$region][] = $bc;
}
@@ -515,7 +516,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
@@ -1603,6 +1603,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'),
View
@@ -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
@@ -2810,7 +2810,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.
@@ -2821,7 +2821,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')) {
@@ -359,7 +359,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');
}
}
@@ -451,7 +451,6 @@ MANAGER.prototype = {
i = 0,
region,
regionname,
- droptarget,
dragdelegation;
// Evil required by M.core.dragdrop.
@@ -480,7 +479,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'
@@ -492,17 +491,18 @@ MANAGER.prototype = {
nodes: '.'+CSS.BLOCK,
target: true,
handles: ['.'+CSS.HEADER],
- 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.remove_block_move_icons();
}
@@ -544,12 +544,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();
}
},
@@ -783,7 +796,8 @@ Y.extend(MANAGER, M.core.dragdrop, MANAGER.prototype, {
value : []
}
}
-});/**
+});
+/**
* This file contains the Block Region class used by the drag and drop manager.
*
* Provides drag and drop functionality for blocks.
Oops, something went wrong.

0 comments on commit 035b684

Please sign in to comment.