Browse Source

EL school report ahora se tarda una eternidad

parent
commit
19e8b79353

+ 3
- 2
app/controllers/ProgramsController.php View File

11
   {
11
   {
12
 
12
 
13
     $program = Program::find($id);
13
     $program = Program::find($id);
14
+    Log::info(debug_backtrace()[1]['function']);
14
     $title = $program->school->name . ': ' . $program->name;
15
     $title = $program->school->name . ': ' . $program->name;
15
     $program_courses = $program->courses;
16
     $program_courses = $program->courses;
16
     //     $outcomes = Outcome::orderBy('name', 'asc')->get();
17
     //     $outcomes = Outcome::orderBy('name', 'asc')->get();
495
    */
496
    */
496
   public function fetch()
497
   public function fetch()
497
   {
498
   {
498
-    Log::info('id:' . Input::get('id'));
499
+    //Log::info('id:' . Input::get('id'));
499
     return School::find(Input::get('id'))->programs;
500
     return School::find(Input::get('id'))->programs;
500
   }
501
   }
501
-}
502
+}

+ 12
- 10
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
-                                                                                                                                                                       
161
-                                                                                                                       
162
-                                                                  @if ($criterion->program)
154
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
155
+                                                                                                                                                                                                                                                                                                                                                                                                                               
156
+                                                                                                                                                                                                                                                                                                                                                                               
157
+                                                                                                                                                                                                                                                                                                                               
158
+                                                                                                                                                                                                                                                                               
159
+                                                                                                                                                                                                                               
160
+                                                                                                                                                                               
161
+                                                                                                                               
162
+                                                                            @if ($criterion->program)
163
                                     &nbsp;&nbsp;&nbsp;[{{ $criterion->program->name }}]
163
                                     &nbsp;&nbsp;&nbsp;[{{ $criterion->program->name }}]
164
                             @endif
164
                             @endif
165
                             ">
165
                             ">
277
                         {{ Form::textarea('notes', Input::old('notes'), ['class' => 'form-control', 'rows' => 2, 'id' => 'criterion_notes', 'placeholder' => '(optional)']) }}
277
                         {{ Form::textarea('notes', Input::old('notes'), ['class' => 'form-control', 'rows' => 2, 'id' => 'criterion_notes', 'placeholder' => '(optional)']) }}
278
                     </div>
278
                     </div>
279
 
279
 
280
-                    {{ Form::submit('Update', ['class' => 'btn btn-primary btn-block', 'id' => 'update_the_criterion_button']) }}
280
+                    {{ Form::submit('Update', ['class' => 'btn btn-primary btn-block', 'id' => 'update_the_criterion_button', 'data-form-id' => 'update_criterion']) }}
281
                     {{ Form::close() }}
281
                     {{ Form::close() }}
282
 
282
 
283
                     {{ Form::open(['action' => 'CriteriaController@delete']) }}
283
                     {{ Form::open(['action' => 'CriteriaController@delete']) }}
1349
                             $("#update_the_criterion_button").val('Update');
1349
                             $("#update_the_criterion_button").val('Update');
1350
                             $("#update_criterion").attr('action', "{{ URL::action('CriteriaController@update') }}")
1350
                             $("#update_criterion").attr('action', "{{ URL::action('CriteriaController@update') }}")
1351
 
1351
 
1352
+
1352
                         } else {
1353
                         } else {
1353
                             $('#DeleteButton').prop('disabled', true);
1354
                             $('#DeleteButton').prop('disabled', true);
1354
                             $("#update_the_criterion_button").val("Create New")
1355
                             $("#update_the_criterion_button").val("Create New")
1357
                                 '<div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button> <strong>Warning!</strong> The criterion is already used in assessments. Editting the criterion will actually create a new criterion </div>'
1358
                                 '<div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button> <strong>Warning!</strong> The criterion is already used in assessments. Editting the criterion will actually create a new criterion </div>'
1358
                             );
1359
                             );
1359
 
1360
 
1361
+
1360
                         }
1362
                         }
1361
                         var name = criterion.name;
1363
                         var name = criterion.name;
1362
                         if (criterion.subcriteria) {
1364
                         if (criterion.subcriteria) {

+ 12
- 10
app/views/local/managers/sCoords/new_assessment_report.blade.php View File

56
                                 <?php
56
                                 <?php
57
                                 
57
                                 
58
                                 /*$sections_evaluating = Course::has('activities')
58
                                 /*$sections_evaluating = Course::has('activities')
59
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ->whereNotNull('outcomes_attempted')
60
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
61
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ->with(array('activities'=>function($query) use(&$outcome){
62
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        $query->whereNotNull('outcomes_attempted');
63
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        $query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');} ))
64
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ->where('code', $course->code)->where('number',$course->number)
65
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ->whereIn('semester_id', Session::get('semesters_ids'))
66
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ->get();*/
59
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ->whereNotNull('outcomes_attempted')
60
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
61
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ->with(array('activities'=>function($query) use(&$outcome){
62
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        $query->whereNotNull('outcomes_attempted');
63
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        $query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');} ))
64
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ->where('code', $course->code)->where('number',$course->number)
65
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ->whereIn('semester_id', Session::get('semesters_ids'))
66
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ->get();*/
67
                                 
67
                                 
68
                                 $sections_evaluating = Course::has('activities')
68
                                 $sections_evaluating = Course::has('activities')
69
                                 
69
                                 
245
                                                 $expected = DB::table('target_outcomes_program')
245
                                                 $expected = DB::table('target_outcomes_program')
246
                                                     ->where('program_id', $course->program_id)
246
                                                     ->where('program_id', $course->program_id)
247
                                                     ->where('semester_id', $course->semester_id)
247
                                                     ->where('semester_id', $course->semester_id)
248
-                                                    ->first()->expected_target;
249
-                                                
248
+                                                    ->first(); //->expected_target;
249
+                                                if (!$expected) {
250
+                                                    $expected = 'It has not been defined in the annual plan';
251
+                                                }
250
                                                 ?>
252
                                                 ?>
251
                                                 {{ $expected }}
253
                                                 {{ $expected }}
252
                                             </i>
254
                                             </i>