$clicker_id = $pathSeg1; $last_name = $pathSeg2; $output = iclicker_service::ws_go_verify_clickerid($clicker_id, $last_name); $cntlr->setContentType("text/plain"); $cntlr->sendResponse($output); return; */ } else { // NORMAL case handling // handle the request authn if needed iclicker_handle_authn($cntlr); if ("GET" == $cntlr->method) { if ("courses" == $pathSeg0) { // handle retrieving the list of courses for an instructor $user_id = iclicker_get_and_check_current_user("access instructor courses listings"); $output = iclicker_service::encode_courses($user_id); } else { if ("students" == $pathSeg0) { // handle retrieval of the list of students $course_id = $pathSeg1; if ($course_id == null) { throw new InvalidArgumentException("valid course_id must be included in the URL /students/{course_id}"); } iclicker_get_and_check_current_user("access student enrollment listings"); $output = iclicker_service::encode_enrollments($course_id); } else { // UNKNOWN $valid = false; $output = "Unknown path ({$cntlr->path}) specified for method GET"; $status = 404; //NOT_FOUND