Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
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-ora2
Commits
f0849f7a
Commit
f0849f7a
authored
Feb 07, 2014
by
Stephen Sanchez
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into sanchez/xblock_peer_eval
parents
d2638ae5
d10282c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletions
+16
-1
apps/submissions/admin.py
+13
-1
apps/submissions/models.py
+3
-0
No files found.
apps/submissions/admin.py
View file @
f0849f7a
...
...
@@ -2,6 +2,18 @@ from django.contrib import admin
from
submissions.models
import
Score
,
StudentItem
,
Submission
class
SubmissionAdmin
(
admin
.
ModelAdmin
):
list_display
=
(
'student_item'
,
'attempt_number'
,
'submitted_at'
,
'created_at'
,
'answer'
,
'scores'
)
def
scores
(
self
,
obj
):
return
", "
.
join
(
"{}/{}"
.
format
(
score
.
points_earned
,
score
.
points_possible
)
for
score
in
Score
.
objects
.
filter
(
submission
=
obj
.
id
)
)
admin
.
site
.
register
(
Score
)
admin
.
site
.
register
(
StudentItem
)
admin
.
site
.
register
(
Submission
)
admin
.
site
.
register
(
Submission
,
SubmissionAdmin
)
apps/submissions/models.py
View file @
f0849f7a
...
...
@@ -36,6 +36,9 @@ class StudentItem(models.Model):
item_type
=
self
.
item_type
,
))
def
__unicode__
(
self
):
return
"({0.student_id}, {0.course_id}, {0.item_type}, {0.item_id})"
.
format
(
self
)
class
Meta
:
unique_together
=
(
# For integrity reasons, and looking up all of a student's items
...
...
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