예제 #1
0
 public static function getTeamsSolvedTask($task_id)
 {
     return AcceptedRequests::find()->joinWith("user")->where(["task_id" => $task_id])->all();
 }
예제 #2
0
 /**
  * Lists all AcceptedRequests models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => AcceptedRequests::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
예제 #3
0
 public function getSolvedTasks()
 {
     $tasks = AcceptedRequests::find()->where(['user_id' => $this->id])->all();
     $data = [];
     foreach ($tasks as $task) {
         $data[$task->task_id] = 1;
     }
     return $data;
 }