Skip to content

Commit

Permalink
SAK-47223 Samigo > anon quiz > unable to grade non-submitters (sakaip…
Browse files Browse the repository at this point in the history
  • Loading branch information
bjones86 authored Apr 28, 2022
1 parent 42dd611 commit eea095b
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,19 +201,6 @@ protected void init() {
allAgents = getAllAgents();
}

// For anonymous grading, we want to take out the records that has not been submitted
if ("true".equalsIgnoreCase(anonymous)) {
Iterator iter = allAgents.iterator();
List anonymousAgents = new ArrayList();
while (iter.hasNext()) {
AgentResults agentResult = (AgentResults) iter.next();
if (agentResult.getSubmittedDate() != null && agentResult.getAssessmentGradingId().intValue() != -1) {
anonymousAgents.add(agentResult);
}
}
allAgents = anonymousAgents;
}

List matchingAgents;
if (isFilteredSearch()) {
matchingAgents = findMatchingAgents(searchString);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,12 +562,7 @@ public void prepareAgentResultList(TotalScoresBean bean, PublishedAssessmentData
GradingService delegate = new GradingService();
List allscores = bean.getAssessmentGradingList();
if (allscores == null || allscores.size()==0){
PublishedAccessControl ac = (PublishedAccessControl) p.getAssessmentAccessControl();
EvaluationModelIfc model = p.getEvaluationModel();
// If the assessment is set to anonymous grading, we don't want to get assessmentGrading records which has not
// submitted by students but has been updated by grader (ie, forGrade != true, lastGradedBy and lastGradedDate is not null)
boolean getSubmittedOnly = model.getAnonymousGrading().equals(EvaluationModelIfc.ANONYMOUS_GRADING);
allscores = delegate.getTotalScores(p.getPublishedAssessmentId().toString(), bean.getAllSubmissions(), getSubmittedOnly);
allscores = delegate.getTotalScores(p.getPublishedAssessmentId().toString(), bean.getAllSubmissions(), false);
bean.setAssessmentGradingList(allscores);
}
getFilteredList(bean, allscores, scores, students_not_submitted, useridMap);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
--%>
<h:panelGroup>
<ul class='navIntraTool actionToolbar' role='menu'>
<h:panelGroup rendered="#{histogramScores.hasNav==null || histogramScores.hasNav=='true'}">
<h:panelGroup rendered="#{(histogramScores.hasNav==null || histogramScores.hasNav=='true') && totalScores.anonymous eq 'false'}">
<li role='menuitem'>
<h:panelGroup id="submissionStatusMenuLink">
<h:commandLink title="#{evaluationMessages.t_submissionStatus}" action="submissionStatus" immediate="true">
<h:panelGroup id="submissionStatusMenuLink" rendered="#{totalScores.anonymous eq 'false'}">
<h:commandLink title="#{evaluationMessages.t_submissionStatus}" action="submissionStatus" immediate="true" rendered="#{totalScores.anonymous eq 'false'}">
<h:outputText value="#{evaluationMessages.sub_status}" />
<f:param name="allSubmissions" value="true"/>
<f:actionListener type="org.sakaiproject.tool.assessment.ui.listener.evaluation.SubmissionStatusListener" />
Expand Down
Loading

0 comments on commit eea095b

Please sign in to comment.