added other mandatory settings

This commit is contained in:
fred-fri 2013-05-28 14:14:14 +09:00
parent 9b027e787f
commit b61e76fbac
6 changed files with 81 additions and 7 deletions
resources/db_update_scripts
src

@ -3,4 +3,10 @@ ALTER TABLE `general_system_settings` DROP `punishMailDate`;
ALTER TABLE `general_system_settings` DROP `daysAheadToUploadThesisReviewForExaminer`;
ALTER TABLE `general_system_settings` ADD `examinerPunishMailDate` datetime DEFAULT NULL;
ALTER TABLE `general_system_settings` ADD `examinerThesisReviewsMandatory` tinyint(1) NOT NULL;
ALTER TABLE `general_system_settings` ADD `examinerThesisReviewsMandatory` tinyint(1) NOT NULL;
ALTER TABLE `general_system_settings` ADD `supervisorPunishMailDate` datetime DEFAULT NULL;
ALTER TABLE `general_system_settings` ADD `supervisorThesisReviewsMandatory` tinyint(1) NOT NULL;
ALTER TABLE `general_system_settings` ADD `reviewerPunishMailDate` datetime DEFAULT NULL;
ALTER TABLE `general_system_settings` ADD `reviewerThesisReviewsMandatory` tinyint(1) NOT NULL;

@ -28,6 +28,14 @@
<label class="checkbox"><input type="checkbox" wicket:id="examinerThesisReviewsMandatory"/><span wicket:id="examinerThesisReviewsMandatoryLabel"></span></label>
</div>
<br />
<div class="row-fluid">
<label class="checkbox"><input type="checkbox" wicket:id="supervisorThesisReviewsMandatory"/><span wicket:id="supervisorThesisReviewsMandatoryLabel"></span></label>
</div>
<br />
<div class="row-fluid">
<label class="checkbox"><input type="checkbox" wicket:id="reviewerThesisReviewsMandatory"/><span wicket:id="reviewerThesisReviewsMandatoryLabel"></span></label>
</div>
<br />
<div class="row-fluid">
<label><span>Send punish mails to (when thesis comments are mandatory)</span> <input type="text" wicket:id="punishMails" /></label>
</div>

