Package teammates.jdo

Examples of teammates.jdo.Course


                .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(
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

      throws CourseExistsException {
    if (getCourse(ID) != null) {
      throw new CourseExistsException();
    }

    Course course = new Course(ID, name, coordinatorID);

    try {
      getPM().makePersistent(course);
    }
View Full Code Here

   * @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

    // 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

      throws CourseExistsException {
    if (getCourse(ID) != null) {
      throw new CourseExistsException();
    }

    Course course = new Course(ID, name, coordinatorID);

    try {
      getPM().makePersistent(course);
    }
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.