File tree 6 files changed +10
-13
lines changed
6 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ class reservation {
67
67
/**
68
68
* @var ?DateTimeImmutable $datetime the date this reservation ends at, with time filled in
69
69
*/
70
- private ?DateTimeImmutable $ datetime ;
70
+ private ?DateTimeImmutable $ datetime_end ;
71
71
72
72
/**
73
73
* Constructs a reservation
@@ -124,7 +124,7 @@ public function prepare_for_db(): object {
124
124
public function get_datetime (): DateTimeImmutable {
125
125
if (is_null ($ this ->datetime )) {
126
126
$ slot = $ this ->get_slot ();
127
- $ this ->datetime = slot_helper::amend_date_with_unit_time ($ this -> date , $ slot -> startunit );
127
+ $ this ->datetime = slot_helper::amend_date_with_unit_time ($ slot -> startunit , $ this -> date );
128
128
}
129
129
130
130
return $ this ->datetime ;
@@ -138,7 +138,7 @@ public function get_datetime(): DateTimeImmutable {
138
138
public function get_datetime_end (): DateTimeImmutable {
139
139
if (is_null ($ this ->datetime )) {
140
140
$ slot = $ this ->get_slot ();
141
- $ this ->datetime_end = slot_helper::amend_date_with_unit_time ($ this -> date , $ slot ->startunit + $ slot ->duration )
141
+ $ this ->datetime_end = slot_helper::amend_date_with_unit_time ($ slot ->startunit + $ slot ->duration , $ this -> date );
142
142
}
143
143
144
144
return $ this ->datetime_end ;
Original file line number Diff line number Diff line change 28
28
use local_lbplanner \model \reservation ;
29
29
30
30
/**
31
- * Returns all slots the user can theoretically reserve.
32
- * This does not include times the user has already reserved a slot for.
31
+ * Books a reservation for the user
33
32
*
34
33
* @package local_lbplanner
35
- * @subpackage services_plan
34
+ * @subpackage services_slots
36
35
* @copyright 2024 necodeIT
37
36
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
38
37
*/
Original file line number Diff line number Diff line change 27
27
* This does not include times the user has already reserved a slot for.
28
28
*
29
29
* @package local_lbplanner
30
- * @subpackage services_plan
30
+ * @subpackage services_slots
31
31
* @copyright 2024 necodeIT
32
32
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
33
33
*/
Original file line number Diff line number Diff line change 28
28
* This does not include times the user has already reserved a slot for.
29
29
*
30
30
* @package local_lbplanner
31
- * @subpackage services_plan
31
+ * @subpackage services_slots
32
32
* @copyright 2024 necodeIT
33
33
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34
34
*/
Original file line number Diff line number Diff line change 26
26
* Returns all slots a supervisor can see.
27
27
*
28
28
* @package local_lbplanner
29
- * @subpackage services_plan
29
+ * @subpackage services_slots
30
30
* @copyright 2024 necodeIT
31
31
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
32
32
*/
Original file line number Diff line number Diff line change 24
24
25
25
use local_lbplanner \helpers \slot_helper ;
26
26
use local_lbplanner \helpers \notifications_helper ;
27
- use local_lbplanner \model \reservation ;
28
27
use local_lbplanner \enums \NOTIF_TRIGGER ;
29
28
30
29
/**
31
- * Returns all slots the user can theoretically reserve.
32
- * This does not include times the user has already reserved a slot for.
30
+ * Unbooks reservation
33
31
*
34
32
* @package local_lbplanner
35
- * @subpackage services_plan
33
+ * @subpackage services_slots
36
34
* @copyright 2024 necodeIT
37
35
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
38
36
*/
You can’t perform that action at this time.
0 commit comments