Commit 8484309a by Stephen Sanchez

Moving BDD tests over to new modules

parent 35e17d03
"""
Common Grading contains a set of shared grading classes across Peer, Self, Instructor, and Machine Learning.
"""
from django.db import models
MAX_LENGTH = 255
ESSAY_BODY_MAX_LENGTH = 10000
GRADING_TYPES = (
('PE', 'Peer Assessment'),
)
class Submission(models.Model):
student_id = models.CharField(max_length=MAX_LENGTH, db_index=True)
location_id = models.CharField(max_length=MAX_LENGTH, default="")
course_id = models.CharField(max_length=MAX_LENGTH, default="")
essay_body = models.TextField(max_length=ESSAY_BODY_MAX_LENGTH, default="")
preferred_grading = models.CharField(max_length=2, choices=GRADING_TYPES)
submitted_date = models.DateTimeField()
class Scoring(models.Model):
points_earned = models.PositiveIntegerField(default=0)
points_possible = models.PositiveIntegerField(default=0)
scored_date = models.DateTimeField()
student_id = models.CharField(max_length=MAX_LENGTH)
score_type = models.CharField(max_length=2, choices=GRADING_TYPES)
confidence = models.FloatField(default=0.0)
included = models.BooleanField(default=True)
submission = models.ForeignKey(Submission)
class Feedback(models.Model):
text = models.TextField(max_length=MAX_LENGTH, default="")
score = models.ForeignKey(Scoring)
"""
The Peer Grading Application pushes a student submission through the Peer Grading Workflow, allowing other students
and instructors to give and receive grades for any open ended submission.
"""
\ No newline at end of file
def get_next_submission(student_id, location):
"""Request the next submission to be peer graded.
Args:
student_id (str): The student requesting to grade a peer. Must check to determine if the requesting student has
submitted an answer of their own.
location (str): The associated location for the submission to be graded.
Returns:
Submission: The submission to grade, if one is available.
"""
pass
def get_last_submission(student_id, location):
"""Used to give visibility to scoring and workflow for a submission in peer grading.
If the student has submitted a submission and has graded enough peers, this function will return the submission as
is, with all available scoring data. If the student has not finished grading peers, scoring information on their
submission is withheld.
Args:
student_id (str): The student.
location (str): The associated location.
Returns:
Submission: The student's latest submission, restrained on workflow completion.
"""
pass
def submit_submission(submission):
"""Submit a submission for peer grading.
Args:
submission (Submission): The submission to add to the peer grading queue. Should contain the student_id,
associated location, and all answer related fields prepopulated. Submission date,
preferred grader, and other attributes can be determined internally.
Returns:
Submission: The saved submission.
"""
pass
def submit_score(scoring, submission):
"""Submit a scoring for a particular submission
Args:
scoring (Scoring): The score for a particular submission.
submission (Submission): The associated submission.
Returns:
bool: True if the submission succeeded.
"""
pass
from django.db import models
from common_grading.models import MAX_LENGTH
class Status(models.Model):
student_id = models.CharField(max_length=MAX_LENGTH, db_index=True)
problem_id = models.CharField(max_length=MAX_LENGTH, default="")
grading_status = models.CharField(max_length=MAX_LENGTH, default="")
\ No newline at end of file
"""
Contains all Peer Grading XModule code.
"""
__author__ = 'stephensanchez'
import logging
from xblock.core import XBlock
log = logging.getLogger(__name__)
class PeerGradingBlock(XBlock):
pass
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment