Exemple #1
0
         if ($g = ContactView::pset_grade(json_decode($row[0]), $Pset)) {
             $series->add($g->total);
             if ($row[1]) {
                 $xseries->add($g->total);
             }
             if ($noextra_series) {
                 $noextra_series->add($g->total_noextra);
                 if ($g->total_noextra != $g->total) {
                     $has_extra = true;
                 }
             }
         }
     }
     $r = $series->summary();
     if ($xseries->n) {
         $r->extension = $xseries->summary();
     }
     if ($has_extra) {
         $r->noextra = $noextra_series->summary();
     }
     $pgj = $Pset->gradeinfo_json(false);
     if ($pgj && isset($pgj->maxgrades->total)) {
         $r->maxtotal = $pgj->maxgrades->total;
         if (isset($r->noextra)) {
             $r->noextra->maxtotal = $pgj->maxgrades->total;
         }
     }
     $Conf->save_setting("gradejson_pset{$Pset->id}", $Now, json_encode($r));
 }
 $j = json_decode($Conf->setting_data("gradejson_pset{$Pset->id}"));
 $j->ok = true;