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
588f115b
Commit
588f115b
authored
Jul 18, 2012
by
David Ormsbee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for optional end_date, effort, and prerequisites info on course_about
parent
23460730
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
common/lib/xmodule/xmodule/course_module.py
+2
-1
lms/templates/portal/course_about.html
+15
-2
No files found.
common/lib/xmodule/xmodule/course_module.py
View file @
588f115b
...
...
@@ -85,7 +85,8 @@ class CourseDescriptor(SequenceDescriptor):
# TODO: Remove number, instructors from this list
if
section_key
in
[
'short_description'
,
'description'
,
'key_dates'
,
'video'
,
'course_staff_short'
,
'course_staff_extended'
,
'requirements'
,
'syllabus'
,
'textbook'
,
'faq'
,
'more_info'
,
'number'
,
'instructors'
,
'overview'
]:
'requirements'
,
'syllabus'
,
'textbook'
,
'faq'
,
'more_info'
,
'number'
,
'instructors'
,
'overview'
,
'effort'
,
'end_date'
,
'prerequisites'
]:
try
:
with
self
.
system
.
resources_fs
.
open
(
path
(
"about"
)
/
section_key
+
".html"
)
as
htmlFile
:
return
htmlFile
.
read
()
.
decode
(
'utf-8'
)
...
...
lms/templates/portal/course_about.html
View file @
588f115b
...
...
@@ -72,10 +72,23 @@
</header>
<ol
class=
"important-dates"
>
<li><div
class=
"icon number-icon"
></div><p>
Course Number
</p><span
class=
"course-number"
>
${course.number}
</span></li>
<li><div
class=
"icon start-icon"
></div><p>
Classes Start
</p><span
class=
"start-date"
>
${course.start_date_text}
</span></li>
##
<li><div
class=
"icon final-icon"
></div><p>
Final Exam
</p><span
class=
"final-date"
>
12/09/12
</span></li>
## End date should come from course.xml, but this is a quick hack
% if course.get_about_section("end_date"):
<li><div
class=
"icon final-icon"
></div><p>
Classes End
</p><span
class=
"final-date"
>
${course.get_about_section("end_date")}
</span></li>
% endif
% if course.get_about_section("effort"):
<li><div
class=
"icon"
></div><p>
Estimated Effort
</p><span
class=
"start-date"
>
${course.get_about_section("effort")}
</span></li>
% endif
% if course.get_about_section("prerequisites"):
<li><div
class=
"icon"
></div><p>
Prerequisites
</p><span
class=
"start-date"
>
${course.get_about_section("prerequisites")}
</span></li>
% endif
##
<li><div
class=
"icon length-icon"
></div><p>
Course Length
</p><span
class=
"course-length"
>
15 weeks
</span></li>
<li><div
class=
"icon number-icon"
></div><p>
Course Number
</p><span
class=
"course-number"
>
${course.number}
</span></li>
</ol>
</section>
</section>
...
...
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