Package teammates.jdo

Examples of teammates.jdo.Evaluation


    Transaction trans = getPM().currentTransaction();
    try {
      trans.begin();

      Evaluation evaluation = getEvaluation(courseID, name);

      if (evaluation == null)
        return false;

      long oneday = 24 * 60 * 60 * 1000;
      Date start = new Date(System.currentTimeMillis() - oneday);
      Date end = new Date(System.currentTimeMillis() + oneday);
      evaluation.setStart(start);
      evaluation.setDeadline(end);
      evaluation.setActivated(true);

      getPM().flush();
      trans.commit();

    } finally {
View Full Code Here


    Transaction trans = getPM().currentTransaction();
    try {

      trans.begin();

      Evaluation evaluation = getEvaluation(courseID, name);

      int oneday = 24 * 60 * 60 * 1000;
      Date start = new Date(System.currentTimeMillis() + oneday);
      Date end = new Date(System.currentTimeMillis() + oneday * 2);
      evaluation.setActivated(false);
      evaluation.setStart(start);
      evaluation.setDeadline(end);

      getPM().flush();
      trans.commit();

    } finally {
View Full Code Here

    Queue queue = QueueFactory.getQueue("email-queue");
    List<TaskOptions> taskOptionsList = new ArrayList<TaskOptions>();

    DateFormat df = new SimpleDateFormat("dd/MM/yyyy HHmm");

    Evaluation evaluation = getEvaluation(courseID, evaluationName);

    Date start = evaluation.getStart();
    Date deadline = evaluation.getDeadline();
    String instructions = evaluation.getInstructions();

    for (Student s : studentList) {
      // There is a limit of 100 tasks per batch addition to Queue in
      // Google App
      // Engine
View Full Code Here

   *            the evaluation name (Pre-condition: The courseID and name pair
   *            must be valid)
   */
  public boolean publishEvaluation(String courseID, String name,
      List<Student> studentList) {
    Evaluation evaluation = getEvaluation(courseID, name);

    evaluation.setPublished(true);

    informStudentsOfPublishingOfEvaluationResults(studentList, courseID,
        name);

    return true;
View Full Code Here

   * @param name
   *            the evaluation name (Pre-condition: The courseID and name pair
   *            must be valid)
   */
  public boolean unpublishEvaluation(String courseID, String name) {
    Evaluation evaluation = getEvaluation(courseID, name);

    evaluation.setPublished(false);

    return true;
  }
View Full Code Here

  protected void evaluationAdd() throws IOException {
    String json = req.getParameter("evaluation");

    Gson gson = new Gson();
    Evaluation e = gson.fromJson(json, Evaluation.class);

    boolean edited = Evaluations.inst().addEvaluation(e);

    // TODO take a snapshot of submissions
View Full Code Here

    pm = Datastore.getPersistenceManager();
    //create course
    Course a = new Course(COURSE_ID, "Testing Course", "teammates.coord");
    pm.makePersistent(a);
    //create evaluation
    Evaluation eval = new Evaluation(COURSE_ID, "Testing Course", "instructions", true, new Date(), new Date(), 8, 5);
    pm.makePersistent(eval);
   
    //enroll students
    List<Student> studentList = new ArrayList<Student>();
    studentList.add(new Student("alice.tmms@gmail.com", "Alice", "This is Alice", COURSE_ID, "Team 1"));
View Full Code Here

TOP

Related Classes of teammates.jdo.Evaluation

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.