Browse Source

pal de bugs

parent
commit
350bf3841c

+ 8
- 6
app/controllers/ActivitiesController.php View File

147
             ->whereRaw("(deactivation_date IS NULL or deactivation_date >= '{$semesters->start}')")
147
             ->whereRaw("(deactivation_date IS NULL or deactivation_date >= '{$semesters->start}')")
148
             ->orderBy('name', 'ASC')->get();*/
148
             ->orderBy('name', 'ASC')->get();*/
149
 
149
 
150
-//         $outcomes = Outcome::orderBy('name', 'asc')->get();
151
-		 $level = DB::table('courses')
150
+        //         $outcomes = Outcome::orderBy('name', 'asc')->get();
151
+        $level = DB::table('courses')
152
             ->join('programs', 'programs.id', '=', 'courses.program_id')
152
             ->join('programs', 'programs.id', '=', 'courses.program_id')
153
             ->where('courses.id', $activity->course_id)
153
             ->where('courses.id', $activity->course_id)
154
-//             ->where('courses.number', $number)
155
-//             ->where('courses.semester_id', $semester->id)
154
+            //             ->where('courses.number', $number)
155
+            //             ->where('courses.semester_id', $semester->id)
156
             ->select('programs.is_graduate')
156
             ->select('programs.is_graduate')
157
             ->first();
157
             ->first();
158
-            $outcomes = Outcome::active_by_semesters(array($course->semester), $level->is_graduate);
158
+        $outcomes = Outcome::active_by_semesters(array($course->semester), $level->is_graduate);
159
 
159
 
160
         $assessment = DB::table('assessments')
160
         $assessment = DB::table('assessments')
161
             ->join('activity_criterion', 'assessments.activity_criterion_id', '=', 'activity_criterion.id')
161
             ->join('activity_criterion', 'assessments.activity_criterion_id', '=', 'activity_criterion.id')
998
 
998
 
999
 
999
 
1000
 
1000
 
1001
+
1002
+
1001
         return View::make('local.professors.compare_activities', compact('activity_1', 'activity_2', 'activity_criterion_1', 'activity_criterion_2', 'title', 'outcomes', 'outcomes_achieved_1', 'outcomes_attempted_1', 'outcomes_achieved_2', 'outcomes_attempted_2', 'course', 'student_count', 'active_semesters'));
1003
         return View::make('local.professors.compare_activities', compact('activity_1', 'activity_2', 'activity_criterion_1', 'activity_criterion_2', 'title', 'outcomes', 'outcomes_achieved_1', 'outcomes_attempted_1', 'outcomes_achieved_2', 'outcomes_attempted_2', 'course', 'student_count', 'active_semesters'));
1002
     }
1004
     }
1003
-}
1005
+}

+ 17
- 5
app/controllers/ProfessorsController.php View File

57
                     //$section_outcomes_attempted = json_decode($section->outcomes_attempted, true);
57
                     //$section_outcomes_attempted = json_decode($section->outcomes_attempted, true);
