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
42e80553
Commit
42e80553
authored
Nov 13, 2012
by
Carlos Andrés Rocha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move courseware related templates to their own folder
Fix moved links
parent
d7246207
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
17 deletions
+17
-17
lms/djangoapps/courseware/views.py
+5
-5
lms/templates/courseware/accordion.html
+0
-0
lms/templates/courseware/course_about.html
+0
-0
lms/templates/courseware/courses.html
+5
-5
lms/templates/courseware/news.html
+2
-2
lms/templates/courseware/notifications.html
+5
-5
No files found.
lms/djangoapps/courseware/views.py
View file @
42e80553
...
...
@@ -78,7 +78,7 @@ def courses(request):
'''
universities
=
get_courses_by_university
(
request
.
user
,
domain
=
request
.
META
.
get
(
'HTTP_HOST'
))
return
render_to_response
(
"courses.html"
,
{
'universities'
:
universities
})
return
render_to_response
(
"course
ware/course
s.html"
,
{
'universities'
:
universities
})
def
render_accordion
(
request
,
course
,
chapter
,
section
):
...
...
@@ -97,7 +97,7 @@ def render_accordion(request, course, chapter, section):
context
=
dict
([(
'toc'
,
toc
),
(
'course_id'
,
course
.
id
),
(
'csrf'
,
csrf
(
request
)[
'csrf_token'
])]
+
template_imports
.
items
())
return
render_to_string
(
'accordion.html'
,
context
)
return
render_to_string
(
'
courseware/
accordion.html'
,
context
)
def
get_current_child
(
xmodule
):
...
...
@@ -407,7 +407,7 @@ def course_about(request, course_id):
show_courseware_link
=
(
has_access
(
request
.
user
,
course
,
'load'
)
or
settings
.
MITX_FEATURES
.
get
(
'ENABLE_LMS_MIGRATION'
))
return
render_to_response
(
'
portal
/course_about.html'
,
return
render_to_response
(
'
courseware
/course_about.html'
,
{
'course'
:
course
,
'registered'
:
registered
,
'course_target'
:
course_target
,
...
...
@@ -449,7 +449,7 @@ def render_notifications(request, course, notifications):
'get_discussion_title'
:
partial
(
get_discussion_title
,
request
=
request
,
course
=
course
),
'course'
:
course
,
}
return
render_to_string
(
'notifications.html'
,
context
)
return
render_to_string
(
'
courseware/
notifications.html'
,
context
)
@login_required
def
news
(
request
,
course_id
):
...
...
@@ -462,7 +462,7 @@ def news(request, course_id):
'content'
:
render_notifications
(
request
,
course
,
notifications
),
}
return
render_to_response
(
'news.html'
,
context
)
return
render_to_response
(
'
courseware/
news.html'
,
context
)
@login_required
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
...
...
lms/templates/accordion.html
→
lms/templates/
courseware/
accordion.html
View file @
42e80553
File moved
lms/templates/
portal
/course_about.html
→
lms/templates/
courseware
/course_about.html
View file @
42e80553
File moved
lms/templates/courses.html
→
lms/templates/course
ware/course
s.html
View file @
42e80553
<
%
inherit
file=
"main.html"
/>
<
%
inherit
file=
"
../
main.html"
/>
<
%
namespace
name=
'static'
file=
'static_content.html'
/>
<
%
namespace
name=
'static'
file=
'
../
static_content.html'
/>
<
%
block
name=
"title"
><title>
Courses
</title></
%
block>
...
...
@@ -22,17 +22,17 @@
<section
class=
"courses"
>
<section
class=
'university-column'
>
%for course in universities['MITx']:
<
%
include
file=
"course.html"
args=
"course=course"
/>
<
%
include
file=
"
../
course.html"
args=
"course=course"
/>
%endfor
</section>
<section
class=
'university-column'
>
%for course in universities['HarvardX']:
<
%
include
file=
"course.html"
args=
"course=course"
/>
<
%
include
file=
"
../
course.html"
args=
"course=course"
/>
%endfor
</section>
<section
class=
'university-column last'
>
%for course in universities['BerkeleyX']:
<
%
include
file=
"course.html"
args=
"course=course"
/>
<
%
include
file=
"
../
course.html"
args=
"course=course"
/>
%endfor
</section>
</section>
...
...
lms/templates/news.html
→
lms/templates/
courseware/
news.html
View file @
42e80553
<
%
inherit
file=
"main.html"
/>
<
%
namespace
name=
'static'
file=
'static_content.html'
/>
<
%
namespace
name=
'static'
file=
'
../
static_content.html'
/>
<
%
block
name=
"bodyclass"
>
courseware news
</
%
block>
<
%
block
name=
"title"
><title>
News – MITx 6.002x
</title></
%
block>
...
...
@@ -10,7 +10,7 @@
<
%
block
name=
"js_extra"
>
</
%
block>
<
%
include
file=
"
/courseware/
course_navigation.html"
args=
"active_page='news'"
/>
<
%
include
file=
"course_navigation.html"
args=
"active_page='news'"
/>
<section
class=
"container"
>
<div
class=
"course-wrapper"
>
...
...
lms/templates/notifications.html
→
lms/templates/
courseware/
notifications.html
View file @
42e80553
...
...
@@ -5,7 +5,7 @@ def url_for_thread(discussion_id, thread_id):
return
reverse
('
django_comment_client
.
forum
.
views
.
single_thread
',
args=
[course.id,
discussion_id
,
thread_id
])
%
>
<
%
<
%
def
url_for_comment
(
discussion_id
,
thread_id
,
comment_id
)
:
return
url_for_thread
(
discussion_id
,
thread_id
)
+
"#"
+
comment_id
%
>
...
...
@@ -15,7 +15,7 @@ def url_for_discussion(discussion_id):
return
reverse
('
django_comment_client
.
forum
.
views
.
forum_form_discussion
',
args=
[course.id,
discussion_id
])
%
>
<
%
<
%
def
discussion_title
(
discussion_id
)
:
return
get_discussion_title
(
discussion_id=
discussion_id)
%
>
...
...
@@ -59,18 +59,18 @@ def url_for_user(user_id): #TODO
<
%
def
name=
"render_notification(notification)"
>
<div
class=
"notification"
>
% if notification['notification_type'] == 'post_reply':
${render_user_link(notification)} posted a ${render_comment_link(notification)}
${render_user_link(notification)} posted a ${render_comment_link(notification)}
to the thread ${render_thread_link(notification)} in discussion ${render_discussion_link(notification)}
% elif notification['notification_type'] == 'post_topic':
${render_user_link(notification)} posted a new thread ${render_thread_link(notification)}
in discussion ${render_discussion_link(notification)}
% elif notification['notification_type'] == 'at_user':
${render_user(info)} mentioned you in
${render_user(info)} mentioned you in
% if notification['info']['content_type'] == 'thread':
the thread ${render_thread_link(notification)}
in discussion ${render_discussion_link(notification)}
% else:
${render_comment_link(notification)}
${render_comment_link(notification)}
to the thread ${render_thread_link(notification)} in discussion ${render_discussion_link(notification)}
% endif
% endif
...
...
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