Beispiel #1
0
     echo "<xml>";
     echo "<status>error</status>";
     echo "<message>Invalid course id</message>";
     echo "</xml>";
     exit;
 }
 if (eF_checkParameter($_GET['login'], 'login') == false) {
     echo "<xml>";
     echo "<status>error</status>";
     echo "<message>Invalid login format</message>";
     echo "</xml>";
     exit;
 }
 try {
     $course = new EfrontCourse($_GET['course']);
     if ($course->isStudentInCourse($_GET['login']) === false && $course->isProfessorInCourse($_GET['login']) === false) {
         echo "<xml>";
         echo "<status>error</status>";
         echo "<message>User not enrolled into course</message>";
         echo "</xml>";
         exit;
     }
     $course->removeUsers($_GET['login']);
     echo "<xml>";
     echo "<status>ok</status>";
     echo "</xml>";
 } catch (Exception $e) {
     if ($e->getCode() == EfrontCourseException::COURSE_NOT_EXISTS) {
         echo "<xml>";
         echo "<status>error</status>";
         echo "<message>Course doesn't exist</message>";