use of org.olat.modules.scorm.server.servermodels.SequencerModel in project OpenOLAT by OpenOLAT.
the class NavigationViewer method hasManifestChanged.
/**
* A method to let us know if the manifest has been updated since it was last
* loaded into JDOM. If it has been chnaged then the time stamp will be
* updated - and so it will be different to the timestamp we have recorded in
* out settings file - so we compare the two.
*
* @return true or false
*/
public boolean hasManifestChanged() {
String manifestTimeStamp = Long.toString(getFile().lastModified());
SequencerModel sequence = new SequencerModel(settings.getScoItemSequenceFile(), settings);
String storedLastModified = sequence.getManifestModifiedDate();
return (manifestTimeStamp.equals(storedLastModified));
}
use of org.olat.modules.scorm.server.servermodels.SequencerModel in project openolat by klemens.
the class ScormAssessmentManager method getSequencerModel.
/**
* Load the SequencerModel
* @param username
* @param courseEnv
* @param node
* @return can be null if the user hasn't visited the course
*/
public SequencerModel getSequencerModel(String username, CourseEnvironment courseEnv, ScormCourseNode node) {
VFSContainer scoDirectory = ScormDirectoryHelper.getScoDirectory(username, courseEnv, node);
if (scoDirectory == null)
return null;
VFSItem reloadSettingsFile = scoDirectory.resolve(RELOAD_SETTINGS_FILE);
if (reloadSettingsFile instanceof LocalFileImpl) {
LocalFileImpl fileImpl = (LocalFileImpl) reloadSettingsFile;
return new SequencerModel(fileImpl.getBasefile(), null);
} else if (reloadSettingsFile != null) {
throw new OLATRuntimeException(this.getClass(), "Programming error, SCORM results must be file based", null);
}
return null;
}
use of org.olat.modules.scorm.server.servermodels.SequencerModel in project OpenOLAT by OpenOLAT.
the class ScormAssessmentManager method getSequencerModel.
/**
* Load the SequencerModel
* @param username
* @param courseEnv
* @param node
* @return can be null if the user hasn't visited the course
*/
public SequencerModel getSequencerModel(String username, CourseEnvironment courseEnv, ScormCourseNode node) {
VFSContainer scoDirectory = ScormDirectoryHelper.getScoDirectory(username, courseEnv, node);
if (scoDirectory == null)
return null;
VFSItem reloadSettingsFile = scoDirectory.resolve(RELOAD_SETTINGS_FILE);
if (reloadSettingsFile instanceof LocalFileImpl) {
LocalFileImpl fileImpl = (LocalFileImpl) reloadSettingsFile;
return new SequencerModel(fileImpl.getBasefile(), null);
} else if (reloadSettingsFile != null) {
throw new OLATRuntimeException(this.getClass(), "Programming error, SCORM results must be file based", null);
}
return null;
}
use of org.olat.modules.scorm.server.servermodels.SequencerModel in project OpenOLAT by OpenOLAT.
the class PrerequisiteManager method populateFromDisk.
/**
* Method to get the disk version of the package (what/what hasn't has been
* completed)
*
* @param org
* @return true is successful
*/
protected boolean populateFromDisk(String org) {
_sequencerModel = new SequencerModel(settings.getScoItemSequenceFile(), settings);
_prereqTable = _sequencerModel.getItemsAsHash(org);
return (_prereqTable != null);
}
use of org.olat.modules.scorm.server.servermodels.SequencerModel in project openolat by klemens.
the class NavigationViewer method hasManifestChanged.
/**
* A method to let us know if the manifest has been updated since it was last
* loaded into JDOM. If it has been chnaged then the time stamp will be
* updated - and so it will be different to the timestamp we have recorded in
* out settings file - so we compare the two.
*
* @return true or false
*/
public boolean hasManifestChanged() {
String manifestTimeStamp = Long.toString(getFile().lastModified());
SequencerModel sequence = new SequencerModel(settings.getScoItemSequenceFile(), settings);
String storedLastModified = sequence.getManifestModifiedDate();
return (manifestTimeStamp.equals(storedLastModified));
}
Aggregations