Browse Source

Algunos otros bugs

parent
commit
f33421b692

+ 2
- 2
app/controllers/ActivitiesController.php View File

310
                     DB::update("update activities set draft = {$activity_draft}, diagnostic = {$activity_diagnostic} where id = {$activity_id}");
310
                     DB::update("update activities set draft = {$activity_draft}, diagnostic = {$activity_diagnostic} where id = {$activity_id}");
311
                     // Outcome count
311
                     // Outcome count
312
                     Session::flash('status', 'success');
312
                     Session::flash('status', 'success');
313
-                    Session::flash('message', 'Assessment Saved. To add transforming actions click "Transforming Actions".');
313
+                    Session::flash('message', 'Assessment Saved. To add Formative actions click "Formative Actions".');
314
                     return action('ActivitiesController@show', array(Input::get('activity_id')));
314
                     return action('ActivitiesController@show', array(Input::get('activity_id')));
315
 
315
 
316
                     $outcomeCount = Outcome::all()->count();
316
                     $outcomeCount = Outcome::all()->count();
501
 
501
 
502
             if (is_null($exception)) {
502
             if (is_null($exception)) {
503
                 Session::flash('status', 'success');
503
                 Session::flash('status', 'success');
504
-                Session::flash('message', 'Assessment Saved. To add transforming actions click "Transforming Actions".');
504
+                Session::flash('message', 'Assessment Saved. To add  Formative actions click "Formative Actions".');
505
                 return action('ActivitiesController@show', array(Input::get('activity_id')));
505
                 return action('ActivitiesController@show', array(Input::get('activity_id')));
506
             }
506
             }
507
         } catch (Exception $e) {
507
         } catch (Exception $e) {

+ 3
- 9
app/controllers/CriteriaController.php View File

136
             ->select('objectives.*', 'objective_outcome.*')
136
             ->select('objectives.*', 'objective_outcome.*')
137
             ->distinct()
137
             ->distinct()
138
             ->get();
138
             ->get();
139
-        Log::info(DB::table('objectives')
140
-            ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'objectives.id')
141
-            ->join('objective_program', 'objective_program.objective_id', '=', 'objectives.id')
142
-            ->where('outcome_id', '=', $outcome_id)
143
-            ->whereIn('program_id', $program_ids)
144
-            ->select('objectives.*', 'objective_outcome.*')
145
-            ->distinct()->toSql());
139
+
146
         foreach ($json as $objective) {
140
         foreach ($json as $objective) {
147
             $objective->program_ids = json_encode(DB::table('objective_program')
141
             $objective->program_ids = json_encode(DB::table('objective_program')
148
                 ->where('objective_id', $objective->objective_id)
142
                 ->where('objective_id', $objective->objective_id)
149
-                ->lists('program_id'));
143
+                ->lists('program_id'), JSON_NUMERIC_CHECK);
150
         }
144
         }
151
 
145
 
152
 
146
 
247
             foreach ($outcome->assoc_objectives as $objective) {
241
             foreach ($outcome->assoc_objectives as $objective) {
248
                 $objective->program_ids = json_encode(DB::table('objective_program')
242
                 $objective->program_ids = json_encode(DB::table('objective_program')
249
                     ->where('objective_id', $objective->id)
243
                     ->where('objective_id', $objective->id)
250
-                    ->lists('program_id'));
244
+                    ->lists('program_id'), JSON_NUMERIC_CHECK);
251
             }
245
             }
252
         }
246
         }
253
         $criterion->scales = DB::table('criterion_scale')
247
         $criterion->scales = DB::table('criterion_scale')

+ 3
- 3
app/controllers/ThreeYearPlanController.php View File

54
       $last_year = $last_year->year_end;
54
       $last_year = $last_year->year_end;
55
     }
55
     }
56
 
56
 
57
-
57
+    $program = Program::find($program_id);
58
     // el ID de los semestres que el usuario tiene seleccionado.
58
     // el ID de los semestres que el usuario tiene seleccionado.
59
     $semesters_ids = Session::get('semesters_ids');
59
     $semesters_ids = Session::get('semesters_ids');
60
     // buscar informacion de los semestres seleccionados
60
     // buscar informacion de los semestres seleccionados
61
     $semesters = Semester::whereIn('id', $semesters_ids)->get();
