Sfoglia il codice sorgente

y aadir outcomes a tablas de criteria activit

parent
commit
4ad8721400
2 ha cambiato i file con 519 aggiunte e 502 eliminazioni
  1. 13
    0
      app/models/Activity.php
  2. 506
    502
      app/views/local/professors/activity.blade.php

+ 13
- 0
app/models/Activity.php Vedi File

@@ -111,6 +111,19 @@ class Activity extends Eloquent
111 111
         ->lists('student_id'));
112 112
 
113 113
       $single_crit->score_percentage = ($amount_of_students_passed / $amount_of_students) * 100;
114
+
115
+      //this is for criteria graph
116
+
117
+      $single_crit->outcome_names_html = "<tr><td style='color:#e70033; padding:0'>Learning Outcomes:</td>";
118
+      $outcome_names = DB::table('outcomes')
119
+        ->whereIn('id', json_decode($single_crit->outcome_id))
120
+        ->lists('name');
121
+      foreach ($outcome_names as $index => $name) {
122
+        $string_to_add = str_repeat("<td>" . $name . ", </td></tr>", ($index + 1) % 2) . str_repeat("<tr><td style='padding:0'>" . $name . ", </td>", $index % 2);
123
+        $single_crit->outcome_names_html .= $string_to_add;
124
+      }
125
+
126
+      $single_crit->outcome_names_html .= str_repeat("<td></td></tr>", $index % 2);
114 127
       $criteria_achieved_percentage[$single_crit->criterion_id] = $single_crit;
115 128
     }
116 129
     return $criteria_achieved_percentage;

+ 506
- 502
app/views/local/professors/activity.blade.php
File diff soppresso perché troppo grande
Vedi File