2 İşlemeler

Yazar SHA1 Mesaj Tarih
  onielm 390d314f37 Merge branch 'adaptar_a_bd_nueva' into merge-oniel-g-c 3 yıl önce
  Jose Quinones 52e7eeadda Quitando backupprovider 3 yıl önce

+ 73
- 0
app/config/packages/cornford/backup/config.php Dosyayı Görüntüle

@@ -0,0 +1,73 @@
1
+<?php
2
+
3
+return array(
4
+
5
+	/*
6
+	|--------------------------------------------------------------------------
7
+	| Enable Backup
8
+	|--------------------------------------------------------------------------
9
+	|
10
+	| Enable database backup.
11
+	|
12
+	*/
13
+	'enabled' => true,
14
+
15
+	/*
16
+	|--------------------------------------------------------------------------
17
+	| Path
18
+	|--------------------------------------------------------------------------
19
+	|
20
+	| A database backup path, absolute path, or path relative from public
21
+	| directory, a trailing slash is required.
22
+	|
23
+	*/
24
+	'path' => '../app/storage/backup/',
25
+
26
+	/*
27
+	|--------------------------------------------------------------------------
28
+	| Filename
29
+	|--------------------------------------------------------------------------
30
+	|
31
+	| A database export filename to use when exporting databases.
32
+	|
33
+	*/
34
+	'filename' => 'backup-' . date('Ymd-His'),
35
+
36
+	/*
37
+	|--------------------------------------------------------------------------
38
+	| Enable Compression
39
+	|--------------------------------------------------------------------------
40
+	|
41
+	| Enable backup compression using gzip. Requires gzencode/gzdecode.
42
+	|
43
+	*/
44
+	'compress' => true,
45
+
46
+	/*
47
+	|--------------------------------------------------------------------------
48
+	| Database Engine Processors
49
+	|--------------------------------------------------------------------------
50
+	|
51
+	| Set the database engines processor location, trailing slash is required.
52
+	|
53
+	*/
54
+	'processors' => array(
55
+		'mysql' => array(
56
+			'export' => '/usr/bin/',
57
+			'restore' => '/usr/bin/'
58
+		),
59
+		'pqsql' => array(
60
+			'export' => '/usr/bin/',
61
+			'restore' => '/usr/bin/'
62
+		),
63
+		'sqlite' => array(
64
+			'export' => null,
65
+			'restore' => null
66
+		),
67
+		'sqlsrv' => array(
68
+			'export' => '/usr/bin/',
69
+			'restore' => '/usr/bin/'
70
+		),
71
+	),
72
+
73
+);

+ 125
- 0
app/database/seeds/FillNewAssessmentActivityCriterion.php Dosyayı Görüntüle

@@ -0,0 +1,125 @@
1
+<?php
2
+
3
+class FillNewAssessmentActivityCriterion extends Seeder {
4
+
5
+    public function run()
6
+    {
7
+    
8
+//   DB::enableQueryLog();
9
+    	$activities=DB::table('activities')
10
+    					->join('new_rubric_activity', 'activities.id', '=', 'new_rubric_activity.activity_id')
11
+    					->join('rubrics', 'rubrics.id', '=', 'new_rubric_activity.rubric_id')
12
+    					->join('new_criterion_rubric', 'rubrics.id', '=', 'new_criterion_rubric.rubric_id')
13
+						->select('activities.*','rubrics.expected_percentage','rubrics.expected_points','new_criterion_rubric.criterion_id')
14
+						->orderBy('activities.id')
15
+						->orderBy('new_criterion_rubric.criterion_id')
16
+    					->get();
17
+//   DB::enableQueryLog();
18
+// 		dd(DB::getQueryLog());
19
+// 		exit();
20
+		$activity_antes=-1;
21
+		foreach ($activities as $activity)
22
+		{
23
+			$activity_id=$activity->id;
24
+			$expected_percentage_students_achieving=$activity->expected_percentage;
25
+			$transformative_actions=$activity->transforming_actions;
26
+			$assessment_comments=$activity->assessment_comments;
27
+			$expected_student_score=$activity->expected_points;
28
+			$criterion_id=$activity->criterion_id;
29
+// 			$datos=json_decode($activity->criteria_achieved, true);
30
+// 			$i=0;
31
+// 			foreach($datos as $criterion_id=>$score)
32
+// 			{
33
+			$existe_ya=DB::table('activity_criterion')->where('activity_id', $activity_id)->where('criterion_id', $criterion_id)->first();
34
+			if(empty($existe_ya))
35
+			{			
36
+				if($activity_antes==$activity_id)
37
+				{
38
+					DB::table('activity_criterion')->insert(
39
+					array("activity_id"=>$activity_id,
40
+						  "criterion_id"=>$criterion_id,
41
+						  "expected_percentage_students_achieving"=>$expected_percentage_students_achieving,
42
+						  "expected_student_score"=>$expected_student_score
43
+						  )
44
+						);
45
+				}
46
+				else
47
+				{
48
+					$activity_antes=$activity_id;
49
+					DB::table('activity_criterion')->insert(
50
+					array("activity_id"=>$activity_id,
51
+						  "criterion_id"=>$criterion_id,
52
+						  "expected_percentage_students_achieving"=>$expected_percentage_students_achieving,
53
+						  "expected_student_score"=>$expected_student_score,
54
+						  "transformative_actions"=>$transformative_actions,
55
+						  "assessment_comments"=>$assessment_comments
56
+						  )
57
+						);				
58
+				}
59
+				print $activity_id.':'.$criterion_id;print"\n";
60
+			}
61
+// 				$i++;
62
+// 			}
63
+		}
64
+    	
65
+//     exit();
66
+    	$assessments=DB::table('assessments')->get();
67
+    $i=0;
68
+		foreach ($assessments as $assessment)
69
+		{
70
+// 			var_dump($assessment);exit();
71
+			$student_id=$assessment->student_id;
72
+			$activity_id=$assessment->activity_id;
73
+			$datos=json_decode($assessment->scores, true);
74
+// 			$criterion=(array)DB::table('activity_criterion')->where('activity_id', $activity_id)->first();
75
+// 			var_dump($rubric);exit();
76
+// 			$criterion_id=$criterion["criterion_id"];
77
+// 			print_r($datos);
78
+// 			print"\n";
79
+// 			print $rubric->id;print"\t";
80
+			foreach($datos as $criterion_id=>$score)
81
+			{
82
+// 				print $dato["id"];print"\n";
83
+// 				var_dump($new_criterion);
84
+				$activity_criterion=DB::table('activity_criterion')->where('criterion_id', $criterion_id)->where('activity_id', $activity_id)->first();
85
+				if(empty($activity_criterion))
86
+				{
87
+// 					var_dump($criterion_id);
88
+					var_dump($assessment);
89
+// 					$activities=DB::table('activities')->where('id', $activity_id)->first();
90
+// 					$criterion_rubric=DB::table('new_criterion_rubric')->where('criterion_id', $criterion_id)->first();
91
+// 					var_dump($activities);
92
+// 					var_dump($criterion_rubric);
93
+// 					exit();
94
+					$activity_criterion_id=DB::table('activity_criterion')->insertGetId(
95
+						array("activity_id"=>$activity_id,
96
+							  "criterion_id"=>$criterion_id,
97
+							  "transformative_actions"=>$transformative_actions,
98
+							  "assessment_comments"=>$assessment_comments
99
+							  )
100
+						);				
101
+					
102
+				}
103
+				else $activity_criterion_id=$activity_criterion->id;
104
+				$existe_ya=DB::table('new_assessments')->where('student_id', $student_id)->where('activity_criterion_id', $activity_criterion_id)->first();
105
+				if(empty($existe_ya))
106
+				{
107
+					DB::table('new_assessments')->insert(array("student_id"=>$student_id,"activity_criterion_id"=>$activity_criterion_id,'score'=>$score));
108
+					print".";
109
+				}
110
+			}
111
+// 			print $activity_id.':'.$criterion_id;print"\n";
112
+
113
+			$i++;
114
+		}
115
+
116
+
117
+// 		$course = Rubric::where('code', $code)->where('number', $number)->where('section', $section)->where('semester_id', $semester_id)->first();
118
+
119
+
120
+
121
+
122
+	}
123
+
124
+
125
+}