@ -64,8 +64,14 @@ public class AdminFinalSeminarSettingsPage extends AbstractAdminSettingsPage {
add(new CheckBox(SEMINAR_PDF));
add(new CheckBox(THESIS_REVIEWS));
add(new Label(THESIS_REVIEW_MANDATORY_LABEL, new StringResourceModel(THESIS_REVIEW_MANDATORY_LABEL, this, null)));
add(new CheckBox(THESIS_REVIEW_MANDATORY));
add(new Label(EXAMINER_THESIS_REVIEW_MANDATORY_LABEL, new StringResourceModel(EXAMINER_THESIS_REVIEW_MANDATORY_LABEL, this, null)));
add(new CheckBox(EXAMINER_THESIS_REVIEW_MANDATORY));
add(new Label(SUPERVISOR_THESIS_REVIEW_MANDATORY_LABEL, new StringResourceModel(SUPERVISOR_THESIS_REVIEW_MANDATORY_LABEL, this, null)));
add(new CheckBox(SUPERVISOR_THESIS_REVIEW_MANDATORY));
add(new Label(REVIEWER_THESIS_REVIEW_MANDATORY_LABEL, new StringResourceModel(REVIEWER_THESIS_REVIEW_MANDATORY_LABEL, this, null)));
add(new CheckBox(REVIEWER_THESIS_REVIEW_MANDATORY));
add(new DateField(TURNITIN_EXPIRATION_DATE));
add(new ListField<String>(TURNITIN_EXPIRATION_MAILS));
@ -119,8 +125,16 @@ public class AdminFinalSeminarSettingsPage extends AbstractAdminSettingsPage {
static final String SEMINAR_MIN_PARTICIPANTS = "minFinalSeminarActiveParticipation";
static final String SEMINAR_PDF = "finalSeminarThesisMustBeAPDF";
static final String THESIS_REVIEWS = "thesisReviewsEnabled";
static final String THESIS_REVIEW_MANDATORY = "examinerThesisReviewsMandatory";
static final String THESIS_REVIEW_MANDATORY_LABEL = "examinerThesisReviewsMandatoryLabel";
static final String EXAMINER_THESIS_REVIEW_MANDATORY = "examinerThesisReviewsMandatory";
static final String EXAMINER_THESIS_REVIEW_MANDATORY_LABEL = "examinerThesisReviewsMandatoryLabel";
static final String SUPERVISOR_THESIS_REVIEW_MANDATORY = "supervisorThesisReviewsMandatory";
static final String SUPERVISOR_THESIS_REVIEW_MANDATORY_LABEL = "supervisorThesisReviewsMandatoryLabel";
static final String REVIEWER_THESIS_REVIEW_MANDATORY = "reviewerThesisReviewsMandatory";
static final String REVIEWER_THESIS_REVIEW_MANDATORY_LABEL = "reviewerThesisReviewsMandatoryLabel";
static final String SEMINAR_THESIS_REVIEW_UPLOAD = "daysAheadToUploadThesisReview";
static final String SEMINAR_THESIS_REVIEW_UPLOAD_LABEL = "daysAheadToUploadThesisReviewLabel";
// static final String SEMINAR_THESIS_REVIEW_UPLOAD_EXAMINER = "daysAheadToUploadThesisReviewForExaminer";

@ -4,6 +4,8 @@
finalSeminarThesisDaysAheadLabel=Min work days before a final seminar student should upload final seminar thesis
finalSeminarThesisDaysAhead.MaximumValidator=Min work days before a final seminar student should upload final seminar thesis can't be same or higher than Min work days ahead final seminars must be created
examinerThesisReviewsMandatoryLabel=Thesis comments are mandatory (when enabled) for examiners
examinerThesisReviewsMandatoryLabel=Thesis comments (when enabled) are mandatory for examiners
supervisorThesisReviewsMandatoryLabel=Thesis comments (when enabled) are mandatory for supervisor
reviewerThesisReviewsMandatoryLabel=Thesis comments (when enabled) are mandatory for reviewer
daysAheadToUploadThesisReviewLabel=No of work days ahead thesis comments should be uploaded to final seminar
daysAheadToUploadThesisReview.MaximumValidator=No of work days ahead thesis comments should be uploaded to final seminar can't be same or higher than Min work days before a final seminar student should upload final seminar thesis

@ -180,6 +180,50 @@ public class GeneralSystemSettings extends DomainObject{
@Basic(optional=true)
private Date examinerPunishMailDate;
@Basic(optional = false)
private boolean supervisorThesisReviewsMandatory = false;
@Basic(optional=true)
private Date supervisorPunishMailDate;
@Basic(optional = false)
private boolean reviewerThesisReviewsMandatory = false;
@Basic(optional=true)
private Date reviewerPunishMailDate;
public boolean isSupervisorThesisReviewsMandatory() {
return supervisorThesisReviewsMandatory;
}
public void setSupervisorThesisReviewsMandatory(boolean supervisorThesisReviewsMandatory) {
this.supervisorThesisReviewsMandatory = supervisorThesisReviewsMandatory;
}
public Date getSupervisorPunishMailDate() {
return supervisorPunishMailDate;
}
public void setSupervisorPunishMailDate(Date supervisorPunishMailDate) {
this.supervisorPunishMailDate = supervisorPunishMailDate;
}
public boolean isReviewerThesisReviewsMandatory() {
return reviewerThesisReviewsMandatory;
}
public void setReviewerThesisReviewsMandatory(boolean reviewerThesisReviewsMandatory) {
this.reviewerThesisReviewsMandatory = reviewerThesisReviewsMandatory;
}
public Date getReviewerPunishMailDate() {
return reviewerPunishMailDate;
}
public void setReviewerPunishMailDate(Date reviewerPunishMailDate) {
this.reviewerPunishMailDate = reviewerPunishMailDate;
}
public Date getExaminerPunishMailDate() {
return examinerPunishMailDate;
}

@ -211,7 +211,7 @@ public class AdminFinalSeminarSettingsPageTest extends PageTest {
@Test
public void testFormContainsThesisReviewMandatoryCheckBox() throws Exception {
assertFormComponent(THESIS_REVIEW_MANDATORY, CheckBox.class);
assertFormComponent(EXAMINER_THESIS_REVIEW_MANDATORY, CheckBox.class);
}
@Test