fix: Adds autoload support for external libraries

Integrates Composer's autoloading to streamline library
inclusion, facilitating easier extension and maintenance of
dependencies such as PhpSpreadsheet.
This commit is contained in:
Kumi 2024-11-25 10:11:20 +01:00
parent 80ac83db92
commit 9923bab2fb
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -7,6 +7,7 @@ require_once($CFG->libdir . '/formslib.php');
require_once($CFG->dirroot . '/user/selector/lib.php'); require_once($CFG->dirroot . '/user/selector/lib.php');
require_once('classes/user_selector.php'); require_once('classes/user_selector.php');
require_once('classes/usergrades_form.php'); require_once('classes/usergrades_form.php');
require_once('vendor/autoload.php');
use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx; use PhpOffice\PhpSpreadsheet\Writer\Xlsx;