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
05068f1b
Commit
05068f1b
authored
Apr 23, 2015
by
zubair-arbi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix reverification link in lms
ECOM-1437
parent
0b66dc4b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
lms/djangoapps/verify_student/services.py
+8
-7
lms/envs/common.py
+1
-1
requirements/edx/github.txt
+1
-1
No files found.
lms/djangoapps/verify_student/services.py
View file @
05068f1b
"""
Implement the Reverification XBlock "reverification" server
"""
from
opaque_keys.edx.keys
import
CourseKey
from
django.core.exceptions
import
ObjectDoesNotExist
from
django.core.urlresolvers
import
reverse
...
...
@@ -12,13 +13,13 @@ class ReverificationService(object):
"""
def
get_status
(
self
,
user_id
,
course_id
,
checkpoint_name
):
def
get_status
(
self
,
user_id
,
course_id
,
related_assessment
):
""" Check if the user has any verification attempt for this checkpoint and course_id
Args:
user_id(str): User Id string
course_id(str): A string of course_id
checkpoint_name
(str): Verification checkpoint name
related_assessment
(str): Verification checkpoint name
Returns:
Verification Status string if any attempt submitted by user else None
...
...
@@ -28,29 +29,29 @@ class ReverificationService(object):
checkpoint_status
=
VerificationStatus
.
objects
.
filter
(
user_id
=
user_id
,
checkpoint__course_id
=
course_key
,
checkpoint__checkpoint_name
=
checkpoint_name
checkpoint__checkpoint_name
=
related_assessment
)
.
latest
()
return
checkpoint_status
.
status
except
ObjectDoesNotExist
:
return
None
def
start_verification
(
self
,
course_id
,
checkpoint_name
,
item_id
):
def
start_verification
(
self
,
course_id
,
related_assessment
,
item_id
):
""" Get or create the verification checkpoint and return the re-verification link
Args:
course_id(str): A string of course_id
checkpoint_name
(str): Verification checkpoint name
related_assessment
(str): Verification checkpoint name
Returns:
Re-verification link
"""
course_key
=
CourseKey
.
from_string
(
course_id
)
VerificationCheckpoint
.
objects
.
get_or_create
(
course_id
=
course_key
,
checkpoint_name
=
checkpoint_name
)
VerificationCheckpoint
.
objects
.
get_or_create
(
course_id
=
course_key
,
checkpoint_name
=
related_assessment
)
re_verification_link
=
reverse
(
'verify_student_incourse_reverify'
,
args
=
(
unicode
(
course_key
),
unicode
(
checkpoint_name
),
unicode
(
related_assessment
),
unicode
(
item_id
)
)
)
...
...
lms/envs/common.py
View file @
05068f1b
...
...
@@ -2252,7 +2252,7 @@ ECOMMERCE_API_SIGNING_KEY = None
ECOMMERCE_API_TIMEOUT
=
5
# Reverification checkpoint name pattern
CHECKPOINT_PATTERN
=
r'(?P<checkpoint_name>[
\w
]+)'
CHECKPOINT_PATTERN
=
r'(?P<checkpoint_name>[
^/
]+)'
# For the fields override feature
# If using FEATURES['INDIVIDUAL_DUE_DATES'], you should add
...
...
requirements/edx/github.txt
View file @
05068f1b
...
...
@@ -43,7 +43,7 @@ git+https://github.com/mitocw/django-cas.git@60a5b8e5a62e63e0d5d224a87f0b489201a
git+https://github.com/edx/edx-lint.git@8bf82a32ecb8598c415413df66f5232ab8d974e9#egg=edx_lint==0.2.1
-e git+https://github.com/edx/xblock-utils.git@581ed636c862b286002bb9a3724cc883570eb54c#egg=xblock-utils
-e git+https://github.com/edx-solutions/xblock-google-drive.git@138e6fa0bf3a2013e904a085b9fed77dab7f3f21#egg=xblock-google-drive
-e git+https://github.com/edx/edx-reverification-block.git@
1b7902db20bcefe7bd0109f866f830deaaf8d7f7
#egg=edx-reverification-block
-e git+https://github.com/edx/edx-reverification-block.git@
5da515ef229e73a137d366beb05ea4aea5881960
#egg=edx-reverification-block
# Third Party XBlocks
-e git+https://github.com/mitodl/edx-sga@172a90fd2738f8142c10478356b2d9ed3e55334a#egg=edx-sga
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