[Building Sakai] Evaluation system instructors date, backwards?

Joshua Swink joshua.swink at gmail.com
Mon Mar 19 16:29:57 PDT 2012


I think this may be a flaw in the evaluation system but I wanted to check
with the list before possibly filing a bug.

In an evaluation's settings under "Evaluation results" is a date value
which is entered next to "Instructors in the courses this evaluation is
assigned to can view results". This is the date after which instructors are
permitted to see the results of evaluations done on them. It is stored in
the EvalEvaluation object as instructorsDate. The comment in
EvalEvaluation.java says:

    /**
     * if {@link #instructorViewResults} is true and this is null then
non-owner instructors can
     * view results as soon as the evaluation is closed, otherwise they can
view results after this
     * date
     */
    private Date instructorsDate;

Now the code that makes use of it is found in
ReportingPermissionsImpl.java, as follows:

                    Date checkDate = eval.getInstructorsDate();
                    if ( (checkDate == null &&
EvalUtils.checkStateAfter(eval.getState(),
EvalConstants.EVALUATION_STATE_VIEWABLE, true))
                            || (checkDate != null && checkDate.after(
new Date() ))
                            || (viewSurveyResultsIgnoreDates != null
&& viewSurveyResultsIgnoreDates)) {
                        // user is allowed to view based on state and
settings so check the groups below
                        allowedInstructor = true;
                    }


Should it be (new Date()).after(checkDate) instead of checkDate.after(new
Date())? It seems to be backward now.

This code snippet was taken from the sakai project svn:

https://source.sakaiproject.org/contrib/evaluation/trunk/impl/src/java/org/sakaiproject/evaluation/logic/ReportingPermissionsImpl.java

Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120319/805978ce/attachment.html 


More information about the sakai-dev mailing list