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

OO-150: better check if a test is closed before trying to show it ( in case of back/resume)

--HG--
branch : 80-patch
parent a538cd4b
No related branches found
No related tags found
No related merge requests found
......@@ -393,7 +393,10 @@ public class IQRunController extends BasicController implements GenericEventList
if(returnController instanceof IQDisplayController){
displayController = (IQDisplayController)returnController;
listenTo(displayController);
if (displayController.isReady()) {
if(displayController.isClosed()) {
//do nothing
System.out.println();
} else if (displayController.isReady()) {
// in case displayController was unable to initialize, a message was set by displayController
// this is the case if no more attempts or security check was unsuccessfull
displayContainerController = new LayoutMain3ColsController(ureq, getWindowControl(), null, null, displayController.getInitialComponent(), null);
......@@ -421,6 +424,8 @@ public class IQRunController extends BasicController implements GenericEventList
singleUserEventCenter.fireEventToListenersOf(new AssessmentEvent(AssessmentEvent.TYPE.STARTED, ureq.getUserSession()), assessmentEventOres);
}
}//endif isReady
}else{
// -> qti file was locked -> show info message
// user must click again on course node to activate
......
......@@ -344,6 +344,11 @@ public class IQDisplayController extends DefaultController implements Activateab
return ready;
}
public boolean isClosed() {
if(qticomp == null) return true;
AssessmentInstance ai = qticomp.getAssessmentInstance();
return ai.isClosed();
}
private void updateQuestionProgressDisplay (AssessmentInstance ai) {
......
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