| java.lang.Object org.sakaiproject.tool.assessment.services.GradingService
GradingService | public class GradingService (Code) | | The GradingService calls the back end to get/store grading information.
It also calculates scores for autograded types.
|
Method Summary | |
public void | deleteAll(Collection c) | public boolean | fibmatch(String answer, String input, boolean casesensitive) | public int | getActualNumberRetake(Long publishedAssessmentId, String agentIdString) | public List | getAllAssessmentGradingByAgentId(Long publishedAssessmentId, String agentIdString) | public List | getAllSubmissions(String publishedId) Get all submissions for a published assessment from the back end. | public float | getAnswerScore(ItemGradingIfc data, HashMap publishedAnswerHash) This grades multiple choice and true false questions. | public HashMap | getAssessmentGradingByItemGradingId(String publishedAssessmentId) | public List | getAssessmentGradingIds(String publishedItemId) | public boolean | getFIBResult(ItemGradingIfc data, HashMap fibmap, ItemDataIfc itemdata, HashMap publishedAnswerHash) | public float | getFIBScore(ItemGradingIfc data, HashMap fibmap, ItemDataIfc itemdata, HashMap publishedAnswerHash) This grades Fill In Blank questions. | public boolean | getFINResult(ItemGradingIfc data, ItemDataIfc itemdata, HashMap publishedAnswerHash) | public float | getFINScore(ItemGradingIfc data, ItemDataIfc itemdata, HashMap publishedAnswerHash) | public AssessmentGradingIfc | getHighestAssessmentGrading(String publishedAssessmentId, String agentId) | public ArrayList | getHighestAssessmentGradingList(Long publishedId) | public AssessmentGradingIfc | getHighestSubmittedAssessmentGrading(String publishedAssessmentId, String agentId) | public List | getHighestSubmittedAssessmentGradingList(Long publishedId) | public ItemGradingData | getItemGrading(String itemGradingId) | public ItemGradingData | getItemGradingData(String assessmentGradingId, String publishedItemId) | public List | getItemGradingIds(Long assessmentGradingId) | public Set | getItemGradingSet(String assessmentGradingId) | public HashMap | getItemScores(Long publishedId, Long itemId, String which) Get the score information for each item from the assessment score. | public HashSet | getItemSet(Long publishedAssessmentId, Long sectionId) | public AssessmentGradingIfc | getLastAssessmentGradingByAgentId(String publishedAssessmentId, String agentIdString) | public ArrayList | getLastAssessmentGradingList(Long publishedId) | public HashMap | getLastItemGradingData(String publishedId, String agentId) | public ItemGradingData | getLastItemGradingDataByAgent(String publishedItemId, String agentId) | public ArrayList | getLastItemGradingDataPosition(Long assessmentGradingId, String agentId) | public AssessmentGradingData | getLastSavedAssessmentGradingByAgentId(String publishedAssessmentId, String agentIdString) | public AssessmentGradingData | getLastSubmittedAssessmentGradingByAgentId(String publishedAssessmentId, String agentIdString) | public List | getLastSubmittedAssessmentGradingList(Long publishedId) | public int | getLateSubmissionsNumberByAgentId(Long publishedAssessmentId, String agentIdString, Date dueDate) | public MediaData | getMedia(String mediaId) | public ArrayList | getMediaArray(String itemGradingId) | public ArrayList | getMediaArray(ItemGradingData i) | public List | getMediaArray(String publishedId, String publishItemId, String which) | public int | getNumberRetake(Long publishedAssessmentId, String agentIdString) | public PublishedAssessmentIfc | getPublishedAssessmentByAssessmentGradingId(String id) | public PublishedAssessmentIfc | getPublishedAssessmentByPublishedItemId(String publishedItemId) | public Integer | getScoringType(PublishedAssessmentIfc pub) | public HashMap | getStudentGradingData(String assessmentGradingId) | public List | getStudentGradingSummaryData(Long publishedAssessmentId, String agentIdString) | public HashMap | getSubmissionSizeOfAllPublishedAssessments() | public int | getSubmissionSizeOfPublishedAssessment(String publishedAssessmentId) | public HashMap | getSubmitData(String publishedId, String agentId, Integer scoringoption) | public String | getTextForId(Long typeId) | public float | getTotalCorrectScore(ItemGradingIfc data, HashMap publishedAnswerHash) | public ArrayList | getTotalScores(String publishedId, String which) Get all scores for a published assessment from the back end. | public Long | getTypeId(Long itemGradingId) | public AssessmentGradingData | load(String assessmentGradingId) | public void | notifyGradebook(AssessmentGradingIfc data, PublishedAssessmentIfc pub) | public void | saveItemGrading(ItemGradingIfc item) | public Long | saveMedia(byte[] media, String mimeType) | public Long | saveMedia(MediaData mediaData) | public void | saveOrUpdateAll(Collection c) | public void | saveOrUpdateAssessmentGrading(AssessmentGradingIfc assessment) | public void | saveOrUpdateAssessmentGradingOnly(AssessmentGradingIfc assessment) | public void | saveStudentGradingSummaryData(StudentGradingSummaryIfc studentGradingSummaryData) | public void | saveTotalScores(ArrayList gdataList, PublishedAssessmentIfc pub) | public void | storeGrades(AssessmentGradingIfc data, PublishedAssessmentIfc pub, HashMap publishedItemHash, HashMap publishedItemTextHash, HashMap publishedAnswerHash) Assume this is a new item. | public void | storeGrades(AssessmentGradingIfc data, PublishedAssessmentIfc pub, HashMap publishedItemHash, HashMap publishedItemTextHash, HashMap publishedAnswerHash, boolean persistToDB) Assume this is a new item. | public void | storeGrades(AssessmentGradingIfc data, boolean regrade, PublishedAssessmentIfc pub, HashMap publishedItemHash, HashMap publishedItemTextHash, HashMap publishedAnswerHash, boolean persistToDB) This is the big, complicated mess where we take all the items in
an assessment, store the grading data, auto-grade it, and update
everything.
If regrade is true, we just recalculate the graded score. | public void | updateAssessmentGradingScore(AssessmentGradingIfc adata, PublishedAssessmentIfc pub) | public void | updateItemScore(ItemGradingData gdata, float scoreDifference, PublishedAssessmentIfc pub) |
getActualNumberRetake | public int getActualNumberRetake(Long publishedAssessmentId, String agentIdString)(Code) | | |
getAllAssessmentGradingByAgentId | public List getAllAssessmentGradingByAgentId(Long publishedAssessmentId, String agentIdString)(Code) | | |
getAllSubmissions | public List getAllSubmissions(String publishedId)(Code) | | Get all submissions for a published assessment from the back end.
|
getAnswerScore | public float getAnswerScore(ItemGradingIfc data, HashMap publishedAnswerHash)(Code) | | This grades multiple choice and true false questions. Since
multiple choice/multiple select has a separate ItemGradingIfc for
each choice, they're graded the same way the single choice are.
Choices should be given negative score values if one wants them
to lose points for the wrong choice.
|
getAssessmentGradingByItemGradingId | public HashMap getAssessmentGradingByItemGradingId(String publishedAssessmentId)(Code) | | |
getAssessmentGradingIds | public List getAssessmentGradingIds(String publishedItemId)(Code) | | |
getFIBScore | public float getFIBScore(ItemGradingIfc data, HashMap fibmap, ItemDataIfc itemdata, HashMap publishedAnswerHash)(Code) | | This grades Fill In Blank questions. (see SAK-1685)
There will be two valid cases for scoring when there are multiple fill
in blanks in a question:
Case 1- There are different sets of answers (a set can contain one or more
item) for each blank (e.g. The {dog|coyote|wolf} howls and the {lion|cougar}
roars.) In this case each blank is tested for correctness independently.
Case 2-There is the same set of answers for each blank: e.g. The flag of the US
is {red|white|blue},{red|white|blue}, and {red|white|blue}.
These are the only two valid types of questions. When authoring, it is an
ERROR to include:
(1) a mixture of independent answer and common answer blanks
(e.g. The {dog|coyote|wolf} howls at the {red|white|blue}, {red|white|blue},
and {red|white|blue} flag.)
(2) more than one set of blanks with a common answer ((e.g. The US flag
is {red|white|blue}, {red|white|blue}, and {red|white|blue} and the Italian
flag is {red|white|greem}, {red|white|greem}, and {red|white|greem}.)
These two invalid questions specifications should be authored as two
separate questions.
Here are the definition and 12 cases I came up with (lydia, 01/2006):
single answers : roses are {red} and vilets are {blue}
multiple answers : {dogs|cats} have 4 legs
multiple answers , mutually exclusive, all answers must be identical, can be in diff. orders : US flag has {red|blue|white} and {red |white|blue} and {blue|red|white} colors
multiple answers , mutually non-exclusive : {dogs|cats} have 4 legs and {dogs|cats} can be pets.
wildcard uses * to mean one of more characters
-. wildcard single answer, case sensitive
-. wildcard single answer, case insensitive
-. single answer, no wildcard , case sensitive
-. single answer, no wildcard , case insensitive
-. multiple answer, mutually non-exclusive, no wildcard , case sensitive
-. multiple answer, mutually non-exclusive, no wildcard , case in sensitive
-. multiple answer, mutually non-exclusive, wildcard , case sensitive
-. multiple answer, mutually non-exclusive, wildcard , case insensitive
-. multiple answer, mutually exclusive, no wildcard , case sensitive
-. multiple answer, mutually exclusive, no wildcard , case in sensitive
-. multiple answer, mutually exclusive, wildcard , case sensitive
-. multiple answer, mutually exclusive, wildcard , case insensitive
|
getHighestAssessmentGradingList | public ArrayList getHighestAssessmentGradingList(Long publishedId)(Code) | | |
getHighestSubmittedAssessmentGradingList | public List getHighestSubmittedAssessmentGradingList(Long publishedId)(Code) | | |
getItemGradingIds | public List getItemGradingIds(Long assessmentGradingId)(Code) | | |
getItemGradingSet | public Set getItemGradingSet(String assessmentGradingId)(Code) | | |
getItemScores | public HashMap getItemScores(Long publishedId, Long itemId, String which)(Code) | | Get the score information for each item from the assessment score.
|
getLastAssessmentGradingList | public ArrayList getLastAssessmentGradingList(Long publishedId)(Code) | | |
getLastItemGradingData | public HashMap getLastItemGradingData(String publishedId, String agentId)(Code) | | Get the last set of itemgradingdata for a student per assessment
|
getLastItemGradingDataPosition | public ArrayList getLastItemGradingDataPosition(Long assessmentGradingId, String agentId)(Code) | | |
getLastSubmittedAssessmentGradingList | public List getLastSubmittedAssessmentGradingList(Long publishedId)(Code) | | |
getLateSubmissionsNumberByAgentId | public int getLateSubmissionsNumberByAgentId(Long publishedAssessmentId, String agentIdString, Date dueDate)(Code) | | |
getNumberRetake | public int getNumberRetake(Long publishedAssessmentId, String agentIdString)(Code) | | |
getStudentGradingData | public HashMap getStudentGradingData(String assessmentGradingId)(Code) | | Get the grading data for a given submission
|
getStudentGradingSummaryData | public List getStudentGradingSummaryData(Long publishedAssessmentId, String agentIdString)(Code) | | |
getSubmissionSizeOfAllPublishedAssessments | public HashMap getSubmissionSizeOfAllPublishedAssessments()(Code) | | |
getSubmissionSizeOfPublishedAssessment | public int getSubmissionSizeOfPublishedAssessment(String publishedAssessmentId)(Code) | | |
getTotalScores | public ArrayList getTotalScores(String publishedId, String which)(Code) | | Get all scores for a published assessment from the back end.
|
storeGrades | public void storeGrades(AssessmentGradingIfc data, boolean regrade, PublishedAssessmentIfc pub, HashMap publishedItemHash, HashMap publishedItemTextHash, HashMap publishedAnswerHash, boolean persistToDB) throws GradebookServiceException(Code) | | This is the big, complicated mess where we take all the items in
an assessment, store the grading data, auto-grade it, and update
everything.
If regrade is true, we just recalculate the graded score. If it's
false, we do everything from scratch.
|
|
|