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
410cc166
Commit
410cc166
authored
Aug 07, 2017
by
Tyler Hallada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix python unit tests
parent
01a4f9af
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
lms/djangoapps/courseware/tests/test_module_render.py
+6
-1
lms/djangoapps/grades/new/subsection_grade.py
+2
-1
No files found.
lms/djangoapps/courseware/tests/test_module_render.py
View file @
410cc166
...
...
@@ -18,7 +18,7 @@ from django.test.client import RequestFactory
from
django.test.utils
import
override_settings
from
edx_proctoring.api
import
create_exam
,
create_exam_attempt
,
update_attempt_status
from
edx_proctoring.runtime
import
set_runtime_service
from
edx_proctoring.tests.test_services
import
MockCreditService
from
edx_proctoring.tests.test_services
import
MockCreditService
,
MockGradesService
from
freezegun
import
freeze_time
from
milestones.tests.utils
import
MilestonesTestCaseMixin
from
mock
import
MagicMock
,
Mock
,
patch
...
...
@@ -995,6 +995,11 @@ class TestProctoringRendering(SharedModuleStoreTestCase):
MockCreditService
(
enrollment_mode
=
enrollment_mode
)
)
set_runtime_service
(
'grades'
,
MockGradesService
()
)
exam_id
=
create_exam
(
course_id
=
unicode
(
self
.
course_key
),
content_id
=
unicode
(
sequence
.
location
),
...
...
lms/djangoapps/grades/new/subsection_grade.py
View file @
410cc166
...
...
@@ -36,6 +36,8 @@ class SubsectionGradeBase(object):
self
.
graded_total
=
None
# aggregated grade for all graded problems
self
.
all_total
=
None
# aggregated grade for all problems, regardless of whether they are graded
self
.
override
=
None
@property
def
attempted
(
self
):
"""
...
...
@@ -108,7 +110,6 @@ class SubsectionGrade(SubsectionGradeBase):
self
.
_compute_block_score
(
descendant_key
,
course_structure
,
submissions_scores
,
csm_scores
)
self
.
all_total
,
self
.
graded_total
=
graders
.
aggregate_scores
(
self
.
problem_scores
.
values
())
self
.
override
=
None
self
.
_log_event
(
log
.
debug
,
u"init_from_structure"
,
student
)
return
self
...
...
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