Package teammates.jdo

Examples of teammates.jdo.Student


        else {
          comments = "";
        }

        if (!emails.contains(email)) {
          studentList.add(new Student(email, name, comments, courseID, teamName));
          emails.add(email);
        }
      }

    }
View Full Code Here


    String fromStudentName = "";
    String toStudentName = "";

    String fromStudentComments = null;
    String toStudentComments = null;
    Student student = null;

    float pointsBumpRatio = 0;

    Courses courses = Courses.inst();
    List<Student> studentList = courses.getStudentList(courseID);

    for (Submission s : submissionList) {
      student = null;
      // search for student
      for (Student stu : studentList) {
        if (stu.getEmail().equals(s.getFromStudent())) {
          student = stu;
        }
      }
      if (student == null) {
        fromStudentName = "[deleted]" + s.getFromStudent();
        fromStudentComments = "";
      } else {
        fromStudentName = student.getName();
        fromStudentComments = student.getComments();
      }

      student = courses.getStudentWithEmail(courseID, s.getToStudent());
      if (student == null) {
        toStudentName = "[deleted]" + s.getToStudent();
        toStudentComments = ("");
      } else {
        toStudentName = student.getName();
        toStudentComments = student.getComments();
      }

      // filter submisstion list by fromStudent
      List<Submission> fromList = new LinkedList<Submission>();
      for (Submission fs : submissionList) {
View Full Code Here

    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();
View Full Code Here

    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();
    String studentName = student.getName();
    String teamName = courses.getTeamName(courseID, studentEmail);

    ArrayList<String> teammateList = new ArrayList<String>();
    List<Student> studentList = courses.getStudentList(courseID);
View Full Code Here

    // evaluation is published and open evaluations are not
    // returned to student
    List<Evaluation> filteredEvaluationList = new ArrayList<Evaluation>();

    String email = "";
    Student student = null;

    Calendar now = Calendar.getInstance();
    Calendar start = Calendar.getInstance();
    Calendar deadline = Calendar.getInstance();

    for (Evaluation e : evaluationList) {
      // Fix the time zone accordingly
      now.add(Calendar.MILLISECOND, (int) (60 * 60 * 1000 * e.getTimeZone()));

      student = courses.getStudentWithID(e.getCourseID(), googleID);

      if (student != null) {
        email = student.getEmail();

        start.setTime(e.getStart());
        deadline.setTime(e.getDeadline());

        if (e.isPublished()) {
          filteredEvaluationList.add(e);
        }

        else if (now.after(deadline) && !student.isCourseArchived()) {
          filteredEvaluationList.add(e);
        }

        else {
          if (evaluations.isEvaluationSubmitted(e, email) && (now.after(start)) && !student.isCourseArchived()) {
            filteredEvaluationList.add(e);
          }
        }
      }

View Full Code Here

    // Filter evaluationList - make sure archived, submitted and closed
    // evaluations are not returned to student
    List<Evaluation> filteredEvaluationList = new ArrayList<Evaluation>();

    String email = "";
    Student student = null;

    Calendar now = Calendar.getInstance();
    Calendar start = Calendar.getInstance();
    Calendar deadline = Calendar.getInstance();

    for (Evaluation e : evaluationList) {
      // Fix the time zone accordingly
      now.add(Calendar.MILLISECOND, (int) (60 * 60 * 1000 * e.getTimeZone()));

      student = courses.getStudentWithID(e.getCourseID(), googleID);

      if (student != null) {
        email = student.getEmail();

        start.setTime(e.getStart());
        deadline.setTime(e.getDeadline());

        if (!evaluations.isEvaluationSubmitted(e, email) && (now.after(start) && now.before(deadline)) && !student.isCourseArchived()) {
          filteredEvaluationList.add(e);
        }
      }

      else {
View Full Code Here

    String courseID = req.getParameter(COURSE_ID);
    String evaluationName = req.getParameter(EVALUATION_NAME);

    // fromStudent is the Student's email
    Courses courses = Courses.inst();
    Student student = courses.getStudentWithID(courseID, googleID);

    String fromStudent = student.getEmail();
    String fromStudentName = student.getName();

    Evaluations evaluations = Evaluations.inst();
    List<Submission> submissionList = evaluations.getSubmissionFromStudentList(courseID, evaluationName, fromStudent);

    List<SubmissionDetailsForStudent> submissionDetailsList = new ArrayList<SubmissionDetailsForStudent>();

    for (Submission s : submissionList) {
      student = courses.getStudentWithEmail(courseID, s.getToStudent());
      // huy - Fix when student is already deleted.
      if (student == null) {
        student = new Student();
        student.setEmail(s.getToStudent());
        student.setName("[deleted]" + student.getEmail());
      }

      // Always return the student's own submission first
      if (s.getToStudent().equals(fromStudent)) {
        submissionDetailsList.add(
            0,
            new SubmissionDetailsForStudent(courseID, evaluationName, fromStudentName, student.getName(), fromStudent, student.getEmail(), s.getTeamName(), s.getPoints(), s
                .getJustification(), s.getCommentsToStudent()));
      }

      else {
        submissionDetailsList.add(new SubmissionDetailsForStudent(courseID, evaluationName, fromStudentName, student.getName(), fromStudent, student.getEmail(), s.getTeamName(),
            s.getPoints(), s.getJustification(), s.getCommentsToStudent()));
      }
    }

    resp.getWriter().write("<submissions>" + parseSubmissionDetailsForStudentListToXML(submissionDetailsList).toString() + "</submissions>");
View Full Code Here

    String courseID = req.getParameter(COURSE_ID);
    String evaluationName = req.getParameter(EVALUATION_NAME);

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

    Evaluations evaluations = Evaluations.inst();
    List<Submission> submissionList = evaluations.getSubmissionList(courseID, evaluationName);

    String toStudent = student.getEmail();

    // Filter the submission list to only from the target student's team
    String teamName = student.getTeamName();

    List<Submission> filteredSubmissionList = new ArrayList<Submission>();

    for (Submission s : submissionList) {
      if (s.getTeamName().equals(teamName)) {
        filteredSubmissionList.add(s);
      }
    }

    System.out.println("filtered number: " + filteredSubmissionList.size());
    List<SubmissionResultsForStudent> submissionResultsList = new ArrayList<SubmissionResultsForStudent>();

    String fromStudentName = "";
    String toStudentName = "";

    String fromStudentComments = null;
    String toStudentComments = null;

    float pointsBumpRatio = 0;

    for (Submission s : filteredSubmissionList) {
      student = courses.getStudentWithEmail(courseID, s.getFromStudent());

      if (student != null) {
        fromStudentName = student.getName();
        fromStudentComments = student.getComments();
      } else {
        fromStudentName = "[deleted]" + s.getFromStudent();
        fromStudentComments = ("");
      }

      student = courses.getStudentWithEmail(courseID, s.getToStudent());
      if (student != null) {
        toStudentName = student.getName();
        toStudentComments = student.getComments();
      } else {
        toStudentName = "[deleted]" + s.getToStudent();
        toStudentComments = "";
      }
View Full Code Here

  private void getStudentTeamName() throws IOException{
    String courseID = req.getParameter("courseId");
    String email = req.getParameter("email");
   
    TeamForming teamForming = TeamForming.inst();
    Student currentStudent = teamForming.getStudent(courseID, email);
   
    resp.getWriter().write(
        "<student>" + parseStudentTeamNameToXML(currentStudent).toString()
            + "</student>");
  }
View Full Code Here

    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();
    String studentName = student.getName();
    String studentProfileSummary = student.getProfileSummary();
    Text studentProfileDetail = student.getProfileDetail();
    String teamName = courses.getTeamName(courseID, studentEmail);

    ArrayList<String> teammateList = new ArrayList<String>();
    List<Student> studentList = courses.getStudentList(courseID);
View Full Code Here

TOP

Related Classes of teammates.jdo.Student

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.