Merge branch 'MDL-52219-master' of git://github.com/danpoltawski/moodle

This commit is contained in:
Eloy Lafuente (stronk7)
2015-12-01 00:50:10 +01:00
29 changed files with 18 additions and 73 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
// Conditional activities: completion and availability
$optionalsubsystems->add(new admin_setting_configcheckbox('enablecompletion',
new lang_string('enablecompletion','completion'),
new lang_string('configenablecompletion','completion'), 0));
new lang_string('configenablecompletion', 'completion'), 1));
$options = array(
1 => get_string('completionactivitydefault', 'completion'),
@@ -45,7 +45,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$optionalsubsystems->add($checkbox = new admin_setting_configcheckbox('enableavailability',
new lang_string('enableavailability', 'availability'),
new lang_string('enableavailability_desc', 'availability'), 0));
new lang_string('enableavailability_desc', 'availability'), 1));
$checkbox->set_affects_modinfo(true);
$optionalsubsystems->add(new admin_setting_configcheckbox('enableplagiarism', new lang_string('enableplagiarism','plagiarism'), new lang_string('configenableplagiarism','plagiarism'), 0));
@@ -8,6 +8,8 @@ Feature: Manage availability conditions
Scenario: Display list of availability conditions
# Check the report doesn't show when not enabled.
Given I log in as "admin"
And the following config values are set as admin:
| enableavailability | 0 |
And I expand "Site administration" node
When I expand "Plugins" node
Then I should not see "Availability restrictions"
@@ -28,8 +30,6 @@ Feature: Manage availability conditions
Given the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "admin"
And I am on site homepage
When I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions"
@@ -16,9 +16,6 @@ Feature: availability_completion
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |
| enablecompletion | 1 |
@javascript
Scenario: Test condition
@@ -14,9 +14,6 @@ Feature: Confirm that conditions on completion no longer cause a bug
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following config values are set as admin:
| enableavailability | 1 |
| enablecompletion | 1 |
@javascript
Scenario: Multiple completion conditions on glossary
@@ -16,8 +16,6 @@ Feature: availability_date
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -16,8 +16,6 @@ Feature: availability_grade
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -16,8 +16,6 @@ Feature: availability_group
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -22,8 +22,6 @@ Feature: availability_grouping
And the following "group members" exist:
| user | group |
| student1 | GI1 |
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -16,8 +16,6 @@ Feature: availability_profile
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -34,8 +34,6 @@ Feature: display_availability
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Activity availability display
@@ -29,6 +29,8 @@ Feature: edit_availability
| student1 | C1 | student |
Scenario: Confirm the 'enable availability' option is working
Given the following config values are set as admin:
| enableavailability | 0 |
When I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
@@ -55,9 +57,7 @@ Feature: edit_availability
@javascript
Scenario: Edit availability using settings in activity form
# Set up.
Given the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
Given I log in as "teacher1"
And I follow "Course 1"
# Add a Page and check it has None in so far.
@@ -148,9 +148,7 @@ Feature: edit_availability
@javascript
Scenario: Edit availability using settings in section form
# Set up.
Given the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
Given I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
@@ -170,7 +168,9 @@ Feature: edit_availability
@javascript
Scenario: 'Add group/grouping access restriction' button unavailable
# Button does not exist when conditional access restrictions are turned off.
Given I log in as "admin"
Given the following config values are set as admin:
| enableavailability | 0 |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
@@ -181,9 +181,7 @@ Feature: edit_availability
@javascript
Scenario: Use the 'Add group/grouping access restriction' button
# Button should initially be disabled.
Given the following config values are set as admin:
| enableavailability | 1 |
And the following "groupings" exist:
Given the following "groupings" exist:
| name | course | idnumber |
| GX1 | C1 | GXI1 |
And I log in as "admin"
+3 -1
View File
@@ -45,9 +45,10 @@ class info_testcase extends advanced_testcase {
* Tests the info_module class (is_available, get_full_information).
*/
public function test_info_module() {
global $DB;
global $DB, $CFG;
// Create a course and pages.
$CFG->enableavailability = 0;
$this->setAdminUser();
$this->resetAfterTest();
$generator = $this->getDataGenerator();
@@ -160,6 +161,7 @@ class info_testcase extends advanced_testcase {
global $CFG, $DB;
require_once($CFG->dirroot . '/course/lib.php');
$this->resetAfterTest();
$CFG->enableavailability = 0;
// Create a course and some pages:
// 0. Invisible due to visible=0.
-4
View File
@@ -129,8 +129,6 @@ Feature: Award badges
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Edit settings"
@@ -180,8 +178,6 @@ Feature: Award badges
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Edit settings"
@@ -46,9 +46,7 @@ Feature: View structural changes in recent activity block
| GG3 | G2 |
Scenario: Check that Added module information is displayed respecting view capability
Given the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
Given I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
When I add a "Forum" to section "1" and I fill the form with:
@@ -17,9 +17,6 @@ Feature: Allow students to manually mark an activity as complete
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
| enableavailability | 1 |
And I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
@@ -16,8 +16,6 @@ Feature: Restrict activity availability through date conditions
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
@@ -17,8 +17,6 @@ Feature: Restrict activity availability through grade conditions
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
#And I am on site homepage
And I follow "Course 1"
@@ -16,9 +16,6 @@ Feature: Restrict sections availability through completion or grade conditions
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
| enableavailability | 1 |
@javascript
Scenario: Show section greyed-out to student when completion condition is not satisfied
@@ -16,11 +16,7 @@ Feature: Allow teachers to manually mark users as complete when configured
| user | course | role |
| student1 | CC1 | student |
| teacher1 | CC1 | editingteacher |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
And I am on site homepage
And I follow "Completion course"
And completion tracking is "Enabled" in current course
@@ -8,8 +8,6 @@ Feature: Edit completion settings of an activity
Given the following "courses" exist:
| fullname | shortname | enablecompletion |
| Course 1 | C1 | 1 |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
+1 -3
View File
@@ -1041,9 +1041,7 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
$this->assertEquals($course2['forcetheme'], $courseinfo->theme);
}
if (completion_info::is_enabled_for_site()) {
$this->assertEquals($course2['enabledcompletion'], $courseinfo->enablecompletion);
}
$this->assertEquals($course2['enablecompletion'], $courseinfo->enablecompletion);
} else if ($course['id'] == $course1['id']) {
$this->assertEquals($course1['fullname'], $courseinfo->fullname);
$this->assertEquals($course1['shortname'], $courseinfo->shortname);
@@ -33,8 +33,6 @@ Feature: Show users who have not responded to the feedback survey
And the following "grouping groups" exist:
| grouping | group |
| GXI1 | GI1 |
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "admin"
And I navigate to "Manage activities" node in "Site administration > Plugins > Activity modules"
And I click on "Show" "link" in the "Feedback" "table_row"
@@ -16,9 +16,6 @@ Feature: Set a certain number of discussions as a completion condition for a for
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
@@ -34,8 +34,6 @@ Feature: As a teacher I need to see an accurate list of subscribed users
And the following "grouping groups" exist:
| grouping | group |
| GG1 | G1 |
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher"
And I follow "Course 1"
And I turn editing mode on
@@ -16,8 +16,6 @@ Feature: Set end of lesson reached as a completion condition for a lesson
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
@@ -17,8 +17,6 @@ Feature: Set time spent as a completion condition for a lesson
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
@@ -17,7 +17,6 @@ Feature: Set a quiz to be marked complete when the student uses all attempts all
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
| grade_item_advanced | hiddenuntil |
And the following "question categories" exist:
| contextlevel | reference | name |
@@ -17,7 +17,6 @@ Feature: Set a quiz to be marked complete when the student passes
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
| grade_item_advanced | hiddenuntil |
And the following "question categories" exist:
| contextlevel | reference | name |
+1 -1
View File
@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2015113001.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2015113002.00; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.