mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Adding repeatid to newly created repeat events.
This commit is contained in:
parent
8180c859f1
commit
d3e27ac439
@ -173,6 +173,11 @@
|
||||
if (count($err) == 0) {
|
||||
$form->timemodified = time();
|
||||
|
||||
if ($form->repeat) {
|
||||
$fetch = get_record_sql('SELECT 1, MAX(repeatid) AS repeatid FROM '.$CFG->prefix.'event');
|
||||
$form->repeatid = empty($fetch) ? 1 : $fetch->repeatid + 1;
|
||||
}
|
||||
|
||||
/// Get the event id for the log record.
|
||||
$eventid = insert_record('event', $form, true);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user