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
f2ae8591
Commit
f2ae8591
authored
May 14, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Starting adding "grade cutoffs", defining percentages in the course settings.
parent
e4d715e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletions
+14
-1
djangoapps/courseware/global_course_settings.py
+2
-0
djangoapps/courseware/grades.py
+12
-1
No files found.
djangoapps/courseware/global_course_settings.py
View file @
f2ae8591
...
...
@@ -26,3 +26,5 @@ GRADER = [
'weight'
:
0.4
,
}
]
GRADE_CUTOFFS
=
{
'A'
:
0.87
,
'B'
:
0.7
,
'C'
:
0.6
}
djangoapps/courseware/grades.py
View file @
f2ae8591
...
...
@@ -18,6 +18,8 @@ def grade_sheet(student):
problems, and is good for displaying a course summary with due dates, etc.
- grade_summary is the output from the course grader. More information on the format is in the docstring for CourseGrader.
- grade is a letter grade, either 'A', 'B', 'C', or None
"""
dom
=
content_parser
.
course_file
(
student
)
course
=
dom
.
xpath
(
'//course/@name'
)[
0
]
...
...
@@ -85,8 +87,17 @@ def grade_sheet(student):
grader
=
course_settings
.
GRADER
grade_summary
=
grader
.
grade
(
totaled_scores
)
letter_grade
=
None
for
possible_grade
in
[
'A'
,
'B'
,
'C'
]:
if
grade_summary
[
'percent'
]
>=
course_settings
.
GRADE_CUTOFFS
[
possible_grade
]:
letter_grade
=
possible_grade
break
_log
.
debug
(
"Final grade: "
+
str
(
letter_grade
))
return
{
'courseware_summary'
:
chapters
,
'grade_summary'
:
grade_summary
}
'grade_summary'
:
grade_summary
,
'grade'
:
letter_grade
}
def
aggregate_scores
(
scores
,
section_name
=
"summary"
):
total_correct_graded
=
sum
(
score
.
earned
for
score
in
scores
if
score
.
graded
)
...
...
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