Skip to content
Snippets Groups Projects
Commit 5eb6bd38 authored by srosse's avatar srosse
Browse files

Merge remote-tracking branch 'origin/OpenOLAT_12.5'

parents 5cccc27d 9a445a23
No related branches found
No related tags found
No related merge requests found
......@@ -105,10 +105,8 @@ public class QTI12AssessmentStatisticsController extends BasicController impleme
printLink = LinkFactory.createToolLink("print" + CodeHelper.getRAMUniqueID(), translate("print"), this);
printLink.setIconLeftCSS("o_icon o_icon_print o_icon-lg");
printLink.setPopup(new LinkPopupSettings(680, 500, "qti-stats"));
stackPanel.addTool(printLink, Align.right);
downloadRawLink = LinkFactory.createToolLink("download" + CodeHelper.getRAMUniqueID(), translate("download.raw.data"), this);
stackPanel.addTool(downloadRawLink, Align.right);
} else {
printLink = null;
downloadRawLink = LinkFactory.createLink("download.raw.data", mainVC, this);
......
......@@ -58,6 +58,7 @@ public class AssessmentEntryOutcomesListener implements OutcomesListener {
private final boolean authorMode;
private final boolean needManualCorrection;
private AtomicBoolean incrementAttempts = new AtomicBoolean(true);
private AtomicBoolean start = new AtomicBoolean(true);
private AtomicBoolean close = new AtomicBoolean(true);
......@@ -140,6 +141,11 @@ public class AssessmentEntryOutcomesListener implements OutcomesListener {
assessmentEntry.setPassed(submittedPass);
assessmentEntry.setCompletion(completion);
assessmentEntry.setAssessmentId(assessmentId);
if(incrementAttempts.getAndSet(false)) {
int currentAttempts = assessmentEntry.getAttempts() == null ? 0 : assessmentEntry.getAttempts().intValue();
assessmentEntry.setAttempts(currentAttempts + 1);
}
assessmentEntry = assessmentService.updateAssessmentEntry(assessmentEntry);
boolean firstClose = close.getAndSet(false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment