Browse Source

asociar criterio y rubrica

parent
commit
ea351f0d47
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      app/controllers/CriteriaController.php

+ 3
- 2
app/controllers/CriteriaController.php View File

612
     public function objectivesIndex()
612
     public function objectivesIndex()
613
     {
613
     {
614
         if (Auth::user()->role == 1) {
614
         if (Auth::user()->role == 1) {
615
-            //uscar todos los objetivos
615
+            //buscar todos los objetivos
616
             $objectives = DB::table('program_user')
616
             $objectives = DB::table('program_user')
617
-                ->join('objectives', 'objectives.program_id', '=', 'program_user.program_id')
617
+                ->join('objective_program', 'objective_program.program_id', '=', 'program_user.program_id')
618
+                ->join('objectives', 'objectives.id', '=', 'objective_program.objective_id')
618
                 ->join('programs', 'programs.id', '=', 'program_user.program_id')
619
                 ->join('programs', 'programs.id', '=', 'program_user.program_id')
619
                 ->select('objectives.id', 'objectives.text', 'programs.name')
620
                 ->select('objectives.id', 'objectives.text', 'programs.name')
620
                 ->orderBy('objectives.text', 'asc')
621
                 ->orderBy('objectives.text', 'asc')