Merge branch 'wip-MDL-50962-master' of git://github.com/abgreeve/moodle
authorDavid Monllao <davidm@moodle.com>
Mon, 17 Aug 2015 06:56:14 +0000 (14:56 +0800)
committerDavid Monllao <davidm@moodle.com>
Mon, 17 Aug 2015 06:56:14 +0000 (14:56 +0800)
34 files changed:
admin/tool/behat/tests/behat/nasty_strings.feature
blocks/tags/tests/behat/tagcloud.feature
blog/tests/behat/blog_visibility.feature
cache/stores/file/lib.php
cache/stores/file/tests/file_test.php
calendar/renderer.php
calendar/set.php
completion/tests/behat/behat_completion.php
course/tests/behat/navigate_course_list.feature
enrol/meta/locallib.php
grade/tests/behat/grade_aggregation.feature
grade/tests/behat/grade_scales.feature
grade/tests/behat/grade_view.feature
lib/badgeslib.php
lib/moodlelib.php
lib/phpunit/classes/util.php
lib/tests/behat/behat_navigation.php
message/tests/behat/display_history.feature
message/tests/behat/manage_contacts.feature
message/tests/behat/message_participants.feature
message/tests/behat/recent_conversations.feature
message/tests/behat/search_history.feature
mod/forum/tests/behat/discussion_display.feature
mod/forum/tests/behat/discussion_navigation.feature
mod/forum/tests/behat/edit_post_student.feature
mod/forum/tests/behat/edit_post_teacher.feature
mod/forum/tests/behat/my_forum_posts.feature
mod/forum/tests/behat/post_to_multiple_groups.feature
mod/forum/tests/behat/single_forum_discussion.feature
mod/forum/tests/behat/track_read_posts.feature
mod/lesson/tests/behat/lesson_practice.feature
mod/quiz/styles.css
report/outline/tests/behat/user.feature
theme/base/style/blocks.css

index 41fac8d..4b4120d 100644 (file)
@@ -13,7 +13,6 @@ Feature: Transform steps arguments
     And I follow "Preferences" in the user menu
     And I follow "Edit profile"
 
-  @javascript
   Scenario: Use nasty strings on steps arguments
     When I set the field "Surname" to "$NASTYSTRING1"
     And I set the field "Description" to "$NASTYSTRING2"
@@ -24,7 +23,6 @@ Feature: Transform steps arguments
     And the field "Surname" matches value "$NASTYSTRING1"
     And the field "City/town" matches value "$NASTYSTRING3"
 
-  @javascript
   Scenario: Use nasty strings on table nodes
     When I set the following fields to these values:
       | Surname | $NASTYSTRING1 |
@@ -36,7 +34,6 @@ Feature: Transform steps arguments
     And the field "Surname" matches value "$NASTYSTRING1"
     And the field "City/town" matches value "$NASTYSTRING3"
 
-  @javascript
   Scenario: Use double quotes
     When I set the following fields to these values:
       | First name | va"lue1 |
@@ -49,7 +46,6 @@ Feature: Transform steps arguments
     And the field "Description" matches value "va\\"lue2"
     And the field "City/town" matches value "va\"lue3"
 
-  @javascript
   Scenario: Nasty strings with other contents
     When I set the field "First name" to "My Firstname $NASTYSTRING1"
     And I set the following fields to these values:
index 0265fe9..2851ae7 100644 (file)
@@ -27,7 +27,6 @@ Feature: Block tags displaying tag cloud
     And I press "Update profile"
     And I log out
 
-  @javascript
   Scenario: Add Tags block on a front page
     When I log in as "admin"
     And I am on site homepage
@@ -41,7 +40,6 @@ Feature: Block tags displaying tag cloud
     And I click on "Dogs" "link" in the "Tags" "block"
     And I should see "Log in to the site" in the ".breadcrumb" "css_element"
 
-  @javascript
   Scenario: Add Tags block in a course
     When I log in as "teacher1"
     And I follow "Course 1"
index bd38cad..dfb5c8f 100644 (file)
@@ -24,7 +24,6 @@ Feature: Blogs can be set to be only visible by the author.
     And I press "Save changes"
     And I log out
 
-  @javascript
   Scenario: A student can not see another student's blog entries.
     Given I log in as "testuser"
     And I follow "Course 1"
index 514a4bd..e044c91 100644 (file)
@@ -341,8 +341,8 @@ class cachestore_file extends cache_store implements cache_is_key_aware, cache_i
             $maxtime = cache::now() - $ttl;
         }
         $readfile = false;