58
                     foreach ($section_outcomes_attempted as $outcome_id => $score) {
58
                     foreach ($section_outcomes_attempted as $outcome_id => $score) {
59
 
59
 
60
-                        if (array_key_exists($outcome_id, $outcomes_achieved)) $outcomes_achieved[$outcome_id] += $section_outcomes_achieved[$outcome_id];
61
-                        else $outcomes_achieved[$outcome_id] = $section_outcomes_achieved[$outcome_id];
62
-                        if (array_key_exists($outcome_id, $outcomes_attempted)) $outcomes_attempted[$outcome_id] +=  $section_outcomes_attempted[$outcome_id];
63
-                        else $outcomes_attempted[$outcome_id] =  $section_outcomes_attempted[$outcome_id];
60
+                        if (array_key_exists($outcome_id, $outcomes_achieved) && array_key_exists($outcome_id, $section_outcomes_achieved)) {
61
+
62
+                            $outcomes_achieved[$outcome_id] += $section_outcomes_achieved[$outcome_id];
63
+                        } elseif (array_key_exists($outcome_id, $outcomes_achieved)) {
64
+
65
+                            $outcomes_achieved[$outcome_id] += 0;
66
+                        } elseif (array_key_exists($outcome_id, $section_outcomes_achieved)) {
67
+                            $outcomes_achieved[$outcome_id] = $section_outcomes_achieved[$outcome_id];
68
+                        } else {
69
+                            $outcomes_achieved[$outcome_id] = 0;
70
+                        }
71
+                        if (array_key_exists($outcome_id, $outcomes_attempted)) {
72
+                            $outcomes_attempted[$outcome_id] +=  $section_outcomes_attempted[$outcome_id];
73
+                        } else {
74
+                            $outcomes_attempted[$outcome_id] =  $section_outcomes_attempted[$outcome_id];
75
+                        }
64
                         //$outcomes_achieved[$outcome_id] += $section_outcomes_achieved[$outcome_id];
76
                         //$outcomes_achieved[$outcome_id] += $section_outcomes_achieved[$outcome_id];
65
                         //$outcomes_attempted[$outcome_id] += $section_outcomes_attempted[$outcome_id];
77
                         //$outcomes_attempted[$outcome_id] += $section_outcomes_attempted[$outcome_id];
66
                     }
78
                     }
151
 
163
 
152
         return View::make('local.managers.shared.general_studies_overview', compact('title', 'outcomes', 'schools', 'program_packs'));
164
         return View::make('local.managers.shared.general_studies_overview', compact('title', 'outcomes', 'schools', 'program_packs'));
153
     }
165
     }
154
-}
166
+}

+ 32
- 0
app/database/migrations/2022_01_19_100041_add_deleted_at_objectives.php View File

1
+<?php
2
+
3
+use Illuminate\Database\Schema\Blueprint;
4
+use Illuminate\Database\Migrations\Migration;
5
+
6
+class AddDeletedAtObjectives extends Migration
7
+{
8
+
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		Schema::table('objectives', function (Blueprint $table) {
17
+			$table->date('deleted_at')->nullable();
18
+		});
19
+	}
20
+
21
+	/**
22
+	 * Reverse the migrations.
23
+	 *
24
+	 * @return void
25
+	 */
26
+	public function down()
27
+	{
28
+		Schema::table('objectives', function (Blueprint $table) {
29
+			$table->dropColumn('deleted_at');
30
+		});
31
+	}
32
+}

+ 15
- 13
app/models/Course.php View File

111
         else $outcomes_attempted[$outcome_id] = 1;
111
         else $outcomes_attempted[$outcome_id] = 1;
112
       }
112
       }
113
     }
113
     }
114
+    Log::info("outcomes_attempted");
115
+    Log::info($outcomes_attempted);
114
 
116
 
115
     return $outcomes_attempted;
117
     return $outcomes_attempted;
116
   }
118
   }
361
     return $all_sections;
363
     return $all_sections;
362
   }
364
   }
363
 
365
 
364
-    public function isAssessed()
365
-    {
366
-         $assessed = DB::table('assessments')
367
-            ->join('activity_criterion', 'assessments.activity_criterion_id', '=', 'activity_criterion.id')
368
-            ->join('activities', 'activity_criterion.activity_id', '=', 'activities.id')
369
-             ->where('activities.course_id', $this->id)
370
-            ->count();
371
-//             Log::info("aqui".$assessed);
372
-
373
-   		if($assessed)return true;
374
-   		else return false;
375
-    }
366
+  public function isAssessed()
367
+  {
368
+    $assessed = DB::table('assessments')
369
+      ->join('activity_criterion', 'assessments.activity_criterion_id', '=', 'activity_criterion.id')
370
+      ->join('activities', 'activity_criterion.activity_id', '=', 'activities.id')
371
+      ->where('activities.course_id', $this->id)
372
+      ->count();
373
+    //             Log::info("aqui".$assessed);
374
+
375
+    if ($assessed) return true;
376
+    else return false;
377
+  }
376
 
