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
c17ba15f
Commit
c17ba15f
authored
Nov 25, 2014
by
Jonathan Piacenti
Committed by
E. Kolpakov
Jan 12, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made empty course url the 'home' url instead.
parent
4d825106
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
30 deletions
+6
-30
cms/djangoapps/contentstore/views/course.py
+4
-2
cms/templates/index.html
+1
-28
cms/urls.py
+1
-0
No files found.
cms/djangoapps/contentstore/views/course.py
View file @
c17ba15f
"""
Views related to operations on course objects
"""
from
django.shortcuts
import
redirect
import
json
import
random
import
string
# pylint: disable=deprecated-module
...
...
@@ -71,7 +72,8 @@ from microsite_configuration import microsite
from
xmodule.course_module
import
CourseFields
__all__
=
[
'course_info_handler'
,
'course_handler'
,
'course_info_update_handler'
,
__all__
=
[
'course_info_handler'
,
'course_handler'
,
'course_listing'
,
'course_info_update_handler'
,
'course_rerun_handler'
,
'settings_handler'
,
'grading_handler'
,
...
...
@@ -230,7 +232,7 @@ def course_handler(request, course_key_string=None):
return
HttpResponseBadRequest
()
elif
request
.
method
==
'GET'
:
# assume html
if
course_key_string
is
None
:
return
course_listing
(
request
)
return
redirect
(
reverse
(
"home"
)
)
else
:
return
course_index
(
request
,
CourseKey
.
from_string
(
course_key_string
))
else
:
...
...
cms/templates/index.html
View file @
c17ba15f
...
...
@@ -14,7 +14,7 @@
<
%
block
name=
"content"
>
<div
class=
"wrapper-mast wrapper"
>
<header
class=
"mast has-actions"
>
<h1
class=
"page-header"
>
${_("
My Courses
")}
</h1>
<h1
class=
"page-header"
>
${_("
Studio Home
")}
</h1>
% if user.is_active:
<nav
class=
"nav-actions"
>
...
...
@@ -43,33 +43,6 @@
<section
class=
"content"
>
<article
class=
"content-primary"
role=
"main"
>
<div
class=
"introduction"
>
<h2
class=
"title"
>
${_("Welcome, {0}!").format(user.username)}
</h2>
%if len(courses) > 0 or len(libraries) > 0:
<div
class=
"copy"
>
<p>
%if libraries_enabled:
${_("Here are all of the courses and librariess you currently have access to in {studio_name}:").format(studio_name=settings.STUDIO_SHORT_NAME)}
%else:
${_("Here are all of the courses you currently have access to in {studio_name}:").format(studio_name=settings.STUDIO_SHORT_NAME)}
%endif
</p>
</div>
%else:
<div
class=
"copy"
>
<p>
%if libraries_enabled:
${_("You currently aren't associated with any {studio_name} Courses and Libraries").format(studio_name=settings.STUDIO_SHORT_NAME)}
%else:
${_("You currently aren't associated with any {studio_name} Courses.").format(studio_name=settings.STUDIO_SHORT_NAME)}
%endif
</p>
</div>
%endif
</div>
% if course_creator_status=='granted':
<div
class=
"wrapper-create-element wrapper-create-course"
>
<form
class=
"form-create create-course course-info"
id=
"create-course-form"
name=
"create-course-form"
>
...
...
cms/urls.py
View file @
c17ba15f
...
...
@@ -77,6 +77,7 @@ urlpatterns += patterns(
r'^course_info_update/{}/(?P<provided_id>\d+)?$'
.
format
(
settings
.
COURSE_KEY_PATTERN
),
'course_info_update_handler'
),
url
(
r'^home/$'
,
'course_listing'
,
name
=
'home'
),
url
(
r'^course/{}?$'
.
format
(
settings
.
COURSE_KEY_PATTERN
),
'course_handler'
,
name
=
'course_handler'
),
url
(
r'^course_notifications/{}/(?P<action_state_id>\d+)?$'
.
format
(
settings
.
COURSE_KEY_PATTERN
),
'course_notifications_handler'
),
url
(
r'^course_rerun/{}$'
.
format
(
settings
.
COURSE_KEY_PATTERN
),
'course_rerun_handler'
,
name
=
'course_rerun_handler'
),
...
...
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