コード例 #1
0
 public function MarkUpdate($d, $credit)
 {
     foreach ($d as $key => $val) {
         if ($key !== 'id' && $key !== 'sheetid') {
             $val = intval($val);
             if ($val < 0 || $val > 100) {
                 return false;
             }
         }
     }
     $d->mark = $d->additional + $d->prliminary;
     if ($d->mark > 100) {
         return false;
     }
     if ($credit === true) {
         $d->mark = $this->CreditSetMark($d->mark);
     }
     RecordBookQuery::MarkUpdate($this->db, $d);
 }