378
 
377
 
379
 
378
   public function outcomes_achieved()
380
   public function outcomes_achieved()
421
       $query->where('outcomes_attempted', 'not like', '\'%"' . $outcome_id . '":0%\'');
423
       $query->where('outcomes_attempted', 'not like', '\'%"' . $outcome_id . '":0%\'');
422
     }))->where('code', $this->code)->where('number', $this->number)->get();
424
     }))->where('code', $this->code)->where('number', $this->number)->get();
423
   }
425
   }
424
-}
426
+}

+ 4
- 2
app/views/local/managers/admins/new_assessment_report.blade.php View File

251
                                                     $expected = DB::table('target_outcomes_program')
251
                                                     $expected = DB::table('target_outcomes_program')
252
                                                         ->where('program_id', $course->program_id)
252
                                                         ->where('program_id', $course->program_id)
253
                                                         ->where('semester_id', $course->semester_id)
253
                                                         ->where('semester_id', $course->semester_id)
254
-                                                        ->first()->expected_target;
255
-                                                    
254
+                                                        ->first();//->expected_target;
255
+                                                    if(!$expected){
256
+                                                        $expected = "It has not been defined in the annual plan";
257
+                                                    }
256
                                                     ?>
258
                                                     ?>
257
                                                     {{ $expected }}
259
                                                     {{ $expected }}
258
                                                 </i>
260
                                                 </i>

+ 4
- 1
app/views/local/managers/pCoords/new_assessment_report.blade.php View File

226
                                             $expected = DB::table('target_outcomes_program')
226
                                             $expected = DB::table('target_outcomes_program')
227
                                                 ->where('program_id', $course->program_id)
227
                                                 ->where('program_id', $course->program_id)
228
                                                 ->where('semester_id', $course->semester_id)
228
                                                 ->where('semester_id', $course->semester_id)
229
-                                                ->first()->expected_target;
229
+                                                ->first();
230
+                                                if(!$expected){
231
+                                                        $expected = "It has not been defined in the annual plan";
232
+                                                    }
230
                                             
233
                                             
231
                                             ?>
234
                                             ?>
232
                                             {{ $expected }}
235
                                             {{ $expected }}

+ 120
- 16
app/views/local/managers/sCoords/criteria.blade.php View File

151
                             onchange='fetchCriterionForEditing()'>
151
                             onchange='fetchCriterionForEditing()'>
152
                             @foreach ($criteria as $criterion)
152
                             @foreach ($criteria as $criterion)
153
                                 <option value="{{ $criterion->id }}" data-subtext="
153
                                 <option value="{{ $criterion->id }}" data-subtext="
154
-                                                                                                                                                                                                                                                                                                                                                                                  
155
-                                                                                                                                                                                                                                                                                                                                   
156
-                                                                                                                                                                                                                                                                                   
157
-                                                                                                                                                                                                                                   
158
-                                                                                                                                                                                   
159
-                                                                                                                                   
160
-                                                                                 @if ($criterion->program)
154
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
155
+                                                                                                                                                                                                                                                                                                                                                                                                                       
156
+                                                                                                                                                                                                                                                                                                                                                                       
157
+                                                                                                                                                                                                                                                                                                                       
158
+                                                                                                                                                                                                                                                                       
159
+                                                                                                                                                                                                                       
160
+                                                                                                                                                                       
161
+                                                                                                                       
162
+                                                                  @if ($criterion->program)
161
                                     &nbsp;&nbsp;&nbsp;[{{ $criterion->program->name }}]
163
                                     &nbsp;&nbsp;&nbsp;[{{ $criterion->program->name }}]
162
                             @endif
164
                             @endif
