当前位置: 首页>>代码示例>>PHP>>正文


PHP ilLPStatusWrapper::_refreshStatus方法代码示例

本文整理汇总了PHP中ilLPStatusWrapper::_refreshStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP ilLPStatusWrapper::_refreshStatus方法的具体用法?PHP ilLPStatusWrapper::_refreshStatus怎么用?PHP ilLPStatusWrapper::_refreshStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilLPStatusWrapper的用法示例。


在下文中一共展示了ilLPStatusWrapper::_refreshStatus方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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

示例2: delete

 function delete()
 {
     global $ilDB, $ilLog;
     parent::delete();
     $ilDB->manipulateF('DELETE FROM sc_item WHERE obj_id = %s', array('integer'), array($this->getId()));
     $ilLog->write("SAHS Delete(ScormItem): " . 'DELETE FROM scorm_tracking WHERE sco_id = ' . $this->getId() . ' AND obj_id = ' . $this->getSLMId());
     $ilDB->manipulateF('DELETE FROM scorm_tracking WHERE sco_id = %s AND obj_id = %s', array('integer', 'integer'), array($this->getId(), $this->getSLMId()));
     include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
     ilLPStatusWrapper::_refreshStatus($this->getSLMId());
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:10,代码来源:class.ilSCORMItem.php

示例3: importRaw

    /**
     * Import raw data
     * @global ilDB $ilDB
     * @global ilObjUser $ilUser
     * @param string $a_file
     * @return void 
     */
    private function importRaw($a_file)
    {
        global $ilDB, $ilUser, $lng;
        $lng->loadLanguageModule("scormtrac");
        $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);
            if ($data['Userid']) {
                $user_id = $this->parseUserId($data['Userid']);
            } else {
                if ($data[$lng->txt("user")]) {
                    if (is_int($data[$lng->txt("user")])) {
                        $user_id = $data[$lng->txt("user")];
                    }
                }
            }
            if ($data[$lng->txt("login")]) {
                $user_id = $this->get_user_id($data[$lng->txt("login")]);
            }
            if (!$user_id) {
                continue;
            }
            if ($data['Scoid']) {
                $il_sco_id = $this->lookupSCOId($data['Scoid']);
            }
            if ($data[$lng->txt("identifierref")]) {
                $il_sco_id = $this->lookupSCOId($data[$lng->txt("identifierref")]);
            }
            if (!$il_sco_id) {
                continue;
            }
            $c_timestamp = "";
            if ($data['Timestamp']) {
                $c_timestamp = $data['Timestamp'];
            }
            if ($data[$lng->txt("c_timestamp")]) {
                $c_timestamp = $data[$lng->txt("c_timestamp")];
            }
            if ($c_timestamp == "") {
                $date = new DateTime();
                $c_timestamp = $date->getTimestamp();
            }
            if (!$data['Key']) {
                continue;
            }
            if (!$data['Value']) {
                $data['Value'] = "";
            }
            //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', $c_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'])));
                }
            }
            $package_attempts = 1;
            if ($il_sco_id == 0) {
                if ($data['Key'] == "package_attempts") {
                    $package_attempts = $data['Value'];
                }
            }
            //UK determineStatus, percentage_completed and syncGlobalStatus
        }
        fclose($fhandle);
        include_once './Services/Tracking/classes/class.ilLPStatusWrapper.php';
        ilLPStatusWrapper::_refreshStatus($this->getId());
        return 0;
    }
开发者ID:bheyser,项目名称:qplskl,代码行数:84,代码来源:class.ilObjSCORMLearningModule.php