-        if ($this->prescan && array_key_exists($key, $this->keys)) {
-            if (!$ttl || $this->keys[$filename] >= $maxtime && file_exists($file)) {
+        if ($this->prescan && array_key_exists($filename, $this->keys)) {
+            if ((!$ttl || $this->keys[$filename] >= $maxtime) && file_exists($file)) {
                 $readfile = true;
             } else {
                 $this->delete($key);
index be321f2..887c545 100644 (file)
@@ -44,4 +44,34 @@ class cachestore_file_test extends cachestore_tests {
     protected function get_class_name() {
         return 'cachestore_file';
     }
+
+    /**
+     * Testing cachestore_file::get with prescan enabled and with
+     * deleting the cache between the prescan and the call to get.
+     *
+     * The deleting of cache simulates some other process purging
+     * the cache.
+     */
+    public function test_cache_get_with_prescan_and_purge() {
+        global $CFG;
+
+        $definition = cache_definition::load_adhoc(cache_store::MODE_REQUEST, 'cachestore_file', 'phpunit_test');
+        $name = 'File test';
+
+        $path = make_cache_directory('cachestore_file_test');
+        $cache = new cachestore_file($name, array('path' => $path, 'prescan' => true));
+        $cache->initialise($definition);
+
+        $cache->set('testing', 'value');
+
+        $path  = make_cache_directory('cachestore_file_test');
+        $cache = new cachestore_file($name, array('path' => $path, 'prescan' => true));
+        $cache->initialise($definition);
+
+        // Let's pretend that some other process purged caches.
+        remove_dir($CFG->cachedir.'/cachestore_file_test', true);
+        make_cache_directory('cachestore_file_test');
+
+        $cache->get('testing');
+    }
 }
\ No newline at end of file
index 46e6c56..d11b6d9 100644 (file)
@@ -612,7 +612,7 @@ class core_calendar_renderer extends plugin_renderer_base {
 
         if (empty($subscriptions)) {
             $cell = new html_table_cell(get_string('nocalendarsubscriptions', 'calendar'));
-            $cell->colspan = 4;
+            $cell->colspan = 5;
             $table->data[] = new html_table_row(array($cell));
         }
         $strnever = new lang_string('never', 'calendar');
index 345f9e7..fab8aa5 100644 (file)
@@ -41,8 +41,6 @@
 require_once('../config.php');
 require_once($CFG->dirroot.'/calendar/lib.php');
 
-require_sesskey();
-
 $var = required_param('var', PARAM_ALPHA);
 $return = clean_param(base64_decode(required_param('return', PARAM_RAW)), PARAM_LOCALURL);
 $courseid = optional_param('id', -1, PARAM_INT);
@@ -51,6 +49,12 @@ if ($courseid != -1) {
 } else {
     $return = new moodle_url($return);
 }
+
+if (!confirm_sesskey()) {
+    // Do not call require_sesskey() since this page may be accessed without session (for example by bots).
+    redirect($return);
+}
+
 $url = new moodle_url('/calendar/set.php', array('return'=>base64_encode($return->out_as_local_url(false)), 'course' => $courseid, 'var'=>$var, 'sesskey'=>sesskey()));
 $PAGE->set_url($url);
 $PAGE->set_context(context_system::instance());
index 5125a88..6790dbf 100644 (file)
@@ -27,7 +27,8 @@
 
 require_once(__DIR__ . '/../../../lib/behat/behat_base.php');
 
-use Behat\Behat\Context\Step\Given as Given,
+use Behat\Behat\Context\Step\Given,
+    Behat\Behat\Context\Step\Then,
     Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException;
 
 /**
@@ -56,7 +57,7 @@ class behat_completion extends behat_base {
 
         return array(
             new Given('I go to the current course activity completion report'),
-            new Given('I hover "' . $this->escape($xpath) . '" "xpath_element"')
+            new Then('"' . $this->escape($xpath) . '" "xpath_element" should exist')
         );
     }
 
@@ -75,7 +76,7 @@ class behat_completion extends behat_base {
             "/descendant::img[contains(@title, $titleliteral)]";
         return array(
             new Given('I go to the current course activity completion report'),
-            new Given('I hover "' . $this->escape($xpath) . '" "xpath_element"')
+            new Then('"' . $this->escape($xpath) . '" "xpath_element" should exist')
         );
 
         return $steps;
index f1c2e88..cabeace 100644 (file)
@@ -17,7 +17,6 @@ Feature: Browse course list and return back from enrolment page
       | Sample course | C1        | 0        |
       | Course 1      | COURSE1   | CAT1     |
 
-  @javascript
   Scenario: A user can return to the category page from enrolment page
     When I log in as "user2"
     And I click on "Courses" "link" in the "Navigation" "block"
index c9c8013..08c50c8 100644 (file)
@@ -80,6 +80,7 @@ class enrol_meta_handler {
      */
     protected static function sync_with_parent_course(stdClass $instance, $userid) {
         global $DB, $CFG;
+        require_once($CFG->dirroot . '/group/lib.php');
 
         $plugin = enrol_get_plugin('meta');
 
index e87d71b..d10d14a 100644 (file)
@@ -62,7 +62,6 @@ Feature: We can use calculated grade totals
     And I set the field "Grade display type" to "Real (percentage)"
     And I press "Save changes"
 
-  @javascript
   Scenario: Mean of grades aggregation
     And I set the following settings for grade item "Course 1":
       | Aggregation          | Mean of grades |
@@ -81,7 +80,6 @@ Feature: We can use calculated grade totals
     And I follow "Grades" in the user menu
     And I should see "30.42 (30.42 %)" in the "overview-grade" "table"
 
-  @javascript
   Scenario: Weighted mean of grades aggregation
     And I set the following settings for grade item "Course 1":
       | Aggregation          | Weighted mean of grades |
@@ -104,7 +102,6 @@ Feature: We can use calculated grade totals
     And I follow "Grades" in the user menu
     And I should see "26.94 (26.94 %)" in the "overview-grade" "table"
 
-  @javascript
   Scenario: Simple weighted mean of grades aggregation
     And I set the following settings for grade item "Course 1":
       | Aggregation          | Simple weighted mean of grades |
@@ -125,7 +122,6 @@ Feature: We can use calculated grade totals
     And I follow "Grades" in the user menu
     And I should see "48.57 (48.57 %)" in the "overview-grade" "table"
 
-  @javascript
   Scenario: Mean of grades (with extra credits) aggregation
     And I set the following settings for grade item "Course 1":
       | Aggregation          | Mean of grades (with extra credits) |
@@ -146,7 +142,6 @@ Feature: We can use calculated grade totals
     And I follow "Grades" in the user menu
     And I should see "47.22 (47.22 %)" in the "overview-grade" "table"
 
-  @javascript
   Scenario: Median of grades aggregation
     And I set the following settings for grade item "Course 1":
       | Aggregation | Median of grades |
@@ -165,7 +160,6 @@ Feature: We can use calculated grade totals
     And I follow "Grades" in the user menu
     And I should see "25.83 (25.83 %)" in the "overview-grade" "table"
 
-  @javascript
   Scenario: Lowest grade aggregation
     And I set the following settings for grade item "Course 1":
       | Aggregation | Lowest grade |
@@ -188,7 +182,6 @@ Feature: We can use calculated grade totals
     And I follow "Grades" in the user menu
     And I should see "0.00 (0.00 %)" in the "overview-grade" "table"
 
-  @javascript
   Scenario: Highest grade aggregation
     And I set the following settings for grade item "Course 1":
       | Aggregation          | Highest grade |
@@ -209,7 +202,6 @@ Feature: We can use calculated grade totals
     And I follow "Grades" in the user menu
     And I should see "50.00 (50.00 %)" in the "overview-grade" "table"
 
-  @javascript
   Scenario: Mode of grades aggregation
     And I set the following settings for grade item "Course 1":
       | Aggregation          | Mode of grades |
@@ -230,7 +222,6 @@ Feature: We can use calculated grade totals
     And I follow "Grades" in the user menu
     And I should see "50.00 (50.00 %)" in the "overview-grade" "table"
 
-  @javascript
   Scenario: Natural aggregation on outcome items with natural weights
     And the following config values are set as admin:
       | enableoutcomes | 1 |
@@ -292,7 +283,6 @@ Feature: We can use calculated grade totals
     And I follow "Course 1"
     And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
 
-  @javascript
   Scenario: Natural aggregation on outcome items with modified weights
     And the following config values are set as admin:
       | enableoutcomes | 1 |
@@ -329,7 +319,6 @@ Feature: We can use calculated grade totals
     And I follow "Course 1"
     And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
 
-  @javascript
   Scenario: Natural aggregation
     And I set the following settings for grade item "Sub category 1":
       | Aggregation          | Natural |
@@ -353,8 +342,8 @@ Feature: We can use calculated grade totals
     And I set the field "Show contribution to course total" to "Show"
     And I set the field "Show weightings" to "Show"
     And I press "Save changes"
-    And I set the field "Grade report" to "User report"
-    And I set the field "Select all or one user" to "Student 1"
+    And I select "User report" from the "Grade report" singleselect
+    And I select "Student 1" from the "Select all or one user" singleselect
     And the following should exist in the "user-grade" table:
       | Grade item | Calculated weight | Grade | Range | Contribution to course total |
       | Test assignment five | 28.57 % | 10.00 (50.00 %) | 0–20 | 1.03 % |
@@ -382,7 +371,6 @@ Feature: We can use calculated grade totals
       | Test assignment three | 30.93 %( Extra credit ) | 40.00 (26.67 %) | 0–150 | 8.25 % |
       | Test assignment four | 30.93 % | - | 0–150 | 0.00 % |
 
-  @javascript
   Scenario: Natural aggregation with drop lowest
     When I log out
     And I log in as "admin"
@@ -401,7 +389,6 @@ Feature: We can use calculated grade totals
       | Exclude empty grades | 0       |
     And I navigate to "Categories and items" node in "Grade administration > Setup"
     And I press "Add category"
-    And I click on "Show more" "link"
     And I set the following fields to these values:
       | Category name | Sub category 3 |
       | Aggregation | Natural |
@@ -465,7 +452,7 @@ Feature: We can use calculated grade totals
 
   @javascript
   Scenario: Natural aggregation from the setup screen
-    And I set the field "Grade report" to "Categories and items"
+    And I select "Categories and items" from the "Grade report" singleselect
     And I set the following settings for grade item "Course 1":
       | Aggregation          | Natural |
     And I set the following settings for grade item "Sub category 1":
@@ -527,7 +514,7 @@ Feature: We can use calculated grade totals
       | Aggregation          | Natural |
       | Exclude empty grades | 0       |
     And I turn editing mode off
-    And I set the field "Grade report" to "Categories and items"
+    And I select "Categories and items" from the "Grade report" singleselect
     And I set the field "Override weight of Test assignment one" to "1"
     And I set the field "Weight of Test assignment one" to "0"
     And I set the field "Override weight of Test assignment six" to "1"
@@ -542,8 +529,8 @@ Feature: We can use calculated grade totals
     And I set the field "Show weightings" to "Show"
     And I press "Save changes"
     Then I should see "75.00 (16.85 %)" in the ".course" "css_element"
-    And I set the field "Grade report" to "User report"
-    And I set the field "Select all or one user" to "Student 1"
+    And I select "User report" from the "Grade report" singleselect
+    And I select "Student 1" from the "Select all or one user" singleselect
     And the following should exist in the "user-grade" table:
       | Grade item            | Calculated weight | Grade           | Contribution to course total |
       | Test assignment five  | 57.14 %           | 10.00 (50.00 %) | 2.25 %                        |
index a854732..5cd48b0 100644 (file)
@@ -70,7 +70,6 @@ Feature: View gradebook when scales are used
     And I follow "Grader report"
     And I turn editing mode on
 
-  @javascript
   Scenario: Test displaying scales in gradebook in aggregation method Natural
     When I turn editing mode off
     Then the following should exist in the "user-grades" table:
@@ -85,14 +84,13 @@ Feature: View gradebook when scales are used
       | Range              | F–A      | 0.00–5.00      | 0.00–5.00    |
       | Overall average    | C        | 3.00           | 3.00         |
     And I follow "User report"
-    And I set the field "Select all or one user" to "Student 3"
-    And I click on "Select all or one user" "select"
+    And I select "Student 3" from the "Select all or one user" singleselect
     And the following should exist in the "user-grade" table:
       | Grade item          | Grade | Range | Percentage | Contribution to course total |
       | Test assignment one | C     | F–A   | 50.00 %    | 60.00 %                      |
       | Sub category 1 total      | 3.00  | 0–5   | 60.00 %    | -                            |
       | Course total        | 3.00  | 0–5   | 60.00 %    | -                            |
-    And I set the field "jump" to "Categories and items"
+    And I select "Categories and items" from the "Grade report" singleselect
     And the following should exist in the "grade_edit_tree_table" table:
       | Name                | Max grade |
       | Test assignment one | 5.00      |
@@ -108,7 +106,6 @@ Feature: View gradebook when scales are used
       | Sub category 1 total      | 4.00  | 0–5   | 80.00 %    | -                            |
       | Course total        | 4.00  | 0–5   | 80.00 %    | -                            |
 
-  @javascript
   Scenario Outline: Test displaying scales in gradebook in all other aggregation methods
     When I follow "Edit   Course 1"
     And I set the field "Aggregation" to "<aggregation>"
@@ -133,14 +130,13 @@ Feature: View gradebook when scales are used
       | Range              | F–A      | 1.00–5.00      | 0.00–100.00    |
       | Overall average    | C        | 3.00           | <overallavg>   |
     And I follow "User report"
-    And I set the field "Select all or one user" to "Student 3"
-    And I click on "Select all or one user" "select"
+    And I select "Student 3" from the "Select all or one user" singleselect
     And the following should exist in the "user-grade" table:
       | Grade item                   | Grade          | Range | Percentage    | Contribution to course total |
       | Test assignment one          | C              | F–A   | 50.00 %       | <contrib3>                   |
       | Sub category (<aggregation>) total<aggregation>. | 3.00           | 1–5   | 50.00 %       | -                            |
       | Course total<aggregation>.   | <coursetotal3> | 0–100 | <courseperc3> | -                            |
-    And I set the field "jump" to "Categories and items"
+    And I select "Categories and items" from the "Grade report" singleselect
     And the following should exist in the "grade_edit_tree_table" table:
       | Name                | Max grade |
       | Test assignment one | A (5)     |
index 5662e39..9aa8684 100644 (file)
@@ -57,9 +57,8 @@ Feature: We can enter in grades and view reports from the gradebook
     And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment name 2"
     And I press "Save changes"
 
-  @javascript
   Scenario: Grade a grade item and ensure the results display correctly in the gradebook
-    When I set the field "Grade report" to "User report"
+    When I select "User report" from the "Grade report" singleselect
     And the "Grade report" select box should contain "Grader report"
     And the "Grade report" select box should contain "Outcomes report"
     And the "Grade report" select box should contain "User report"
@@ -80,14 +79,13 @@ Feature: We can enter in grades and view reports from the gradebook
     And "Course 1" row "Grade" column of "overview-grade" table should contain "170.00"
     And "Course 1" row "Grade" column of "overview-grade" table should not contain "90.00"
 
-  @javascript
   Scenario: We can add a weighting to a grade item and it is displayed properly in the user report
-    When I set the field "Grade report" to "Categories and items"
+    When I select "Categories and items" from the "Grade report" singleselect
     And I set the following settings for grade item "Course 1":
       | Aggregation | Weighted mean of grades |
     And I set the field "Extra credit value for Test assignment name" to "0.72"
     And I press "Save changes"
-    And I set the field "Grade report" to "User report"
+    And I select "User report" from the "Grade report" singleselect
     And I navigate to "Course grade settings" node in "Grade administration > Setup"
     And I set the following fields to these values:
       | Show weightings | Show |
index c8af3f8..8e3d7e5 100644 (file)
@@ -472,7 +472,7 @@ class badge {
                     $wheresql = ' WHERE u.id ' . $earnedsql;
                 }
                 list($enrolledsql, $enrolledparams) = get_enrolled_sql($this->get_context(), 'moodle/badges:earnbadge', 0, true);
-                $sql = "SELECT u.id
+                $sql = "SELECT DISTINCT u.id
                         FROM {user} u
                         {$extrajoin}
                         JOIN ({$enrolledsql}) je ON je.id = u.id " . $wheresql . $extrawhere;
index 72b62b0..a91cab4 100644 (file)
@@ -5617,11 +5617,11 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml = '',
             // Before doing the comparison, make sure that the paths are correct (Windows uses slashes in the other direction).
             $attachpath = str_replace('\\', '/', $attachmentpath);
             // Make sure both variables are normalised before comparing.
-            $temppath = str_replace('\\', '/', $CFG->tempdir);
+            $temppath = str_replace('\\', '/', realpath($CFG->tempdir));
 
             // If the attachment is a full path to a file in the tempdir, use it as is,
             // otherwise assume it is a relative path from the dataroot (for backwards compatibility reasons).
-            if (strpos($attachpath, realpath($temppath)) !== 0) {
+            if (strpos($attachpath, $temppath) !== 0) {
                 $attachmentpath = $CFG->dataroot . '/' . $attachmentpath;
             }
 
index 7e89055..114a55b 100644 (file)
@@ -216,6 +216,11 @@ class phpunit_util extends testing_util {
         filter_manager::reset_caches();
         core_filetypes::reset_caches();
 
+        // Reset static unit test options.
+        if (class_exists('\availability_date\condition', false)) {
+            \availability_date\condition::set_current_time_for_test(0);
+        }
+
         // Reset internal users.
         core_user::reset_internal_users();
 
index 9ae6964..3b57e54 100644 (file)
@@ -141,27 +141,24 @@ class behat_navigation extends behat_base {
      * Click on an entry in the user menu.
      * @Given /^I follow "(?P<nodetext_string>(?:[^"]|\\")*)" in the user menu$/
      *
-     * @throws ExpectationException
      * @param string $nodetext
      * @return bool|void
      */
     public function i_follow_in_the_user_menu($nodetext) {
+        $steps = array();
 
-        // The user menu is broken without javascript.
-        if (!$this->running_javascript()) {
-            throw new DriverException('I follow in the user menu step is not available with Javascript disabled');
+        if ($this->running_javascript()) {
+            // The user menu must be expanded when JS is enabled.
+            $xpath = "//div[@class='usermenu']//a[contains(concat(' ', @class, ' '), ' toggle-display ')]";
+            $steps[] = new When('I click on "'.$xpath.'" "xpath_element"');
         }
 
-        $steps = array();
-
-        $xpath = "//div[@class='usermenu']//a[contains(concat(' ', @class, ' '), ' toggle-display ')]";
+        // Now select the link.
+        // The CSS path is always present, with or without JS.
         $csspath = ".usermenu [data-rel='menu-content']";
-
-        $steps[] = new When('I click on "'.$xpath.'" "xpath_element"');
         $steps[] = new When('I click on "'.$nodetext.'" "link" in the "'.$csspath.'" "css_element"');
 
         return $steps;
-
     }
 
     /**
index d56bffa..9083023 100644 (file)
@@ -1,4 +1,4 @@
-@core @core_message @javascript
+@core @core_message
 Feature: Message history displays correctly
   In order to read messages between two users
   As a user
index b722ca9..9514618 100644 (file)
@@ -1,4 +1,4 @@
-@core @core_message @javascrript
+@core @core_message
 Feature: Manage contacts
   In order to easily access the users I interact more with
   As a user
index b15a393..849e57b 100644 (file)
@@ -4,7 +4,6 @@ Feature: An user can message course participants
   As a teacher
   I need to message them all
 
-  @javascript
   Scenario: An user can message multiple course participants including him/her self
     Given the following "users" exist:
       | username | firstname | lastname | email |
@@ -22,15 +21,16 @@ Feature: An user can message course participants
     And I log in as "teacher1"
     And I follow "Course 1"
     And I follow "Participants"
-    When I click on "input[type='checkbox']" "css_element" in the "Teacher 1" "table_row"
-    And I click on "input[type='checkbox']" "css_element" in the "Student 1" "table_row"
+    When I set the field with xpath "//tr[contains(normalize-space(.), 'Teacher 1')]//input[@type='checkbox']" to "1"
+    And I set the field with xpath "//tr[contains(normalize-space(.), 'Student 1')]//input[@type='checkbox']" to "1"
     And I set the field "With selected users..." to "Send a message"
+    And I press "OK"
     And I set the following fields to these values:
       | messagebody | Here it is, the message content |
     And I press "Preview"
     And I press "Send message"
     And I follow "Messages" in the user menu
-    And I set the field "Message navigation:" to "Recent conversations"
+    And I select "Recent conversations" from the "Message navigation:" singleselect
     Then I should see "Here it is, the message content"
     And I should see "Student 1"
     And I click on "this conversation" "link" in the "//div[@class='singlemessage'][contains(., 'Teacher 1')]" "xpath_element"
index 6ba4ff3..a6b3533 100644 (file)
@@ -1,4 +1,4 @@
-@core @core_message @javascript
+@core @core_message
 Feature: Recent conversations contains my recent conversations
   In order to view my recent conversations
   As a user
@@ -14,7 +14,7 @@ Feature: Recent conversations contains my recent conversations
   Scenario: View that I don't have recent conversations
     Given I log in as "user1"
     And I follow "Messages" in the user menu
-    When I set the field "Message navigation:" to "Recent conversations"
+    When I select "Recent conversations" from the "Message navigation:" singleselect
     Then I should not see "User Two"
     And I should not see "User Three"
 
@@ -23,7 +23,7 @@ Feature: Recent conversations contains my recent conversations
     And I send "Message from user1 to user2" message to "User Two" user
     And I send "Message from user1 to user3" message to "User Three" user
     And I follow "Messages" in the user menu
-    When I set the field "Message navigation:" to "Recent conversations"
+    When I select "Recent conversations" from the "Message navigation:" singleselect
     Then I should see "User Two"
     And I should see "User Three"
     And I should see "Message from user1 to user2"
@@ -31,6 +31,6 @@ Feature: Recent conversations contains my recent conversations
     And I log out
     And I log in as "user2"
     And I follow "Messages" in the user menu
-    And I set the field "Message navigation:" to "Recent conversations"
+    And I select "Recent conversations" from the "Message navigation:" singleselect
     And I should see "Message from user1 to user2"
     And I should not see "Message from user1 to user3"
index 1f3ddf4..0a5e681 100644 (file)
@@ -1,4 +1,4 @@
-@core @core_message @javascript
+@core @core_message
 Feature: Users can search their message history
   In order to read old messages
   As a user
index 300d393..b12f8c6 100644 (file)
@@ -37,12 +37,11 @@ Feature: Students can choose from 4 discussion display options and their choice
     And I log in as "student1"
     And I follow "Course 1"
 
-  @javascript
   Scenario: Display replies flat, with oldest first
     Given I reply "Discussion 1" post from "Test forum name" forum with:
       | Subject | Reply 2 to discussion 1 |
       | Message | Discussion contents 1, third message |
-    When I set the field "mode" to "Display replies flat, with oldest first"
+    When I select "Display replies flat, with oldest first" from the "mode" singleselect
     Then I should see "Discussion contents 1, first message" in the "div.firstpost.starter" "css_element"
     And I should see "Discussion contents 1, second message" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ') and not(contains(@class, 'starter'))]" "xpath_element"
     And I reply "Discussion 2" post from "Test forum name" forum with:
@@ -52,12 +51,11 @@ Feature: Students can choose from 4 discussion display options and their choice
     And I should see "Discussion contents 2, first message" in the "div.firstpost.starter" "css_element"
     And I should see "Discussion contents 2, second message" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ') and not(contains(@class, 'starter'))]" "xpath_element"
 
-  @javascript
   Scenario: Display replies flat, with newest first
     Given I reply "Discussion 1" post from "Test forum name" forum with:
       | Subject | Reply 2 to discussion 1 |
       | Message | Discussion contents 1, third message |
-    When I set the field "mode" to "Display replies flat, with newest first"
+    When I select "Display replies flat, with newest first" from the "mode" singleselect
     Then I should see "Discussion contents 1, first message" in the "div.firstpost.starter" "css_element"
     And I should see "Discussion contents 1, third message" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ') and not(contains(@class, 'starter'))]" "xpath_element"
     And I reply "Discussion 2" post from "Test forum name" forum with:
@@ -67,11 +65,10 @@ Feature: Students can choose from 4 discussion display options and their choice
     And I should see "Discussion contents 2, first message" in the "div.firstpost.starter" "css_element"
     And I should see "Discussion contents 2, third message" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ') and not(contains(@class, 'starter'))]" "xpath_element"
 
-  @javascript
   Scenario: Display replies in threaded form
     Given I follow "Test forum name"
     And I follow "Discussion 1"
-    When I set the field "mode" to "Display replies in threaded form"
+    When I select "Display replies in threaded form" from the "mode" singleselect
     Then I should see "Discussion contents 1, first message"
     And I should see "Reply 1 to discussion 1" in the "span.forumthread" "css_element"
     And I follow "Test forum name"
@@ -80,11 +77,10 @@ Feature: Students can choose from 4 discussion display options and their choice
     And I should see "Discussion contents 2, first message"
     And I should see "Reply 1 to discussion 2" in the "span.forumthread" "css_element"
 
-  @javascript
   Scenario: Display replies in nested form
     Given I follow "Test forum name"
     And I follow "Discussion 1"
-    When I set the field "mode" to "Display replies in nested form"
+    When I select "Display replies in nested form" from the "mode" singleselect
     Then I should see "Discussion contents 1, first message" in the "div.firstpost.starter" "css_element"
     And I should see "Discussion contents 1, second message" in the "div.indent div.forumpost" "css_element"
     And I follow "Test forum name"
index a84d660..36a0c79 100644 (file)
@@ -6,39 +6,36 @@ Feature: A user can navigate to previous and next discussions
 
   Background:
     Given the following "users" exist:
-      | username | firstname | lastname | email |
-      | student1 | Student | 1 | student1@example.com |
-      | student2 | Student | 2 | student2@example.com |
+      | username | firstname | lastname | email                 |
+      | teacher1 | Teacher   | 1        | teacher1@example.com  |
+      | student1 | Student   | 1        | student1@example.com  |
+      | student2 | Student   | 2        | student2@example.com  |
     And the following "courses" exist:
-      | fullname | shortname | category |
-      | Course 1 | C1 | 0 |
+      | fullname | shortname  | category  |
+      | Course 1 | C1         | 0         |
     And the following "course enrolments" exist:
       | user | course | role |
+      | teacher1 | C1 | editingteacher |
       | student1 | C1 | student |
       | student2 | C1 | student |
-    And I log in as "admin"
-    And I am on site homepage
-    And I follow "Course 1"
-    And I navigate to "Groups" node in "Users"
-    And I press "Create group"
-    And I set the following fields to these values:
-      | Group name | Group 1 |
-    And I press "Save changes"
-    And I press "Create group"
-    And I set the following fields to these values:
-      | Group name | Group 2 |
-    And I press "Save changes"
-    And I add "Student 1" user to "Group 1" group members
-    And I add "Student 2" user to "Group 2" group members
-    And I am on site homepage
-    And I follow "Course 1"
-    And I turn editing mode on
+    And the following "groups" exist:
+      | name | course | idnumber |
+      | Group 1 | C1 | G1 |
+      | Group 2 | C1 | G2 |
+    And the following "group members" exist:
+      | user | group |
+      | teacher1 | G1 |
+      | teacher1 | G2 |
+      | student1 | G1 |
+      | student2 | G2 |
 
-  @javascript
   Scenario: A user can navigate between discussions
-    Given I add a "Forum" to section "1" and I fill the form with:
-      | Forum name | Test forum name |
-      | Description | Test forum description |
+    Given the following "activities" exist:
+      | activity   | name                   | intro             | course | idnumber     | groupmode |
+      | forum      | Test forum name        | Test forum name   | C1     | forum        | 0         |
+    And I log in as "teacher1"
+    And I follow "Course 1"
+    And I follow "Test forum name"
     And I add a new discussion to "Test forum name" forum with:
       | Subject | Discussion 1 |
       | Message | Test post message |
@@ -61,6 +58,7 @@ Feature: A user can navigate to previous and next discussions
     And I set the following fields to these values:
       | Message | Answer to discussion |
     And I press "Post to forum"
+    And I wait to be redirected
     And I should not see "Discussion 2"
     And I should see "Discussion 3"
     And I follow "Discussion 3"
@@ -70,12 +68,13 @@ Feature: A user can navigate to previous and next discussions
     And I should not see "Discussion 1"
     And I should see "Discussion 3"
 
-  @javascript
   Scenario: A user can navigate between discussions with visible groups
-    Given I add a "Forum" to section "1" and I fill the form with:
-      | Forum name | Test forum name |
-      | Description | Test forum description |
-      | Group mode | Visible groups |
+    Given the following "activities" exist:
+      | activity   | name                   | intro             | course | idnumber     | groupmode |
+      | forum      | Test forum name        | Test forum name   | C1     | forum        | 2         |
+    And I log in as "teacher1"
+    And I follow "Course 1"
+    And I follow "Test forum name"
     And I add a new discussion to "Test forum name" forum with:
       | Subject | Discussion 1 Group 0 |
       | Message | Test post message |
@@ -102,7 +101,7 @@ Feature: A user can navigate to previous and next discussions
     When I log in as "student1"
     And I follow "Course 1"
     And I follow "Test forum name"
-    And I set the field "Visible groups" to "All participants"
+    And I select "All participants" from the "Visible groups" singleselect
     And I follow "Discussion 1 Group 0"
     Then I should see "Discussion 2 Group 0"
     And I should not see "Group 1"
@@ -118,7 +117,7 @@ Feature: A user can navigate to previous and next discussions
     And I should see "Discussion 2 Group 1"
     And I should see "Discussion 2 Group 2"
     And I follow "Test forum name"
-    And I set the field "Visible groups" to "Group 1"
+    And I select "Group 1" from the "Visible groups" singleselect
     And I follow "Discussion 1 Group 1"
     Then I should see "Discussion 2 Group 0"
     And I should see "Discussion 2 Group 1"
@@ -126,12 +125,13 @@ Feature: A user can navigate to previous and next discussions
     And I should see "Discussion 1 Group 1"
     And I should not see "Group 2"
 
-  @javascript
   Scenario: A user can navigate between discussions with separate groups
-    Given I add a "Forum" to section "1" and I fill the form with:
-      | Forum name | Test forum name |
-      | Description | Test forum description |
-      | Group mode | Separate groups |
+    Given the following "activities" exist:
+      | activity   | name                   | intro             | course | idnumber     | groupmode |
+      | forum      | Test forum name        | Test forum name   | C1     | forum        | 1         |
+    And I log in as "teacher1"
+    And I follow "Course 1"
+    And I follow "Test forum name"
     And I add a new discussion to "Test forum name" forum with:
       | Subject | Discussion 1 Group 0 |
       | Message | Test post message |
index e5aecd2..8f42c7f 100644 (file)
@@ -14,30 +14,19 @@ Feature: Students can edit or delete their forum posts within a set time limit
     And the following "course enrolments" exist:
       | user | course | role |
       | student1 | C1 | student |
-    And I log in as "admin"
-    And I expand "Site administration" node
-    And I expand "Security" node
-    And I follow "Site policies"
-    And I set the field "Maximum time to edit posts" to "1 minutes"
-    And I press "Save changes"
-    And I am on site homepage
-    And I follow "Course 1"
-    And I turn editing mode on
-    And I add a "Forum" to section "1" and I fill the form with:
-      | Forum name | Test forum name |
-      | Forum type | Standard forum for general use |
-      | Description | Test forum description |
-    And I log out
-    And I follow "Course 1"
+    And the following "activities" exist:
+      | activity   | name                   | intro                   | course  | idnumber  |
+      | forum      | Test forum name        | Test forum description  | C1      | forum     |
     And I log in as "student1"
+    And I follow "Course 1"
     And I add a new discussion to "Test forum name" forum with:
       | Subject | Forum post subject |
       | Message | This is the body |
 
   Scenario: Edit forum post
-    When I follow "Forum post subject"
+    Given I follow "Forum post subject"
     And I follow "Edit"
-    And I set the following fields to these values:
+    When I set the following fields to these values:
       | Subject | Edited post subject |
       | Message | Edited post body |
     And I press "Save changes"
@@ -45,16 +34,32 @@ Feature: Students can edit or delete their forum posts within a set time limit
     Then I should see "Edited post subject"
     And I should see "Edited post body"
 
-  @javascript
   Scenario: Delete forum post
-    When I follow "Forum post subject"
-    And I follow "Delete"
+    Given I follow "Forum post subject"
+    When I follow "Delete"
     And I press "Continue"
     Then I should not see "Forum post subject"
 
   @javascript
   Scenario: Time limit expires
-    When I wait "70" seconds
+    Given I log out
+    And I log in as "admin"
+    And I expand "Site administration" node
+    And I expand "Security" node
+    And I follow "Site policies"
+    And I set the field "Maximum time to edit posts" to "1 minutes"
+    And I press "Save changes"
+    And I am on site homepage
+    And I follow "Course 1"
+    And I turn editing mode on
+    And I add a "Forum" to section "1" and I fill the form with:
+      | Forum name | Test forum name |
+      | Forum type | Standard forum for general use |
+      | Description | Test forum description |
+    And I log out
+    And I log in as "student1"
+    And I follow "Course 1"
+    When I wait "61" seconds
     And I follow "Forum post subject"
     Then I should not see "Edit" in the "region-main" "region"
     And I should not see "Delete" in the "region-main" "region"
index 3cc1dfd..42db613 100644 (file)
@@ -32,7 +32,6 @@ Feature: Teachers can edit or delete any forum post
       | Subject | Student post subject |
       | Message | Student post message |
 
-  @javascript
   Scenario: A teacher can delete another user's posts
     Given I log out
     And I log in as "teacher1"
@@ -44,7 +43,6 @@ Feature: Teachers can edit or delete any forum post
     Then I should not see "Student post subject"
     And I should not see "Student post message"
 
-  @javascript
   Scenario: A teacher can edit another user's posts
     Given I log out
     And I log in as "teacher1"
@@ -59,7 +57,6 @@ Feature: Teachers can edit or delete any forum post
     Then I should see "Edited student subject"
     And I should see "Edited by Teacher 1 - original submission"
 
-  @javascript
   Scenario: A student can't edit or delete another user's posts
     When I follow "Teacher post subject"
     Then I should not see "Edit" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Teacher post subject')]" "xpath_element"
index 45a474a..c5fd76d 100644 (file)
@@ -1,4 +1,4 @@
-@mod @mod_forum @javascript
+@mod @mod_forum
 Feature: A user can view their posts and discussions
   In order to ensure a user can view their posts and discussions
   As a student
@@ -7,23 +7,16 @@ Feature: A user can view their posts and discussions
   Scenario: View the student's posts and discussions
     Given the following "users" exist:
       | username | firstname | lastname | email |
-      | teacher1 | Teacher | 1 | teacher1@example.com |
       | student1 | Student | 1 | student1@example.com |
     And the following "courses" exist:
       | fullname | shortname | category |
       | Course 1 | C1 | 0 |
     And the following "course enrolments" exist:
       | user | course | role |
-      | teacher1 | C1 | editingteacher |
       | student1 | C1 | student |
-    And I log in as "teacher1"
-    And I follow "Course 1"
-    And I turn editing mode on
-    And I add a "Forum" to section "1" and I fill the form with:
-      | Forum name | Test forum name |
-      | Forum type | Standard forum for general use |
-      | Description | Test forum description |
-    And I log out
+    And the following "activities" exist:
+      | activity   | name                   | intro       | course | idnumber     | groupmode |
+      | forum      | Test forum name        | Test forum  | C1     | forum        | 0         |
     And I log in as "student1"
     And I follow "Course 1"
     And I add a new discussion to "Test forum name" forum with:
index e399c48..cfbe9e9 100644 (file)
@@ -55,37 +55,13 @@ Background:
       | grouping | group |
       | G1       | C2G1 |
       | G1       | C2G2 |
-    And I log in as "teacher1"
-    And I follow "Course 1"
-    And I turn editing mode on
-    And I add a "Forum" to section "1" and I fill the form with:
-      | Forum name | Separate group forum |
-      | Forum type | Standard forum for general use |
-      | Description | Standard forum description |
-      | Group mode | Separate groups |
-    And I add a "Forum" to section "2" and I fill the form with:
-      | Forum name | Visible group forum |
-      | Forum type | Standard forum for general use |
-      | Description | Standard forum description |
-      | Group mode | Visible groups |
-    And I add a "Forum" to section "3" and I fill the form with:
-      | Forum name | No group forum |
-      | Forum type | Standard forum for general use |
-      | Description | Standard forum description |
-      | Group mode | No groups |
-    And I log out
-    And I log in as "teacher1"
-    And I follow "Course 2"
-    And I turn editing mode on
-    And I add a "Forum" to section "1" and I fill the form with:
-      | Forum name | Groupings forum |
-      | Forum type | Standard forum for general use |
-      | Description | Standard forum description |
-      | Group mode | Separate groups |
-      | Grouping | G1 |
-    And I log out
+    And the following "activities" exist:
+      | activity   | name                   | intro             | course | idnumber     | groupmode | grouping |
+      | forum      | No group forum         | Test forum name   | C1     | forum        | 0         |          |
+      | forum      | Separate group forum   | Test forum name   | C1     | forum        | 1         |          |
+      | forum      | Visible group forum    | Test forum name   | C1     | forum        | 2         |          |
+      | forum      | Groupings forum        | Test forum name   | C2     | forum        | 1         | G1       |
 
-  @javascript
   Scenario: Teacher is able to post a copy of a message to all groups in a separate group forum
     Given I log in as "teacher1"
     And I follow "Course 1"
@@ -109,7 +85,6 @@ Background:
     And I follow "Separate group forum"
     And I should see "Discussion 1"
 
-  @javascript
   Scenario: Teacher is able to post a copy of a message to all groups in a visible group forum
     Given I log in as "teacher1"
     And I follow "Course 1"
@@ -133,7 +108,6 @@ Background:
     And I follow "Visible group forum"
     And I should see "Discussion 1"
 
-  @javascript
   Scenario: Teacher is unable to post a copy of a message to all groups in a no group forum
     Given I log in as "teacher1"
     And I follow "Course 1"
@@ -141,7 +115,6 @@ Background:
     And I press "Add a new discussion topic"
     Then I should not see "Post a copy to all groups"
 
-  @javascript
   Scenario: Posts to all groups that have groupings should only display within the grouping and not to other groups
     Given I log in as "teacher1"
     And I follow "Course 2"
index cd6d196..ca4f906 100644 (file)
@@ -16,23 +16,18 @@ Feature: Single simple forum discussion type
       | user | course | role |
       | teacher1 | C1 | editingteacher |
       | student1 | C1 | student |
-    And I log in as "teacher1"
-    And I follow "Course 1"
-    And I turn editing mode on
-    And I add a "Forum" to section "1" and I fill the form with:
-      | Forum name | Single discussion forum name |
-      | Forum type | A single simple discussion |
-      | Description | Single discussion forum description |
+    And the following "activities" exist:
+      | activity   | name                         | intro                               | type    | course | idnumber     |
+      | forum      | Single discussion forum name | Single discussion forum description | single  | C1     | forum        |
 
-  @javascript
   Scenario: Teacher can start the single simple discussion
+    Given I log in as "teacher1"
+    And I follow "Course 1"
     When I follow "Single discussion forum name"
     Then I should see "Single discussion forum description" in the "div.firstpost.starter" "css_element"
     And I should not see "Add a new discussion topic"
 
-  @javascript
   Scenario: Student can not add more discussions
-    Given I log out
     And I log in as "student1"
     And I follow "Course 1"
     When I reply "Single discussion forum name" post from "Single discussion forum name" forum with:
index 965d061..422e4b8 100644 (file)
@@ -21,7 +21,6 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
     And I follow "Course 1"
     And I turn editing mode on
 
-  @javascript
   Scenario: Tracking forum posts off
     Given I add a "Forum" to section "1" and I fill the form with:
       | Forum name | Test forum name |
@@ -38,7 +37,6 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
     And I follow "Test forum name"
     And I should not see "Track unread posts"
 
-  @javascript
   Scenario: Tracking forum posts optional with user tracking on
     Given I add a "Forum" to section "1" and I fill the form with:
       | Forum name | Test forum name |
@@ -64,7 +62,6 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
     And I follow "Course 1"
     And I should not see "1 unread post"
 
-  @javascript
   Scenario: Tracking forum posts optional with user tracking off
     Given I add a "Forum" to section "1" and I fill the form with:
       | Forum name | Test forum name |
@@ -81,7 +78,6 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
     And I follow "Test forum name"
     And I should not see "Track unread posts"
 
-  @javascript
   Scenario: Tracking forum posts forced with user tracking on
     Given the following config values are set as admin:
       | forum_allowforcedreadtracking | 1 |
@@ -105,7 +101,6 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
     And I follow "Course 1"
     And I should not see "1 unread post"
 
-  @javascript
   Scenario: Tracking forum posts forced with user tracking off
     Given the following config values are set as admin:
       | forum_allowforcedreadtracking | 1 |
@@ -129,7 +124,6 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
     And I follow "Course 1"
     And I should not see "1 unread post"
 
-  @javascript
   Scenario: Tracking forum posts forced (with force disabled) with user tracking on
     Given the following config values are set as admin:
       | forum_allowforcedreadtracking | 1 |
@@ -161,7 +155,6 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
     And I follow "Course 1"
     And I should not see "1 unread post"
 
-  @javascript
   Scenario: Tracking forum posts forced (with force disabled) with user tracking off
     Given the following config values are set as admin:
       | forum_allowforcedreadtracking | 1 |
index d5dcb9b..65eeb3d 100644 (file)
@@ -34,7 +34,6 @@ Feature: Practice mode in a lesson activity
             | id_answer_editor_1 | False |
         And I press "Save page"
 
-    @javascript
     Scenario: Non-practice lesson records grades in the gradebook
         Given I follow "Test lesson name"
         And I navigate to "Edit settings" node in "Lesson administration"
@@ -55,7 +54,6 @@ Feature: Practice mode in a lesson activity
         And I follow "Course 1"
         And I should see "Non-practice lesson"
 
-    @javascript
     Scenario: Practice lesson doesn't record grades in the gradebook
         Given I follow "Test lesson name"
         And I navigate to "Edit settings" node in "Lesson administration"
@@ -76,7 +74,6 @@ Feature: Practice mode in a lesson activity
         And I follow "Course 1"
         And I should not see "Practice lesson"
 
-    @javascript
     Scenario: Practice lesson with scale doesn't record grades in the gradebook
         Given I follow "Test lesson name"
         And I navigate to "Edit settings" node in "Lesson administration"
index 7c137f5..c648195 100644 (file)
@@ -536,7 +536,7 @@ table.quizreviewsummary td.cell {
 #page-mod-quiz-edit .totalpoints {
     display: block;
     float: right;
-    margin: -2.5em 0 0;
+    margin: -2.85em 0 0;
     padding: .2em;
 }
 #page-mod-quiz-edit.dir-rtl .maxgrade,
@@ -1049,3 +1049,15 @@ table#categoryquestions {
         page-break-inside: avoid;
     }
 }
+/* Ajustments for mobile devices */
+@media only screen and (max-width:565px) {
+    #page-mod-quiz-edit .rpcontainerclass {
+        margin-top: 3em;
+    }
+    #page-mod-quiz-edit .maxgrade {
+        margin-top: 0.1em;
+    }
+    #page-mod-quiz-edit .statusbar {
+        padding: 0;
+    }
+}
index 912945e..06026eb 100644 (file)
@@ -28,7 +28,6 @@ Feature: View the user page for the outline report
       | Description | URL description |
       | External URL | http://www.google.com |
 
-  @javascript
   Scenario: View the user page when only the legacy log reader is enabled
     Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
     And I click on "Enable" "link" in the "Legacy log" "table_row"
@@ -48,20 +47,17 @@ Feature: View the user page for the outline report
     And I follow "URL name"
     And I follow "URL name"
     And I follow "URL name"
-    And I click on "Student 1" "link"
-    And I follow "Profile" in the open menu
+    And I follow "Profile" in the user menu
     And I follow "Course 1"
     When I follow "Outline report"
     Then I should see "4 views" in the "Folder name" "table_row"
     And I should see "3 views" in the "URL name" "table_row"
-    And I click on "Student 1" "link"
-    And I follow "Profile" in the open menu
+    And I follow "Profile" in the user menu
     And I follow "Course 1"
-    When I follow "Complete report"
+    And I follow "Complete report"
     And I should see "4 views"
     And I should see "3 views"
 
-  @javascript
   Scenario: View the user page when only the standard log reader is enabled
     Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
     And "Enable" "link" should exist in the "Legacy log" "table_row"
@@ -90,7 +86,6 @@ Feature: View the user page for the outline report
     And I should see "4 views"
     And I should see "3 views"
 
-  @javascript
   Scenario: View the user page when both the standard and legacy log readers are enabled
     Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
     And I click on "Enable" "link" in the "Legacy log" "table_row"
index 338f6d1..26c38fa 100644 (file)
 }
 
 /** Overide for RTL layout **/
+.dir-rtl .block .header h2 {
+    padding: .2em .2em 0 0;
+}
+
 .dir-rtl .block .header,
 .dir-rtl .block h2.header {text-align:right;}
 .dir-rtl .block .header .block_action { float: left; margin-left: 4px; margin-left: 0;}