mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-73841 block_myoverview: use text for selectors
This commit is contained in:
parent
9cd77c4130
commit
137b2dd638
@ -39,12 +39,9 @@ $string['aria:favourites'] = 'Show starred courses';
|
||||
$string['aria:future'] = 'Show future courses';
|
||||
$string['aria:groupingdropdown'] = 'Grouping drop-down menu';
|
||||
$string['aria:inprogress'] = 'Show courses in progress';
|
||||
$string['aria:lastaccessed'] = 'Sort courses by last accessed date';
|
||||
$string['aria:list'] = 'Switch to list view';
|
||||
$string['aria:title'] = 'Sort courses by course name';
|
||||
$string['aria:past'] = 'Show past courses';
|
||||
$string['aria:removefromfavourites'] = 'Remove star for';
|
||||
$string['aria:shortname'] = 'Sort courses by course short name';
|
||||
$string['aria:summary'] = 'Switch to summary view';
|
||||
$string['aria:sortingdropdown'] = 'Sorting drop-down menu';
|
||||
$string['availablegroupings'] = 'Available filters';
|
||||
@ -85,7 +82,13 @@ $string['hidden'] = 'Archived courses';
|
||||
$string['hidecourse'] = 'Archive';
|
||||
$string['hiddencourses'] = 'Archived';
|
||||
$string['show'] = 'Unarchive';
|
||||
$string['sortbytitle'] = 'Sort by course name';
|
||||
$string['sortbylastaccessed'] = 'Sort by last accessed';
|
||||
$string['sortbyshortname'] = 'Sort by short name';
|
||||
$string['privacy:request:preference:set'] = 'The value of the setting \'{$a->name}\' was \'{$a->value}\'';
|
||||
|
||||
// Deprecated since Moodle 4.0.
|
||||
$string['clearsearch'] = "Clear search";
|
||||
$string['aria:lastaccessed'] = 'Sort courses by last accessed date';
|
||||
$string['aria:shortname'] = 'Sort courses by course short name';
|
||||
$string['aria:title'] = 'Sort courses by course name';
|
||||
|
@ -1 +1,4 @@
|
||||
clearsearch,block_myoverview
|
||||
aria:shortname,block_myoverview
|
||||
aria:lastaccessed,block_myoverview
|
||||
aria:title,block_myoverview
|
||||
|
@ -29,8 +29,7 @@
|
||||
<div class="dropdown mb-1">
|
||||
<button id="displaydropdown" type="button" class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
|
||||
aria-label="{{#str}} aria:displaydropdown, block_myoverview {{/str}}">
|
||||
{{#pix}} a/view_icon_active {{/pix}}
|
||||
<span class="sr-only" data-active-item-text>
|
||||
<span data-active-item-text>
|
||||
{{#card}}{{#str}} card, block_myoverview {{/str}}{{/card}}
|
||||
{{#list}}{{#str}} list, block_myoverview {{/str}}{{/list}}
|
||||
{{#summary}}{{#str}} summary, block_myoverview {{/str}}{{/summary}}
|
||||
|
@ -41,8 +41,7 @@
|
||||
{{#displaygroupingselector}}
|
||||
<div class="dropdown mb-1 mr-1">
|
||||
<button id="groupingdropdown" type="button" class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="{{#str}} aria:groupingdropdown, block_myoverview {{/str}}">
|
||||
{{#pix}} i/filter {{/pix}}
|
||||
<span class="sr-only" data-active-item-text>
|
||||
<span data-active-item-text>
|
||||
{{#allincludinghidden}}{{#str}} allincludinghidden, block_myoverview {{/str}}{{/allincludinghidden}}
|
||||
{{#all}}{{#str}} all, block_myoverview {{/str}}{{/all}}
|
||||
{{#inprogress}}{{#str}} inprogress, block_myoverview {{/str}}{{/inprogress}}
|
||||
|
@ -26,32 +26,31 @@
|
||||
}
|
||||
}}
|
||||
|
||||
<div class="mb-1 mr-1 d-flex align-items-center">
|
||||
<div class="mb-1 mr-1 d-flex flex-wrap align-items-center">
|
||||
<div class="dropdown">
|
||||
<button id="sortingdropdown" type="button" class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="{{#str}} aria:sortingdropdown, block_myoverview {{/str}}">
|
||||
{{#pix}} t/sort_by {{/pix}}
|
||||
<span class="sr-only" data-active-item-text>
|
||||
{{#title}}{{#str}} title, block_myoverview {{/str}}{{/title}}
|
||||
{{#lastaccessed}}{{#str}} lastaccessed, block_myoverview {{/str}}{{/lastaccessed}}
|
||||
{{#shortname}}{{#str}} shortname, block_myoverview {{/str}}{{/shortname}}
|
||||
<button id="sortingdropdown" type="button" class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="{{#str}} aria:sortingdropdown, block_myoverview {{/str}}">
|
||||
<span data-active-item-text>
|
||||
{{#title}}{{#str}} sortbytitle, block_myoverview {{/str}}{{/title}}
|
||||
{{#lastaccessed}}{{#str}} sortbylastaccessed, block_myoverview {{/str}}{{/lastaccessed}}
|
||||
{{#shortname}}{{#str}} sortbyshortname, block_myoverview {{/str}}{{/shortname}}
|
||||
</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" data-show-active-item data-skip-active-class="true" aria-labelledby="sortingdropdown">
|
||||
<li>
|
||||
<a class="dropdown-item" href="#" data-filter="sort" data-pref="title" data-value="fullname" aria-label="{{#str}} aria:title, block_myoverview {{/str}}" aria-controls="courses-view-{{uniqid}}" role="menuitem" {{#title}}aria-current="true"{{/title}}>
|
||||
{{#str}} title, block_myoverview {{/str}}
|
||||
<a class="dropdown-item" href="#" data-filter="sort" data-pref="title" data-value="fullname" aria-controls="courses-view-{{uniqid}}" role="menuitem" {{#title}}aria-current="true"{{/title}}>
|
||||
{{#str}} sortbytitle, block_myoverview {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
{{#showsortbyshortname}}
|
||||
<li>
|
||||
<a class="dropdown-item" href="#" data-filter="sort" data-pref="shortname" data-value="shortname" aria-label="{{#str}} aria:shortname, block_myoverview {{/str}}" aria-controls="courses-view-{{uniqid}}" role="menuitem" {{#shortname}}aria-current="true"{{/shortname}}>
|
||||
{{#str}} shortname, block_myoverview {{/str}}
|
||||
<a class="dropdown-item" href="#" data-filter="sort" data-pref="shortname" data-value="shortname" aria-controls="courses-view-{{uniqid}}" role="menuitem" {{#shortname}}aria-current="true"{{/shortname}}>
|
||||
{{#str}} sortbyshortname, block_myoverview {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
{{/showsortbyshortname}}
|
||||
<li>
|
||||
<a class="dropdown-item" href="#" data-filter="sort" data-pref="lastaccessed" data-value="ul.timeaccess desc" aria-label="{{#str}} aria:lastaccessed, block_myoverview {{/str}}" aria-controls="courses-view-{{uniqid}}" role="menuitem" {{#lastaccessed}}aria-current="true"{{/lastaccessed}}>
|
||||
{{#str}} lastaccessed, block_myoverview {{/str}}
|
||||
<a class="dropdown-item" href="#" data-filter="sort" data-pref="lastaccessed" data-value="ul.timeaccess desc" aria-controls="courses-view-{{uniqid}}" role="menuitem" {{#lastaccessed}}aria-current="true"{{/lastaccessed}}>
|
||||
{{#str}} sortbylastaccessed, block_myoverview {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -170,31 +170,31 @@ Feature: The my overview block allows users to easily access their courses
|
||||
Scenario: Course name sort persistence
|
||||
Given I am on the "My courses" page logged in as "student1"
|
||||
And I click on "sortingdropdown" "button" in the "Course overview" "block"
|
||||
And I click on "Course name" "link" in the "Course overview" "block"
|
||||
And I click on "Sort by course name" "link" in the "Course overview" "block"
|
||||
And I reload the page
|
||||
Then I should see "Course name" in the "Course overview" "block"
|
||||
Then I should see "Sort by course name" in the "Course overview" "block"
|
||||
And "[data-sort='fullname']" "css_element" in the "Course overview" "block" should be visible
|
||||
|
||||
Scenario: Last accessed sort persistence
|
||||
Given I am on the "My courses" page logged in as "student1"
|
||||
And I click on "sortingdropdown" "button" in the "Course overview" "block"
|
||||
And I click on "Last accessed" "link" in the "Course overview" "block"
|
||||
And I click on "Sort by last accessed" "link" in the "Course overview" "block"
|
||||
And I reload the page
|
||||
Then I should see "Last accessed" in the "Course overview" "block"
|
||||
Then I should see "Sort by last accessed" in the "Course overview" "block"
|
||||
And "[data-sort='ul.timeaccess desc']" "css_element" in the "Course overview" "block" should be visible
|
||||
|
||||
Scenario: Short name sort persistence
|
||||
Given I am on the "My courses" page logged in as "student1"
|
||||
When I click on "sortingdropdown" "button" in the "Course overview" "block"
|
||||
Then I should not see "Short name" in the "Course overview" "block"
|
||||
Then I should not see "Sort by short name" in the "Course overview" "block"
|
||||
When the following config values are set as admin:
|
||||
| config | value |
|
||||
| courselistshortnames | 1 |
|
||||
And I reload the page
|
||||
And I click on "sortingdropdown" "button" in the "Course overview" "block"
|
||||
And I click on "Short name" "link" in the "Course overview" "block"
|
||||
And I click on "Sort by short name" "link" in the "Course overview" "block"
|
||||
And I reload the page
|
||||
Then I should see "Short name" in the "Course overview" "block"
|
||||
Then I should see "Sort by short name" in the "Course overview" "block"
|
||||
And "[data-sort='shortname']" "css_element" in the "Course overview" "block" should be visible
|
||||
|
||||
Scenario: View inprogress courses with hide persistent functionality
|
||||
|
Loading…
x
Reference in New Issue
Block a user