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
de5fa56b
Commit
de5fa56b
authored
Mar 31, 2013
by
ichuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add dump of description of grading configuration to instructor dashboard
parent
24e64e39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
lms/djangoapps/instructor/views.py
+51
-0
lms/templates/courseware/instructor_dashboard.html
+1
-0
No files found.
lms/djangoapps/instructor/views.py
View file @
de5fa56b
...
...
@@ -208,6 +208,10 @@ def instructor_dashboard(request, course_id):
track
.
views
.
server_track
(
request
,
'dump-answer-dist-csv'
,
{},
page
=
'idashboard'
)
return
return_csv
(
'answer_dist_{0}.csv'
.
format
(
course_id
),
get_answers_distribution
(
request
,
course_id
))
elif
'Dump description of graded assignments configuration'
in
action
:
track
.
views
.
server_track
(
request
,
action
,
{},
page
=
'idashboard'
)
msg
+=
dump_grading_context
(
course
)
elif
"Reset student's attempts"
in
action
or
"Delete student state for problem"
in
action
:
# get the form data
unique_student_identifier
=
request
.
POST
.
get
(
'unique_student_identifier'
,
''
)
...
...
@@ -1120,3 +1124,50 @@ def compute_course_stats(course):
walk
(
course
)
stats
=
dict
(
counts
)
# number of each kind of module
return
stats
def
dump_grading_context
(
course
):
'''
Dump information about course grading context (eg which problems are graded in what assignments)
Very useful for debugging grading_policy.json and policy.json
'''
msg
=
"-----------------------------------------------------------------------------
\n
"
msg
+=
"Course grader:
\n
"
msg
+=
'
%
s
\n
'
%
course
.
grader
.
__class__
graders
=
{}
if
'WeightedSubsectionsGrader'
in
str
(
course
.
grader
.
__class__
):
msg
+=
'
\n
'
msg
+=
"Graded sections:
\n
"
for
subgrader
,
category
,
weight
in
course
.
grader
.
sections
:
msg
+=
" subgrader=
%
s, type=
%
s, category=
%
s, weight=
%
s
\n
"
%
(
subgrader
.
__class__
,
subgrader
.
type
,
category
,
weight
)
subgrader
.
index
=
1
graders
[
subgrader
.
type
]
=
subgrader
msg
+=
"-----------------------------------------------------------------------------
\n
"
msg
+=
"Listing grading context for course
%
s
\n
"
%
course
.
id
gc
=
course
.
grading_context
msg
+=
"graded sections:
\n
"
msg
+=
'
%
s
\n
'
%
gc
[
'graded_sections'
]
.
keys
()
for
(
gs
,
gsvals
)
in
gc
[
'graded_sections'
]
.
items
():
msg
+=
"--> Section
%
s:
\n
"
%
(
gs
)
for
sec
in
gsvals
:
s
=
sec
[
'section_descriptor'
]
format
=
getattr
(
s
,
'format'
,
None
)
aname
=
''
if
format
in
graders
:
g
=
graders
[
format
]
aname
=
'
%
s
%02
d'
%
(
g
.
short_label
,
g
.
index
)
g
.
index
+=
1
elif
s
.
display_name
in
graders
:
g
=
graders
[
s
.
display_name
]
aname
=
'
%
s'
%
g
.
short_label
notes
=
''
if
getattr
(
s
,
'score_by_attempt'
,
False
):
notes
=
', score by attempt!'
msg
+=
"
%
s (format=
%
s, Assignment=
%
s
%
s)
\n
"
%
(
s
.
display_name
,
format
,
aname
,
notes
)
msg
+=
"all descriptors:
\n
"
msg
+=
"length=
%
d
\n
"
%
len
(
gc
[
'all_descriptors'
])
msg
=
'<pre>
%
s</pre>'
%
msg
.
replace
(
'<'
,
'<'
)
return
msg
lms/templates/courseware/instructor_dashboard.html
View file @
de5fa56b
...
...
@@ -156,6 +156,7 @@ function goto( mode)
<p>
<input
type=
"submit"
name=
"action"
value=
"Download CSV of answer distributions"
>
<input
type=
"submit"
name=
"action"
value=
"Dump description of graded assignments configuration"
>
</p>
<hr
width=
"40%"
style=
"align:left"
>
...
...
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