Browse Source

Resuelve bug de objetivos con el mismo nombre y pone en orden los semestres en 3yp

parent
commit
47991a8c57

+ 1
- 1
app/controllers/Objective2Controller.php View File

58
 
58
 
59
 			),
59
 			),
60
 			array(
60
 			array(
61
-				'text' => 'required|string',
61
+				'text' => 'required|string|unique:objectives',
62
 
62
 
63
 				'outcome_id' => 'required|array',
63
 				'outcome_id' => 'required|array',
64
 				'program_id' => 'required|array'
64
 				'program_id' => 'required|array'

+ 2
- 0
app/controllers/ThreeYearPlanController.php View File

339
           ->where('typ_semester_outcome.typ_program_id', $typ_program_id)
339
           ->where('typ_semester_outcome.typ_program_id', $typ_program_id)
340
           ->where('typ_semester_outcome.outcome_id', $outcome_->id)
340
           ->where('typ_semester_outcome.outcome_id', $outcome_->id)
341
           ->select('typ_semester_outcome.id', 'typ_semester_outcome.semester_id', 'semesters.code', 'semesters.name')
341
           ->select('typ_semester_outcome.id', 'typ_semester_outcome.semester_id', 'semesters.code', 'semesters.name')
342
+          ->orderBy('semesters.code')
342
           ->get();
343
           ->get();
343
         // buscar info sobre selected_semsters
344
         // buscar info sobre selected_semsters
344
         $outcome_->selected_semesters = array();
345
         $outcome_->selected_semesters = array();
430
           ->where('typ_semester_outcome.typ_program_id', $typ_program_id)
431
           ->where('typ_semester_outcome.typ_program_id', $typ_program_id)
431
           ->where('typ_semester_outcome.outcome_id', $outcome_->id)
432
           ->where('typ_semester_outcome.outcome_id', $outcome_->id)
432
           ->select('typ_semester_outcome.id', 'typ_semester_outcome.semester_id', 'semesters.code', 'semesters.name')
433
           ->select('typ_semester_outcome.id', 'typ_semester_outcome.semester_id', 'semesters.code', 'semesters.name')
434
+          ->orderBy('semesters.code')
433
           ->get();
435
           ->get();
434
         // buscar info sobre selected_semsters
436
         // buscar info sobre selected_semsters
435
         $outcome_->selected_semesters = array();
437
         $outcome_->selected_semesters = array();