Index: api/src/java/org/sakaiproject/evaluation/logic/EvalSettings.java
===================================================================
--- api/src/java/org/sakaiproject/evaluation/logic/EvalSettings.java (revision 70436)
+++ api/src/java/org/sakaiproject/evaluation/logic/EvalSettings.java (working copy)
@@ -343,6 +343,12 @@
* if this is enabled/true, users can decide to disable the email notification sent out when the eval begins
*/
public static final String ALLOW_EVALSPECIFIC_TOGGLE_EMAIL_NOTIFICATION = "ALLOW_EVALSPECIFIC_TOGGLE_EMAIL_NOTIFICATION:java.lang.Boolean";
+
+ /**
+ * if this is enabled/true, users who can see evaluation results will not be
+ * restricted by a view/due/stop date
+ */
+ public static final String VIEW_SURVEY_RESULTS_IGNORE_DATES = "VIEW_SURVEY_RESULTS_IGNORE_DATES:java.lang.Boolean";
/**
@@ -393,7 +399,8 @@
REQUIRE_COMMENTS_BLOCK,
USE_ADMIN_AS_FROM_EMAIL,
USE_EXPERT_ITEMS,
- USE_EXPERT_TEMPLATES
+ USE_EXPERT_TEMPLATES,
+ VIEW_SURVEY_RESULTS_IGNORE_DATES,
};
/**
Index: impl/src/java/org/sakaiproject/evaluation/dao/PreloadDataImpl.java
===================================================================
--- impl/src/java/org/sakaiproject/evaluation/dao/PreloadDataImpl.java (revision 70436)
+++ impl/src/java/org/sakaiproject/evaluation/dao/PreloadDataImpl.java (working copy)
@@ -148,6 +148,8 @@
saveConfig(EvalSettings.ENABLE_EVAL_REOPEN, true);
saveConfig(EvalSettings.ENABLE_MY_TOPLINKS, true);
saveConfig(EvalSettings.ENABLE_ADMINISTRATING_BOX, true);
+
+ saveConfig(EvalSettings.VIEW_SURVEY_RESULTS_IGNORE_DATES, false);
// REPORTING
saveConfig(EvalSettings.ENABLE_CSV_REPORT_EXPORT, true);
Index: impl/src/java/org/sakaiproject/evaluation/logic/ReportingPermissionsImpl.java
===================================================================
--- impl/src/java/org/sakaiproject/evaluation/logic/ReportingPermissionsImpl.java (revision 70436)
+++ impl/src/java/org/sakaiproject/evaluation/logic/ReportingPermissionsImpl.java (working copy)
@@ -242,6 +242,8 @@
typeToEvalGroupId.get(type).add(eau.getEvalGroupId());
}
+ Boolean viewSurveyResultsIgnoreDates = (Boolean) evalSettings.get(EvalSettings.VIEW_SURVEY_RESULTS_IGNORE_DATES);
+
boolean allowedInstructor = false;
if ( typeToEvalGroupId.containsKey(EvalAssignUser.TYPE_EVALUATEE) ) {
Boolean instructorAllowedViewResults = (Boolean) evalSettings.get(EvalSettings.INSTRUCTOR_ALLOWED_VIEW_RESULTS);
@@ -249,7 +251,8 @@
if (eval.getInstructorViewResults()) {
Date checkDate = eval.getInstructorsDate();
if ( (checkDate == null && EvalUtils.checkStateAfter(eval.getState(), EvalConstants.EVALUATION_STATE_VIEWABLE, true))
- || (checkDate != null && checkDate.after( new Date() )) ) {
+ || (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;
}
@@ -273,7 +276,8 @@
if (eval.getStudentViewResults()) {
Date checkDate = eval.getStudentsDate();
if ( (checkDate == null && EvalUtils.checkStateAfter(eval.getState(), EvalConstants.EVALUATION_STATE_VIEWABLE, true))
- || (checkDate != null && checkDate.after( new Date() )) ) {
+ || (checkDate != null && checkDate.after( new Date() ))
+ || (viewSurveyResultsIgnoreDates != null && viewSurveyResultsIgnoreDates)) {
// user is allowed to view based on state and settings so check the groups below
allowedStudent = true;
}
Index: impl/src/test/org/sakaiproject/evaluation/dao/EvaluationDaoImplTest.java
===================================================================
--- impl/src/test/org/sakaiproject/evaluation/dao/EvaluationDaoImplTest.java (revision 70436)
+++ impl/src/test/org/sakaiproject/evaluation/dao/EvaluationDaoImplTest.java (working copy)
@@ -302,7 +302,7 @@
null, new String[] {EvalConstants.SHARING_PRIVATE},
props, values, comparisons, order, options, 0, 0);
assertNotNull(l);
- assertEquals(6, l.size());
+ assertEquals(7, l.size());
ids = EvalTestDataLoad.makeIdList(l);
assertTrue(ids.contains( etdl.templateAdmin.getId() ));
assertTrue(ids.contains( etdl.templateAdminNoItems.getId() ));
@@ -310,6 +310,7 @@
assertTrue(ids.contains( etdl.templateUser.getId() ));
assertTrue(ids.contains( etdl.templateUserUnused.getId() ));
assertTrue(ids.contains( etdl.templateAdminBlock.getId() ));
+ assertTrue(ids.contains( etdl.evalsys_1007_templateUser01.getId() ));
// all private non-empty templates
l = evaluationDao.getSharedEntitiesForUser(EvalTemplate.class,
@@ -340,7 +341,7 @@
null, new String[] {EvalConstants.SHARING_PRIVATE, EvalConstants.SHARING_PUBLIC, EvalConstants.SHARING_SHARED, EvalConstants.SHARING_VISIBLE},
props, values, comparisons, order, options, 0, 0);
assertNotNull(l);
- assertEquals(9, l.size());
+ assertEquals(10, l.size());
// all non-empty templates (admin would use this)
l = evaluationDao.getSharedEntitiesForUser(EvalTemplate.class,
@@ -393,7 +394,7 @@
count = evaluationDao.countSharedEntitiesForUser(EvalTemplate.class,
null, new String[] {EvalConstants.SHARING_PRIVATE},
props, values, comparisons, options);
- assertEquals(6, count);
+ assertEquals(7, count);
// all private non-empty templates (admin only)
count = evaluationDao.countSharedEntitiesForUser(EvalTemplate.class,
@@ -411,7 +412,7 @@
count = evaluationDao.countSharedEntitiesForUser(EvalTemplate.class,
null, new String[] {EvalConstants.SHARING_PRIVATE, EvalConstants.SHARING_PUBLIC, EvalConstants.SHARING_SHARED, EvalConstants.SHARING_VISIBLE},
props, values, comparisons, options);
- assertEquals(9, count);
+ assertEquals(10, count);
// all non-empty templates (admin would use this)
count = evaluationDao.countSharedEntitiesForUser(EvalTemplate.class,
@@ -631,32 +632,36 @@
// test getting all evals
l = evaluationDao.getEvaluationsForOwnerAndGroups(null, null, null, 0, 0, false);
assertNotNull(l);
- assertEquals(9, l.size());
+ assertEquals(12, l.size());
// check the order
ids = EvalTestDataLoad.makeIdList(l);
assertEquals(ids.get(0), etdl.evaluationViewable.getId() );
- assertEquals(ids.get(1), etdl.evaluationClosed.getId() );
- assertEquals(ids.get(2), etdl.evaluationClosedUntaken.getId() );
- assertEquals(ids.get(3), etdl.evaluationActive.getId() );
- assertEquals(ids.get(4), etdl.evaluationProvided.getId() );
+ assertEquals(ids.get(1), etdl.evaluationClosed_viewIgnoreDates.getId() );
+ assertEquals(ids.get(2), etdl.evaluationClosed.getId() );
+ assertEquals(ids.get(3), etdl.evaluationClosedUntaken.getId() );
+ assertEquals(ids.get(4), etdl.evaluationDue_viewIgnoreDates.getId() );
+ assertEquals(ids.get(5), etdl.evaluationActive.getId() );
+ assertEquals(ids.get(6), etdl.evaluationProvided.getId() );
// test getting all evals with limit
- l = evaluationDao.getEvaluationsForOwnerAndGroups(null, null, null, 0, 3, false);
+ l = evaluationDao.getEvaluationsForOwnerAndGroups(null, null, null, 0, 4, false);
assertNotNull(l);
- assertEquals(3, l.size());
+ assertEquals(4, l.size());
ids = EvalTestDataLoad.makeIdList(l);
// check order and return values
assertEquals(ids.get(0), etdl.evaluationViewable.getId() );
- assertEquals(ids.get(1), etdl.evaluationClosed.getId() );
- assertEquals(ids.get(2), etdl.evaluationClosedUntaken.getId() );
+ assertEquals(ids.get(1), etdl.evaluationClosed_viewIgnoreDates.getId() );
+ assertEquals(ids.get(2), etdl.evaluationClosed.getId() );
+ assertEquals(ids.get(3), etdl.evaluationClosedUntaken.getId() );
- l = evaluationDao.getEvaluationsForOwnerAndGroups(null, null, null, 2, 2, false);
+ l = evaluationDao.getEvaluationsForOwnerAndGroups(null, null, null, 3, 3, false);
assertNotNull(l);
- assertEquals(2, l.size());
+ assertEquals(3, l.size());
ids = EvalTestDataLoad.makeIdList(l);
// check order and return values
assertEquals(ids.get(0), etdl.evaluationClosedUntaken.getId() );
- assertEquals(ids.get(1), etdl.evaluationActive.getId() );
+ assertEquals(ids.get(1), etdl.evaluationDue_viewIgnoreDates.getId() );
+ assertEquals(ids.get(2), etdl.evaluationActive.getId() );
// test filtering by owner
l = evaluationDao.getEvaluationsForOwnerAndGroups(EvalTestDataLoad.ADMIN_USER_ID, null, null, 0, 0, false);
Index: impl/src/test/org/sakaiproject/evaluation/logic/EvalAuthoringServiceImplTest.java
===================================================================
--- impl/src/test/org/sakaiproject/evaluation/logic/EvalAuthoringServiceImplTest.java (revision 70436)
+++ impl/src/test/org/sakaiproject/evaluation/logic/EvalAuthoringServiceImplTest.java (working copy)
@@ -78,9 +78,9 @@
// check the full count of preloaded items
assertEquals(18, evaluationDao.countAll(EvalItemGroup.class) );
- assertEquals(10, evaluationDao.countAll(EvalTemplate.class) );
+ assertEquals(11, evaluationDao.countAll(EvalTemplate.class) );
List
-
Uses {@link #item1} and {@link #item5}
+ */
+ public EvalTemplate evalsys_1007_templateUser01;
+ /**
* Template not being used, private, USER_ID owns, unlocked, expert
*
Uses {@link #item6}
*/
@@ -336,7 +344,21 @@
*/
public EvalEvaluation evaluationDeleted;
-
+ /**
+ * Evaluation which is active for testing view_ignore_date
+ */
+ public EvalEvaluation evaluationActive_viewIgnoreDates;
+
+ /**
+ * Evaluation which is due for testing view_ignore_date
+ */
+ public EvalEvaluation evaluationDue_viewIgnoreDates;
+
+ /**
+ * Evaluation which is closed for testing evaluationClosed_viewIgnoreDates
+ */
+ public EvalEvaluation evaluationClosed_viewIgnoreDates;
+
// EMAIL TEMPLATES
/**
@@ -394,6 +416,20 @@
* Group Assignment: MAINT_USER_ID, SITE1_REF, {@link #evaluationClosedUntaken}
*/
public EvalAssignGroup assign10;
+
+ /**
+ * Group Assignment: MAIN_USER2, EVALSYS_1007_SITE_REF_01. {@link #evaluationActive_viewIgnoreDates}
+ */
+ public EvalAssignGroup evalsys_1007_assign03;
+ /**
+ * Group Assignment: MAIN_USER2, EVALSYS_1007_SITE_REF_01. {@link #evaluationDue_viewIgnoreDates}
+ */
+ public EvalAssignGroup evalsys_1007_assign02;
+ /**
+ * Group Assignment: MAIN_USER2, EVALSYS_1007_SITE_REF_01. {@link #evaluationClosed_viewIgnoreDates}
+ */
+ public EvalAssignGroup evalsys_1007_assign01;
+
/**
* Group Assignment: ADMIN_USER_ID, SITE2_REF, {@link #evaluationNewAdmin} + eid
*/
@@ -722,6 +758,10 @@
"Template admin added", "description",
EvalConstants.SHARING_PRIVATE, NOT_EXPERT, "expert desc",
null, UNLOCKED, false);
+ evalsys_1007_templateUser01 = new EvalTemplate(EVALSYS_1007_USER_ID_01, EvalConstants.TEMPLATE_TYPE_STANDARD,
+ "Template user", "description",
+ EvalConstants.SHARING_PRIVATE, NOT_EXPERT, "expert desc",
+ null, LOCKED, false);
templateEid = new EvalTemplate(ADMIN_USER_ID, EvalConstants.TEMPLATE_TYPE_STANDARD,
"Template Eid", "description",
@@ -741,6 +781,7 @@
dao.save(templateUserUnused);
dao.save(templateAdminBlock);
dao.save(templateAdminComplex);
+ dao.save(evalsys_1007_templateUser01);
dao.save(templateEid);
@@ -1074,6 +1115,25 @@
templateUser, null, Boolean.TRUE, Boolean.FALSE, Boolean.FALSE,
UNLOCKED, EvalConstants.EVALUATION_AUTHCONTROL_NONE, null, null);
+ evaluationActive_viewIgnoreDates = new EvalEvaluation(EvalConstants.EVALUATION_TYPE_EVALUATION, EVALSYS_1007_MAINT_USER_ID_01, "evaluationActive_viewIgnoreDates", null,
+ yesterday, tomorrow, tomorrow, tomorrow, true, tomorrow, true, tomorrow,
+ EvalConstants.EVALUATION_STATE_ACTIVE, EvalConstants.SHARING_PUBLIC, EvalConstants.INSTRUCTOR_REQUIRED, new Integer(0), null, null, null, null,
+ evalsys_1007_templateUser01, null, Boolean.TRUE, Boolean.FALSE, Boolean.FALSE,
+ UNLOCKED, EvalConstants.EVALUATION_AUTHCONTROL_AUTH_REQ, null, null);
+
+ evaluationDue_viewIgnoreDates = new EvalEvaluation(EvalConstants.EVALUATION_TYPE_EVALUATION, EVALSYS_1007_MAINT_USER_ID_01, "evaluationDue_viewIgnoreDates", null,
+ threeDaysAgo, yesterday, tomorrow, tomorrow, true, tomorrow, true, tomorrow,
+ EvalConstants.EVALUATION_STATE_GRACEPERIOD, EvalConstants.SHARING_PUBLIC, EvalConstants.INSTRUCTOR_REQUIRED, new Integer(0), null, null, null, null,
+ evalsys_1007_templateUser01, null, Boolean.TRUE, Boolean.FALSE, Boolean.FALSE,
+ UNLOCKED, EvalConstants.EVALUATION_AUTHCONTROL_AUTH_REQ, null, null);
+
+ evaluationClosed_viewIgnoreDates = new EvalEvaluation(EvalConstants.EVALUATION_TYPE_EVALUATION, EVALSYS_1007_MAINT_USER_ID_01, "evaluationClosed_viewIgnoreDates", null,
+ fourDaysAgo, threeDaysAgo, yesterday, tomorrow, true, tomorrow, true, tomorrow,
+ EvalConstants.EVALUATION_STATE_CLOSED, EvalConstants.SHARING_PUBLIC, EvalConstants.INSTRUCTOR_REQUIRED, new Integer(0), null, null, null, null,
+ evalsys_1007_templateUser01, null, Boolean.TRUE, Boolean.FALSE, Boolean.FALSE,
+ UNLOCKED, EvalConstants.EVALUATION_AUTHCONTROL_AUTH_REQ, null, null);
+
+
// email templates
emailTemplate1 = new EvalEmailTemplate(ADMIN_USER_ID, EvalConstants.EMAIL_TEMPLATE_AVAILABLE, "Email Subject 1", "Email Template 1");
evaluationNew.setAvailableEmailTemplate(emailTemplate1);
@@ -1102,7 +1162,9 @@
dao.save(evaluationViewable);
dao.save(evaluationProvided);
dao.save(evaluationDeleted);
-
+ dao.save(evaluationActive_viewIgnoreDates);
+ dao.save(evaluationDue_viewIgnoreDates);
+ dao.save(evaluationClosed_viewIgnoreDates);
// evalGroupId assignments
assign1 = new EvalAssignGroup( MAINT_USER_ID, SITE1_REF, EvalConstants.GROUP_TYPE_SITE,
@@ -1124,7 +1186,13 @@
assign9 = new EvalAssignGroup( MAINT_USER_ID, SITE1_REF, EvalConstants.GROUP_TYPE_SITE,
evaluationDeleted, Boolean.TRUE, Boolean.TRUE, Boolean.FALSE);
assign10 = new EvalAssignGroup( MAINT_USER_ID, SITE1_REF, EvalConstants.GROUP_TYPE_SITE,
- evaluationClosedUntaken, Boolean.TRUE, Boolean.TRUE, Boolean.FALSE);
+ evaluationClosedUntaken, Boolean.TRUE, Boolean.TRUE, Boolean.FALSE);
+ evalsys_1007_assign03 = new EvalAssignGroup( EVALSYS_1007_MAINT_USER_ID_01, EVALSYS_1007_SITE_REF_01, EvalConstants.GROUP_TYPE_SITE,
+ evaluationActive_viewIgnoreDates, Boolean.TRUE, Boolean.TRUE, Boolean.TRUE);
+ evalsys_1007_assign02 = new EvalAssignGroup( EVALSYS_1007_MAINT_USER_ID_01, EVALSYS_1007_SITE_REF_01, EvalConstants.GROUP_TYPE_SITE,
+ evaluationDue_viewIgnoreDates, Boolean.TRUE, Boolean.TRUE, Boolean.TRUE);
+ evalsys_1007_assign01 = new EvalAssignGroup( EVALSYS_1007_MAINT_USER_ID_01, EVALSYS_1007_SITE_REF_01, EvalConstants.GROUP_TYPE_SITE,
+ evaluationClosed_viewIgnoreDates, Boolean.TRUE, Boolean.TRUE, Boolean.TRUE);
// Dick, you cannot assign 2 groups to an eval with the same evalGroupId... I have fixed this by making up a fake id -AZ
assignGroupProvided = new EvalAssignGroup( ADMIN_USER_ID, "AZ-new-ref", EvalConstants.GROUP_TYPE_SITE,
evaluationNewAdmin, Boolean.TRUE, Boolean.TRUE, Boolean.FALSE);
@@ -1143,6 +1211,9 @@
dao.save(assign8);
dao.save(assign9);
dao.save(assign10);
+ dao.save(evalsys_1007_assign03);
+ dao.save(evalsys_1007_assign02);
+ dao.save(evalsys_1007_assign01);
dao.save(assignGroupProvided);
dao.save(assignHier1);
@@ -1159,8 +1230,11 @@
counter += makeUserAssigns(dao, assign8);
counter += makeUserAssigns(dao, assign9);
counter += makeUserAssigns(dao, assign10);
- if (counter != 23) {
- throw new IllegalStateException("Invalid user assignments creation, 23 != " + counter);
+ counter += makeUserAssigns(dao, evalsys_1007_assign03);
+ counter += makeUserAssigns(dao, evalsys_1007_assign02);
+ counter += makeUserAssigns(dao, evalsys_1007_assign01);
+ if (counter != 29) {
+ throw new IllegalStateException("Invalid user assignments creation, 29 != " + counter);
}
// now init response data for the evaluationSetupService
Index: tool/src/java/org/sakaiproject/evaluation/tool/bundle/messages.properties
===================================================================
--- tool/src/java/org/sakaiproject/evaluation/tool/bundle/messages.properties (revision 70436)
+++ tool/src/java/org/sakaiproject/evaluation/tool/bundle/messages.properties (working copy)
@@ -152,6 +152,7 @@
administrate.general.enable.importing.note=Enable importing options and controls (UM)
administrate.general.disable.item.bank=Disable the Item Bank
administrate.general.disable.question.blocks=Disable Question Blocks
+administrate.general.view.results.ignore.dates.note=View results whilst survey is still open
administrate.save.settings.button=Save Settings
administrate.top.import.data=Import Data
administrate.top.control.hierarchy=Control Hierarchy
@@ -241,6 +242,7 @@
controlevaluations.active.description=Your Evaluations which are active and can be taken
controlevaluations.active.none=No active evaluations
controlevaluations.active.close.now=Close Now
+controlevaluations.active.report.title=View Report
controlevaluations.closed.header=Closed Evaluations
controlevaluations.closed.description=Your Evaluations which have been completed
controlevaluations.closed.none=No closed evaluations
@@ -251,6 +253,7 @@
controlevaluations.eval.duedate.header=Due Date
controlevaluations.eval.settings.header=Settings
controlevaluations.eval.responses.header=Responses
+controlevaluations.eval.report.header=Report
controlevaluations.eval.responserate.header=Response Rate
controlevaluations.eval.responses.inline={0}
controlevaluations.eval.report.header=Report
Index: tool/src/java/org/sakaiproject/evaluation/tool/producers/AdministrateProducer.java
===================================================================
--- tool/src/java/org/sakaiproject/evaluation/tool/producers/AdministrateProducer.java (revision 70436)
+++ tool/src/java/org/sakaiproject/evaluation/tool/producers/AdministrateProducer.java (working copy)
@@ -342,6 +342,8 @@
makeBoolean(form, "general-expert-templates", EvalSettings.USE_EXPERT_TEMPLATES);
makeBoolean(form, "general-expert-questions", EvalSettings.USE_EXPERT_ITEMS);
+ makeBoolean(form, "general-view-results-ignore-dates", EvalSettings.VIEW_SURVEY_RESULTS_IGNORE_DATES);
+
makeBoolean(form, "general-enable-adhoc-groups", EvalSettings.ENABLE_ADHOC_GROUPS);
makeBoolean(form, "general-enable-adhoc-users", EvalSettings.ENABLE_ADHOC_USERS);
Index: tool/src/java/org/sakaiproject/evaluation/tool/producers/ControlEvaluationsProducer.java
===================================================================
--- tool/src/java/org/sakaiproject/evaluation/tool/producers/ControlEvaluationsProducer.java (revision 70436)
+++ tool/src/java/org/sakaiproject/evaluation/tool/producers/ControlEvaluationsProducer.java (working copy)
@@ -45,7 +45,6 @@
import uk.org.ponder.rsf.components.UIMessage;
import uk.org.ponder.rsf.components.UIOutput;
import uk.org.ponder.rsf.components.decorators.DecoratorList;
-import uk.org.ponder.rsf.components.decorators.UIDecorator;
import uk.org.ponder.rsf.components.decorators.UIStyleDecorator;
import uk.org.ponder.rsf.components.decorators.UITooltipDecorator;
import uk.org.ponder.rsf.view.ComponentChecker;
@@ -308,8 +307,15 @@
// create active evaluations header and link
+ Boolean viewResultsIgnoreDate = (Boolean) settings.get(EvalSettings.VIEW_SURVEY_RESULTS_IGNORE_DATES);
+
if (activeEvals.size() > 0) {
UIBranchContainer evalListing = UIBranchContainer.make(tofill, "active-eval-listing:");
+
+ if(viewResultsIgnoreDate) {
+ UIOutput.make(evalListing, "controlevaluations-eval-report-header",
+ UIMessage.make("controlevaluations.eval.report.header").getValue());
+ }
for (int i = 0; i < activeEvals.size(); i++) {
EvalEvaluation evaluation = (EvalEvaluation) activeEvals.get(i);
@@ -355,6 +361,23 @@
} else {
UIMessage.make(evaluationRow, "active-eval-response-rate", "controlevaluations.eval.responses.inline",
new Object[] { responseString } );
+ }
+
+ if(viewResultsIgnoreDate) {
+
+ UIOutput.make(evaluationRow, "active-eval-view-report-node");
+
+ if (responsesNeeded == 0) {
+
+ UIInternalLink.make(evaluationRow, "activeEvalViewReportLink", UIMessage.make("controlevaluations.active.report.title"), new ReportParameters(
+ ReportChooseGroupsProducer.VIEW_ID, evaluation.getId()));
+ } else {
+
+ UIMessage.make(evaluationRow, "active-eval-view-report-item",
+ UIMessage.make(
+ "controlevaluations.eval.report.awaiting.responses",
+ new Object[] { responsesNeeded }).getValue());
+ }
}
UIOutput.make(evaluationRow, "active-eval-startdate", df.format(evaluation.getStartDate()));
Index: tool/src/java/org/sakaiproject/evaluation/tool/producers/SummaryProducer.java
===================================================================
--- tool/src/java/org/sakaiproject/evaluation/tool/producers/SummaryProducer.java (revision 70436)
+++ tool/src/java/org/sakaiproject/evaluation/tool/producers/SummaryProducer.java (working copy)
@@ -361,7 +361,8 @@
} else {
// From the not-owned evals show those that are available
// for viewing results
- if (EvalUtils.checkStateAfter(evaluation.getState(), EvalConstants.EVALUATION_STATE_VIEWABLE, true)) {
+ String forcedViewableState = calculateViewability(evaluation.getState());
+ if (EvalUtils.checkStateAfter(forcedViewableState, EvalConstants.EVALUATION_STATE_VIEWABLE, true)) {
newEvals.add(evaluation);
}
}
@@ -390,6 +391,7 @@
UIBranchContainer evalrow = UIBranchContainer.make(evalAdminForm, "evalAdminList:", eval.getId().toString());
String evalState = evaluationService.returnAndFixEvalState(eval, true);
+ evalState = calculateViewability(evalState);
makeDateComponent(evalrow, eval, evalState, "evalAdminDateLabel", "evalAdminDate", "evalAdminStatus");
@@ -480,6 +482,21 @@
}
+ private String calculateViewability(String state) {
+ Boolean viewResultsIgnoreDate = (Boolean) settings.get(EvalSettings.VIEW_SURVEY_RESULTS_IGNORE_DATES);
+
+ if(viewResultsIgnoreDate != null && viewResultsIgnoreDate) {
+ if(EvalConstants.EVALUATION_STATE_ACTIVE.equals(state) ||
+ EvalConstants.EVALUATION_STATE_GRACEPERIOD.equals(state) ||
+ EvalConstants.EVALUATION_STATE_CLOSED.equals(state)) {
+
+ return EvalConstants.EVALUATION_STATE_VIEWABLE;
+ }
+ }
+
+ return state;
+ }
+
/**
* @param evalrow
* @param eval
Index: tool/src/webapp/content/templates/administrate.html
===================================================================
--- tool/src/webapp/content/templates/administrate.html (revision 70436)
+++ tool/src/webapp/content/templates/administrate.html (working copy)
@@ -163,7 +163,11 @@
+ + +
Index: tool/src/webapp/content/templates/control_evaluations.html =================================================================== --- tool/src/webapp/content/templates/control_evaluations.html (revision 70436) +++ tool/src/webapp/content/templates/control_evaluations.html (working copy) @@ -83,7 +83,7 @@
+ | Evaluation Title | @@ -97,7 +97,7 @@ | Start Date | -+ | Due Date |
---|
+ | Evaluation Title | Responses | ++ Report + | Settings | @@ -158,7 +161,7 @@Start Date | -+ | Due Date | + View Report + + |
Edit
| Delete
@@ -209,7 +216,7 @@
|
---|