|
@@ -550,6 +550,23 @@ class CriteriaController extends \BaseController
|
550
|
550
|
}
|
551
|
551
|
}
|
552
|
552
|
}
|
|
553
|
+
|
|
554
|
+ public function index()
|
|
555
|
+ {
|
|
556
|
+ // el ID de los semestres que el usuario tiene seleccionado.
|
|
557
|
+ $semesters_ids = Session::get('semesters_ids');
|
|
558
|
+ // buscar informacion de los semestres seleccionados
|
|
559
|
+ $semesters = Semester::whereIn('id', $semesters_ids)->get();
|
|
560
|
+
|
|
561
|
+ $title = "Learning Outcomes and Criteria";
|
|
562
|
+ $outcomes = Outcome::orderBy('name', 'ASC')->get();
|
|
563
|
+ $schools = School::orderBy('name', 'ASC')->get();
|
|
564
|
+ $criteria = Criterion::withTrashed()->orderBy('name', 'ASC')->get();
|
|
565
|
+
|
|
566
|
+ // se annadio la nueva variable
|
|
567
|
+ return View::make('global.view-learning-outcomes-criteria', compact('title', 'outcomes', 'schools', 'criteria', 'semesters'));
|
|
568
|
+ }
|
|
569
|
+
|
553
|
570
|
// copie index() y lo edite
|
554
|
571
|
public function objectivesIndex()
|
555
|
572
|
{
|
|
@@ -585,63 +602,6 @@ class CriteriaController extends \BaseController
|
585
|
602
|
|
586
|
603
|
return View::make('global.view-objectives-criteria', compact('title', 'objectives'));
|
587
|
604
|
}
|
588
|
|
- public function index()
|
589
|
|
- {
|
590
|
|
- // el ID de los semestres que el usuario tiene seleccionado.
|
591
|
|
- $semesters_ids = Session::get('semesters_ids');
|
592
|
|
- // buscar informacion de los semestres seleccionados
|
593
|
|
- $semesters = Semester::whereIn('id',$semesters_ids)->get();
|
594
|
|
-
|
595
|
|
- $title = "Learning Outcomes and Criteria";
|
596
|
|
- $outcomes = Outcome::orderBy('name', 'ASC')->get();
|
597
|
|
- $schools = School::orderBy('name', 'ASC')->get();
|
598
|
|
- $criteria = Criterion::withTrashed()->orderBy('name', 'ASC')->get();
|
599
|
|
-
|
600
|
|
- // se annadio la nueva variable
|
601
|
|
- return View::make('global.view-learning-outcomes-criteria', compact('title', 'outcomes', 'schools', 'criteria', 'semesters'));
|
602
|
|
-
|
603
|
|
- }
|
604
|
|
-
|
605
|
|
- // copie index() y lo edite
|
606
|
|
- public function objectivesIndex()
|
607
|
|
- {
|
608
|
|
- if(Auth::user()->role==1)
|
609
|
|
- {
|
610
|
|
- //uscar todos los objetivos
|
611
|
|
- $objectives = DB::table('program_user')
|
612
|
|
- ->join('objectives','objectives.program_id','=','program_user.program_id')
|
613
|
|
- ->join('programs','programs.id','=','program_user.program_id')
|
614
|
|
- ->select('objectives.id','objectives.text','programs.name')
|
615
|
|
- ->orderBy('objectives.text', 'asc')
|
616
|
|
- ->get();
|
617
|
|
- }
|
618
|
|
- elseif(Auth::user()->role==2)
|
619
|
|
- {
|
620
|
|
- //buscar los objetivos de la departamento (school)
|
621
|
|
- $objectives = DB::table('program_user')
|
622
|
|
- ->join('objectives','objectives.program_id','=','program_user.program_id')
|
623
|
|
- ->join('programs','programs.id','=','program_user.program_id')
|
624
|
|
- ->where('programs.school_id',Auth::user()->school_id)
|
625
|
|
- ->select('objectives.id','objectives.text','programs.name')
|
626
|
|
- ->orderBy('objectives.text', 'asc')
|
627
|
|
- ->get();
|
628
|
|
- }
|
629
|
|
- elseif((Auth::user()->role==3) || (Auth::user()->role==4))
|
630
|
|
- {
|
631
|
|
- //buscar los objetivos de los programas cuales el profesor esta
|
632
|
|
- $objectives = DB::table('program_user')
|
633
|
|
- ->join('objectives','objectives.program_id','=','program_user.program_id')
|
634
|
|
- ->join('programs','programs.id','=','program_user.program_id')
|
635
|
|
- ->where('program_user.user_id',Auth::user()->id)
|
636
|
|
- ->select('objectives.id','objectives.text','programs.name')
|
637
|
|
- ->orderBy('objectives.text', 'asc')
|
638
|
|
- ->get();
|
639
|
|
- }
|
640
|
|
-
|
641
|
|
- $title = "Learning Objectives and Criteria";
|
642
|
|
-
|
643
|
|
- return View::make('global.view-objectives-criteria', compact('title', 'objectives'));
|
644
|
|
- }
|
645
|
605
|
|
646
|
606
|
public function destroy()
|
647
|
607
|
{
|