diff --git a/admin/admin_settings_search_form.php b/admin/admin_settings_search_form.php new file mode 100644 index 00000000000..ad42300b853 --- /dev/null +++ b/admin/admin_settings_search_form.php @@ -0,0 +1,48 @@ +. + +/** + * Admin settings search form + * + * @package admin + * @copyright 2016 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +require_once $CFG->libdir.'/formslib.php'; + +/** + * Admin settings search form + * + * @package admin + * @copyright 2016 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class admin_settings_search_form extends moodleform { + function definition () { + $mform = $this->_form; + + //$mform->addElement('header', 'settingsheader', get_string('search', 'admin')); + $elements = []; + $elements[] = $mform->createElement('text', 'query', get_string('query', 'admin')); + $elements[] = $mform->createElement('submit', 'search', get_string('search')); + $mform->addGroup($elements); + $mform->setType('query', PARAM_RAW); + $mform->setDefault('query', optional_param('query', '', PARAM_RAW)); + } +} diff --git a/admin/search.php b/admin/search.php index 6c255c6d336..0e9a531944e 100644 --- a/admin/search.php +++ b/admin/search.php @@ -36,6 +36,8 @@ if ($data = data_submitted() and confirm_sesskey()) { // to modify them echo $OUTPUT->header($focus); +echo $OUTPUT->heading(get_string('administrationsite')); + if ($errormsg !== '') { echo $OUTPUT->notification($errormsg); @@ -43,6 +45,18 @@ if ($errormsg !== '') { echo $OUTPUT->notification($statusmsg, 'notifysuccess'); } -echo admin_search_settings_html($query); +require_once("admin_settings_search_form.php"); +$form = new admin_settings_search_form(); +$form->display(); +echo '
Some plain text
Some more text
" When I click on "Show more buttons" "button" And I click on "Accessibility checker" "button" @@ -32,7 +32,7 @@ Feature: Atto accessibility checker Scenario: Low contrast Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Hard to read
" When I click on "Show more buttons" "button" And I click on "Accessibility checker" "button" @@ -42,7 +42,7 @@ Feature: Atto accessibility checker Scenario: No headings Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Sweet roll oat cake jelly-o macaroon donut oat cake. Caramels macaroon cookie sweet roll croissant cheesecake candy jelly-o. Gummies sugar plum sugar plum gingerbread dessert. Tiramisu bonbon jujubes danish marshmallow cookie chocolate cake cupcake tiramisu. Bear claw oat cake chocolate bar croissant. Lollipop cookie topping liquorice croissant. Brownie cookie cupcake lollipop cupcake cupcake. Fruitcake dessert sweet biscuit dragée caramels marzipan brownie. Chupa chups gingerbread apple pie cookie liquorice caramels carrot cake cookie gingerbread. Croissant candy jelly beans. Tiramisu apple pie dessert apple pie macaroon soufflé. Brownie powder carrot cake chocolate. Tart applicake croissant dragée macaroon chocolate donut.
Jelly beans gingerbread tootsie roll. Sugar plum tiramisu cotton candy toffee pie cotton candy tiramisu. Carrot cake chocolate bar sesame snaps cupcake cake dessert sweet fruitcake wafer. Marshmallow cupcake gingerbread pie sweet candy canes powder gummi bears. Jujubes cake muffin marshmallow candy jelly beans tootsie roll pie. Gummi bears applicake chocolate cake sweet jelly sesame snaps lollipop lollipop carrot cake. Marshmallow cake jelly beans. Jelly beans sesame snaps muffin halvah cookie ice cream candy canes carrot cake. Halvah donut marshmallow tiramisu. Cookie dessert gummi bears. Sugar plum apple pie jelly beans gummi bears tart chupa chups. Liquorice macaroon gummi bears gummies macaroon marshmallow sweet roll cake topping. Lemon drops caramels pie icing danish. Chocolate cake oat cake dessert halvah danish carrot cake apple pie.
" When I click on "Show more buttons" "button" And I click on "Accessibility checker" "button" @@ -52,7 +52,7 @@ Feature: Atto accessibility checker Scenario: Merged cells Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "| Breed | Coolness |
|---|---|
| Poodle | NOT COOL |
| Doberman |
| Breed | Coolness |
|---|---|
| Poodle | NOT COOL |
| Doberman | COOL |
| Breed | Coolness |
|---|---|
| Poodle | NOT COOL |
| Doberman | COOL |
Some plain text
Some plain text
" When I click on "Show more buttons" "button" And I select the text in the "Description" Atto editor diff --git a/lib/editor/atto/plugins/align/tests/behat/align.feature b/lib/editor/atto/plugins/align/tests/behat/align.feature index f3f724add7b..130389088a8 100644 --- a/lib/editor/atto/plugins/align/tests/behat/align.feature +++ b/lib/editor/atto/plugins/align/tests/behat/align.feature @@ -6,7 +6,7 @@ Feature: Atto align text Scenario: Right align some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Fascism
" And I click on "Show more buttons" "button" And I select the text in the "Description" Atto editor @@ -16,14 +16,14 @@ Feature: Atto align text And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "style=\"text-align:right;\"" @javascript Scenario: Left align some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Communism
" And I click on "Show more buttons" "button" And I select the text in the "Description" Atto editor @@ -34,14 +34,14 @@ Feature: Atto align text And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "style=\"text-align:left;\"" @javascript Scenario: Center align some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "United Future
" And I click on "Show more buttons" "button" And I select the text in the "Description" Atto editor @@ -51,6 +51,6 @@ Feature: Atto align text And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "style=\"text-align:center;\"" diff --git a/lib/editor/atto/plugins/bold/tests/behat/bold.feature b/lib/editor/atto/plugins/bold/tests/behat/bold.feature index a1d6316a515..7baf1addcc7 100644 --- a/lib/editor/atto/plugins/bold/tests/behat/bold.feature +++ b/lib/editor/atto/plugins/bold/tests/behat/bold.feature @@ -6,7 +6,7 @@ Feature: Atto bold button Scenario: Bold some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Badger" And I select the text in the "Description" Atto editor When I click on "Bold" "button" @@ -15,14 +15,14 @@ Feature: Atto bold button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "Badger" @javascript Scenario: Unbold some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Mouse" And I select the text in the "Description" Atto editor When I click on "Bold" "button" @@ -32,6 +32,6 @@ Feature: Atto bold button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should not see "Mouse" And I should see "Mouse" diff --git a/lib/editor/atto/plugins/charmap/tests/behat/charmap.feature b/lib/editor/atto/plugins/charmap/tests/behat/charmap.feature index f7d648169ab..9da6cc936d9 100644 --- a/lib/editor/atto/plugins/charmap/tests/behat/charmap.feature +++ b/lib/editor/atto/plugins/charmap/tests/behat/charmap.feature @@ -6,7 +6,7 @@ Feature: Atto charmap button Scenario: Insert symbols Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "1980 Mullet
" And I select the text in the "Description" Atto editor When I click on "Show more buttons" "button" @@ -17,5 +17,5 @@ Feature: Atto charmap button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "ā" diff --git a/lib/editor/atto/plugins/clear/tests/behat/clear.feature b/lib/editor/atto/plugins/clear/tests/behat/clear.feature index 1915c7bffba..c458ee6f2d3 100644 --- a/lib/editor/atto/plugins/clear/tests/behat/clear.feature +++ b/lib/editor/atto/plugins/clear/tests/behat/clear.feature @@ -6,7 +6,7 @@ Feature: Atto clear button Scenario: Clear formatting Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Pisa" And I select the text in the "Description" Atto editor And I click on "Italic" "button" @@ -18,6 +18,6 @@ Feature: Atto clear button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should not see "Pisa" diff --git a/lib/editor/atto/plugins/collapse/tests/behat/collapse.feature b/lib/editor/atto/plugins/collapse/tests/behat/collapse.feature index 5174ded51b9..88f1aab15b6 100644 --- a/lib/editor/atto/plugins/collapse/tests/behat/collapse.feature +++ b/lib/editor/atto/plugins/collapse/tests/behat/collapse.feature @@ -6,7 +6,7 @@ Feature: Atto collapse button Scenario: Toggle toolbar Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" When I click on "Show more buttons" "button" Then "Equation editor" "button" should be visible And I click on "Show fewer buttons" "button" diff --git a/lib/editor/atto/plugins/equation/tests/behat/equation.feature b/lib/editor/atto/plugins/equation/tests/behat/equation.feature index a74efe0bfc6..9e219a28126 100644 --- a/lib/editor/atto/plugins/equation/tests/behat/equation.feature +++ b/lib/editor/atto/plugins/equation/tests/behat/equation.feature @@ -6,7 +6,7 @@ Feature: Atto equation editor Scenario: Create an equation Given I log in as "admin" When I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Equation test
" # Set field on the bottom of page, so equation editor dialogue is visible. And I expand all fieldsets @@ -25,7 +25,7 @@ Feature: Atto equation editor Scenario: Edit an equation Given I log in as "admin" When I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "\( \pi \)
" # Set field on the bottom of page, so equation editor dialogue is visible. And I expand all fieldsets diff --git a/lib/editor/atto/plugins/html/tests/behat/html.feature b/lib/editor/atto/plugins/html/tests/behat/html.feature index cf4613415a5..1357cfcb0df 100644 --- a/lib/editor/atto/plugins/html/tests/behat/html.feature +++ b/lib/editor/atto/plugins/html/tests/behat/html.feature @@ -6,7 +6,7 @@ Feature: Atto edit HTML Scenario: Edit the html source Given I log in as "admin" When I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Smurf
" And I click on "Show more buttons" "button" And I click on "HTML" "button" diff --git a/lib/editor/atto/plugins/image/tests/behat/image.feature b/lib/editor/atto/plugins/image/tests/behat/image.feature index 744831de47a..c493d0043b8 100644 --- a/lib/editor/atto/plugins/image/tests/behat/image.feature +++ b/lib/editor/atto/plugins/image/tests/behat/image.feature @@ -9,12 +9,12 @@ Feature: Add images to Atto And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager And I click on "Save changes" "button" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" When I set the field "Description" to "Image test
" And I select the text in the "Description" Atto editor And I click on "Image" "button" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodle-logo.png" "link" And I click on "Select this file" "button" And I set the field "Describe this image for someone who cannot see it" to "It's the Moodle" @@ -42,7 +42,7 @@ Feature: Add images to Atto And the field "Height" matches value "456" And I click on "Save image" "button" And I click on "Update profile" "button" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I select the text in the "Description" Atto editor And I click on "Image" "button" Then the field "Describe this image for someone who cannot see it" matches value "It's the Moodle" @@ -53,7 +53,7 @@ Feature: Add images to Atto Scenario: Manually inserting an image Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Image: .
Image: .
I need some space.
" And I select the text in the "Description" Atto editor And I click on "Show more buttons" "button" @@ -16,14 +16,14 @@ Feature: Indent text in Atto And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "class=\"editor-indent\"" @javascript Scenario: Indent and outdent Given I log in as "admin" And I follow "Profile" in the user menu - When I follow "Edit profile" + When I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "I need some space.
" And I select the text in the "Description" Atto editor And I click on "Show more buttons" "button" @@ -34,5 +34,5 @@ Feature: Indent text in Atto And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should not see "class=\"editor-indent\"" diff --git a/lib/editor/atto/plugins/italic/tests/behat/italic.feature b/lib/editor/atto/plugins/italic/tests/behat/italic.feature index cd063f069e7..01770e6174a 100644 --- a/lib/editor/atto/plugins/italic/tests/behat/italic.feature +++ b/lib/editor/atto/plugins/italic/tests/behat/italic.feature @@ -6,7 +6,7 @@ Feature: Atto italic button Scenario: Italicise some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Tower of Pisa" And I select the text in the "Description" Atto editor When I click on "Italic" "button" @@ -15,14 +15,14 @@ Feature: Atto italic button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "Tower of Pisa" @javascript Scenario: Toggle italics in some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "GHD - for hair" And I select the text in the "Description" Atto editor When I click on "Italic" "button" @@ -32,6 +32,6 @@ Feature: Atto italic button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should not see "GHD - for hair" And I should see "GHD - for hair" diff --git a/lib/editor/atto/plugins/link/tests/behat/link.feature b/lib/editor/atto/plugins/link/tests/behat/link.feature index 0a0234adaea..4d02eb6d73a 100644 --- a/lib/editor/atto/plugins/link/tests/behat/link.feature +++ b/lib/editor/atto/plugins/link/tests/behat/link.feature @@ -9,12 +9,12 @@ Feature: Add links to Atto And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager And I click on "Save changes" "button" When I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Super cool" And I select the text in the "Description" Atto editor And I click on "Link" "button" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodle-logo.png" "link" And I click on "Select this file" "button" And I click on "Update profile" "button" @@ -22,6 +22,6 @@ Feature: Add links to Atto And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "Super cool" diff --git a/lib/editor/atto/plugins/media/tests/behat/media.feature b/lib/editor/atto/plugins/media/tests/behat/media.feature index f558f9e4615..5c1326a0bed 100644 --- a/lib/editor/atto/plugins/media/tests/behat/media.feature +++ b/lib/editor/atto/plugins/media/tests/behat/media.feature @@ -16,7 +16,7 @@ Feature: Add media to Atto And I set the field "Entry title" to "The best video in the entire world (not really)" And I click on "Media" "button" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodle-logo.webm" "link" And I click on "Select this file" "button" And I set the field "Enter name" to "It's the logo" diff --git a/lib/editor/atto/plugins/orderedlist/tests/behat/orderedlist.feature b/lib/editor/atto/plugins/orderedlist/tests/behat/orderedlist.feature index 65393cb829c..548d9c21c3a 100644 --- a/lib/editor/atto/plugins/orderedlist/tests/behat/orderedlist.feature +++ b/lib/editor/atto/plugins/orderedlist/tests/behat/orderedlist.feature @@ -6,7 +6,7 @@ Feature: Atto ordered list button Scenario: Make a list from some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Have you heard the news everyone's talkingWarning: Theme designer mode is enabled.
'; + $info['html'] .= 'Warning: Theme designer mode is enabled.
'; } + $info['html'] .= 'Image test
" And I select the text in the "Instructions for submission" Atto editor - And I click on "Image" "button" in the "#fitem_id_instructauthorseditor" "css_element" + And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_instructauthorseditor']]" "xpath_element" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodlelogo.png" "link" And I click on "Select this file" "button" And I set the field "Describe this image for someone who cannot see it" to "How to submit" @@ -44,9 +44,9 @@ Feature: Teachers can embed images into instructions and conclusion fields And I expand all fieldsets And I set the field "Instructions for assessment" to "Image test
" And I select the text in the "Instructions for assessment" Atto editor - And I click on "Image" "button" in the "#fitem_id_instructreviewerseditor" "css_element" + And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_instructreviewerseditor']]" "xpath_element" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodlelogo.png" "link" And I click on "Select this file" "button" And I set the field "Describe this image for someone who cannot see it" to "How to assess" @@ -57,9 +57,9 @@ Feature: Teachers can embed images into instructions and conclusion fields And I expand all fieldsets And I set the field "Conclusion" to "Image test
" And I select the text in the "Conclusion" Atto editor - And I click on "Image" "button" in the "#fitem_id_conclusioneditor" "css_element" + And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_conclusioneditor']]" "xpath_element" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodlelogo.png" "link" And I click on "Select this file" "button" And I set the field "Describe this image for someone who cannot see it" to "Well done" diff --git a/notes/index.php b/notes/index.php index 6ba0099c6ef..8bff3392321 100644 --- a/notes/index.php +++ b/notes/index.php @@ -103,11 +103,6 @@ if ($userid && $course->id == SITEID) { $PAGE->navbar->add(get_string('notes', 'notes'), $notesurl); } else if ($course->id != SITEID) { $notenode = $PAGE->navigation->find('currentcoursenotes', null)->make_inactive(); - $participantsurl = new moodle_url('/user/view.php', array('id' => $userid, 'course' => $course->id)); - $currentcoursenode = $PAGE->navigation->find('currentcourse', null); - $participantsnode = $currentcoursenode->find('participants', null); - $usernode = $participantsnode->add(fullname($user), $participantsurl); - $usernode->make_active(); $notesurl = new moodle_url('/notes/index.php', array('user' => $userid, 'course' => $courseid)); $PAGE->navbar->add(get_string('notes', 'notes'), $notesurl); diff --git a/report/log/tests/behat/filter_log.feature b/report/log/tests/behat/filter_log.feature index 623ce581a05..96d25f44fca 100644 --- a/report/log/tests/behat/filter_log.feature +++ b/report/log/tests/behat/filter_log.feature @@ -25,7 +25,7 @@ Feature: In a report, admin can filter log data | loglegacy | 1 | logstore_legacy | And I follow "Home" And I follow "Course 1" - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "My courses > C1" And I follow "Student 1" And I click on "Log in as" "link" And I press "Continue" @@ -45,7 +45,7 @@ Feature: In a report, admin can filter log data @javascript Scenario: Filter log report for standard log reader Given I follow "Course 1" - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "My courses > C1" And I follow "Student 1" And I click on "Log in as" "link" And I press "Continue" diff --git a/report/log/tests/behat/user_log.feature b/report/log/tests/behat/user_log.feature index d8be3c70fe5..354c94af047 100644 --- a/report/log/tests/behat/user_log.feature +++ b/report/log/tests/behat/user_log.feature @@ -38,7 +38,7 @@ Feature: User can view activity log. Scenario: View Todays' and all log report for user Given I log in as "teacher1" And I follow "Course 1" - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "My courses > C1" And I follow "Student 1" When I follow "Today's logs" And I should see "Assignment: Test assignment name" @@ -54,7 +54,7 @@ Feature: User can view activity log. And I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "My courses > C1" And I follow "Student 1" When I follow "Today's logs" And I should see "No log reader enabled" diff --git a/report/outline/tests/behat/user.feature b/report/outline/tests/behat/user.feature index b27700ea5e6..98ade5ea365 100644 --- a/report/outline/tests/behat/user.feature +++ b/report/outline/tests/behat/user.feature @@ -48,12 +48,12 @@ Feature: View the user page for the outline report And I follow "URL name" And I follow "URL name" And I follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" 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 follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And I follow "Complete report" And I should see "4 views" And I should see "3 views" @@ -76,12 +76,12 @@ Feature: View the user page for the outline report And I follow "URL name" And I follow "URL name" And I follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" 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 follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" When I follow "Complete report" And I should see "4 views" And I should see "3 views" @@ -106,12 +106,12 @@ Feature: View the user page for the outline report And I follow "URL name" And I follow "URL name" And I follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" 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 follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" When I follow "Complete report" And I should see "4 views" And I should see "3 views" diff --git a/tag/tests/behat/collections.feature b/tag/tests/behat/collections.feature index ad3dd6994e4..0622be17da4 100644 --- a/tag/tests/behat/collections.feature +++ b/tag/tests/behat/collections.feature @@ -86,7 +86,7 @@ Feature: Managers can create and manage tag collections Scenario: Moving tags when changing tag collections And I follow "Preferences" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I expand all fieldsets And I set the field "List of interests" to "Swimming, Tag0, Tag3" And I press "Update profile" diff --git a/tag/tests/behat/standard_tags.feature b/tag/tests/behat/standard_tags.feature index ab40ffd8ba8..465c8ed1818 100644 --- a/tag/tests/behat/standard_tags.feature +++ b/tag/tests/behat/standard_tags.feature @@ -90,7 +90,7 @@ Feature: Manager can add standard tags and change the tag type of existing tags Scenario: Changing standard tags property of tag area When I log in as "manager1" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I expand all fieldsets And I should not see "Manage standard tags" And I set the following fields to these values: @@ -101,7 +101,7 @@ Feature: Manager can add standard tags and change the tag type of existing tags And the field "Change showing standard tags in area User interests" matches value "Don't suggest" And I set the field "Change showing standard tags in area User interests" to "Suggest" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I expand all fieldsets And I should see "Manage standard tags" And I navigate to "Manage tags" node in "Site administration > Appearance" @@ -111,7 +111,7 @@ Feature: Manager can add standard tags and change the tag type of existing tags And I follow "Profile" in the user menu And I should see "Tag3" And I should see "Tag2" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I expand all fieldsets And I should see "Manage standard tags" And I press "Update profile" diff --git a/theme/boost/amd/build/blocks_drawer.min.js b/theme/boost/amd/build/blocks_drawer.min.js new file mode 100644 index 00000000000..6abe8582ffc --- /dev/null +++ b/theme/boost/amd/build/blocks_drawer.min.js @@ -0,0 +1 @@ +define(["jquery","core/custom_interaction_events","core/notification"],function(a,b,c){var d={CONTAINER_REGION:'[data-region="blocks-drawer"]',TOGGLE_REGION:'[data-region="blocks-drawer-toggle"]',TOGGLE_ACTION:'[data-action="toggle-blocks-drawer"]',BODY:"body"},e=function(){a(d.CONTAINER_REGION).length||c.exception({message:"Page is missing a blocks drawer region"}),a(d.TOGGLE_REGION).length||c.exception({message:"Page is missing a blocks drawer toggle region"}),a(d.TOGGLE_ACTION).length||c.exception({message:"Page is missing a blocks drawer toggle link"});var b=a(d.CONTAINER_REGION),e=a(d.TOGGLE_REGION),f="true"==b.attr("aria-hidden"),g=a(d.BODY);f?(b.addClass("closed"),e.addClass("closed"),b.attr("aria-hidden","true")):(g.addClass("blocks-drawer-open"),b.attr("aria-hidden","false")),this.registerEventListeners()};return e.prototype.toggleBlocksDrawer=function(){var b=a(d.CONTAINER_REGION),c=a(d.TOGGLE_REGION),e=a(d.BODY);e.addClass("blocks-drawer-ease");var f="true"==b.attr("aria-hidden");f?(b.removeClass("closed"),c.removeClass("closed"),b.attr("aria-hidden","false"),e.addClass("blocks-drawer-open"),M.util.set_user_preference("blocks-drawer-open","true")):(b.addClass("closed"),c.addClass("closed"),e.removeClass("blocks-drawer-open"),b.attr("aria-hidden","true"),M.util.set_user_preference("blocks-drawer-open","false"))},e.prototype.registerEventListeners=function(){var c=a(d.TOGGLE_ACTION);b.define(c,[b.events.activate]),c.on(b.events.activate,function(a,b){this.toggleBlocksDrawer(),b.originalEvent.preventDefault()}.bind(this))},{init:function(){return new e}}}); \ No newline at end of file diff --git a/theme/boost/amd/build/drawer.min.js b/theme/boost/amd/build/drawer.min.js new file mode 100644 index 00000000000..919a930e0a2 --- /dev/null +++ b/theme/boost/amd/build/drawer.min.js @@ -0,0 +1 @@ +define(["jquery","core/custom_interaction_events","core/log"],function(a,b,c){var d={TOGGLE_REGION:'[data-region="drawer-toggle"]',TOGGLE_ACTION:'[data-action="toggle-drawer"]',TOGGLE_TARGET:"aria-controls",TOGGLE_SIDE:"left",BODY:"body"},e=function(){a(d.TOGGLE_REGION).length||c.debug("Page is missing a drawer region"),a(d.TOGGLE_ACTION).length||c.debug("Page is missing a drawer toggle link"),a(d.TOGGLE_REGION).each(function(b,c){var e=a(c).find(d.TOGGLE_ACTION),f=e.attr("aria-controls"),g=a(document.getElementById(f)),h="false"==e.attr("aria-expanded"),i=e.attr("data-side"),j=a(d.BODY);g.on("mousewheel DOMMouseScroll",this.preventPageScroll),h?e.attr("aria-expanded","false"):(j.addClass("drawer-open-"+i),e.attr("aria-expanded","true"))}.bind(this)),this.registerEventListeners()};return e.prototype.closeAll=function(){a(d.TOGGLE_REGION).each(function(b,c){var e=a(c).find(d.TOGGLE_ACTION),f=e.attr("data-side"),g=a(d.BODY),h=e.attr("aria-controls"),i=a(document.getElementById(h)),j=e.attr("data-preference");e.attr("aria-expanded","false"),g.removeClass("drawer-open-"+f),i.attr("aria-hidden","true"),i.addClass("closed"),M.util.set_user_preference(j,"false")}.bind(this))},e.prototype.toggleDrawer=function(b){var c=a(b.target).closest("[data-action=toggle-drawer]"),e=c.attr("aria-controls"),f=a(document.getElementById(e)),g=a(d.BODY),h=c.attr("data-side"),i=c.attr("data-preference");g.addClass("drawer-ease");var j="true"==c.attr("aria-expanded");if(j)g.removeClass("drawer-open-"+h),c.attr("aria-expanded","false"),f.attr("aria-hidden","true"),f.addClass("closed"),M.util.set_user_preference(i,"false");else{var k=a(document).width()<512;k&&this.closeAll(),c.attr("aria-expanded","true"),f.attr("aria-hidden","false"),g.addClass("drawer-open-"+h),f.removeClass("closed"),M.util.set_user_preference(i,"true")}},e.prototype.preventPageScroll=function(b){var c=b.wheelDelta||b.originalEvent&&b.originalEvent.wheelDelta||-b.originalEvent.detail,d=this.scrollTop+a(this).outerHeight()-this.scrollHeight>=0,e=this.scrollTop<=0;(c<0&&d||c>0&&e)&&b.preventDefault()},e.prototype.registerEventListeners=function(){a(d.TOGGLE_ACTION).each(function(c,d){b.define(a(d),[b.events.activate]),a(d).on(b.events.activate,function(a,b){this.toggleDrawer(b.originalEvent),b.originalEvent.preventDefault()}.bind(this))}.bind(this))},{init:function(){return new e}}}); \ No newline at end of file diff --git a/theme/boost/amd/src/drawer.js b/theme/boost/amd/src/drawer.js new file mode 100644 index 00000000000..ce208babb85 --- /dev/null +++ b/theme/boost/amd/src/drawer.js @@ -0,0 +1,159 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see