+ 94
- 0
app/database/seeds/FillNewCriterionRubric.php Dosyayı Görüntüle

@@ -0,0 +1,94 @@
1
+<?php
2
+
3
+class FillNewCriterionRubric extends Seeder {
4
+
5
+    public function run()
6
+    {
7
+    	$rubrics=DB::table('rubrics')->get();
8
+    $i=0;
9
+		foreach ($rubrics as $rubric)
10
+		{
11
+			$datos=json_decode($rubric->contents, true);
12
+// 			print_r($datos);
13
+// 			print"\n";
14
+// 			print $rubric->id;print"\t";
15
+// 			if($rubric->id==29){var_dump($datos);}
16
+			foreach($datos as $dato)
17
+			{
18
+				if($rubric->id==29){print $dato["id"];print"Entrando\n";}
19
+				$new_criterion=(array)DB::table('criteria')->where('id', $dato["id"])->first();
20
+// 				var_dump($new_criterion);
21
+				$program_id=(array)DB::table('courses')
22
+				->join('activities', 'courses.id', '=', 'activities.course_id')
23
+				->join('new_rubric_activity', 'new_rubric_activity.activity_id', '=', 'activities.id')
24
+				->select('courses.program_id')
25
+				->where('new_rubric_activity.rubric_id',$rubric->id)
26
+				->first();
27
+				if(empty($program_id))$program_id['program_id']=1;
28
+	// 			else var_dump($program_id);
29
+
30
+// 				var_dump($program_id);
31
+// 				var_dump($new_criterion);
32
+				if(!empty($new_criterion))
33
+				{
34
+					$existe=(array)DB::table('objectives')->where('id', $new_criterion["id"])->first();
35
+					$objective_id=$new_criterion["id"];
36
+					if(empty($existe))
37
+					{
38
+						$existe4=(array)DB::table('objectives')->where('program_id', $program_id['program_id'])->where('text', $new_criterion["name"])->first();
39
+	// 					print_r($existe4);print"\n";
40
+						if(!empty($existe4))
41
+						{
42
+	// 						DB::table('objectives')->insert(array("id"=> $new_criterion["id"],"program_id"=>$program_id['program_id'],"text"=>$new_criterion["name"],'outcome_id'=>$new_criterion['outcome_id']));
43
+							$objective_id=$existe4["id"];
44
+						}
45
+						else 
46
+						{
47
+							print "A crear entrada en objectives:  $objective_id";
48
+// 							var_dump(array("id"=> $objective_id,"program_id"=>$program_id['program_id'],"text"=>$new_criterion["name"],'outcome_id'=>$new_criterion['outcome_id']));
49
+							DB::table('objectives')->insert(array("id"=> $objective_id,"program_id"=>$program_id['program_id'],"text"=>$new_criterion["name"],'outcome_id'=>$new_criterion['outcome_id']));
50
+						}
51
+					}
52
+					else
53
+					{
54
+						$existe4=(array)DB::table('objectives')->where('program_id', $program_id['program_id'])->where('text', $new_criterion["name"])->first();
55
+	// 					print_r($existe4);print"\n";
56
+						if(empty($existe4))
57
+						{
58
+							$objective_id=DB::table('objectives')->insertGetId(array("program_id"=>$program_id['program_id'],"text"=>$new_criterion["name"],'outcome_id'=>$new_criterion['outcome_id']));
59
+						}
60
+
61
+					}
62
+					$new_criterion["objective_id"]=$objective_id;
63
+					unset($new_criterion['outcome_id']);
64
+// 					var_dump($new_criterion);
65
+					$existe2=(array)DB::table('new_criteria')->where('id', $new_criterion["id"])->first();
66
+					if(empty($existe2))
67
+					{
68
+						DB::table('new_criteria')->insert($new_criterion);
69
+					}
70
+					$existe3=(array)DB::table('new_criterion_rubric')->where('criterion_id', $new_criterion["id"])->where('rubric_id', $rubric->id)->first();
71
+					if(empty($existe3))
72
+					{
73
+						DB::table('new_criterion_rubric')->insert(
74
+						array('criterion_id' => $dato["id"], 'rubric_id' => $rubric->id)
75
+						);
76
+					}
77
+				}
78
+	// 			if($i)exit();
79
+		
80
+			}
81
+// 			if($rubric->id==29){exit();}
82
+		$i++;
83
+		}
84
+
85
+
86
+// 		$course = Rubric::where('code', $code)->where('number', $number)->where('section', $section)->where('semester_id', $semester_id)->first();
87
+
88
+
89
+
90
+
91
+	}
92
+
93
+
94
+}

