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
a5d861d2
Commit
a5d861d2
authored
Jul 03, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make course index page read from url for org, course, name
parent
10add566
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
5 deletions
+3
-5
cms/djangoapps/contentstore/views.py
+2
-5
cms/templates/course_index.html
+0
-0
cms/urls.py
+1
-0
No files found.
cms/djangoapps/contentstore/views.py
View file @
a5d861d2
...
@@ -9,14 +9,11 @@ from xmodule.modulestore.django import modulestore
...
@@ -9,14 +9,11 @@ from xmodule.modulestore.django import modulestore
@ensure_csrf_cookie
@ensure_csrf_cookie
def
index
(
request
):
def
course_index
(
request
,
org
,
course
,
name
):
# TODO (cpennington): These need to be read in from the active user
# TODO (cpennington): These need to be read in from the active user
org
=
'mit.edu'
course
=
'6002xs12'
name
=
'6.002_Spring_2012'
course
=
modulestore
()
.
get_item
([
'i4x'
,
org
,
course
,
'course'
,
name
])
course
=
modulestore
()
.
get_item
([
'i4x'
,
org
,
course
,
'course'
,
name
])
weeks
=
course
.
get_children
()
weeks
=
course
.
get_children
()
return
render_to_response
(
'index.html'
,
{
'weeks'
:
weeks
})
return
render_to_response
(
'
course_
index.html'
,
{
'weeks'
:
weeks
})
def
edit_item
(
request
):
def
edit_item
(
request
):
...
...
cms/templates/index.html
→
cms/templates/
course_
index.html
View file @
a5d861d2
File moved
cms/urls.py
View file @
a5d861d2
...
@@ -6,6 +6,7 @@ from django.conf.urls.defaults import patterns, url
...
@@ -6,6 +6,7 @@ from django.conf.urls.defaults import patterns, url
urlpatterns
=
patterns
(
''
,
urlpatterns
=
patterns
(
''
,
url
(
r'^$'
,
'contentstore.views.index'
,
name
=
'index'
),
url
(
r'^$'
,
'contentstore.views.index'
,
name
=
'index'
),
url
(
r'^(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<name>[^/]+)$'
,
'contentstore.views.course_index'
,
name
=
'course_index'
),
url
(
r'^edit_item$'
,
'contentstore.views.edit_item'
,
name
=
'edit_item'
),
url
(
r'^edit_item$'
,
'contentstore.views.edit_item'
,
name
=
'edit_item'
),
url
(
r'^save_item$'
,
'contentstore.views.save_item'
,
name
=
'save_item'
),
url
(
r'^save_item$'
,
'contentstore.views.save_item'
,
name
=
'save_item'
),
url
(
r'^temp_force_export$'
,
'contentstore.views.temp_force_export'
),
url
(
r'^temp_force_export$'
,
'contentstore.views.temp_force_export'
),
...
...
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