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
c47cdc7f
Commit
c47cdc7f
authored
Jul 09, 2012
by
Matthew Mongeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some path problems.
parent
3053caec
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
common/lib/xmodule/xmodule/course_module.py
+6
-1
lms/djangoapps/courseware/views.py
+1
-1
lms/templates/dashboard.html
+2
-2
lms/urls.py
+1
-1
No files found.
common/lib/xmodule/xmodule/course_module.py
View file @
c47cdc7f
...
@@ -18,6 +18,10 @@ class CourseDescriptor(SequenceDescriptor):
...
@@ -18,6 +18,10 @@ class CourseDescriptor(SequenceDescriptor):
def
title
(
self
):
def
title
(
self
):
self
.
metadata
[
'display_name'
]
self
.
metadata
[
'display_name'
]
@property
def
instructors
(
self
):
return
self
.
get_about_section
(
"instructors"
)
.
split
(
"
\n
"
)
def
get_about_section
(
self
,
section_key
):
def
get_about_section
(
self
,
section_key
):
"""
"""
This returns the snippet of html to be rendered on the course about page, given the key for the section.
This returns the snippet of html to be rendered on the course about page, given the key for the section.
...
@@ -41,8 +45,9 @@ class CourseDescriptor(SequenceDescriptor):
...
@@ -41,8 +45,9 @@ class CourseDescriptor(SequenceDescriptor):
# Many of these are stored as html files instead of some semantic markup. This can change without effecting
# Many of these are stored as html files instead of some semantic markup. This can change without effecting
# this interface when we find a good format for defining so many snippets of text/html.
# this interface when we find a good format for defining so many snippets of text/html.
# TODO: Remove number, instructors from this list
if
section_key
in
[
'short_description'
,
'description'
,
'key_dates'
,
'video'
,
'course_staff_short'
,
'course_staff_extended'
,
if
section_key
in
[
'short_description'
,
'description'
,
'key_dates'
,
'video'
,
'course_staff_short'
,
'course_staff_extended'
,
'requirements'
,
'syllabus'
,
'textbook'
,
'faq'
,
'more_info'
,
'number'
]:
'requirements'
,
'syllabus'
,
'textbook'
,
'faq'
,
'more_info'
,
'number'
,
'instructors'
]:
try
:
try
:
with
self
.
system
.
resources_fs
.
open
(
path
(
"about"
)
/
section_key
+
".html"
)
as
htmlFile
:
with
self
.
system
.
resources_fs
.
open
(
path
(
"about"
)
/
section_key
+
".html"
)
as
htmlFile
:
return
htmlFile
.
read
()
return
htmlFile
.
read
()
...
...
lms/djangoapps/courseware/views.py
View file @
c47cdc7f
...
@@ -257,4 +257,4 @@ def course_info(request, course_id):
...
@@ -257,4 +257,4 @@ def course_info(request, course_id):
except
KeyError
:
except
KeyError
:
raise
Http404
(
"Course not found"
)
raise
Http404
(
"Course not found"
)
return
render_to_response
(
'
portal/course_about
.html'
,
{
'csrf'
:
csrf_token
,
'course'
:
course
})
return
render_to_response
(
'
info
.html'
,
{
'csrf'
:
csrf_token
,
'course'
:
course
})
lms/templates/dashboard.html
View file @
c47cdc7f
...
@@ -48,9 +48,9 @@
...
@@ -48,9 +48,9 @@
</div>
</div>
<section
class=
"info"
>
<section
class=
"info"
>
<hgroup>
<hgroup>
<h2>
${course.
title
}
</h2>
<h2>
${course.
get_about_section("title")
}
</h2>
% for instructor in course.instructors:
% for instructor in course.instructors:
<h3>
${course.
institution
}
</h3>
<h3>
${course.
get_about_section('university')
}
</h3>
% endfor
% endfor
</hgroup>
</hgroup>
<div
class=
"edit"
>
options
</div>
<div
class=
"edit"
>
options
</div>
...
...
lms/urls.py
View file @
c47cdc7f
...
@@ -77,7 +77,7 @@ if settings.COURSEWARE_ENABLED:
...
@@ -77,7 +77,7 @@ if settings.COURSEWARE_ENABLED:
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/profile$'
,
'courseware.views.profile'
,
name
=
"profile"
),
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/profile$'
,
'courseware.views.profile'
,
name
=
"profile"
),
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/profile/(?P<student_id>[^/]*)/$'
,
'courseware.views.profile'
),
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/profile/(?P<student_id>[^/]*)/$'
,
'courseware.views.profile'
),
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/about$'
,
'
courseware
.views.course_info'
,
name
=
"about_course"
),
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/about$'
,
'
student
.views.course_info'
,
name
=
"about_course"
),
)
)
if
settings
.
ENABLE_MULTICOURSE
:
if
settings
.
ENABLE_MULTICOURSE
:
...
...
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