Browse Source

Edit de backup

parent
commit
64ad8ea783
3 changed files with 27 additions and 65 deletions
  1. 2
    2
      app/config/app.php
  2. 17
    57
      app/controllers/CriteriaController.php
  3. 8
    6
      composer.json

+ 2
- 2
app/config/app.php View File

125
 		'Illuminate\Workbench\WorkbenchServiceProvider',
125
 		'Illuminate\Workbench\WorkbenchServiceProvider',
126
 		'Way\Generators\GeneratorsServiceProvider',
126
 		'Way\Generators\GeneratorsServiceProvider',
127
 		'Barryvdh\DomPDF\ServiceProvider',
127
 		'Barryvdh\DomPDF\ServiceProvider',
128
-		'Cornford\Backup\Providers\BackupServiceProvider',
128
+		//'Cornford\Backup\Providers\BackupServiceProvider',
129
 		'Zizaco\Entrust\EntrustServiceProvider'
129
 		'Zizaco\Entrust\EntrustServiceProvider'
130
 
130
 
131
 	),
131
 	),
159
 		'App'               => 'Illuminate\Support\Facades\App',
159
 		'App'               => 'Illuminate\Support\Facades\App',
160
 		'Artisan'           => 'Illuminate\Support\Facades\Artisan',
160
 		'Artisan'           => 'Illuminate\Support\Facades\Artisan',
161
 		'Auth'              => 'Illuminate\Support\Facades\Auth',
161
 		'Auth'              => 'Illuminate\Support\Facades\Auth',
162
-		'Backup'	        => 'Cornford\Backup\Facades\Backup',
162
+		//'Backup'	        => 'Cornford\Backup\Facades\Backup',
163
 		'Blade'             => 'Illuminate\Support\Facades\Blade',
163
 		'Blade'             => 'Illuminate\Support\Facades\Blade',
164
 		'Cache'             => 'Illuminate\Support\Facades\Cache',
164
 		'Cache'             => 'Illuminate\Support\Facades\Cache',
165
 		'ClassLoader'       => 'Illuminate\Support\ClassLoader',
165
 		'ClassLoader'       => 'Illuminate\Support\ClassLoader',

+ 17
- 57
app/controllers/CriteriaController.php View File

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
     // copie index() y lo edite
570
     // copie index() y lo edite
554
     public function objectivesIndex()
571
     public function objectivesIndex()
555
     {
572
     {
585
 
602
 
586
         return View::make('global.view-objectives-criteria', compact('title', 'objectives'));
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
     public function destroy()
606
     public function destroy()
647
     {
607
     {

+ 8
- 6
composer.json View File

1
 {
1
 {
2
 	"name": "laravel/laravel",
2
 	"name": "laravel/laravel",
3
 	"description": "The Laravel Framework.",
3
 	"description": "The Laravel Framework.",
4
-	"keywords": ["framework", "laravel"],
4
+	"keywords": [
5
+		"framework",
6
+		"laravel"
7
+	],
5
 	"license": "MIT",
8
 	"license": "MIT",
6
 	"type": "project",
9
 	"type": "project",
7
 	"require": {
10
 	"require": {
8
 		"laravel/framework": "4.2.*",
11
 		"laravel/framework": "4.2.*",
9
 		"pda/pheanstalk": "~2.0",
12
 		"pda/pheanstalk": "~2.0",
10
 		"barryvdh/laravel-dompdf": "0.4.*",
13
 		"barryvdh/laravel-dompdf": "0.4.*",
11
-		 "zizaco/entrust": "1.2.*@dev",
12
-		"cornford/backup": "1.*"
13
-},
14
+		"zizaco/entrust": "1.2.*@dev"
15
+	},
14
 	"require-dev": {
16
 	"require-dev": {
15
 		"way/generators": "~2.0",
17
 		"way/generators": "~2.0",
16
 		"fzaninotto/faker": "1.5.*@dev",
18
 		"fzaninotto/faker": "1.5.*@dev",
17
 		"barryvdh/laravel-ide-helper": "1.11"
19
 		"barryvdh/laravel-ide-helper": "1.11"
18
-		},
20
+	},
19
 	"autoload": {
21
 	"autoload": {
20
 		"classmap": [
22
 		"classmap": [
21
 			"app/commands",
23
 			"app/commands",
43
 		"preferred-install": "dist"
45
 		"preferred-install": "dist"
44
 	},
46
 	},
45
 	"minimum-stability": "stable"
47
 	"minimum-stability": "stable"
46
-}
48
+}