+ 59
- 0
app/database/seeds/FillScalesCriteria.php Dosyayı Görüntüle

@@ -0,0 +1,59 @@
1
+<?php
2
+
3
+class FillScalesCriteria extends Seeder {
4
+
5
+    public function run()
6
+    {
7
+
8
+    	$criteria=DB::table('criteria')->get();
9
+		foreach($criteria as $criterion)
10
+		{
11
+			$existe=DB::table('scales')->where('title',"description12")->where('description',$criterion->description12)->where('position',1)->first();
12
+			if(empty($existe))
13
+			{
14
+				$scale_id=DB::table('scales')->insertGetId(array('title'=>"description12",'description'=>$criterion->description12,'position'=>1));		
15
+			}
16
+			else
17
+			{
18
+				$scale_id=$existe->id;
19
+			}
20
+			DB::table('criterion_scale')->insert(array("scale_id"=>$scale_id,"criterion_id"=>$criterion->id));
21
+			$existe=DB::table('scales')->where('title',"description34")->where('description',$criterion->description34)->where('position',2)->first();
22
+			if(empty($existe))
23
+			{
24
+				$scale_id=DB::table('scales')->insertGetId(array('title'=>"description34",'description'=>$criterion->description34,'position'=>2));
25
+			}
26
+			else
27
+			{
28
+				$scale_id=$existe->id;
29
+			}
30
+			DB::table('criterion_scale')->insert(array("scale_id"=>$scale_id,"criterion_id"=>$criterion->id));
31
+			$existe=DB::table('scales')->where('title',"description56")->where('description',$criterion->description56)->where('position',3)->first();
32
+			if(empty($existe))
33
+			{
34
+				$scale_id=DB::table('scales')->insertGetId(array('title'=>"description56",'description'=>$criterion->description56,'position'=>3));
35
+			}
36
+			else
37
+			{
38
+				$scale_id=$existe->id;
39
+			}
40
+			DB::table('criterion_scale')->insert(array("scale_id"=>$scale_id,"criterion_id"=>$criterion->id));
41
+			$existe=DB::table('scales')->where('title',"description78")->where('description',$criterion->description78)->where('position',4)->first();
42
+			if(empty($existe))
43
+			{
44
+				$scale_id=DB::table('scales')->insertGetId(array('title'=>"description78",'description'=>$criterion->description78,'position'=>4));
45
+			}
46
+			else
47
+			{
48
+				$scale_id=$existe->id;
49
+			}
50
+			$existe_ya=DB::table('criterion_scale')->where('scale_id', $scale_id)->where('criterion_id', $criterion->id)->first();
51
+			if(empty($existe_ya))DB::table('criterion_scale')->insert(array("scale_id"=>$scale_id,"criterion_id"=>$criterion->id));
52
+
53
+		
54
+		}
55
+
56
+	}
57
+
58
+
59
+}

+ 46
- 0
app/database/unusedMigrations/2020_10_04_141759_create_activity_criterion_table.php Dosyayı Görüntüle

@@ -0,0 +1,46 @@
1
+<?php
2
+
3
+use Illuminate\Database\Schema\Blueprint;
4
+use Illuminate\Database\Migrations\Migration;
5
+
6
+class CreateActivityCriterionTable extends Migration {
7
+
8
+	/**
9
+	 * Run the migrations.
10
+	 *
11
+	 * @return void
12
+	 */
13
+	public function up()
14
+	{
15
+		Schema::create('activity_criterion', function(Blueprint $table)
16
+		{
17
+			$table->increments('id');
18
+			$table->integer('activity_id')->unsigned();
19
+			$table->integer('criterion_id')->unsigned();
20
+			$table
21
+				->foreign('criterion_id')
22
+				->references('id')
23
+				->on('criteria')
24
+				->onDelete('cascade')
25
+				->onUpdate('cascade');
26
+			$table
27
+				->foreign('activity_id')
28
+				->references('id')
29
+				->on('activities')
30
+				->onDelete('cascade')
31
+				->onUpdate('cascade');
32
+			$table->timestamps();
33
+		});
34
+	}
35
+
36
+	/**
37
+	 * Reverse the migrations.
38
+	 *
39
+	 * @return void
40
+	 */
41
+	public function down()
42
+	{
43
+		Schema::drop('activity_criterion');
44
+	}
45
+
46
+}

+ 2
- 1
app/models/Scale.php Dosyayı Görüntüle

@@ -4,6 +4,7 @@ use Illuminate\Database\Eloquent\SoftDeletingTrait;
4 4
 
5 5
 class Scale extends Eloquent