示例4: removeCMIData

    public function removeCMIData()
    {
        global $ilDB;
        //cmi nodes
        $cmi_nodes = array();
        $res = $ilDB->queryF('
			SELECT cmi_node.cmi_node_id 
			FROM cmi_node, cp_node 
			WHERE cp_node.slm_id = %s AND cmi_node.cp_node_id = cp_node.cp_node_id', array('integer'), array($this->packageId));
        while ($data = $ilDB->fetchAssoc($res)) {
            $cmi_node_values[] = $data['cmi_node_id'];
        }
        //cmi interaction nodes
        $cmi_inodes = array();
        $res = $ilDB->queryF('
			SELECT cmi_interaction.cmi_interaction_id 
			FROM cmi_interaction, cmi_node, cp_node 
			WHERE (cp_node.slm_id = %s
			AND cmi_node.cp_node_id = cp_node.cp_node_id
			AND cmi_node.cmi_node_id = cmi_interaction.cmi_node_id)', array('integer'), array($this->packageId));
        while ($data = $ilDB->fetchAssoc($res)) {
            $cmi_inode_values[] = $data['cmi_interaction_id'];
        }
        //response
        $query = 'DELETE FROM cmi_correct_response WHERE ' . $ilDB->in('cmi_correct_response.cmi_interaction_id', $cmi_inode_values, false, 'integer');
        $ilDB->manipulate($query);
        //objective interaction
        $query = 'DELETE FROM cmi_objective WHERE ' . $ilDB->in('cmi_objective.cmi_interaction_id', $cmi_inode_values, false, 'integer');
        $ilDB->manipulate($query);
        //objective
        $query = 'DELETE FROM cmi_objective WHERE ' . $ilDB->in('cmi_objective.cmi_node_id', $cmi_node_values, false, 'integer');
        $ilDB->manipulate($query);
        //interaction
        $query = 'DELETE FROM cmi_interaction WHERE ' . $ilDB->in('cmi_interaction.cmi_node_id', $cmi_node_values, false, 'integer');
        $ilDB->manipulate($query);
        //comment
        $query = 'DELETE FROM cmi_comment WHERE ' . $ilDB->in('cmi_comment.cmi_node_id', $cmi_node_values, false, 'integer');
        $ilDB->manipulate($query);
        //node
        $query = 'DELETE FROM cmi_node WHERE ' . $ilDB->in('cmi_node.cmi_node_id', $cmi_node_values, false, 'integer');
        $ilDB->manipulate($query);
        //custom
        $query = 'DELETE FROM cmi_custom WHERE obj_id = %s';
        $ilDB->manipulateF($query, array('integer'), array($this->packageId));
        //g_objective
        $query = 'DELETE FROM cmi_gobjective WHERE scope_id = %s';
        $ilDB->manipulateF($query, array('integer'), array($this->packageId));
        include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
        ilLPStatusWrapper::_refreshStatus($this->packageId);
    }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:50,代码来源:ilSCORM13Package.php

示例5: insert

 function insert()
 {
     global $ilDB, $ilLog;
     $ilLog->logStack();
     $query = "INSERT INTO ut_lp_settings (obj_id,obj_type,u_mode,visits) " . "VALUES(" . $ilDB->quote($this->getObjId(), 'integer') . ", " . $ilDB->quote($this->getObjType(), 'text') . ", " . $ilDB->quote($this->getMode(), 'integer') . ", " . $ilDB->quote(0, 'integer') . ")";
     $res = $ilDB->manipulate($query);
     $this->__read();
     // refresh learning progress
     include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
     ilLPStatusWrapper::_refreshStatus($this->getObjId());
     return true;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:12,代码来源:class.ilLPObjSettings.php

示例6: 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

示例7: delete

    function delete()
    {
        global $ilDB, $ilLog;
        parent::delete();
        $statement = $ilDB->manipulateF('DELETE FROM aicc_course WHERE obj_id = %s', array('integer'), array($this->getId()));
        $statement = $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,代码行数:13,代码来源:class.ilAICCCourse.php

示例8: removeCMIData

 public function removeCMIData()
 {
     include_once "./Modules/Scorm2004/classes/class.ilSCORM2004DeleteData.php";
     ilSCORM2004DeleteData::removeCMIDataForPackage($this->packageId);
     include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
     ilLPStatusWrapper::_refreshStatus($this->packageId);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:7,代码来源:ilSCORM13Package.php

示例9: updateParentCollections

 protected final function updateParentCollections()
 {
     global $ilDB;
     include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
     // update parent collections?
     $set = $ilDB->query("SELECT ut_lp_collections.obj_id obj_id FROM " . "object_reference JOIN ut_lp_collections ON " . "(object_reference.obj_id = " . $ilDB->quote($this->obj_id, "integer") . " AND object_reference.ref_id = ut_lp_collections.item_id)");
     while ($rec = $ilDB->fetchAssoc($set)) {
         if (in_array(ilObject::_lookupType($rec["obj_id"]), array("crs", "grp", "fold"))) {
             // remove from parent collection
             $query = "DELETE FROM ut_lp_collections" . " WHERE obj_id = " . $ilDB->quote($rec["obj_id"], "integer") . " AND item_id = " . $ilDB->quote($this->obj_id, "integer");
             $ilDB->manipulate($query);
             ilLPStatusWrapper::_refreshStatus($rec["obj_id"]);
         }
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:15,代码来源:class.ilObjectLP.php

示例10: confirmDeleteSelectedUserDataObject

 /**
  * Deletes the selected user data for the test object
  *
  * Deletes the selected user data for the test object
  *
  * @access	public
  */
 function confirmDeleteSelectedUserDataObject()
 {
     $active_ids = array();
     foreach ($_POST["chbUser"] as $active_id) {
         if ($this->object->getFixedParticipants()) {
             array_push($active_ids, $this->object->getActiveIdOfUser($active_id));
         } else {
             array_push($active_ids, $active_id);
         }
     }
     $this->object->removeSelectedTestResults($active_ids);
     // Update lp status
     include_once './Services/Tracking/classes/class.ilLPStatusWrapper.php';
     ilLPStatusWrapper::_refreshStatus($this->object->getId());
     ilUtil::sendSuccess($this->lng->txt("tst_selected_user_data_deleted"), true);
     $this->ctrl->redirect($this, "participants");
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:24,代码来源:class.ilObjTestGUI.php

示例11: deleteProgress

 /**
  * Delete progress of users and objects
  * Implemented for 
  */
 public function deleteProgress($sid, $ref_ids, $usr_ids, $type_filter, $progress_filter)
 {
     $this->initAuth($sid);
     $this->initIlias();
     // Check session
     if (!$this->__checkSession($sid)) {
         return $this->__raiseError($this->__getMessage(), $this->__getMessageCode());
     }
     // Check filter
     if (array_diff((array) $type_filter, self::$DELETE_PROGRESS_FILTER_TYPES)) {
         return $this->__raiseError('Invalid filter type given', 'Client');
     }
     include_once 'Services/User/classes/class.ilObjUser.php';
     if (!in_array(self::USER_FILTER_ALL, $usr_ids) and !ilObjUser::userExists($usr_ids)) {
         return $this->__raiseError('Invalid user ids given', 'Client');
     }
     $valid_refs = array();
     foreach ((array) $ref_ids as $ref_id) {
         $obj_id = ilObject::_lookupObjId($ref_id);
         $type = ilObject::_lookupType($obj_id);
         // All containers
         if ($GLOBALS['objDefinition']->isContainer($type)) {
             $all_sub_objs = array();
             foreach ($type_filter as $type_filter_item) {
                 $sub_objs = $GLOBALS['tree']->getSubTree($GLOBALS['tree']->getNodeData($ref_id), false, $type_filter_item);
                 $all_sub_objs = array_merge($all_sub_objs, $sub_objs);
             }
             foreach ($all_sub_objs as $child_ref) {
                 $child_type = ilObject::_lookupType(ilObject::_lookupObjId($child_ref));
                 if (!$GLOBALS['ilAccess']->checkAccess('write', '', $child_ref)) {
                     return $this->__raiseError('Permission denied for : ' . $ref_id . ' -> type ' . $type, 'Client');
                 }
                 $valid_refs[] = $child_ref;
             }
         } elseif (in_array($type, $type_filter)) {
             if (!$GLOBALS['ilAccess']->checkAccess('write', '', $ref_id)) {
                 return $this->__raiseError('Permission denied for : ' . $ref_id . ' -> type ' . $type, 'Client');
             }
             $valid_refs[] = $ref_id;
         } else {
             return $this->__raiseError('Invalid object type given for : ' . $ref_id . ' -> type ' . $type, 'Client');
         }
     }
     // Delete tracking data
     foreach ($valid_refs as $ref_id) {
         include_once './classes/class.ilObjectFactory.php';
         $obj = ilObjectFactory::getInstanceByRefId($ref_id, false);
         if (!$obj instanceof ilObject) {
             return $this->__raiseError('Invalid reference id given : ' . $ref_id . ' -> type ' . $type, 'Client');
         }
         // filter users
         $valid_users = $this->applyProgressFilter($obj->getId(), (array) $usr_ids, (array) $progress_filter);
         switch ($obj->getType()) {
             case 'sahs':
                 include_once './Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
                 $subtype = ilObjSAHSLearningModule::_lookupSubType($obj->getId());
                 switch ($subtype) {
                     case 'scorm':
                         $this->deleteScormTracking($obj->getId(), (array) $valid_users);
                         break;
                     case 'scorm2004':
                         $this->deleteScorm2004Tracking($obj->getId(), (array) $valid_users);
                         break;
                 }
                 break;
             case 'tst':
                 foreach ((array) $valid_users as $usr_id) {
                     $obj->removeTestResultsForUser($usr_id);
                 }
                 break;
         }
         // Refresh status
         include_once './Services/Tracking/classes/class.ilLPStatusWrapper.php';
         ilLPStatusWrapper::_refreshStatus($obj->getId());
     }
     return true;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:81,代码来源:class.ilSoapLearningProgressAdministration.php

示例12: updateTLT

 protected function updateTLT()
 {
     include_once "Services/MetaData/classes/class.ilMD.php";
     foreach ($_POST['tlt'] as $item_id => $item) {
         $md_obj = new ilMD($this->getObjId(), $item_id, 'st');
         if (!is_object($md_section = $md_obj->getEducational())) {
             $md_section = $md_obj->addEducational();
             $md_section->save();
         }
         $md_section->setPhysicalTypicalLearningTime((int) $item['mo'], (int) $item['d'], (int) $item['h'], (int) $item['m'], 0);
         $md_section->update();
     }
     // refresh learning progress
     include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
     ilLPStatusWrapper::_refreshStatus($this->getObjId());
     ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
     $this->ctrl->redirect($this, 'show');
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:18,代码来源:class.ilLPListOfSettingsGUI.php

示例13: updateCondition

 function updateCondition()
 {
     global $ilObjDataCache;
     if (!$_GET['condition_id']) {
         ilUtil::sendFailure("Missing id: condition_id");
         $this->listConditions();
         return false;
     }
     // Update condition
     include_once './Services/AccessControl/classes/class.ilConditionHandler.php';
     $condition_handler = new ilConditionHandler();
     $condition = ilConditionHandler::_getCondition((int) $_GET['condition_id']);
     $condition_handler->setOperator($_POST['operator']);
     $condition_handler->setObligatory((int) $_POST['obligatory']);
     $condition_handler->setTargetRefId($this->getTargetRefId());
     $condition_handler->setValue('');
     switch ($this->getTargetType()) {
         case 'st':
             $condition_handler->setReferenceHandlingType($_POST['ref_handling']);
             break;
         default:
             $condition_handler->setReferenceHandlingType(ilConditionHandler::UNIQUE_CONDITIONS);
             break;
     }
     $condition_handler->updateCondition($condition['id']);
     // Update relevant sco's
     if ($condition['trigger_type'] == 'sahs') {
         include_once 'Services/Object/classes/class.ilObjectLP.php';
         $olp = ilObjectLP::getInstance($condition['trigger_obj_id']);
         $collection = $olp->getCollectionInstance();
         if ($collection) {
             $collection->delete();
         }
         if (is_array($_POST['item_ids'])) {
             $collection->activateEntries($_POST['item_ids']);
         }
         include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
         ilLPStatusWrapper::_refreshStatus($condition['trigger_obj_id']);
     }
     ilUtil::sendSuccess($this->lng->txt('settings_saved'));
     $this->ctrl->redirect($this, 'listConditions');
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:42,代码来源:class.ilConditionHandlerGUI.php

示例14: doLPRefresh

 protected function doLPRefresh()
 {
     // refresh learning progress
     include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
     ilLPStatusWrapper::_refreshStatus($this->getObjId());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:6,代码来源:class.ilLPObjSettings.php

示例15: _deleteAll

 function _deleteAll($course_id)
 {
     global $ilDB;
     // begin-patch lok
     $ids = ilCourseObjective::_getObjectiveIds($course_id, false);
     // end-patch lok
     if (!count($ids)) {
         return true;
     }
     $in = $ilDB->in('objective_id', $ids, false, 'integer');
     $query = "DELETE FROM crs_objective_lm WHERE  " . $in;
     $res = $ilDB->manipulate($query);
     $query = "DELETE FROM crs_objective_tst WHERE " . $in;
     $res = $ilDB->manipulate($query);
     $query = "DELETE FROM crs_objective_qst WHERE " . $in;
     $res = $ilDB->manipulate($query);
     $query = "DELETE FROM crs_objectives WHERE crs_id = " . $ilDB->quote($course_id, 'integer');
     $res = $ilDB->manipulate($query);
     // refresh learning progress status after deleting objectives
     include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
     ilLPStatusWrapper::_refreshStatus($course_id);
     return true;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:23,代码来源:class.ilCourseObjective.php


注:本文中的ilLPStatusWrapper::_refreshStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。