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
b60d6b63
Commit
b60d6b63
authored
Sep 15, 2012
by
Arjun Singh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try and find a run-specific syllabus before loading a course-specific syllabus
parent
06b9f0c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
lms/djangoapps/courseware/courses.py
+5
-1
No files found.
lms/djangoapps/courseware/courses.py
View file @
b60d6b63
...
...
@@ -195,7 +195,11 @@ def get_course_syllabus_section(course, section_key):
if
section_key
in
[
'syllabus'
,
'guest_syllabus'
]:
try
:
with
course
.
system
.
resources_fs
.
open
(
path
(
"syllabus"
)
/
section_key
+
".html"
)
as
htmlFile
:
fs
=
course
.
system
.
resources_fs
# first look for a run-specific version
dirs
=
[
path
(
"syllabus"
)
/
course
.
url_name
,
path
(
"syllabus"
)]
filepath
=
find_file
(
fs
,
dirs
,
section_key
+
".html"
)
with
fs
.
open
(
filepath
)
as
htmlFile
:
return
replace_urls
(
htmlFile
.
read
()
.
decode
(
'utf-8'
),
course
.
metadata
[
'data_dir'
])
except
ResourceNotFoundError
:
...
...
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