6 6
 {
7
+    protected $fillable = [];
7 8
     use SoftDeletingTrait;
8 9
     protected $dates = ['deleted_at'];
9 10
 
@@ -11,7 +12,7 @@ class Scale extends Eloquent
11 12
 
12 13
     public function outcomes()
13 14
     {
14
-        //	  
15
+        //
15 16
 
16 17
     }
17 18
 }

+ 101
- 0
app/views/local/managers/admins/learning-outcome_new.blade.php Dosyayı Görüntüle

@@ -0,0 +1,101 @@
1
+@extends('layouts.master')
2
+
3
+@section('navigation')
4
+    @if(Auth::user()->role==1)
5
+        @include('local.managers.admins._navigation')
6
+    @elseif(Auth::user()->role==2)
7
+        @include('local.managers.sCoords._navigation')
8
+    @elseif(Auth::user()->role==3)
9
+        @include('local.managers.pCoords._navigation')
10
+    @endif
11
+@stop
12
+
13
+@section('main')
14
+
15
+<div class="row">
16
+    <div class="col-md-12">
17
+
18
+        <!-- Nav tabs -->
19
+        <ul class="nav nav-tabs" role="tablist">
20
+            <li role="presentation" class="active"><a href="#undergraduate" aria-controls="undergraduate" role="tab" data-toggle="tab"><h4>Undergraduate Program Participation</h4></a></li>
21
+            <li role="presentation"><a href="#graduate" aria-controls="graduate" role="tab" data-toggle="tab"><h4>Graduate Program Participation</h4></a></li>
22
+        </ul>
23
+
24
+        <!-- Tab panes -->
25
+        <div class="tab-content">
26
+            <div role="tabpanel" class="tab-pane active" id="undergraduate">
27
+                <br>
28
+                <table class="table table-striped datatable">
29
+                    <thead>
30
+                        <th>Name</th>
31
+                        <th>School</th>
32
+                        <th>Criteria attempted for the outcome</th>
33
+                        <th>Criteria achieved for the outcome </th>
34
+                        <th>Success rate</th>
35
+                    </thead>
36
+                    <tbody>
37
+                        @foreach($undergradResults["names"] as $id=>$undergradProgramName)
38
+                            <tr>
39
+                                <td>{{{ $undergradProgramName }}}</td>
40
+                                <td>{{{ $undergradResults["schools"][$id] }}}</td>
41
+                                <td>{{{ $undergradResults["attempted"][$id] }}}</td>
42
+                                <td>{{{ $undergradResults["achieved"][$id] }}}</td>
43
+                                <td>{{{ $undergradResults["successRate"][$id] }}}</td>
44
+                            </tr>
45
+                        @endforeach
46
+                    </tbody>
47
+                    <caption>N/M: Not Measured</caption>
48
+                </table>
49
+            </div>
50
+            <div role="tabpanel" class="tab-pane" id="graduate">
51
+                <br>
52
+                <table class="table table-striped datatable">
53
+                    <thead>
54
+                        <th>Name</th>
55
+                        <th>School</th>
56
+                        <th>Sections that attempted outcome</th>
57
+                        <th>Sections that achieved outcome </th>
58
+                        <th>Success rate</th>
59
+                    </thead>
60
+                    <tbody>
61
+                        @foreach($gradResults["names"] as $id=>$gradProgramName)
62
+                            <tr>
63
+                                <td>{{{ $gradProgramName }}}</td>
64
+                                <td>{{{ $gradResults["schools"][$id] }}}</td>
65
+                                <td>{{{ $gradResults["attempted"][$id] }}}</td>
66
+                                <td>{{{ $gradResults["achieved"][$id] }}}</td>
67
+                                <td>{{{ $gradResults["successRate"][$id] }}}</td>
68
+                            </tr>
69
+                        @endforeach
70
+                    </tbody>
71
+                    <caption>N/M: Not Measured</caption>
72
+                </table>
73
+            </div>
74
+
75
+        </div>
76
+    </div>
77
+</div>
78
+
79
+@stop
80
+
81
+@section('included-js')
82
+    @include('global._datatables_js')
83
+@stop
84
+
85
+@section('javascript')
86
+
87
+    // ------------------------------------------------------------------------
88
+    // Page Load
89
+    // ------------------------------------------------------------------------
90
+
91
+    // ------------------------------------------------------------------------
92
+    // Events
93
+    // ------------------------------------------------------------------------
94
+
95
+
96
+
97
+    // ------------------------------------------------------------------------
98
+    // Functions
99
+    // ------------------------------------------------------------------------
100
+
101
+@stop

+ 90
- 0
app/views/local/managers/admins/learning-outcomes_new.blade.php Dosyayı Görüntüle