163
                             ">
165
                             ">
317
                 what = $(submitter).data('form-id');
319
                 what = $(submitter).data('form-id');
318
                 form_id = $(submitter).data('form-id');
320
                 form_id = $(submitter).data('form-id');
319
                 form = $("#" + form_id)
321
                 form = $("#" + form_id)
320
-                form = $("#" + form_id).children('div')
322
+                form = $("#" + form_id).children('div');
323
+
321
 
324
 
322
                 $("#" + form_id).children('.form_validation').each(function(index) {
325
                 $("#" + form_id).children('.form_validation').each(function(index) {
323
                     //alert($(this).attr('id') + '   ' + index);
326
                     //alert($(this).attr('id') + '   ' + index);
404
                     } else if ($(this).hasClass('program_form')) {
407
                     } else if ($(this).hasClass('program_form')) {
405
                         checkedboxes = $(this).children('input[type="checkbox"]:checked').length;
408
                         checkedboxes = $(this).children('input[type="checkbox"]:checked').length;
406
                         if (!checkedboxes) {
409
                         if (!checkedboxes) {
407
-                            var timer;
410
+
408
 
411
 
409
                             alert = $('<div/>', {
412
                             alert = $('<div/>', {
410
                                 'class': 'alert alert-danger alert-dismissible',
413
                                 'class': 'alert alert-danger alert-dismissible',
422
                             $(this).prepend(alert);
425
                             $(this).prepend(alert);
423
                             $('html, body').animate({
426
                             $('html, body').animate({
424
                                 scrollTop: $(alert).offset().top
427
                                 scrollTop: $(alert).offset().top
425
-                            }, 1000);
428
+                            }, 300);
426
                             //$(divGroup).focus();
429
                             //$(divGroup).focus();
427
                             isEverythingOkay = false;
430
                             isEverythingOkay = false;
428
                         }
431
                         }
429
 
432
 
430
                     } else if ($(this).hasClass('name_form')) {
433
                     } else if ($(this).hasClass('name_form')) {
434
+
431
                         input = $(this).children('input')[0];
435
                         input = $(this).children('input')[0];
432
                         if ($(input).val() == '') {
436
                         if ($(input).val() == '') {
433
                             var timer;
437
                             var timer;
448
                             $(this).prepend(alert);
452
                             $(this).prepend(alert);
449
                             $('html, body').animate({
453
                             $('html, body').animate({
450
                                 scrollTop: $(alert).offset().top
454
                                 scrollTop: $(alert).offset().top
451
-                            }, 1000);
455
+                            }, 300);
452
                             //$(divGroup).focus();
456
                             //$(divGroup).focus();
453
                             isEverythingOkay = false;
457
                             isEverythingOkay = false;
454
                         }
458
                         }
455
 
459
 
456
                     } else if ($(this).hasClass('maximum_form')) {
460
                     } else if ($(this).hasClass('maximum_form')) {
461
+                        input = $(this).children('input')[0];
462
+                        if (isNaN($(input).val())) {
463
+                            alert = $('<div/>', {
464
+                                'class': 'alert alert-danger alert-dismissible',
465
+                                'role': 'alert'
466
+                            })
467
+                            button = $('<button/>', {
468
+                                'type': 'button',
469
+                                'class': 'close',
470
+                                'data-dismiss': 'alert',
471
+                                'alert-label': 'close'
472
+                            }).html('<span aria-hidden="true">×</span>');
473
+                            alert.append(button);
474
+                            alert.append('<strong>Write a valid number for maximum score</strong>')
457
 
475
 
476
+                            $(this).prepend(alert);
477
+                            $('html, body').animate({
478
+                                scrollTop: $(alert).offset().top
479
+                            }, 300);
480
+                            //$(divGroup).focus();
481
+                            isEverythingOkay = false;
482
+                        }
458
 
483
 
459
-                    } else if ($(this).hasClass('scales_form')) {
460
 
484
 
461
                     } else if ($(this).hasClass('number_of_scales')) {
485
                     } else if ($(this).hasClass('number_of_scales')) {
486
+                        btn_group = $(this).children('div.btn-group')[0];
487
+                        select = $(btn_group).children('select')[0];
488
+                        if (isNaN($(select).val())) {
489
+
490
+                            alert = $('<div/>', {
491
+                                'class': 'alert alert-danger alert-dismissible',
492
+                                'role': 'alert'
493
+                            })
494
+                            button = $('<button/>', {
495
+                                'type': 'button',
496
+                                'class': 'close',
497
+                                'data-dismiss': 'alert',
498
+                                'alert-label': 'close'
499
+                            }).html('<span aria-hidden="true">×</span>');
500
+                            alert.append(button);
501
+                            alert.append('<strong>Select a valid number</strong>')
502
+
503
+                            $(this).prepend(alert);
504
+                            $('html, body').animate({
505
+                                scrollTop: $(alert).offset().top
506
+                            }, 300);
507
+                            //$(divGroup).focus();
508
+                            isEverythingOkay = false;
509
+                        }
510
+
511
+                    } else if ($(this).hasClass('scales_form')) {
512
+
513
+                        //amount_of_scales = parseInt($(this).data('value'));
514
+
515
+                        $.each($(this).children('div'), function() {
516
+                            form_group = $(this).children('div.form-group')[0];
517
+                            textarea = $(form_group).children('textarea')[0];
518
+                            if ($(textarea).val() == '') {
519
+                                alert = $('<div/>', {
520
+                                    'class': 'alert alert-danger alert-dismissible',
521
+                                    'role': 'alert'
522
+                                })
523
+                                button = $('<button/>', {
524
+                                    'type': 'button',
525
+                                    'class': 'close',
526
+                                    'data-dismiss': 'alert',
527
+                                    'alert-label': 'close'
528
+                                }).html('<span aria-hidden="true">×</span>');
529
+                                alert.append(button);
530
+                                alert.append('<strong>Make sure to fill this scale</strong>')
531
+
532
+                                $(form_group).prepend(alert);
533
+                                $('html, body').animate({
534
+                                    scrollTop: $(alert).offset().top
535
+                                }, 300);
536
+                                //$(divGroup).focus();
537
+                                isEverythingOkay = false;
538
+                            }
539
+                        })
540
+
462
 
541
 
463
                     } else return;
542
                     } else return;
464
 
543
 
467
                 })
546
                 })
468
 
547
 
469
 
548
 
470
-                //BORRAR
471
-                //if (!isEverythingOkay)
472
-                e.preventDefault();
549
+
550
+                if (!isEverythingOkay)
551
+                    e.preventDefault();
473
 
552
 
474
 
553
 
475
             } else e.preventDefault();
554
             } else e.preventDefault();
