refactoring
This commit is contained in:
parent
ff561ca58d
commit
fd7f0cda00
resources/db_update_scripts
src
main/java/se/su/dsv/scipro
admin/pages/settings
data
opponent/panels
seminar/panels
springdata/serviceimpls
workerthreads
test/java/se/su/dsv/scipro
admin/pages/settings
seminar/panels
@ -80,4 +80,43 @@ INSERT INTO `TurnitinSettings_expirationMails` (`TurnitinSettings_id`, `expirati
|
||||
--
|
||||
|
||||
INSERT INTO `TurnitinSettings` (`id`, `dateCreated`, `lastModified`, `version`, `accountNo`, `assignmentName`, `className`, `classNo`, `expirationContent`, `expirationDate`, `firstName`, `lastName`, `password`, `sharedKey`, `username`) VALUES
|
||||
(1, '2013-06-24 11:00:31', '2013-06-24 14:33:37', 1, 67556, 'thesis13', 'thesis13', 6037649, 'The turnitin integration has some prerequisites. User, account, class, assignment etc need to be set up in turnitins web interface and specified in SciPros system settings in order for our integration to have something to work with. Most of the setup is already done, what needs to be redone every once in a while is the class and/or assignment being used needs to be renewed when it runs out. Currently we have a class and assignment that runs from 1 Jan 2013 to 31 Dec 2013. When these run out, new ones must be created.\r\n\r\nCreate a class\r\n\r\nThis needs to be done every time the class we use for the integration runs out. We generally create classes with duration spanning one semester or 6 months. Make sure to create events in the DSV IT google calendar that have a lot of reminders about this well ahead, so that we dont forget to change the details and update everything before the class we use for our integration runs out.\r\n\r\nLog in to turnitin.com using the turnitin username and turnitin password specified in the SciPro system settings. Once logged in, switch to the instructor view. Find the turnitinaccount with the same no as the one specified in the SciPro system settings. Add a class to it with the appropriate duration. Enter the class name and id into SciPros system settings. Now go on to create an assignment.\r\n\r\nCreate an assignment\r\n\r\nThis needs to be done every time we create a new class for the integration and/or every time the assignment we use for the integration runs out. Make sure to create events in the DSV IT google calendar that have a lot of reminders about this well ahead, so that we dont forget to change the details and update everything before the integration stops working.\r\n\r\nLog in to turnitin.com using the turnitin username and turnitin password specified in the SciPro system settings. Once logged in, switch to the instructor view. Find the turnitinaccount with the same no as the one specified in the SciPro system settings. Press the class we use for the integration. Add an assignment with the appropriate duration. Enter the assignment name into SciPros Admin | Settings GUI.', '2013-12-31 00:00:00', 'Thesis', 'Support', 'SciPro2011', 'SciPro11', 'thesissupport@dsv.su.se');
|
||||
(1, '2013-06-24 11:00:31', '2013-06-24 14:33:37', 1, 67556, 'thesis13', 'thesis13', 6037649, 'The turnitin integration has some prerequisites. User, account, class, assignment etc need to be set up in turnitins web interface and specified in SciPros system settings in order for our integration to have something to work with. Most of the setup is already done, what needs to be redone every once in a while is the class and/or assignment being used needs to be renewed when it runs out. Currently we have a class and assignment that runs from 1 Jan 2013 to 31 Dec 2013. When these run out, new ones must be created.\r\n\r\nCreate a class\r\n\r\nThis needs to be done every time the class we use for the integration runs out. We generally create classes with duration spanning one semester or 6 months. Make sure to create events in the DSV IT google calendar that have a lot of reminders about this well ahead, so that we dont forget to change the details and update everything before the class we use for our integration runs out.\r\n\r\nLog in to turnitin.com using the turnitin username and turnitin password specified in the SciPro system settings. Once logged in, switch to the instructor view. Find the turnitinaccount with the same no as the one specified in the SciPro system settings. Add a class to it with the appropriate duration. Enter the class name and id into SciPros system settings. Now go on to create an assignment.\r\n\r\nCreate an assignment\r\n\r\nThis needs to be done every time we create a new class for the integration and/or every time the assignment we use for the integration runs out. Make sure to create events in the DSV IT google calendar that have a lot of reminders about this well ahead, so that we dont forget to change the details and update everything before the integration stops working.\r\n\r\nLog in to turnitin.com using the turnitin username and turnitin password specified in the SciPro system settings. Once logged in, switch to the instructor view. Find the turnitinaccount with the same no as the one specified in the SciPro system settings. Press the class we use for the integration. Add an assignment with the appropriate duration. Enter the assignment name into SciPros Admin | Settings GUI.', '2013-12-31 00:00:00', 'Thesis', 'Support', 'SciPro2011', 'SciPro11', 'thesissupport@dsv.su.se');
|
||||
|
||||
--
|
||||
-- Table structure for table `FinalSeminarSettings`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `FinalSeminarSettings` (
|
||||
`id` bigint(20) NOT NULL,
|
||||
`dateCreated` datetime NOT NULL,
|
||||
`lastModified` datetime NOT NULL,
|
||||
`version` int(11) NOT NULL,
|
||||
`daysAheadThesisCommentToRemind` int(11) NOT NULL,
|
||||
`daysAheadToCreate` int(11) NOT NULL,
|
||||
`daysAheadToRegisterOpposition` int(11) NOT NULL,
|
||||
`daysAheadToRegisterParticipation` int(11) NOT NULL,
|
||||
`daysAheadToUploadThesis` int(11) NOT NULL,
|
||||
`daysAheadToUploadThesisReview` int(11) NOT NULL,
|
||||
`examinerThesisReviewsMandatory` tinyint(1) NOT NULL,
|
||||
`reviewerThesisReviewsMandatory` tinyint(1) NOT NULL,
|
||||
`supervisorThesisReviewsMandatory` tinyint(1) NOT NULL,
|
||||
`thesisMustBePDF` tinyint(1) NOT NULL,
|
||||
`thesisReviewsEnabled` tinyint(1) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Table structure for table `FinalSeminarSettings_punishMails`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `FinalSeminarSettings_punishMails` (
|
||||
`FinalSeminarSettings_id` bigint(20) NOT NULL,
|
||||
`punishMails` varchar(255) DEFAULT NULL,
|
||||
KEY `FK373B1D06BB47DEDF` (`FinalSeminarSettings_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Constraints for table `FinalSeminarSettings_punishMails`
|
||||
--
|
||||
ALTER TABLE `FinalSeminarSettings_punishMails`
|
||||
ADD CONSTRAINT `FK373B1D06BB47DEDF` FOREIGN KEY (`FinalSeminarSettings_id`) REFERENCES `FinalSeminarSettings` (`id`);
|
@ -6,19 +6,19 @@
|
||||
<br />
|
||||
<form wicket:id="seminarSettingsForm">
|
||||
<div class="row-fluid">
|
||||
<label><span class="span3">Min days before a final seminar to register as an opponent</span> <input type="text" wicket:id="daysBeforeFinalSeminarCanRegisterAsOpponent" /> </label>
|
||||
<label><span class="span3">Min days before a final seminar to register as an opponent</span> <input type="text" wicket:id="daysAheadToRegisterOpposition" /> </label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row-fluid">
|
||||
<label><span class="span3">Min days before a final seminar to register as a participant</span> <input type="text" wicket:id="daysBeforeFinalSeminarCanRegisterAsActiveParticipant" /> </label>
|
||||
<label><span class="span3">Min days before a final seminar to register as a participant</span> <input type="text" wicket:id="daysAheadToRegisterParticipation" /> </label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row-fluid">
|
||||
<label><span class="span3">Min work days ahead final seminars must be created</span> <input type="text" wicket:id="finalSeminarCreateDaysAhead" /> </label>
|
||||
<label><span class="span3">Min work days ahead final seminars must be created</span> <input type="text" wicket:id="daysAheadToCreate" /> </label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row-fluid">
|
||||
<label for="finalSeminarThesisDaysAhead"><span wicket:id="finalSeminarThesisDaysAheadLabel"></span></label> <input type="text" wicket:id="finalSeminarThesisDaysAhead" />
|
||||
<label for="finalSeminarThesisDaysAhead"><span wicket:id="finalSeminarThesisDaysAheadLabel"></span></label> <input type="text" wicket:id="daysAheadToUploadThesis" />
|
||||
</div><br>
|
||||
<div class="row-fluid">
|
||||
<label class="checkbox"><input type="checkbox" wicket:id="thesisReviewsEnabled" /> Enable thesis comments on final seminars</label>
|
||||
@ -48,11 +48,11 @@
|
||||
<!--</div>-->
|
||||
<!--<br />-->
|
||||
<div class="row-fluid">
|
||||
<label><span class="span3">No of work days ahead thesis comment deadline to remind people to upload thesis comment</span> <input type="text" wicket:id="thesisCommentNoDaysAheadReminder" /> </label>
|
||||
<label><span class="span3">No of work days ahead thesis comment deadline to remind people to upload thesis comment</span> <input type="text" wicket:id="daysAheadThesisCommentToRemind" /> </label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row-fluid">
|
||||
<label class="checkbox"><input type="checkbox" wicket:id="finalSeminarThesisMustBeAPDF" /> File format of upload theses and opposition reports must be PDF</label>
|
||||
<label class="checkbox"><input type="checkbox" wicket:id="thesisMustBePDF" /> File format of upload theses and opposition reports must be PDF</label>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
|
@ -83,16 +83,16 @@ public class AdminFinalSeminarSettingsPage extends AbstractAdminSettingsPage {
|
||||
}
|
||||
|
||||
static final String SETTINGS_FORM = "seminarSettingsForm";
|
||||
static final String SEMINAR_CREATE_DAYS_AHEAD = "finalSeminarCreateDaysAhead";
|
||||
static final String SEMINAR_MIN_DAYS_REGISTER_ACTIVE = "daysBeforeFinalSeminarCanRegisterAsActiveParticipant";
|
||||
static final String SEMINAR_MIN_DAYS_REGISTER_OPPONENT = "daysBeforeFinalSeminarCanRegisterAsOpponent";
|
||||
static final String SEMINAR_CREATE_DAYS_AHEAD = "daysAheadToCreate";
|
||||
static final String SEMINAR_MIN_DAYS_REGISTER_ACTIVE = "daysAheadToRegisterParticipation";
|
||||
static final String SEMINAR_MIN_DAYS_REGISTER_OPPONENT = "daysAheadToRegisterOpposition";
|
||||
static final String SEMINAR_THESIS_DAYS_AHEAD_LABEL = "finalSeminarThesisDaysAheadLabel";
|
||||
static final String SEMINAR_THESIS_DAYS_AHEAD = "finalSeminarThesisDaysAhead";
|
||||
static final String SEMINAR_THESIS_DAYS_AHEAD = "daysAheadToUploadThesis";
|
||||
static final String SEMINAR_MAX_OPPONENTS = "maxOpponentsOnFinalSeminar";
|
||||
static final String SEMINAR_MAX_PARTICIPANTS = "maxFinalSeminarActiveParticipation";
|
||||
static final String SEMINAR_MIN_OPPONENTS = "minOpponentsOnFinalSeminar";
|
||||
static final String SEMINAR_MIN_PARTICIPANTS = "minFinalSeminarActiveParticipation";
|
||||
static final String SEMINAR_PDF = "finalSeminarThesisMustBeAPDF";
|
||||
static final String SEMINAR_PDF = "thesisMustBePDF";
|
||||
static final String THESIS_REVIEWS = "thesisReviewsEnabled";
|
||||
static final String EXAMINER_THESIS_REVIEW_MANDATORY = "examinerThesisReviewsMandatory";
|
||||
static final String EXAMINER_THESIS_REVIEW_MANDATORY_LABEL = "examinerThesisReviewsMandatoryLabel";
|
||||
@ -106,5 +106,5 @@ public class AdminFinalSeminarSettingsPage extends AbstractAdminSettingsPage {
|
||||
static final String PROJECT_CLASS_LIST = "pcListView";
|
||||
static final String PROJECT_CLASS = "pcName";
|
||||
static final String PROJECT_CLASS_FORM = "pcForm";
|
||||
static final String THESIS_COMMENT_NO_DAYS_AHEAD_REMINDER = "thesisCommentNoDaysAheadReminder";
|
||||
static final String THESIS_COMMENT_NO_DAYS_AHEAD_REMINDER = "daysAheadThesisCommentToRemind";
|
||||
}
|
@ -2,7 +2,6 @@ package se.su.dsv.scipro.data.controllers.impl;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.wicket.markup.html.form.upload.FileUpload;
|
||||
import org.apache.wicket.spring.injection.annot.SpringBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -171,7 +170,7 @@ public class FinalSeminarUploadControllerImpl implements FinalSeminarUploadContr
|
||||
}
|
||||
|
||||
private void assertMimeType(final String type) throws InvalidFileFormatException {
|
||||
final boolean requirePdf = service.getInstance().isFinalSeminarThesisMustBeAPDF();
|
||||
final boolean requirePdf = service.getInstance().setThesisMustBePDF();
|
||||
if (type == null || (requirePdf && !type.equals("application/pdf"))) {
|
||||
logger.debug("Faulty file type uploaded. Expected " + (requirePdf ? "\"application/pdf\"" : "non null") + ", was: \"" + type + "\"");
|
||||
throw new InvalidFileFormatException("The file must be " + (requirePdf ? "a PDF" : "non null"));
|
||||
|
@ -5,7 +5,6 @@ import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
@ -25,19 +24,19 @@ public class FinalSeminarSettings extends DomainObject {
|
||||
}
|
||||
|
||||
@Basic(optional = false)
|
||||
private int finalSeminarCreateDaysAhead;
|
||||
private int daysAheadToCreate;
|
||||
|
||||
@Basic(optional=false)
|
||||
private int daysBeforeFinalSeminarCanRegisterAsActiveParticipant = 1;
|
||||
private int daysAheadToRegisterParticipation = 1;
|
||||
|
||||
@Basic(optional=false)
|
||||
private int daysBeforeFinalSeminarCanRegisterAsOpponent = 3;
|
||||
private int daysAheadToRegisterOpposition = 3;
|
||||
|
||||
@Basic(optional = false)
|
||||
private int finalSeminarThesisDaysAhead = 10;
|
||||
private int daysAheadToUploadThesis = 10;
|
||||
|
||||
@Basic(optional=false)
|
||||
private boolean finalSeminarThesisMustBeAPDF = false;
|
||||
private boolean thesisMustBePDF = false;
|
||||
|
||||
@Basic(optional = false)
|
||||
private boolean thesisReviewsEnabled = false;
|
||||
@ -55,51 +54,51 @@ public class FinalSeminarSettings extends DomainObject {
|
||||
private int daysAheadToUploadThesisReview;
|
||||
|
||||
@ElementCollection
|
||||
@CollectionTable(name = "general_system_settings_fs_thesis_comment_punish_recipients")
|
||||
@Column(name = "mail")
|
||||
@CollectionTable//(name = "general_system_settings_fs_thesis_comment_punish_recipients")
|
||||
@Column//(name = "mail")
|
||||
private List<String> punishMails = new ArrayList<String>();
|
||||
|
||||
@Basic(optional = false)
|
||||
private int thesisCommentNoDaysAheadReminder = 1;
|
||||
private int daysAheadThesisCommentToRemind = 1;
|
||||
|
||||
public int getFinalSeminarCreateDaysAhead() {
|
||||
return finalSeminarCreateDaysAhead;
|
||||
public int getDaysAheadToCreate() {
|
||||
return daysAheadToCreate;
|
||||
}
|
||||
|
||||
public void setFinalSeminarCreateDaysAhead(int finalSeminarCreateDaysAhead) {
|
||||
this.finalSeminarCreateDaysAhead = finalSeminarCreateDaysAhead;
|
||||
public void setDaysAheadToCreate(int finalSeminarCreateDaysAhead) {
|
||||
this.daysAheadToCreate = finalSeminarCreateDaysAhead;
|
||||
}
|
||||
|
||||
public int getDaysBeforeFinalSeminarCanRegisterAsActiveParticipant() {
|
||||
return daysBeforeFinalSeminarCanRegisterAsActiveParticipant;
|
||||
public int getDaysAheadToRegisterParticipation() {
|
||||
return daysAheadToRegisterParticipation;
|
||||
}
|
||||
|
||||
public void setDaysBeforeFinalSeminarCanRegisterAsActiveParticipant(int daysBeforeFinalSeminarCanRegisterAsActiveParticipant) {
|
||||
this.daysBeforeFinalSeminarCanRegisterAsActiveParticipant = daysBeforeFinalSeminarCanRegisterAsActiveParticipant;
|
||||
public void setDaysAheadToRegisterParticipation(int daysBeforeFinalSeminarCanRegisterAsActiveParticipant) {
|
||||
this.daysAheadToRegisterParticipation = daysBeforeFinalSeminarCanRegisterAsActiveParticipant;
|
||||
}
|
||||
|
||||
public int getDaysBeforeFinalSeminarCanRegisterAsOpponent() {
|
||||
return daysBeforeFinalSeminarCanRegisterAsOpponent;
|
||||
public int getDaysAheadToRegisterOpposition() {
|
||||
return daysAheadToRegisterOpposition;
|
||||
}
|
||||
|
||||
public void setDaysBeforeFinalSeminarCanRegisterAsOpponent(int daysBeforeFinalSeminarCanRegisterAsOpponent) {
|
||||
this.daysBeforeFinalSeminarCanRegisterAsOpponent = daysBeforeFinalSeminarCanRegisterAsOpponent;
|
||||
public void setDaysAheadToRegisterOpposition(int daysBeforeFinalSeminarCanRegisterAsOpponent) {
|
||||
this.daysAheadToRegisterOpposition = daysBeforeFinalSeminarCanRegisterAsOpponent;
|
||||
}
|
||||
|
||||
public int getFinalSeminarThesisDaysAhead() {
|
||||
return finalSeminarThesisDaysAhead;
|
||||
public int getDaysAheadToUploadThesis() {
|
||||
return daysAheadToUploadThesis;
|
||||
}
|
||||
|
||||
public void setFinalSeminarThesisDaysAhead(int finalSeminarThesisDaysAhead) {
|
||||
this.finalSeminarThesisDaysAhead = finalSeminarThesisDaysAhead;
|
||||
public void setDaysAheadToUploadThesis(int finalSeminarThesisDaysAhead) {
|
||||
this.daysAheadToUploadThesis = finalSeminarThesisDaysAhead;
|
||||
}
|
||||
|
||||
public boolean isFinalSeminarThesisMustBeAPDF() {
|
||||
return finalSeminarThesisMustBeAPDF;
|
||||
public boolean setThesisMustBePDF() {
|
||||
return thesisMustBePDF;
|
||||
}
|
||||
|
||||
public void setFinalSeminarThesisMustBeAPDF(boolean finalSeminarThesisMustBeAPDF) {
|
||||
this.finalSeminarThesisMustBeAPDF = finalSeminarThesisMustBeAPDF;
|
||||
public void setThesisMustBePDF(boolean finalSeminarThesisMustBeAPDF) {
|
||||
this.thesisMustBePDF = finalSeminarThesisMustBeAPDF;
|
||||
}
|
||||
|
||||
public boolean isThesisReviewsEnabled() {
|
||||
@ -150,11 +149,11 @@ public class FinalSeminarSettings extends DomainObject {
|
||||
this.punishMails = punishMails;
|
||||
}
|
||||
|
||||
public int getThesisCommentNoDaysAheadReminder() {
|
||||
return thesisCommentNoDaysAheadReminder;
|
||||
public int getDaysAheadThesisCommentToRemind() {
|
||||
return daysAheadThesisCommentToRemind;
|
||||
}
|
||||
|
||||
public void setThesisCommentNoDaysAheadReminder(int thesisCommentNoDaysAheadReminder) {
|
||||
this.thesisCommentNoDaysAheadReminder = thesisCommentNoDaysAheadReminder;
|
||||
public void setDaysAheadThesisCommentToRemind(int thesisCommentNoDaysAheadReminder) {
|
||||
this.daysAheadThesisCommentToRemind = thesisCommentNoDaysAheadReminder;
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ import se.su.dsv.scipro.SciProSession;
|
||||
import se.su.dsv.scipro.components.AbstractUploadForm;
|
||||
import se.su.dsv.scipro.data.controllers.FinalSeminarUploadController;
|
||||
import se.su.dsv.scipro.data.dao.interfaces.FinalSeminarDao;
|
||||
import se.su.dsv.scipro.data.dao.interfaces.GeneralSystemSettingsDao;
|
||||
import se.su.dsv.scipro.data.dataobjects.*;
|
||||
import se.su.dsv.scipro.exceptions.InvalidFileFormatException;
|
||||
import se.su.dsv.scipro.notifications.dataobject.NotificationSource;
|
||||
@ -65,7 +64,7 @@ public class NewSeminarDocumentUploadForm extends AbstractUploadForm {
|
||||
//Filter the list based on mimetype predicate
|
||||
CollectionFilterUtil.filterMutableCollection(availableResourcesList, new Predicate<FileDescription>() {
|
||||
public boolean accept(final FileDescription desc) {
|
||||
return (!service.getInstance().isFinalSeminarThesisMustBeAPDF() || desc.getMimeType().equals("application/pdf"));
|
||||
return (!service.getInstance().setThesisMustBePDF() || desc.getMimeType().equals("application/pdf"));
|
||||
}
|
||||
});
|
||||
return availableResourcesList;
|
||||
|
@ -72,7 +72,7 @@ public class SeminarCRUDPanel extends AbstractCRUDPanel<FinalSeminar> {
|
||||
form.add(new RequiredTextField<String>(ROOM).add(
|
||||
new StringValidator.MinimumLengthValidator(1)));
|
||||
|
||||
form.add(new Label(DAYS_AHEAD, String.valueOf(service.getInstance().getFinalSeminarCreateDaysAhead())));
|
||||
form.add(new Label(DAYS_AHEAD, String.valueOf(service.getInstance().getDaysAheadToCreate())));
|
||||
|
||||
form.add(new WebMarkupContainer(CANCELLED){
|
||||
@Override
|
||||
@ -83,7 +83,7 @@ public class SeminarCRUDPanel extends AbstractCRUDPanel<FinalSeminar> {
|
||||
|
||||
if (isNewDomainObject()) {
|
||||
// form.getModelObject().setStartDate(new DateTime().plusDays(settingsService.getFinalSeminarCreateDaysAhead()).toDate());
|
||||
form.getModelObject().setStartDate(daysService.workDaysAfter(SciProUtilities.setTimeOfDayTo0000(new Date()), service.getInstance().getFinalSeminarCreateDaysAhead()));
|
||||
form.getModelObject().setStartDate(daysService.workDaysAfter(SciProUtilities.setTimeOfDayTo0000(new Date()), service.getInstance().getDaysAheadToCreate()));
|
||||
}
|
||||
form.add(new StylableDateTimeField(DATE).setRequired(true));
|
||||
|
||||
@ -110,7 +110,7 @@ public class SeminarCRUDPanel extends AbstractCRUDPanel<FinalSeminar> {
|
||||
/**
|
||||
* This does
|
||||
*/
|
||||
Date allowed = daysService.workDaysAfter(SciProUtilities.setTimeOfDayTo0000(new Date()), service.getInstance().getFinalSeminarCreateDaysAhead());
|
||||
Date allowed = daysService.workDaysAfter(SciProUtilities.setTimeOfDayTo0000(new Date()), service.getInstance().getDaysAheadToCreate());
|
||||
|
||||
boolean seminarIsTooClose = seminar.getStartDate().before(allowed);
|
||||
/**
|
||||
|
@ -161,7 +161,7 @@ public class FinalSeminarServiceImpl extends AbstractQueryService<FinalSeminar,
|
||||
|
||||
@Override
|
||||
public Date thesisUploadDeadline(FinalSeminar finalSeminar) {
|
||||
return daysService.workDaysAhead(finalSeminar.getStartDate(), service.getInstance().getFinalSeminarThesisDaysAhead());
|
||||
return daysService.workDaysAhead(finalSeminar.getStartDate(), service.getInstance().getDaysAheadToUploadThesis());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -4,15 +4,12 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import se.su.dsv.scipro.data.controllers.NotificationController;
|
||||
import se.su.dsv.scipro.data.dataobjects.FinalSeminar;
|
||||
import se.su.dsv.scipro.data.dataobjects.FinalSeminarSettings;
|
||||
import se.su.dsv.scipro.data.dataobjects.GeneralSystemSettings;
|
||||
import se.su.dsv.scipro.notifications.dataobject.NotificationSource;
|
||||
import se.su.dsv.scipro.notifications.dataobject.SeminarEvent;
|
||||
import se.su.dsv.scipro.reusable.SciProUtilities;
|
||||
import se.su.dsv.scipro.springdata.services.DaysService;
|
||||
import se.su.dsv.scipro.springdata.services.FinalSeminarService;
|
||||
import se.su.dsv.scipro.springdata.services.FinalSeminarSettingsService;
|
||||
import se.su.dsv.scipro.springdata.services.GeneralSystemSettingsService;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
@ -49,7 +46,7 @@ public class ThesisCommentReminderWorker extends AbstractWorker {
|
||||
/**
|
||||
* Take the remind date
|
||||
*/
|
||||
final int remindDaysAhead = service.getInstance().getThesisCommentNoDaysAheadReminder();
|
||||
final int remindDaysAhead = service.getInstance().getDaysAheadThesisCommentToRemind();
|
||||
Date remindDate = daysService.workDaysAhead(commentDeadline, remindDaysAhead);
|
||||
|
||||
/**
|
||||
|
@ -4,15 +4,12 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import se.su.dsv.scipro.data.controllers.NotificationController;
|
||||
import se.su.dsv.scipro.data.dataobjects.FinalSeminar;
|
||||
import se.su.dsv.scipro.data.dataobjects.FinalSeminarSettings;
|
||||
import se.su.dsv.scipro.data.dataobjects.GeneralSystemSettings;
|
||||
import se.su.dsv.scipro.notifications.dataobject.NotificationSource;
|
||||
import se.su.dsv.scipro.notifications.dataobject.SeminarEvent;
|
||||
import se.su.dsv.scipro.reusable.SciProUtilities;
|
||||
import se.su.dsv.scipro.springdata.services.DaysService;
|
||||
import se.su.dsv.scipro.springdata.services.FinalSeminarService;
|
||||
import se.su.dsv.scipro.springdata.services.FinalSeminarSettingsService;
|
||||
import se.su.dsv.scipro.springdata.services.GeneralSystemSettingsService;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
@ -42,7 +39,7 @@ public class ThesisUploadReminderWorker extends AbstractWorker {
|
||||
/**
|
||||
* Take the deadline
|
||||
*/
|
||||
final int daysAhead = service.getInstance().getFinalSeminarThesisDaysAhead();
|
||||
final int daysAhead = service.getInstance().getDaysAheadToUploadThesis();
|
||||
Date uploadDeadline = daysService.workDaysAhead(fs.getStartDate(), daysAhead);
|
||||
|
||||
/**
|
||||
|
@ -50,8 +50,8 @@ public class AdminFinalSeminarSettingsPageTest extends PageTest {
|
||||
// when(generalSystemSettingsService.getGeneralSystemSettingsInstance()).thenReturn(generalSystemSettings);
|
||||
when(finalSeminarSettingsService.getInstance()).thenReturn(settings);
|
||||
|
||||
settings.setFinalSeminarCreateDaysAhead(10);
|
||||
settings.setFinalSeminarThesisDaysAhead(5);
|
||||
settings.setDaysAheadToCreate(10);
|
||||
settings.setDaysAheadToUploadThesis(5);
|
||||
|
||||
// when(finalSeminarSettingsService.getInstance().isThesisReviewsEnabled()).thenReturn(true);
|
||||
|
||||
|
@ -15,7 +15,6 @@ import se.su.dsv.scipro.data.enums.DateStyle;
|
||||
import se.su.dsv.scipro.data.enums.ProjectTeamMemberRoles;
|
||||
import se.su.dsv.scipro.exceptions.RenderingSafeException;
|
||||
import se.su.dsv.scipro.seminar.dataobjects.ThesisReview;
|
||||
import se.su.dsv.scipro.springdata.services.FinalSeminarSettingsService;
|
||||
import se.su.dsv.scipro.springdata.services.GeneralSystemSettingsService;
|
||||
import se.su.dsv.scipro.test.SeminarBuilder;
|
||||
import se.su.dsv.scipro.test.UserBuilder;
|
||||
@ -142,7 +141,7 @@ public class SeminarThesisCommentPanelTest extends SciProTest {
|
||||
// GeneralSystemSettings systemSettings = new GeneralSystemSettings();
|
||||
FinalSeminarSettings settings = new FinalSeminarSettings();
|
||||
// systemSettings.setFinalSeminarThesisDaysAhead(daysAhead);
|
||||
settings.setFinalSeminarThesisDaysAhead(daysAhead);
|
||||
settings.setDaysAheadToUploadThesis(daysAhead);
|
||||
|
||||
seminar.setStartDate(seminarDate.toDate());
|
||||
|
||||
|
@ -99,7 +99,7 @@ public class SeminarThesisPanelTest extends SciProTest {
|
||||
|
||||
// GeneralSystemSettings systemSettings = new GeneralSystemSettings();
|
||||
FinalSeminarSettings settings = new FinalSeminarSettings();
|
||||
settings.setFinalSeminarThesisDaysAhead(daysAhead);
|
||||
settings.setDaysAheadToUploadThesis(daysAhead);
|
||||
|
||||
FinalSeminar seminar = new FinalSeminar();
|
||||
seminar.setDocument(null);
|
||||
|
Loading…
x
Reference in New Issue
Block a user