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


PHP ilCourseParticipants::_deleteAllEntries方法代码示例

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


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

示例1: delete

 /**
  * delete course and all related data	
  *
  * @access	public
  * @return	boolean	true if all object data were removed; false if only a references were removed
  */
 function delete()
 {
     global $ilAppEventHandler;
     // always call parent delete function first!!
     if (!parent::delete()) {
         return false;
     }
     // delete meta data
     $this->deleteMetaData();
     // put here course specific stuff
     $this->__deleteSettings();
     include_once 'Modules/Course/classes/class.ilCourseParticipants.php';
     ilCourseParticipants::_deleteAllEntries($this->getId());
     $this->initCourseArchiveObject();
     $this->archives_obj->deleteAll();
     include_once './Modules/Course/classes/class.ilCourseObjective.php';
     ilCourseObjective::_deleteAll($this->getId());
     include_once './Modules/Course/classes/class.ilObjCourseGrouping.php';
     ilObjCourseGrouping::_deleteAll($this->getId());
     include_once './Modules/Course/classes/class.ilCourseFile.php';
     ilCourseFile::_deleteByCourse($this->getId());
     include_once 'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php';
     ilCourseDefinedFieldDefinition::_deleteByContainer($this->getId());
     $ilAppEventHandler->raise('Modules/Course', 'delete', array('object' => $this, 'obj_id' => $this->getId(), 'appointments' => $this->prepareAppointments('delete')));
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:32,代码来源:class.ilObjCourse.php

示例2: updateCourse

 function updateCourse($sid, $course_id, $xml)
 {
     $this->initAuth($sid);
     $this->initIlias();
     if (!$this->__checkSession($sid)) {
         return $this->__raiseError($this->__getMessage(), $this->__getMessageCode());
     }
     if (!is_numeric($course_id)) {
         return $this->__raiseError('No valid course id given. Please choose an existing reference id of an ILIAS course', 'Client');
     }
     global $rbacsystem;
     if (($obj_type = ilObject::_lookupType(ilObject::_lookupObjId($course_id))) != 'crs') {
         $course_id = end($ref_ids = ilObject::_getAllReferences($course_id));
         if (ilObject::_lookupType(ilObject::_lookupObjId($course_id)) != 'crs') {
             return $this->__raiseError('Invalid course id. Object with id "' . $course_id . '" is not of type "course"', 'Client');
         }
     }
     if (!($tmp_course = ilObjectFactory::getInstanceByRefId($course_id, false))) {
         return $this->__raiseError('Cannot create course instance!', 'Server');
     }
     if (!$rbacsystem->checkAccess('write', $course_id)) {
         return $this->__raiseError('Check access failed. No permission to write course', 'Server');
     }
     // First delete old meta data
     include_once 'Services/MetaData/classes/class.ilMD.php';
     $md = new ilMD($tmp_course->getId(), 0, 'crs');
     $md->deleteAll();
     include_once 'Modules/Course/classes/class.ilCourseParticipants.php';
     ilCourseParticipants::_deleteAllEntries($tmp_course->getId());
     include_once 'Modules/Course/classes/class.ilCourseWaitingList.php';
     ilCourseWaitingList::_deleteAll($tmp_course->getId());
     include_once 'Modules/Course/classes/class.ilCourseXMLParser.php';
     $xml_parser = new ilCourseXMLParser($tmp_course);
     $xml_parser->setXMLContent($xml);
     $xml_parser->startParsing();
     $tmp_course->MDUpdateListener('General');
     return true;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:38,代码来源:class.ilSoapCourseAdministration.php


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