@@ -0,0 +1,90 @@
1
+@extends('layouts.master')
2
+
3
+@section('navigation')
4
+    @if(Auth::user()->role==1)
5
+        @include('local.managers.admins._navigation')
6
+    @elseif(Auth::user()->role==2)
7
+        @include('local.managers.sCoords._navigation')
8
+    @elseif(Auth::user()->role==3)
9
+        @include('local.managers.pCoords._navigation')
10
+    @endif
11
+@stop
12
+
13
+@section('main')
14
+
15
+    <div class="row">
16
+        <div class="col-md-12">
17
+            <p>Click on the values you want to change. Invalid values will be rejected automatically. To save your changes, click the 'Save' button at the bottom of the page.</p>
18
+            <table class="table table-striped table-condensed editable-table">
19
+                <thead><tr class="center-text">
20
+                    <th class="col-md-4">Learning Outcome</th>
21
+                    <th class="col-md-7">Definition</th>
22
+                    <th class="col-md-1">Expected Value</th>
23
+
24
+                </thead>
25
+                <tbody>
26
+                @foreach ($outcomes as $outcome)
27
+                    <tr data-id="{{ $outcome->id }}">
28
+                        <td contenteditable="true" class="name col-md-4" >{{ $outcome->name }}</td>
29
+                        <td contenteditable="true" data-type="textarea" class="definition col-md-6" >{{ $outcome->definition }}</td>
30
+                        <td contenteditable="true" class="expected-outcome col-md-1" >{{ $outcome->expected_outcome }}</td>
31
+                    </tr>
32
+                @endforeach
33
+                </tbody>
34
+            </table>
35
+        </div>
36
+    </div>
37
+    <div class="row">
38
+        <div class="col-md-12"><button class="btn btn-lg btn-primary center-block">Save</button></div>
39
+    </div>
40
+@stop
41
+
42
+@section('javascript')
43
+
44
+        $('button').on('click', function(e)
45
+        {
46
+            e.preventDefault();
47
+
48
+            var outcomeArray= new Array();
49
+
50
+            // For each learning outcome, get its value and put it into an array
51
+            $('tbody tr').each(function( index )
52
+            {
53
+                var outcomeObject = new Object();
54
+
55
+                outcomeObject.id= $(this).data('id');
56
+                outcomeObject.name= $(this).children('.name').text();
57
+                outcomeObject.definition= $(this).children('.definition').text();
58
+                outcomeObject.expected_outcome= $(this).children('.expected-outcome').text();
59
+
60
+                if($(this).find('.glyphicon-eye-close').length>0)
61
+                {
62
+                    outcomeObject.delete=1;
63
+                }
64
+
65
+                else
66
+                    outcomeObject.delete=0;
67
+
68
+                var clone = jQuery.extend({}, outcomeObject);
69
+                outcomeArray.push(clone);
70
+            });
71
+
72
+            $.post(
73
+                "{{ URL::action('OutcomesController@update') }}",
74
+                { outcomeArray: JSON.stringify(outcomeArray)},
75
+                function(data)
76
+                {
77
+                    location.reload();
78
+                }
79
+            );
80
+        });
81
+
82
+        $('span').on('click', function()
83
+        {
84
+            if($(this).hasClass('glyphicon-eye-open'))
85
+                $(this).removeClass('glyphicon-eye-open').addClass('glyphicon-eye-close');
86
+            else
87
+                $(this).removeClass('glyphicon-eye-close').addClass('glyphicon-eye-open');
88
+
89
+        });
90
+@stop

+ 53
- 0
drop_tables.sql Dosyayı Görüntüle

@@ -0,0 +1,53 @@
1
+Set foreign_key_checks =0;
2
+drop table if exists `VIEW_participating_programs`...
3
+
4
+drop table if exists `activities`;
5
+
6
+drop table if exists `annual_plan_outcomes`;
7
+
8
+drop table if exists `annual_plans`;
9
+
10
+drop table if exists `assessments`;
11
+
12
+drop table if exists `course_student`;
13
+
14
+drop table if exists `courses`;
15
+
16
+drop table if exists `criteria`;
17
+
18
+drop table if exists `criterion_objective`;
19
+
20
+drop table if exists `five_year_plans`;
21
+
22
+drop table if exists `fyp_part_outcomes`;
23
+
24
+drop table if exists `fyp_parts`;
25
+
26
+drop table if exists `migrations`;
27
+
28
+drop table if exists `objectives`;
29
+
30
+drop table if exists `outcomes`;
31
+
32
+drop table if exists `password_reminders`;
33
+
34
+drop table if exists `password_resets`;
35
+
36
+drop table if exists `program_user`;
37
+
38
+drop table if exists `programs`;
39
+
40
+drop table if exists `quinquenniums`;
41
+
42
+drop table if exists `rubrics`;
43
+
44
+drop table if exists `schools`;
45
+
46
+drop table if exists `semesters`;
47
+
48
+drop table if exists `students`;
49
+
50
+drop table if exists `templates`;
51
+
52
+
53
+set foreign_key_checks =1;

+ 103
- 0
seed.sql Dosyayı Görüntüle

