Skip to content

Commit

Permalink
Activities: fix PHP warnings for gibbonSchoolYearTermID in Manage Enr…
Browse files Browse the repository at this point in the history
…olment
  • Loading branch information
SKuipers committed Nov 14, 2024
1 parent b4cc3cc commit 9005433
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions modules/Activities/activities_manage_enrolment_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use Gibbon\Domain\System\SettingGateway;
use Gibbon\Forms\Form;
use Gibbon\Services\Format;
use Gibbon\Http\Url;

//Module includes
require_once __DIR__ . '/moduleFunctions.php';
Expand Down Expand Up @@ -78,17 +79,12 @@
$settingGateway = $container->get(SettingGateway::class);
$dateType = $settingGateway->getSettingByScope('Activities', 'dateType');

$form = Form::create('activityEnrolment', $session->get('absoluteURL').'/modules/'.$session->get('module')."/activities_manage_enrolment_editProcess.php?gibbonActivityID=$gibbonActivityID&gibbonPersonID=$gibbonPersonID&search=".$_GET['search']."&gibbonSchoolYearTermID=".$_GET['gibbonSchoolYearTermID']);
$form = Form::create('activityEnrolment', Url::fromModuleRoute('Activities', 'activities_manage_enrolment_editProcess')->withQueryParams($urlParams + ['gibbonPersonID' => $gibbonPersonID])->directLink());

if ($_GET['search'] != '' || $_GET['gibbonSchoolYearTermID'] != '') {
$params = [
"search" => $_GET['search'] ?? '',
"gibbonSchoolYearTermID" => $_GET['gibbonSchoolYearTermID'] ?? null,
"gibbonActivityID" => $gibbonActivityID
];
if (!empty($_GET['search']) != '' || !empty( $_GET['gibbonSchoolYearTermID'])) {
$form->addHeaderAction('back', __('Back'))
->setURL('/modules/Activities/activities_manage_enrolment.php')
->addParams($params);
->addParams($urlParams);
}

$form->addHiddenValue('address', $session->get('address'));
Expand Down

0 comments on commit 9005433

Please sign in to comment.