Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-proctoring
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-proctoring
Commits
d7641295
Commit
d7641295
authored
Aug 05, 2015
by
Afzal Wali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed the CoursewareService to InstructorService.
parent
80ed831c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
edx_proctoring/api.py
+3
-3
edx_proctoring/tests/test_api.py
+2
-2
edx_proctoring/tests/test_services.py
+2
-2
No files found.
edx_proctoring/api.py
View file @
d7641295
...
@@ -519,9 +519,9 @@ def remove_exam_attempt(attempt_id):
...
@@ -519,9 +519,9 @@ def remove_exam_attempt(attempt_id):
course_id
=
existing_attempt
.
proctored_exam
.
course_id
course_id
=
existing_attempt
.
proctored_exam
.
course_id
content_id
=
existing_attempt
.
proctored_exam
.
content_id
content_id
=
existing_attempt
.
proctored_exam
.
content_id
existing_attempt
.
delete_exam_attempt
()
existing_attempt
.
delete_exam_attempt
()
courseware_service
=
get_runtime_service
(
'courseware
'
)
instructor_service
=
get_runtime_service
(
'instructor
'
)
if
courseware
_service
:
if
instructor
_service
:
courseware
_service
.
delete_student_attempt
(
username
,
course_id
,
content_id
)
instructor
_service
.
delete_student_attempt
(
username
,
course_id
,
content_id
)
def
get_all_exams_for_course
(
course_id
):
def
get_all_exams_for_course
(
course_id
):
...
...
edx_proctoring/tests/test_api.py
View file @
d7641295
...
@@ -56,7 +56,7 @@ from .utils import (
...
@@ -56,7 +56,7 @@ from .utils import (
from
edx_proctoring.tests.test_services
import
(
from
edx_proctoring.tests.test_services
import
(
MockCreditService
,
MockCreditService
,
Mock
Courseware
Service
,
Mock
Instructor
Service
,
)
)
from
edx_proctoring.runtime
import
set_runtime_service
,
get_runtime_service
from
edx_proctoring.runtime
import
set_runtime_service
,
get_runtime_service
...
@@ -103,7 +103,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -103,7 +103,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
self
.
practice_exam_submitted_msg
=
'You have submitted this practice proctored exam'
self
.
practice_exam_submitted_msg
=
'You have submitted this practice proctored exam'
set_runtime_service
(
'credit'
,
MockCreditService
())
set_runtime_service
(
'credit'
,
MockCreditService
())
set_runtime_service
(
'
courseware'
,
MockCourseware
Service
())
set_runtime_service
(
'
instructor'
,
MockInstructor
Service
())
def
_create_proctored_exam
(
self
):
def
_create_proctored_exam
(
self
):
"""
"""
...
...
edx_proctoring/tests/test_services.py
View file @
d7641295
...
@@ -60,9 +60,9 @@ class MockCreditService(object):
...
@@ -60,9 +60,9 @@ class MockCreditService(object):
found
[
0
][
'status'
]
=
status
found
[
0
][
'status'
]
=
status
class
Mock
Courseware
Service
(
object
):
class
Mock
Instructor
Service
(
object
):
"""
"""
Simple mock of the
Courseware
Service
Simple mock of the
Instructor
Service
"""
"""
def
delete_student_attempt
(
self
,
student_identifier
,
course_id
,
content_id
):
# pylint: disable=unused-argument
def
delete_student_attempt
(
self
,
student_identifier
,
course_id
,
content_id
):
# pylint: disable=unused-argument
"""
"""
...
...
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