@@ -0,0 +1,103 @@
1
+SET FOREIGN_KEY_CHECKS=0;
2
+INSERT INTO activities (id, name, description, course_id, date, draft, created_at, updated_at, criteria_achieved, criteria_weights, outcomes_achieved, outcomes_attempted, transforming_actions, assessment_comments, criteria_achieved_percentage, criteria_participant_count, criteria_achiever_count) VALUES (1, 'act1', 'abc', null, '2020-01-01', 0, '2020-01-01 00:00:00', '2020-01-01 00:00:00', null, null, null, null, null, null, null, null, null);
3
+INSERT INTO activities (id, name, description, course_id, date, draft, created_at, updated_at, criteria_achieved, criteria_weights, outcomes_achieved, outcomes_attempted, transforming_actions, assessment_comments, criteria_achieved_percentage, criteria_participant_count, criteria_achiever_count) VALUES (3, 'act2', 'from course1', 1, '2020-01-01', 0, '2020-01-01 00:00:00', '2020-01-01 00:00:00', null, null, null, null, null, null, null, null, null);INSERT INTO courses (id, name, code, section, program_id, user_id, semester_id, created_at, updated_at, criteria_achieved, outcomes_achieved, outcomes_attempted, number) VALUES (1, 'course1', 'CURS0001', '001', 1, 1, 1, '2020-01-01 00:00:00', '2020-01-01 00:00:00', null, null, null, '0000');INSERT INTO criteria (id, name, subcriteria, description12, description34, description56, description78, outcome_id, created_at, updated_at, user_id, program_id, deleted_at, copyright, notes) VALUES (1, 'crit1', null, 'a', 'b', 'c', 'd', 1, '2020-01-01 00:00:00', '2020-01-01 00:00:00', 1, 1, null, null, null);INSERT INTO migrations (migration, batch) VALUES ('2014_10_05_052350_create_schools_table', 1);
4
+INSERT INTO migrations (migration, batch) VALUES ('2014_10_05_055013_create_programs_table', 1);
5
+INSERT INTO migrations (migration, batch) VALUES ('2014_10_06_050335_create_users_table', 1);
6
+INSERT INTO migrations (migration, batch) VALUES ('2014_10_12_100000_create_password_resets_table', 1);
7
+INSERT INTO migrations (migration, batch) VALUES ('2014_11_10_035949_create_rubrics_table', 1);
8
+INSERT INTO migrations (migration, batch) VALUES ('2014_11_29_210957_create_templates_table', 1);
9
+INSERT INTO migrations (migration, batch) VALUES ('2014_11_29_211309_create_courses_table', 1);
10
+INSERT INTO migrations (migration, batch) VALUES ('2014_11_29_211310_create_activities_table', 1);
11
+INSERT INTO migrations (migration, batch) VALUES ('2014_11_29_212240_create_outcomes_table', 1);
12
+INSERT INTO migrations (migration, batch) VALUES ('2014_11_29_212341_create_criteria_table', 1);
13
+INSERT INTO migrations (migration, batch) VALUES ('2014_11_29_214028_create_semesters_table', 1);
14
+INSERT INTO migrations (migration, batch) VALUES ('2014_11_30_134022_create_students_table', 1);
15
+INSERT INTO migrations (migration, batch) VALUES ('2014_12_07_214036_create_course_student_table', 1);
16
+INSERT INTO migrations (migration, batch) VALUES ('2015_01_09_171350_create_assessments_table', 1);
17
+INSERT INTO migrations (migration, batch) VALUES ('2015_01_12_204310_add_columns_to_activities_table', 1);
18
+INSERT INTO migrations (migration, batch) VALUES ('2015_01_12_222859_add_columns_to_assessments_table', 1);
19
+INSERT INTO migrations (migration, batch) VALUES ('2015_01_13_010052_add_index_to_assessments_table', 1);
20
+INSERT INTO migrations (migration, batch) VALUES ('2015_01_13_142849_add_column_to_criteria_table', 1);
21
+INSERT INTO migrations (migration, batch) VALUES ('2015_01_14_140724_add_columns_to_courses_table', 1);
22
+INSERT INTO migrations (migration, batch) VALUES ('2015_01_21_124809_add_column_to_courses_table', 1);
23
+INSERT INTO migrations (migration, batch) VALUES ('2015_01_22_195515_add_column_to_templates_table', 1);
24
+INSERT INTO migrations (migration, batch) VALUES ('2015_01_23_175455_remove_total_from_assessments_table', 1);
25
+INSERT INTO migrations (migration, batch) VALUES ('2015_01_23_175923_rename_average_in_assessments_table', 1);
26
+INSERT INTO migrations (migration, batch) VALUES ('2015_01_28_121848_add_index_to_course_student_table', 1);
27
+INSERT INTO migrations (migration, batch) VALUES ('2015_01_28_133036_add_criteria_achieved_count_to_activities_table', 1);
28
+INSERT INTO migrations (migration, batch) VALUES ('2015_02_05_133245_add_transforming_actions_to_activities_table', 1);
29
+INSERT INTO migrations (migration, batch) VALUES ('2015_02_05_143641_add_assessment_comments_to_activities_table', 1);
30
+INSERT INTO migrations (migration, batch) VALUES ('2015_02_06_145359_create_password_reminders_table', 1);
31
+INSERT INTO migrations (migration, batch) VALUES ('2015_02_19_143311_add_is_graduate_to_programs_table', 1);
32
+INSERT INTO migrations (migration, batch) VALUES ('2015_02_25_170516_add_deleted_at_to_outcomes_table', 1);
33
+INSERT INTO migrations (migration, batch) VALUES ('2015_02_25_170529_add_deleted_at_to_criteria_table', 1);
34
+INSERT INTO migrations (migration, batch) VALUES ('2015_02_27_201953_add_criteria_achieved_percentage_to_activities_table', 1);
35
+INSERT INTO migrations (migration, batch) VALUES ('2015_03_04_132321_add_copyright_and_notes_to_criteria_table', 1);
36
+INSERT INTO migrations (migration, batch) VALUES ('2015_04_13_183730_add_program_id_to_templates_table', 1);
37
+INSERT INTO migrations (migration, batch) VALUES ('2015_04_28_141931_add_is_visible_to_templates_table', 1);
38
+INSERT INTO migrations (migration, batch) VALUES ('2015_05_04_162918_remove_expected_outcome_from_outcomes_table', 1);
39
+INSERT INTO migrations (migration, batch) VALUES ('2015_05_05_083800_add_decimal_expected_outcome_to_outcomes_table', 1);
40
+INSERT INTO migrations (migration, batch) VALUES ('2015_05_18_095002_add_first_login_to_users_table', 1);
41
+INSERT INTO migrations (migration, batch) VALUES ('2015_05_18_131259_add_columns_to_semesters_table', 1);
42
+INSERT INTO migrations (migration, batch) VALUES ('2015_05_18_134926_add_semester_id_to_courses', 1);
43
+INSERT INTO migrations (migration, batch) VALUES ('2015_06_10_092319_add_name_to_semesters_table', 1);
44
+INSERT INTO migrations (migration, batch) VALUES ('2015_06_12_085247_add_visibility_to_semesters_table', 1);
45
+INSERT INTO migrations (migration, batch) VALUES ('2015_06_16_092223_add_has_access_to_users', 1);
46
+INSERT INTO migrations (migration, batch) VALUES ('2015_06_18_103255_add_expected_percentage_and_points_to_templates_table', 1);
47
+INSERT INTO migrations (migration, batch) VALUES ('2015_07_10_150430_add_email_to_students_table', 1);
48
+INSERT INTO migrations (migration, batch) VALUES ('2015_07_13_111726_add_code_to_programs_table', 1);
49
+INSERT INTO migrations (migration, batch) VALUES ('2015_07_13_132620_add_ssn_and_employee_number_to_users_table', 1);
50
+INSERT INTO migrations (migration, batch) VALUES ('2015_08_19_130733_add_semester_id_to_course_student_table', 1);
51
+INSERT INTO migrations (migration, batch) VALUES ('2015_12_10_145451_add_criteria_weights_to_activities_table', 1);
52
+INSERT INTO migrations (migration, batch) VALUES ('2016_01_12_132034_add_program_id_to_criteria_table', 1);
53
+INSERT INTO migrations (migration, batch) VALUES ('2016_01_27_093808_add_date_to_activities_table', 1);
54
+INSERT INTO migrations (migration, batch) VALUES ('2016_01_27_134306_add_draft_to_activities_table', 1);
55
+INSERT INTO migrations (migration, batch) VALUES ('2016_03_11_085258_add_school_and_concentration_codes_to_students_table', 1);
56
+INSERT INTO migrations (migration, batch) VALUES ('2016_05_09_145427_create_program_user_table', 1);
57
+INSERT INTO migrations (migration, batch) VALUES ('2016_05_10_091847_remove_program_id_from_users_table', 1);
58
+INSERT INTO migrations (migration, batch) VALUES ('2016_05_23_153434_create_objectives_table', 1);
59
+INSERT INTO migrations (migration, batch) VALUES ('2016_05_25_090412_add_active_to_objectives_table', 1);
60
+INSERT INTO migrations (migration, batch) VALUES ('2016_05_26_092328_create_criterion_objective_table', 1);
61
+INSERT INTO migrations (migration, batch) VALUES ('2016_07_15_084546_create_quinquenniums_table', 1);
62
+INSERT INTO migrations (migration, batch) VALUES ('2016_07_15_084751_create_five_year_plans_table', 1);
63
+INSERT INTO migrations (migration, batch) VALUES ('2016_07_15_084851_create_annual_plans_table', 1);
64
+INSERT INTO migrations (migration, batch) VALUES ('2016_07_15_090133_create_fyp_parts_table', 1);
65
+INSERT INTO migrations (migration, batch) VALUES ('2016_07_15_090203_create_fyp_part_outcomes_table', 1);
66
+INSERT INTO migrations (migration, batch) VALUES ('2016_07_15_090217_create_annual_plan_outcomes_table', 1);
67
+INSERT INTO migrations (migration, batch) VALUES ('2016_08_03_120016_remove_methods_from_fyp_part_outcomes_table', 1);
68
+INSERT INTO migrations (migration, batch) VALUES ('2016_08_03_140525_add_unique_index_to_five_year_plans_table', 1);
69
+INSERT INTO migrations (migration, batch) VALUES ('2016_08_11_150848_remove_semester_id_from_annual_plans_table', 2);
70
+INSERT INTO migrations (migration, batch) VALUES ('2016_08_11_151247_add_year_start_and_year_end_to_annual_plans_table', 2);
71
+INSERT INTO migrations (migration, batch) VALUES ('2017_02_03_150052_add_comments_to_assessments_table', 2);
72
+INSERT INTO migrations (migration, batch) VALUES ('2018_02_12_144827_add_subcriteria_to_criteria_table', 2);
73
+INSERT INTO migrations (migration, batch) VALUES ('2018_07_26_132933_add_last_login_to_users_table', 2);
74
+INSERT INTO migrations (migration, batch) VALUES ('2018_07_26_134316_add_phone_numbers_and_extension_to_users_table', 2);
75
+INSERT INTO migrations (migration, batch) VALUES ('2018_08_09_110432_remove_password_from_users_table', 2);
76
+INSERT INTO migrations (migration, batch) VALUES ('2018_08_09_110813_remove_password_updated_and_remember_token_from_users_table', 2);
77
+INSERT INTO migrations (migration, batch) VALUES ('2018_08_10_083743_add_remember_token_to_users_table', 2);
78
+INSERT INTO migrations (migration, batch) VALUES ('2018_08_28_140328_remove_outcome_id_from_objectives_table', 2);
79
+INSERT INTO migrations (migration, batch) VALUES ('2018_08_28_141547_drop_criterion_objective_table', 2);
80
+INSERT INTO migrations (migration, batch) VALUES ('2018_08_28_142111_create_objective_outcome_table', 2);
81
+INSERT INTO migrations (migration, batch) VALUES ('2018_09_13_134104_entrust_setup_tables', 2);
82
+INSERT INTO migrations (migration, batch) VALUES ('2019_08_07_100303_add_participants_achievers_counts_to_activities_table', 2);
83
+INSERT INTO migrations (migration, batch) VALUES ('2020_03_06_122426_create_participating_programs_view', 2);
84
+INSERT INTO migrations (migration, batch) VALUES ('2020_04_04_002657_create_new_criteria_table', 2);
85
+INSERT INTO migrations (migration, batch) VALUES ('2020_04_04_005817_add_outcome_id_to_objectives_table', 2);
86
+INSERT INTO migrations (migration, batch) VALUES ('2020_04_22_090200_alter_activities_table', 2);
87
+INSERT INTO migrations (migration, batch) VALUES ('2020_04_22_095649_create_new_criterion_rubric_table', 2);
88
+INSERT INTO migrations (migration, batch) VALUES ('2020_04_22_101110_create_new_rubric_activity_table', 2);
89
+INSERT INTO migrations (migration, batch) VALUES ('2020_04_22_105537_create_new_activity_course_table', 2);
90
+INSERT INTO migrations (migration, batch) VALUES ('2020_04_22_122910_add_criteria_id_to_assessments_table', 2);INSERT INTO new_criteria (id, name, subcriteria, description12, description34, description56, description78, objective_id, program_id, user_id, copyright, notes, created_at, updated_at, deleted_at) VALUES (2, 'crit1', null, '12', '34', '56', '78', 1, 1, 1, null, null, '2020-01-01 00:00:00', '2020-01-01 00:00:00', null);INSERT INTO new_criterion_rubric (id, criterion_id, rubric_id, created_at, updated_at) VALUES (2, 2, 1, '2020-01-01 00:00:00', '2020-01-01 00:00:00');INSERT INTO new_rubric_activity (id, rubric_id, activity_id, created_at, updated_at) VALUES (1, 1, 1, '2020-01-01 00:00:00', '2020-01-01 00:00:00');
91
+INSERT INTO new_rubric_activity (id, rubric_id, activity_id, created_at, updated_at) VALUES (2, 1, 3, '2020-01-01 00:00:00', '2020-01-01 00:00:00');INSERT INTO objective_outcome (id, objective_id, outcome_id, created_at, updated_at) VALUES (1, 1, 1, '2020-01-01 00:00:00', '2020-01-01 00:00:00');INSERT INTO objectives (id, program_id, text, active, created_at, updated_at, outcome_id) VALUES (1, 1, 'obj1', 1, '2020-01-01 00:00:00', '2020-01-01 00:00:00', 1);INSERT INTO outcomes (id, name, definition, expected_outcome, created_at, updated_at, deleted_at, new_outcome_id, deactivation_date) VALUES (1, 'outcome1', 'outcome1', 66.66, '2020-01-01 00:00:00', '2020-01-01 00:00:00', null, 1, null);
92
+INSERT INTO outcomes (id, name, definition, expected_outcome, created_at, updated_at, deleted_at, new_outcome_id, deactivation_date) VALUES (2, 'outcome2', 'outcome2', 66.66, '2020-01-01 00:00:00', '2020-01-01 00:00:00', null, 2, null);
93
+INSERT INTO outcomes (id, name, definition, expected_outcome, created_at, updated_at, deleted_at, new_outcome_id, deactivation_date) VALUES (3, 'outcome3', 'outcome3', 66.66, '2020-01-01 00:00:00', '2020-01-01 00:00:00', null, 3, null);
94
+INSERT INTO outcomes (id, name, definition, expected_outcome, created_at, updated_at, deleted_at, new_outcome_id, deactivation_date) VALUES (4, 'outcome4', 'outcome4', 66.66, '2020-01-01 00:00:00', '2020-01-01 00:00:00', null, 4, null);
95
+INSERT INTO outcomes (id, name, definition, expected_outcome, created_at, updated_at, deleted_at, new_outcome_id, deactivation_date) VALUES (5, 'outcome5', 'outcome5', 66.66, '2020-01-01 00:00:00', '2020-01-01 00:00:00', null, 5, null);
96
+INSERT INTO outcomes (id, name, definition, expected_outcome, created_at, updated_at, deleted_at, new_outcome_id, deactivation_date) VALUES (6, 'outcome6', 'outcome6', 66.66, '2020-01-01 00:00:00', '2020-01-01 00:00:00', null, 6, null);
97
+INSERT INTO outcomes (id, name, definition, expected_outcome, created_at, updated_at, deleted_at, new_outcome_id, deactivation_date) VALUES (7, 'outcome7', 'outcome7', 66.66, '2020-01-01 00:00:00', '2020-01-01 00:00:00', null, 7, null);
98
+INSERT INTO outcomes (id, name, definition, expected_outcome, created_at, updated_at, deleted_at, new_outcome_id, deactivation_date) VALUES (8, 'outcome8', 'outcome8', 66.66, '2020-01-01 00:00:00', '2020-01-01 00:00:00', null, 8, null);
99
+INSERT INTO outcomes (id, name, definition, expected_outcome, created_at, updated_at, deleted_at, new_outcome_id, deactivation_date) VALUES (9, 'old_outcome1', 'deactivates on 2015-01-01', 66.66, '2020-01-01 00:00:00', '2020-01-01 00:00:00', null, 1, '2015-01-01');INSERT INTO programs (id, name, code, school_id, restrict_rubrics, created_at, updated_at, is_graduate) VALUES (1, 'TEST', 'TEST', 1, 0, '2020-01-01 00:00:00', '2020-01-01 00:00:00', 0);
100
+INSERT INTO programs (id, name, code, school_id, restrict_rubrics, created_at, updated_at, is_graduate) VALUES (2, 'UHS', 'UHS', 2, 0, '2020-01-01 00:00:00', '2020-01-01 00:00:00', 0);INSERT INTO program_user (id, program_id, user_id, created_at, updated_at) VALUES (1, 1, 1, '2020-01-01 00:00:00', '2020-01-01 00:00:00');INSERT INTO rubrics (id, name, contents, expected_percentage, expected_points, user_id, created_at, updated_at) VALUES (1, 'rubric1', 'abcd', 50, 50, 1, '2020-01-01 00:00:00', '2020-01-01 00:00:00');INSERT INTO schools (id, name, created_at, updated_at) VALUES (1, 'school1', '2020-01-01 00:00:00', '2020-01-01 00:00:00');
101
+INSERT INTO schools (id, name, created_at, updated_at) VALUES (2, 'UHS', '2020-01-01 00:00:00', '2020-01-01 00:00:00');INSERT INTO semesters (id, code, name, start, end, is_visible) VALUES (1, 'B92', 'SEM 2 2019-2020', '2019-01-01 00:00:00', '2020-06-01 00:00:00', 1);
102
+INSERT INTO semesters (id, code, name, start, end, is_visible) VALUES (2, 'B01', 'SEM 1 2010-2011', '2010-01-01 00:00:00', '2010-01-01 00:00:00', 1);INSERT INTO users (id, ssn, number, first_name, surnames, email, alternate_email, office_phone, office_extension, cell_phone, role, school_id, has_access, created_at, updated_at, last_login, remember_token) VALUES (1, '000000000', '0000000000', 'test', 'test', 'test@upr.edu', null, null, null, null, 1, 1, 1, '2020-01-01 00:00:00', '2020-05-15 11:03:31', '2020-05-15 15:03:31', null);
103
+SET FOREIGN_KEY_CHECKS=1;