Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
e0471007
Commit
e0471007
authored
Aug 16, 2013
by
Giulio Gratta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed sort in HTML and instead added conditional to use subcategory titles as sort_key
parent
8cac4eba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
+2
-1
lms/djangoapps/django_comment_client/utils.py
+2
-0
lms/templates/discussion/_filter_dropdown.html
+0
-1
No files found.
lms/djangoapps/django_comment_client/utils.py
View file @
e0471007
...
@@ -129,6 +129,8 @@ def filter_unstarted_categories(category_map):
...
@@ -129,6 +129,8 @@ def filter_unstarted_categories(category_map):
def
sort_map_entries
(
category_map
):
def
sort_map_entries
(
category_map
):
things
=
[]
things
=
[]
for
title
,
entry
in
category_map
[
"entries"
]
.
items
():
for
title
,
entry
in
category_map
[
"entries"
]
.
items
():
if
entry
[
"sort_key"
]
==
None
:
entry
[
"sort_key"
]
=
title
things
.
append
((
title
,
entry
))
things
.
append
((
title
,
entry
))
for
title
,
category
in
category_map
[
"subcategories"
]
.
items
():
for
title
,
category
in
category_map
[
"subcategories"
]
.
items
():
things
.
append
((
title
,
category
))
things
.
append
((
title
,
category
))
...
...
lms/templates/discussion/_filter_dropdown.html
View file @
e0471007
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
<
%!
import
json
%
>
<
%!
import
json
%
>
<
%
def
name=
"render_dropdown(map)"
>
<
%
def
name=
"render_dropdown(map)"
>
${map["children"].sort()}
% for child in map["children"]:
% for child in map["children"]:
% if child in map["entries"]:
% if child in map["entries"]:
${render_entry(map["entries"], child)}
${render_entry(map["entries"], child)}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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