本文整理汇总了PHP中student::delete_records方法的典型用法代码示例。如果您正苦于以下问题:PHP student::delete_records方法的具体用法?PHP student::delete_records怎么用?PHP student::delete_records使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类student
的用法示例。
在下文中一共展示了student::delete_records方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete()
{
global $CFG;
$muser = $this->get_moodleuser();
if (empty($muser) || !is_primary_admin($muser->id)) {
// delete associated data
require_once elis::lib('data/data_filter.class.php');
$filter = new field_filter('userid', $this->id);
curriculumstudent::delete_records($filter, $this->_db);
student::delete_records($filter, $this->_db);
student_grade::delete_records($filter, $this->_db);
waitlist::delete_records($filter, $this->_db);
instructor::delete_records($filter, $this->_db);
usertrack::delete_records($filter, $this->_db);
clusterassignment::delete_records($filter, $this->_db);
//delete association to Moodle user, if applicable
require_once elispm::lib('data/usermoodle.class.php');
$filter = new field_filter('cuserid', $this->id);
usermoodle::delete_records($filter, $this->_db);
// Delete Moodle user.
if (!empty($muser)) {
delete_user($muser);
}
parent::delete();
$context = \local_elisprogram\context\user::instance($this->id);
$context->delete();
}
}
示例2: delete
function delete()
{
if (!empty($this->id)) {
//clean make the delete cascade into association records
$filter = new field_filter('classid', $this->id);
instructor::delete_records($filter, $this->_db);
student::delete_records($filter, $this->_db);
trackassignment::delete_records($filter, $this->_db);
classmoodlecourse::delete_records($filter, $this->_db);
student_grade::delete_records($filter, $this->_db);
waitlist::delete_records($filter, $this->_db);
parent::delete();
$context = \local_elisprogram\context\pmclass::instance($this->id);
$context->delete();
}
}