Quellcode durchsuchen

Merge branch 'Merge_gabriel_mayo' of https://git.ccom.uprrp.edu/CDCC/OLAS into Merge_gabriel_mayo

Gabriel Santiago Plaza vor 3 Jahren
Ursprung
Commit
24680636d5

+ 2
- 1
app/models/Activity.php Datei anzeigen

@@ -209,7 +209,8 @@ class Activity extends Eloquent
209 209
       ->whereIn('activity_criterion_id', $all_criterion)
210 210
       ->lists('id');
211 211
 
212
-    return boolval(count($assessments));
212
+//     return boolval(count($assessments));
213
+    return (bool)(count($assessments));
213 214
   }
214 215
 
215 216
   public function isStudentAssessed($student_id)

+ 1
- 1
app/views/local/professors/activity.blade.php Datei anzeigen

@@ -390,7 +390,7 @@ $(function () {
390 390
             title: {
391 391
                 text: 'Percentage'
392 392
             },
393
-            @if(isset($activity->rubric[0]->expected_percentage)  )
393
+            @if(isset($activity->rubric[0]) and isset($activity->rubric[0]->expected_percentage)  )
394 394
             plotLines:[{
395 395
                 value:{{ $activity->rubric[0]->expected_percentage }},
396 396
                 color: '#000',

+ 1
- 0
app/views/local/professors/course.blade.php Datei anzeigen

@@ -240,6 +240,7 @@ $(function () {
240 240
                     @if(
241 241
                         is_array($outcomes_attempted)
242 242
                         && array_key_exists($outcome->id, $outcomes_attempted)
243
+                        && array_key_exists($outcome->id, $outcomes_achieved)
243 244
                         && $outcomes_attempted[$outcome->id]!=0)
244 245
                         {{{ ($outcomes_achieved[$outcome->id]/$outcomes_attempted[$outcome->id])*100 }}},
245 246
                     @else