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
f88c1085
Commit
f88c1085
authored
Jan 23, 2014
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i18n xmodule/course_module.py
LMS-1747
parent
ef8671ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
+20
-6
cms/djangoapps/contentstore/views/tabs.py
+5
-0
common/lib/xmodule/xmodule/course_module.py
+15
-6
No files found.
cms/djangoapps/contentstore/views/tabs.py
View file @
f88c1085
...
...
@@ -35,10 +35,15 @@ def initialize_course_tabs(course):
# This logic is repeated in xmodule/modulestore/tests/factories.py
# so if you change anything here, you need to also change it there.
course
.
tabs
=
[
# Translators: "Courseware" is the title of the page where you access a course's videos and problems.
{
"type"
:
"courseware"
,
"name"
:
_
(
"Courseware"
)},
# Translators: "Course Info" is the name of the course's information and updates page
{
"type"
:
"course_info"
,
"name"
:
_
(
"Course Info"
)},
# Translators: "Discussion" is the title of the course forum page
{
"type"
:
"discussion"
,
"name"
:
_
(
"Discussion"
)},
# Translators: "Wiki" is the title of the course's wiki page
{
"type"
:
"wiki"
,
"name"
:
_
(
"Wiki"
)},
# Translators: "Progress" is the title of the student's grade information page
{
"type"
:
"progress"
,
"name"
:
_
(
"Progress"
)},
]
...
...
common/lib/xmodule/xmodule/course_module.py
View file @
f88c1085
...
...
@@ -392,6 +392,7 @@ class CourseDescriptor(CourseFields, SequenceDescriptor):
Expects the same arguments as XModuleDescriptor.__init__
"""
super
(
CourseDescriptor
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
_
=
self
.
runtime
.
service
(
self
,
"i18n"
)
.
ugettext
if
self
.
wiki_slug
is
None
:
if
isinstance
(
self
.
location
,
Location
):
...
...
@@ -419,8 +420,9 @@ class CourseDescriptor(CourseFields, SequenceDescriptor):
self
.
_grading_policy
=
{}
self
.
set_grading_policy
(
self
.
grading_policy
)
if
self
.
discussion_topics
==
{}:
self
.
discussion_topics
=
{
'General'
:
{
'id'
:
self
.
location
.
html_id
()}}
self
.
discussion_topics
=
{
_
(
'General'
)
:
{
'id'
:
self
.
location
.
html_id
()}}
# TODO check that this is still needed here and can't be by defaults.
if
not
self
.
tabs
:
...
...
@@ -428,7 +430,8 @@ class CourseDescriptor(CourseFields, SequenceDescriptor):
# first arg, since that's only used for dispatch
tabs
=
[]
tabs
.
append
({
'type'
:
'courseware'
})
tabs
.
append
({
'type'
:
'course_info'
,
'name'
:
'Course Info'
})
# Translators: "Course Info" is the name of the course's information and updates page
tabs
.
append
({
'type'
:
'course_info'
,
'name'
:
_
(
'Course Info'
)})
if
self
.
syllabus_present
:
tabs
.
append
({
'type'
:
'syllabus'
})
...
...
@@ -441,12 +444,15 @@ class CourseDescriptor(CourseFields, SequenceDescriptor):
if
self
.
discussion_link
:
tabs
.
append
({
'type'
:
'external_discussion'
,
'link'
:
self
.
discussion_link
})
else
:
tabs
.
append
({
'type'
:
'discussion'
,
'name'
:
'Discussion'
})
# Translators: "Discussion" is the title of the course forum page
tabs
.
append
({
'type'
:
'discussion'
,
'name'
:
_
(
'Discussion'
)})
tabs
.
append
({
'type'
:
'wiki'
,
'name'
:
'Wiki'
})
# Translators: "Wiki" is the title of the course's wiki page
tabs
.
append
({
'type'
:
'wiki'
,
'name'
:
_
(
'Wiki'
)})
if
not
self
.
hide_progress_tab
:
tabs
.
append
({
'type'
:
'progress'
,
'name'
:
'Progress'
})
# Translators: "Progress" is the title of the student's grade information page
tabs
.
append
({
'type'
:
'progress'
,
'name'
:
_
(
'Progress'
)})
self
.
tabs
=
tabs
...
...
@@ -770,7 +776,10 @@ class CourseDescriptor(CourseFields, SequenceDescriptor):
xmoduledescriptors
.
append
(
s
)
# The xmoduledescriptors included here are only the ones that have scores.
section_description
=
{
'section_descriptor'
:
s
,
'xmoduledescriptors'
:
filter
(
lambda
child
:
child
.
has_score
,
xmoduledescriptors
)}
section_description
=
{
'section_descriptor'
:
s
,
'xmoduledescriptors'
:
filter
(
lambda
child
:
child
.
has_score
,
xmoduledescriptors
)
}
section_format
=
s
.
format
if
s
.
format
is
not
None
else
''
graded_sections
[
section_format
]
=
graded_sections
.
get
(
section_format
,
[])
+
[
section_description
]
...
...
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