ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilBookingPrefAutoBooking Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilBookingPrefAutoBooking:

Public Member Functions

 __construct ()
 
 run ()
 

Protected Attributes

ILIAS BookingManager InternalService $service
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Automatic booking of overdue pools using booking by preference

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 23 of file class.ilBookingPrefAutoBooking.php.

Constructor & Destructor Documentation

◆ __construct()

ilBookingPrefAutoBooking::__construct ( )

Definition at line 27 of file class.ilBookingPrefAutoBooking.php.

References $DIC.

28  {
29  global $DIC;
30  $this->service = $DIC->bookingManager()->internal();
31  }
global $DIC
Definition: feed.php:28

Member Function Documentation

◆ run()

ilBookingPrefAutoBooking::run ( )
Exceptions
ilBookingCalculationException

Definition at line 36 of file class.ilBookingPrefAutoBooking.php.

References $service.

36  : void
37  {
39 
40  $pref_repo = $service->repo()->preferences();
41  $book_repo = $service->repo()->preferenceBasedBooking();
42 
43  // for all pools with an overdue preference based booking
44  foreach ($book_repo->getPoolsWithOverdueBooking() as $pool_id) {
45  $pool = new ilObjBookingPool($pool_id, false);
46  $manager = $service->domain()->preferences($pool);
47 
48  // get preferences and do the booking
49  $preferences = $pref_repo->getPreferences($pool_id);
50  $manager->storeBookings($preferences);
51  }
52  }
ILIAS BookingManager InternalService $service
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Field Documentation

◆ $service

ILIAS BookingManager InternalService ilBookingPrefAutoBooking::$service
protected

Definition at line 25 of file class.ilBookingPrefAutoBooking.php.

Referenced by run().


The documentation for this class was generated from the following file: