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,7 +58,7 @@ class Objective2Controller extends \BaseController
58 58
 
59 59
 			),
60 60
 			array(
61
-				'text' => 'required|string',
61
+				'text' => 'required|string|unique:objectives',
62 62
 
63 63
 				'outcome_id' => 'required|array',
64 64
 				'program_id' => 'required|array'

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

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