Kaynağa Gözat

y aadir outcomes a tablas de criteria activit

Gabriel Santiago Plaza 3 yıl önce
ebeveyn
işleme
4ad8721400

+ 13
- 0
app/models/Activity.php Dosyayı Görüntüle

111
         ->lists('student_id'));
111
         ->lists('student_id'));
112
 
112
 
113
       $single_crit->score_percentage = ($amount_of_students_passed / $amount_of_students) * 100;
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
       $criteria_achieved_percentage[$single_crit->criterion_id] = $single_crit;
127
       $criteria_achieved_percentage[$single_crit->criterion_id] = $single_crit;
115
     }
128
     }
116
     return $criteria_achieved_percentage;
129
     return $criteria_achieved_percentage;

+ 506
- 502
app/views/local/professors/activity.blade.php
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle