'); } if ($_GET['ppl_id'] != '') { $afkorting = mdb2_single_val($db, << {$herinfo['period_deadline']} JOIN $kldv.ppl2grp AS grp2ppl ON grp2ppl.ppl_id = ppl2grp.ppl_id AND grp2ppl.ppl_enter <= {$herinfo['period_deadline']} AND grp2ppl.ppl_exit > {$herinfo['period_deadline']} JOIN $kldv.grp2subj ON grp2subj.grp_id = grp2ppl.grp_id JOIN $kldv.ppl2grp2subj ON ppl2grp2subj.grp2subj_id = grp2subj.grp2subj_id AND ppl2grp2subj.ppl_enter <= {$herinfo['period_deadline']} AND ppl2grp2subj.ppl_exit > {$herinfo['period_deadline']} JOIN $kldv.ppl ON ppl.ppl_id = ppl2grp2subj.ppl_id WHERE period_id = {$herinfo['period_id']} AND ppl.ppl_id = '%q' ORDER BY ppl_login EOQ , $_GET['ppl_id']); if (!$afkorting) error_user('Docent niet gevonden', 'Geselecteerde docent geeft geen les aan klassen die herkansingen opgeven via deze pagina'); $or = '1=0'; } else $or = '1=1'; if ($_GET['pta_id'] == '') $or2 = '1=1'; else $or2 = '1=0'; $hers = mdb2_query($db, << {$herinfo['period_deadline']} JOIN $kldv.grp2subj ON grp2subj.grp_id = ppl2grp.grp_id AND grp2subj.subj_id = rex.subj_id JOIN $kldv.ppl2grp2subj ON ppl2grp2subj.grp2subj_id = grp2subj.grp2subj_id AND ppl2grp2subj.ppl_enter <= {$herinfo['period_deadline']} AND ppl2grp2subj.ppl_exit > {$herinfo['period_deadline']} JOIN $kldv.ppl2grp AS ppl2grp2 ON ppl2grp2.ppl_id = ppl.ppl_id AND ppl2grp2.ppl_enter <= {$herinfo['period_deadline']} AND ppl2grp2.ppl_exit > {$herinfo['period_deadline']} JOIN $kldv.grp ON grp.grp_id = ppl2grp.grp_id JOIN $kldv.grp AS grp2 ON grp2.grp_id = ppl2grp2.grp_id JOIN $kldv.ppl AS doc ON ppl2grp2subj.ppl_id = doc.ppl_id JOIN $kldv.subj ON subj.subj_id = rex.subj_id WHERE period_id = {$herinfo['period_id']} AND grp2.grp_home = 1 AND (doc.ppl_id = '%q' OR $or) AND (rex.pta_id = '%q' OR $or2) AND stvt != 'BLOKKADE' ORDER BY doc.ppl_login, subj_abbrev, pta_period, grp.grp_name, ppl.ppl_surname, ppl.ppl_forename, ppl.ppl_prefix EOQ , $_GET['ppl_id'], $_GET['pta_id']); if (!($row = $hers->fetchRow(MDB2_FETCHMODE_ORDERED))) { if ($afkorting) { error_user('Geen herkansingen gevonden', htmlenc($afkorting).' heeft op dit moment geen herkansers.'); } else { error_user('Geen herkansingen gevonden', 'Geen enkele leerling heeft op dit moment een herkansing opgegeven'); } } // we halen de dyslecten op uit de actuele dyslectenlijst $dyslecten = mdb2_all_assoc_rekey($db, <<fetchRow(MDB2_FETCHMODE_ORDERED))); ?>