dgr_require('/includes/class.php'); dgr_require('/includes/student.php'); dgr_startup(); if (!isset($_GET['id']) || !isset($_GET['semid']) || !isset($_GET['qid'])) { exit; } try { $user = new DGradeUser(); $class = new DGradeClass($_GET['id']); } catch (Exception $e) { exit; } if ($user->get_level() != 0 && $user->get_uid() != $class->get_tutorid()) { exit; } $email = $user->get_email(); if (empty($email)) { $err = 1; $msg = gettext('E-mail not set'); } else { $ret = true; foreach ($class->students as $st) { $student = new DGradeStudent($st); $ret = $ret && $student->send($_GET['semid'], $email); } if ($ret) { $err = 0; $msg = gettext('All messages sent'); } else { $err = 1; $msg = gettext('Not all messages were sent :(');
echo gettext('Surname'); ?> :</td> <td><input type="text" name="surname" maxlength="30" value="<?php echo $user->get_surname(); ?> " /></td> </tr> <tr> <td><?php echo gettext('E-mail'); ?> :</td> <td> <input id="email" type="text" name="email" maxlength="30" onblur="validate_email()" value="<?php echo $user->get_email(); ?> " /> </td> <td> <img id="emailvalid" class="hiddenimg" src="img/valid.png" alt="valid" /> <img id="emailbad" class="hiddenimg" src="img/bad.png" alt="bad" /> </td> </tr> <tr> <td><?php echo gettext('Style'); ?> :</td> <td> <select name="style">