Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
ee8e077a
Commit
ee8e077a
authored
Nov 06, 2013
by
Damyon Wiese
Browse files
Merge branch '42710-26' of
git://github.com/samhemelryk/moodle
parents
ac3831b4
05bce411
Changes
7
Hide whitespace changes
Inline
Side-by-side
course/classes/management_renderer.php
View file @
ee8e077a
...
...
@@ -337,48 +337,39 @@ class core_course_management_renderer extends plugin_renderer_base {
$form
.
=
html_writer
::
empty_tag
(
'input'
,
array
(
'type'
=>
'hidden'
,
'name'
=>
'currentcategoryid'
,
'value'
=>
$category
->
id
));
}
$form
.
=
html_writer
::
div
(
html_writer
::
span
(
get_string
(
'for'
),
''
,
array
(
'id'
=>
'selectsortby'
))
.
' '
.
html_writer
::
select
(
$selectoptions
,
'selectsortby'
,
''
,
array
(
''
=>
'choosedots'
),
array
(
'aria-labelledby'
=>
'selectsortby'
)
'selectedcategories'
,
false
)
);
$form
.
=
html_writer
::
div
(
html_writer
::
span
(
get_string
(
'sortcategoriesby'
),
''
,
array
(
'id'
=>
'resortselectedcategoriesby'
))
.
' '
.
html_writer
::
select
(
array
(
'name'
=>
get_string
(
'
re
sortbyname'
),
'idnumber'
=>
get_string
(
'
re
sortbyidnumber'
),
'name'
=>
get_string
(
'sort
categories
byname'
),
'idnumber'
=>
get_string
(
'sort
categories
byidnumber'
),
'none'
=>
get_string
(
'dontsortcategories'
)
),
'resortcategoriesby'
,
''
,
array
(
'none'
=>
'choosedots'
),
array
(
'aria-labelledby'
=>
'resortselectedcategoriesby'
)
'name'
,
false
)
);
$form
.
=
html_writer
::
div
(
html_writer
::
span
(
get_string
(
'sortcoursesby'
),
''
,
array
(
'id'
=>
'resortselectedcoursesby'
))
.
' '
.
html_writer
::
select
(
array
(
'fullname'
=>
get_string
(
'
re
sortbyfullname'
),
'shortname'
=>
get_string
(
'
re
sortbyshortname'
),
'idnumber'
=>
get_string
(
'
re
sortbyidnumber'
),
'fullname'
=>
get_string
(
'sort
courses
byfullname'
),
'shortname'
=>
get_string
(
'sort
courses
byshortname'
),
'idnumber'
=>
get_string
(
'sort
courses
byidnumber'
),
'none'
=>
get_string
(
'dontsortcourses'
)
),
'resortcoursesby'
,
''
,
array
(
'none'
=>
'choosedots'
),
array
(
'aria-labelledby'
=>
'resortselectedcoursesby'
)
'fullname'
,
false
)
);
$form
.
=
html_writer
::
empty_tag
(
'input'
,
array
(
'type'
=>
'submit'
,
'name'
=>
'bulksort'
,
'value'
=>
$strgo
));
$form
.
=
html_writer
::
empty_tag
(
'input'
,
array
(
'type'
=>
'submit'
,
'name'
=>
'bulksort'
,
'value'
=>
get_string
(
'sort'
)
));
$form
.
=
html_writer
::
end_div
();
$html
.
=
$this
->
detail_pair
(
get_string
(
'sorting'
),
...
...
@@ -398,7 +389,7 @@ class core_course_management_renderer extends plugin_renderer_base {
array
(
''
=>
'choosedots'
),
array
(
'aria-labelledby'
=>
'moveselectedcategoriesto'
)
);
$submit
=
array
(
'type'
=>
'submit'
,
'name'
=>
'bulkmovecategories'
,
'value'
=>
$strgo
);
$submit
=
array
(
'type'
=>
'submit'
,
'name'
=>
'bulkmovecategories'
,
'value'
=>
get_string
(
'move'
)
);
$html
.
=
$this
->
detail_pair
(
html_writer
::
span
(
get_string
(
'moveselectedcategoriesto'
),
''
,
array
(
'id'
=>
'moveselectedcategoriesto'
)),
$select
.
html_writer
::
empty_tag
(
'input'
,
$submit
)
...
...
@@ -680,7 +671,7 @@ class core_course_management_renderer extends plugin_renderer_base {
array
(
''
=>
'choosedots'
),
array
(
'aria-labelledby'
=>
'moveselectedcoursesto'
)
);
$submit
=
array
(
'type'
=>
'submit'
,
'name'
=>
'bulkmovecourses'
,
'value'
=>
get_string
(
'
go
'
));
$submit
=
array
(
'type'
=>
'submit'
,
'name'
=>
'bulkmovecourses'
,
'value'
=>
get_string
(
'
move
'
));
$html
.
=
$this
->
detail_pair
(
html_writer
::
span
(
get_string
(
'moveselectedcoursesto'
),
''
,
array
(
'id'
=>
'moveselectedcoursesto'
)),
$select
.
html_writer
::
empty_tag
(
'input'
,
$submit
)
...
...
course/tests/behat/category_resort.feature
View file @
ee8e077a
...
...
@@ -17,7 +17,7 @@ Feature: Test we can resort categories in the management interface.
And
I should see the
"Course categories"
management page
And
I select
"All categories"
from
"menuselectsortby"
And
I select
<sortby>
from
"menuresortcategoriesby"
And
I press
"
Go
"
And
I press
"
Sort
"
# Redirect.
And
I should see the
"Course categories"
management page
And
I should see category listing
<cat1>
before
<cat2>
...
...
@@ -25,8 +25,8 @@ Feature: Test we can resort categories in the management interface.
Examples
:
|
sortby
|
cat1
|
cat2
|
cat3
|
|
"
B
y
name"
|
"Applied
sciences"
|
"Extended
social
studies"
|
"Social
studies"
|
|
"
By
id
number"
|
"Extended
social
studies"
|
"Social
studies"
|
"Applied
sciences"
|
|
"
Sort
categories
b
y
name"
|
"Applied
sciences"
|
"Extended
social
studies"
|
"Social
studies"
|
|
"
Sort
categories
by
ID
number"
|
"Extended
social
studies"
|
"Social
studies"
|
"Applied
sciences"
|
Scenario Outline
:
Test bulk sorting current category.
Given the following "categories" exists
:
...
...
@@ -44,7 +44,7 @@ Feature: Test we can resort categories in the management interface.
And
I should see the
"Course categories and courses"
management page
And
I select
"This category"
from
"menuselectsortby"
And
I select
<sortby>
from
"menuresortcategoriesby"
And
I press
"
Go
"
And
I press
"
Sort
"
# Redirect.
And
I should see the
"Course categories and courses"
management page
And
I should see category listing
<cat1>
before
<cat2>
...
...
@@ -52,8 +52,8 @@ Feature: Test we can resort categories in the management interface.
Examples
:
|
sortby
|
cat1
|
cat2
|
cat3
|
|
"
B
y
name"
|
"Applied
sciences"
|
"Extended
social
studies"
|
"Social
studies"
|
|
"
By
id
number"
|
"Extended
social
studies"
|
"Social
studies"
|
"Applied
sciences"
|
|
"
Sort
categories
b
y
name"
|
"Applied
sciences"
|
"Extended
social
studies"
|
"Social
studies"
|
|
"
Sort
categories
by
ID
number"
|
"Extended
social
studies"
|
"Social
studies"
|
"Applied
sciences"
|
Scenario Outline
:
Test resorting subcategories.
Given the following "categories" exists
:
...
...
course/tests/behat/course_category_management_listing.feature
View file @
ee8e077a
...
...
@@ -247,7 +247,7 @@ Feature: Course category management interface performs as expected
And
I should see the
"Course categories"
management page
And
I select
"All categories"
from
"menuselectsortby"
And
I select
<sortby>
from
"menuresortcategoriesby"
And
I press
"
Go
"
And
I press
"
Sort
"
# Redirect.
And
I should see the
"Course categories"
management page
And
I should see category listing
<cat1>
before
<cat2>
...
...
@@ -255,8 +255,8 @@ Feature: Course category management interface performs as expected
Examples
:
|
sortby
|
cat1
|
cat2
|
cat3
|
|
"
B
y
name"
|
"Applied
sciences"
|
"Extended
social
studies"
|
"Social
studies"
|
|
"
By
id
number"
|
"Extended
social
studies"
|
"Social
studies"
|
"Applied
sciences"
|
|
"
Sort
categories
b
y
name"
|
"Applied
sciences"
|
"Extended
social
studies"
|
"Social
studies"
|
|
"
Sort
categories
by
ID
number"
|
"Extended
social
studies"
|
"Social
studies"
|
"Applied
sciences"
|
@javascript
Scenario Outline
:
Sub categories are displayed correctly when resorted
...
...
lang/en/moodle.php
View file @
ee8e077a
...
...
@@ -1479,18 +1479,12 @@ $string['resetstartdate'] = 'Reset start date';
$string
[
'resetstatus'
]
=
'Status'
;
$string
[
'resettask'
]
=
'Task'
;
$string
[
'resettodefaults'
]
=
'Reset to defaults'
;
$string
[
'resortcategories'
]
=
'Sort categories'
;
$string
[
'resortcategoriesbyname'
]
=
'Sort the top level categories by name'
;
$string
[
'resortcategoriesbyidnumber'
]
=
'Sort the top level categories by idnumber'
;
$string
[
'resortsubcategoriesbyname'
]
=
'Sort subcategories by name'
;
$string
[
'resortsubcategoriesbyidnumber'
]
=
'Sort subcategories by idnumber'
;
$string
[
'resortcourses'
]
=
'Sort courses'
;
$string
[
'resortcoursesbyname'
]
=
'Sort courses by name'
;
$string
[
'resortbyname'
]
=
'By name'
;
$string
[
'resortbyshortname'
]
=
'By shortname'
;
$string
[
'resortbyfullname'
]
=
'By fullname'
;
$string
[
'resortbyidnumber'
]
=
'By idnumber'
;
$string
[
'resortselectedcategoriesby'
]
=
'Sort subcategories of selected categories'
;
$string
[
'resource'
]
=
'Resource'
;
$string
[
'resourcedisplayauto'
]
=
'Automatic'
;
$string
[
'resourcedisplaydownload'
]
=
'Force download'
;
...
...
@@ -1682,8 +1676,11 @@ $string['sort'] = 'Sort';
$string
[
'sortby'
]
=
'Sort by'
;
$string
[
'sortbyx'
]
=
'Sort by {$a} ascending'
;
$string
[
'sortbyxreverse'
]
=
'Sort by {$a} descending'
;
$string
[
'sortcategoriesby'
]
=
'Sort categories by'
;
$string
[
'sortcoursesby'
]
=
'Sort courses by'
;
$string
[
'sortcategoriesbyname'
]
=
'Sort categories by name'
;
$string
[
'sortcategoriesbyidnumber'
]
=
'Sort categories by ID number'
;
$string
[
'sortcoursesbyfullname'
]
=
'Sort courses by full name'
;
$string
[
'sortcoursesbyshortname'
]
=
'Sort courses by short name'
;
$string
[
'sortcoursesbyidnumber'
]
=
'Sort courses by ID number'
;
$string
[
'sorting'
]
=
'Sorting'
;
$string
[
'sourcerole'
]
=
'Source role'
;
$string
[
'specifyname'
]
=
'You must specify a name.'
;
...
...
theme/base/style/course.css
View file @
ee8e077a
...
...
@@ -263,10 +263,12 @@ input.titleeditor { width: 330px; vertical-align: text-bottom; }
#course-category-listings
>
div
>
div
{
min-height
:
300px
;}
#course-category-listings
h3
{
margin
:
0
;
padding
:
0.6em
1em
0.5em
;
text-align
:
left
;
background-color
:
#f7f7f9
;
border-bottom
:
1px
solid
#e1e1e8
;}
#course-category-listings
h4
{
margin
:
1em
0
0
;
padding
:
0.6em
1em
0.5em
;
text-align
:
left
;}
.coursecat-management-header
.moodle-actionmenu
,
#course-category-listings
.moodle-actionmenu
{
white-space
:
nowrap
;}
#course-category-listings
.listing-actions
{
text-align
:
center
;
padding
:
0.4em
0.3em
0.3em
;}
#course-category-listings
.listing-actions
>
*
{
display
:
inline-block
;
line-height
:
2.2em
;}
#course-category-listings
.listing-actions
>
.moodle-actionmenu
{
display
:
inline-block
;}
.coursecat-management-header
.moodle-actionmenu
[
data-enhanced
]
.show
.menu
a
,
#course-category-listings
.listing-actions
>
.moodle-actionmenu
.menu
a
{
padding-left
:
1em
;}
#course-category-listings
.listing-actions
.iconsmall
{
margin-left
:
0.5em
;}
#course-category-listings
ul
.ml
{
list-style
:
none
;
margin
:
1em
0
;}
...
...
theme/bootstrapbase/less/moodle/course.less
View file @
ee8e077a
...
...
@@ -982,6 +982,12 @@ span.editinstructions {
vertical-align: baseline;
white-space: nowrap;
}
.moodle-actionmenu {
white-space:nowrap;
}
.moodle-actionmenu[data-enhanced].show .menu a {
padding-left:1em;
}
}
.course-being-dragged-proxy {
...
...
theme/bootstrapbase/style/moodle.css
View file @
ee8e077a
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment