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
f23bf851
Commit
f23bf851
authored
Dec 19, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added config to grader to hide averages of pset scores.
parent
a725bae3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
common/lib/xmodule/xmodule/course_module.py
+2
-1
common/lib/xmodule/xmodule/graders.py
+4
-2
No files found.
common/lib/xmodule/xmodule/course_module.py
View file @
f23bf851
...
...
@@ -100,7 +100,8 @@ class CourseDescriptor(SequenceDescriptor):
"""Parse the policy specified in policy_str, and save it"""
try
:
self
.
_grading_policy
=
load_grading_policy
(
policy_str
)
except
:
except
Exception
,
err
:
log
.
exception
(
'Failed to load grading policy:'
)
self
.
system
.
error_tracker
(
"Failed to load grading policy"
)
# Setting this to an empty dictionary will lead to errors when
# grading needs to happen, but should allow course staff to see
...
...
common/lib/xmodule/xmodule/graders.py
View file @
f23bf851
...
...
@@ -316,7 +316,7 @@ class AssignmentFormatGrader(CourseGrader):
min_count = 2 would produce the labels "Assignment 3", "Assignment 4"
"""
def
__init__
(
self
,
type
,
min_count
,
drop_count
,
category
=
None
,
section_type
=
None
,
short_label
=
None
,
show_only_average
=
False
,
starting_index
=
1
):
def
__init__
(
self
,
type
,
min_count
,
drop_count
,
category
=
None
,
section_type
=
None
,
short_label
=
None
,
show_only_average
=
False
,
hide_average
=
False
,
starting_index
=
1
):
self
.
type
=
type
self
.
min_count
=
min_count
self
.
drop_count
=
drop_count
...
...
@@ -325,6 +325,7 @@ class AssignmentFormatGrader(CourseGrader):
self
.
short_label
=
short_label
or
self
.
type
self
.
show_only_average
=
show_only_average
self
.
starting_index
=
starting_index
self
.
hide_average
=
hide_average
def
grade
(
self
,
grade_sheet
,
generate_random_scores
=
False
):
def
totalWithDrops
(
breakdown
,
drop_count
):
...
...
@@ -385,7 +386,8 @@ class AssignmentFormatGrader(CourseGrader):
if
self
.
show_only_average
:
breakdown
=
[]
breakdown
.
append
({
'percent'
:
total_percent
,
'label'
:
total_label
,
'detail'
:
total_detail
,
'category'
:
self
.
category
,
'prominent'
:
True
})
if
not
self
.
hide_average
:
breakdown
.
append
({
'percent'
:
total_percent
,
'label'
:
total_label
,
'detail'
:
total_detail
,
'category'
:
self
.
category
,
'prominent'
:
True
})
return
{
'percent'
:
total_percent
,
'section_breakdown'
:
breakdown
,
...
...
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