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


PHP student::delete_records方法代码示例

本文整理汇总了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();
     }
 }
开发者ID:jamesmcq,项目名称:elis,代码行数:28,代码来源:user.class.php

示例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();
     }
 }
开发者ID:jamesmcq,项目名称:elis,代码行数:16,代码来源:pmclass.class.php


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