Merge branch 'MDL-51939-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE

This commit is contained in:
Dan Poltawski
2015-10-29 14:16:22 +00:00
4 changed files with 23 additions and 2 deletions
+8
View File
@@ -181,5 +181,13 @@ function xmldb_forum_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2014051203, 'forum');
}
if ($oldversion < 2014051204) {
// Groupid = 0 is never valid.
$DB->set_field('forum_discussions', 'groupid', -1, array('groupid' => 0));
// Forum savepoint reached.
upgrade_mod_savepoint(true, 2014051204, 'forum');
}
return true;
}
+1 -1
View File
@@ -840,7 +840,7 @@ if ($fromform = $mform_post->get_data()) {
// Before we add this we must check that the user will not exceed the blocking threshold.
forum_check_blocking_threshold($thresholdwarning);
if (isset($fromform->groupinfo)) {
if (!empty($fromform->groupinfo)) {
// Use the value provided in the dropdown group selection.
$fromform->groupid = $fromform->groupinfo;
@@ -82,3 +82,16 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
Then the "Group" select box should not contain "All participants"
And the "Group" select box should contain "Group A"
And the "Group" select box should contain "Group B"
Scenario: Students can view all participants discussions in separate groups mode
Given I log in as "teacher1"
And I follow "Course 1"
When I add a new discussion to "Standard forum name" forum with:
| Subject | Forum post to all participants |
| Message | This is the body |
| Group | All participants |
And I log out
And I log in as "student1"
And I follow "Course 1"
And I follow "Standard forum name"
Then I should see "Forum post to all participants"
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2014051203; // The current module version (Date: YYYYMMDDXX)
$plugin->version = 2014051204; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2014050800; // Requires this Moodle version
$plugin->component = 'mod_forum'; // Full name of the plugin (used for diagnostics)