Skip to content
Snippets Groups Projects
Commit 718e9885 authored by gnaegi's avatar gnaegi
Browse files

OO-558 show LTI nodes in asessment tool only when score transfering is...

OO-558 show LTI nodes in asessment tool only when score transfering is enabled, analog to SCORM element
parent d8d281eb
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,7 @@ import org.olat.core.logging.OLATRuntimeException;
import org.olat.core.util.Util;
import org.olat.course.ICourse;
import org.olat.course.assessment.AssessmentManager;
import org.olat.course.auditing.UserNodeAuditManager;
import org.olat.course.editor.CourseEditorEnv;
import org.olat.course.editor.NodeEditController;
import org.olat.course.editor.StatusDescription;
......@@ -263,12 +264,18 @@ public class BasicLTICourseNode extends AbstractAccessableCourseNode implements
@Override
public boolean hasAttemptsConfigured() {
return false;
// having score defined means the node is assessable
ModuleConfiguration config = getModuleConfiguration();
Boolean score = config.getBooleanEntry(CONFIG_KEY_HAS_SCORE_FIELD);
return (score == null) ? false : score.booleanValue();
}
@Override
public boolean hasDetails() {
return true;
// having score defined means the node is assessable
ModuleConfiguration config = getModuleConfiguration();
Boolean score = config.getBooleanEntry(CONFIG_KEY_HAS_SCORE_FIELD);
return (score == null) ? false : score.booleanValue();
}
@Override
......@@ -278,7 +285,10 @@ public class BasicLTICourseNode extends AbstractAccessableCourseNode implements
@Override
public boolean isEditableConfigured() {
return true;
// having score defined means the node is assessable
ModuleConfiguration config = getModuleConfiguration();
Boolean score = config.getBooleanEntry(CONFIG_KEY_HAS_SCORE_FIELD);
return (score == null) ? false : score.booleanValue();
}
@Override
......@@ -314,8 +324,11 @@ public class BasicLTICourseNode extends AbstractAccessableCourseNode implements
@Override
public String getUserLog(UserCourseEnvironment userCourseEnvironment) {
// TODO Auto-generated method stub
return null;
// having score defined means the node is assessable
UserNodeAuditManager am = userCourseEnvironment.getCourseEnvironment().getAuditManager();
Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
String logValue = am.getUserNodeLog(this, mySelf);
return logValue;
}
@Override
......
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