Exemple #1
0
 /**
  * 删除授课教师AJAX方法
  * @param   string      $ct_id_str  形如1,2,3的ID列表字符串
  */
 public function removeSchoolTeacherFunc($ct_id_str)
 {
     $resp = new AjaxResponse();
     if (!$this->check_power_new('school_deleteteacher', false)) {
         $resp->alert('您没有权限执行该功能');
         return $resp;
     }
     try {
         SchoolModel::removeSchoolTeacher($ct_id_str);
         admin_log('delete', 'school_teacher', "ct_id: {$ct_id_str}");
         $resp->call('location.reload');
     } catch (Exception $e) {
         $resp->alert($e->getMessage());
     }
     return $resp;
 }