Package org.olat.modules.scorm.server.beans

Examples of org.olat.modules.scorm.server.beans.LMSDataHandler


//      );
      //putting all cmi from the olat storage to the local storage
      LMSDataFormBean lmsDataBean = new LMSDataFormBean();
      lmsDataBean.setItemID(sahs_id);
      lmsDataBean.setLmsAction("get");
      odatahandler = new LMSDataHandler(scormManager, lmsDataBean, scormSettingsHandler);
      LMSResultsBean lmsBean = odatahandler.getResultsBean();
      olatScoCmi.clear();
      String[][] strArr = lmsBean.getCmiStrings();
      String key = "";
      String value = "";
View Full Code Here


        }
      }
    }
   
    lmsDataBean.setDataAsMap(cmiData);
    odatahandler = new LMSDataHandler(scormManager, lmsDataBean, scormSettingsHandler);
    odatahandler.updateCMIData(olatSahsId);
    return "true";
  }
View Full Code Here

   * @return a String that points to the last accessed sco itemId
   */
  public String getScormLastAccessedItemId(){
    LMSDataFormBean lmsDataBean = new LMSDataFormBean();
    lmsDataBean.setLmsAction("boot");
    odatahandler = new LMSDataHandler(scormManager, lmsDataBean, scormSettingsHandler);
    LMSResultsBean lmsBean = odatahandler.getResultsBean();
    return lmsBean.getItemID();
  }
View Full Code Here

  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");
  }
View Full Code Here

  public boolean hasItemPrerequisites(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.getHasPrerequisites().equals("true");
  }
View Full Code Here

   * @return Map containing the recent sco items status
   */
  public Map getScoItemsStatus(){
    LMSDataFormBean lmsDataBean = new LMSDataFormBean();
    lmsDataBean.setLmsAction("boot");
    odatahandler = new LMSDataHandler(scormManager, lmsDataBean, scormSettingsHandler);
    LMSResultsBean lmsBean = odatahandler.getResultsBean();
    String[][] preReqTbl = lmsBean.getPreReqTable();
    Map itemsStatus = new HashMap();
    //put table into map
    for(int i=0; i < preReqTbl.length; i++){
View Full Code Here

  public Integer getPreviousSco(String recentId) {
//    TODO:gs make method faster by caching lmsBean, but when to set out of date?
    LMSDataFormBean lmsDataBean = new LMSDataFormBean();
    lmsDataBean.setItemID(recentId);
    lmsDataBean.setLmsAction("get");
    odatahandler = new LMSDataHandler(scormManager, lmsDataBean, scormSettingsHandler);
    LMSResultsBean lmsBean = odatahandler.getResultsBean();
    String[][] pretable = lmsBean.getPreReqTable();
    String previousNavScoId = "-1";
    for(int i=0; i < pretable.length; i++){
      if(pretable[i][0].equals(recentId) &&  (i != 0 )){
View Full Code Here

  public Integer getNextSco(String recentId) {
//    TODO:gs make method faster by chaching lmsBean, but when to set out of date?
    LMSDataFormBean lmsDataBean = new LMSDataFormBean();
    lmsDataBean.setItemID(recentId);
    lmsDataBean.setLmsAction("get");
    odatahandler = new LMSDataHandler(scormManager, lmsDataBean, scormSettingsHandler);
    LMSResultsBean lmsBean = odatahandler.getResultsBean();
    String[][] pretable = lmsBean.getPreReqTable();
    String nextNavScoId = "-1";
    for(int i=0; i < pretable.length; i++){
      if(pretable[i][0].equals(recentId) && (i != pretable.length-1)){
View Full Code Here

TOP

Related Classes of org.olat.modules.scorm.server.beans.LMSDataHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.