Search in sources :

Example 16 with LMSDataFormBean

use of org.olat.modules.scorm.server.beans.LMSDataFormBean in project openolat by klemens.

the class OLATApiAdapter method isItemCompleted.

// </OLATCE-289>
/**
 * @param itemId
 * @return true if the item is completed
 */
public boolean isItemCompleted(String itemId) {
    // TODO:gs make method faster by caching lmsBean, but when to set out of date?
    LMSDataFormBean lmsDataBean = new LMSDataFormBean();
    lmsDataBean.setItemID(itemId);
    lmsDataBean.setLmsAction("get");
    odatahandler = new LMSDataHandler(scormManager, lmsDataBean, scormSettingsHandler);
    LMSResultsBean lmsBean = odatahandler.getResultsBean();
    return lmsBean.getIsItemCompleted().equals("true");
}
Also used : LMSResultsBean(org.olat.modules.scorm.server.beans.LMSResultsBean) LMSDataHandler(org.olat.modules.scorm.server.beans.LMSDataHandler) LMSDataFormBean(org.olat.modules.scorm.server.beans.LMSDataFormBean)

Aggregations

LMSDataFormBean (org.olat.modules.scorm.server.beans.LMSDataFormBean)16 LMSDataHandler (org.olat.modules.scorm.server.beans.LMSDataHandler)16 LMSResultsBean (org.olat.modules.scorm.server.beans.LMSResultsBean)14 HashMap (java.util.HashMap)4 BufferedOutputStream (java.io.BufferedOutputStream)2 FileOutputStream (java.io.FileOutputStream)2 IOException (java.io.IOException)2 OutputStream (java.io.OutputStream)2 OLATRuntimeException (org.olat.core.logging.OLATRuntimeException)2