diff --git a/messages/uniworx/de-de-formal.msg b/messages/uniworx/de-de-formal.msg index fece2bfe2..cbaa084ed 100644 --- a/messages/uniworx/de-de-formal.msg +++ b/messages/uniworx/de-de-formal.msg @@ -212,7 +212,9 @@ CourseApplicationInstructionsTip: Wird den Studierenden angezeigt, wenn diese si CourseApplicationTemplate: Bewerbungsvorlagen CourseApplicationTemplateTip: Werden den Studierenden zum download angeboten, wenn diese sich für Ihre Veranstaltung bewerben bzw. bei dieser anmelden CourseApplicationsText: Text-Bewerbungen -CourseApplicationsTextTip: Sollen die Studierenden Bewerbungen (ggf. zusätzlich zu abgegebenen Dateien) als unformatierten Text einreichen? +CourseApplicationsTextTip: Sollen die Studierenden bei Ihrer Bewerbung bzw. Anmeldung (ggf. zusätzlich zu abgegebenen Dateien) auch unformatierten Text einreichen können? +CourseApplicationsFiles: Bewerbungsdateien +CourseApplicationsFilesTip: Sollen die Studierenden bei Ihrer Bewerbung bzw. Anmeldung (ggf. zusätzlich zu unformatiertem Text) auch Dateien abgeben können? CourseApplicationRatingsVisible: Feedback für Bewerbungen CourseApplicationRatingsVisibleTip: Sollen Bewertung und Kommentar der Bewerbungen den Studierenden nach Ende der Bewertungs-Phase angezeigt werden? CourseApplicationRequired: Bewerbungsverfahren @@ -225,6 +227,8 @@ CourseApplicationTemplateArchiveName tid@TermId ssh@SchoolId csh@CourseShorthand CourseApplication: Bewerbung CourseApplicationIsParticipant: Kursteilnehmer +CourseApplicationInstructionsRecommended: Studierende können bei ihrer Anmeldung/Bewerbung nach aktuellen Einstellungen Texte bzw. Dateien abgeben. Es wurden jedoch keine Anweisungen zur Bewerbung oder Vorlage-Dateien hinterlegt. Sie sollten entweder keine Texte bzw. Dateien verlangen oder über Anweisungen bzw. Vorlagen klarstellen, was Sie von den Studierenden erwarten. + CourseApplicationExists: Sie haben sich bereits für diesen Kurs beworben CourseApplicationInvalidAction: Angegebene Aktion kann nicht durchgeführt werden CourseApplicationCreated csh@CourseShorthand: Erfolgreich zu #{csh} beworben diff --git a/messages/uniworx/en-eu.msg b/messages/uniworx/en-eu.msg index e2362c410..5ef786e53 100644 --- a/messages/uniworx/en-eu.msg +++ b/messages/uniworx/en-eu.msg @@ -212,7 +212,9 @@ CourseApplicationInstructionsTip: Will be shown to students if they decide to ap CourseApplicationTemplate: Application template CourseApplicationTemplateTip: Students can download this template if they decide to apply for this course CourseApplicationsText: Text application -CourseApplicationsTextTip: Should students submit a plaintext application (in addition to submitted files if applicable)? +CourseApplicationsTextTip: Should students submit plaintext with their application/registration (in addition to submitted files if applicable)? +CourseApplicationsFiles: Application files +CourseApplicationsFilesTip: Should students submit files with their application/registration (in addition to plaintext if applicable)? CourseApplicationRatingsVisible: Feedback to applications CourseApplicationRatingsVisibleTip: Should students be allowed to view rating and comments on their application after the rating period? CourseApplicationRequired: Applications required @@ -225,6 +227,8 @@ CourseApplicationTemplateArchiveName tid ssh csh: #{foldCase (termToText (unTerm CourseApplication: Application CourseApplicationIsParticipant: Course participant +CourseApplicationInstructionsRecommended: Students can, as per the current course settings, submit files and/or texts with their applications/registrations. There are, however, no instructions for application or template files. You should either not require files/texts or clarify through instructions or templates what is expected of the students. + CourseApplicationExists: You already applied for this course CourseApplicationInvalidAction: Invalid action CourseApplicationCreated csh: Successfully applied for #{csh} diff --git a/src/Handler/Course/Edit.hs b/src/Handler/Course/Edit.hs index 9071a9ef0..d1a340740 100644 --- a/src/Handler/Course/Edit.hs +++ b/src/Handler/Course/Edit.hs @@ -305,7 +305,7 @@ makeCourseForm miButtonAction template = identifyForm FIDcourse . validateFormDB <*> aopt htmlField (fslI MsgCourseApplicationInstructions & setTooltip MsgCourseApplicationInstructionsTip) (cfAppInstructions <$> template) <*> aopt (multiFileField' . fromMaybe (return ()) $ cfAppInstructionFiles =<< template) (fslI MsgCourseApplicationTemplate & setTooltip MsgCourseApplicationTemplateTip) (cfAppInstructionFiles <$> template) <*> apopt checkBoxField (fslI MsgCourseApplicationsText & setTooltip MsgCourseApplicationsTextTip) (cfAppText <$> template) - <*> uploadModeForm (cfAppFiles <$> template) + <*> uploadModeForm (fslI MsgCourseApplicationsFiles & setTooltip MsgCourseApplicationsFilesTip) (fmap cfAppFiles template <|> pure NoUpload) <*> apopt checkBoxField (fslI MsgCourseApplicationRatingsVisible & setTooltip MsgCourseApplicationRatingsVisibleTip) (cfAppRatingsVisible <$> template) <*> aopt (natFieldI MsgCourseCapacity) (fslI MsgCourseCapacity & setTooltip MsgCourseCapacityTip) (cfCapacity <$> template) @@ -376,6 +376,10 @@ validateCourse = do $ length (CI.original cfShort) <= 10 warnValidation MsgCourseNotAlwaysVisibleDuringRegistration $ NTop cfVisFrom <= NTop cfRegFrom && NTop cfRegTo <= NTop cfVisTo + + warnValidation MsgCourseApplicationInstructionsRecommended + $ (is _Just cfAppInstructions || is _Just cfAppInstructionFiles) + || not (cfAppText || isn't _NoUpload cfAppFiles) getCourseNewR :: Handler Html -- call via toTextUrl diff --git a/src/Handler/Utils/Form.hs b/src/Handler/Utils/Form.hs index de03f7423..fd9fa4781 100644 --- a/src/Handler/Utils/Form.hs +++ b/src/Handler/Utils/Form.hs @@ -581,8 +581,8 @@ studyFeaturesFieldFor mRestr isOptional oldFeatures mbuid = selectField $ do } -uploadModeForm :: Maybe UploadMode -> AForm Handler UploadMode -uploadModeForm prev = multiActionA actions (fslI MsgSheetUploadMode) (classifyUploadMode <$> prev) +uploadModeForm :: FieldSettings UniWorX -> Maybe UploadMode -> AForm Handler UploadMode +uploadModeForm fs prev = multiActionA actions fs (classifyUploadMode <$> prev) where actions :: Map UploadModeDescr (AForm Handler UploadMode) actions = Map.fromList @@ -678,10 +678,10 @@ submissionModeForm prev = explainedMultiActionA actions opts (fslI MsgSheetSubmi , pure $ SubmissionMode True Nothing ) , ( SubmissionModeUser - , SubmissionMode False . Just <$> uploadModeForm (prev ^? _Just . _submissionModeUser . _Just) + , SubmissionMode False . Just <$> uploadModeForm (fslI MsgSheetUploadMode) (prev ^? _Just . _submissionModeUser . _Just) ) , ( SubmissionModeBoth - , SubmissionMode True . Just <$> uploadModeForm (prev ^? _Just . _submissionModeUser . _Just) + , SubmissionMode True . Just <$> uploadModeForm (fslI MsgSheetUploadMode) (prev ^? _Just . _submissionModeUser . _Just) ) ]