Skip to content
Snippets Groups Projects
Commit 7499b651 authored by srosse's avatar srosse
Browse files

OO-3469: better check variable in velocity template, check if the candidate...

OO-3469: better check variable in velocity template, check if the candidate session exists in disposing phase
parent 662d2c3a
No related branches found
No related tags found
No related merge requests found
......@@ -141,7 +141,7 @@
$r.render("highScore")
#end
#if($showResultsOnHomePage && $attempts > 0)
#if($showResultsOnHomePage && $r.isNotNull($attempts) && $attempts > 0)
<div class="panel panel-default o_results">
<div class="panel-heading">
<h4 class="panel-title">#if ($showResults && $r.available("command.hideResults"))
......
......@@ -398,9 +398,11 @@ public class AssessmentTestDisplayController extends BasicController implements
@Override
protected void doDispose() {
suspendAssessmentTest(new Date());
OLATResourceable sessionOres = OresHelper
.createOLATResourceableInstance(AssessmentTestSession.class, candidateSession.getKey());
CoordinatorManager.getInstance().getCoordinator().getEventBus().deregisterFor(this, sessionOres);
if(candidateSession != null) {
OLATResourceable sessionOres = OresHelper
.createOLATResourceableInstance(AssessmentTestSession.class, candidateSession.getKey());
CoordinatorManager.getInstance().getCoordinator().getEventBus().deregisterFor(this, sessionOres);
}
}
/**
......
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