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
3d61c629
Commit
3d61c629
authored
May 20, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stubbed out textbooks index page
parent
cc4e01b4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
1 deletions
+43
-1
cms/djangoapps/contentstore/views/course.py
+16
-1
cms/static/sass/elements/_header.scss
+1
-0
cms/templates/textbooks.html
+21
-0
cms/templates/widgets/header.html
+3
-0
cms/urls.py
+2
-0
No files found.
cms/djangoapps/contentstore/views/course.py
View file @
3d61c629
...
...
@@ -44,7 +44,7 @@ __all__ = ['course_index', 'create_new_course', 'course_info',
'course_config_advanced_page'
,
'course_settings_updates'
,
'course_grader_updates'
,
'course_advanced_updates'
]
'course_advanced_updates'
,
'textbook_index'
]
@login_required
...
...
@@ -411,3 +411,18 @@ def course_advanced_updates(request, org, course, name):
return
HttpResponseBadRequest
(
"Incorrect setting format. "
+
str
(
e
),
content_type
=
"text/plain"
)
return
HttpResponse
(
response_json
,
mimetype
=
"application/json"
)
@login_required
@ensure_csrf_cookie
def
textbook_index
(
request
,
org
,
course
,
name
):
"""
Display an editable textbook overview.
org, course, name: Attributes of the Location for the item to edit
"""
location
=
get_location_and_verify_access
(
request
,
org
,
course
,
name
)
course
=
modulestore
()
.
get_item
(
location
,
depth
=
3
)
return
render_to_response
(
'textbooks.html'
,
{
'context_course'
:
course
,
})
cms/static/sass/elements/_header.scss
View file @
3d61c629
...
...
@@ -349,6 +349,7 @@ body.course.outline .nav-course-courseware-outline,
body
.course.updates
.nav-course-courseware-updates
,
body
.course.pages
.nav-course-courseware-pages
,
body
.course.uploads
.nav-course-courseware-uploads
,
body
.course.textbooks
.nav-course-courseware-textbooks
,
//
course
settings
body
.course.schedule
.nav-course-settings
.title
,
...
...
cms/templates/textbooks.html
0 → 100644
View file @
3d61c629
<
%
inherit
file=
"base.html"
/>
<
%
block
name=
"title"
>
Textbooks
</
%
block>
<
%
block
name=
"bodyclass"
>
is-signedin course textbooks
</
%
block>
<
%
block
name=
"content"
>
<div
class=
"wrapper-mast wrapper"
>
<header
class=
"mast has-actions has-subtitle"
>
<h1
class=
"page-header"
>
<small
class=
"subtitle"
>
Course Content
</small>
<span
class=
"sr"
>
>
</span>
Textbooks
</h1>
</header>
</div>
<div
class=
"main-wrapper"
>
<div
class=
"inner-wrapper"
>
I'm a stub!
</div>
</div>
</
%
block>
cms/templates/widgets/header.html
View file @
3d61c629
...
...
@@ -37,6 +37,9 @@
<li
class=
"nav-item nav-course-courseware-uploads"
>
<a
href=
"${reverse('asset_index', kwargs=dict(org=ctx_loc.org, course=ctx_loc.course, name=ctx_loc.name))}"
>
Files
&
Uploads
</a>
</li>
<li
class=
"nav-item nav-course-courseware-textbooks"
>
<a
href=
"${reverse('textbook_index', kwargs=dict(org=ctx_loc.org, course=ctx_loc.course, name=ctx_loc.name))}"
>
Textbooks
</a>
</li>
</ul>
</div>
</div>
...
...
cms/urls.py
View file @
3d61c629
...
...
@@ -81,6 +81,8 @@ urlpatterns = ('', # nopep8
'contentstore.views.asset_index'
,
name
=
'asset_index'
),
url
(
r'^(?P<org>[^/]+)/(?P<course>[^/]+)/assets/(?P<name>[^/]+)/remove$'
,
'contentstore.views.assets.remove_asset'
,
name
=
'remove_asset'
),
url
(
r'^(?P<org>[^/]+)/(?P<course>[^/]+)/textbooks/(?P<name>[^/]+)$'
,
'contentstore.views.textbook_index'
,
name
=
'textbook_index'
),
# this is a generic method to return the data/metadata associated with a xmodule
url
(
r'^module_info/(?P<module_location>.*)$'
,
...
...
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