diff --git a/lib.php b/lib.php index 089acdc..415a7a1 100644 --- a/lib.php +++ b/lib.php @@ -49,19 +49,6 @@ public function ajax_section_move() { return null; } - /** - * Returns the list of blocks to be automatically added for the newly created course - * - * @return array of default blocks, must contain two keys BLOCK_POS_LEFT and BLOCK_POS_RIGHT - * each of values is an array of block names (for left and right side columns) - */ - public function get_default_blocks() { - return array( - BLOCK_POS_LEFT => array(), - BLOCK_POS_RIGHT => array() - ); - } - /** * The URL to use for the specified course (with section) * diff --git a/pages/post_form.php b/pages/post_form.php index 0bcce6c..e021087 100644 --- a/pages/post_form.php +++ b/pages/post_form.php @@ -73,7 +73,8 @@ protected function definition() { if ($action == 'updatepost') { $buttongroup[] = $mform->createElement('cancel'); } - $mform->addGroup($buttongroup); + $group = $mform->addGroup($buttongroup); + $group->setAttributes(array('class' => 'fgroup_id_group_1')); // ... htmleditor/texarea to post text. $canposthtml = has_capability('format/socialwall:posthtml', $context); @@ -148,7 +149,9 @@ protected function definition() { } if (count($postoptions) > 0) { - $mform->addGroup($postoptions); + $group = $mform->addGroup($postoptions); + $group->setAttributes(array('class' => 'fgroup_id_group_2')); + } // ... display the activites prepared for the next post only by a teacher. @@ -190,7 +193,8 @@ protected function definition() { } if (!empty($attachgroup)) { - $mform->addGroup($attachgroup); + $group = $mform->addGroup($attachgroup); + $group->setAttributes(array('class' => 'fgroup_id_group_3')); } $loadfilemanager = optional_param('loadfilemanager', 0, PARAM_INT); diff --git a/styles.css b/styles.css index d3caaa8..8b17287 100644 --- a/styles.css +++ b/styles.css @@ -8,6 +8,9 @@ .course-content ul.socialwall li.section .right img.icon { padding: 0 0 4px 0;} .course-content ul.socialwall li.section .left .section-handle img.icon { padding:0; vertical-align: baseline; } +.format-socialwall #postform { + width: 90%; +} .format-socialwall #postform .fitem div.fitemtitle { float: none; @@ -29,23 +32,24 @@ margin-right: 5px; } -.format-socialwall #postform .sw-texarea, #posttext { +.format-socialwall #postform textarea.sw-texarea, #posttext { width:100%; } -.format-socialwall #postform #fitem_posttext { +.format-socialwall #postform #fitem_posttext, +.format-socialwall #postform div.sw-texarea { margin-bottom: 0px; margin-right: 100px; } -.format-socialwall #postform #fgroup_id_group_1 { +.format-socialwall #postform .fgroup_id_group_1 { margin-top:30px; float:right; width:100px; text-align: right; } -.format-socialwall #postform #fgroup_id_group_2 { +.format-socialwall #postform .fgroup_id_group_2 { float:left; } diff --git a/version.php b/version.php index 0c88d93..26def78 100644 --- a/version.php +++ b/version.php @@ -25,9 +25,9 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2016022200; // The current plugin version (Date: YYYYMMDDXX). -$plugin->requires = 2014050800; // Requires this Moodle version. +$plugin->version = 2017092600; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2016051900; // Requires this Moodle version. $plugin->component = 'format_socialwall'; // Full name of the plugin (used for diagnostics). -$plugin->dependencies = array('format_topics' => 2014051200); +$plugin->dependencies = array('format_topics' => 2016052300); $plugin->maturity = MATURITY_STABLE; -$plugin->release = '3.0'; \ No newline at end of file +$plugin->release = '3.2'; \ No newline at end of file diff --git a/yui/build/moodle-format_socialwall-addactivity/moodle-format_socialwall-addactivity-debug.js b/yui/build/moodle-format_socialwall-addactivity/moodle-format_socialwall-addactivity-debug.js index ce01322..e21617f 100644 --- a/yui/build/moodle-format_socialwall-addactivity/moodle-format_socialwall-addactivity-debug.js +++ b/yui/build/moodle-format_socialwall-addactivity/moodle-format_socialwall-addactivity-debug.js @@ -84,9 +84,33 @@ M.format_socialwall.addactivityinit = function (data) { var id = node.get('id').split('_') [1]; var selectedElement = Y.one('#id_recentactivitiesheader .felement label[for="module_' + id + '"]'); + var withboost = false; + + if (selectedElement === null) { + // Compatibility with boost theme based. + selectedElement = Y.one('#id_recentactivitiesheader .fitem span[data-itemid="' + id + '"]'); + withboost = true; + + if (selectedElement === null) { + if (M.cfg.developerdebug) { + Y.log("Error: Incompatible theme."); + } + return false; + } + } + var li = Y.Node.create('
  • '); var clone = selectedElement.cloneNode(true); - li.append(clone); + var label; + + if (withboost) { + label = Y.Node.create('