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
e68e612e
Commit
e68e612e
authored
Jan 16, 2013
by
Brian Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return 404 in begin_exam_registration when course or exam are not valid
parent
c7f722da
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
common/djangoapps/student/views.py
+7
-4
No files found.
common/djangoapps/student/views.py
View file @
e68e612e
...
...
@@ -632,15 +632,18 @@ def begin_exam_registration(request, course_id):
user
=
request
.
user
try
:
course
=
(
course_from_id
(
course_id
)
)
course
=
course_from_id
(
course_id
)
except
ItemNotFoundError
:
# TODO: do more than just log!! The rest will fail, so we should fail right now.
log
.
error
(
"User {0} enrolled in non-existent course {1}"
.
format
(
user
.
username
,
course_id
))
log
.
error
(
"User {0} enrolled in non-existent course {1}"
.
format
(
user
.
username
,
course_id
))
raise
Http404
# get the exam to be registered for:
# (For now, we just assume there is one at most.)
# if there is no exam now (because someone bookmarked this stupid page),
# then return a 404:
exam_info
=
course
.
current_test_center_exam
if
exam_info
is
None
:
raise
Http404
# determine if the user is registered for this course:
registration
=
exam_registration_info
(
user
,
course
)
...
...
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