本文整理汇总了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;
}
示例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;
}