61
     $semesters = Semester::whereIn('id', $semesters_ids)->get();
62
 
62
 
63
-    $title = "Three Year Plans";
63
+    $title = "Three Year Plan for " . $program->name;
64
     $typs = DB::table('three_year_plan')
64
     $typs = DB::table('three_year_plan')
65
       ->orderBy('year_start', 'asc')
65
       ->orderBy('year_start', 'asc')
66
       ->get();
66
       ->get();
631
 
631
 
632
     return View::make('global.print_three_year_plan', compact('typ_semesters', 'program', 'three_year_plan', 'typ_semesters', 'typ_semester_outcome'));
632
     return View::make('global.print_three_year_plan', compact('typ_semesters', 'program', 'three_year_plan', 'typ_semesters', 'typ_semester_outcome'));
633
   }
633
   }
634
-}
634
+}

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

1162
         if (!$result) {
1162
         if (!$result) {
1163
           DB::rollback();
1163
           DB::rollback();
1164
           Session::flash('status', 'danger');
1164
           Session::flash('status', 'danger');
1165
-          Session::flash('message', 'Error saving Transforming Action. Try again later.');
1165
+          Session::flash('message', 'Error saving Formative Action. Try again later.');
1166
 
1166
 
1167
           return Redirect::to("professor/activities/{$activity_id}");
1167
           return Redirect::to("professor/activities/{$activity_id}");
1168
         }
1168
         }
1183
         if (!$result2) {
1183
         if (!$result2) {
1184
           DB::rollback();
1184
           DB::rollback();
1185
           Session::flash('status', 'danger');
1185
           Session::flash('status', 'danger');
1186
-          Session::flash('message', 'Error saving Transforming Action. Try again later.');
1186
+          Session::flash('message', 'Error saving Formative Action. Try again later.');
1187
 
1187
 
1188
           return Redirect::to("professor/activities/{$activity_id}");
1188
           return Redirect::to("professor/activities/{$activity_id}");
1189
         }
1189
         }
1193
       if (!($result3)) {
1193
       if (!($result3)) {
1194
         DB::rollback();
1194
         DB::rollback();
1195
         Session::flash('status', 'danger');
1195
         Session::flash('status', 'danger');
1196
-        Session::flash('message', 'Error saving Transforming Action. Try again later.');
1196
+        Session::flash('message', 'Error saving Formative Action. Try again later.');
1197
         return Redirect::to("professor/activities/{$activity_id}");
1197
         return Redirect::to("professor/activities/{$activity_id}");
1198
       }
1198
       }
1199
       DB::commit();
1199
       DB::commit();
1200
       Session::flash('status', 'success');
1200
       Session::flash('status', 'success');
1201
-      Session::flash('message', 'Transformative Actions Saved.');
1201
+      Session::flash('message', 'Formative Actions Saved.');
1202
 
1202
 
1203
       return Redirect::to("professor/activities/{$activity_id}");
1203
       return Redirect::to("professor/activities/{$activity_id}");
1204
     } else {
1204
     } else {
1205
       DB::rollback();
1205
       DB::rollback();
1206
       Session::flash('status', 'danger');
1206
       Session::flash('status', 'danger');
1207
-      Session::flash('message', 'Error saving Transforming Action. Try again later.');
1207
+      Session::flash('message', 'Error saving Formative Action. Try again later.');
1208
 
1208
 
1209
       return Redirect::to("professor/activities/{$activity_id}");
1209
       return Redirect::to("professor/activities/{$activity_id}");
1210
     }
1210
     }

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

65
                                   
65
                                   
66
 
66
 
67
                 <p>A Formative Action is the educational action to be taken to address the criteria of an unachieved Learning Outcome.</p>
67
                 <p>A Formative Action is the educational action to be taken to address the criteria of an unachieved Learning Outcome.</p>
68
-                <p>Una acción transformadora es una acción educativa a tomarse para atender el o los criterios de un dominio dado que no se alcanzaron.</p>
68
+                <p>Una acción formativa es una acción educativa a tomarse para atender el o los criterios de un dominio dado que no se alcanzaron.</p>
69
 
69
 
70
                 <h5>Choose criteria for the transforming action <br>
70
                 <h5>Choose criteria for the transforming action <br>
71
                 Escoge los criterion para la acción transformadora</h5>
71
                 Escoge los criterion para la acción transformadora</h5>