本文整理汇总了PHP中ilLPStatusWrapper类的典型用法代码示例。如果您正苦于以下问题:PHP ilLPStatusWrapper类的具体用法?PHP ilLPStatusWrapper怎么用?PHP ilLPStatusWrapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ilLPStatusWrapper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: gatherCourseLPData
function gatherCourseLPData()
{
global $tree, $ilDB;
// process all courses
$all_courses = array_keys(ilObject::_getObjectsByType("crs"));
if ($all_courses) {
// gather objects in trash
$trashed_objects = $tree->getSavedNodeObjIds($all_courses);
include_once 'Services/Tracking/classes/class.ilLPObjSettings.php';
include_once "Modules/Course/classes/class.ilCourseParticipants.php";
include_once "Services/Tracking/classes/class.ilLPStatusWrapper.php";
foreach ($all_courses as $crs_id) {
// trashed objects will not change
if (!in_array($crs_id, $trashed_objects)) {
// only if LP is active
$mode = ilLPObjSettings::_lookupMode($crs_id);
if ($mode == LP_MODE_DEACTIVATED || $mode == LP_MODE_UNDEFINED) {
continue;
}
// only save once per day
$ilDB->manipulate("DELETE FROM obj_lp_stat WHERE" . " obj_id = " . $ilDB->quote($crs_id, "integer") . " AND fulldate = " . $ilDB->quote(date("Ymd", $this->date), "integer"));
$members = new ilCourseParticipants($crs_id);
$members = $members->getMembers();
$in_progress = count(ilLPStatusWrapper::_lookupInProgressForObject($crs_id, $members));
$completed = count(ilLPStatusWrapper::_lookupCompletedForObject($crs_id, $members));
$failed = count(ilLPStatusWrapper::_lookupFailedForObject($crs_id, $members));
// calculate with other values - there is not direct method
$not_attempted = count($members) - $in_progress - $completed - $failed;
$set = array("type" => array("text", "crs"), "obj_id" => array("integer", $crs_id), "yyyy" => array("integer", date("Y", $this->date)), "mm" => array("integer", date("m", $this->date)), "dd" => array("integer", date("d", $this->date)), "fulldate" => array("integer", date("Ymd", $this->date)), "mem_cnt" => array("integer", count($members)), "in_progress" => array("integer", $in_progress), "completed" => array("integer", $completed), "failed" => array("integer", $failed), "not_attempted" => array("integer", $not_attempted));
$ilDB->insert("obj_lp_stat", $set);
}
}
}
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:34,代码来源:class.ilCronObjectStatisticsCheck.php
示例2: _getInProgress
function _getInProgress($a_obj_id)
{
include_once './Services/Tracking/classes/class.ilChangeEvent.php';
$users = ilChangeEvent::lookupUsersInProgress($a_obj_id);
// Exclude all users with status completed.
$users = array_diff((array) $users, ilLPStatusWrapper::_getCompleted($a_obj_id));
return $users;
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:8,代码来源:class.ilLPStatusManual.php
示例3: _getFailed
function _getFailed($a_obj_id)
{
$objective_results = ilLPStatusWrapper::_getStatusInfo($a_obj_id);
$usr_ids = (array) $objective_results['user_status'][self::LP_STATUS_FAILED_NUM];
if ($usr_ids) {
// Exclude all non members
$usr_ids = array_intersect(self::getMembers($a_obj_id), (array) $usr_ids);
}
return $usr_ids ? $usr_ids : array();
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:10,代码来源:class.ilLPStatusObjectives.php
示例4: _getFailed
function _getFailed($a_obj_id)
{
$status_info = ilLPStatusWrapper::_getStatusInfo($a_obj_id);
foreach ($status_info['results'] as $user_data) {
if ($user_data['failed']) {
$user_ids[] = $user_data['user_id'];
}
}
return $user_ids ? $user_ids : array();
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:10,代码来源:class.ilLPStatusTestPassed.php
示例5: _getInProgress
/**
* get in progress
*
* @access public
* @param int object id
* @return array int Array of user ids
*/
public function _getInProgress($a_obj_id)
{
include_once './Services/Tracking/classes/class.ilChangeEvent.php';
$users = ilChangeEvent::lookupUsersInProgress($a_obj_id);
// Exclude all users with status completed.
$users = array_diff((array) $users, ilLPStatusWrapper::_getCompleted($a_obj_id));
if ($users) {
// Exclude all non members
$users = array_intersect(self::getMembers($a_obj_id), (array) $users);
}
return $users;
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:19,代码来源:class.ilLPStatusManualByTutor.php
示例6: _getInProgress
function _getInProgress($a_obj_id)
{
include_once './Modules/Exercise/classes/class.ilExerciseMembers.php';
include_once './Services/Tracking/classes/class.ilChangeEvent.php';
$users = ilExerciseMembers::_getReturned($a_obj_id);
$all = ilChangeEvent::lookupUsersInProgress($a_obj_id);
$users = $users + $all;
$users = array_diff($users, ilLPStatusWrapper::_getCompleted($a_obj_id));
$users = array_diff($users, ilLPStatusWrapper::_getFailed($a_obj_id));
if ($users) {
// Exclude all non members
$users = array_intersect(self::getMembers($a_obj_id), (array) $users);
}
return $users;
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:15,代码来源:class.ilLPStatusExerciseReturned.php
示例7: _getCompleted
function _getCompleted($a_obj_id)
{
$usr_ids = array();
$status_info = ilLPStatusWrapper::_getStatusInfo($a_obj_id);
foreach ($status_info['objective_result'] as $user_id => $completed) {
if (count($completed) == $status_info['num_objectives']) {
$usr_ids[] = $user_id;
}
}
if ($usr_ids) {
// Exclude all non members
$usr_ids = array_intersect(self::getMembers($a_obj_id), (array) $usr_ids);
}
return $usr_ids ? $usr_ids : array();
}
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:15,代码来源:class.ilLPStatusObjectives.php
示例8: _getCompleted
function _getCompleted($a_obj_id)
{
$status_info = ilLPStatusWrapper::_getStatusInfo($a_obj_id);
$counter = 0;
$users = array();
foreach ($status_info['items'] as $item_id) {
$tmp_users = $status_info['completed'][$item_id];
if (!$counter++) {
$users = $tmp_users;
} else {
$users = array_intersect($users, $tmp_users);
}
}
$users = array_unique($users);
return $users;
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:16,代码来源:class.ilLPStatusCollectionTLT.php
示例9: determineStatus
/**
* Determine status
*
* @param integer object id
* @param integer user id
* @param object object (optional depends on object type)
* @return integer status
*/
function determineStatus($a_obj_id, $a_user_id, $a_obj = null)
{
global $ilObjDataCache, $ilDB;
$status = LP_STATUS_NOT_ATTEMPTED_NUM;
switch ($ilObjDataCache->lookupType($a_obj_id)) {
case 'lm':
if (ilChangeEvent::hasAccessed($a_obj_id, $a_user_id)) {
$status = LP_STATUS_IN_PROGRESS_NUM;
// completed?
$status_info = ilLPStatusWrapper::_getStatusInfo($a_obj_id);
$tlt = $status_info['tlt'];
include_once './Services/Tracking/classes/class.ilChangeEvent.php';
$re = ilChangeEvent::_lookupReadEvents($a_obj_id, $a_user_id);
if ($re[0]['spent_seconds'] >= $tlt) {
$status = LP_STATUS_COMPLETED_NUM;
}
}
break;
}
return $status;
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:29,代码来源:class.ilLPStatusTypicalLearningTime.php
示例10: saveProgress
function saveProgress()
{
global $ilUser;
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
$lp_marks = new ilLPMarks($this->gui_object->object->getId(), $ilUser->getId());
$lp_marks->setCompleted((bool) $_POST['lp_edit']);
$lp_marks->update();
require_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
ilLPStatusWrapper::_updateStatus($this->gui_object->object->getId(), $ilUser->getId());
$this->lng->loadLanguageModule('trac');
ilUtil::sendSuccess($this->lng->txt('trac_updated_status'), true);
$this->ctrl->redirect($this, "");
// #14993
// $this->showSummary();
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:15,代码来源:class.ilInfoScreenGUI.php
示例11: refreshStatus
function refreshStatus($a_obj_id)
{
parent::refreshStatus($a_obj_id);
// this is restricted to SCOs in the current collection
include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
$in_progress = ilLPStatusWrapper::_getInProgress($a_obj_id);
$completed = ilLPStatusWrapper::_getCompleted($a_obj_id);
$failed = ilLPStatusWrapper::_getFailed($a_obj_id);
$all_active_users = array_unique(array_merge($in_progress, $completed, $failed));
// get all tracked users regardless of SCOs
include_once './Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
$subtype = ilObjSAHSLearningModule::_lookupSubType($a_obj_id);
if ($subtype != "scorm2004") {
include_once "./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php";
$all_tracked_users = ilObjSCORMTracking::_getTrackedUsers($a_obj_id);
} else {
include_once "./Modules/Scorm2004/classes/class.ilSCORM2004Tracking.php";
$all_tracked_users = ilSCORM2004Tracking::_getTrackedUsers($a_obj_id);
}
$not_attempted_users = array_diff($all_tracked_users, $all_active_users);
unset($all_tracked_users);
unset($all_active_users);
// reset all users which have no data for the current SCOs
if ($not_attempted_users) {
foreach ($not_attempted_users as $usr_id) {
// this will update any (parent) collections if necessary
ilLPStatus::writeStatus($a_obj_id, $usr_id, self::LP_STATUS_NOT_ATTEMPTED_NUM, 0);
}
}
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:30,代码来源:class.ilLPStatusSCORM.php
示例12: confirmedDeleteTracking
/**
* Confirmed tracking deletion
*
* @todo alex, 14 Apr.: This does not confirm to our guidelines, please move DB access to application class
*/
function confirmedDeleteTracking()
{
global $ilDB, $ilUser;
$scos = array();
//get all SCO's of this object
$val_set = $ilDB->queryF('
SELECT cp_node_id FROM cp_node
WHERE nodename = %s
AND cp_node.slm_id = %s', array('text', 'integer'), array('item', $this->object->getId()));
while ($val_rec = $ilDB->fetchAssoc($val_set)) {
array_push($scos, $val_rec['cp_node_id']);
}
foreach ($_POST["user"] as $user) {
foreach ($scos as $sco) {
$ret = $ilDB->manipulateF('
DELETE FROM cmi_node
WHERE user_id = %s
AND cp_node_id = %s', array('integer', 'integer'), array($user, $sco));
}
include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
ilLPStatusWrapper::_updateStatus($this->object->getId(), $user);
}
$this->ctrl->redirect($this, "showTrackingItems");
}
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:29,代码来源:class.ilObjSCORM2004LearningModuleGUI.php
示例13: _insertTrackData
function _insertTrackData($a_sahs_id, $a_lval, $a_rval, $a_obj_id)
{
global $ilDB, $ilUser;
$ilDB->insert('scorm_tracking', array('obj_id' => array('integer', $a_obj_id), 'user_id' => array('integer', $ilUser->getId()), 'sco_id' => array('integer', $a_sahs_id), 'lvalue' => array('text', $a_lval), 'rvalue' => array('clob', $a_rval), 'c_timestamp' => array('timestamp', ilUtil::now())));
if ($a_lval == "cmi.core.lesson_status") {
include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
ilLPStatusWrapper::_updateStatus($a_obj_id, $ilUser->getId());
}
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:9,代码来源:class.ilObjSCORMTracking.php
示例14: importSuccess
function importSuccess($a_file)
{
global $ilDB, $ilUser;
$scos = array();
//get all SCO's of this object
$val_set = $ilDB->queryF('
SELECT cp_node.cp_node_id FROM cp_node,cp_resource,cp_item
WHERE cp_item.cp_node_id = cp_node.cp_node_id
AND cp_item.resourceid = cp_resource.id
AND scormtype = %s
AND nodename = %s
AND cp_node.slm_id = %s
GROUP BY cp_node.cp_node_id', array('text', 'text', 'integer'), array('sco', 'item', $this->getId()));
while ($val_rec = $ilDB->fetchAssoc($val_set)) {
array_push($scos, $val_rec['cp_node_id']);
}
$fhandle = fopen($a_file, "r");
$obj_id = $this->getID();
$users = array();
$fields = fgetcsv($fhandle, 4096, ';');
while (($csv_rows = fgetcsv($fhandle, 4096, ";")) !== FALSE) {
$data = array_combine($fields, $csv_rows);
//check the format
$statuscheck = 0;
if (count($csv_rows) == 6) {
$statuscheck = 1;
}
if ($this->get_user_id($data["Login"]) > 0) {
$user_id = $this->get_user_id($data["Login"]);
$import = $data["Status"];
if ($import == "") {
$import = 1;
}
//iterate over all SCO's
if ($import == 1) {
foreach ($scos as $sco) {
$sco_id = $sco;
$date = $data['Date'];
$res = $ilDB->queryF('
SELECT * FROM cmi_node
WHERE cp_node_id = %s
AND user_id = %s
AND completion_status = %s
AND success_status = %s
AND c_timestamp = %s', array('integer', 'integer', 'text', 'text', 'timestamp'), array($sco_id, $user_id, 'completed', 'passed', $data['Date']));
if (!$ilDB->numRows($res)) {
$nextId = $ilDB->nextId('cmi_node');
$val_set = $ilDB->manipulateF('
INSERT INTO cmi_node
(cp_node_id,user_id,completion_status,success_status,c_timestamp,cmi_node_id)
VALUES(%s,%s,%s,%s,%s,%s)', array('integer', 'integer', 'text', 'text', 'timestamp', 'integer'), array($sco_id, $user_id, 'completed', 'passed', $data['Date'], $nextId));
}
}
}
$users[] = $user_id;
} else {
//echo "Warning! User $csv_rows[0] does not exist in ILIAS. Data for this user was skipped.\n";
}
}
// update learning progress
foreach ($users as $user_id) {
include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
ilLPStatusWrapper::_updateStatus($this->getId(), $user_id);
}
return 0;
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:66,代码来源:class.ilObjSCORM2004LearningModule.php
示例15: importRaw
/**
* Import raw data
* @global ilDB $ilDB
* @global ilObjUser $ilUser
* @param string $a_file
* @return void
*/
private function importRaw($a_file)
{
global $ilDB, $ilUser;
$fhandle = fopen($a_file, "r");
$fields = fgetcsv($fhandle, pow(2, 16), ';');
$users = array();
while (($csv_rows = fgetcsv($fhandle, pow(2, 16), ";")) !== FALSE) {
$data = array_combine($fields, $csv_rows);
$user_id = $this->parseUserId($data['Userid']);
if (!$user_id) {
continue;
}
$il_sco_id = $this->lookupSCOId($data['Scoid']);
//do the actual import
if ($il_sco_id >= 0) {
$statement = $ilDB->queryF('
SELECT * FROM scorm_tracking
WHERE user_id = %s
AND sco_id = %s
AND lvalue = %s
AND obj_id = %s', array('integer', 'integer', 'text', 'integer'), array($user_id, $il_sco_id, $data['Key'], $this->getID()));
if ($ilDB->numRows($statement) > 0) {
$ilDB->update('scorm_tracking', array('rvalue' => array('clob', $data['Value']), 'c_timestamp' => array('timestamp', $data['Timestamp'])), array('user_id' => array('integer', $user_id), 'sco_id' => array('integer', $il_sco_id), 'lvalue' => array('text', $data['Key']), 'obj_id' => array('integer', $this->getId())));
} else {
$ilDB->insert('scorm_tracking', array('obj_id' => array('integer', $this->getId()), 'user_id' => array('integer', $user_id), 'sco_id' => array('integer', $il_sco_id), 'lvalue' => array('text', $data['Key']), 'rvalue' => array('clob', $data['Value']), 'c_timestamp' => array('timestamp', $data['Timestamp'])));
}
}
}
fclose($fhandle);
include_once './Services/Tracking/classes/class.ilLPStatusWrapper.php';
ilLPStatusWrapper::_refreshStatus($this->getId());
return 0;
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:40,代码来源:class.ilObjSCORMLearningModule.php
示例16: __updatePassed
function __updatePassed($a_user_id, $objective_ids)
{
global $ilDB;
$passed = array();
$query = "SELECT COUNT(t1.crs_id) num,t1.crs_id FROM crs_objectives t1 " . "JOIN crs_objectives t2 WHERE t1.crs_id = t2.crs_id and " . $ilDB->in('t1.objective_id', $objective_ids, false, 'integer') . " " . "GROUP BY t1.crs_id";
$res = $ilDB->query($query);
$crs_ids = array();
while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) {
$query = "SELECT COUNT(cs.objective_id) num_passed FROM crs_objective_status cs " . "JOIN crs_objectives co ON cs.objective_id = co.objective_id " . "WHERE crs_id = " . $ilDB->quote($row->crs_id, 'integer') . " " . "AND user_id = " . $ilDB->quote($a_user_id, 'integer') . " ";
$user_res = $ilDB->query($query);
while ($user_row = $user_res->fetchRow(DB_FETCHMODE_OBJECT)) {
if ($user_row->num_passed == $row->num) {
$passed[] = $row->crs_id;
}
}
$crs_ids[$row->crs_id] = $row->crs_id;
}
if (count($passed)) {
foreach ($passed as $crs_id) {
include_once 'Modules/Course/classes/class.ilCourseParticipants.php';
$members = ilCourseParticipants::_getInstanceByObjId($crs_id);
$members->updatePassed($a_user_id, true);
}
}
// update tracking status
foreach ($crs_ids as $cid) {
include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
ilLPStatusWrapper::_updateStatus($cid, $a_user_id);
}
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:30,代码来源:class.ilCourseObjectiveResult.php
示例17: delete
function delete()
{
global $ilDB, $ilLog;
parent::delete();
$q_log = "DELETE FROM aicc_units WHERE obj_id =" . $ilDB->quote($this->getId());
$ilLog->write("SAHS Delete(Unit): " . $q_log);
$ilDB->manipulateF('DELETE FROM aicc_units WHERE obj_id = %s', array('integer'), array($this->getId()));
$ilDB->manipulateF('
DELETE FROM scorm_tracking
WHERE sco_id = %s
AND obj_id =%s', array('integer', 'integer'), array($this->getId(), $this->getALMId()));
// update learning progress status
include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
ilLPStatusWrapper::_refreshStatus($this->getALMId());
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:15,代码来源:class.ilAICCUnit.php
示例18: decreaseAttempts
function decreaseAttempts()
{
global $ilDB, $ilUser;
if (!isset($_POST["user"])) {
ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
}
foreach ($_POST["user"] as $user) {
//first check if there is a package_attempts entry
//get existing account - sco id is always 0
$val_set = $ilDB->queryF('
SELECT * FROM scorm_tracking
WHERE user_id = %s
AND sco_id = %s
AND lvalue = %s
AND obj_id = %s', array('integer', 'integer', 'text', 'integer'), array($user, 0, 'package_attempts', $this->object->getID()));
$val_rec = $ilDB->fetchAssoc($val_set);
$val_rec["rvalue"] = str_replace("\r\n", "\n", $val_rec["rvalue"]);
if ($val_rec["rvalue"] != null && $val_rec["rvalue"] != 0) {
$new_rec = $val_rec["rvalue"] - 1;
//decrease attempt by 1
if ($res = $ilDB->numRows($val_set) > 0) {
$ilDB->update('scorm_tracking', array('rvalue' => array('clob', $new_rec)), array('user_id' => array('integer', $user), 'sco_id' => array('integer', 0), 'obj_id' => array('integer', $this->object->getId()), 'lvalue' => array('text', 'package_attempts')));
} else {
$ilDB->insert('scorm_tracking', array('rvalue' => array('clob', $new_rec), 'user_id' => array('integer', $user), 'sco_id' => array('integer', 0), 'obj_id' => array('integer', $this->object->getId()), 'lvalue' => array('text', 'package_attempts')));
}
include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
ilLPStatusWrapper::_updateStatus($this->object->getId(), $user);
}
}
//$this->ctrl->saveParameter($this, "cdir");
$this->ctrl->redirect($this, "showTrackingItems");
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:32,代码来源:class.ilObjSCORMLearningModuleGUI.php
示例19: handleSubmission
/**
* This method is called after an user submitted one or more files.
* It should handle the setting "Completion by Submission" and, if enabled, set the status of
* the current user.
*
* @param integer
* @param integer
* @access protected
*/
protected function handleSubmission($active_id, $pass, $obligationsAnswered)
{
global $ilObjDataCache;
if ($this->isCompletionBySubmissionEnabled()) {
$maxpoints = assQuestion::_getMaximumPoints($this->getId());
if ($this->getUploadedFiles($active_id, $pass)) {
$points = $maxpoints;
} else {
$points = 0;
}
assQuestion::_setReachedPoints($active_id, $this->getId(), $points, $maxpoints, $pass, 1, $obligationsAnswered);
// update learning progress
include_once 'Modules/Test/classes/class.ilObjTestAccess.php';
include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
ilLPStatusWrapper::_updateStatus(ilObjTest::_getObjectIDFromActiveID((int) $active_id), ilObjTestAccess::_getParticipantId((int) $active_id));
}
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.assFileUpload.php
示例20: delete
/**
* delete SCORM learning module and all related data
*
* this method has been tested on may 9th 2004
* meta data, scorm lm data, scorm tree, scorm objects (organization(s),
* manifest, resources and items), tracking data and data directory
* have been deleted correctly as desired
*
* @access public
* @return boolean true if all object data were removed; false if only a references were removed
*/
function delete()
{
global $ilDB, $ilLog;
// always call parent delete function first!!
if (!parent::delete()) {
return false;
}
// delete meta data of scorm content object
/*
$nested = new ilNestedSetXML();
$nested->init($this->getId(), $this->getType());
$nested->deleteAllDBData();
*/
$this->deleteMetaData();
// delete data directory
ilUtil::delDir($this->getDataDirectory());
// delete scorm learning module record
$ilDB->manipulateF('DELETE FROM sahs_lm WHERE id = %s', array('integer'), array($this->getId()));
// delete aicc data
$res = $ilDB->queryF('
SELECT * FROM aicc_object, aicc_units
WHERE aicc_object.obj_id = aicc_units.obj_id
AND aicc_object.slm_id = %s', array('integer'), array($this->getId()));
while ($row = $ilDB->fetchAssoc($res)) {
$obj_id = $row['obj_id'];
$ilDB->manipulateF('
DELETE FROM aicc_units WHERE obj_id = %s', array('integer'), array($obj_id));
}
$res = $ilDB->queryF('
SELECT * FROM aicc_object, aicc_course
WHERE aicc_object.obj_id = aicc_course.obj_id
AND aicc_object.slm_id = %s', array('integer'), array($this->getId()));
while ($row = $ilDB->fetchAssoc($res)) {
$obj_id = $row['obj_id'];
$ilDB->manipulateF('
DELETE FROM aicc_course WHERE obj_id = %s', array('integer'), array($obj_id));
}
$ilDB->manipulateF('DELETE FROM scorm_tree WHERE slm_id = %s', array('integer'), array($this->getId()));
$ilDB->manipulateF('DELETE FROM aicc_object WHERE slm_id = %s', array('integer'), array($this->getId()));
$q_log = "DELETE FROM scorm_tracking WHERE obj_id = " . $ilDB->quote($this->getId());
$ilLog->write("SAHS Delete (AICC LM): " . $q_log);
$ilDB->manipulateF('DELETE FROM scorm_tracking WHERE obj_id = %s', array('integer'), array($this->getId()));
// update learning progress status
include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
ilLPStatusWrapper::_refreshStatus($this->getId());
// always call parent delete function at the end!!
return true;
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:59,代码来源:class.ilObjAICCLearningModule.php
注:本文中的ilLPStatusWrapper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论