MDL-41511 blocks: improved how custom block regions were being rendered.
[moodle.git] / lib / yui / src / blocks / js / blocks.js
index da6e26d..b927f1e 100644 (file)
@@ -343,6 +343,9 @@ 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) {
+            Y.log('Both core_renderer::blocks and core_renderer::blocks_for_region have been used.', 'warn', 'moodle-core_blocks');
+        }
     }
     return this._isusingnewblocksmethod;
 };
@@ -357,8 +360,10 @@ M.core.blockdraganddrop.is_using_blocks_render_method = function() {
  */
 M.core.blockdraganddrop.init = function(params) {
     if (this.is_using_blocks_render_method()) {
+        Y.log('Block drag and drop initialised for the blocks method.', 'info', 'moodle-core_blocks');
         new MANAGER(params);
     } else {
+        Y.log('Block drag and drop initialised with the legacy manager (blocks_for_region used).', 'info', 'moodle-core_blocks');
         new DRAGBLOCK(params);
     }
 };