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
f51876da
Commit
f51876da
authored
Feb 08, 2013
by
Brian Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosmetic changes
parent
ab6f383b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
11 deletions
+8
-11
common/djangoapps/student/views.py
+3
-4
lms/djangoapps/courseware/models.py
+1
-0
lms/djangoapps/courseware/views.py
+4
-7
No files found.
common/djangoapps/student/views.py
View file @
f51876da
...
...
@@ -1166,10 +1166,9 @@ def test_center_login(request):
'ETDBTM'
:
'ADDDOUBLE'
,
}
time_accommodation_code
=
None
if
registration
.
get_accommodation_codes
():
for
code
in
registration
.
get_accommodation_codes
():
if
code
in
time_accommodation_mapping
:
time_accommodation_code
=
time_accommodation_mapping
[
code
]
for
code
in
registration
.
get_accommodation_codes
():
if
code
in
time_accommodation_mapping
:
time_accommodation_code
=
time_accommodation_mapping
[
code
]
# special, hard-coded client ID used by Pearson shell for testing:
if
client_candidate_id
==
"edX003671291147"
:
time_accommodation_code
=
'TESTING'
...
...
lms/djangoapps/courseware/models.py
View file @
f51876da
...
...
@@ -24,6 +24,7 @@ class StudentModule(models.Model):
MODULE_TYPES
=
((
'problem'
,
'problem'
),
(
'video'
,
'video'
),
(
'html'
,
'html'
),
(
'timelimit'
,
'timelimit'
),
)
## These three are the key for the object
module_type
=
models
.
CharField
(
max_length
=
32
,
choices
=
MODULE_TYPES
,
default
=
'problem'
,
db_index
=
True
)
...
...
lms/djangoapps/courseware/views.py
View file @
f51876da
...
...
@@ -174,8 +174,7 @@ def check_for_active_timelimit_module(request, course_id, course):
location
=
timelimit_module
.
location
# determine where to go when the timer expires:
if
'time_expired_redirect_url'
not
in
timelimit_descriptor
.
metadata
:
# TODO: provide a better error
raise
Http404
raise
Http404
(
"No {0} metadata at this location: {1} "
.
format
(
'time_expired_redirect_url'
,
location
))
time_expired_redirect_url
=
timelimit_descriptor
.
metadata
.
get
(
'time_expired_redirect_url'
)
context
[
'time_expired_redirect_url'
]
=
time_expired_redirect_url
# Fetch the end time (in GMT) as stored in the module when it was started.
...
...
@@ -197,8 +196,7 @@ def update_timelimit_module(user, course_id, student_module_cache, timelimit_des
context
=
{}
# determine where to go when the exam ends:
if
'time_expired_redirect_url'
not
in
timelimit_descriptor
.
metadata
:
# TODO: provide a better error
raise
Http404
raise
Http404
(
"No {0} metadata at this location: {1} "
.
format
(
'time_expired_redirect_url'
,
timelimit_module
.
location
))
time_expired_redirect_url
=
timelimit_descriptor
.
metadata
.
get
(
'time_expired_redirect_url'
)
context
[
'time_expired_redirect_url'
]
=
time_expired_redirect_url
...
...
@@ -206,8 +204,7 @@ def update_timelimit_module(user, course_id, student_module_cache, timelimit_des
if
not
timelimit_module
.
has_begun
:
# user has not started the exam, so start it now.
if
'duration'
not
in
timelimit_descriptor
.
metadata
:
# TODO: provide a better error
raise
Http404
raise
Http404
(
"No {0} metadata at this location: {1} "
.
format
(
'duration'
,
timelimit_module
.
location
))
# The user may have an accommodation that has been granted to them.
# This accommodation information should already be stored in the module's state.
duration
=
int
(
timelimit_descriptor
.
metadata
.
get
(
'duration'
))
...
...
@@ -295,7 +292,7 @@ def index(request, course_id, chapter=None, section=None,
instance_module
=
get_instance_module
(
course_id
,
request
.
user
,
course_module
,
student_module_cache
)
save_child_position
(
course_module
,
chapter
,
instance_module
)
else
:
raise
Http404
raise
Http404
(
'No chapter descriptor found with name {}'
.
format
(
chapter
))
chapter_module
=
course_module
.
get_child_by
(
lambda
m
:
m
.
url_name
==
chapter
)
if
chapter_module
is
None
:
...
...
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