parent
commit
25e016400c

+ 5
- 5
app/controllers/CriteriaController.php View File

478
 
478
 
479
 
479
 
480
 
480
 
481
-            $criterion->number_of_scales = $clean_input['number_of_scales'];
482
-            $criterion->maximum_score = $clean_input['maximum_score'];
481
+
483
 
482
 
484
 
483
 
485
 
484
 
486
             // Set program
485
             // Set program
486
+            /*
487
             if (Input::get('program_id') != 0)
487
             if (Input::get('program_id') != 0)
488
                 $criterion->program_id = Input::get('program_id');
488
                 $criterion->program_id = Input::get('program_id');
489
             else
489
             else
490
-                $criterion->program_id = NULL;
490
+                $criterion->program_id = NULL;*/
491
 
491
 
492
             // Set status
492
             // Set status
493
             if (Input::get('status') == 0)
493
             if (Input::get('status') == 0)
516
                         DB::insert("insert into `criterion_objective_outcome` (`objective_id`, `outcome_id`, `criterion_id`,`objective_outcome_id`) values ({$objective_id},{$outcome_id}, {$criterionId}, 0)");
516
                         DB::insert("insert into `criterion_objective_outcome` (`objective_id`, `outcome_id`, `criterion_id`,`objective_outcome_id`) values ({$objective_id},{$outcome_id}, {$criterionId}, 0)");
517
                     }
517
                     }
518
                 }
518
                 }
519
-                DB::delete("delete from `scales` where id in (select scale_id id from criterion_scale where criterion_id = {$criterionId})");
519
+                /*DB::delete("delete from `scales` where id in (select scale_id id from criterion_scale where criterion_id = {$criterionId})");
520
 
520
 
521
                 for ($i = 0; $i < sizeof($clean_input['scale_title']); $i++) {
521
                 for ($i = 0; $i < sizeof($clean_input['scale_title']); $i++) {
522
                     $scale = new Scale;
522
                     $scale = new Scale;
540
                                 return Redirect::to('program-objective')->withInput();
540
                                 return Redirect::to('program-objective')->withInput();
541
                         }
541
                         }
542
                     }
542
                     }
543
-                }
543
+                }*/
544
 
544
 
545
 
545
 
546
 
546
 

+ 2
- 2
app/database/migrations/2021_06_13_235626_create_criteria_table.php View File

10
 	{
10
 	{
11
 		Schema::create('criteria', function (Blueprint $table) {
11
 		Schema::create('criteria', function (Blueprint $table) {
12
 			$table->increments('id');
12
 			$table->increments('id');
13
-			$table->string('name');
14
-			$table->string('subcriteria')->nullable();
13
+			$table->string('name', 400);
14
+			$table->text('subcriteria')->nullable();
15
 			$table->integer('user_id')->unsigned()->nullable();
15
 			$table->integer('user_id')->unsigned()->nullable();
16
 			$table->text('copyright')->nullable();
16
 			$table->text('copyright')->nullable();
17
 			$table->text('notes')->nullable();
17
 			$table->text('notes')->nullable();

+ 1
- 1
app/database/migrations/2021_06_14_000406_create_programs_table.php View File

11
 		Schema::create('programs', function (Blueprint $table) {
11
 		Schema::create('programs', function (Blueprint $table) {
12
 			$table->engine = 'InnoDB';
12
 			$table->engine = 'InnoDB';
13
 			$table->increments('id');
13
 			$table->increments('id');
14
-			$table->string('name', 50);
14
+			$table->string('name', 100);
15
 			$table->integer('school_id')->unsigned();
15
 			$table->integer('school_id')->unsigned();
16
 			$table->boolean('restrict_rubrics')->default(false);
16
 			$table->boolean('restrict_rubrics')->default(false);
17
 			$table->timestamps();
17
 			$table->timestamps();

+ 1
- 1
app/database/migrations/2021_06_14_001334_create_users_table.php View File

26
 
26
 
27
 
27
 
28
 			$table->boolean('has_access')->after('program_id')->default(false);
28
 			$table->boolean('has_access')->after('program_id')->default(false);
29
-			$table->string('ssn', 9)->after('id')->nullable()->unique();
29
+			$table->string('ssn', 255)->after('id')->nullable()->unique();
30
 			$table->string('number', 10)->after('ssn')->nullable()->unique();
30
 			$table->string('number', 10)->after('ssn')->nullable()->unique();
31
 			$table->timestamp('last_login')->after('updated_at')->nullable();
31
 			$table->timestamp('last_login')->after('updated_at')->nullable();
32
 			$table->string('office_phone', 20)->after('alternate_email')->nullable();
32
 			$table->string('office_phone', 20)->after('alternate_email')->nullable();

+ 43
- 0
app/database/migrations/2021_06_16_105139_create_activity_student.php View File

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