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

OO-1023: don't show the warnings if a survey contains an essay

parent 5ab226ca
No related branches found
No related tags found
No related merge requests found
......@@ -636,6 +636,7 @@ public class IQEditController extends ActivateableTabbableDefaultController impl
private void checkEssay(RepositoryEntry re) {
if(OnyxModule.isOnyxTest(re.getOlatResource())) return;
if(courseNode instanceof IQSURVCourseNode || courseNode instanceof IQSELFCourseNode) return;
TestFileResource fr = new TestFileResource();
fr.overrideResourceableId(re.getOlatResource().getResourceableId());
......
......@@ -121,13 +121,15 @@ public class EssayItemController extends DefaultController implements Controller
try {
String score = ureq.getParameter("single_score");
float sc = Float.parseFloat(score);
if(sc <= 0.0001f) {
if(sc <= 0.0001f && !qtiPackage.getQTIDocument().isSurvey()) {
getWindowControl().setWarning(trnsltr.translate("editor.info.mc.zero.points"));
}
essayQuestion.setMinValue(0.0f);
essayQuestion.setMaxValue(sc);
} catch(Exception e) {
getWindowControl().setWarning(trnsltr.translate("editor.info.mc.zero.points"));
if(!qtiPackage.getQTIDocument().isSurvey()) {
getWindowControl().setWarning(trnsltr.translate("editor.info.mc.zero.points"));
}
}
if (restrictedEdit) {
......
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