Beispiel #1
0
                    $unit = new EfrontUnit($_GET['id']);
                    $unit['ctg_type'] == 'scorm_test' ? $unit['ctg_type'] = 'scorm' : ($unit['ctg_type'] = 'scorm_test');
                    $unit->persist();
                    echo json_encode(array('id' => $unit['id'], 'ctg_type' => $unit['ctg_type']));
                    exit;
                }
                if (isset($_GET['reset_scorm']) && isset($_GET['id']) && in_array($_GET['id'], $valid12Units)) {
                    //eF_deleteTableData("scorm_data", "id=".$_GET['delete']);
                    //$user = EfrontUserFactory::factory($scormData[0]['users_LOGIN']);
                    //$user -> setSeenUnit($scormData[0]['content_ID'], $currentLesson, false);
                }
                //Reset scorm data
                if (isset($_GET['reset_scorm']) && isset($_GET['id']) && in_array($_GET['id'], $valid2004Units)) {
                    if (isset($_GET['login']) && eF_checkParameter($_GET['login'], 'login')) {
                        //EfrontContentTreeSCORM :: resetSCORMContentOrganization($currentLesson, $_GET['id'], $_GET['login']);
                    } else {
                        EfrontContentTreeSCORM::resetSCORMContentOrganization($currentLesson, $_GET['id']);
                    }
                }
            } catch (Exception $e) {
                header("HTTP/1.0 500 ");
                echo $e->getMessage() . ' (' . $e->getCode() . ')';
                exit;
            }
            $smarty->assign("T_SCORM_TREE", $currentContent->toHTML($iterator, false, $options));
        }
    }
}
//$scormOptions[] = array('text' => _SCORMEXPORT,       'image' => "32x32/export.png",         'href' => "scorm_export.php?lessons_ID=".$_SESSION['s_lessons_ID'], 'onClick' => "eF_js_showDivPopup(event, '"._SCORMEXPORT."',     2)", 'target' => 'POPUP_FRAME');
//$scormOptions[] = array('text' => _SCORMIMPORT,       'image' => "32x32/import.png",         'href' => "scorm_import.php?lessons_ID=".$_SESSION['s_lessons_ID'], 'onClick' => "eF_js_showDivPopup(event, '"._SCORMIMPORT."',     2)", 'target' => 'POPUP_FRAME');
//$scormOptions[] = array('text' => _REVIEWSCORMDATA,   'image' => "32x32/unit.png",   'href' => "scorm_review.php?lessons_ID=".$_SESSION['s_lessons_ID'], 'onClick' => "eF_js_showDivPopup(event, '"._REVIEWSCORMDATA."', 2)", 'target' => 'POPUP_FRAME');