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
1b2aa454
Commit
1b2aa454
authored
Jan 13, 2014
by
Jason Bau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add FAQ link to course_about error msg
use double-quotes, not single
parent
6560c4fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
lms/templates/courseware/course_about.html
+11
-4
lms/urls.py
+1
-1
No files found.
lms/templates/courseware/course_about.html
View file @
1b2aa454
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
from
courseware
.
courses
import
course_image_url
,
get_course_about_section
from
courseware
.
courses
import
course_image_url
,
get_course_about_section
from
courseware
.
access
import
has_access
from
courseware
.
access
import
has_access
from
django
.
conf
import
settings
from
django
.
conf
import
settings
from
edxmako
.
shortcuts
import
marketing_link
if
settings
.
FEATURES
.
get
('
ENABLE_SHOPPING_CART
')
:
if
settings
.
FEATURES
.
get
('
ENABLE_SHOPPING_CART
')
:
cart_link =
reverse('shoppingcart.views.show_cart')
cart_link =
reverse('shoppingcart.views.show_cart')
...
@@ -58,18 +59,24 @@
...
@@ -58,18 +59,24 @@
##
making
the
conditional
around
this
entire
JS
block
for
sanity
##
making
the
conditional
around
this
entire
JS
block
for
sanity
%
if
settings
.
FEATURES
.
get
(
'RESTRICT_ENROLL_BY_REG_METHOD'
)
and
course
.
enrollment_domain
:
%
if
settings
.
FEATURES
.
get
(
'RESTRICT_ENROLL_BY_REG_METHOD'
)
and
course
.
enrollment_domain
:
<%
perms_error
=
_
(
'The currently logged-in user account does not have permission to enroll in this course. '
'You may need to {start_logout_tag}log out{end_tag} then try the register button again. '
'Please visit the {start_help_tag}help page{end_tag} for a possible solution.'
).
format
(
start_help_tag
=
"<a href='{url}'>"
.
format
(
url
=
marketing_link
(
'FAQ'
)),
end_tag
=
'</a>'
,
start_logout_tag
=
"<a href='{url}'>"
.
format
(
url
=
reverse
(
'logout'
))
)
%>
$
(
'#class_enroll_form'
).
on
(
'ajax:complete'
,
function
(
event
,
xhr
)
{
$
(
'#class_enroll_form'
).
on
(
'ajax:complete'
,
function
(
event
,
xhr
)
{
if
(
xhr
.
status
==
200
)
{
if
(
xhr
.
status
==
200
)
{
location
.
href
=
"${reverse('dashboard')}"
;
location
.
href
=
"${reverse('dashboard')}"
;
}
else
if
(
xhr
.
status
==
403
)
{
}
else
if
(
xhr
.
status
==
403
)
{
location
.
href
=
"${reverse('course-specific-register', args=[course.id])}?course_id=${course.id}&enrollment_action=enroll"
;
location
.
href
=
"${reverse('course-specific-register', args=[course.id])}?course_id=${course.id}&enrollment_action=enroll"
;
}
else
if
(
xhr
.
status
==
400
)
{
//This means the user did not have permission
}
else
if
(
xhr
.
status
==
400
)
{
//This means the user did not have permission
$
(
'#register_error'
).
html
(
'This course has restricted enrollment. Sorry, you do not have permission to enroll.<br />'
+
$
(
'#register_error'
).
html
(
"${perms_error}"
).
css
(
"display"
,
"block"
);
'You may need to log out and re-login with a university account, such as WebAuth'
).
css
(
"display"
,
"block"
);
}
else
{
}
else
{
$
(
'#register_error'
).
html
(
$
(
'#register_error'
).
html
(
(
xhr
.
responseText
?
xhr
.
responseText
:
'An error occurred. Please try again later.'
)
(
xhr
.
responseText
?
xhr
.
responseText
:
"${_("
An
error
occurred
.
Please
try
again
later
.
")}"
)
).
css
(
"display"
,
"block"
);
).
css
(
"display"
,
"block"
);
}
}
});
});
...
...
lms/urls.py
View file @
1b2aa454
...
@@ -128,7 +128,7 @@ for key, value in settings.MKTG_URL_LINK_MAP.items():
...
@@ -128,7 +128,7 @@ for key, value in settings.MKTG_URL_LINK_MAP.items():
continue
continue
# These urls are enabled separately
# These urls are enabled separately
if
key
==
"ROOT"
or
key
==
"COURSES"
or
key
==
"FAQ"
:
if
key
==
"ROOT"
or
key
==
"COURSES"
:
continue
continue
# Make the assumptions that the templates are all in the same dir
# Make the assumptions that the templates are all in the same dir
...
...
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