Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan-Hendrik Willms
Stud.IP
Commits
7ec7134a
Commit
7ec7134a
authored
2 years ago
by
Moritz Strohm
Browse files
Options
Downloads
Patches
Plain Diff
TIC #841
Merge request
studip/studip!489
parent
231b2832
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/cronjobs/check_admission.class.php
+24
-0
24 additions, 0 deletions
lib/cronjobs/check_admission.class.php
with
24 additions
and
0 deletions
lib/cronjobs/check_admission.class.php
+
24
−
0
View file @
7ec7134a
...
...
@@ -34,6 +34,12 @@ class CheckAdmissionJob extends CronJob
'status'
=>
'optional'
,
'description'
=>
_
(
'Sollen interne Nachrichten an alle betroffenen Nutzer gesendet werden)'
),
],
'send_applications_to_owner'
=>
[
'type'
=>
'boolean'
,
'default'
=>
false
,
'status'
=>
'optional'
,
'description'
=>
_
(
'Die Liste mit Anmeldungen an die Person senden, der das Anmeldeset gehört.'
)
]
];
}
...
...
@@ -99,6 +105,24 @@ class CheckAdmissionJob extends CronJob
$applicants_file
=
$GLOBALS
[
'TMP_PATH'
]
.
'/seat_distribution_logs/applicants_'
.
$set_id
.
'.csv'
;
if
(
array_to_csv
(
$data
,
$applicants_file
,
$captions
))
{
echo
'applicants written to '
.
$applicants_file
.
chr
(
10
);
if
(
$parameters
[
'send_applications_to_owner'
])
{
//Send a mail to the owner of the course set:
$owner
=
User
::
find
(
$courseset
->
getUserId
());
if
(
$owner
)
{
setTempLanguage
(
$owner
->
id
);
$mail
=
new
StudipMail
();
$mail
->
addRecipient
(
$owner
->
email
)
->
setSubject
(
sprintf
(
_
(
'Das Stud.IP Anmeldeset %s wird gelost'
),
$courseset
->
getName
()))
->
setBodyText
(
sprintf
(
_
(
'Ihr Anmeldeset %s wird jetzt gelost. Im Anhang finden Sie die Liste der Anmeldungen.'
),
$courseset
->
getName
()
))
->
addFileAttachment
(
$applicants_file
)
->
send
();
restoreLanguage
();
}
}
}
}
$courseset
->
distributeSeats
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment