Example #1
0
 /**
  * [getTrainIdByUserid description]
  * @param  [type] $userid   [description]
  * @param  [type] $courseid [description]
  * @return [type]           [description]
  */
 public function getTrainIdByUserid($userid, $courseid)
 {
     $rs = UserTraining::where('userid', '=', $userid)->where('training_id', '=', $courseid)->get();
     return $rs;
 }
Example #2
0
 public function courseReport($keyword = "", $flag = "", $type = "")
 {
     $training = new UserTraining();
     if ($keyword == '' and $type == '') {
         return View::make('train.reportcourse');
     } else {
         if ($keyword != '' and $flag == '') {
             $rs = $training->getUserTrainByCourseName($keyword);
             return View::make('train.reportcourse_ajax')->with('rs', $rs)->with('keyword', $keyword);
         } else {
             $rs = $training->getUserTrainByCourseName($keyword);
             $this->keyword = $keyword;
             $this->exportXls($rs, $type);
         }
     }
 }