486
         visibleProgram["allAssocOutcomes"] = {}
565
         visibleProgram["allAssocOutcomes"] = {}
487
         visibleProgram["allOutcomes"] = {}
566
         visibleProgram["allOutcomes"] = {}
488
 
567
 
568
+
489
         function visiblePrograms(allOutcomesDiv) {
569
         function visiblePrograms(allOutcomesDiv) {
570
+            checkedPrograms = {}
490
             $('#' + allOutcomesDiv).parent().find('input:checkbox').each(function(index) {
571
             $('#' + allOutcomesDiv).parent().find('input:checkbox').each(function(index) {
491
 
572
 
492
                 id = $(this).attr('id');
573
                 id = $(this).attr('id');
493
-                $(this).prop("checked", false);
574
+                if ($(this).is(':checked')) {
575
+                    checkedPrograms[$(this).attr('id')] = 1;
576
+                    $(this).prop("checked", false);
577
+                }
578
+
494
                 program_id = $(this).val();
579
                 program_id = $(this).val();
495
                 if (!(program_id in visibleProgram[allOutcomesDiv])) {
580
                 if (!(program_id in visibleProgram[allOutcomesDiv])) {
496
                     visibleProgram[allOutcomesDiv][program_id] = {};
581
                     visibleProgram[allOutcomesDiv][program_id] = {};
502
             })
587
             })
503
             if (allOutcomesDiv == "allOutcomes") {
588
             if (allOutcomesDiv == "allOutcomes") {
504
                 $('#' + allOutcomesDiv).parent().find("select[name='objective[]']").each(function(index) {
589
                 $('#' + allOutcomesDiv).parent().find("select[name='objective[]']").each(function(index) {
590
+
591
+                    //program_ids in objective
505
                     var the_programs = $(this).find(':selected').data('program-ids');
592
                     var the_programs = $(this).find(':selected').data('program-ids');
506
                     if (!the_programs) return;
593
                     if (!the_programs) return;
507
 
594
 
509
                     for (index in the_programs) {
596
                     for (index in the_programs) {
510
                         program_id = the_programs[index];
597
                         program_id = the_programs[index];
511
 
598
 
599
+                        //if the program_id is inside the visibleProgram scope
600
+                        //and the checkbox isnt alread present
601
+
512
                         if (program_id in visibleProgram[allOutcomesDiv] &&
602
                         if (program_id in visibleProgram[allOutcomesDiv] &&
513
                             !($('#program-checkboxes').find('#' + visibleProgram[allOutcomesDiv][program_id][
603
                             !($('#program-checkboxes').find('#' + visibleProgram[allOutcomesDiv][program_id][
514
                                 'checkbox'
604
                                 'checkbox'
515
                             ].attr('id')).val())) {
605
                             ].attr('id')).val())) {
606
+                            //if it was checked, check it again
607
+                            id = visibleProgram[allOutcomesDiv][program_id]['checkbox'].attr('id');
608
+                            if (checkedPrograms[id]) {
609
+                                visibleProgram[allOutcomesDiv][program_id]['checkbox'].prop('checked', true);
610
+                            }
516
                             visibleProgram[allOutcomesDiv][program_id]['checkbox'].appendTo('#program-checkboxes');
611
                             visibleProgram[allOutcomesDiv][program_id]['checkbox'].appendTo('#program-checkboxes');
612
+
613
+
517
                             visibleProgram[allOutcomesDiv][program_id]['label'].appendTo("#program-checkboxes");
614
                             visibleProgram[allOutcomesDiv][program_id]['label'].appendTo("#program-checkboxes");
518
                             $('#program-checkboxes').append('<br>');
615
                             $('#program-checkboxes').append('<br>');
519
 
616
 
535
                             !($('#assoc-program-checkboxes').find('#' + visibleProgram[allOutcomesDiv][program_id][
632
                             !($('#assoc-program-checkboxes').find('#' + visibleProgram[allOutcomesDiv][program_id][
536
                                 'checkbox'
633
                                 'checkbox'
537
                             ].attr('id')).val())) {
634
                             ].attr('id')).val())) {
635
+
636
+                            id = visibleProgram[allOutcomesDiv][program_id]['checkbox'].attr('id');
637
+                            if (checkedPrograms[id]) {
638
+                                visibleProgram[allOutcomesDiv][program_id]['checkbox'].prop('checked', true);
639
+
640
+                            }
538
                             visibleProgram[allOutcomesDiv][program_id]['checkbox'].appendTo(
641
                             visibleProgram[allOutcomesDiv][program_id]['checkbox'].appendTo(
539
                                 '#assoc-program-checkboxes');
642
                                 '#assoc-program-checkboxes');
643
+
540
                             visibleProgram[allOutcomesDiv][program_id]['label'].appendTo(
644
                             visibleProgram[allOutcomesDiv][program_id]['label'].appendTo(
541
                                 "#assoc-program-checkboxes");
645
                                 "#assoc-program-checkboxes");
542
                             $('#assoc-program-checkboxes').append('<br>');
646
                             $('#assoc-program-checkboxes').append('<br>');

+ 9
- 3
app/views/local/professors/compare_activities.blade.php View File

251
                         $expected = DB::table('target_outcomes_program')
251
                         $expected = DB::table('target_outcomes_program')
252
                             ->where('program_id', $course->program_id)
252
                             ->where('program_id', $course->program_id)
253
                             ->where('semester_id', $course->semester_id)
253
                             ->where('semester_id', $course->semester_id)
254
-                            ->first()->expected_target;
254
+                            ->first();
255
+                            if(!$expected){
256
+                                                        $expected = "It has not been defined in the annual plan";
257
+                                                    }
255
                         
258
                         
256
                         ?>
259
                         ?>
257
                         {{ $expected }}
260
                         {{ $expected }}
261
+                        
258
                     </i>
262
                     </i>
259
                 </p>
263
                 </p>
260
                 <br>
264
                 <br>
457
                         $expected = DB::table('target_outcomes_program')
461
                         $expected = DB::table('target_outcomes_program')
458
                             ->where('program_id', $course->program_id)
462
                             ->where('program_id', $course->program_id)
459
                             ->where('semester_id', $course->semester_id)
463
                             ->where('semester_id', $course->semester_id)
460
-                            ->first()->expected_target;
461
-                        
464
+                            ->first();//->expected_target;
465
+                            if(!$expected){
466
+                                                        $expected = "It has not been defined in the annual plan";
467
+                                                    }
462
                         ?>
468
                         ?>
463
                         {{ $expected }}
469
                         {{ $expected }}
464
                     </i>
470
                     </i>

+ 4
- 4
app/views/local/professors/course.blade.php View File

152
                               
152
                               
153
                               <select id='select-activity-1' data-count = "1" class="form-control selectpicker" >
153
                               <select id='select-activity-1' data-count = "1" class="form-control selectpicker" >
154
                                   @foreach ($activities as $activity)
154
                                   @foreach ($activities as $activity)
155
-                                 
155
+                                 @if($activity->is_assessed())
156
                                   <option value='{{$activity->id}}' >{{$activity->name}}</option>
156
                                   <option value='{{$activity->id}}' >{{$activity->name}}</option>
157
-          
157
+                                @endif
158
                                   @endforeach
158
                                   @endforeach
159
                               </select>
159
                               </select>
160
                               <hr>
160
                               <hr>
162
 
162
 
163
                               <select id='select-activity-2' data-count = "1" class="form-control selectpicker" >
163
                               <select id='select-activity-2' data-count = "1" class="form-control selectpicker" >
164
                                 @foreach ($activities as $activity)
164
                                 @foreach ($activities as $activity)
165
-                               
165
+                                @if($activity->is_assessed())
166
                                 <option value='{{$activity->id}}' >{{$activity->name}}</option>
166
                                 <option value='{{$activity->id}}' >{{$activity->name}}</option>
167
-        
167
+                                @endif
168
                                 @endforeach
168
                                 @endforeach
169
                             </select>
169
                             </select>
170
                             <hr>
170
                             <hr>

+ 4
- 1
app/views/local/professors/new_assessment_report.blade.php View File

241
                                      $expected = DB::table('target_outcomes_program')
241
                                      $expected = DB::table('target_outcomes_program')
242
         ->where('program_id', $course->program_id)
242
         ->where('program_id', $course->program_id)
243
         ->where('semester_id', $course->semester_id)
243
         ->where('semester_id', $course->semester_id)
244
-        ->first()->expected_target;
244
+        ->first();//->expected_target;
245
+        if(!$expected){
246
+                                                        $expected = "It has not been defined in the annual plan";
247
+                                                    }
245
 
248
 
246
         
249
         
247
                                     ?>
250
                                     ?>