Browse Source

eliminar repeticion

parent
commit
b571f0ee75
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      app/models/Activity.php

+ 3
- 1
app/models/Activity.php View File

114
     $activity_criterion = DB::table('activity_criterion')
114
     $activity_criterion = DB::table('activity_criterion')
115
       ->join('criteria', 'criteria.id', '=', 'activity_criterion.criterion_id')
115
       ->join('criteria', 'criteria.id', '=', 'activity_criterion.criterion_id')
116
       ->where('activity_id', $this->id)
116
       ->where('activity_id', $this->id)
117
+      ->select('activity_criterion.activity_id', 'activity_criterion.criterion_id', 'criteria.*')
118
+      ->distinct()
117
       ->get();
119
       ->get();
118
 
120
 
119
 
121
 
404
     //return json_decode($this->outcomes_attempted, true);
406
     //return json_decode($this->outcomes_attempted, true);
405
     return $outcomes_attempted;
407
     return $outcomes_attempted;
406
   }
408
   }
407
-}
409
+}