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
dac46528
Commit
dac46528
authored
Jun 12, 2017
by
Eric Fischer
Committed by
GitHub
Jun 12, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1008 from edx/efischer/fix_columns
Expand course_id column
parents
c8ea15a9
0f12fc0a
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
66 additions
and
13 deletions
+66
-13
openassessment/assessment/migrations/0001_initial.py
+1
-0
openassessment/assessment/migrations/0002_staffworkflow.py
+1
-0
openassessment/assessment/migrations/0003_expand_course_id.py
+45
-0
openassessment/assessment/models/ai.py
+4
-3
openassessment/assessment/models/base.py
+0
-1
openassessment/assessment/models/peer.py
+12
-7
openassessment/assessment/models/staff.py
+1
-1
openassessment/assessment/models/student_training.py
+1
-1
openassessment/workflow/migrations/0001_initial.py
+1
-0
No files found.
openassessment/assessment/migrations/0001_initial.py
View file @
dac46528
# -*- coding: utf-8 -*-
# pylint: skip-file
from
__future__
import
unicode_literals
from
django.db
import
models
,
migrations
...
...
openassessment/assessment/migrations/0002_staffworkflow.py
View file @
dac46528
# -*- coding: utf-8 -*-
# pylint: skip-file
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
...
...
openassessment/assessment/migrations/0003_expand_course_id.py
0 → 100644
View file @
dac46528
# -*- coding: utf-8 -*-
# pylint: skip-file
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'assessment'
,
'0002_staffworkflow'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'aiclassifierset'
,
name
=
'course_id'
,
field
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
),
),
migrations
.
AlterField
(
model_name
=
'aigradingworkflow'
,
name
=
'course_id'
,
field
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
),
),
migrations
.
AlterField
(
model_name
=
'aitrainingworkflow'
,
name
=
'course_id'
,
field
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
),
),
migrations
.
AlterField
(
model_name
=
'peerworkflow'
,
name
=
'course_id'
,
field
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
),
),
migrations
.
AlterField
(
model_name
=
'staffworkflow'
,
name
=
'course_id'
,
field
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
),
),
migrations
.
AlterField
(
model_name
=
'studenttrainingworkflow'
,
name
=
'course_id'
,
field
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
),
),
]
openassessment/assessment/models/ai.py
View file @
dac46528
...
...
@@ -152,7 +152,7 @@ class AIClassifierSet(models.Model):
# Though these items are duplicated in the database tables for the AITrainingWorkflow,
# this is okay because it will drastically speed up the operation of assigning classifiers
# to AIGradingWorkflows
course_id
=
models
.
CharField
(
max_length
=
40
,
db_index
=
True
)
course_id
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
)
item_id
=
models
.
CharField
(
max_length
=
128
,
db_index
=
True
)
@classmethod
...
...
@@ -201,7 +201,7 @@ class AIClassifierSet(models.Model):
# we can't assign them a score.
all_criteria
=
set
(
classifiers_dict
.
keys
())
all_criteria
|=
set
(
criterion
.
name
for
criterion
in
criterion
.
name
for
criterion
in
rubric_index
.
find_criteria_without_options
()
)
missing_criteria
=
rubric_index
.
find_missing_criteria
(
all_criteria
)
...
...
@@ -414,6 +414,7 @@ class AIClassifierSet(models.Model):
# an AWS S3 bucket.
AI_CLASSIFIER_STORAGE
=
"ora2_ai_classifiers"
def
upload_to_path
(
instance
,
filename
):
# pylint:disable=W0613
"""
Calculate the file path where classifiers should be uploaded.
...
...
@@ -505,7 +506,7 @@ class AIWorkflow(models.Model):
# Though these items are duplicated in the database tables for the submissions app,
# and every workflow has a reference to a submission entry, this is okay because
# submissions are immutable.
course_id
=
models
.
CharField
(
max_length
=
40
,
db_index
=
True
)
course_id
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
)
item_id
=
models
.
CharField
(
max_length
=
128
,
db_index
=
True
)
# Timestamps
...
...
openassessment/assessment/models/base.py
View file @
dac46528
...
...
@@ -790,7 +790,6 @@ class AssessmentPart(models.Model):
msg
=
u"Missing selections for criteria: {missing}"
.
format
(
missing
=
missing_criteria
)
raise
InvalidRubricSelection
(
msg
)
@classmethod
def
_check_all_criteria_assessed
(
cls
,
rubric_index
,
selected_criteria
,
criteria_feedback
):
"""
...
...
openassessment/assessment/models/peer.py
View file @
dac46528
...
...
@@ -109,7 +109,7 @@ class PeerWorkflow(models.Model):
student_id
=
models
.
CharField
(
max_length
=
40
,
db_index
=
True
)
item_id
=
models
.
CharField
(
max_length
=
128
,
db_index
=
True
)
course_id
=
models
.
CharField
(
max_length
=
40
,
db_index
=
True
)
course_id
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
)
submission_uuid
=
models
.
CharField
(
max_length
=
128
,
db_index
=
True
,
unique
=
True
)
created_at
=
models
.
DateTimeField
(
default
=
now
,
db_index
=
True
)
completed_at
=
models
.
DateTimeField
(
null
=
True
,
db_index
=
True
)
...
...
@@ -341,9 +341,10 @@ class PeerWorkflow(models.Model):
"and student_id<>
%
s "
"and pw.cancelled_at is NULL "
"and pw.id not in ( "
"select pwi.author_id "
"from assessment_peerworkflowitem pwi "
"where pwi.scorer_id=
%
s); "
,
"select pwi.author_id "
"from assessment_peerworkflowitem pwi "
"where pwi.scorer_id=
%
s"
"); "
,
[
self
.
course_id
,
self
.
item_id
,
self
.
student_id
,
self
.
id
]
))
workflow_count
=
len
(
query
)
...
...
@@ -379,7 +380,9 @@ class PeerWorkflow(models.Model):
"""
try
:
item_query
=
self
.
graded
.
filter
(
submission_uuid
=
submission_uuid
)
.
order_by
(
"-started_at"
,
"-id"
)
# pylint:disable=E1101
item_query
=
self
.
graded
.
filter
(
submission_uuid
=
submission_uuid
)
.
order_by
(
"-started_at"
,
"-id"
)
# pylint:disable=E1101
items
=
list
(
item_query
[:
1
])
if
not
items
:
msg
=
(
...
...
@@ -391,8 +394,10 @@ class PeerWorkflow(models.Model):
item
.
assessment
=
assessment
item
.
save
()
if
(
not
item
.
author
.
grading_completed_at
and
item
.
author
.
graded_by
.
filter
(
assessment__isnull
=
False
)
.
count
()
>=
num_required_grades
):
if
(
not
item
.
author
.
grading_completed_at
and
item
.
author
.
graded_by
.
filter
(
assessment__isnull
=
False
)
.
count
()
>=
num_required_grades
):
item
.
author
.
grading_completed_at
=
now
()
item
.
author
.
save
()
except
(
DatabaseError
,
PeerWorkflowItem
.
DoesNotExist
):
...
...
openassessment/assessment/models/staff.py
View file @
dac46528
...
...
@@ -27,7 +27,7 @@ class StaffWorkflow(models.Model):
TIME_LIMIT
=
timedelta
(
hours
=
8
)
scorer_id
=
models
.
CharField
(
max_length
=
40
,
db_index
=
True
)
course_id
=
models
.
CharField
(
max_length
=
40
,
db_index
=
True
)
course_id
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
)
item_id
=
models
.
CharField
(
max_length
=
128
,
db_index
=
True
)
submission_uuid
=
models
.
CharField
(
max_length
=
128
,
db_index
=
True
,
unique
=
True
)
created_at
=
models
.
DateTimeField
(
default
=
now
,
db_index
=
True
)
...
...
openassessment/assessment/models/student_training.py
View file @
dac46528
...
...
@@ -21,7 +21,7 @@ class StudentTrainingWorkflow(models.Model):
# jeopardizing data integrity.
student_id
=
models
.
CharField
(
max_length
=
40
,
db_index
=
True
)
item_id
=
models
.
CharField
(
max_length
=
128
,
db_index
=
True
)
course_id
=
models
.
CharField
(
max_length
=
40
,
db_index
=
True
)
course_id
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
)
class
Meta
:
app_label
=
"assessment"
...
...
openassessment/workflow/migrations/0001_initial.py
View file @
dac46528
# -*- coding: utf-8 -*-
# pylint: skip-file
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
...
...
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