Package teammates.jdo

Examples of teammates.jdo.Course


   * @throws CourseDoesNotExistException
   *             if the course with the specified ID cannot be found
   */
  public void cleanUpCourse(String courseID)
      throws CourseDoesNotExistException {
    Course course = getCourse(courseID);

    // Check that the course exists
    if (course == null)
      throw new CourseDoesNotExistException();

View Full Code Here


   *
   * @throws CourseDoesNotExistException
   *             if the course with the specified ID cannot be found
   */
  public void deleteCoordinatorCourse(String courseID) {
    Course course = getCourse(courseID);

    System.out.println("delete coordinator course");
    // Check that the course exists

    try {
View Full Code Here

    Evaluations evaluations = Evaluations.inst();
   
    List<Evaluation> evaluationList = evaluations.activateEvaluations();
    List<Student> studentList;
   
    Course course;
   
    Accounts accounts = Accounts.inst();
   
    for(Evaluation e: evaluationList)
    {
      // Send registration keys to unregistered students
      Courses courses = Courses.inst();
      studentList = courses.getUnregisteredStudentList(e.getCourseID());
     
      course = courses.getCourse(e.getCourseID());
      Coordinator coord = accounts.getCoordinator(course.getCoordinatorID());
      courses.sendRegistrationKeys(studentList, course.getID(), course.getName(),
            coord.getName(),
            coord.getEmail());
     
      // Send e-mails to inform the students that an evaluation is opened
      studentList = courses.getStudentList(e.getCourseID());
View Full Code Here

                .toString() + "</enrollmentreports>");
  }

  private void coordinatorGetCourse() throws IOException, ServletException {
    Courses courses = Courses.inst();
    Course course = courses.getCourse(req.getParameter(COURSE_ID));

    CourseSummaryForCoordinator courseSummary = new CourseSummaryForCoordinator(
        course.getID(), course.getName(), course.isArchived(),
        courses.getNumberOfTeams(course.getID()));

    ArrayList<CourseSummaryForCoordinator> courseSummaryList = new ArrayList<CourseSummaryForCoordinator>();
    courseSummaryList.add(courseSummary);

    resp.getWriter().write(
View Full Code Here

    Accounts accounts = Accounts.inst();

    String courseID = req.getParameter(COURSE_ID);
    String email = req.getParameter(STUDENT_EMAIL);

    Course course = courses.getCourse(courseID);
    Student student = courses.getStudentWithEmail(courseID, email);

    List<Student> studentList = new ArrayList<Student>();
    studentList.add(student);

    String courseName = course.getName();
    Coordinator coord = accounts.getCoordinator(course.getCoordinatorID());

    courses.sendRegistrationKeys(studentList, courseID, courseName,
        coord.getName(), coord.getEmail());
  }
View Full Code Here

    // Get unregistered students
    List<Student> studentList = courses.getUnregisteredStudentList(req
        .getParameter(COURSE_ID));

    if (!studentList.isEmpty()) {
      Course course = courses.getCourse(studentList.get(0).getCourseID());

      String courseID = course.getID();
      String courseName = course.getName();
      Coordinator coord = accounts.getCoordinator(course
          .getCoordinatorID());

      courses.sendRegistrationKeys(studentList, courseID, courseName,
          coord.getName(), coord.getEmail());
    }
View Full Code Here

    String googleID = accounts.getUser().getNickname();

    Courses courses = Courses.inst();
    String courseID = req.getParameter(COURSE_ID);

    Course course = courses.getCourse(courseID);
    String courseName = course.getName();
    String coordinatorName = accounts.getCoordinatorName(course
        .getCoordinatorID());

    Student student = courses.getStudentWithID(courseID, googleID);

    String studentEmail = student.getEmail();
View Full Code Here

    String courseName = "";
    String teamName = "";

    boolean archived = false;

    Course course = null;

    for (Student s : studentList) {
      courseID = s.getCourseID();
      course = courses.getCourse(courseID);
      courseName = course.getName();
      archived = s.isCourseArchived();
      teamName = courses.getTeamName(courseID, s.getEmail());

      courseSummaryList.add(new CourseSummaryForStudent(courseID,
          courseName, teamName, archived));
View Full Code Here

    // String courseName = req.getParameter("course_name");
    String googleID = req.getParameter("google_id");
    String json = req.getParameter("course");

    Gson gson = new Gson();
    Course c = gson.fromJson(json, Course.class);
    c.setCoordinatorID(googleID);

    getPM().makePersistent(c);

    resp.getWriter().write("ok");
  }
View Full Code Here

    resp.getWriter().write("<enrollmentreports>" + parseEnrollmentReportListToXML(enrollmentReportList).toString() + "</enrollmentreports>");
  }

  private void coordinatorGetCourse() throws IOException, ServletException {
    Courses courses = Courses.inst();
    Course course = courses.getCourse(req.getParameter(COURSE_ID));

    CourseSummaryForCoordinator courseSummary = new CourseSummaryForCoordinator(course.getID(), course.getName(), course.isArchived(), courses.getNumberOfTeams(course.getID()),
        courses.getTotalStudents(course.getID()), courses.getUnregistered(course.getID()));

    ArrayList<CourseSummaryForCoordinator> courseSummaryList = new ArrayList<CourseSummaryForCoordinator>();
    courseSummaryList.add(courseSummary);

    resp.getWriter().write("<courses>" + parseCourseSummaryForCoordinatorListToXML(courseSummaryList).toString() + "</courses>");
View Full Code Here

TOP

Related Classes of teammates.jdo.Course

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.