public boolean after(Time timeStamp) { if (modified.after(timeStamp)) { return true; } return false; } }
/** * is this time in my range? * * @param time: * the time to check for inclusion * @return true if the time is in the range, false if not */ public boolean contains(Time time) { // assume in range, unless proven otherwise boolean inRange = true; // if out of the range... if (time.before(m_startTime) || time.after(m_endTime)) { inRange = false; } // if at begin and begin not in range else if ((!m_startIncluded) && time.equals(m_startTime)) { inRange = false; } // if at the end and end not in range else if ((!m_endIncluded) && time.equals(m_endTime)) { inRange = false; } return inRange; } // contains
/** * peer assessment is set for this assignment but the current time is passed * the peer assessment period * @return */ public boolean isPeerAssessmentClosed(){ if(getAllowPeerAssessment()){ Time now = TimeService.newTime(); return now.after(getPeerAssessmentPeriod()); }else{ return false; } }
/** * peer assessment is set for this assignment and the current time * falls between the assignment close time and the peer asseessment period time * @return */ public boolean isPeerAssessmentOpen(){ if(getAllowPeerAssessment()){ Time now = TimeService.newTime(); return now.before(getPeerAssessmentPeriod()) && now.after(getCloseTime()); }else{ return false; } }
if (!((Message) o).getHeader().getDate().after(m_afterDate))
if (!((Message) o).getHeader().getDate().after(m_afterDate))
if (!((Message) o).getHeader().getDate().after(m_afterDate))
/** * @inheritDoc */ public String getStatus() { Time currentTime = TimeService.newTime(); if (this.getDraft()) return rb.getString("gen.dra1"); else if (this.getOpenTime().after(currentTime)) return rb.getString("gen.notope"); else if (this.getDueTime().after(currentTime)) return rb.getString("gen.open"); else if ((this.getCloseTime() != null) && (this.getCloseTime().before(currentTime))) return rb.getString("gen.closed"); else return rb.getString("gen.due"); }
/** * Just check to see if a submission is late. * @param s The assignment submission * @return The resource bundle string. */ private String whenSubmissionMade(AssignmentSubmission s) { Time dueTime = s.getAssignment().getDueTime(); Time submittedTime = s.getTimeSubmitted(); String latenessStatus; if (submittedTime == null) { latenessStatus = rb.getString("grades.lateness.unknown"); } else if(dueTime != null && submittedTime.after(dueTime)) { latenessStatus = rb.getString("grades.lateness.late"); } else { latenessStatus = rb.getString("grades.lateness.ontime"); } return latenessStatus; }
/** * @inheritDoc */ public void notify(Notification notification, Event event) { // get the message Reference ref = entityManager.newReference(event.getResource()); AnnouncementMessageEdit msg = (AnnouncementMessageEdit) ref.getEntity(); AnnouncementMessageHeader hdr = (AnnouncementMessageHeader) msg.getAnnouncementHeader(); // do not do notification for hidden (draft) messages if (hdr.getDraft()) return; // Put here since if release date after now, do not notify // since scheduled notification has been set. Time now = timeService.newTime(); if (now.after(hdr.getDate())) { super.notify(notification, event); } }
if (now.after(retractDate))
available = currentEntity.getRetractDate().after(now);