public function getPunkte() { $html = ''; foreach ($this->schuelers as $schueler) { $html .= ' <tr>' . "\n"; foreach ($schueler->notens as $note) { $n = new Noten(); //Html::showAll($note); $n->load($note['note_id']); $html .= ' <td><div align="center"><input type="text" class="noten" size="2" maxlength="2" name="' . $note['note_id'] . '" value="' . $note['note'] . '"></div></td>' . "\n"; } $html .= ' <td><div align="center"><input type="text" class="noten" size="2" maxlength="2" name="neu_' . $schueler->getId() . '" value=""></div></td>' . "\n"; $html .= ' <td><div align="center"><input type="text" class="noten" size="5" maxlength="5" value="' . $n->getDurchschnitt() . '" readonly="readonly"></div></td>' . "\n"; $html .= ' </tr>' . "\n"; } return $html; }
public function loadNotens() { $n = new Noten(); $this->notens = $n->getNoten($this->getId()); }