浏览代码

Edit de backup

父节点
当前提交
64ad8ea783
共有 3 个文件被更改,包括 27 次插入65 次删除
  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 查看文件

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

+ 17
- 57
app/controllers/CriteriaController.php 查看文件

@@ -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
     {

+ 8
- 6
composer.json 查看文件

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