Examples of Student


Examples of teammates.jdo.Student

    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();

    // wangsha
    // should be historical teamname, not the latest one
    String teamName = student.getTeamName();

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

Examples of teammates.jdo.Student

    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

Examples of teammates.jdo.Student

   *
   * @param googleID
   *            the Google ID of the student (Precondition: Must not be null)
   */
  public void archiveStudentCourse(String courseID, String googleID) {
    Student student = getStudentWithID(courseID, googleID);
    student.setCourseArchived(true);
  }
View Full Code Here

Examples of teammates.jdo.Student

   *
   * @param email
   *            the email of the student (Precondition: Must not be null)
   */
  public void deleteStudent(String courseID, String email) {
    Student s = getStudentWithEmail(courseID, email);

    try {
      getPM().deletePersistent(s);
    } finally {
    }
View Full Code Here

Examples of teammates.jdo.Student

   *
   * @param googleID
   *            the Google ID of the student (Precondition: Must not be null)
   */
  public void deleteStudentCourse(String courseID, String googleID) {
    Student student = getStudentWithID(courseID, googleID);
    student.setID("");

  }
View Full Code Here

Examples of teammates.jdo.Student

   *            the new comments of the student (Precondition: Must not be
   *            null)
   */
  public void editStudent(String courseID, String email, String newName,
      String newEmail, String newGoogleID, String newComments) {
    Student student = getStudentWithEmail(courseID, email);

    student.setComments((newComments));
    student.setEmail(newEmail);
    student.setID(newGoogleID);
    student.setName(newName);
  }
View Full Code Here

Examples of teammates.jdo.Student

   *            null)
   */
  public void editStudent(String courseID, String email, String newName,
      String newTeamName, String newEmail, String newGoogleID,
      String newComments) {
    Student student = getStudentWithEmail(courseID, email);

    student.setComments((newComments));
    student.setEmail(newEmail);
    student.setID(newGoogleID);
    student.setName(newName);
    student.setTeamName(newTeamName);
  }
View Full Code Here

Examples of teammates.jdo.Student

    List<Student> studentListToEdit = new ArrayList<Student>();
    List<Student> studentListToCompareWith = new ArrayList<Student>();
    List<EnrollmentReport> enrollmentReportList = new ArrayList<EnrollmentReport>();

    for (Student s1 : studentList) {
      Student s2 = getStudentWithEmail(courseID, s1.getEmail());

      if (s2 != null) {
        studentListToCompareWith.add(s1);
        studentListToEdit.add(s2);
        enrollmentReportList.add(new EnrollmentReport(s2.getName(), s2
            .getEmail(), EnrollmentStatus.REMAINED, false, false,
            false));
      }
    }

    // Edit the acquired Student objects and update the corresponding
    // EnrollmentReport objects
    for (int x = 0; x < studentListToEdit.size(); x++) {
      EnrollmentReport er = enrollmentReportList.get(x);
      Student s = studentListToCompareWith.get(x);
      Student se = studentListToEdit.get(x);

      if (!s.getName().equals(se.getName())) {
        se.setName(s.getName());
        er.setNameEdited(true);
        er.setStatus(EnrollmentStatus.EDITED);
      }

      if (!s.getTeamName().equals(se.getTeamName())) {
        se.setTeamName(s.getTeamName());
        er.setTeamNameEdited(true);
        er.setStatus(EnrollmentStatus.EDITED);
      }

      if (!s.getComments().equals(se.getComments())) {
        se.setComments(studentList.get(x).getComments());
        er.setCommentsEdited(true);
        er.setStatus(EnrollmentStatus.EDITED);
      }
    }
View Full Code Here

Examples of teammates.testing.object.Student

  }

  public String getStudentsString(List<Student> list) {
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < list.size(); i++) {
      Student s = list.get(i);
      sb.append(String.format("%s|%s|%s|", s.teamName, s.name, s.email));
      if (i != list.size() - 1) {
        sb.append("\n");
      }
    }
View Full Code Here

Examples of teammates.testing.object.Student

    }
  }

  public void testStudentViewResultPoints() throws Exception {
    for (int i = 0; i < scn.students.size(); i++) {
      Student s = scn.students.get(i);
      bi.studentLogin(s.email, s.password);

      studentViewResultPoints(scn.course.courseId, scn.evaluation.name, i);
      studentViewResultPoints(scn.course.courseId, scn.evaluation2.name, i);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.