diff --git a/modules/Finance/expenses_manage_print_print.php b/modules/Finance/expenses_manage_print_print.php
index 223c9a1298..de76951381 100644
--- a/modules/Finance/expenses_manage_print_print.php
+++ b/modules/Finance/expenses_manage_print_print.php
@@ -115,7 +115,7 @@
echo "".__('Print')." ";
echo '';
?>
-
+
diff --git a/modules/Finance/expenses_manage_view.php b/modules/Finance/expenses_manage_view.php
index a1cf7c1cf0..13bfeb85a9 100644
--- a/modules/Finance/expenses_manage_view.php
+++ b/modules/Finance/expenses_manage_view.php
@@ -134,7 +134,7 @@
$page->navigator->addSearchResultsAction(Url::fromModuleRoute('Finance', 'expenses_manage.php')->withQueryParams($params));
}
?>
-
+
@@ -159,10 +159,6 @@
?>
-
@@ -282,7 +278,7 @@
-
+
@@ -291,7 +287,7 @@
-
+
get('currency') != '') {
echo "".$session->get('currency').' ';
@@ -306,7 +302,7 @@
-
+
-
+
diff --git a/modules/Finance/fees_manage.php b/modules/Finance/fees_manage.php
index f39dcfdb3a..a31a6bdb80 100644
--- a/modules/Finance/fees_manage.php
+++ b/modules/Finance/fees_manage.php
@@ -44,7 +44,7 @@
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Search'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/fees_manage.php');
$form->addHiddenValue('gibbonSchoolYearID', $gibbonSchoolYearID);
diff --git a/modules/Finance/invoicees_manage.php b/modules/Finance/invoicees_manage.php
index ed277bd200..a152afbf52 100644
--- a/modules/Finance/invoicees_manage.php
+++ b/modules/Finance/invoicees_manage.php
@@ -64,7 +64,7 @@
$form = Form::create('action', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filters'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('q', "/modules/".$session->get('module')."/invoicees_manage.php");
diff --git a/modules/Finance/invoices_manage.php b/modules/Finance/invoices_manage.php
index d116ba8365..6deebd19cb 100644
--- a/modules/Finance/invoices_manage.php
+++ b/modules/Finance/invoices_manage.php
@@ -66,7 +66,7 @@
$form = Form::create('manageInvoices', $session->get('absoluteURL').'/index.php', 'get');
$form->setFactory(FinanceFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/Finance/invoices_manage.php');
$form->addHiddenValue('gibbonSchoolYearID', $gibbonSchoolYearID);
@@ -143,12 +143,12 @@
$col = $form->createBulkActionColumn($bulkActions);
$col->addSelectPaymentMethod('paymentType')
- ->setClass('bulkPaid shortWidth displayNone')
+ ->setClass('bulkPaid shortWidth hidden')
->required()
->addValidationOption('onlyOnSubmit: true')
->placeholder(__('Payment Type').'...');
$col->addDate('paidDate')
- ->setClass('bulkPaid shortWidth displayNone')
+ ->setClass('bulkPaid shortWidth hidden')
->required()
->addValidationOption('onlyOnSubmit: true')
->placeholder(__('Date Paid'));
@@ -192,7 +192,7 @@
->sortable(['surname', 'preferredName'])
->format(function($invoice) {
$output = ''.Format::name('', $invoice['preferredName'], $invoice['surname'], 'Student', true).' ';
- $output .= ''.__($invoice['invoiceTo']).' ';
+ $output .= ''.__($invoice['invoiceTo']).' ';
return $output;
});
@@ -220,7 +220,7 @@
$output = Format::currency($totalFee);
if (!empty($invoice['paidAmount'])) {
$class = Format::number($invoice['paidAmount']) != Format::number($totalFee)? 'textOverBudget' : '';
- $output .= ''.Format::currency($invoice['paidAmount']).' ';
+ $output .= ''.Format::currency($invoice['paidAmount']).' ';
}
return $output;
});
@@ -229,7 +229,7 @@
->description(__('Due Date'))
->format(function ($invoice) {
$output = !is_null($invoice['invoiceIssueDate'])? Format::date($invoice['invoiceIssueDate']) : __('N/A');
- $output .= ''.Format::date($invoice['invoiceDueDate']).' ';
+ $output .= ''.Format::date($invoice['invoiceDueDate']).' ';
return $output;
});
diff --git a/modules/Finance/invoices_manage_add_blockFeeAjax.php b/modules/Finance/invoices_manage_add_blockFeeAjax.php
deleted file mode 100644
index c3b1be5ea1..0000000000
--- a/modules/Finance/invoices_manage_add_blockFeeAjax.php
+++ /dev/null
@@ -1,39 +0,0 @@
-.
-*/
-
-include '../../gibbon.php';
-
-include './moduleFunctions.php';
-
-$id = $_GET['id'] ?? '';
-$mode = $_GET['mode'] ?? '';
-$feeType = $_GET['feeType'] ?? '';
-$gibbonFinanceFeeID = $_GET['gibbonFinanceFeeID'] ?? '';
-$name = $_GET['name'] ?? '';
-$description = $_GET['description'] ?? '';
-$gibbonFinanceFeeCategoryID = $_GET['gibbonFinanceFeeCategoryID'] ?? '';
-$fee = $_GET['fee'] ?? '';
-$category = null;
-if (isset($_GET['category'])) {
- $category = $_GET['category'] ?? '';
-}
-
-makeFeeBlock($guid, $connection2, $id, $mode, $feeType, $gibbonFinanceFeeID, $name, $description, $gibbonFinanceFeeCategoryID, $fee, $category);
diff --git a/modules/Finance/invoices_manage_edit.php b/modules/Finance/invoices_manage_edit.php
index a7e4001c55..5be9f83779 100644
--- a/modules/Finance/invoices_manage_edit.php
+++ b/modules/Finance/invoices_manage_edit.php
@@ -198,9 +198,9 @@
->required()
->placeholder(__('Value').(!empty($session->get('currency'))? ' ('.$session->get('currency').')' : ''));
- $col = $blockTemplate->addRow()->addClass('showHide fullWidth')->addColumn();
+ $col = $blockTemplate->addRow()->addClass('showHide w-full')->addColumn();
$col->addLabel('description', __('Description'));
- $col->addTextArea('description')->setRows('auto')->setClass('fullWidth floatNone noMargin');
+ $col->addTextArea('description')->setRows('auto')->setClass('w-full floatNone noMargin');
// Custom Blocks for Fees
$row = $form->addRow();
diff --git a/modules/Finance/invoices_view.php b/modules/Finance/invoices_view.php
index dd7a235a13..9bdb285899 100644
--- a/modules/Finance/invoices_view.php
+++ b/modules/Finance/invoices_view.php
@@ -72,7 +72,7 @@
$gibbonPersonID = (isset($_GET['search']))? $_GET['search'] : null;
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
- $form->setClass('noIntBorder fullWidth standardForm');
+ $form->setClass('noIntBorder w-full standardForm');
$form->addHiddenValue('q', '/modules/Finance/invoices_view.php');
$form->addHiddenValue('address', $session->get('address'));
diff --git a/modules/Finance/moduleFunctions.php b/modules/Finance/moduleFunctions.php
index 7aabbe9faa..96431c487e 100644
--- a/modules/Finance/moduleFunctions.php
+++ b/modules/Finance/moduleFunctions.php
@@ -654,123 +654,6 @@ function getNextBudgetCycleID($gibbonFinanceBudgetCycleID, $connection2)
return $output;
}
-//Make the display for a block, according to the input provided, where $i is a unique number appended to the block's field ids.
-//Mode can be add, edit
-function makeFeeBlock($guid, $connection2, $i, $mode, $feeType, $gibbonFinanceFeeID, $name = '', $description = '', $gibbonFinanceFeeCategoryID = '', $fee = '', $category = '', $outerBlock = true)
-{
- global $session;
-
- if ($outerBlock) {
- echo "";
- }
- ?>
-
-
- ';
- }
-}
-
function invoiceContents($guid, $connection2, $gibbonFinanceInvoiceID, $gibbonSchoolYearID, $currency = '', $email = false, $preview = false)
{
global $session, $container;
diff --git a/modules/Finance/src/Forms/FinanceFormFactory.php b/modules/Finance/src/Forms/FinanceFormFactory.php
index 33c84d8169..2c18cc98a7 100644
--- a/modules/Finance/src/Forms/FinanceFormFactory.php
+++ b/modules/Finance/src/Forms/FinanceFormFactory.php
@@ -250,7 +250,7 @@ public function createSelectMonth($name)
public function createInvoiceEmailCheckboxes($checkboxName, $hiddenValueName, $values, $session)
{
- $table = $this->createTable()->setClass('fullWidth');
+ $table = $this->createTable()->setClass('w-full');
// Company Emails
if ($values['invoiceTo'] == 'Company') {
@@ -301,7 +301,7 @@ public function createInvoiceEmailCheckboxes($checkboxName, $hiddenValueName, $v
$row->onlyIf(empty($person['email']))
->addContent(__('No email address.'))
->addClass('right')
- ->wrap('
', ' ');
+ ->wrap('
', ' ');
}
}
}
diff --git a/modules/Form Groups/formGroups_details.php b/modules/Form Groups/formGroups_details.php
index 8afd1bb6ef..9a49e93ef5 100644
--- a/modules/Form Groups/formGroups_details.php
+++ b/modules/Form Groups/formGroups_details.php
@@ -144,7 +144,7 @@
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->setTitle(__('Filters'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', "/modules/".$session->get('module')."/formGroups_details.php");
$form->addHiddenValue('gibbonFormGroupID', $gibbonFormGroupID);
diff --git a/modules/Formal Assessment/externalAssessment.php b/modules/Formal Assessment/externalAssessment.php
index 2fc1f26cb5..d89302fb7d 100644
--- a/modules/Formal Assessment/externalAssessment.php
+++ b/modules/Formal Assessment/externalAssessment.php
@@ -46,7 +46,7 @@
$form = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Search'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/Formal Assessment/externalAssessment.php');
diff --git a/modules/Formal Assessment/externalAssessment_view.php b/modules/Formal Assessment/externalAssessment_view.php
index e8b8d90885..058da54d9e 100644
--- a/modules/Formal Assessment/externalAssessment_view.php
+++ b/modules/Formal Assessment/externalAssessment_view.php
@@ -73,7 +73,7 @@
$gibbonPersonID = (isset($_GET['search']))? $_GET['search'] : null;
$form = Form::create("filter", $session->get('absoluteURL')."/index.php", "get");
- $form->setClass('noIntBorder fullWidth standardForm');
+ $form->setClass('noIntBorder w-full standardForm');
$form->addHiddenValue('q', '/modules/Formal Assessment/externalAssessment_view.php');
$form->addHiddenValue('address', $session->get('address'));
diff --git a/modules/Formal Assessment/internalAssessment_view.php b/modules/Formal Assessment/internalAssessment_view.php
index e282eb1b7b..5651a8c1bd 100644
--- a/modules/Formal Assessment/internalAssessment_view.php
+++ b/modules/Formal Assessment/internalAssessment_view.php
@@ -48,9 +48,9 @@
echo __('Choose A Student');
echo '';
- $form = Form::create("filter", $session->get('absoluteURL')."/index.php", "get", "noIntBorder fullWidth standardForm");
+ $form = Form::create("filter", $session->get('absoluteURL')."/index.php", "get", "noIntBorder w-full standardForm");
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/Formal Assessment/internalAssessment_view.php');
$form->addHiddenValue('address', $session->get('address'));
@@ -118,7 +118,7 @@
echo '';
$form = Form::create("filter", $session->get('absoluteURL')."/index.php", "get");
- $form->setClass('noIntBorder fullWidth standardForm');
+ $form->setClass('noIntBorder w-full standardForm');
$form->addHiddenValue('q', '/modules/Formal Assessment/internalAssessment_view.php');
$form->addHiddenValue('address', $session->get('address'));
diff --git a/modules/Formal Assessment/internalAssessment_write_data.php b/modules/Formal Assessment/internalAssessment_write_data.php
index a56bf7d465..d8f73ee01d 100644
--- a/modules/Formal Assessment/internalAssessment_write_data.php
+++ b/modules/Formal Assessment/internalAssessment_write_data.php
@@ -132,7 +132,7 @@
$form->addRow()->addHeading('Students', __('Students'));
$form->addRow()->addAlert(__('There are no records to display.'), 'error');
} else {
- $table = $form->addRow()->addTable()->setClass('smallIntBorder fullWidth colorOddEven noMargin noPadding noBorder');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder w-full colorOddEven noMargin noPadding noBorder');
$completeText = !empty($values['completeDate'])? __('Marked on').' '.Format::date($values['completeDate']) : __('Unmarked');
$detailsText = $values['type'];
@@ -144,8 +144,8 @@
$header->addTableCell(__('Student'))->rowSpan(2);
$header->addTableCell($values['name'])
->setTitle($values['description'])
- ->append('
'.$completeText.' ')
- ->append('
'.$detailsText.' ')
+ ->append('
'.$completeText.' ')
+ ->append('
'.$detailsText.' ')
->setClass('textCenter')
->colSpan(3);
diff --git a/modules/Formal Assessment/moduleFunctions.php b/modules/Formal Assessment/moduleFunctions.php
index 9b2429fea3..a6319fb8ee 100644
--- a/modules/Formal Assessment/moduleFunctions.php
+++ b/modules/Formal Assessment/moduleFunctions.php
@@ -248,18 +248,21 @@ function sidebarExtra($guid, $connection2, $gibbonCourseClassID, $mode = 'manage
}
}
- $form = Form::create('classSelect', $session->get('absoluteURL').'/index.php', 'get');
+ $form = Form::createBlank('classSelect', $session->get('absoluteURL').'/index.php', 'get')->enableQuickSubmit();
$form->addHiddenValue('q', '/modules/Formal Assessment/internalAssessment_'.$mode.'.php');
$form->setTitle(__('Select Class'));
- $form->setClass('smallIntBorder w-full');
- $row = $form->addRow();
+ $row = $form->addRow()->addClass('flex');
$row->addSelect('gibbonCourseClassID')
->fromArray($classes)
->selected($gibbonCourseClassID)
->placeholder()
+ ->groupAlign('left')
->setClass('float-none w-full');
- $row->addSubmit(__('Go'));
+ $row->addSubmit(__('Go'))
+ ->setType('quickSubmit')
+ ->groupAlign('right')
+ ->setClass('flex');
$output .= $form->getOutput();
diff --git a/modules/Individual Needs/iep_view_myChildren.php b/modules/Individual Needs/iep_view_myChildren.php
index 5a7230a909..4112b79946 100644
--- a/modules/Individual Needs/iep_view_myChildren.php
+++ b/modules/Individual Needs/iep_view_myChildren.php
@@ -70,7 +70,7 @@
echo '';
$form = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get');
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/iep_view_myChildren.php');
$form->addHiddenValue('address', $session->get('address'));
@@ -115,7 +115,7 @@
echo '';
$row = $result->fetch(); ?>
-
+
diff --git a/modules/Individual Needs/in_edit.php b/modules/Individual Needs/in_edit.php
index 8289f2aff8..0b2a1781e8 100644
--- a/modules/Individual Needs/in_edit.php
+++ b/modules/Individual Needs/in_edit.php
@@ -122,8 +122,7 @@
return $item['archiveTitle'].' ('.Format::date(substr($item['archiveTimestamp'], 0, 10)).')';
}, $archivedIEPs);
- $form = Form::create('action', $session->get('absoluteURL').'/index.php?q=/modules/'.$session->get('module')."/in_edit.php&gibbonPersonID=$gibbonPersonID&search=$search&source=$source&gibbonINDescriptorID=$gibbonINDescriptorID&gibbonAlertLevelID=$gibbonAlertLevelID&gibbonFormGroupID=$gibbonFormGroupID&gibbonYearGroupID=$gibbonYearGroupID");
- $form->setClass('blank fullWidth');
+ $form = Form::createBlank('action', $session->get('absoluteURL').'/index.php?q=/modules/'.$session->get('module')."/in_edit.php&gibbonPersonID=$gibbonPersonID&search=$search&source=$source&gibbonINDescriptorID=$gibbonINDescriptorID&gibbonAlertLevelID=$gibbonAlertLevelID&gibbonFormGroupID=$gibbonFormGroupID&gibbonYearGroupID=$gibbonYearGroupID");
$form->addHiddenValue('address', $session->get('address'));
$col = $form->addRow()->addColumn()->addClass('flex justify-end items-center');
@@ -148,10 +147,9 @@
echo $table->render([$student]);
- $form = Form::create('individualNeeds', $session->get('absoluteURL').'/modules/'.$session->get('module')."/in_editProcess.php?gibbonPersonID=$gibbonPersonID&search=$search&source=$source&gibbonINDescriptorID=$gibbonINDescriptorID&gibbonAlertLevelID=$gibbonAlertLevelID&gibbonFormGroupID=$gibbonFormGroupID&gibbonYearGroupID=$gibbonYearGroupID");
+ $form = Form::createBlank('individualNeeds', $session->get('absoluteURL').'/modules/'.$session->get('module')."/in_editProcess.php?gibbonPersonID=$gibbonPersonID&search=$search&source=$source&gibbonINDescriptorID=$gibbonINDescriptorID&gibbonAlertLevelID=$gibbonAlertLevelID&gibbonFormGroupID=$gibbonFormGroupID&gibbonYearGroupID=$gibbonYearGroupID");
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('w-full blank');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('gibbonPersonID', $gibbonPersonID);
@@ -173,7 +171,7 @@
$form->addRow()->addSubheading(__('Educational Assistants'))->setClass('mt-4 mb-2');
if (!empty($educationalAssistants)) {
- $table = $form->addRow()->addTable()->addClass('smallIntBorder fullWidth colorOddEven');
+ $table = $form->addRow()->addTable()->addClass('smallIntBorder w-full colorOddEven');
$header = $table->addHeaderRow();
$header->addContent(__('Name'));
$header->addContent(__('Comment'));
@@ -204,7 +202,7 @@
if (empty($gibbonINArchiveID) && $highestAction == 'Individual Needs Records_viewEdit') {
$form->addRow()->addSubheading(__('Add New Assistants'))->setClass('mt-4 mb-2');
- $table = $form->addRow()->addTable()->setClass('smallIntBorder fullWidth');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder w-full');
$row = $table->addRow();
$row->addLabel('staff', __('Staff'))->addClass('w-1/2');
@@ -218,7 +216,7 @@
// DISPLAY AND EDIT IEP
- $table = $form->addRow()->addTable()->setClass('smallIntBorder fullWidth mt-2');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder w-full mt-2');
$table->addRow()->addHeading('Individual Education Plan', __('Individual Education Plan'))->setClass('mt-4 mb-2');
@@ -276,7 +274,7 @@
}
if (empty($gibbonINArchiveID) && ($highestAction == 'Individual Needs Records_viewEdit' || $highestAction == 'Individual Needs Records_viewContribute')) {
- $form->addRow()->addTable()->setClass('smallIntBorder fullWidth mt-2')->addRow()->addSubmit();
+ $form->addRow()->addTable()->setClass('smallIntBorder w-full mt-2')->addRow()->addSubmit();
}
echo $form->getOutput();
diff --git a/modules/Individual Needs/in_summary.php b/modules/Individual Needs/in_summary.php
index 0ac3ac9d09..5f35067eb7 100644
--- a/modules/Individual Needs/in_summary.php
+++ b/modules/Individual Needs/in_summary.php
@@ -56,7 +56,7 @@
echo '';
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->addHiddenValue('q', '/modules/Individual Needs/in_summary.php');
diff --git a/modules/Individual Needs/in_view.php b/modules/Individual Needs/in_view.php
index 5525011037..733acbb733 100644
--- a/modules/Individual Needs/in_view.php
+++ b/modules/Individual Needs/in_view.php
@@ -53,7 +53,7 @@
echo '';
$form = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get');
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/in_view.php');
diff --git a/modules/Individual Needs/investigations_manage.php b/modules/Individual Needs/investigations_manage.php
index 88d579a4e1..907b45e5e6 100644
--- a/modules/Individual Needs/investigations_manage.php
+++ b/modules/Individual Needs/investigations_manage.php
@@ -46,7 +46,7 @@
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->addHiddenValue('q', "/modules/Individual Needs/investigations_manage.php");
diff --git a/modules/Individual Needs/investigations_manage_add.php b/modules/Individual Needs/investigations_manage_add.php
index cbc1a76a2c..590e01e31b 100644
--- a/modules/Individual Needs/investigations_manage_add.php
+++ b/modules/Individual Needs/investigations_manage_add.php
@@ -83,13 +83,13 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('reason', __('Reason'))->description(__('Why should this student\'s individual needs be investigated?'));
- $column->addTextArea('reason')->setRows(5)->setClass('fullWidth')->required();
+ $column->addTextArea('reason')->setRows(5)->setClass('w-full')->required();
//Strategies Tried
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('strategiesTried', __('Strategies Tried'));
- $column->addTextArea('strategiesTried')->setRows(5)->setClass('fullWidth');
+ $column->addTextArea('strategiesTried')->setRows(5)->setClass('w-full');
//Parents Informed?
$row = $form->addRow();
@@ -103,12 +103,12 @@
$row = $form->addRow()->addClass('parentsInformedYes');
$column = $row->addColumn();
$column->addLabel('parentsResponseYes', __('Parent Response'));
- $column->addTextArea('parentsResponseYes')->setName('parentsResponse')->setRows(5)->setClass('fullWidth');
+ $column->addTextArea('parentsResponseYes')->setName('parentsResponse')->setRows(5)->setClass('w-full');
$row = $form->addRow()->addClass('parentsInformedNo');
$column = $row->addColumn();
$column->addLabel('parentsResponseNo', __('Reason'))->description(__('Reasons why parents are not aware of the situation.'));
- $column->addTextArea('parentsResponseNo')->setName('parentsResponse')->setRows(5)->setClass('fullWidth')->required();
+ $column->addTextArea('parentsResponseNo')->setName('parentsResponse')->setRows(5)->setClass('w-full')->required();
$form->addRow()->addAlert(__("Submitting this referral will notify the student's form tutor for further investigation."), 'message');
diff --git a/modules/Individual Needs/investigations_manage_edit.php b/modules/Individual Needs/investigations_manage_edit.php
index 64ebf7695f..38730affc4 100644
--- a/modules/Individual Needs/investigations_manage_edit.php
+++ b/modules/Individual Needs/investigations_manage_edit.php
@@ -109,13 +109,13 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('reason', __('Reason'))->description(__('Why should this student\'s individual needs be investigated?'));;
- $column->addTextArea('reason')->setRows(5)->setClass('fullWidth')->required()->readonly(!$canEdit || $investigation['status'] != 'Referral');
+ $column->addTextArea('reason')->setRows(5)->setClass('w-full')->required()->readonly(!$canEdit || $investigation['status'] != 'Referral');
//Strategies Tried
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('strategiesTried', __('Strategies Tried'));
- $column->addTextArea('strategiesTried')->setRows(5)->setClass('fullWidth')->readonly(!$canEdit || $investigation['status'] != 'Referral');
+ $column->addTextArea('strategiesTried')->setRows(5)->setClass('w-full')->readonly(!$canEdit || $investigation['status'] != 'Referral');
//Parents Informed?
$row = $form->addRow();
@@ -129,12 +129,12 @@
$row = $form->addRow()->addClass('parentsInformedYes');
$column = $row->addColumn();
$column->addLabel('parentsResponseYes', __('Parent Response'));
- $column->addTextArea('parentsResponseYes')->setName('parentsResponse')->setRows(5)->setClass('fullWidth')->readonly(!$canEdit || $investigation['status'] != 'Referral');
+ $column->addTextArea('parentsResponseYes')->setName('parentsResponse')->setRows(5)->setClass('w-full')->readonly(!$canEdit || $investigation['status'] != 'Referral');
$row = $form->addRow()->addClass('parentsInformedNo');
$column = $row->addColumn();
$column->addLabel('parentsResponseNo', __('Reason'))->description(__('Reasons why parents are not aware of the situation.'));
- $column->addTextArea('parentsResponseNo')->setName('parentsResponse')->setRows(5)->setClass('fullWidth')->readonly(!$canEdit || $investigation['status'] != 'Referral')->required();
+ $column->addTextArea('parentsResponseNo')->setName('parentsResponse')->setRows(5)->setClass('w-full')->readonly(!$canEdit || $investigation['status'] != 'Referral')->required();
//Form Tutor Resolution
if ($investigation['status'] == 'Resolved' || ($investigation['status'] == 'Referral' && $isTutor)) {
@@ -153,7 +153,7 @@
$row = $form->addRow()->addClass('resolutionDetails');
$column = $row->addColumn();
$column->addLabel('resolutionDetails', __('Resolution Details'));
- $column->addTextArea('resolutionDetails')->setRows(5)->setClass('fullWidth')->readonly(!$isTutor || $investigation['status'] != 'Referral');
+ $column->addTextArea('resolutionDetails')->setRows(5)->setClass('w-full')->readonly(!$isTutor || $investigation['status'] != 'Referral');
//Not resolvable by tutor
$resultClass = $investigationGateway->queryTeachersByInvestigation($investigation['gibbonSchoolYearID'], $investigation['gibbonPersonIDStudent']);
diff --git a/modules/Individual Needs/investigations_submit_detail.php b/modules/Individual Needs/investigations_submit_detail.php
index 55370f0ae3..dc32afb894 100644
--- a/modules/Individual Needs/investigations_submit_detail.php
+++ b/modules/Individual Needs/investigations_submit_detail.php
@@ -78,13 +78,13 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('reason', __('Reason'))->description(__('Why should this student\'s individual needs be investigated?'));;
- $column->addTextArea('reason')->setRows(5)->setClass('fullWidth')->required()->readonly();
+ $column->addTextArea('reason')->setRows(5)->setClass('w-full')->required()->readonly();
//Strategies Tried
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('strategiesTried', __('Strategies Tried'));
- $column->addTextArea('strategiesTried')->setRows(5)->setClass('fullWidth')->readonly();
+ $column->addTextArea('strategiesTried')->setRows(5)->setClass('w-full')->readonly();
//Parents Informed?
$row = $form->addRow();
@@ -98,12 +98,12 @@
$row = $form->addRow()->addClass('parentsInformedYes');
$column = $row->addColumn();
$column->addLabel('parentsResponseYes', __('Parent Response'));
- $column->addTextArea('parentsResponseYes')->setName('parentsResponse')->setRows(5)->setClass('fullWidth')->readonly();
+ $column->addTextArea('parentsResponseYes')->setName('parentsResponse')->setRows(5)->setClass('w-full')->readonly();
$row = $form->addRow()->addClass('parentsInformedNo');
$column = $row->addColumn();
$column->addLabel('parentsResponseNo', __('Reason'))->description(__('Reasons why parents are not aware of the situation.'));
- $column->addTextArea('parentsResponseNo')->setName('parentsResponse')->setRows(5)->setClass('fullWidth')->readonly()->required();
+ $column->addTextArea('parentsResponseNo')->setName('parentsResponse')->setRows(5)->setClass('w-full')->readonly()->required();
$form->addRow()->addHeading('Contributor Input', __('Contributor Input'));
@@ -178,7 +178,7 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('comment', __('Comment'));
- $column->addTextArea('comment')->setRows(5)->setClass('fullWidth');
+ $column->addTextArea('comment')->setRows(5)->setClass('w-full');
$row = $form->addRow();
$row->addFooter();
diff --git a/modules/Library/library_browse.php b/modules/Library/library_browse.php
index b59780dcfd..51bd4a0c47 100644
--- a/modules/Library/library_browse.php
+++ b/modules/Library/library_browse.php
@@ -73,15 +73,15 @@
}, array());
- $form = Form::create('searchForm', $session->get('absoluteURL') . '/index.php', 'get');
+ $form = Form::createBlank('searchForm', $session->get('absoluteURL') . '/index.php', 'get');
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('fullWidth blank border-transparent mb-6');
+ $form->setClass('mb-6');
$form->addHiddenValue('q', '/modules/Library/library_browse.php');
$row = $form->addRow()->addLabel('Browse the Library', __('Browse the Library'))->addClass('text-2xl pb-2');
$row = $form->addRow()->addClass('grid sm:grid-cols-3 md:grid-cols-5 lg:grid-cols-7 gap-4');
- $row->addTextField('everything')->setClass('fullWidth sm:col-span-2 md:col-span-4 lg:col-span-6')->setValue($everything)->placeholder('Search for a Book!');
+ $row->addTextField('everything')->setClass('w-full sm:col-span-2 md:col-span-4 lg:col-span-6')->setValue($everything)->placeholder('Search for a Book!');
$row->addSearchSubmit($session, __('Clear Search'))->addClass('sm:col-start-3 md:col-start-5 lg:col-start-7');
$row = $form->addRow();
@@ -90,23 +90,23 @@
$col = $row->addColumn()->setClass('quarterWidth');
$col->addLabel('name', __('Title'));
$col->setClass('');
- $col->addTextField('name')->setClass('fullWidth')->setValue($name);
+ $col->addTextField('name')->setClass('w-full')->setValue($name);
$col = $row->addColumn()->setClass('quarterWidth');
$col->addLabel('producer', __('Author/Producer'));
- $col->addTextField('producer')->setClass('fullWidth')->setValue($producer);
+ $col->addTextField('producer')->setClass('w-full')->setValue($producer);
$form->toggleVisibilityByClass('allLocations')->onCheckbox('locationToggle')->when('on');
$col = $row->addColumn()->setClass('allLocations quarterWidth');
$col->addLabel('location', __('Location'));
- $col->addSelectSpace('location')->setClass('fullWidth')->setValue($location)->placeHolder()->selected($location);
+ $col->addSelectSpace('location')->setClass('w-full')->setValue($location)->placeHolder()->selected($location);
$col = $row->addColumn()->setClass('quarterWidth');
$col->addLabel('type', __('Type'));
$col->addSelect('type')
->fromArray($types)
- ->setClass('fullWidth')
+ ->setClass('w-full')
->selected($type)
->placeholder();
@@ -115,14 +115,14 @@
$col->addSelect('collection')
->fromArray($collections)
->chainedTo('type', $collectionsChained)
- ->setClass('fullWidth')
+ ->setClass('w-full')
->selected($collection)
->placeholder();
- $col = $row->addColumn()->setClass('fullWidth');
+ $col = $row->addColumn()->setClass('w-full');
$col->addLabel('readerAge', __('Readers Age'));
$ageArray=range(2,21);
- $col->addSelect('readerAge')->fromArray($ageArray)->setClass('fullWidth')->selected($readerAge)->placeholder();
+ $col->addSelect('readerAge')->fromArray($ageArray)->setClass('w-full')->selected($readerAge)->placeholder();
$locationToggle = 'on';
$col = $row->addColumn()->setClass('quarterWidth');
@@ -222,4 +222,4 @@
]);
}
-}
\ No newline at end of file
+}
diff --git a/modules/Library/library_lending.php b/modules/Library/library_lending.php
index 7e466d4c53..74abcae074 100644
--- a/modules/Library/library_lending.php
+++ b/modules/Library/library_lending.php
@@ -45,7 +45,7 @@
$form = Form::create('action', $session->get('absoluteURL').'/index.php?q=/modules/'.$session->get('module').'/library_lending.php');
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', "/modules/".$session->get('module')."/library_lending.php");
diff --git a/modules/Library/library_manage_catalog.php b/modules/Library/library_manage_catalog.php
index ffe11e89a3..d358941831 100644
--- a/modules/Library/library_manage_catalog.php
+++ b/modules/Library/library_manage_catalog.php
@@ -48,7 +48,7 @@
$form = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get');
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->setTitle(__('Search & Filter'));
$form->addHiddenValue('q', "/modules/".$session->get('module')."/library_manage_catalog.php");
@@ -65,11 +65,11 @@
->selected($gibbonLibraryTypeID)
->placeholder();
- $row = $form->addRow()->addClass('advancedOptions hidden');
+ $row = $form->addRow()->advancedOptions();
$row->addLabel('gibbonSpaceID', __('Location'));
$row->addSelectSpace('gibbonSpaceID')->selected($gibbonSpaceID)->placeholder();
- $row = $form->addRow()->addClass('advancedOptions hidden');
+ $row = $form->addRow()->advancedOptions();
$row->addLabel('locationDetail', __('Location Detail'));
$row->addTextField('locationDetail')->setValue($locationDetail)->placeholder();
@@ -83,27 +83,27 @@
'Repair' => __('Repair'),
'Reserved' => __('Reserved')
);
- $row = $form->addRow()->addClass('advancedOptions hidden');
+ $row = $form->addRow()->advancedOptions();
$row->addLabel('status', __('Status'));
$row->addSelect('status')->fromArray($statuses)->selected($status)->placeholder();
- $row = $form->addRow()->addClass('advancedOptions hidden');
+ $row = $form->addRow()->advancedOptions();
$row->addLabel('gibbonPersonIDOwnership', __('Owner/User'));
$row->addSelectUsers('gibbonPersonIDOwnership')->selected($gibbonPersonIDOwnership)->placeholder();
- $row = $form->addRow()->addClass('advancedOptions hidden');
+ $row = $form->addRow()->advancedOptions();
$row->addLabel('typeSpecificFields', __('Type-Specific Fields'))
->description(__('For example, a computer\'s MAC address or a book\'s ISBN.'));
$row->addScanner('typeSpecificFields')
->setValue($typeSpecificFields);
- $row = $form->addRow()->addClass(empty($parentID) ? 'advancedOptions hidden' : 'advancedOptions');
+ $row = $form->addRow()->advancedOptions();
$row->addLabel('parentID', __('Copies Of'));
$row->addTextField('parentID')->setValue($parentID);
- $col = $form->addRow()->setClass('advancedOptions hidden')->addColumn();
+ $col = $form->addRow()->advancedOptions()->addColumn();
$col->addLabel('everything', __('All Fields'));
- $col->addTextField('everything')->setClass('fullWidth')->setValue($everything);
+ $col->addTextField('everything')->setClass('w-full')->setValue($everything);
$row = $form->addRow();
$row->addAdvancedOptionsToggle();
@@ -139,8 +139,7 @@
->addParam('status', $status)
->addParam('gibbonPersonIDOwnership', $gibbonPersonIDOwnership)
->addParam('typeSpecificFields', $typeSpecificFields)
- ->displayLabel()
- ->prepend(' | ');
+ ->displayLabel();
$table->addColumn('id', __('School ID'))
->description(__('Type'))
diff --git a/modules/Library/library_manage_catalog_fields_ajax.php b/modules/Library/library_manage_catalog_fields_ajax.php
index 4d289582f0..a27a318ac9 100644
--- a/modules/Library/library_manage_catalog_fields_ajax.php
+++ b/modules/Library/library_manage_catalog_fields_ajax.php
@@ -41,7 +41,7 @@
$result = $pdo->executeQuery($data, $sql);
$factory = FormFactory::create();
- $table = $factory->createTable('detailsTable')->setClass('fullWidth');
+ $table = $factory->createTable('detailsTable')->setClass('w-full');
if ($result->rowCount() != 1) {
$table->addRow()->addAlert(__('The specified record cannot be found.'), 'error');
diff --git a/modules/Library/library_manage_shelves.php b/modules/Library/library_manage_shelves.php
index c60e7d505a..1abfb09c02 100644
--- a/modules/Library/library_manage_shelves.php
+++ b/modules/Library/library_manage_shelves.php
@@ -37,7 +37,7 @@
$page->breadcrumbs->add(__('Manage Library Shelves'));
$form = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get');
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->setTitle(__('Search & Filter'));
$form->addHiddenValue('q', "/modules/".$session->get('module')."/library_manage_shelves.php");
diff --git a/modules/Library/library_shelves_editOrderAjax.php b/modules/Library/library_shelves_editOrderAjax.php
index 97b80b3cd5..c078a3e600 100644
--- a/modules/Library/library_shelves_editOrderAjax.php
+++ b/modules/Library/library_shelves_editOrderAjax.php
@@ -30,7 +30,7 @@
} else {
// Proceed!
$data = $_POST['data'] ?? [];
- $order = json_decode($_POST['order']);
+ $order = $_POST['order'];
if (empty($order)) {
exit;
diff --git a/modules/Library/report_catalogSummary.php b/modules/Library/report_catalogSummary.php
index 83bee31fb6..89c8d812b6 100644
--- a/modules/Library/report_catalogSummary.php
+++ b/modules/Library/report_catalogSummary.php
@@ -48,7 +48,7 @@
$form->setTitle(__('Search & Filter'));
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', "/modules/".$session->get('module')."/report_catalogSummary.php");
diff --git a/modules/Library/report_studentBorrowingRecord.php b/modules/Library/report_studentBorrowingRecord.php
index b081931611..a52574dbba 100644
--- a/modules/Library/report_studentBorrowingRecord.php
+++ b/modules/Library/report_studentBorrowingRecord.php
@@ -49,7 +49,7 @@
$form = Form::create('action', $session->get('absoluteURL').'/index.php', 'get');
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', "/modules/".$session->get('module')."/report_studentBorrowingRecord.php");
diff --git a/modules/Library/report_viewOverdueItems.php b/modules/Library/report_viewOverdueItems.php
index 58bfed340b..053a5ce122 100644
--- a/modules/Library/report_viewOverdueItems.php
+++ b/modules/Library/report_viewOverdueItems.php
@@ -46,7 +46,7 @@
$form = Form::create('action', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', "/modules/".$session->get('module')."/report_viewOverdueItems.php");
diff --git a/modules/Markbook/css/module.css b/modules/Markbook/css/module.css
index 65b49d8b2e..b3a60044c5 100644
--- a/modules/Markbook/css/module.css
+++ b/modules/Markbook/css/module.css
@@ -268,6 +268,7 @@ select[id$="effortValue"] {
border-right: 1px solid #666;
margin:0;
z-index: 1;
+ text-align: left;
}
.doublescroll-container td {
diff --git a/modules/Markbook/markbook_edit.php b/modules/Markbook/markbook_edit.php
index 37e72527b8..aecb0563c3 100644
--- a/modules/Markbook/markbook_edit.php
+++ b/modules/Markbook/markbook_edit.php
@@ -236,7 +236,7 @@
$form = Form::create('searchForm', $session->get('absoluteURL').'/index.php?q=/modules/Markbook/markbook_edit_copy.php&gibbonCourseClassID='.$gibbonCourseClassID);
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/applicationForm_manage.php');
diff --git a/modules/Markbook/markbook_edit_copy.php b/modules/Markbook/markbook_edit_copy.php
index 4b2017d1a5..e4b957615c 100644
--- a/modules/Markbook/markbook_edit_copy.php
+++ b/modules/Markbook/markbook_edit_copy.php
@@ -111,11 +111,11 @@
echo '';
$form = Form::create('action', $session->get('absoluteURL').'/modules/Markbook/markbook_edit_copyProcess.php?gibbonCourseClassID='.$gibbonCourseClassID.'&gibbonMarkbookCopyClassID='.$gibbonMarkbookCopyClassID);
- $form->setClass('fullWidth');
+ $form->setClass('w-full');
$form->addHiddenValue('address', $session->get('address'));
- $table = $form->addRow()->addTable()->setClass('fullWidth colorOddEven noMargin noPadding noBorder');
+ $table = $form->addRow()->addTable()->setClass('w-full colorOddEven noMargin noPadding noBorder');
$header = $table->addHeaderRow();
$header->addCheckAll()->checked(true);
diff --git a/modules/Markbook/markbook_edit_data.php b/modules/Markbook/markbook_edit_data.php
index e1fcffcab5..fb4ffa0741 100644
--- a/modules/Markbook/markbook_edit_data.php
+++ b/modules/Markbook/markbook_edit_data.php
@@ -355,7 +355,7 @@ function enterKey(){
->addParam('width', '1100')
->addParam('height', '550');
- $table = $form->addRow()->addTable()->setClass('smallIntBorder fullWidth colorOddEven noMargin noPadding noBorder');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder w-full colorOddEven noMargin noPadding noBorder');
$detailsText = ($values['unitName'] != '')? $values['unitName'].' ' : '';
$detailsText .= !empty($values['completeDate'])? __('Marked on').' '.Format::date($values['completeDate']) : __('Unmarked');
@@ -378,7 +378,7 @@ function enterKey(){
$header->addTableCell($values['name'])
->setTitle($values['description'])
- ->append(''.$detailsText.' ')
+ ->append(''.$detailsText.' ')
->setClass('textCenter')
->colSpan(5);
diff --git a/modules/Markbook/markbook_edit_targets.php b/modules/Markbook/markbook_edit_targets.php
index 95d7613a8e..7bb01e4120 100644
--- a/modules/Markbook/markbook_edit_targets.php
+++ b/modules/Markbook/markbook_edit_targets.php
@@ -90,7 +90,7 @@
$row->addLabel('gibbonScaleIDTarget', __('Target Scale'));
$row->addSelectGradeScale('gibbonScaleIDTarget')->selected($selectedGradeScale);
- $table = $form->addRow()->addTable()->setClass('smallIntBorder fullWidth colorOddEven noMargin noPadding');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder w-full colorOddEven noMargin noPadding');
$header = $table->addHeaderRow();
$header->addContent(__('Student'));
diff --git a/modules/Markbook/markbook_view_allClassesAllData.php b/modules/Markbook/markbook_view_allClassesAllData.php
index 533a174f98..03ff7ffc3a 100644
--- a/modules/Markbook/markbook_view_allClassesAllData.php
+++ b/modules/Markbook/markbook_view_allClassesAllData.php
@@ -26,6 +26,8 @@
use Gibbon\Domain\System\SettingGateway;
use Gibbon\Module\Markbook\MarkbookView;
use Gibbon\Services\Format;
+use Gibbon\Tables\DataTable;
+use Gibbon\Forms\Form;
// Lock the file so other scripts cannot call it
if (MARKBOOK_VIEW_LOCK !== sha1( $highestAction . $session->get('gibbonPersonID') ) . date('zWy') ) return;
@@ -124,17 +126,6 @@
'courseClass' => Format::courseClassName($class['course'], $class['class']),
]));
- //Add multiple columns
- if ($multiAdd) {
- $params = [
- "gibbonCourseClassID" => $gibbonCourseClassID
- ];
- $page->navigator->addHeaderAction('addMulti', __('Add Multiple Columns'))
- ->setURL('/modules/Markbook/markbook_edit_addMulti.php')
- ->addParams($params)
- ->setIcon('page_new_multi')
- ->displayLabel();
- }
//Get class chooser
echo classChooser($guid, $pdo, $gibbonCourseClassID);
@@ -181,22 +172,100 @@
// Load the columns for the current page
$markbook->loadColumnsFromDataSet($columns);
- if ($markbook == NULL || $markbook->getColumnCountTotal() < 1) {
- echo "';
- echo "";
- echo __('There are no records to display.');
- echo '
';
+ // Display Pagination
+ echo "";
+
+ // Print table header info
+ echo '
';
+ if (!empty($teacherList)) {
+ echo ''.sprintf(__('Class taught by %1$s'), implode(', ', $teacherList) ).' . ';
+ }
+ if ($markbook->getColumnCountTotal() > $markbook->getColumnsPerPage()) {
+ echo __('To see more detail on an item (such as a comment or a grade), hover your mouse over it. To see more columns, use the Newer and Older links.');
+ } else {
+ echo __('To see more detail on an item (such as a comment or a grade), hover your mouse over it.');
+ }
+
+ if ($markbook->hasExternalAssessments() == true) {
+ echo ' '.__('The Baseline column is populated based on student performance in external assessments, and can be used as a reference point for the grades in the markbook.');
+ }
+ echo '
';
+
+ // Display the Top Links
+ if (isActionAccessible($guid, $connection2, '/modules/Markbook/markbook_edit.php') and $canEditThisClass) {
+ echo '';
+ echo '
+ '.__('Are you sure you want to reset the ordering of all the columns in this class?').'
+ '.__('Reset by entry order').'
+ '.__('Reset by date').'
+
';
+
+ $form = Form::create('links', '');
+
+ $form->addHeaderAction('add', __('Add'))
+ ->setURL('/modules/Markbook/markbook_edit_add.php')
+ ->addParam('gibbonCourseClassID', $gibbonCourseClassID)
+ ->displayLabel();
+
+ if ($multiAdd) {
+ $form->addHeaderAction('addMulti', __('Add Multiple'))
+ ->setURL('/modules/Markbook/markbook_edit_addMulti.php')
+ ->addParam('gibbonCourseClassID', $gibbonCourseClassID)
+ ->setIcon('page_new_multi')
+ ->displayLabel();
+ }
+
+ $form->addHeaderAction('target', __('Targets'))
+ ->setURL('/modules/Markbook/markbook_edit_targets.php')
+ ->addParam('gibbonCourseClassID', $gibbonCourseClassID)
+ ->displayLabel();
+
+ if ($markbook->getSetting('enableColumnWeighting') == 'Y' && isActionAccessible($guid, $connection2, '/modules/Markbook/weighting_manage.php') == true) {
+ $form->addHeaderAction('config', __('Weightings'))
+ ->setURL('/modules/Markbook/weighting_manage.php')
+ ->addParam('gibbonCourseClassID', $gibbonCourseClassID)
+ ->displayLabel();
+ }
+
+ if ($markbook->getColumnCountTotal() > $markbook->getColumnsPerPage()) {
+ $form->addHeaderAction('refresh', __('Reset Order'))
+ ->onClick('resetOrder()')
+ ->setURL('#')
+ ->displayLabel();
+ }
+
+ if ($markbook->getColumnCountTotal() > 0) {
+ $form->addHeaderAction('export', __('Export'))
+ ->setURL('/modules/Markbook/markbook_viewExportAll.php')
+ ->addParam('gibbonCourseClassID', $gibbonCourseClassID)
+ ->addParam('return', 'markbook_view.php')
+ ->directLink()
+ ->displayLabel();
+ }
+
+ echo $form->getOutput();
+ }
+ echo '
';
+
+ if ($markbook == NULL || $markbook->getColumnCountTotal() < 1) {
+ echo Format::alert(__('There are no records to display.'), 'empty');
+ return;
} else {
+
+ if (isActionAccessible($guid, $connection2, '/modules/Markbook/markbook_view.php') ) {
+
// Cache all personalized target data
$markbook->cachePersonalizedTargets( $gibbonCourseClassID );
@@ -211,31 +280,7 @@
$markbook->cacheExternalAssessments( $courseName, $gibbonYearGroupIDList );
}
- echo '';
- echo __('Results');
- echo ' ';
-
- // Print table header info
- echo '';
- if (!empty($teacherList)) {
- echo ''.sprintf(__('Class taught by %1$s'), implode(', ', $teacherList) ).' . ';
- }
- if ($markbook->getColumnCountTotal() > $markbook->getColumnsPerPage()) {
- echo __('To see more detail on an item (such as a comment or a grade), hover your mouse over it. To see more columns, use the Newer and Older links.');
- } else {
- echo __('To see more detail on an item (such as a comment or a grade), hover your mouse over it.');
- }
-
- if ($markbook->hasExternalAssessments() == true) {
- echo ' '.__('The Baseline column is populated based on student performance in external assessments, and can be used as a reference point for the grades in the markbook.');
- }
- echo '
';
-
- // Display Pagination
- echo "";
- if (isActionAccessible($guid, $connection2, '/modules/Markbook/markbook_view.php') ) {
-
- echo "
';
-
// Check to see if we have no columns to display. This can happen if the page number is incorrect.
// Do this here so users still have access to buttons.
if ($markbook->getColumnCountThisPage() <= 0) {
- echo "
";
- echo __('There are no records to display.');
- echo '
';
+ echo Format::alert(__('There are no records to display.'), 'empty');
return;
}
@@ -664,7 +673,7 @@ function resetOrderAction(order){
++$count;
echo "
";
- echo '';
+ echo ' ';
if ($studentOrderBy == 'rollOrder' && !empty($rowStudents['rollOrder']) ) {
echo $rowStudents['rollOrder'].') ';
diff --git a/modules/Markbook/markbook_view_myMarks.php b/modules/Markbook/markbook_view_myMarks.php
index c2cf4d2f9d..c03f9dba33 100644
--- a/modules/Markbook/markbook_view_myMarks.php
+++ b/modules/Markbook/markbook_view_myMarks.php
@@ -83,7 +83,7 @@
}
$form = Form::create('filter', $session->get('absoluteURL').'/index.php','get');
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/markbook_view.php');
@@ -128,7 +128,7 @@
$details = isset($_GET['details'])? $_GET['details'] : 'Yes';
$form->addHiddenValue('details', 'No');
$showHide = $form->getFactory()->createCheckbox('details')->addClass('details')->setValue('Yes')->checked($details)->inline(true)
- ->description(__('Show/Hide Details'))->wrap(' ', ' ');
+ ->description(__('Show/Hide Details'))->wrap(' ', ' ');
$rowFilter = $form->addRow();
$rowFilter->addSearchSubmit($session, __('Clear Filters'))->prepend($showHide->getOutput());
diff --git a/modules/Markbook/markbook_view_viewMyChildrensClasses.php b/modules/Markbook/markbook_view_viewMyChildrensClasses.php
index 942bc29303..ed10a5827d 100644
--- a/modules/Markbook/markbook_view_viewMyChildrensClasses.php
+++ b/modules/Markbook/markbook_view_viewMyChildrensClasses.php
@@ -78,7 +78,7 @@
$gibbonPersonID = (isset($_GET['search']))? $_GET['search'] : null;
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
- $form->setClass('noIntBorder fullWidth standardForm');
+ $form->setClass('noIntBorder w-full standardForm');
$form->addHiddenValue('q', '/modules/Markbook/markbook_view.php');
$form->addHiddenValue('address', $session->get('address'));
@@ -152,7 +152,7 @@
}
$form = Form::create('filter', $session->get('absoluteURL').'/index.php','get');
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/markbook_view.php');
$form->addHiddenValue('search', $gibbonPersonID);
@@ -198,7 +198,7 @@
$details = isset($_GET['details'])? $_GET['details'] : 'Yes';
$form->addHiddenValue('details', 'No');
$showHide = $form->getFactory()->createCheckbox('details')->addClass('details')->setValue('Yes')->checked($details)->inline(true)
- ->description(__('Show/Hide Details'))->wrap(' ', ' ');
+ ->description(__('Show/Hide Details'))->wrap(' ', ' ');
$rowFilter = $form->addRow();
$rowFilter->addSearchSubmit($session, __('Clear Filters'), array('search'))->prepend($showHide->getOutput());
diff --git a/modules/Markbook/moduleFunctions.php b/modules/Markbook/moduleFunctions.php
index 9d30cf9079..d0c4c664cf 100644
--- a/modules/Markbook/moduleFunctions.php
+++ b/modules/Markbook/moduleFunctions.php
@@ -40,17 +40,20 @@ function sidebarExtra($guid, $pdo, $gibbonPersonID, $gibbonCourseClassID = '', $
$output .= __('Choose A Class');
$output .= '';
- $form = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get');
+ $form = Form::createBlank('searchForm', $session->get('absoluteURL').'/index.php', 'get')->enableQuickSubmit();
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->addHiddenValue('q', '/modules/Markbook/'.$basePage);
- $form->setClass('smallIntBorder w-full');
- $row = $form->addRow();
+ $row = $form->addRow()->addClass('flex');
$row->addSelectClass('gibbonCourseClassID', $session->get('gibbonSchoolYearID'), $gibbonPersonID)
->selected($gibbonCourseClassID)
->placeholder()
- ->setClass('fullWidth');
- $row->addSubmit(__('Go'));
+ ->groupAlign('left')
+ ->setClass('flex-grow');
+ $row->addSubmit(__('Go'))
+ ->setType('quickSubmit')
+ ->groupAlign('right')
+ ->setClass('flex');
$output .= $form->getOutput();
$output .= '';
@@ -69,22 +72,22 @@ function classChooser($guid, $pdo, $gibbonCourseClassID)
$output = '';
- $output .= "";
- $output .= __('Choose Class');
- $output .= ' ';
+ // $output .= "";
+ // $output .= __('Choose Class');
+ // $output .= ' ';
- $form = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get');
+ $form = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get')->enableQuickSubmit();
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/markbook_view.php');
- $col = $form->addRow()->addColumn()->addClass('inline right');
+ $col = $form->addRow();
// SEARCH
$search = $_GET['search'] ?? '';
- $col->addContent(__('Search').':');
+ $col->addContent(__('Search').':')->setClass('flex-shrink');
$col->addTextField('search')
->setClass('shortWidth')
->setValue($search);
@@ -108,7 +111,7 @@ function classChooser($guid, $pdo, $gibbonCourseClassID)
$result = $pdo->executeQuery($data, $sql);
$terms = ($result->rowCount() > 0)? $result->fetchAll(\PDO::FETCH_KEY_PAIR) : array();
- $col->addContent(__('Term').':')->prepend(' ');
+ $col->addContent(__('Term').':')->setClass('flex-shrink');
$col->addSelect('gibbonSchoolYearTermID')
->fromArray(array('-1' => __('All Terms')))
->fromArray($terms)
@@ -136,7 +139,7 @@ function classChooser($guid, $pdo, $gibbonCourseClassID)
'surname' => __('Surname'),
'preferredName' => __('Preferred Name'),
);
- $col->addContent(__('Sort By').':')->prepend(' ');
+ $col->addContent(__('Sort By').':')->setClass('flex-shrink');
$col->addSelect('markbookOrderBy')->fromArray($orderBy)->selected($selectOrderBy)->setClass('shortWidth');
$session->set('markbookOrderBy', $selectOrderBy);
@@ -154,23 +157,23 @@ function classChooser($guid, $pdo, $gibbonCourseClassID)
$filters['marked'] = __('Marked');
$filters['unmarked'] = __('Unmarked');
- $col->addContent(__('Show').':')->prepend(' ');
+ $col->addContent(__('Show').':')->setClass('flex-shrink');
$col->addSelect('markbookFilter')
->fromArray($filters)
->selected($selectFilter)
->setClass('shortWidth');
// CLASS
- $col->addContent(__('Class').':')->prepend(' ');
+ $col->addContent(__('Class').':')->setClass('flex-shrink');
$col->addSelectClass('gibbonCourseClassID', $session->get('gibbonSchoolYearID'), $session->get('gibbonPersonID'))
->setClass('mediumWidth')
->selected($gibbonCourseClassID);
- $col->addSubmit(__('Go'));
+ $col->addSubmit(__('Go'))->setClass('max-w-24');
if (!empty($search)) {
$clearURL = $session->get('absoluteURL').'/index.php?q='.$session->get('address');
- $clearLink = sprintf('%s ', $clearURL, __('Clear Search'));
+ $clearLink = sprintf('%s ', $clearURL, __('Clear Search'));
$form->addRow()->addContent($clearLink)->addClass('right');
}
diff --git a/modules/Markbook/weighting_manage.php b/modules/Markbook/weighting_manage.php
index 62dbcf5f77..0995b04f09 100644
--- a/modules/Markbook/weighting_manage.php
+++ b/modules/Markbook/weighting_manage.php
@@ -264,7 +264,7 @@
$form = Form::create('searchForm', $session->get('absoluteURL').'/modules/'.$session->get('module').'/weighting_manage_copyProcess.php?gibbonCourseClassID='.$gibbonCourseClassID);
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$col = $form->addRow()->addColumn()->addClass('inline right');
$col->addContent(__('Copy from').' '.__('Class').':');
diff --git a/modules/Messenger/groups_manage.php b/modules/Messenger/groups_manage.php
index fc7cdc6604..d35804a331 100644
--- a/modules/Messenger/groups_manage.php
+++ b/modules/Messenger/groups_manage.php
@@ -58,7 +58,7 @@
// SEARCH FORM
$searchForm = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get');
- $searchForm->setClass('noIntBorder fullWidth');
+ $searchForm->setClass('noIntBorder w-full');
$searchForm->addHiddenValue('address', $session->get('address'));
$searchForm->addHiddenValue('q', '/modules/Messenger/groups_manage.php');
diff --git a/modules/Messenger/messageWall_view.php b/modules/Messenger/messageWall_view.php
index b61e1e2244..a195513539 100644
--- a/modules/Messenger/messageWall_view.php
+++ b/modules/Messenger/messageWall_view.php
@@ -29,10 +29,9 @@
//Acess denied
$page->addError(__('Your request failed because you do not have access to this action.'));
} else {
- $dateFormat = $session->get('i18n')['dateFormatPHP'];
- $date = isset($_REQUEST['date'])? $_REQUEST['date'] : date($dateFormat);
+ $date = isset($_REQUEST['date'])? $_REQUEST['date'] : date('Y-m-d');
- $page->breadcrumbs->add(($date === date($dateFormat)) ?
+ $page->breadcrumbs->add(($date === date('Y-m-d')) ?
__('Today\'s Messages').' ('.$date.')' :
__('View Messages').' ('.$date.')');
@@ -55,24 +54,27 @@
}
- $form = Form::create('action', $session->get('absoluteURL').'/index.php?q=/modules/'.$session->get('module').'/messageWall_view.php');
- $form->setClass('blank fullWidth');
+ $form = Form::createBlank('action', $session->get('absoluteURL').'/index.php?q=/modules/'.$session->get('module').'/messageWall_view.php');
$form->addHiddenValue('address', $session->get('address'));
$row = $form->addRow()->addClass('flex flex-wrap');
$link = $session->get('absoluteURL').'/index.php?q=/modules/'.$session->get('module').'/messageWall_view.php';
- $prevDay = DateTime::createFromFormat($dateFormat, $date)->modify('-1 day')->format($dateFormat);
- $nextDay = DateTime::createFromFormat($dateFormat, $date)->modify('+1 day')->format($dateFormat);
+ $prevDay = DateTime::createFromFormat('Y-m-d', $date)->modify('-1 day')->format('Y-m-d');
+ $nextDay = DateTime::createFromFormat('Y-m-d', $date)->modify('+1 day')->format('Y-m-d');
$col = $row->addColumn()->addClass('flex-1 flex items-center');
- $col->addButton(__('Previous Day'))->addClass('buttonLink mr-px rounded-l-sm hover:bg-gray-400')->onClick("window.location.href='{$link}&date={$prevDay}'");
- $col->addButton(__('Next Day'))->addClass('buttonLink rounded-r-sm hover:bg-gray-400')->onClick("window.location.href='{$link}&date={$nextDay}'");
+ $col->addButton(__('Previous Day'))
+ ->groupAlign('left')
+ ->onClick("window.location.href='{$link}&date={$prevDay}'");
+ $col->addButton(__('Next Day'))
+ ->groupAlign('right')
+ ->onClick("window.location.href='{$link}&date={$nextDay}'");
$col = $row->addColumn()->addClass('flex items-center justify-end');
- $col->addDate('date')->setValue($date)->setClass('shortWidth');
- $col->addSubmit(__('Go'));
+ $col->addDate('date')->setValue($date)->setClass('shortWidth')->groupAlign('left');
+ $col->addSubmit(__('Go'))->groupAlign('right');
echo $form->getOutput();
diff --git a/modules/Messenger/messenger_manage.php b/modules/Messenger/messenger_manage.php
index 74c94ed8f3..1965f85a11 100644
--- a/modules/Messenger/messenger_manage.php
+++ b/modules/Messenger/messenger_manage.php
@@ -48,7 +48,7 @@
->fromPOST();
$form = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get');
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->setTitle(__('Search'));
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/messenger_manage.php');
@@ -83,8 +83,7 @@
->setURL('/modules/Messenger/messenger_postQuickWall.php')
->setIcon('page_new')
->addParam('search', $search)
- ->displayLabel()
- ->prepend(' | ');
+ ->displayLabel();
}
$table->modifyRows(function($values, $row) {
@@ -276,7 +275,7 @@
if (!is_null($values['emailReceipt']) && $values['status'] == 'Sent') {
$actions->addAction('send', __('View Send Report'))
->setURL('/modules/Messenger/messenger_manage_report.php')
- ->setIcon('target');
+ ->setIcon('document-check');
}
});
diff --git a/modules/Messenger/messenger_manage_edit.php b/modules/Messenger/messenger_manage_edit.php
index 0b9f2cabf4..b3309599cd 100644
--- a/modules/Messenger/messenger_manage_edit.php
+++ b/modules/Messenger/messenger_manage_edit.php
@@ -78,19 +78,17 @@
}
?>
diff --git a/modules/Messenger/messenger_manage_report.php b/modules/Messenger/messenger_manage_report.php
index e40b99c960..578cfc1bc5 100644
--- a/modules/Messenger/messenger_manage_report.php
+++ b/modules/Messenger/messenger_manage_report.php
@@ -56,34 +56,21 @@
if ($result->rowCount() < 1) {
$page->addError(__('The specified record cannot be found.'));
- }
- else {
+ } else {
$values = $result->fetch();
- ?>
-
-
- return->addReturns(['error2' => 'Some elements of your request failed, but others were successful.']);
// Create a reusable confirmation closure
- $icon = ' ';
- $confirmationIndicator = function($recipient, $emailReceipt = false) use ($icon) {
+ $confirmationIndicator = function($recipient, $emailReceipt = false) {
if ($emailReceipt == 'N') return '';
- if (empty($recipient['key'])) return __('N/A');
- return sprintf($icon, $recipient['confirmed'] == 'Y'? 'iconTick.png' : 'iconCross.png').' '.Format::small(Format::yesNo($recipient['confirmed']));
+ if (empty($recipient['key'])) return '';
+
+ $icon = $recipient['confirmed'] == 'Y'
+ ? icon('solid', 'check', 'size-6 mr-2 fill-current text-green-600')
+ : icon('solid', 'cross', 'size-6 mr-2 fill-current text-red-700');
+
+ return Format::tooltip($icon, Format::yesNo($recipient['confirmed']));
};
$sender = false;
@@ -127,14 +114,14 @@
}
// Auto-submitting form to select the confirmation mode
- $form = Form::create('filters', $session->get('absoluteURL') . '/index.php', 'get');
+ $form = Form::create('filters', $session->get('absoluteURL') . '/index.php', 'get')->enableQuickSubmit()->setAttribute('hx-trigger', 'change from:#confirmationMode');
$form->addHiddenValue('q', '/modules/Messenger/messenger_manage_report.php');
$form->addHiddenValue('gibbonMessengerID', $gibbonMessengerID);
$form->addHiddenValue('search', $search);
$form->addHiddenValue('sidebar', 'true');
- $form->setClass('noIntBorder fullWidth auto-submit pb-1');
+ $form->setClass('noIntBorder w-full pb-1');
$row = $form->addRow();
$row->addLabel('subjectLabel', __('Message'));
@@ -164,267 +151,275 @@
echo $form->getOutput();
}
- echo "";
- //Tab links
- echo '
';
-
- //Tab content
- echo "
";
-
- $data = array('gibbonSchoolYearID' => $session->get('gibbonSchoolYearID'), 'today' => date('Y-m-d'));
- $sql = "SELECT gibbonFormGroup.nameShort AS formGroup, gibbonPerson.gibbonPersonID, gibbonPerson.surname, gibbonPerson.preferredName, gibbonFamilyChild.gibbonFamilyID, parent1.email AS parent1email, parent1.surname AS parent1surname, parent1.preferredName AS parent1preferredName, parent1.gibbonPersonID AS parent1gibbonPersonID, parent2.email AS parent2email, parent2.surname AS parent2surname, parent2.preferredName AS parent2preferredName, parent2.gibbonPersonID AS parent2gibbonPersonID
- FROM gibbonPerson
- JOIN gibbonStudentEnrolment ON (gibbonStudentEnrolment.gibbonPersonID=gibbonPerson.gibbonPersonID)
- JOIN gibbonFormGroup ON (gibbonStudentEnrolment.gibbonFormGroupID=gibbonFormGroup.gibbonFormGroupID)
- LEFT JOIN gibbonFamilyChild ON (gibbonFamilyChild.gibbonPersonID=gibbonPerson.gibbonPersonID)
- LEFT JOIN gibbonFamilyAdult AS parent1Fam ON (parent1Fam.gibbonFamilyID=gibbonFamilyChild.gibbonFamilyID AND parent1Fam.contactPriority=1)
- LEFT JOIN gibbonPerson AS parent1 ON (parent1Fam.gibbonPersonID=parent1.gibbonPersonID AND parent1.status='Full' AND NOT parent1.surname IS NULL)
- LEFT JOIN gibbonFamilyAdult AS parent2Fam ON (parent2Fam.gibbonFamilyID=gibbonFamilyChild.gibbonFamilyID AND parent2Fam.contactPriority=2 AND parent2Fam.contactEmail='Y')
- LEFT JOIN gibbonPerson AS parent2 ON (parent2Fam.gibbonPersonID=parent2.gibbonPersonID AND parent2.status='Full' AND NOT parent2.surname IS NULL)
- WHERE gibbonStudentEnrolment.gibbonSchoolYearID=:gibbonSchoolYearID
- AND gibbonPerson.status='Full'
- AND (gibbonPerson.dateStart IS NULL OR gibbonPerson.dateStart<=:today) AND (gibbonPerson.dateEnd IS NULL OR gibbonPerson.dateEnd>=:today)
- GROUP BY gibbonPerson.gibbonPersonID
- ORDER BY formGroup, gibbonPerson.surname, gibbonPerson.preferredName, gibbonFamilyChild.gibbonFamilyID";
- $result = $connection2->prepare($sql);
- $result->execute($data);
-
- if ($result->rowCount() < 1) {
- echo $page->getBlankSlate();
- } else {
- //Store receipt for this message data in an array
-
- $dataReceipts = array('gibbonMessengerID' => $gibbonMessengerID);
- $sqlReceipts = "SELECT gibbonPersonID, gibbonMessengerReceiptID, confirmed, sent, `key`, gibbonPersonIDListStudent FROM gibbonMessengerReceipt WHERE gibbonMessengerID=:gibbonMessengerID";
- $resultReceipts = $connection2->prepare($sqlReceipts);
- $resultReceipts->execute($dataReceipts);
- $receipts = $resultReceipts->fetchAll(\PDO::FETCH_GROUP|\PDO::FETCH_UNIQUE);
-
- $form = BulkActionForm::create('resendByRecipient', $session->get('absoluteURL') . '/modules/' . $session->get('module') . '/messenger_manage_report_processBulk.php?gibbonMessengerID='.$gibbonMessengerID.'&search='.$search);
- $form->addHiddenValue('address', $session->get('address'));
-
- if ($sender) {
- $row = $form->addBulkActionRow(array('resend' => __('Resend')))->addClass('flex justify-end');
- $row->addSubmit(__('Go'));
- }
+ // TABS
+ $tabs = [];
+
+
+ $data = array('gibbonSchoolYearID' => $session->get('gibbonSchoolYearID'), 'today' => date('Y-m-d'));
+ $sql = "SELECT gibbonFormGroup.nameShort AS formGroup, gibbonPerson.gibbonPersonID, gibbonPerson.surname, gibbonPerson.preferredName, gibbonFamilyChild.gibbonFamilyID, parent1.email AS parent1email, parent1.surname AS parent1surname, parent1.preferredName AS parent1preferredName, parent1.gibbonPersonID AS parent1gibbonPersonID, parent2.email AS parent2email, parent2.surname AS parent2surname, parent2.preferredName AS parent2preferredName, parent2.gibbonPersonID AS parent2gibbonPersonID
+ FROM gibbonPerson
+ JOIN gibbonStudentEnrolment ON (gibbonStudentEnrolment.gibbonPersonID=gibbonPerson.gibbonPersonID)
+ JOIN gibbonFormGroup ON (gibbonStudentEnrolment.gibbonFormGroupID=gibbonFormGroup.gibbonFormGroupID)
+ LEFT JOIN gibbonFamilyChild ON (gibbonFamilyChild.gibbonPersonID=gibbonPerson.gibbonPersonID)
+ LEFT JOIN gibbonFamilyAdult AS parent1Fam ON (parent1Fam.gibbonFamilyID=gibbonFamilyChild.gibbonFamilyID AND parent1Fam.contactPriority=1)
+ LEFT JOIN gibbonPerson AS parent1 ON (parent1Fam.gibbonPersonID=parent1.gibbonPersonID AND parent1.status='Full' AND NOT parent1.surname IS NULL)
+ LEFT JOIN gibbonFamilyAdult AS parent2Fam ON (parent2Fam.gibbonFamilyID=gibbonFamilyChild.gibbonFamilyID AND parent2Fam.contactPriority=2 AND parent2Fam.contactEmail='Y')
+ LEFT JOIN gibbonPerson AS parent2 ON (parent2Fam.gibbonPersonID=parent2.gibbonPersonID AND parent2.status='Full' AND NOT parent2.surname IS NULL)
+ WHERE gibbonStudentEnrolment.gibbonSchoolYearID=:gibbonSchoolYearID
+ AND gibbonPerson.status='Full'
+ AND (gibbonPerson.dateStart IS NULL OR gibbonPerson.dateStart<=:today) AND (gibbonPerson.dateEnd IS NULL OR gibbonPerson.dateEnd>=:today)
+ GROUP BY gibbonPerson.gibbonPersonID
+ ORDER BY formGroup, gibbonPerson.surname, gibbonPerson.preferredName, gibbonFamilyChild.gibbonFamilyID";
+ $result = $connection2->prepare($sql);
+ $result->execute($data);
+
+ if ($result->rowCount() < 1) {
+ // echo $page->getBlankSlate();
+ } else {
+ //Store receipt for this message data in an array
+
+ $dataReceipts = array('gibbonMessengerID' => $gibbonMessengerID);
+ $sqlReceipts = "SELECT gibbonPersonID, gibbonMessengerReceiptID, confirmed, sent, `key`, gibbonPersonIDListStudent FROM gibbonMessengerReceipt WHERE gibbonMessengerID=:gibbonMessengerID";
+ $resultReceipts = $connection2->prepare($sqlReceipts);
+ $resultReceipts->execute($dataReceipts);
+ $receipts = $resultReceipts->fetchAll(\PDO::FETCH_GROUP|\PDO::FETCH_UNIQUE);
+
+ $form = BulkActionForm::create('resendByRecipient', $session->get('absoluteURL') . '/modules/' . $session->get('module') . '/messenger_manage_report_processBulk.php?gibbonMessengerID='.$gibbonMessengerID.'&search='.$search);
+ $form->addHiddenValue('address', $session->get('address'));
+
+ if ($sender) {
+ $row = $form->addBulkActionRow(array('resend' => __('Resend')))->addClass('flex justify-end');
+ $row->addSubmit(__('Go'));
+ }
- $formGroups = $result->fetchAll(\PDO::FETCH_GROUP);
- $countTotal = 0;
-
- // Merge gibbonPersonIDListStudent into $receipts as an array
- $receipts = array_map(function ($item) {
- $item['gibbonPersonIDListStudent'] = (empty($item['gibbonPersonIDListStudent'])) ? null : explode(',', $item['gibbonPersonIDListStudent']);
- return $item;
- }, $receipts);
-
- foreach ($formGroups as $formGroupName => $recipients) {
- $count = 0;
-
- // Filter the array for only those individuals involved in the message (student or parent)
- $recipients = array_filter($recipients, function($recipient) use (&$receipts) {
- if (array_key_exists($recipient['gibbonPersonID'], $receipts)) {
- return true;
- }
-
- if (array_key_exists($recipient['parent1gibbonPersonID'], $receipts)
- && (is_null($receipts[$recipient['parent1gibbonPersonID']]['gibbonPersonIDListStudent']) || in_array($recipient['gibbonPersonID'], $receipts[$recipient['parent1gibbonPersonID']]['gibbonPersonIDListStudent']))) {
- return true;
- }
-
- if (array_key_exists($recipient['parent2gibbonPersonID'], $receipts)
- && (is_null($receipts[$recipient['parent2gibbonPersonID']]['gibbonPersonIDListStudent']) || in_array($recipient['gibbonPersonID'], $receipts[$recipient['parent2gibbonPersonID']]['gibbonPersonIDListStudent']))) {
- return true;
- }
-
- return false;
- });
-
- //print_r($recipients);exit;
-
- // Skip this form group if there's no involved individuals
- if (empty($recipients)) continue;
-
- $form->addRow()->addHeading($formGroupName);
- $table = $form->addRow()->addTable()->setClass('colorOddEven fullWidth');
-
- $header = $table->addHeaderRow();
- $header->addContent(__('Total Count'));
- $header->addContent(__('Form Count'));
- $header->addContent(__('Student'))->addClass('mediumWidth');
- $header->addContent(__('Parent 1'))->addClass('mediumWidth');
- $header->addContent(__('Parent 2'))->addClass('mediumWidth');
-
- foreach ($recipients as $recipient) {
- // print_r($recipient);
- // echo " ";
-
- $countTotal++;
- $count++;
-
- $studentName = Format::name('', $recipient['preferredName'], $recipient['surname'], 'Student', true);
- $parent1Name = Format::name('', $recipient['parent1preferredName'], $recipient['parent1surname'], 'Parent', true);
- $parent2Name = Format::name('', $recipient['parent2preferredName'], $recipient['parent2surname'], 'Parent', true);
-
- //Tests for row completion, to set colour
- $studentReceived = isset($receipts[$recipient['gibbonPersonID']]);
- if ($studentReceived) {
- $studentComplete = ($receipts[$recipient['gibbonPersonID']]['confirmed'] == "Y");
- } else {
- $studentComplete = false;
- }
-
- $parentReceived = (isset($receipts[$recipient['parent1gibbonPersonID']]) || isset($receipts[$recipient['parent2gibbonPersonID']]));
- if ($parentReceived) {
- $parentComplete = ((isset($receipts[$recipient['parent1gibbonPersonID']]) && $receipts[$recipient['parent1gibbonPersonID']]['confirmed'] == "Y") || (isset($receipts[$recipient['parent2gibbonPersonID']]) && $receipts[$recipient['parent2gibbonPersonID']]['confirmed'] == "Y"));
- $bothParentsComplete = ((isset($receipts[$recipient['parent1gibbonPersonID']]) && $receipts[$recipient['parent1gibbonPersonID']]['confirmed'] == "Y") && (!isset($receipts[$recipient['parent2gibbonPersonID']]) || $receipts[$recipient['parent2gibbonPersonID']]['confirmed'] == "Y"));
- }
- else {
- $parentComplete = false;
- $bothParentsComplete = false;
- }
- $class = $values['emailReceipt'] == 'Y' ? 'error' : '';
-
- if ($confirmationMode == 'All' && $studentComplete && $parentComplete) {
- $class = 'current';
- } elseif ($confirmationMode == 'One' && $parentComplete) {
- $class = 'current';
- } elseif ($confirmationMode == 'Both' && $bothParentsComplete) {
- $class = 'current';
- } elseif ($confirmationMode == 'Any' && ($studentComplete || $parentComplete)) {
- $class = 'current';
- }
-
- $row = $table->addRow()->setClass($class);
- $row->addContent($countTotal);
- $row->addContent($count);
-
- $studentReceipt = isset($receipts[$recipient['gibbonPersonID']])? $receipts[$recipient['gibbonPersonID']] : null;
- $col = $row->addColumn()->addClass(!empty($studentReceipt) && $studentReceipt['confirmed'] != 'Y' && $studentReceipt['sent'] != 'Y' ? 'bg-orange-300' : '');
- $col->addContent(!empty($studentName)? $studentName : __('N/A'));
- $col->addContent($confirmationIndicator($studentReceipt, $values['emailReceipt']));
- $col->onlyIf($sender == true && !empty($studentReceipt) && ($studentReceipt['confirmed'] == 'N' || $values['emailReceipt'] == 'N'))
- ->addCheckbox('gibbonMessengerReceiptIDs[]')
- ->setValue($studentReceipt['gibbonMessengerReceiptID'] ?? '')
- ->setClass('')
- ->alignLeft();
-
- $parent1Receipt = isset($receipts[$recipient['parent1gibbonPersonID']])? $receipts[$recipient['parent1gibbonPersonID']] : null;
- $col = $row->addColumn()->addClass(!empty($parent1Receipt) && $parent1Receipt['confirmed'] != 'Y' && $parent1Receipt['sent'] != 'Y' ? 'bg-orange-300' : '');
- $col->addContent(!empty($recipient['parent1surname'])? $parent1Name : __('N/A'));
- $col->addContent($confirmationIndicator($parent1Receipt, $values['emailReceipt']));
- $col->onlyIf($sender == true && !empty($parent1Receipt) && ($parent1Receipt['confirmed'] == 'N' || $values['emailReceipt'] == 'N'))
- ->addCheckbox('gibbonMessengerReceiptIDs[]')
- ->setValue($parent1Receipt['gibbonMessengerReceiptID'] ?? '')
- ->setClass('')
- ->alignLeft();
-
- $parent2Receipt = isset($receipts[$recipient['parent2gibbonPersonID']])? $receipts[$recipient['parent2gibbonPersonID']] : null;
- $col = $row->addColumn()->addClass(!empty($parent2Receipt) && $parent2Receipt['confirmed'] != 'Y' && $parent2Receipt['sent'] != 'Y' ? 'bg-orange-300' : '');
- $col->addContent(!empty($recipient['parent2surname'])? $parent2Name : __('N/A'));
- $col->addContent($confirmationIndicator($parent2Receipt, $values['emailReceipt']));
- $col->onlyIf($sender == true && !empty($parent2Receipt) && ($parent2Receipt['confirmed'] == 'N' || $values['emailReceipt'] == 'N'))
- ->addCheckbox('gibbonMessengerReceiptIDs[]')
- ->setValue($parent2Receipt['gibbonMessengerReceiptID'] ?? '')
- ->setClass('')
- ->alignLeft();
- }
- }
+ $formGroups = $result->fetchAll(\PDO::FETCH_GROUP);
+ $countTotal = 0;
+
+ // Merge gibbonPersonIDListStudent into $receipts as an array
+ $receipts = array_map(function ($item) {
+ $item['gibbonPersonIDListStudent'] = (empty($item['gibbonPersonIDListStudent'])) ? null : explode(',', $item['gibbonPersonIDListStudent']);
+ return $item;
+ }, $receipts);
- if ($countTotal == 0) {
- $table = $form->addRow()->addTable()->setClass('colorOddEven fullWidth');
- $table->addRow()->addTableCell(__('There are no records to display.'))->colSpan(8);
+ foreach ($formGroups as $formGroupName => $recipients) {
+ $count = 0;
+
+ // Filter the array for only those individuals involved in the message (student or parent)
+ $recipients = array_filter($recipients, function($recipient) use (&$receipts) {
+ if (array_key_exists($recipient['gibbonPersonID'], $receipts)) {
+ return true;
}
- echo $form->getOutput();
- }
- echo "
";
- echo "
";
- if (!is_null($gibbonMessengerID)) {
-
- $data = array('gibbonMessengerID' => $gibbonMessengerID);
- $sql = "SELECT surname, preferredName, gibbonPerson.gibbonPersonID, gibbonMessenger.*, gibbonMessengerReceipt.*, gibbonRole.category as roleCategory
- FROM gibbonMessengerReceipt
- JOIN gibbonMessenger ON (gibbonMessengerReceipt.gibbonMessengerID=gibbonMessenger.gibbonMessengerID)
- LEFT JOIN gibbonPerson ON (gibbonMessengerReceipt.gibbonPersonID=gibbonPerson.gibbonPersonID)
- LEFT JOIN gibbonRole ON (gibbonRole.gibbonRoleID=gibbonPerson.gibbonRoleIDPrimary)
- WHERE gibbonMessengerReceipt.gibbonMessengerID=:gibbonMessengerID ORDER BY FIELD(confirmed, 'Y','N',NULL), confirmedTimestamp, surname, preferredName, contactType";
- $result = $connection2->prepare($sql);
- $result->execute($data);
-
- $form = BulkActionForm::create('resendByRecipient', $session->get('absoluteURL') . '/modules/' . $session->get('module') . '/messenger_manage_report_processBulk.php?gibbonMessengerID='.$gibbonMessengerID.'&search='.$search);
-
- $form->addHiddenValue('address', $session->get('address'));
-
- if ($sender) {
- $row = $form->addBulkActionRow(array('resend' => __('Resend')))->addClass('flex justify-end');;
- $row->addSubmit(__('Go'));
+ if (array_key_exists($recipient['parent1gibbonPersonID'], $receipts)
+ && (is_null($receipts[$recipient['parent1gibbonPersonID']]['gibbonPersonIDListStudent']) || in_array($recipient['gibbonPersonID'], $receipts[$recipient['parent1gibbonPersonID']]['gibbonPersonIDListStudent']))) {
+ return true;
}
- $table = $form->addRow()->addTable()->setClass('colorOddEven fullWidth');
-
- $header = $table->addHeaderRow();
- $header->addContent();
- $header->addContent(__('Recipient'));
- $header->addContent(__('Role'));
- $header->addContent(__('Contact Type'));
- $header->addContent(__('Contact Detail'));
- $header->addContent(__('Sent'));
- $header->addContent(__('Receipt Confirmed'));
- $header->addContent(__('Timestamp'));
- if ($sender == true) {
- $header->addCheckAll();
- }
-
-
- $recipients = $result->fetchAll();
- $recipientIDs = array_column($recipients, 'gibbonPersonID');
-
- foreach ($recipients as $count => $recipient) {
- $row = $table->addRow()->addClass($recipient['confirmed'] != 'Y' && $recipient['sent'] != 'Y' ? 'warning' : '');
- $row->addContent($count+1);
- $row->addContent(($recipient['preferredName'] != '' && $recipient['surname'] != '') ? Format::name('', $recipient['preferredName'], $recipient['surname'], 'Student', true) : __('N/A'));
- $row->addContent($recipient['roleCategory']);
- $row->addContent($recipient['contactType']);
- $row->addContent($recipient['contactDetail']);
- $row->addContent(Format::yesNo($recipient['sent']));
- $row->addContent($confirmationIndicator($recipient));
- $row->addContent(!empty($recipient['confirmedTimestamp']) ? Format::date(substr($recipient['confirmedTimestamp'],0,10)).' '.substr($recipient['confirmedTimestamp'],11,5) : '');
-
- if ($sender == true && $recipient['contactType'] == 'Email') {
- $row->onlyIf($recipient['confirmed'] == 'N' || $values['emailReceipt'] == 'N')
- ->addCheckbox('gibbonMessengerReceiptIDs[]')
- ->setValue($recipient['gibbonMessengerReceiptID'])
- ->addClass('bulkCheckbox')
- ->alignCenter();
-
- $row->onlyIf($recipient['confirmed'] != 'N' && $values['emailReceipt'] == 'Y')->addContent();
- } else {
- $row->addContent();
- }
-
- if (is_null($recipient['key'])) $nonConfirm++;
- else if ($recipient['confirmed'] == 'Y') $yesConfirm++;
- else if ($recipient['confirmed'] == 'N') $noConfirm++;
+ if (array_key_exists($recipient['parent2gibbonPersonID'], $receipts)
+ && (is_null($receipts[$recipient['parent2gibbonPersonID']]['gibbonPersonIDListStudent']) || in_array($recipient['gibbonPersonID'], $receipts[$recipient['parent2gibbonPersonID']]['gibbonPersonIDListStudent']))) {
+ return true;
}
- if (count($recipients) == 0) {
- $table->addRow()->addTableCell(__('There are no records to display.'))->colSpan(8);
+ return false;
+ });
+
+ //print_r($recipients);exit;
+
+ // Skip this form group if there's no involved individuals
+ if (empty($recipients)) continue;
+
+ $form->addRow()->addHeading($formGroupName);
+ $table = $form->addRow()->addTable()->setClass('colorOddEven w-full');
+
+ $header = $table->addHeaderRow();
+ $header->addContent(__('Total Count'));
+ $header->addContent(__('Form Count'));
+ $header->addContent(__('Student'))->addClass('w-1/4');
+ $header->addContent(__('Parent 1'))->addClass('w-1/4');
+ $header->addContent(__('Parent 2'))->addClass('w-1/4');
+
+ foreach ($recipients as $recipient) {
+ // print_r($recipient);
+ // echo " ";
+
+ $countTotal++;
+ $count++;
+
+ $studentName = Format::name('', $recipient['preferredName'], $recipient['surname'], 'Student', true);
+ $parent1Name = Format::name('', $recipient['parent1preferredName'], $recipient['parent1surname'], 'Parent', true);
+ $parent2Name = Format::name('', $recipient['parent2preferredName'], $recipient['parent2surname'], 'Parent', true);
+
+ //Tests for row completion, to set colour
+ $studentReceived = isset($receipts[$recipient['gibbonPersonID']]);
+ if ($studentReceived) {
+ $studentComplete = ($receipts[$recipient['gibbonPersonID']]['confirmed'] == "Y");
} else {
- $sendReport = ''.__('Total Messages:')." ".count($recipients)." ";
- $sendReport .= "".__('Messages not eligible for confirmation of receipt:')." $nonConfirm ";
- $sendReport .= "".__('Messages confirmed:').' '.$yesConfirm.' ';
- $sendReport .= "".__('Messages not yet confirmed:').' '.$noConfirm.' ';
+ $studentComplete = false;
+ }
- $form->addRow()->addClass('right')->addAlert($sendReport, 'success');
+ $parentReceived = (isset($receipts[$recipient['parent1gibbonPersonID']]) || isset($receipts[$recipient['parent2gibbonPersonID']]));
+ if ($parentReceived) {
+ $parentComplete = ((isset($receipts[$recipient['parent1gibbonPersonID']]) && $receipts[$recipient['parent1gibbonPersonID']]['confirmed'] == "Y") || (isset($receipts[$recipient['parent2gibbonPersonID']]) && $receipts[$recipient['parent2gibbonPersonID']]['confirmed'] == "Y"));
+ $bothParentsComplete = ((isset($receipts[$recipient['parent1gibbonPersonID']]) && $receipts[$recipient['parent1gibbonPersonID']]['confirmed'] == "Y") && (!isset($receipts[$recipient['parent2gibbonPersonID']]) || $receipts[$recipient['parent2gibbonPersonID']]['confirmed'] == "Y"));
}
+ else {
+ $parentComplete = false;
+ $bothParentsComplete = false;
+ }
+ $class = $values['emailReceipt'] == 'Y' ? 'error' : '';
+
+ if ($confirmationMode == 'All' && $studentComplete && $parentComplete) {
+ $class = 'current';
+ } elseif ($confirmationMode == 'One' && $parentComplete) {
+ $class = 'current';
+ } elseif ($confirmationMode == 'Both' && $bothParentsComplete) {
+ $class = 'current';
+ } elseif ($confirmationMode == 'Any' && ($studentComplete || $parentComplete)) {
+ $class = 'current';
+ }
+
+ $row = $table->addRow()->setClass($class);
+ $row->addContent($countTotal);
+ $row->addContent($count);
+
+ $studentReceipt = isset($receipts[$recipient['gibbonPersonID']])? $receipts[$recipient['gibbonPersonID']] : null;
+ $col = $row->addColumn()->addColumn()->setClass('flex items-center justify-start')->addClass(!empty($studentReceipt) && $studentReceipt['confirmed'] != 'Y' && $studentReceipt['sent'] != 'Y' ? 'bg-orange-300' : '');
+ $col->addContent($confirmationIndicator($studentReceipt, $values['emailReceipt']));
+ $col->onlyIf($sender == true && !empty($studentReceipt) && ($studentReceipt['confirmed'] == 'N' || $values['emailReceipt'] == 'N'))
+ ->addCheckbox('gibbonMessengerReceiptIDs[]')
+ ->setValue($studentReceipt['gibbonMessengerReceiptID'] ?? '')
+ ->setClass('')
+ ->alignLeft();
+ $col->addContent(!empty($studentName)? $studentName : __('N/A'))->addClass('w-full');
+
+ $parent1Receipt = isset($receipts[$recipient['parent1gibbonPersonID']])? $receipts[$recipient['parent1gibbonPersonID']] : null;
+ $col = $row->addColumn()->addColumn()->setClass('flex items-center justify-start')->addClass(!empty($parent1Receipt) && $parent1Receipt['confirmed'] != 'Y' && $parent1Receipt['sent'] != 'Y' ? 'bg-orange-300' : '');
+ $col->addContent($confirmationIndicator($parent1Receipt, $values['emailReceipt']));
+ $col->onlyIf($sender == true && !empty($parent1Receipt) && ($parent1Receipt['confirmed'] == 'N' || $values['emailReceipt'] == 'N'))
+ ->addCheckbox('gibbonMessengerReceiptIDs[]')
+ ->setValue($parent1Receipt['gibbonMessengerReceiptID'] ?? '')
+ ->setClass('')
+ ->alignLeft();
+ $col->addContent(!empty($recipient['parent1surname'])? $parent1Name : __('N/A'))->addClass('w-full');
+
+ $parent2Receipt = isset($receipts[$recipient['parent2gibbonPersonID']])? $receipts[$recipient['parent2gibbonPersonID']] : null;
+ $col = $row->addColumn()->addColumn()->setClass('flex items-center justify-start')->addClass(!empty($parent2Receipt) && $parent2Receipt['confirmed'] != 'Y' && $parent2Receipt['sent'] != 'Y' ? 'bg-orange-300' : '');
+ $col->addContent($confirmationIndicator($parent2Receipt, $values['emailReceipt']));
+ $col->onlyIf($sender == true && !empty($parent2Receipt) && ($parent2Receipt['confirmed'] == 'N' || $values['emailReceipt'] == 'N'))
+ ->addCheckbox('gibbonMessengerReceiptIDs[]')
+ ->setValue($parent2Receipt['gibbonMessengerReceiptID'] ?? '')
+ ->setClass('')
+ ->alignLeft();
+ $col->addContent(!empty($recipient['parent2surname'])? $parent2Name : __('N/A'))->addClass('w-full');
+ }
+ }
+
+ if ($countTotal == 0) {
+ $table = $form->addRow()->addTable()->setClass('colorOddEven w-full');
+ $table->addRow()->addTableCell(__('There are no records to display.'))->colSpan(8);
+ }
+
+ $tabs['byFormGroup'] = [
+ 'label' => __('By Form Group'),
+ 'content' => $form->getOutput(),
+ 'icon' => 'users',
+ ];
+ }
+
+
+ if (!is_null($gibbonMessengerID)) {
- echo $form->getOutput();
+ $data = array('gibbonMessengerID' => $gibbonMessengerID);
+ $sql = "SELECT surname, preferredName, gibbonPerson.gibbonPersonID, gibbonMessenger.*, gibbonMessengerReceipt.*, gibbonRole.category as roleCategory
+ FROM gibbonMessengerReceipt
+ JOIN gibbonMessenger ON (gibbonMessengerReceipt.gibbonMessengerID=gibbonMessenger.gibbonMessengerID)
+ LEFT JOIN gibbonPerson ON (gibbonMessengerReceipt.gibbonPersonID=gibbonPerson.gibbonPersonID)
+ LEFT JOIN gibbonRole ON (gibbonRole.gibbonRoleID=gibbonPerson.gibbonRoleIDPrimary)
+ WHERE gibbonMessengerReceipt.gibbonMessengerID=:gibbonMessengerID ORDER BY FIELD(confirmed, 'Y','N',NULL), confirmedTimestamp, surname, preferredName, contactType";
+ $result = $connection2->prepare($sql);
+ $result->execute($data);
+
+ $form = BulkActionForm::create('resendByRecipient', $session->get('absoluteURL') . '/modules/' . $session->get('module') . '/messenger_manage_report_processBulk.php?gibbonMessengerID='.$gibbonMessengerID.'&search='.$search);
+
+ $form->addHiddenValue('address', $session->get('address'));
+
+ if ($sender) {
+ $row = $form->addBulkActionRow(array('resend' => __('Resend')))->addClass('flex justify-end');;
+ $row->addSubmit(__('Go'));
+ }
+
+ $table = $form->addRow()->addTable()->setClass('colorOddEven w-full');
+
+ $header = $table->addHeaderRow();
+ $header->addContent();
+ $header->addContent(__('Recipient'));
+ $header->addContent(__('Role'));
+ $header->addContent(__('Contact Type'));
+ $header->addContent(__('Contact Detail'));
+ $header->addContent(__('Sent'));
+ $header->addContent(__('Receipt Confirmed'));
+ $header->addContent(__('Timestamp'));
+ if ($sender == true) {
+ $header->addCheckAll();
}
- echo "
";
+
+
+ $recipients = $result->fetchAll();
+ $recipientIDs = array_column($recipients, 'gibbonPersonID');
+
+ foreach ($recipients as $count => $recipient) {
+ $row = $table->addRow()->addClass($recipient['confirmed'] != 'Y' && $recipient['sent'] != 'Y' ? 'warning' : '');
+ $row->addContent($count+1);
+ $row->addContent(($recipient['preferredName'] != '' && $recipient['surname'] != '') ? Format::name('', $recipient['preferredName'], $recipient['surname'], 'Student', true) : __('N/A'));
+ $row->addContent($recipient['roleCategory']);
+ $row->addContent($recipient['contactType']);
+ $row->addContent($recipient['contactDetail']);
+ $row->addContent($recipient['sent'] == 'Y' ? __('Sent') : __('Undelivered') );
+ $row->addContent($confirmationIndicator($recipient));
+ $row->addContent(!empty($recipient['confirmedTimestamp']) ? Format::date(substr($recipient['confirmedTimestamp'],0,10)).' '.substr($recipient['confirmedTimestamp'],11,5) : '');
+
+ if ($sender == true && $recipient['contactType'] == 'Email') {
+ $row->onlyIf($recipient['confirmed'] == 'N' || $values['emailReceipt'] == 'N')
+ ->addCheckbox('gibbonMessengerReceiptIDs[]')
+ ->setValue($recipient['gibbonMessengerReceiptID'])
+ ->addClass('bulkCheckbox')
+ ->alignCenter();
+
+ $row->onlyIf($recipient['confirmed'] != 'N' && $values['emailReceipt'] == 'Y')->addContent();
+ } else {
+ $row->addContent();
+ }
+
+ if (is_null($recipient['key'])) $nonConfirm++;
+ else if ($recipient['confirmed'] == 'Y') $yesConfirm++;
+ else if ($recipient['confirmed'] == 'N') $noConfirm++;
+ }
+
+ if (count($recipients) == 0) {
+ $table->addRow()->addTableCell(__('There are no records to display.'))->colSpan(8);
+ } else {
+ $sendReport = '
'.__('Total Messages:')." ".count($recipients)." ";
+ $sendReport .= "
".__('Messages not eligible for confirmation of receipt:')." $nonConfirm ";
+ $sendReport .= "".__('Messages confirmed:').' '.$yesConfirm.' ';
+ $sendReport .= "".__('Messages not yet confirmed:').' '.$noConfirm.' ';
+
+ $form->addRow()->addClass('right')->addAlert($sendReport, 'success');
+ }
+
+ $tabs['byRecipient'] = [
+ 'label' => __('Recipient'),
+ 'content' => $form->getOutput(),
+ 'icon' => 'user',
+ ];
}
- echo " ";
+
+ echo $page->fetchFromTemplate('ui/tabs.twig.html', [
+ 'tabs' => $tabs,
+ 'class' => 'mt-6',
+ 'outset' => false,
+ 'icons' => true,
+ ]);
+ }
+
}
}
diff --git a/modules/Messenger/messenger_post.php b/modules/Messenger/messenger_post.php
index d30efdddb3..af73fa4c64 100644
--- a/modules/Messenger/messenger_post.php
+++ b/modules/Messenger/messenger_post.php
@@ -71,19 +71,18 @@
?>
+
diff --git a/modules/Messenger/messenger_send.php b/modules/Messenger/messenger_send.php
index a36c8ac3de..ff320b0591 100644
--- a/modules/Messenger/messenger_send.php
+++ b/modules/Messenger/messenger_send.php
@@ -154,7 +154,7 @@
$row = $form->addRow('stickySubmit');
$col = $row->addColumn()->addClass('items-center');
- $col->addButton(__('Edit Draft'))->onClick('window.location="'.$editURL.'"')->addClass('email rounded-sm w-24 mr-2');
+ $col->addButton(__('Edit Draft'))->onClick('window.location="'.$editURL.'"');
$row->addSubmit(__('Send'));
} else {
// If the message is sent, display the message status
diff --git a/modules/Messenger/src/Forms/MessageForm.php b/modules/Messenger/src/Forms/MessageForm.php
index 7e3a9e0486..8d4c2a4079 100644
--- a/modules/Messenger/src/Forms/MessageForm.php
+++ b/modules/Messenger/src/Forms/MessageForm.php
@@ -285,7 +285,7 @@ public function createForm($action, $gibbonMessengerID = null)
foreach ($roles AS $role) {
$arrRoles[$role['gibbonRoleID']] = __($role['name'])." (".__($role['category']).")";
}
- $row = $form->addRow()->addClass('role bg-blue-100');
+ $row = $form->addRow()->addClass('role bg-blue-50');
$row->addLabel('roles[]', __('Select Roles'));
$row->addSelect('roles[]')->fromArray($arrRoles)->selectMultiple()->setSize(6)->required()->placeholder()->selected($selected);
@@ -299,7 +299,7 @@ public function createForm($action, $gibbonMessengerID = null)
$data = array();
$sql = 'SELECT DISTINCT category AS value, category AS name FROM gibbonRole ORDER BY category';
- $row = $form->addRow()->addClass('roleCategory bg-blue-100');
+ $row = $form->addRow()->addClass('roleCategory bg-blue-50');
$row->addLabel('roleCategories[]', __('Select Role Categories'));
$row->addSelect('roleCategories[]')->fromQuery($pdo, $sql, $data)->selectMultiple()->setSize(4)->required()->placeholder()->selected($selected);
} else if ($sent && $values['messageWall'] == 'Y' && !empty($selectedRoleCategory) && isActionAccessible($guid, $connection2, "/modules/Messenger/messenger_postQuickWall.php")) {
@@ -330,20 +330,20 @@ public function createForm($action, $gibbonMessengerID = null)
$data = array();
$sql = 'SELECT gibbonYearGroupID AS value, name FROM gibbonYearGroup ORDER BY sequenceNumber';
- $row = $form->addRow()->addClass('yearGroup bg-blue-100');
+ $row = $form->addRow()->addClass('yearGroup bg-blue-50');
$row->addLabel('yearGroups[]', __('Select Year Groups'));
$row->addSelect('yearGroups[]')->fromQuery($pdo, $sql, $data)->selectMultiple()->setSize(6)->required()->placeholder()->selected($selected);
- $row = $form->addRow()->addClass('yearGroup bg-blue-100');
+ $row = $form->addRow()->addClass('yearGroup bg-blue-50');
$row->addLabel('yearGroupsStaff', __('Include Staff?'));
$row->addYesNo('yearGroupsStaff')->selected($selectedByRole['staff']);
- $row = $form->addRow()->addClass('yearGroup bg-blue-100');
+ $row = $form->addRow()->addClass('yearGroup bg-blue-50');
$row->addLabel('yearGroupsStudents', __('Include Students?'));
$row->addYesNo('yearGroupsStudents')->selected($selectedByRole['students']);
if (isActionAccessible($guid, $connection2, "/modules/Messenger/messenger_post.php", "New Message_yearGroups_parents")) {
- $row = $form->addRow()->addClass('yearGroup bg-blue-100');
+ $row = $form->addRow()->addClass('yearGroup bg-blue-50');
$row->addLabel('yearGroupsParents', __('Include Parents?'));
$row->addYesNo('yearGroupsParents')->selected($selectedByRole['parents']);
}
@@ -374,20 +374,20 @@ public function createForm($action, $gibbonMessengerID = null)
$sql="SELECT gibbonFormGroupID AS value, name FROM gibbonFormGroup JOIN gibbonStudentEnrolment ON (gibbonStudentEnrolment.gibbonFormGroupID=gibbonFormGroup.gibbonFormGroupID) WHERE gibbonPersonID=:gibbonPersonID AND gibbonFormGroup.gibbonSchoolYearID=:gibbonSchoolYearID AND gibbonStudentEnrolment.gibbonSchoolYearID=:gibbonSchoolYearID ORDER BY name" ;
}
}
- $row = $form->addRow()->addClass('formGroup bg-blue-100');
+ $row = $form->addRow()->addClass('formGroup bg-blue-50');
$row->addLabel('formGroups[]', __('Select Form Groups'));
$row->addSelect('formGroups[]')->fromQuery($pdo, $sql, $data)->selectMultiple()->setSize(6)->required()->placeholder()->selected($selected);
- $row = $form->addRow()->addClass('formGroup bg-blue-100');
+ $row = $form->addRow()->addClass('formGroup bg-blue-50');
$row->addLabel('formGroupsStaff', __('Include Staff?'));
$row->addYesNo('formGroupsStaff')->selected($selectedByRole['staff']);
- $row = $form->addRow()->addClass('formGroup bg-blue-100');
+ $row = $form->addRow()->addClass('formGroup bg-blue-50');
$row->addLabel('formGroupsStudents', __('Include Students?'));
$row->addYesNo('formGroupsStudents')->selected($selectedByRole['students']);
if (isActionAccessible($guid, $connection2, "/modules/Messenger/messenger_post.php", "New Message_formGroups_parents")) {
- $row = $form->addRow()->addClass('formGroup bg-blue-100');
+ $row = $form->addRow()->addClass('formGroup bg-blue-50');
$row->addLabel('formGroupsParents', __('Include Parents?'));
$row->addYesNo('formGroupsParents')->selected($selectedByRole['parents']);
}
@@ -416,20 +416,20 @@ public function createForm($action, $gibbonMessengerID = null)
WHERE gibbonPersonID=:gibbonPersonID AND gibbonSchoolYearID=:gibbonSchoolYearID AND NOT role LIKE '%- Left' GROUP BY gibbonCourse.gibbonCourseID ORDER BY name";
}
- $row = $form->addRow()->addClass('course bg-blue-100');
+ $row = $form->addRow()->addClass('course bg-blue-50');
$row->addLabel('courses[]', __('Select Courses'));
$row->addSelect('courses[]')->fromQuery($pdo, $sql, $data)->selectMultiple()->setSize(6)->required()->selected($selected);
- $row = $form->addRow()->addClass('course bg-blue-100');
+ $row = $form->addRow()->addClass('course bg-blue-50');
$row->addLabel('coursesStaff', __('Include Staff?'));
$row->addYesNo('coursesStaff')->selected($selectedByRole['staff']);
- $row = $form->addRow()->addClass('course bg-blue-100');
+ $row = $form->addRow()->addClass('course bg-blue-50');
$row->addLabel('coursesStudents', __('Include Students?'));
$row->addYesNo('coursesStudents')->selected($selectedByRole['students']);
if (isActionAccessible($guid, $connection2, "/modules/Messenger/messenger_post.php", "New Message_courses_parents")) {
- $row = $form->addRow()->addClass('course bg-blue-100');
+ $row = $form->addRow()->addClass('course bg-blue-50');
$row->addLabel('coursesParents', __('Include Parents?'));
$row->addYesNo('coursesParents')->selected($selectedByRole['parents']);
}
@@ -458,20 +458,20 @@ public function createForm($action, $gibbonMessengerID = null)
WHERE gibbonPersonID=:gibbonPersonID AND gibbonSchoolYearID=:gibbonSchoolYearID AND NOT role LIKE '%- Left' ORDER BY gibbonCourseClass.name";
}
- $row = $form->addRow()->addClass('class bg-blue-100');
+ $row = $form->addRow()->addClass('class bg-blue-50');
$row->addLabel('classes[]', __('Select Classes'));
$row->addSelect('classes[]')->fromQuery($pdo, $sql, $data)->selectMultiple()->setSize(6)->required()->selected($selected);
- $row = $form->addRow()->addClass('class bg-blue-100');
+ $row = $form->addRow()->addClass('class bg-blue-50');
$row->addLabel('classesStaff', __('Include Staff?'));
$row->addYesNo('classesStaff')->selected($selectedByRole['staff']);
- $row = $form->addRow()->addClass('class bg-blue-100');
+ $row = $form->addRow()->addClass('class bg-blue-50');
$row->addLabel('classesStudents', __('Include Students?'));
$row->addYesNo('classesStudents')->selected($selectedByRole['students']);
if (isActionAccessible($guid, $connection2, "/modules/Messenger/messenger_post.php", "New Message_classes_parents")) {
- $row = $form->addRow()->addClass('class bg-blue-100');
+ $row = $form->addRow()->addClass('class bg-blue-50');
$row->addLabel('classesParents', __('Include Parents?'));
$row->addYesNo('classesParents')->selected($selectedByRole['parents']);
}
@@ -499,20 +499,20 @@ public function createForm($action, $gibbonMessengerID = null)
$sql = "SELECT gibbonActivity.gibbonActivityID as value, name FROM gibbonActivity JOIN gibbonActivityStudent ON (gibbonActivityStudent.gibbonActivityID=gibbonActivity.gibbonActivityID) WHERE gibbonPersonID=:gibbonPersonID AND gibbonSchoolYearID=:gibbonSchoolYearID AND status='Accepted' AND active='Y' ORDER BY name";
}
}
- $row = $form->addRow()->addClass('activity bg-blue-100');
+ $row = $form->addRow()->addClass('activity bg-blue-50');
$row->addLabel('activities[]', __('Select Activities'));
$row->addSelect('activities[]')->fromQuery($pdo, $sql, $data)->selectMultiple()->setSize(6)->required()->selected($selected);
- $row = $form->addRow()->addClass('activity bg-blue-100');
+ $row = $form->addRow()->addClass('activity bg-blue-50');
$row->addLabel('activitiesStaff', __('Include Staff?'));
$row->addYesNo('activitiesStaff')->selected($selectedByRole['staff']);
- $row = $form->addRow()->addClass('activity bg-blue-100');
+ $row = $form->addRow()->addClass('activity bg-blue-50');
$row->addLabel('activitiesStudents', __('Include Students?'));
$row->addYesNo('activitiesStudents')->selected($selectedByRole['students']);
if (isActionAccessible($guid, $connection2, "/modules/Messenger/messenger_post.php", "New Message_activities_parents")) {
- $row = $form->addRow()->addClass('activity bg-blue-100');
+ $row = $form->addRow()->addClass('activity bg-blue-50');
$row->addLabel('activitiesParents', __('Include Parents?'));
$row->addYesNo('activitiesParents')->selected($selectedByRole['parents']);
}
@@ -530,7 +530,7 @@ public function createForm($action, $gibbonMessengerID = null)
$form->toggleVisibilityByClass('applicants')->onRadio('applicants')->when('Y');
$sql = "SELECT gibbonSchoolYearID as value, name FROM gibbonSchoolYear ORDER BY sequenceNumber DESC";
- $row = $form->addRow()->addClass('applicants bg-blue-100');
+ $row = $form->addRow()->addClass('applicants bg-blue-50');
$row->addLabel('applicantList[]', __('Select Years'));
$row->addSelect('applicantList[]')->fromQuery($pdo, $sql)->selectMultiple()->setSize(6)->required()->selected($selected);
@@ -560,7 +560,7 @@ public function createForm($action, $gibbonMessengerID = null)
$data = array('gibbonPersonID' => $this->session->get('gibbonPersonID'));
$sql = "SELECT gibbonHouse.gibbonHouseID as value, name FROM gibbonHouse JOIN gibbonPerson ON (gibbonHouse.gibbonHouseID=gibbonPerson.gibbonHouseID) WHERE gibbonPersonID=:gibbonPersonID ORDER BY name";
}
- $row = $form->addRow()->addClass('houses bg-blue-100');
+ $row = $form->addRow()->addClass('houses bg-blue-50');
$row->addLabel('houseList[]', __('Select Houses'));
$row->addSelect('houseList[]')->fromQuery($pdo, $sql, $data)->selectMultiple()->setSize(6)->required()->selected($selected);
}
@@ -585,20 +585,20 @@ public function createForm($action, $gibbonMessengerID = null)
}, []));
sort($transportList, SORT_NATURAL);
- $row = $form->addRow()->addClass('transport bg-blue-100');
+ $row = $form->addRow()->addClass('transport bg-blue-50');
$row->addLabel('transports[]', __('Select Transport'));
$row->addSelect('transports[]')->fromArray($transportList)->selectMultiple()->setSize(6)->required()->selected($selected);
- $row = $form->addRow()->addClass('transport bg-blue-100');
+ $row = $form->addRow()->addClass('transport bg-blue-50');
$row->addLabel('transportStaff', __('Include Staff?'));
$row->addYesNo('transportStaff')->selected($selectedByRole['staff']);
- $row = $form->addRow()->addClass('transport bg-blue-100');
+ $row = $form->addRow()->addClass('transport bg-blue-50');
$row->addLabel('transportStudents', __('Include Students?'));
$row->addYesNo('transportStudents')->selected($selectedByRole['students']);
if (isActionAccessible($guid, $connection2, "/modules/Messenger/messenger_post.php", "New Message_transport_parents")) {
- $row = $form->addRow()->addClass('transport bg-blue-100');
+ $row = $form->addRow()->addClass('transport bg-blue-50');
$row->addLabel('transportParents', __('Include Parents?'));
$row->addYesNo('transportParents')->selected($selectedByRole['parents']);
}
@@ -631,15 +631,15 @@ public function createForm($action, $gibbonMessengerID = null)
});
$attendanceCodes = array_column($attendanceCodes, 'name');
- $row = $form->addRow()->addClass('attendance bg-blue-100');
+ $row = $form->addRow()->addClass('attendance bg-blue-50');
$row->addLabel('attendanceStatus[]', __('Select Attendance Status'));
$row->addSelect('attendanceStatus[]')->fromArray($attendanceCodes)->selectMultiple()->setSize(6)->required()->selected($selected);
- $row = $form->addRow()->addClass('attendance bg-blue-100');
+ $row = $form->addRow()->addClass('attendance bg-blue-50');
$row->addLabel('attendanceStudents', __('Include Students?'));
$row->addYesNo('attendanceStudents')->selected($selectedByRole['students']);
- $row = $form->addRow()->addClass('attendance bg-blue-100');
+ $row = $form->addRow()->addClass('attendance bg-blue-50');
$row->addLabel('attendanceParents', __('Include Parents?'));
$row->addYesNo('attendanceParents')->selected($selectedByRole['parents']);
}
@@ -667,20 +667,20 @@ public function createForm($action, $gibbonMessengerID = null)
";
}
- $row = $form->addRow()->addClass('messageGroup bg-blue-100');
+ $row = $form->addRow()->addClass('messageGroup bg-blue-50');
$row->addLabel('groups[]', __('Select Groups'));
$row->addSelect('groups[]')->fromQuery($pdo, $sql, $data)->selectMultiple()->setSize(6)->required()->selected($selected);
- $row = $form->addRow()->addClass('messageGroup bg-blue-100');
+ $row = $form->addRow()->addClass('messageGroup bg-blue-50');
$row->addLabel('groupsStaff', __('Include Staff?'));
$row->addYesNo('groupsStaff')->selected($selectedByRole['staff']);
- $row = $form->addRow()->addClass('messageGroup bg-blue-100');
+ $row = $form->addRow()->addClass('messageGroup bg-blue-50');
$row->addLabel('groupsStudents', __('Include Students?'));
$row->addYesNo('groupsStudents')->selected($selectedByRole['students']);
if (isActionAccessible($guid, $connection2, "/modules/Messenger/messenger_post.php", "New Message_groups_parents")) {
- $row = $form->addRow()->addClass('messageGroup bg-blue-100');
+ $row = $form->addRow()->addClass('messageGroup bg-blue-50');
$row->addLabel('groupsParents', __('Include Parents?'))->description('Parents who are members, and parents of student members.');
$row->addYesNo('groupsParents')->selected($selectedByRole['parents']);
}
@@ -734,7 +734,7 @@ public function createForm($action, $gibbonMessengerID = null)
}, array());
$selectedIndividuals = array_intersect_key($individuals, array_flip($selected));
- $row = $form->addRow()->addClass('individuals bg-blue-100');
+ $row = $form->addRow()->addClass('individuals bg-blue-50');
$col = $row->addColumn();
$col->addLabel('individualList', __('Select Individuals'));
$select = $col->addMultiSelect('individualList')->required();
@@ -760,9 +760,9 @@ public function createForm($action, $gibbonMessengerID = null)
$form->toggleVisibilityByClass('noEmail')->onRadio('email')->when('N');
$row = $form->addRow('stickySubmit');
- $col = $row->addColumn()->addClass('items-center');
- $col->addButton(__('Save Draft'))->onClick('saveDraft()')->addClass('rounded-sm w-auto mr-2');
- $col = $row->addColumn()->addClass('items-center');
+ $col = $row->addColumn()->setClass('flex-shrink items-center');
+ $col->addButton(__('Save Draft'))->setAttribute('@click', 'checkDraft(); if ($validate.isComplete("messengerMessage")) { saveDraft() } else { invalid = true; }');
+ $col = $row->addColumn()->setID('Submit')->addClass('items-center');
$col->addSubmit(__('Preview & Send'))->addClass('email');
$col->addSubmit()->addClass('noEmail');
}
diff --git a/modules/Planner/conceptExplorer.php b/modules/Planner/conceptExplorer.php
index 26dedcd781..0813550d74 100644
--- a/modules/Planner/conceptExplorer.php
+++ b/modules/Planner/conceptExplorer.php
@@ -58,7 +58,7 @@
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->setTitle(__('Choose Concept'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/conceptExplorer.php');
diff --git a/modules/Planner/moduleFunctions.php b/modules/Planner/moduleFunctions.php
index 035e26b2ab..59ee655e79 100644
--- a/modules/Planner/moduleFunctions.php
+++ b/modules/Planner/moduleFunctions.php
@@ -297,27 +297,30 @@ function sidebarExtra($guid, $connection2, $todayStamp, $gibbonPersonID, $dateSt
$output = '';
// Date Chooser
- $form = Form::create('dateChooser', $session->get('absoluteURL').'/index.php', 'get');
+ $form = Form::createBlank('dateChooser', $session->get('absoluteURL').'/index.php', 'get')->enableQuickSubmit();
$form->setTitle(__('Choose A Date'));
- $form->setClass('smallIntBorder w-full');
$form->addHiddenValue('q', '/modules/Planner/planner.php');
$form->addHiddenValue('search', $gibbonPersonID);
+ $form->addHiddenValue('gibbonCourseClassID', $gibbonCourseClassID);
- $row = $form->addRow();
+ $row = $form->addRow()->addClass('flex');
$row->addDate('dateHuman', $session->get('gibbonSchoolYearID'), $gibbonPersonID)
- ->setValue(Format::date($dateStamp ? date('Y-m-d', $dateStamp) : ''))
+ ->setValue(date('Y-m-d', $dateStamp))
->setID('dateHuman')
- ->setClass('float-none w-full');
- $row->addSubmit(__('Go'));
+ ->setClass('flex-grow')
+ ->groupAlign('left');
+ $row->addSubmit(__('Go'), 'planner1')
+ ->setType('quickSubmit')
+ ->groupAlign('right')
+ ->setClass('flex');
$output .= $form->getOutput();
// Class Chooser
- $form = Form::create('classChooser', $session->get('absoluteURL').'/index.php', 'get');
+ $form = Form::createBlank('classChooser', $session->get('absoluteURL').'/index.php', 'get')->enableQuickSubmit();
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->setTitle(__('Choose A Class'));
- $form->setClass('smallIntBorder w-full');
$form->addHiddenValue('q', '/modules/Planner/planner.php');
$form->addHiddenValue('search', $gibbonPersonID);
@@ -345,14 +348,18 @@ function sidebarExtra($guid, $connection2, $todayStamp, $gibbonPersonID, $dateSt
}
}
- $row = $form->addRow();
+ $row = $form->addRow()->addClass('flex');
$row->addSelect('gibbonCourseClassID', $session->get('gibbonSchoolYearID'), $gibbonPersonID)
->setID('gibbonCourseClassIDSidebar')
->fromArray($classes)
->selected($gibbonCourseClassID)
->placeholder()
- ->setClass('float-none w-full');
- $row->addSubmit(__('Go'));
+ ->setClass('flex-grow')
+ ->groupAlign('left');
+ $row->addSubmit(__('Go'), 'planner2')
+ ->setType('quickSubmit')
+ ->groupAlign('right')
+ ->setClass('flex');
$output .= $form->getOutput();
$output .= '
';
@@ -422,22 +429,25 @@ function sidebarExtraUnits($guid, $connection2, $gibbonCourseID, $gibbonSchoolYe
];
}
- $form = Form::create('courseChooser', $session->get('absoluteURL').'/index.php', 'get');
+ $form = Form::createBlank('courseChooser', $session->get('absoluteURL').'/index.php', 'get')->enableQuickSubmit();
$form->setTitle(__('Choose A Course'));
- $form->setClass('smallIntBorder w-full');
$form->addHiddenValue('q', '/modules/Planner/units.php');
$form->addHiddenValue('gibbonSchoolYearID', $gibbonSchoolYearID);
$form->addHiddenValue('viewBy', 'class');
- $row = $form->addRow();
+ $row = $form->addRow()->addClass('flex');
$row->addSelect('gibbonCourseID')
->setID('gibbonCourseIDSidebar')
->fromArray($courses)
->selected($gibbonCourseID)
->placeholder()
- ->setClass('float-none w-full');
- $row->addSubmit(__('Go'));
+ ->groupAlign('left')
+ ->setClass('flex-grow');
+ $row->addSubmit(__('Go'), 'units')
+ ->setType('quickSubmit')
+ ->groupAlign('right')
+ ->setClass('flex');
$output .= $form->getOutput();
}
diff --git a/modules/Planner/outcomes.php b/modules/Planner/outcomes.php
index fb6adeddfb..98df0f2f10 100644
--- a/modules/Planner/outcomes.php
+++ b/modules/Planner/outcomes.php
@@ -47,7 +47,7 @@
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/outcomes.php');
diff --git a/modules/Planner/planner.php b/modules/Planner/planner.php
index 2aa550bece..3564298245 100644
--- a/modules/Planner/planner.php
+++ b/modules/Planner/planner.php
@@ -23,6 +23,8 @@
use Gibbon\Forms\Form;
use Gibbon\Services\Format;
use Gibbon\Domain\Planner\PlannerEntryGateway;
+use Gibbon\Module\Planner\Tables\LessonTable;
+use Gibbon\Domain\Students\StudentGateway;
//Module includes
require_once __DIR__ . '/moduleFunctions.php';
@@ -44,22 +46,21 @@
$homeworkNameSingular = $settingGateway->getSettingByScope('Planner', 'homeworkNameSingular');
$homeworkNamePlural = $settingGateway->getSettingByScope('Planner', 'homeworkNamePlural');
+ $gibbonSchoolYearID = $session->get('gibbonSchoolYearID');
//Proceed!
//Get viewBy, date and class variables
- $viewBy = null;
- if (isset($_GET['viewBy'])) {
- $viewBy = $_GET['viewBy'] ?? '';
- }
- $subView = null;
- if (isset($_GET['subView'])) {
- $subView = $_GET['subView'] ?? '';
- }
+ $viewBy = $_GET['viewBy'] ?? '';
+ $search = $_GET['search'] ?? '';
+ $subView = $_GET['subView'] ?? '';
+
if ($viewBy != 'date' and $viewBy != 'class') {
$viewBy = 'date';
}
+
$gibbonCourseClassID = null;
$date = null;
$dateStamp = null;
+
if ($viewBy == 'date') {
if (isset($_GET['date'])) {
$date = $_GET['date'] ?? '';
@@ -84,1008 +85,102 @@
}
[$todayYear, $todayMonth, $todayDay] = explode('-', $today);
$todayStamp = mktime(12, 0, 0, $todayMonth, $todayDay, $todayYear);
- $gibbonPersonIDArray = [];
+
+ if ($viewBy == 'date' && isSchoolOpen($guid, date('Y-m-d', $dateStamp), $connection2) == false) {
+ $page->addWarning(__('School is closed on the specified day.'));
+ }
+
+ if ($viewBy == 'class' && empty($gibbonCourseClassID)) {
+ $page->addError(__('You have not specified one or more required parameters.'));
+ return;
+ }
//My children's classes
if ($highestAction == 'Lesson Planner_viewMyChildrensClasses') {
- $search = null;
- if (isset($_GET['search'])) {
- $search = $_GET['search'] ?? '';
- }
+
$page->breadcrumbs->add(__('My Children\'s Classes'));
- //Test data access field for permission
-
- $data = array('gibbonPersonID' => $session->get('gibbonPersonID'));
- $sql = "SELECT * FROM gibbonFamilyAdult WHERE gibbonPersonID=:gibbonPersonID AND childDataAccess='Y'";
- $result = $connection2->prepare($sql);
- $result->execute($data);
+ $studentGateway = $container->get(StudentGateway::class);
+ $children = $studentGateway
+ ->selectActiveStudentsByFamilyAdult($gibbonSchoolYearID, $session->get('gibbonPersonID'))
+ ->fetchGroupedUnique();
- if ($result->rowCount() < 1) {
- $page->addMessage(__('There are no records to display.'));
+ if (empty($children)) {
+ echo $page->getBlankSlate();
+ } elseif (count($children) == 1) {
+ $gibbonPersonID = key($children);
} else {
- //Get child list
- $count = 0;
- $options = array();
- while ($row = $result->fetch()) {
+ $form = Form::create('action', $session->get('absoluteURL').'/index.php', 'get');
+ $form->setTitle(__('Choose'));
+ $form->setClass('noIntBorder w-full');
- $dataChild = array('gibbonFamilyID' => $row['gibbonFamilyID'], 'gibbonSchoolYearID' => $session->get('gibbonSchoolYearID'));
- $sqlChild = "SELECT * FROM gibbonFamilyChild JOIN gibbonPerson ON (gibbonFamilyChild.gibbonPersonID=gibbonPerson.gibbonPersonID) JOIN gibbonStudentEnrolment ON (gibbonPerson.gibbonPersonID=gibbonStudentEnrolment.gibbonPersonID) JOIN gibbonFormGroup ON (gibbonStudentEnrolment.gibbonFormGroupID=gibbonFormGroup.gibbonFormGroupID) WHERE gibbonFamilyID=:gibbonFamilyID AND gibbonPerson.status='Full' AND (dateStart IS NULL OR dateStart<='".date('Y-m-d')."') AND (dateEnd IS NULL OR dateEnd>='".date('Y-m-d')."') AND gibbonStudentEnrolment.gibbonSchoolYearID=:gibbonSchoolYearID ORDER BY surname, preferredName ";
- $resultChild = $connection2->prepare($sqlChild);
- $resultChild->execute($dataChild);
- while ($rowChild = $resultChild->fetch()) {
- $options[$rowChild['gibbonPersonID']] = Format::name('', $rowChild['preferredName'], $rowChild['surname'], 'Student');
- $gibbonPersonIDArray[$count] = $rowChild['gibbonPersonID'];
- ++$count;
- }
- }
+ $form->addHiddenValue('address', $session->get('address'));
+ $form->addHiddenValue('q', '/modules/'.$session->get('module').'/planner.php');
+ $form->addHiddenValue('gibbonCourseClassID', $gibbonCourseClassID ?? '');
+ $form->addHiddenValue('viewBy', !empty($gibbonCourseClassID) ? 'class' : 'date');
- if ($count == 0) {
- $page->addMessage(__('There are no records to display.'));
- } elseif ($count == 1) {
- $search = $gibbonPersonIDArray[0];
- } else {
- echo '';
- echo __('Choose');
- echo ' ';
-
- $form = Form::create('action', $session->get('absoluteURL').'/index.php', 'get');
-
- $form->setClass('noIntBorder fullWidth');
+ $row = $form->addRow();
+ $row->addLabel('search', __('Student'));
+ $row->addSelect('search')
+ ->fromArray(Format::nameListArray($children, 'Student'))
+ ->selected($search)
+ ->placeholder();
- $form->addHiddenValue('address', $session->get('address'));
- $form->addHiddenValue('q', '/modules/'.$session->get('module').'/planner.php');
- if (isset($gibbonCourseClassID) && $gibbonCourseClassID != '') {
- $form->addHiddenValue('gibbonCourseClassID', $gibbonCourseClassID);
- $form->addHiddenValue('viewBy', 'class');
- }
- else {
- $form->addHiddenValue('viewBy', 'date');
- }
+ $row = $form->addRow();
+ $row->addFooter();
+ $row->addSearchSubmit($session);
- $row = $form->addRow();
- $row->addLabel('search', __('Student'));
- $row->addSelect('search')->fromArray($options)->selected($search)->placeholder();
-
- $row = $form->addRow();
- $row->addFooter();
- $row->addSearchSubmit($session);
-
- echo $form->getOutput();
- }
+ echo $form->getOutput();
$gibbonPersonID = $search;
+ }
- if ($search != '' and $count > 0) {
- //Confirm access to this student
-
- $dataChild = array('gibbonPersonID' => $session->get('gibbonPersonID'), 'gibbonPersonID2' => $gibbonPersonID);
- $sqlChild = "SELECT * FROM gibbonFamilyChild JOIN gibbonFamily ON (gibbonFamilyChild.gibbonFamilyID=gibbonFamily.gibbonFamilyID) JOIN gibbonFamilyAdult ON (gibbonFamilyAdult.gibbonFamilyID=gibbonFamily.gibbonFamilyID) JOIN gibbonPerson ON (gibbonFamilyChild.gibbonPersonID=gibbonPerson.gibbonPersonID) WHERE gibbonPerson.status='Full' AND (dateStart IS NULL OR dateStart<='".date('Y-m-d')."') AND (dateEnd IS NULL OR dateEnd>='".date('Y-m-d')."') AND gibbonFamilyChild.gibbonPersonID=:gibbonPersonID2 AND gibbonFamilyAdult.gibbonPersonID=:gibbonPersonID AND childDataAccess='Y'";
- $resultChild = $connection2->prepare($sqlChild);
- $resultChild->execute($dataChild);
-
- if ($resultChild->rowCount() < 1) {
- echo $page->getBlankSlate();
- } else {
- $rowChild = $resultChild->fetch();
-
- if ($count > 1) {
- echo '';
- echo __('Lessons');
- echo ' ';
- }
-
- //Print planner
- if ($viewBy == 'date') {
- if (isSchoolOpen($guid, date('Y-m-d', $dateStamp), $connection2) == false) {
- echo "";
- echo __('School is closed on the specified day.');
- echo '
';
- } else {
-
- $data = array('date1' => $date, 'gibbonPersonID1' => $gibbonPersonID, 'date2' => $date, 'gibbonPersonID2' => $gibbonPersonID);
- $sql = "
- (SELECT
- gibbonPlannerEntry.gibbonPlannerEntryID, gibbonUnitID, gibbonPlannerEntry.gibbonCourseClassID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class, gibbonPlannerEntry.name, timeStart, timeEnd, viewableStudents, viewableParents, homework, role, homeworkSubmission, homeworkCrowdAssess, date, gibbonPlannerEntryStudentHomework.homeworkDueDateTime AS myHomeworkDueDateTime
- FROM gibbonPlannerEntry
- JOIN gibbonCourseClass ON (gibbonPlannerEntry.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID)
- JOIN gibbonCourseClassPerson ON (gibbonCourseClass.gibbonCourseClassID=gibbonCourseClassPerson.gibbonCourseClassID)
- JOIN gibbonCourse ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID)
- LEFT JOIN gibbonPlannerEntryStudentHomework ON (gibbonPlannerEntryStudentHomework.gibbonPlannerEntryID=gibbonPlannerEntry.gibbonPlannerEntryID AND gibbonPlannerEntryStudentHomework.gibbonPersonID=gibbonCourseClassPerson.gibbonPersonID)
- WHERE date=:date1
- AND gibbonCourseClassPerson.gibbonPersonID=:gibbonPersonID1
- AND NOT role='Student - Left'
- AND NOT role='Teacher - Left')
- UNION
- (SELECT
- gibbonPlannerEntry.gibbonPlannerEntryID, gibbonUnitID, gibbonPlannerEntry.gibbonCourseClassID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class, gibbonPlannerEntry.name, timeStart, timeEnd, viewableStudents, viewableParents, homework, role, homeworkSubmission, homeworkCrowdAssess, date, NULL AS myHomeworkDueDateTime
- FROM gibbonPlannerEntry
- JOIN gibbonCourseClass ON (gibbonPlannerEntry.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID)
- JOIN gibbonPlannerEntryGuest ON (gibbonPlannerEntryGuest.gibbonPlannerEntryID=gibbonPlannerEntry.gibbonPlannerEntryID)
- JOIN gibbonCourse ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID)
- WHERE date=:date2
- AND gibbonPlannerEntryGuest.gibbonPersonID=:gibbonPersonID2)
- ORDER BY date, timeStart
- ";
- $result = $connection2->prepare($sql);
- $result->execute($data);
-
- //Only show add if user has edit rights
- if ($highestAction == 'Lesson Planner_viewAllEditMyClasses' or $highestAction == 'Lesson Planner_viewEditAllClasses') {
- echo "';
- }
-
- if ($result->rowCount() < 1) {
- echo $page->getBlankSlate();
- } else {
- echo "";
- echo "";
- echo '';
- echo __('Class');
- echo ' ';
- echo '';
- echo __('Lesson').'';
- echo "".__('Unit').' ';
- echo ' ';
- echo '';
- echo __('Time');
- echo ' ';
- echo '';
- echo __($homeworkNameSingular);
- echo ' ';
- echo '';
- echo __('Access');
- echo ' ';
- echo "";
- echo __('Actions');
- echo ' ';
- echo ' ';
-
- $count = 0;
- $rowNum = 'odd';
- while ($row = $result->fetch()) {
- if (!($row['role'] == 'Student' and $row['viewableParents'] == 'N')) {
- if ($count % 2 == 0) {
- $rowNum = 'even';
- } else {
- $rowNum = 'odd';
- }
- ++$count;
-
- //Highlight class in progress
- if ((date('H:i:s') > $row['timeStart']) and (date('H:i:s') < $row['timeEnd']) and ($date) == date('Y-m-d')) {
- $rowNum = 'current';
- }
-
- //COLOR ROW BY STATUS!
- echo "";
- echo '';
- echo $row['course'].'.'.$row['class'];
- echo ' ';
- echo '';
- echo ''.$row['name'].' ';
- echo "";
- $unit = getUnit($connection2, $row['gibbonUnitID'], $row['gibbonCourseClassID']);
- if (isset($unit[0])) {
- echo $unit[0];
- if ($unit[1] != '') {
- echo ''.$unit[1].' '.__('Unit').' ';
- }
- }
- echo ' ';
- echo ' ';
- echo '';
- echo substr($row['timeStart'], 0, 5).'-'.substr($row['timeEnd'], 0, 5);
- echo ' ';
- echo '';
- if ($row['homework'] == 'N' and $row['myHomeworkDueDateTime'] == '') {
- echo __('No');
- } else {
- if ($row['homework'] == 'Y') {
- echo __('Yes').': '.__('Teacher Recorded').' ';
- if ($row['homeworkSubmission'] == 'Y') {
- echo "+".__('Submission').' ';
- if ($row['homeworkCrowdAssess'] == 'Y') {
- echo "+".__('Crowd Assessment').' ';
- }
- }
- }
- if ($row['myHomeworkDueDateTime'] != '') {
- echo __('Yes').': '.__('Student Recorded').'';
- }
- }
- echo ' ';
- echo '';
- if ($row['viewableStudents'] == 'Y') {
- echo __('Students');
- }
- if ($row['viewableStudents'] == 'Y' and $row['viewableParents'] == 'Y') {
- echo ', ';
- }
- if ($row['viewableParents'] == 'Y') {
- echo __('Parents');
- }
- echo ' ';
- echo '';
- echo " ";
- echo ' ';
- echo ' ';
- }
- }
- echo '
';
- }
- }
- } elseif ($viewBy == 'class') {
- if ($gibbonCourseClassID == '') {
- $page->addError(__('You have not specified one or more required parameters.'));
- } else {
-
- $data = array('gibbonSchoolYearID' => $session->get('gibbonSchoolYearID'),'gibbonCourseClassID' => $gibbonCourseClassID, 'gibbonPersonID' => $gibbonPersonID);
- $sql = 'SELECT gibbonCourseClass.gibbonCourseClassID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class FROM gibbonCourseClassPerson JOIN gibbonCourseClass ON (gibbonCourseClassPerson.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonCourse ON (gibbonCourseClass.gibbonCourseID=gibbonCourse.gibbonCourseID) WHERE gibbonCourse.gibbonSchoolYearID=:gibbonSchoolYearID AND gibbonCourseClass.gibbonCourseClassID=:gibbonCourseClassID AND gibbonPersonID=:gibbonPersonID';
- $result = $connection2->prepare($sql);
- $result->execute($data);
-
- if ($result->rowCount() != 1) {
- $page->addError(__('The selected record does not exist, or you do not have access to it.'));
- } else {
- $row = $result->fetch();
-
- $data = array('gibbonCourseClassID1' => $gibbonCourseClassID, 'gibbonPersonID1' => $gibbonPersonID, 'gibbonCourseClassID2' => $gibbonCourseClassID, 'gibbonPersonID2' => $gibbonPersonID);
- $sql = "(SELECT gibbonPlannerEntry.gibbonPlannerEntryID, gibbonUnitID, gibbonPlannerEntry.gibbonCourseClassID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class, gibbonPlannerEntry.name, timeStart, timeEnd, viewableStudents, viewableParents, homework, role, homeworkSubmission, homeworkCrowdAssess, date, gibbonPlannerEntryStudentHomework.homeworkDueDateTime AS myHomeworkDueDateTime FROM gibbonPlannerEntry JOIN gibbonCourseClass ON (gibbonPlannerEntry.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonCourseClassPerson ON (gibbonCourseClass.gibbonCourseClassID=gibbonCourseClassPerson.gibbonCourseClassID) JOIN gibbonCourse ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID) LEFT JOIN gibbonPlannerEntryStudentHomework ON (gibbonPlannerEntryStudentHomework.gibbonPlannerEntryID=gibbonPlannerEntry.gibbonPlannerEntryID AND gibbonPlannerEntryStudentHomework.gibbonPersonID=gibbonCourseClassPerson.gibbonPersonID) WHERE gibbonPlannerEntry.gibbonCourseClassID=:gibbonCourseClassID1 AND gibbonCourseClassPerson.gibbonPersonID=:gibbonPersonID1 AND NOT role='Student - Left' AND NOT role='Teacher - Left') UNION (SELECT gibbonPlannerEntry.gibbonPlannerEntryID, gibbonUnitID, gibbonPlannerEntry.gibbonCourseClassID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class, gibbonPlannerEntry.name, timeStart, timeEnd, viewableStudents, viewableParents, homework, role, homeworkSubmission, homeworkCrowdAssess, date, NULL AS myHomeworkDueDateTime FROM gibbonPlannerEntry JOIN gibbonCourseClass ON (gibbonPlannerEntry.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonPlannerEntryGuest ON (gibbonPlannerEntryGuest.gibbonPlannerEntryID=gibbonPlannerEntry.gibbonPlannerEntryID) JOIN gibbonCourse ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID) WHERE gibbonPlannerEntry.gibbonCourseClassID=:gibbonCourseClassID2 AND gibbonPlannerEntryGuest.gibbonPersonID=:gibbonPersonID2) ORDER BY date DESC, timeStart DESC";
- $result = $connection2->prepare($sql);
- $result->execute($data);
-
- //Only show add if user has edit rights
- if ($highestAction == 'Lesson Planner_viewAllEditMyClasses' or $highestAction == 'Lesson Planner_viewEditAllClasses') {
- echo "';
- }
-
- if ($result->rowCount() < 1) {
- echo $page->getBlankSlate();
- } else {
- echo "";
- echo "";
- echo '';
- echo __('Date');
- echo ' ';
- echo '';
- echo __('Lesson').'';
- echo "".__('Unit').' ';
- echo ' ';
- echo '';
- echo __('Time');
- echo ' ';
- echo '';
- echo __($homeworkNameSingular);
- echo ' ';
- echo '';
- echo __('Access');
- echo ' ';
- echo "";
- echo __('Actions');
- echo ' ';
- echo ' ';
-
- $count = 0;
- $rowNum = 'odd';
- while ($row = $result->fetch()) {
- if (!($row['role'] == 'Student' and $row['viewableParents'] == 'N')) {
- if ($count % 2 == 0) {
- $rowNum = 'even';
- } else {
- $rowNum = 'odd';
- }
- ++$count;
-
- //Highlight class in progress
- if ((date('Y-m-d') == $row['date']) and (date('H:i:s') > $row['timeStart']) and (date('H:i:s') < $row['timeEnd'])) {
- $rowNum = 'current';
- }
+ if (!empty($gibbonPersonID) && !empty($children[$gibbonPersonID])) {
+ $student = $container->get(StudentGateway::class)->selectActiveStudentByPerson($gibbonSchoolYearID, $gibbonPersonID)->fetch();
- //COLOR ROW BY STATUS!
- echo "";
- echo '';
- if (!(is_null($row['date']))) {
- echo ''.Format::date($row['date']).' ';
- echo Format::dayOfWeekName($row['date']);
- }
- echo ' ';
- echo '';
- echo ''.$row['name'].' ';
- if ($row['gibbonUnitID'] != '') {
- $unit = getUnit($connection2, $row['gibbonUnitID'], $row['gibbonCourseClassID']);
- if (!empty($unit[0])) {
- echo "";
- echo $unit[0];
- if ($unit[1] != '') {
- echo ''.$unit[1].' '.__('Unit').' ';
- }
- echo ' ';
- }
+ if (empty($student)) {
+ echo $page->getBlankSlate();
+ } else {
+ $table = $container->get(LessonTable::class)->create($gibbonSchoolYearID, $gibbonCourseClassID, $gibbonPersonID, $date, $viewBy);
+ $table->setTitle(__('Lessons'));
- }
- echo ' ';
- echo '';
- if ($row['timeStart'] != '' and $row['timeEnd'] != '') {
- echo substr($row['timeStart'], 0, 5).'-'.substr($row['timeEnd'], 0, 5);
- }
- echo ' ';
- echo '';
- if ($row['homework'] == 'N' and $row['myHomeworkDueDateTime'] == '') {
- echo __('No');
- } else {
- if ($row['homework'] == 'Y') {
- echo __('Yes').': '.__('Teacher Recorded').' ';
- if ($row['homeworkSubmission'] == 'Y') {
- echo "+".__('Submission').' ';
- if ($row['homeworkCrowdAssess'] == 'Y') {
- echo "+".__('Crowd Assessment').' ';
- }
- }
- }
- if ($row['myHomeworkDueDateTime'] != '') {
- echo __('Yes').': '.__('Student Recorded').'';
- }
- }
- echo ' ';
- echo '';
- if ($row['viewableStudents'] == 'Y') {
- echo __('Students');
- }
- if ($row['viewableStudents'] == 'Y' and $row['viewableParents'] == 'Y') {
- echo ', ';
- }
- if ($row['viewableParents'] == 'Y') {
- echo __('Parents');
- }
- echo ' ';
- echo '';
- echo " ";
- echo ' ';
- echo ' ';
- }
- }
- echo '
';
- }
- }
- }
- }
- }
+ echo $table->getOutput();
}
}
+
}
//My Classes
elseif ($highestAction == 'Lesson Planner_viewMyClasses' or $highestAction == 'Lesson Planner_viewAllEditMyClasses' or $highestAction == 'Lesson Planner_viewEditAllClasses' or $highestAction == 'Lesson Planner_viewOnly') {
$gibbonPersonID = $session->get('gibbonPersonID');
+
+ $page->return->addReturns([
+ 'success1' => __('Bump was successful. It is possible that some lessons have not been moved (if there was no space for them), but a reasonable effort has been made.'),
+ ]);
+
if ($viewBy == 'date') {
$page->breadcrumbs->add(__('Planner for {classDesc}', [
'classDesc' => Format::date($date),
]));
-
- if (isSchoolOpen($guid, date('Y-m-d', $dateStamp), $connection2) == false) {
- echo "";
- echo __('School is closed on the specified day.');
- echo '
';
- } else {
-
- try {
- if ($highestAction == 'Lesson Planner_viewEditAllClasses' or $highestAction == 'Lesson Planner_viewOnly') {
- $data = array('date' => $date);
- $sql = "SELECT gibbonPlannerEntry.gibbonPlannerEntryID, gibbonUnitID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class, gibbonPlannerEntry.name, timeStart, timeEnd, viewableStudents, viewableParents, homework, 'Teacher' AS role, homeworkSubmission, homeworkCrowdAssess, date, gibbonPlannerEntry.gibbonCourseClassID, NULL AS myHomeworkDueDateTime FROM gibbonPlannerEntry JOIN gibbonCourseClass ON (gibbonPlannerEntry.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonCourse ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID) WHERE date=:date ORDER BY date, timeStart";
- } elseif ($highestAction == 'Lesson Planner_viewMyClasses' or $highestAction == 'Lesson Planner_viewAllEditMyClasses') {
- $data = array('date1' => $date, 'gibbonPersonID1' => $gibbonPersonID, 'date2' => $date, 'gibbonPersonID2' => $gibbonPersonID);
- $sql = "(SELECT gibbonPlannerEntry.gibbonPlannerEntryID, gibbonUnitID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class, gibbonPlannerEntry.name, timeStart, timeEnd, viewableStudents, viewableParents, homework, role, homeworkSubmission, homeworkCrowdAssess, date, gibbonPlannerEntry.gibbonCourseClassID, gibbonPlannerEntryStudentHomework.homeworkDueDateTime AS myHomeworkDueDateTime FROM gibbonPlannerEntry JOIN gibbonCourseClass ON (gibbonPlannerEntry.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonCourseClassPerson ON (gibbonCourseClass.gibbonCourseClassID=gibbonCourseClassPerson.gibbonCourseClassID) JOIN gibbonCourse ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID) LEFT JOIN gibbonPlannerEntryStudentHomework ON (gibbonPlannerEntryStudentHomework.gibbonPlannerEntryID=gibbonPlannerEntry.gibbonPlannerEntryID AND gibbonPlannerEntryStudentHomework.gibbonPersonID=gibbonCourseClassPerson.gibbonPersonID) WHERE date=:date1 AND gibbonCourseClassPerson.gibbonPersonID=:gibbonPersonID1 AND NOT role='Student - Left' AND NOT role='Teacher - Left') UNION (SELECT gibbonPlannerEntry.gibbonPlannerEntryID, gibbonUnitID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class, gibbonPlannerEntry.name, timeStart, timeEnd, viewableStudents, viewableParents, homework, role, homeworkSubmission, homeworkCrowdAssess, date, gibbonPlannerEntry.gibbonCourseClassID, NULL AS myHomeworkDueDateTime FROM gibbonPlannerEntry JOIN gibbonCourseClass ON (gibbonPlannerEntry.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonPlannerEntryGuest ON (gibbonPlannerEntryGuest.gibbonPlannerEntryID=gibbonPlannerEntry.gibbonPlannerEntryID) JOIN gibbonCourse ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID) WHERE date=:date2 AND gibbonPlannerEntryGuest.gibbonPersonID=:gibbonPersonID2) ORDER BY date, timeStart";
- }
- $result = $connection2->prepare($sql);
- $result->execute($data);
- } catch (PDOException $e) {
- }
-
- //Only show add if user has edit rights
- if ($highestAction == 'Lesson Planner_viewEditMyClasses' or $highestAction == 'Lesson Planner_viewEditAllClasses' or $highestAction == 'Lesson Planner_viewAllEditMyClasses') {
- echo "';
- }
-
- if ($result->rowCount() < 1) {
- echo $page->getBlankSlate();
- } else {
- echo "";
- echo "";
- echo '';
- echo __('Class');
- echo ' ';
- echo '';
- echo __('Lesson').'';
- echo "".__('Unit').' ';
- echo ' ';
- echo '';
- echo __('Time');
- echo ' ';
- echo '';
- echo __($homeworkNameSingular);
- echo ' ';
- echo '';
- echo __('Access');
- echo ' ';
- echo "";
- echo __('Actions');
- echo ' ';
- echo ' ';
-
- $count = 0;
- $rowNum = 'odd';
- while ($row = $result->fetch()) {
- if ((!($row['role'] == 'Student' and $row['viewableStudents'] == 'N')) and (!($row['role'] == 'Guest Student' and $row['viewableStudents'] == 'N'))) {
- if ($count % 2 == 0) {
- $rowNum = 'even';
- } else {
- $rowNum = 'odd';
- }
- ++$count;
-
- //Highlight class in progress
- if ((date('H:i:s') > $row['timeStart']) and (date('H:i:s') < $row['timeEnd']) and ($date) == date('Y-m-d')) {
- $rowNum = 'current';
- }
- //Dull out past classes
- if ((($row['date']) == date('Y-m-d') and (date('H:i:s') > $row['timeEnd'])) or ($row['date']) < date('Y-m-d')) {
- $rowNum = 'past';
- }
-
- //COLOR ROW BY STATUS!
- echo "";
- echo '';
- echo $row['course'].'.'.$row['class'];
- echo ' ';
- echo '';
- echo ''.$row['name'].' ';
- echo "";
- $unit = getUnit($connection2, $row['gibbonUnitID'], $row['gibbonCourseClassID']);
- if (isset($unit[0])) {
- echo $unit[0];
- if ($unit[1] != '') {
- echo ''.$unit[1].' '.__('Unit').' ';
- }
- }
- echo ' ';
- echo ' ';
- echo '';
- echo substr($row['timeStart'], 0, 5).'-'.substr($row['timeEnd'], 0, 5);
- echo ' ';
- echo '';
- if ($row['homework'] == 'N' and $row['myHomeworkDueDateTime'] == '') {
- echo __('No');
- } else {
- if ($row['homework'] == 'Y') {
- echo __('Yes').': '.__('Teacher Recorded').' ';
- if ($row['homeworkSubmission'] == 'Y') {
- echo "+".__('Submission').' ';
- if ($row['homeworkCrowdAssess'] == 'Y') {
- echo "+".__('Crowd Assessment').' ';
- }
- }
- }
- if ($row['myHomeworkDueDateTime'] != '') {
- echo __('Yes').': '.__('Student Recorded').'';
- }
- }
- echo ' ';
- if ($row['viewableStudents'] == 'Y') {
- echo __('Students');
- }
- if ($row['viewableStudents'] == 'Y' and $row['viewableParents'] == 'Y') {
- echo ', ';
- }
- if ($row['viewableParents'] == 'Y') {
- echo __('Parents');
- }
- echo ' ';
- echo '';
- echo " ";
- if ($highestAction == 'Lesson Planner_viewAllEditMyClasses' or $highestAction == 'Lesson Planner_viewEditAllClasses') {
- echo " ";
- echo " ";
- echo " ";
- }
- echo ' ';
- echo ' ';
- }
- }
- echo '
';
- }
- }
} elseif ($viewBy == 'class') {
- if ($gibbonCourseClassID == '') {
- $page->addError(__('You have not specified one or more required parameters.'));
- } else {
- if ($highestAction == 'Lesson Planner_viewEditAllClasses' or $highestAction == 'Lesson Planner_viewAllEditMyClasses' or $highestAction == 'Lesson Planner_viewOnly') {
-
- $data = array('gibbonSchoolYearID' => $session->get('gibbonSchoolYearID'), 'gibbonCourseClassID' => $gibbonCourseClassID);
- $sql = 'SELECT gibbonCourseClass.gibbonCourseClassID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class FROM gibbonCourseClass JOIN gibbonCourse ON (gibbonCourseClass.gibbonCourseID=gibbonCourse.gibbonCourseID) WHERE gibbonCourse.gibbonSchoolYearID=:gibbonSchoolYearID AND gibbonCourseClass.gibbonCourseClassID=:gibbonCourseClassID';
- $result = $connection2->prepare($sql);
- $result->execute($data);
- $teacher = false;
-
-
- $dataTeacher = array('gibbonSchoolYearID' => $session->get('gibbonSchoolYearID'), 'gibbonCourseClassID' => $gibbonCourseClassID, 'gibbonPersonID' => $session->get('gibbonPersonID'));
- $sqlTeacher = 'SELECT gibbonCourseClass.gibbonCourseClassID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class FROM gibbonCourseClassPerson JOIN gibbonCourseClass ON (gibbonCourseClassPerson.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonCourse ON (gibbonCourseClass.gibbonCourseID=gibbonCourse.gibbonCourseID) WHERE gibbonCourse.gibbonSchoolYearID=:gibbonSchoolYearID AND gibbonCourseClass.gibbonCourseClassID=:gibbonCourseClassID AND gibbonPersonID=:gibbonPersonID';
- $resultTeacher = $connection2->prepare($sqlTeacher);
- $resultTeacher->execute($dataTeacher);
- if ($resultTeacher->rowCount() > 0) {
- $teacher = true;
- }
- } elseif ($highestAction == 'Lesson Planner_viewMyClasses') {
-
- $data = array('gibbonSchoolYearID' => $session->get('gibbonSchoolYearID'), 'gibbonCourseClassID' => $gibbonCourseClassID, 'gibbonPersonID' => $session->get('gibbonPersonID'));
- $sql = 'SELECT gibbonCourseClass.gibbonCourseClassID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class FROM gibbonCourseClassPerson JOIN gibbonCourseClass ON (gibbonCourseClassPerson.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonCourse ON (gibbonCourseClass.gibbonCourseID=gibbonCourse.gibbonCourseID) WHERE gibbonCourse.gibbonSchoolYearID=:gibbonSchoolYearID AND gibbonCourseClass.gibbonCourseClassID=:gibbonCourseClassID AND gibbonPersonID=:gibbonPersonID';
- $result = $connection2->prepare($sql);
- $result->execute($data);
- }
-
- if ($result->rowCount() != 1) {
- $page->addError(__('The selected record does not exist, or you do not have access to it.'));
- } else {
- $row = $result->fetch();
-
- $page->breadcrumbs->add(__('Planner for {classDesc}', [
- 'classDesc' => $row['course'].'.'.$row['class'],
- ]));
-
- $returns = array();
- $returns['success1'] = __('Bump was successful. It is possible that some lessons have not been moved (if there was no space for them), but a reasonable effort has been made.');
- $page->return->addReturns($returns);
-
- try {
- if ($highestAction == 'Lesson Planner_viewEditAllClasses' or $highestAction == 'Lesson Planner_viewAllEditMyClasses' or $highestAction == 'Lesson Planner_viewOnly') {
- if ($subView == 'lesson' or $subView == '') {
- $data = array('gibbonCourseClassID' => $gibbonCourseClassID);
- $sql = "SELECT gibbonPlannerEntryID, gibbonUnitID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class, gibbonPlannerEntry.name, date, timeStart, timeEnd, viewableStudents, viewableParents, homework, 'Teacher' as role, homeworkSubmission, homeworkCrowdAssess, gibbonPlannerEntry.gibbonCourseClassID, NULL AS myHomeworkDueDateTime FROM gibbonPlannerEntry JOIN gibbonCourseClass ON (gibbonPlannerEntry.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonCourse ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID) WHERE gibbonPlannerEntry.gibbonCourseClassID=:gibbonCourseClassID ORDER BY date DESC, timeStart DESC";
- } else {
- $data = array('gibbonCourseClassID' => $gibbonCourseClassID);
- $sql = 'SELECT DISTINCT timeStart, timeEnd, date, gibbonTTColumnRow.name AS period, NULL AS myHomeworkDueDateTime FROM gibbonTTDayRowClass JOIN gibbonTTColumnRow ON (gibbonTTDayRowClass.gibbonTTColumnRowID=gibbonTTColumnRow.gibbonTTColumnRowID) JOIN gibbonTTColumn ON (gibbonTTColumnRow.gibbonTTColumnID=gibbonTTColumn.gibbonTTColumnID) JOIN gibbonTTDay ON (gibbonTTDayRowClass.gibbonTTDayID=gibbonTTDay.gibbonTTDayID) JOIN gibbonTTDayDate ON (gibbonTTDayDate.gibbonTTDayID=gibbonTTDay.gibbonTTDayID) WHERE gibbonCourseClassID=:gibbonCourseClassID ORDER BY date, timestart';
- }
- } elseif ($highestAction == 'Lesson Planner_viewMyClasses') {
- $data = array('gibbonCourseClassID' => $gibbonCourseClassID, 'gibbonPersonID' => $session->get('gibbonPersonID'));
- $sql = "SELECT gibbonPlannerEntry.gibbonPlannerEntryID, gibbonUnitID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class, gibbonPlannerEntry.name, date, timeStart, timeEnd, viewableStudents, viewableParents, homework, role, homeworkSubmission, homeworkCrowdAssess, gibbonPlannerEntry.gibbonCourseClassID, gibbonPlannerEntryStudentHomework.homeworkDueDateTime AS myHomeworkDueDateTime FROM gibbonPlannerEntry JOIN gibbonCourseClass ON (gibbonPlannerEntry.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonCourseClassPerson ON (gibbonCourseClass.gibbonCourseClassID=gibbonCourseClassPerson.gibbonCourseClassID) JOIN gibbonCourse ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID) LEFT JOIN gibbonPlannerEntryStudentHomework ON (gibbonPlannerEntryStudentHomework.gibbonPlannerEntryID=gibbonPlannerEntry.gibbonPlannerEntryID AND gibbonPlannerEntryStudentHomework.gibbonPersonID=gibbonCourseClassPerson.gibbonPersonID) WHERE gibbonPlannerEntry.gibbonCourseClassID=:gibbonCourseClassID AND gibbonCourseClassPerson.gibbonPersonID=:gibbonPersonID AND NOT role='Student - Left' AND NOT role='Teacher - Left' ORDER BY date DESC, timeStart DESC";
- }
- $result = $connection2->prepare($sql);
- $result->execute($data);
- } catch (PDOException $e) {
- }
-
- //Only show add if user has edit rights
- if ($highestAction == 'Lesson Planner_viewAllEditMyClasses' or $highestAction == 'Lesson Planner_viewEditAllClasses') {
- echo "";
- $style = '';
- if ($subView == 'lesson' or $subView == '') {
- $style = "style='font-weight: bold'";
- }
- echo "
".__('Lesson View').' | ';
- $style = '';
- if ($subView == 'year') {
- $style = "style='font-weight: bold'";
- }
- echo "
".__('Year Overview').' | ';
- echo "
".__('Add')." ";
- echo '
';
- }
-
- if ($result->rowCount() < 1) {
- echo $page->getBlankSlate();
- } else {
- //PRINT LESSON VIEW
- if ($subView == 'lesson' or $subView == '') {
- echo "";
- echo "";
- echo '';
- echo __('Date');
- echo ' ';
- echo '';
- echo __('Lesson').'';
- echo "".__('Unit').' ';
- echo ' ';
- echo '';
- echo __('Time');
- echo ' ';
- echo '';
- echo __($homeworkNameSingular);
- echo ' ';
- echo '';
- echo __('Access');
- echo ' ';
- echo "";
- echo __('Actions');
- echo ' ';
- echo ' ';
-
- $count = 0;
- $pastCount = 0;
- $rowNum = 'odd';
- while ($row = $result->fetch()) {
- if ((!($row['role'] == 'Student' and $row['viewableStudents'] == 'N')) and (!($row['role'] == 'Guest Student' and $row['viewableStudents'] == 'N'))) {
- if ($count % 2 == 0) {
- $rowNum = 'even';
- } else {
- $rowNum = 'odd';
- }
- ++$count;
-
- //Highlight class in progress
- if ((date('Y-m-d') == $row['date']) and (date('H:i:s') > $row['timeStart']) and (date('H:i:s') < $row['timeEnd'])) {
- $rowNum = 'current';
- }
-
- //Dull out past classes
- if ((($row['date']) == date('Y-m-d') and (date('H:i:s') > $row['timeEnd'])) or ($row['date']) < date('Y-m-d')) {
- $rowNum = 'past';
- if ($pastCount == 0) {
- echo "";
- echo "";
- echo ' ';
- }
- ++$pastCount;
- }
-
- //COLOR ROW BY STATUS!
- echo "";
- echo '';
- if (!(is_null($row['date']))) {
- echo ''.Format::date($row['date']).' ';
- echo Format::dayOfWeekName($row['date']);
- }
- echo ' ';
- echo '';
- echo ''.$row['name'].' ';
- echo "";
- $unit = getUnit($connection2, $row['gibbonUnitID'], $row['gibbonCourseClassID']);
- if (isset($unit[0])) {
- echo $unit[0];
- if (isset($unit[1])) {
- if ($unit[1] != '') {
- echo ''.$unit[1].' '.__('Unit').' ';
- }
- }
- }
- echo ' ';
- echo ' ';
- echo '';
- if ($row['timeStart'] != '' and $row['timeEnd'] != '') {
- echo substr($row['timeStart'], 0, 5).'-'.substr($row['timeEnd'], 0, 5);
- }
- echo ' ';
- echo '';
- if ($row['homework'] == 'N' and $row['myHomeworkDueDateTime'] == '') {
- echo __('No');
- } else {
- if ($row['homework'] == 'Y') {
- echo __('Yes').': '.__('Teacher Recorded').' ';
- if ($row['homeworkSubmission'] == 'Y') {
- echo "+".__('Submission').' ';
- if ($row['homeworkCrowdAssess'] == 'Y') {
- echo "+".__('Crowd Assessment').' ';
- }
- }
- }
- if ($row['myHomeworkDueDateTime'] != '') {
- echo __('Yes').': '.__('Student Recorded').'';
- }
- }
- echo ' ';
- echo '';
- if ($row['viewableStudents'] == 'Y') {
- echo __('Students');
- }
- if ($row['viewableStudents'] == 'Y' and $row['viewableParents'] == 'Y') {
- echo ', ';
- }
- if ($row['viewableParents'] == 'Y') {
- echo __('Parents');
- }
- echo ' ';
- echo '';
- echo " ";
- if ((($highestAction == 'Lesson Planner_viewAllEditMyClasses' and $teacher == true) or $highestAction == 'Lesson Planner_viewEditAllClasses')) {
- echo " ";
- echo " ";
- echo " ";
- }
- if ($highestAction == 'Lesson Planner_viewAllEditMyClasses' or $highestAction == 'Lesson Planner_viewEditAllClasses') {
- echo " ";
- }
- echo ' ';
- echo ' ';
- }
- }
- echo '
';
- }
- //PRINT YEAR OVERVIEW
- else {
- $count = 0;
- $lessons = array();
- while ($rowNext = $result->fetch()) {
-
- $dataPlanner = array('date' => $rowNext['date'], 'timeStart' => $rowNext['timeStart'], 'timeEnd' => $rowNext['timeEnd'], 'gibbonCourseClassID' => $gibbonCourseClassID);
- $sqlPlanner = 'SELECT * FROM gibbonPlannerEntry WHERE date=:date AND timeStart=:timeStart AND timeEnd=:timeEnd AND gibbonCourseClassID=:gibbonCourseClassID';
- $resultPlanner = $connection2->prepare($sqlPlanner);
- $resultPlanner->execute($dataPlanner);
- if ($resultPlanner->rowCount() == 0) {
- $lessons[$count][0] = 'Unplanned';
- $lessons[$count][1] = $rowNext['date'];
- $lessons[$count][2] = $rowNext['timeStart'];
- $lessons[$count][3] = $rowNext['timeEnd'];
- $lessons[$count][4] = $rowNext['period'];
- $lessons[$count][6] = $rowNext['gibbonTTDayRowClassID'] ?? '';
- $lessons[$count][7] = $rowNext['gibbonTTDayDateID'] ?? '';
- $lessons[$count][11] = null;
- $lessons[$count][12] = null;
- $lessons[$count][13] = null;
- } else {
- $rowPlanner = $resultPlanner->fetch();
- $lessons[$count][0] = 'Planned';
- $lessons[$count][1] = $rowNext['date'];
- $lessons[$count][2] = $rowNext['timeStart'];
- $lessons[$count][3] = $rowNext['timeEnd'];
- $lessons[$count][4] = $rowNext['period'];
- $lessons[$count][5] = $rowPlanner['name'];
- $lessons[$count][6] = false;
- $lessons[$count][7] = false;
- $lessons[$count][11] = $rowPlanner['gibbonUnitID'];
- $lessons[$count][12] = $rowPlanner['gibbonPlannerEntryID'];
- $lessons[$count][13] = $rowPlanner['gibbonCourseClassID'];
- }
-
- //Check for special days
-
- $dataSpecial = array('date' => $rowNext['date']);
- $sqlSpecial = 'SELECT * FROM gibbonSchoolYearSpecialDay WHERE date=:date';
- $resultSpecial = $connection2->prepare($sqlSpecial);
- $resultSpecial->execute($dataSpecial);
-
- if ($resultSpecial->rowCount() == 1) {
- $rowSpecial = $resultSpecial->fetch();
- $lessons[$count][8] = $rowSpecial['type'];
- $lessons[$count][9] = $rowSpecial['schoolStart'];
- $lessons[$count][10] = $rowSpecial['schoolEnd'];
- } else {
- $lessons[$count][8] = false;
- $lessons[$count][9] = false;
- $lessons[$count][10] = false;
- }
-
- ++$count;
- }
-
- if (count($lessons) < 1) {
- echo $page->getBlankSlate();
- } else {
- //Get term dates
- $terms = array();
- $termCount = 0;
-
- $dataTerms = array('gibbonSchoolYearID' => $session->get('gibbonSchoolYearID'));
- $sqlTerms = 'SELECT * FROM gibbonSchoolYearTerm WHERE gibbonSchoolYearID=:gibbonSchoolYearID ORDER BY sequenceNumber';
- $resultTerms = $connection2->prepare($sqlTerms);
- $resultTerms->execute($dataTerms);
-
- while ($rowTerms = $resultTerms->fetch()) {
- $terms[$termCount][0] = $rowTerms['firstDay'];
- $terms[$termCount][1] = __('Start of').' '.$rowTerms['nameShort'];
- ++$termCount;
- $terms[$termCount][0] = $rowTerms['lastDay'];
- $terms[$termCount][1] = __('End of').' '.$rowTerms['nameShort'];
- ++$termCount;
- }
- //Get school closure special days
- $specials = array();
- $specialCount = 0;
-
- $dataSpecial = array('gibbonSchoolYearID' => $session->get('gibbonSchoolYearID'));
- $sqlSpecial = "SELECT gibbonSchoolYearSpecialDay.date, gibbonSchoolYearSpecialDay.name FROM gibbonSchoolYearSpecialDay JOIN gibbonSchoolYearTerm ON (gibbonSchoolYearSpecialDay.gibbonSchoolYearTermID=gibbonSchoolYearTerm.gibbonSchoolYearTermID) WHERE gibbonSchoolYearID=:gibbonSchoolYearID AND type='School Closure' ORDER BY date";
- $resultSpecial = $connection2->prepare($sqlSpecial);
- $resultSpecial->execute($dataSpecial);
-
- $lastName = '';
- $currentName = '';
- $lastDate = '';
- $currentDate = '';
- $originalDate = '';
- while ($rowSpecial = $resultSpecial->fetch()) {
- $currentName = $rowSpecial['name'];
- $currentDate = $rowSpecial['date'];
- if ($currentName != $lastName) {
- $currentName = $rowSpecial['name'];
- $specials[$specialCount][0] = $rowSpecial['date'];
- $specials[$specialCount][1] = $rowSpecial['name'];
- $specials[$specialCount][2] = Format::date($rowSpecial['date']);
- $originalDate = Format::date($rowSpecial['date']);
- ++$specialCount;
- } else {
- if ((strtotime($currentDate) - strtotime($lastDate)) == 86400) {
- $specials[$specialCount - 1][2] = $originalDate.' - '.Format::date($rowSpecial['date']);
- } else {
- $currentName = $rowSpecial['name'];
- $specials[$specialCount][0] = $rowSpecial['date'];
- $specials[$specialCount][1] = $rowSpecial['name'];
- $specials[$specialCount][2] = Format::date($rowSpecial['date']);
- $originalDate = Format::date($rowSpecial['date']);
- ++$specialCount;
- }
- }
- $lastName = $rowSpecial['name'];
- $lastDate = $rowSpecial['date'];
- }
-
- echo "";
- echo "";
- echo '';
- echo __('Lesson Number');
- echo ' ';
- echo '';
- echo __('Date');
- echo ' ';
- echo '';
- echo __('TT Period').' ';
- echo "".__('Time')." & ".__('Facility')." ";
- echo ' ';
- echo '';
- echo __('Planned Lesson').' ';
- echo "".__('Unit')." ";
- echo ' ';
- echo '';
- echo __('Actions');
- echo ' ';
- echo ' ';
-
- $count = 0;
- $termCount = 0;
- $specialCount = 0;
- $classCount = 0;
- $rowNum = 'odd';
- $divide = false; //Have we passed gotten to today yet?
-
- foreach ($lessons as $lesson) {
- if ($count % 2 == 0) {
- $rowNum = 'even';
- } else {
- $rowNum = 'odd';
- }
-
- $style = '';
- if ($lesson[1] >= date('Y-m-d') and $divide == false) {
- $divide = true;
- $style = "style='border-top: 2px solid #333'";
- }
-
- if ($divide == false) {
- $rowNum = 'error';
- }
- ++$count;
-
- //Spit out row for start of term
- while ($termCount < (count($terms) - 1) && $lesson['1'] >= $terms[$termCount][0]) {
- if (substr($terms[$termCount][1], 0, 3) == 'End' and $lesson['1'] == $terms[$termCount][0]) {
- break;
- } else {
- echo "";
- echo '';
- echo ''.$terms[$termCount][1].' ';
- echo ' ';
- echo '';
- echo Format::date($terms[$termCount][0]);
- echo ' ';
- echo ' ';
- ++$termCount;
- }
- }
-
- //Spit out row for special day
- while ($lesson['1'] >= @$specials[$specialCount][0] and $specialCount < count($specials)) {
- echo "";
- echo '';
- echo ''.$specials[$specialCount][1].' ';
- echo ' ';
- echo '';
- echo $specials[$specialCount][2];
- echo ' ';
- echo ' ';
- ++$specialCount;
- }
-
- //COLOR ROW BY STATUS!
- if ($lesson[8] != 'School Closure') {
-
- $times = $plannerEntryGateway->getPlannerTTByClassTimes($gibbonCourseClassID, $lesson[1], $lesson[2], $lesson[3]);
-
- echo "";
- echo "";
- echo "".__('Lesson')." ".($classCount + 1)." ";
- echo " ";
- echo "";
- echo ''.Format::date($lesson['1']).' ';
- echo Format::dayOfWeekName($lesson['1']).' ';
- echo Format::monthName($lesson['1']).' ';
- if ($lesson[8] == 'Timing Change') {
- echo ''.$lesson[8].' ('.substr($lesson[9], 0, 5).'-'.substr($lesson[10], 0, 5).') ';
- }
- echo ' ';
- echo "";
- echo $lesson['4'].' ';
- echo "".substr($lesson['2'], 0, 5).' - '.substr($lesson['3'], 0, 5).' ';
- echo "".($times['spaceName'] ?? '')." ";
- echo ' ';
- echo "";
- if ($lesson['0'] == 'Planned') {
- echo ''.$lesson['5'].' ';
- $unit = getUnit($connection2, $lesson[11], $lesson[13]);
- if (isset($unit[0])) {
- echo "";
- echo $unit[0];
- if (isset($unit[1])) {
- if ($unit[1] != '') {
- echo ''.$unit[1].' Unit ';
- }
- }
- echo ' ';
- }
- }
- echo ' ';
- echo "";
- if ($lesson['0'] == 'Unplanned') {
- echo " ";
- } else {
- echo " ";
- if ((($highestAction == 'Lesson Planner_viewAllEditMyClasses' and $teacher == true) or $highestAction == 'Lesson Planner_viewEditAllClasses')) {
- echo " ";
- echo " ";
- echo " ";
- echo " ";
- }
- }
- echo ' ';
- echo ' ';
- ++$classCount;
- }
-
- //Spit out row for end of term/year
- while ($lesson['1'] >= @$terms[$termCount][0] and $termCount < count($terms) and substr($terms[$termCount][1], 0, 3) == 'End') {
- echo "";
- echo '';
- echo ''.$terms[$termCount][1].' ';
- echo ' ';
- echo '';
- echo Format::date($terms[$termCount][0]);
- echo ' ';
- echo ' ';
- ++$termCount;
- }
- }
-
- if (@$terms[$termCount][0] != '') {
- echo "";
- echo '';
- echo ''.$terms[$termCount][1].' ';
- echo ' ';
- echo '';
- echo Format::date($terms[$termCount][0]);
- echo ' ';
- echo ' ';
- }
- echo '
';
- }
- }
- }
- }
+ $planner = $plannerEntryGateway->getPlannerClassDetails($gibbonCourseClassID);
+ if (empty($planner)) {
+ $page->addError(__('The selected record does not exist, or you do not have access to it.'));
+ return;
}
+
+ $page->breadcrumbs->add(__('Planner for {classDesc}', [
+ 'classDesc' => $planner['course'].'.'.$planner['class'],
+ ]));
}
+
+ $viewBy = $subView == 'year' ? 'year' : $viewBy;
+
+ $table = $container->get(LessonTable::class)->create($gibbonSchoolYearID, $gibbonCourseClassID, $gibbonPersonID, $date, $viewBy);
+ echo $table->getOutput();
}
}
- if ($gibbonPersonID != '') {
+
+ if (!empty($gibbonPersonID)) {
//Print sidebar
$session->set('sidebarExtra', sidebarExtra($guid, $connection2, $todayStamp, $gibbonPersonID, $dateStamp, $gibbonCourseClassID));
}
diff --git a/modules/Planner/planner_add.php b/modules/Planner/planner_add.php
index 2410cdc2a2..a3518c36b1 100644
--- a/modules/Planner/planner_add.php
+++ b/modules/Planner/planner_add.php
@@ -383,7 +383,6 @@
$row->addSelect('role')->fromArray($roles);
$row = $form->addRow();
- $row->addFooter();
$row->addCheckbox('notify')->description(__('Notify all class participants'));
$row->addSubmit();
diff --git a/modules/Planner/planner_addProcess.php b/modules/Planner/planner_addProcess.php
index c3be201847..6f56ac9580 100644
--- a/modules/Planner/planner_addProcess.php
+++ b/modules/Planner/planner_addProcess.php
@@ -24,6 +24,7 @@
use Gibbon\Domain\System\NotificationGateway;
use Gibbon\Data\Validator;
use Gibbon\Forms\CustomFieldHandler;
+use Gibbon\Forms\Builder\Storage\FormSessionStorage;
include '../../gibbon.php';
@@ -267,6 +268,9 @@
header("Location: {$URL}");
exit();
} else {
+ // Clear autosave
+ $container->get(FormSessionStorage::class)->clear('plannerAdd');
+
//Jump to Markbook?
$markbook = $_POST['markbook'] ?? '';
if ($markbook == 'Y') {
diff --git a/modules/Planner/planner_deadlines.php b/modules/Planner/planner_deadlines.php
index 09f9243306..d7f783c86b 100644
--- a/modules/Planner/planner_deadlines.php
+++ b/modules/Planner/planner_deadlines.php
@@ -146,7 +146,7 @@
$form = Form::create('action', $session->get('absoluteURL').'/index.php', 'get');
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/planner_deadlines.php');
diff --git a/modules/Planner/planner_edit.php b/modules/Planner/planner_edit.php
index 0165e12a94..20cc155796 100644
--- a/modules/Planner/planner_edit.php
+++ b/modules/Planner/planner_edit.php
@@ -426,7 +426,6 @@
$row->addSelect('role')->fromArray($roles);
$row = $form->addRow();
- $row->addFooter();
$row->addCheckbox('notify')->description(__('Notify all class participants'));
$row->addSubmit();
diff --git a/modules/Planner/planner_view_full.php b/modules/Planner/planner_view_full.php
index 6cd25c8f6e..0e017f8092 100644
--- a/modules/Planner/planner_view_full.php
+++ b/modules/Planner/planner_view_full.php
@@ -32,6 +32,7 @@
use Gibbon\Tables\DataTable;
use Gibbon\Forms\CustomFieldHandler;
use Gibbon\Domain\Timetable\TimetableDayDateGateway;
+use Gibbon\Http\Url;
//Module includes
require_once __DIR__ . '/moduleFunctions.php';
@@ -49,6 +50,7 @@
} else {
$settingGateway = $container->get(SettingGateway::class);
+ $plannerEntryGateway = $container->get(PlannerEntryGateway::class);
$homeworkNameSingular = $settingGateway->getSettingByScope('Planner', 'homeworkNameSingular');
$homeworkNamePlural = $settingGateway->getSettingByScope('Planner', 'homeworkNamePlural');
@@ -188,16 +190,11 @@
// planner's parameters
$params = [];
$params['gibbonPlannerEntryID'] = $gibbonPlannerEntryID;
- if ($date != '') {
- $params['date'] = $_GET['date'] ?? '';
- }
- if ($viewBy != '') {
- $params['viewBy'] = $_GET['viewBy'] ?? '';
- }
- if ($gibbonCourseClassID != '') {
- $params['gibbonCourseClassID'] = $gibbonCourseClassID;
- }
+ $params['gibbonCourseClassID'] = $values['gibbonCourseClassID'];
+ $params['date'] = $values['date'];
+ $params['viewBy'] = $viewBy;
$params['subView'] = $subView;
+ $params['search'] = $gibbonPersonID;
$paramsVar = '&' . http_build_query($params); // for backward compatibile uses below (should be get rid of)
$roleCategory = $session->get('gibbonRoleIDCurrentCategory');
@@ -240,98 +237,72 @@
}
}
echo '';
- echo "";
+
+ echo '
';
+
+
+
+ $dataMarkbook = array('gibbonCourseClassID' => $values['gibbonCourseClassID'], 'gibbonPlannerEntryID' => $gibbonPlannerEntryID);
+ $sqlMarkbook = 'SELECT gibbonMarkbookColumnID FROM gibbonMarkbookColumn WHERE gibbonCourseClassID=:gibbonCourseClassID AND gibbonPlannerEntryID=:gibbonPlannerEntryID';
+ $gibbonMarkbookColumnID = $pdo->selectOne($sqlMarkbook, $dataMarkbook);
+
+
+ // Details Table
+ $table = DataTable::createDetails('overview');
+
if (strstr($values['role'], 'Guest') == false) {
- //Links to previous and next lessons
- echo "";
- echo "".__('For this class:').' ';
- try {
- if ($values['role'] == 'Teacher' or $highestAction == 'Lesson Planner_viewOnly') {
- $dataPrevious = array('gibbonCourseClassID' => $values['gibbonCourseClassID'], 'date1' => $values['date'], 'date2' => $values['date'], 'timeStart' => $values['timeStart']);
- $sqlPrevious = "SELECT gibbonPlannerEntry.gibbonCourseClassID, gibbonPlannerEntryID, gibbonUnitID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class, gibbonPlannerEntry.name, timeStart, timeEnd, viewableStudents, viewableParents, homework, 'Teacher' AS role FROM gibbonPlannerEntry JOIN gibbonCourseClass ON (gibbonPlannerEntry.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonCourse ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID) WHERE gibbonPlannerEntry.gibbonCourseClassID=:gibbonCourseClassID AND (date<:date1 OR (date=:date2 AND timeStart<:timeStart)) ORDER BY date DESC, timeStart DESC";
- } else {
- if ($highestAction == 'Lesson Planner_viewMyChildrensClasses') {
- $dataPrevious = array('gibbonCourseClassID' => $values['gibbonCourseClassID'], 'gibbonPersonID' => $gibbonPersonID, 'date1' => $values['date'], 'date2' => $values['date'], 'timeStart' => $values['timeStart']);
- $sqlPrevious = "SELECT gibbonPlannerEntry.gibbonCourseClassID, gibbonPlannerEntryID, gibbonUnitID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class, gibbonPlannerEntry.name, timeStart, timeEnd, viewableStudents, viewableParents, homework, role FROM gibbonPlannerEntry JOIN gibbonCourseClass ON (gibbonPlannerEntry.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonCourseClassPerson ON (gibbonCourseClass.gibbonCourseClassID=gibbonCourseClassPerson.gibbonCourseClassID) JOIN gibbonCourse ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID) WHERE gibbonPlannerEntry.gibbonCourseClassID=:gibbonCourseClassID AND gibbonCourseClassPerson.gibbonPersonID=:gibbonPersonID AND NOT role='Student - Left' AND NOT role='Teacher - Left' AND (date<:date1 OR (date=:date2 AND timeStart<:timeStart)) AND viewableParents='Y' ORDER BY date DESC, timeStart DESC";
- } else {
- $dataPrevious = array('gibbonCourseClassID' => $values['gibbonCourseClassID'], 'gibbonPersonID' => $session->get('gibbonPersonID'), 'date1' => $values['date'], 'date2' => $values['date'], 'timeStart' => $values['timeStart']);
- $sqlPrevious = "SELECT gibbonPlannerEntry.gibbonCourseClassID, gibbonPlannerEntryID, gibbonUnitID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class, gibbonPlannerEntry.name, timeStart, timeEnd, viewableStudents, viewableParents, homework, role FROM gibbonPlannerEntry JOIN gibbonCourseClass ON (gibbonPlannerEntry.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonCourseClassPerson ON (gibbonCourseClass.gibbonCourseClassID=gibbonCourseClassPerson.gibbonCourseClassID) JOIN gibbonCourse ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID) WHERE gibbonPlannerEntry.gibbonCourseClassID=:gibbonCourseClassID AND gibbonCourseClassPerson.gibbonPersonID=:gibbonPersonID AND NOT role='Student - Left' AND NOT role='Teacher - Left' AND (date<:date1 OR (date=:date2 AND timeStart<:timeStart)) AND viewableStudents='Y' ORDER BY date DESC, timeStart DESC";
- }
- }
- $resultPrevious = $connection2->prepare($sqlPrevious);
- $resultPrevious->execute($dataPrevious);
- } catch (PDOException $e) {
- }
- if ($resultPrevious->rowCount() > 0) {
- $rowPrevious = $resultPrevious->fetch();
- echo "".__('Previous Lesson').' ';
- } else {
- echo __('Previous Lesson');
- }
+ $previousLesson = $plannerEntryGateway->getPreviousLesson($gibbonCourseClassID, $values['date'], $values['timeStart'], $values['role']);
+ $nextLesson = $plannerEntryGateway->getNextLesson($gibbonCourseClassID, $values['date'], $values['timeStart'], $values['role']);
- echo ' | ';
+ $form = Form::createBlank('nav', '');
+ $form->addHiddenValue('address', $session->get('address'));
+ $form->addClass('flex-grow flex justify-start items-end');
+
+ $navUrl = Url::fromModuleRoute('Planner', 'planner_view_full')->withQueryParams($params);
+
+ $row = $form->addRow();
+ $col = $row->addColumn()->addClass('flex-1 flex items-center');
+ $col->addButton(__('Previous Lesson'))
+ ->groupAlign('left')
+ ->addClass('text-xs')
+ ->setAction(!empty($previousLesson)
+ ? $navUrl->withQueryParam('gibbonPlannerEntryID', $previousLesson['gibbonPlannerEntryID']) : '');
+ $col->addButton(__('Next Lesson'))
+ ->groupAlign('right')
+ ->addClass('text-xs')
+ ->setAction(!empty($nextLesson) ?
+ $navUrl->withQueryParam('gibbonPlannerEntryID', $nextLesson['gibbonPlannerEntryID']) : '');
+
+ $table->addHeaderContent($form->getOutput());
+ }
- try {
- if ($values['role'] == 'Teacher' or $highestAction == 'Lesson Planner_viewOnly') {
- $dataNext = array('gibbonCourseClassID' => $values['gibbonCourseClassID'], 'date1' => $values['date'], 'date2' => $values['date'], 'timeStart' => $values['timeStart']);
- $sqlNext = "SELECT gibbonPlannerEntry.gibbonCourseClassID, gibbonPlannerEntryID, gibbonUnitID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class, gibbonPlannerEntry.name, timeStart, timeEnd, viewableStudents, viewableParents, homework, 'Teacher' AS role FROM gibbonPlannerEntry JOIN gibbonCourseClass ON (gibbonPlannerEntry.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonCourse ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID) WHERE gibbonPlannerEntry.gibbonCourseClassID=:gibbonCourseClassID AND (date>:date1 OR (date=:date2 AND timeStart>:timeStart)) ORDER BY date, timeStart";
- } else {
- if ($highestAction == 'Lesson Planner_viewMyChildrensClasses') {
- $dataNext = array('gibbonCourseClassID' => $values['gibbonCourseClassID'], 'gibbonPersonID' => $gibbonPersonID, 'date1' => $values['date'], 'date2' => $values['date'], 'timeStart' => $values['timeStart']);
- $sqlNext = "SELECT gibbonPlannerEntry.gibbonCourseClassID, gibbonPlannerEntryID, gibbonUnitID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class, gibbonPlannerEntry.name, timeStart, timeEnd, viewableStudents, viewableParents, homework, role FROM gibbonPlannerEntry JOIN gibbonCourseClass ON (gibbonPlannerEntry.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonCourseClassPerson ON (gibbonCourseClass.gibbonCourseClassID=gibbonCourseClassPerson.gibbonCourseClassID) JOIN gibbonCourse ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID) WHERE gibbonPlannerEntry.gibbonCourseClassID=:gibbonCourseClassID AND gibbonCourseClassPerson.gibbonPersonID=:gibbonPersonID AND NOT role='Student - Left' AND NOT role='Teacher - Left' AND (date>:date1 OR (date=:date2 AND timeStart>:timeStart)) AND viewableParents='Y' ORDER BY date, timeStart";
- } else {
- $dataNext = array('gibbonCourseClassID' => $values['gibbonCourseClassID'], 'gibbonPersonID' => $session->get('gibbonPersonID'), 'date1' => $values['date'], 'date2' => $values['date'], 'timeStart' => $values['timeStart']);
- $sqlNext = "SELECT gibbonPlannerEntry.gibbonCourseClassID, gibbonPlannerEntryID, gibbonUnitID, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class, gibbonPlannerEntry.name, timeStart, timeEnd, viewableStudents, viewableParents, homework, role FROM gibbonPlannerEntry JOIN gibbonCourseClass ON (gibbonPlannerEntry.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN gibbonCourseClassPerson ON (gibbonCourseClass.gibbonCourseClassID=gibbonCourseClassPerson.gibbonCourseClassID) JOIN gibbonCourse ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID) WHERE gibbonPlannerEntry.gibbonCourseClassID=:gibbonCourseClassID AND gibbonCourseClassPerson.gibbonPersonID=:gibbonPersonID AND NOT role='Student - Left' AND NOT role='Teacher - Left' AND (date>:date1 OR (date=:date2 AND timeStart>:timeStart)) AND viewableStudents='Y' ORDER BY date, timeStart";
- }
- }
- $resultNext = $connection2->prepare($sqlNext);
- $resultNext->execute($dataNext);
- } catch (PDOException $e) {
- }
- if ($resultNext->rowCount() > 0) {
- $rowNext = $resultNext->fetch();
- echo "".__('Next Lesson').' ';
- } else {
- echo __('Next Lesson');
- }
- echo '
';
+ if ($values['role'] == 'Teacher') {
+ $table->addHeaderContent(" ".__('Show Confidential Data').' ');
+ }
+
+ if (!empty($values['gibbonUnitID'])) {
+ $table->addHeaderAction('book-open', __('Unit Overview'))
+ ->setURL('/modules/Planner/planner_unitOverview.php')
+ ->addParam('gibbonUnitID', $values['gibbonUnitID'])
+ ->addParams($params)
+ ->displayLabel();
}
- echo '';
- echo '';
if ($values['role'] == 'Teacher') {
- echo "';
- } else {
- echo "";
- if ($values['gibbonUnitID'] != '') {
- echo "
".__('Unit Overview').' ';
+ $table->addHeaderAction('edit', __('Edit'))
+ ->setURL('/modules/Planner/planner_edit.php')
+ ->addParams($params)
+ ->displayLabel();
+
+ if (!empty($gibbonMarkbookColumnID)) {
+ $table->addHeaderAction('markbook', __('Markbook'))
+ ->setURL('/modules/Markbook/markbook_edit_data.php')
+ ->addParam('gibbonMarkbookColumnID', $gibbonMarkbookColumnID)
+ ->addParams($params)
+ ->displayLabel();
}
- echo '
';
}
- // Details Table
- $table = DataTable::createDetails('overview');
-
$col = $table->addColumn('Basic Information');
$col->addColumn('class', __('Class'))->format(Format::using('courseClassName', ['course', 'class']));
@@ -409,7 +380,7 @@
echo ' ';
echo '';
echo "
- setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$row = $form->addRow();
diff --git a/modules/Planner/resources_manage.php b/modules/Planner/resources_manage.php
index 63d9f72634..197e0fcef5 100644
--- a/modules/Planner/resources_manage.php
+++ b/modules/Planner/resources_manage.php
@@ -45,7 +45,7 @@
// FORM
$form = Form::create('resourcesManage', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Search'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/resources_manage.php');
diff --git a/modules/Planner/resources_view.php b/modules/Planner/resources_view.php
index 22a9988992..f0b2134cfb 100644
--- a/modules/Planner/resources_view.php
+++ b/modules/Planner/resources_view.php
@@ -52,7 +52,7 @@
$form = Form::create('resourcesView', $session->get('absoluteURL').'/index.php', 'get');
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/resources_view.php');
diff --git a/modules/Planner/scopeAndSequence.php b/modules/Planner/scopeAndSequence.php
index 645b724194..103f207d30 100644
--- a/modules/Planner/scopeAndSequence.php
+++ b/modules/Planner/scopeAndSequence.php
@@ -48,7 +48,7 @@
$form = Form::create('action', $session->get('absoluteURL')."/index.php?q=/modules/".$session->get('module')."/scopeAndSequence.php");
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$options = array();
diff --git a/modules/Planner/src/Forms/PlannerFormFactory.php b/modules/Planner/src/Forms/PlannerFormFactory.php
index 1447f01a29..8ddf1f7ba1 100644
--- a/modules/Planner/src/Forms/PlannerFormFactory.php
+++ b/modules/Planner/src/Forms/PlannerFormFactory.php
@@ -229,7 +229,7 @@ public function createOutcomeBlockTemplate($allowOutcomeEditing) : OutputableInt
->setClass('w-3/4 readonly mt-1')
->readonly();
- $col = $blockTemplate->addRow()->addClass('showHide fullWidth')->addColumn();
+ $col = $blockTemplate->addRow()->addClass('showHide w-full')->addColumn();
if ($allowOutcomeEditing == 'Y') {
$col->addTextArea('outcomecontents')->setRows(10)->addData('tinymce');
} else {
diff --git a/modules/Planner/src/Tables/LessonTable.php b/modules/Planner/src/Tables/LessonTable.php
new file mode 100644
index 0000000000..e667d51f06
--- /dev/null
+++ b/modules/Planner/src/Tables/LessonTable.php
@@ -0,0 +1,396 @@
+.
+*/
+
+namespace Gibbon\Module\Planner\Tables;
+
+use Gibbon\Domain\DataSet;
+use Gibbon\Services\Format;
+use Gibbon\Tables\DataTable;
+use Gibbon\Contracts\Services\Session;
+use Gibbon\Contracts\Database\Connection;
+use Gibbon\Domain\System\SettingGateway;
+use Gibbon\Domain\Planner\PlannerEntryGateway;
+use Gibbon\Domain\School\SchoolYearTermGateway;
+
+/**
+ * LessonTable
+ *
+ * Reusable DataTable class for displaying lesson plans.
+ *
+ * @version v28
+ * @since v28
+ */
+class LessonTable
+{
+ protected $session;
+ protected $db;
+ protected $settingGateway;
+ protected $plannerEntryGateway;
+ protected $schoolYearTermGateway;
+
+ protected $homeworkNameSingular;
+ protected $homeworkNamePlural;
+
+ public function __construct(Session $session, Connection $db, SettingGateway $settingGateway, PlannerEntryGateway $plannerEntryGateway, SchoolYearTermGateway $schoolYearTermGateway)
+ {
+ $this->session = $session;
+ $this->db = $db;
+ $this->settingGateway = $settingGateway;
+ $this->plannerEntryGateway = $plannerEntryGateway;
+ $this->schoolYearTermGateway = $schoolYearTermGateway;
+
+ $this->homeworkNameSingular = $settingGateway->getSettingByScope('Planner', 'homeworkNameSingular');
+ $this->homeworkNamePlural = $settingGateway->getSettingByScope('Planner', 'homeworkNamePlural');
+ }
+
+ public function create($gibbonSchoolYearID, $gibbonCourseClassID, $gibbonPersonID, $date, $viewBy = 'date')
+ {
+ $guid = $this->session->get('guid');
+ $connection2 = $this->db->getConnection();
+
+ $highestAction = getHighestGroupedAction($guid, '/modules/Planner/planner.php', $connection2);
+ $roleCategory = $this->session->get('gibbonRoleIDCurrentCategory');
+ $gibbonPersonIDSelf = $this->session->get('gibbonPersonID');
+
+ $viewingAs = $this->getViewingAs($highestAction, $roleCategory);
+ $editAccess = $this->getEditAccess($highestAction, $roleCategory);
+
+ if ($editAccess || $highestAction == 'Lesson Planner_viewOnly') {
+ $gibbonPersonID = $viewBy == 'date' && $viewingAs == 'Teacher' ? $gibbonPersonIDSelf : null;
+ } else {
+ $gibbonPersonID = $gibbonPersonID ?? $gibbonPersonIDSelf;
+ }
+
+ $criteria = $this->plannerEntryGateway->newQueryCriteria($viewBy != 'year')
+ ->sortBy('date', $viewBy == 'year' ? 'ASC' : 'DESC')
+ ->sortBy('timeStart', $viewBy != 'class' ? 'ASC' : 'DESC')
+ ->fromPOST();
+
+ if ($viewBy == 'year') {
+ $lessons = $this->plannerEntryGateway->queryPlannerTimeSlotsByClass($criteria, $gibbonSchoolYearID, $gibbonCourseClassID);
+ } else if ($viewBy == 'class') {
+ $lessons = $this->plannerEntryGateway->queryPlannerByClass($criteria, $gibbonSchoolYearID, $gibbonPersonID, $gibbonCourseClassID, $viewingAs);
+ } else {
+ $lessons = $this->plannerEntryGateway->queryPlannerByDate($criteria, $gibbonSchoolYearID, $gibbonPersonID, $date, $viewingAs);
+ }
+
+ $lessonCount = 1;
+ $lessons->transform(function (&$values) use (&$lessonCount, $roleCategory, $gibbonPersonIDSelf) {
+ $teacherList = explode(',', $values['teacherIDs'] ?? '');
+ $values['isTeacher'] = $roleCategory == 'Staff' && !empty($teacherList) && in_array($gibbonPersonIDSelf, $teacherList) === true;
+ $values['lessonNumber'] = __('Lesson').' '.$lessonCount;
+ $lessonCount++;
+ });
+
+ if ($viewBy == 'year') {
+ $lessons = $this->addSchoolClosureDates($gibbonSchoolYearID, $lessons->toArray());
+ }
+
+ $table = DataTable::createPaginated('lessonPlanner', $criteria)->withData($lessons);
+
+ $table->addMetaData('blankSlate', $viewBy == 'class' ? __('There are no lessons for this class.') : __('There are no lessons on this date.'));
+
+ $table->modifyRows(function ($values, $row) {
+ $now = date('H:i:s');
+ $today = date('Y-m-d');
+
+ if (!empty($values['closure'])) {
+ $row->addClass('magic');
+ } elseif ($now > $values['timeStart'] && $now < $values['timeEnd'] && $values['date'] == $today) {
+ $row->addClass('current');
+ } else if ($values['date'] < $today || ($values['date'] == $today && $now > $values['timeEnd']) ) {
+ $row->addClass('dull');
+ }
+ return $row;
+ });
+
+ if ($editAccess && ($viewBy == 'class' || $viewBy == 'year')) {
+ $table->addHeaderAction('lessonView', __('Lesson View'))
+ ->setURL('/modules/Planner/planner.php')
+ ->addParam('gibbonCourseClassID', $gibbonCourseClassID)
+ ->addParam('viewBy', 'class')
+ ->addParam('subView', 'lesson')
+ ->setIcon('book-open')
+ ->addClass($viewBy == 'class' ? 'ring-1 ring-blue-500 border-blue-500' : '')
+ ->displayLabel();
+
+ $table->addHeaderAction('yearOverview', __('Year Overview'))
+ ->setURL('/modules/Planner/planner.php')
+ ->addParam('gibbonCourseClassID', $gibbonCourseClassID)
+ ->addParam('viewBy', 'class')
+ ->addParam('subView', 'year')
+ ->setIcon('calendar')
+ ->addClass($viewBy == 'year' ? 'ring-1 ring-blue-500 border-blue-500' : '')
+ ->displayLabel();
+ }
+ if ($editAccess) {
+ $table->addHeaderAction('add', __('Add'))
+ ->setURL('/modules/Planner/planner_add.php')
+ ->addParam('gibbonCourseClassID', $gibbonCourseClassID)
+ ->addParam('gibbonPersonID', $gibbonPersonID)
+ ->addParam('date', $date)
+ ->addParam('viewBy', $viewBy)
+ ->displayLabel();
+ }
+
+ if ($viewBy == 'year') {
+ $this->addYearOverviewColumns($table);
+ } else {
+ $this->addLessonViewColumns($table, $viewBy);
+ }
+
+ $table->addActionColumn()
+ ->addParam('gibbonSchoolYearID', $gibbonSchoolYearID)
+ ->addParam('gibbonPersonID', $gibbonPersonID)
+ ->addParam('gibbonPlannerEntryID')
+ ->addParam('gibbonCourseClassID')
+ ->addParam('date')
+ ->addParam('timeStart')
+ ->addParam('timeEnd')
+ ->addParam('search', $gibbonPersonID)
+ ->addParam('viewBy', $viewBy == 'date' ? 'date' : 'class')
+ ->format(function ($values, $actions) use ($editAccess, $highestAction, $viewBy) {
+ $fullEditAccess = $editAccess && ($highestAction == 'Lesson Planner_viewEditAllClasses' || $values['isTeacher']);
+
+ if (!empty($values['closure'])) return;
+
+ if (empty($values['lesson'])) {
+ if ($fullEditAccess) {
+ $actions->addAction('add', __('Add'))
+ ->setURL('/modules/Planner/planner_add.php');
+ return;
+ }
+ }
+
+ if ($fullEditAccess) {
+ $actions->addAction('edit', __('Edit'))
+ ->setURL('/modules/Planner/planner_edit.php');
+
+ $actions->addAction('view', __('View'))
+ ->setURL('/modules/Planner/planner_view_full.php');
+ } else {
+ $actions->addAction('view', __('View'))
+ ->setURL('/modules/Planner/planner_view_full.php');
+ }
+
+ if ($fullEditAccess && ($viewBy == 'class' || $viewBy == 'year')) {
+ $actions->addAction('copyforward', __('Bump'))
+ ->setURL('/modules/Planner/planner_bump.php');
+ }
+
+ if ($editAccess) {
+ $actions->addAction('duplicate', __('Duplicate'))
+ ->setURL('/modules/Planner/planner_duplicate.php');
+ }
+
+ if ($fullEditAccess) {
+ $actions->addAction('delete', __('Delete'))
+ ->setURL('/modules/Planner/planner_delete.php');
+ }
+ });
+
+ return $table;
+ }
+
+ protected function addLessonViewColumns(&$table, $viewBy)
+ {
+ if ($viewBy == 'class') {
+ $table->addColumn('date', __('Date'))
+ ->sortable(['date'])
+ ->context('primary')
+ ->format(function ($values) {
+ $output = Format::bold(Format::date($values['date'])).' '
+ .Format::dayOfWeekName($values['date']);
+
+ return $output;
+ });
+ } else {
+ $table->addColumn('class', __('Class'))
+ ->sortable(['course', 'class'])
+ ->context('primary')
+ ->format(function ($values) {
+ return Format::bold(Format::courseClassName($values['course'], $values['class'])).' '
+ .Format::small(Format::date($values['date']));
+ });
+ }
+
+ $table->addColumn('lesson', __('Lesson'))
+ ->description(__('Unit'))
+ ->context('primary')
+ ->format(function ($values) {
+ return !empty($values['unit'])
+ ? Format::bold($values['lesson']).' '.Format::small($values['unit'])
+ : Format::bold($values['lesson']);
+ });
+
+ $table->addColumn('timeStart', __('Time'))
+ ->context('secondary')
+ ->format(function ($values) {
+ return Format::timeRange($values['timeStart'], $values['timeEnd']);
+ });
+
+ $table->addColumn('homework', __($this->homeworkNameSingular))
+ ->format(function ($values) {
+ $output = '';
+ if ($values['homework'] == 'N' && empty($values['myHomeworkDueDateTime'])) {
+ $output .= __('No');
+ } else {
+ if ($values['homework'] == 'Y') {
+ $output .= __('Yes').': '.__('Teacher Recorded').' ';
+ if ($values['homeworkSubmission'] == 'Y') {
+ $output .= Format::small('+'.__('Submission')).' ';
+ if ($values['homeworkCrowdAssess'] == 'Y') {
+ $output .= Format::small('+'.__('Crowd Assessment')).' ';
+ }
+ }
+ }
+ if (!empty($values['myHomeworkDueDateTime'])) {
+ $output .= __('Yes').': '.__('Student Recorded').'';
+ }
+ }
+
+ return $output;
+ });
+
+ $table->addColumn('viewableStudents', __('Access'))
+ ->format(function ($values) {
+ $viewableBy = [];
+ if ($values['viewableStudents'] == 'Y') $viewableBy[] = __('Students');
+ if ($values['viewableParents'] == 'Y') $viewableBy[] = __('Parents');
+
+ return implode(', ', $viewableBy);
+ });
+ }
+
+ protected function addYearOverviewColumns(&$table)
+ {
+ $table->addColumn('lessonNumber', __('Lesson Number'))
+ ->format(function ($values) {
+ return Format::bold($values['lessonNumber']);
+ });
+
+ $table->addColumn('date', __('Date'))
+ ->description(__('Month'))
+ ->sortable(['date'])
+ ->context('primary')
+ ->format(function ($values) {
+ if (!empty($values['closure'])) return $values['closure'];
+
+ $output = Format::bold(Format::date($values['date'])).' '
+ .Format::monthName($values['date']);
+
+ return $output;
+ });
+
+ $table->addColumn('period', __('TT Period'))
+ ->description(__('Time')." & ".__('Facility'))
+ ->context('secondary')
+ ->format(function ($values) {
+ if (empty($values['period'])) return;
+
+ return $values['period'].' '.Format::small(Format::timeRange($values['timeStart'], $values['timeEnd'])).' '.Format::small($values['spaceName']);
+ });
+
+ $table->addColumn('lesson', __('Planned Lesson'))
+ ->description(__('Unit'))
+ ->context('primary')
+ ->format(function ($values) {
+ if (empty($values['lesson'])) return;
+
+ return !empty($values['unit'])
+ ? Format::bold($values['lesson']).' '.Format::small($values['unit'])
+ : Format::bold($values['lesson']);
+ });
+ }
+
+ protected function addSchoolClosureDates($gibbonSchoolYearID, array $lessons) : array
+ {
+ $terms = $this->schoolYearTermGateway->selectTermDetailsBySchoolYear($gibbonSchoolYearID)->fetchGroupedUnique();
+ $closures = $this->schoolYearTermGateway->selectSchoolClosuresByTerm(array_keys($terms), true)->fetchGroupedUnique();
+
+ $lessonData = [];
+ $lessonCount = count($lessons);
+
+ foreach ($lessons as $lessonIndex => $lesson) {
+
+ foreach ($terms as $termID => $term) {
+ if ($term['firstDay'] !== false && $lesson['date'] > $term['firstDay']) {
+ $lessonData[] = [
+ 'lessonNumber' => __('Start of').' '.$term['name'],
+ 'closure' => Format::date($term['firstDay']),
+ ];
+ $terms[$termID]['firstDay'] = false;
+ }
+
+ if ($term['lastDay'] !== false && $lesson['date'] > $term['lastDay']) {
+ $lessonData[] = [
+ 'lessonNumber' => __('End of').' '.$term['name'],
+ 'closure' => Format::date($term['lastDay']),
+ ];
+ $terms[$termID]['lastDay'] = false;
+ }
+ }
+
+ foreach ($closures as $firstDay => $closure) {
+ if ($closure !== false && $lesson['date'] > $firstDay) {
+ $lessonData[] = [
+ 'lessonNumber' => $closure['name'],
+ 'closure' => Format::dateRange($closure['firstDay'], $closure['lastDay']),
+ ];
+ $closures[$firstDay] = false;
+ }
+ }
+
+ $lessonData[] = $lesson;
+
+ if ($lessonIndex == $lessonCount-1) {
+ $finalTerm = end($terms);
+ if ($finalTerm['lastDay'] !== false) {
+ $lessonData[] = [
+ 'lessonNumber' => __('End of').' '.$finalTerm['name'],
+ 'closure' => Format::date($finalTerm['lastDay']),
+ ];
+ }
+ }
+ }
+
+
+ return $lessonData;
+ }
+
+ protected function getViewingAs($highestAction, $roleCategory)
+ {
+ if ($highestAction == 'Lesson Planner_viewMyChildrensClasses' || $roleCategory == 'Parent') {
+ return 'Parent';
+ } else if ($roleCategory == 'Student') {
+ return 'Student';
+ } else if ($highestAction == 'Lesson Planner_viewAllEditMyClasses') {
+ return 'Teacher';
+ } else if ($roleCategory == 'Student') {
+ return $roleCategory;
+ }
+ }
+
+ protected function getEditAccess($highestAction, $roleCategory)
+ {
+ return $roleCategory == 'Staff' && ($highestAction == 'Lesson Planner_viewEditAllClasses' || $highestAction == 'Lesson Planner_viewAllEditMyClasses');
+ }
+}
diff --git a/modules/Planner/units_edit_deploy.php b/modules/Planner/units_edit_deploy.php
index 3e948d8064..8d50f63bf8 100644
--- a/modules/Planner/units_edit_deploy.php
+++ b/modules/Planner/units_edit_deploy.php
@@ -109,11 +109,11 @@
$lessonTimes = $plannerEntryGateway->queryPlannerTimeSlotsByClass($criteria, $gibbonSchoolYearID, $gibbonCourseClassID);
- $form = Form::create('action', $session->get('absoluteURL').'/index.php?q=/modules/Planner/units_edit_deploy.php&step=2&'.http_build_query($urlParams));
+ $form = Form::createBlank('action', $session->get('absoluteURL').'/index.php?q=/modules/Planner/units_edit_deploy.php&step=2&'.http_build_query($urlParams));
$form->setTitle(__('Step 1 - Select Lessons'));
$form->setDescription(__('Use the table below to select the lessons you wish to deploy this unit to. Only lessons without existing plans can be included in the deployment.'));
- $form->setClass('w-full blank bulkActionForm');
+ $form->setClass('bulkActionForm');
$table = $form->addRow()->addDataTable('lessons', $criteria)->withData($lessonTimes);
$table->addMetaData('hidePagination', true);
diff --git a/modules/Planner/units_edit_working_add.php b/modules/Planner/units_edit_working_add.php
index 657a9fdd26..53b8a94698 100644
--- a/modules/Planner/units_edit_working_add.php
+++ b/modules/Planner/units_edit_working_add.php
@@ -100,11 +100,11 @@
$lessonTimes = $plannerEntryGateway->queryPlannerTimeSlotsByClass($criteria, $gibbonSchoolYearID, $gibbonCourseClassID);
- $form = Form::create('action', $session->get('absoluteURL').'/modules/Planner/units_edit_working_addProcess.php?'.http_build_query($urlParams));
+ $form = Form::createBlank('action', $session->get('absoluteURL').'/modules/Planner/units_edit_working_addProcess.php?'.http_build_query($urlParams));
$form->setTitle(__('Choose Lessons'));
$form->setDescription(__('Use the table below to select the lessons you wish to deploy this unit to. Only lessons without existing plans can be included in the deployment.'));
- $form->setClass('w-full blank bulkActionForm');
+ $form->setClass('bulkActionForm');
$form->addHiddenValue('address', $session->get('address'));
$table = $form->addRow()->addDataTable('lessons', $criteria)->withData($lessonTimes);
diff --git a/modules/Reports/archive_byReport_view.php b/modules/Reports/archive_byReport_view.php
index 9f978822f4..9efd370604 100644
--- a/modules/Reports/archive_byReport_view.php
+++ b/modules/Reports/archive_byReport_view.php
@@ -52,7 +52,7 @@
// FORM
$form = Form::create('archiveByReport', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->addHiddenValue('q', '/modules/Reports/archive_byReport_view.php');
diff --git a/modules/Reports/archive_byStudent.php b/modules/Reports/archive_byStudent.php
index c5afab28d7..7e1c940e1f 100644
--- a/modules/Reports/archive_byStudent.php
+++ b/modules/Reports/archive_byStudent.php
@@ -52,7 +52,7 @@
// FORM
$form = Form::create('archiveByReport', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->addHiddenValue('q', '/modules/Reports/archive_byStudent.php');
diff --git a/modules/Reports/archive_manage.php b/modules/Reports/archive_manage.php
index 1f1daf0cb3..65c6bf738c 100644
--- a/modules/Reports/archive_manage.php
+++ b/modules/Reports/archive_manage.php
@@ -47,8 +47,7 @@
$table->addHeaderAction('add', __('Add'))
->setURL('/modules/Reports/archive_manage_add.php')
- ->displayLabel()
- ->append(' | ');
+ ->displayLabel();
$table->addHeaderAction('migrate', __('Migrate Reports'))
->setIcon('delivery2')
diff --git a/modules/Reports/js/module.js b/modules/Reports/js/module.js
index df03cf1059..ba84678835 100644
--- a/modules/Reports/js/module.js
+++ b/modules/Reports/js/module.js
@@ -17,7 +17,3 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-
-$(document).on('change', '.auto-submit', function () {
- $(this).parents('form').submit();
-});
diff --git a/modules/Reports/progress_byDepartment.php b/modules/Reports/progress_byDepartment.php
index 13297a176e..0c6de3c2a0 100644
--- a/modules/Reports/progress_byDepartment.php
+++ b/modules/Reports/progress_byDepartment.php
@@ -47,7 +47,7 @@
// FORM
$form = Form::create('archiveByReport', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/Reports/progress_byDepartment.php');
diff --git a/modules/Reports/progress_byPerson.php b/modules/Reports/progress_byPerson.php
index 131797d18f..d4e3c5506a 100644
--- a/modules/Reports/progress_byPerson.php
+++ b/modules/Reports/progress_byPerson.php
@@ -50,7 +50,7 @@
// FORM
$form = Form::create('archiveByReport', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/Reports/progress_byPerson.php');
$form->addHiddenValue('gibbonReportingScopeID', $gibbonReportingScopeID);
diff --git a/modules/Reports/progress_byProofReading.php b/modules/Reports/progress_byProofReading.php
index 0a60eacc20..b33dcea9fa 100644
--- a/modules/Reports/progress_byProofReading.php
+++ b/modules/Reports/progress_byProofReading.php
@@ -49,7 +49,7 @@
// FORM
$form = Form::create('archiveByReport', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/Reports/progress_byProofReading.php');
diff --git a/modules/Reports/progress_byReportingCycle.php b/modules/Reports/progress_byReportingCycle.php
index ccf1efe265..f380c00795 100644
--- a/modules/Reports/progress_byReportingCycle.php
+++ b/modules/Reports/progress_byReportingCycle.php
@@ -47,7 +47,7 @@
// FORM
$form = Form::create('archiveByReport', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/Reports/progress_byReportingCycle.php');
diff --git a/modules/Reports/progress_studentNameConflicts.php b/modules/Reports/progress_studentNameConflicts.php
index 5f181f1b18..c78d8b41bb 100644
--- a/modules/Reports/progress_studentNameConflicts.php
+++ b/modules/Reports/progress_studentNameConflicts.php
@@ -48,7 +48,7 @@
// FORM
$form = Form::create('archiveByReport', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/Reports/progress_studentNameConflicts.php');
diff --git a/modules/Reports/reporting_access_manage.php b/modules/Reports/reporting_access_manage.php
index 83945670a2..d334916772 100644
--- a/modules/Reports/reporting_access_manage.php
+++ b/modules/Reports/reporting_access_manage.php
@@ -47,7 +47,7 @@
// FORM
$form = Form::create('archiveByReport', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/Reports/reporting_access_manage.php');
diff --git a/modules/Reports/reporting_criteria_manage.php b/modules/Reports/reporting_criteria_manage.php
index 02bda00e5e..0555522adc 100644
--- a/modules/Reports/reporting_criteria_manage.php
+++ b/modules/Reports/reporting_criteria_manage.php
@@ -57,7 +57,7 @@
// FORM
$form = Form::create('archiveByReport', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->addHiddenValue('q', '/modules/Reports/reporting_criteria_manage.php');
@@ -170,8 +170,7 @@
$table->addHeaderAction('criteria', __('Manage Criteria Types'))
->setIcon('markbook')
->setURL('/modules/Reports/criteriaTypes_manage.php')
- ->displayLabel()
- ->prepend(' | ');
+ ->displayLabel();
if (empty($scopeTypeID)) {
$table->addColumn('scopeTypeName', $reportingScope['scopeType'])
diff --git a/modules/Reports/reporting_criteria_manage_editOrderAjax.php b/modules/Reports/reporting_criteria_manage_editOrderAjax.php
index 9917b5425a..54fdbbf4cb 100644
--- a/modules/Reports/reporting_criteria_manage_editOrderAjax.php
+++ b/modules/Reports/reporting_criteria_manage_editOrderAjax.php
@@ -30,7 +30,7 @@
} else {
// Proceed!
$data = $_POST['data'] ?? [];
- $order = json_decode($_POST['order']);
+ $order = $_POST['order'];
if (empty($order) || empty($data['gibbonReportingCycleID'])) {
exit;
diff --git a/modules/Reports/reporting_cycles_manage.php b/modules/Reports/reporting_cycles_manage.php
index e13d232b38..893b7d55e8 100644
--- a/modules/Reports/reporting_cycles_manage.php
+++ b/modules/Reports/reporting_cycles_manage.php
@@ -63,14 +63,10 @@
->setURL('/modules/Reports/reporting_cycles_manage_edit.php');
$actions->addAction('scopes', __('Manage Scopes & Criteria'))
- ->setIcon('markbook') //internalAssessment
+ ->setIcon('markbook')
->setClass('mx-1')
->setURL('/modules/Reports/reporting_scopes_manage.php');
- // $actions->addAction('access', __('Manage Access'))
- // ->setIcon('key')
- // ->setURL('/modules/Reports/reporting_access_manage.php');
-
$actions->addAction('duplicate', __('Duplicate'))
->setIcon('copy')
->setURL('/modules/Reports/reporting_cycles_manage_duplicate.php');
diff --git a/modules/Reports/reporting_cycles_manage_editOrderAjax.php b/modules/Reports/reporting_cycles_manage_editOrderAjax.php
index bdb1f3fc4f..df67dbb4be 100644
--- a/modules/Reports/reporting_cycles_manage_editOrderAjax.php
+++ b/modules/Reports/reporting_cycles_manage_editOrderAjax.php
@@ -30,7 +30,7 @@
} else {
// Proceed!
$data = $_POST['data'] ?? [];
- $order = json_decode($_POST['order']);
+ $order = $_POST['order'];
if (empty($order) || empty($data['gibbonSchoolYearID'])) {
exit;
diff --git a/modules/Reports/reporting_my.php b/modules/Reports/reporting_my.php
index 6d4e0fcebd..cecaf1188b 100644
--- a/modules/Reports/reporting_my.php
+++ b/modules/Reports/reporting_my.php
@@ -43,7 +43,7 @@
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->setTitle(__('View As'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('q', '/modules/Reports/reporting_my.php');
diff --git a/modules/Reports/reporting_proofread.php b/modules/Reports/reporting_proofread.php
index db5b48d09c..6e3682839f 100644
--- a/modules/Reports/reporting_proofread.php
+++ b/modules/Reports/reporting_proofread.php
@@ -59,7 +59,7 @@
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->setTitle(__('View'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('q', '/modules/Reports/reporting_proofread.php');
@@ -286,7 +286,7 @@
->addDetails()
->addClass('border bg-gray-100 rounded mb-2 p-2')
->addClass($proof['status'] == 'Done' || $proof['status'] == 'Accepted' ? 'success bg-green-100' : '')
- ->addClass($proof['status'] == 'Edited' ? 'message bg-blue-100' : '')
+ ->addClass($proof['status'] == 'Edited' ? 'message bg-blue-50' : '')
->setID('student'.str_pad($criteria['gibbonPersonIDStudent'], 10, '0', STR_PAD_LEFT))
->summary($summaryText)
->opened(empty($proof['status']) || ($proofReview && $proof['status'] == 'Edited'));
@@ -408,15 +408,15 @@
var details = $(this).parents('details').first();
if ($(this).val() == 'Done' || $(this).val() == 'Accepted') {
- details.removeClass('message bg-blue-100').removeClass('error bg-red-100');
+ details.removeClass('message bg-blue-50').removeClass('error bg-red-100');
details.addClass('success bg-green-100');
details.find('textarea').attr('readonly', true);
} else if ($(this).val() == 'Edited' || $(this).val() == 'Revised') {
details.removeClass('success bg-green-100').removeClass('error bg-red-100');
- details.addClass('message bg-blue-100');
+ details.addClass('message bg-blue-50');
details.find('textarea').attr('readonly', false);
} else if ($(this).val() == 'Declined') {
- details.removeClass('success bg-green-100').removeClass('message bg-blue-100');
+ details.removeClass('success bg-green-100').removeClass('message bg-blue-50');
details.addClass('error bg-red-100');
details.find('textarea').attr('readonly', false);
}
diff --git a/modules/Reports/reporting_scopes_manage.php b/modules/Reports/reporting_scopes_manage.php
index 21262f677b..57fdbd1751 100644
--- a/modules/Reports/reporting_scopes_manage.php
+++ b/modules/Reports/reporting_scopes_manage.php
@@ -77,7 +77,6 @@
->setURL('/modules/Reports/reporting_scopes_manage_edit.php');
$actions->addAction('access', __('Manage Access'))
- ->setIcon('key')
->setURL('/modules/Reports/reporting_access_manage.php');
$actions->addAction('delete', __('Delete'))
diff --git a/modules/Reports/reporting_scopes_manage_edit.php b/modules/Reports/reporting_scopes_manage_edit.php
index aa4945a328..ce1d220592 100644
--- a/modules/Reports/reporting_scopes_manage_edit.php
+++ b/modules/Reports/reporting_scopes_manage_edit.php
@@ -131,8 +131,7 @@
->setIcon('markbook')
->setURL('/modules/Reports/criteriaTypes_manage.php')
->addParam('referer', 'scopes')
- ->displayLabel()
- ->prepend(' | ');
+ ->displayLabel();
$table->addActionColumn()
->addParam('gibbonReportingCycleID', $urlParams['gibbonReportingCycleID'])
diff --git a/modules/Reports/reporting_scopes_manage_editOrderAjax.php b/modules/Reports/reporting_scopes_manage_editOrderAjax.php
index 0e5d5d696a..c91572907a 100644
--- a/modules/Reports/reporting_scopes_manage_editOrderAjax.php
+++ b/modules/Reports/reporting_scopes_manage_editOrderAjax.php
@@ -30,7 +30,7 @@
} else {
// Proceed!
$data = $_POST['data'] ?? [];
- $order = json_decode($_POST['order']);
+ $order = $_POST['order'];
if (empty($order) || empty($data['gibbonReportingCycleID'])) {
exit;
diff --git a/modules/Reports/reporting_write_byStudent.php b/modules/Reports/reporting_write_byStudent.php
index 18a8a1d062..01d502d9d4 100644
--- a/modules/Reports/reporting_write_byStudent.php
+++ b/modules/Reports/reporting_write_byStudent.php
@@ -166,7 +166,7 @@
$form->addHiddenValue('allStudents', $urlParams['allStudents']);
$form->addHiddenValue('gibbonPersonID', $gibbonPersonID);
- $form->addRow()->addClass('reportStatus')->addContent($scopeDetails['name'])->wrap('', ' ');
+ $form->addRow()->addClass('reportStatus')->addContent($scopeDetails['name'])->wrap('', ' ');
// HOOKS
// Custom hooks can replace form fields by criteria type using a custom include.
@@ -299,10 +299,10 @@
->setDisabled(!$canWriteReport);
if ($canWriteReport) {
- $row = $form->addRow();
- $row->addSubmit(__('Save & Next'))
- ->prepend(sprintf(' ',__('Save')))
+ $col = $form->addRow()->addColumn()->setClass('flex items-center justify-end gap-2');
+ $col->addButton(__('Save'))->onClick('save()')
->prepend(sprintf('%1$s ', __('Unsaved Changes')));
+ $col->addSubmit(__('Save & Next'));
}
echo $form->getOutput();
@@ -372,27 +372,25 @@ function updateStatus() {
function displayStatus(){
if (readonly) {
- $('.reportStatus div').addClass('bg-gray-300');
+ $('.reportStatus div').addClass('dull');
$('.reportStatus h4').html('');
} else if (complete) {
- $('#reportingWrite .standardForm').removeClass('border-blue-600').addClass('border-green-600');
- $('.reportStatus div').removeClass('bg-blue-200').addClass('bg-green-200');
+ $('.reportStatus').parent().removeClass('border-blue-600').addClass('border-green-600');
+ $('.reportStatus div').removeClass('message').addClass('success');
$('.reportStatus h4').html('');
} else if (edited) {
- $('#reportingWrite .standardForm').removeClass('border-green-600').addClass('border-blue-600');
- $('.reportStatus div').removeClass('bg-green-200').addClass('bg-blue-200');
+ $('.reportStatus').parent().removeClass('border-green-600').addClass('border-blue-600');
+ $('.reportStatus div').removeClass('success').addClass('message');
$('.reportStatus h4').html('');
} else {
- $('#reportingWrite .standardForm').removeClass('border-green-600');
- $('.reportStatus div').removeClass('bg-green-200');
+ $('.reportStatus').parent().removeClass('border-green-600');
+ $('.reportStatus div').removeClass('success');
}
- $('input[value="Save & Next"]').toggle(complete);
+ $('button[value="Save & Next"]').toggle(complete);
if (edited) {
$('.unsavedChanges').show();
- $('#reportingWrite .standardForm').removeClass('border-green-600').addClass('border-blue-600');
- $('.reportStatus div').removeClass('bg-green-200').addClass('bg-blue-200');
$('.reportStatus h4').html($('.reportStatus h4').html() + ' ');
}
}
diff --git a/modules/Reports/reports_manage_edit.php b/modules/Reports/reports_manage_edit.php
index 72049ad9b5..bc8051d563 100644
--- a/modules/Reports/reports_manage_edit.php
+++ b/modules/Reports/reports_manage_edit.php
@@ -111,9 +111,9 @@
$row = $form->addRow();
$row->addLabel('accessDate', __('Go Live Date'))->prepend('1. ')->append(' '.__('2. Reports are hidden until date is reached.'));
- $col = $row->addColumn('accessDate')->setClass('inline');
- $col->addDate('accessDate')->setValue(substr($values['accessDate'], 0, 11))->addClass('mr-2');
- $col->addTime('accessTime')->setValue(substr($values['accessDate'], 11, 5));
+ $col = $row->addColumn('accessDate')->setClass('inline gap-2');
+ $col->addDate('accessDate')->setValue(substr($values['accessDate'], 0, 11))->addClass('flex-1');
+ $col->addTime('accessTime')->setValue(substr($values['accessDate'], 11, 5))->addClass('flex-1');
$row = $form->addRow();
$row->addFooter();
diff --git a/modules/Reports/src/Forms/ReportingSidebarForm.php b/modules/Reports/src/Forms/ReportingSidebarForm.php
index db8fe59e53..19c7ad9f25 100644
--- a/modules/Reports/src/Forms/ReportingSidebarForm.php
+++ b/modules/Reports/src/Forms/ReportingSidebarForm.php
@@ -52,28 +52,28 @@ public function createForm($urlParams)
{
$gibbonPersonID = $urlParams['gibbonPersonID'] ?? $this->session->get('gibbonPersonID');
- $form = parent::create('reportingSelector', $this->session->get('absoluteURL').'/index.php', 'get');
+ $form = parent::createBlank('reportingSelector', $this->session->get('absoluteURL').'/index.php', 'get')->enableQuickSubmit()->setAttribute('hx-trigger', 'change from:.auto-submit');
$form->setFactory($this->databaseFormFactory);
- $form->setClass('smallIntBorder w-full mt-4');
+ $form->setClass('w-full mt-2');
$form->addHiddenValue('q', '/modules/Reports/reporting_write.php');
$form->addHiddenValue('gibbonPersonID', $gibbonPersonID);
$form->addHiddenValue('allStudents', $urlParams['allStudents'] ?? '');
$form->addHiddenValue('gibbonPersonIDStudent', $urlParams['gibbonPersonIDStudent'] ?? '');
- $row = $form->addRow();
- $row->addLabel('gibbonSchoolYearID', __('School Year'))->addClass('sm:text-xxs');
+ $row = $form->addRow()->addClass('py-1');
+ $row->addLabel('gibbonSchoolYearID', __('School Year'))->addClass('sm:text-xs/6');
$row->addSelectSchoolYear('gibbonSchoolYearID', 'Recent')
- ->setClass('auto-submit w-64 lg:w-40')
+ ->setClass('auto-submit flex-grow')
->selected($urlParams['gibbonSchoolYearID'])
->placeholder(null);
$reportingCycles = $this->reportingCycleGateway->selectReportingCyclesBySchoolYear($urlParams['gibbonSchoolYearID']);
- $row = $form->addRow();
- $row->addLabel('gibbonReportingCycleID', __('Reporting Cycle'))->addClass('sm:text-xxs');
+ $row = $form->addRow()->addClass('py-1');
+ $row->addLabel('gibbonReportingCycleID', __('Reporting Cycle'))->addClass('sm:text-xs/6');
$row->addSelect('gibbonReportingCycleID')
->fromResults($reportingCycles)
- ->setClass('auto-submit w-64 lg:w-40')
+ ->setClass('auto-submit flex-grow')
->selected($urlParams['gibbonReportingCycleID'])
->placeholder();
@@ -81,11 +81,11 @@ public function createForm($urlParams)
$criteria = $this->reportingCriteriaGateway->newQueryCriteria()->sortBy(['sequenceNumber', 'nameOrder']);
$criteriaGroups = $this->reportingCriteriaGateway->queryReportingCriteriaGroupsByCycle($criteria, $urlParams['gibbonReportingCycleID']);
- $row = $form->addRow();
- $row->addLabel('criteriaSelector', __('Scope'))->addClass('sm:text-xxs');
+ $row = $form->addRow()->addClass('py-1');
+ $row->addLabel('criteriaSelector', __('Scope'))->addClass('sm:text-xs/6');
$row->addSelect('criteriaSelector')
->fromDataSet($criteriaGroups, 'value', 'name', 'scopeName')
- ->setClass('auto-submit w-64 lg:w-40')
+ ->setClass('auto-submit flex-grow')
->selected($urlParams['gibbonReportingScopeID'].'-'.$urlParams['scopeTypeID'])
->placeholder();
} else {
diff --git a/modules/Reports/templates_assets_components_edit.php b/modules/Reports/templates_assets_components_edit.php
index 1310156023..0ee64bb4be 100644
--- a/modules/Reports/templates_assets_components_edit.php
+++ b/modules/Reports/templates_assets_components_edit.php
@@ -65,8 +65,7 @@
->setIcon('help')
->addClass('underline')
->displayLabel()
- ->modalWindow()
- ->append(' | ');
+ ->modalWindow();
$form->addHeaderAction('view', __('Preview'))
->setURL('/modules/Reports/templates_assets_components_preview.php')
diff --git a/modules/Reports/templates_manage.php b/modules/Reports/templates_manage.php
index c905ac9245..e4f406fb7a 100644
--- a/modules/Reports/templates_manage.php
+++ b/modules/Reports/templates_manage.php
@@ -47,8 +47,7 @@
$table->addHeaderAction('add', __('Add'))
->setURL('/modules/Reports/templates_manage_add.php')
- ->displayLabel()
- ->append(' | ');
+ ->displayLabel();
$table->addHeaderAction('fonts', __('Manage Assets'))
->setIcon('delivery2')
diff --git a/modules/Reports/templates_manage_editOrderAjax.php b/modules/Reports/templates_manage_editOrderAjax.php
index ffb247c568..161187b963 100644
--- a/modules/Reports/templates_manage_editOrderAjax.php
+++ b/modules/Reports/templates_manage_editOrderAjax.php
@@ -30,7 +30,7 @@
} else {
// Proceed!
$data = $_POST['data'] ?? [];
- $order = json_decode($_POST['order']);
+ $order = $_POST['order'];
if (empty($order) || empty($data['gibbonReportTemplateID'])) {
exit;
diff --git a/modules/Rubrics/moduleFunctions.php b/modules/Rubrics/moduleFunctions.php
index 915afb137c..a6fbd18ef9 100644
--- a/modules/Rubrics/moduleFunctions.php
+++ b/modules/Rubrics/moduleFunctions.php
@@ -75,7 +75,7 @@ function rubricEdit($guid, $connection2, $gibbonRubricID, $scaleName = '', $sear
$form = Form::createTable('editRubric', $session->get('absoluteURL').'/modules/'.$session->get('module').'/rubrics_edit_editCellProcess.php?gibbonRubricID='.$gibbonRubricID.'&search='.$search.'&filter2='.$filter2);
- $form->setClass('rubricTable fullWidth');
+ $form->setClass('rubricTable w-full');
$form->addHiddenValue('address', $session->get('address'));
$row = $form->addRow()->addClass();
@@ -90,7 +90,7 @@ function rubricEdit($guid, $connection2, $gibbonRubricID, $scaleName = '', $sear
$gradeScaleGrade = $gradeScales[$columns[$n]['gibbonScaleGradeID']];
$col->addContent(''.$gradeScaleGrade['descriptor'].' ')
->append(' ('.$gradeScaleGrade['value'].')')
- ->append(''.__($scaleName).' '.__('Scale').' ');
+ ->append(''.__($scaleName).' '.__('Scale').' ');
} else {
$col->addContent($columns[$n]['title'])->wrap('', ' ');
}
@@ -109,7 +109,7 @@ function rubricEdit($guid, $connection2, $gibbonRubricID, $scaleName = '', $sear
$outcome = $outcomes[$rows[$i]['gibbonOutcomeID']];
$col->addContent(''.__($outcome['name']).' ')
->append(!empty($outcome['category'])? (' - '.$outcome['category'].' ') : '')
- ->append(''.$outcome['scope'].' '.__('Outcome').' ');
+ ->append(''.$outcome['scope'].' '.__('Outcome').' ');
$rows[$i]['title'] = $outcome['name'];
} else {
$col->addContent($rows[$i]['title'])->wrap('', ' ');
@@ -314,7 +314,7 @@ function rubricView($guid, $connection2, $gibbonRubricID, $mark, $gibbonPersonID
}
$form = Form::createTable('viewRubric', $session->get('absoluteURL').'/index.php');
- $form->setClass('rubricTable fullWidth');
+ $form->setClass('rubricTable w-full');
$row = $form->addRow()->addClass();
$row->addContent()->addClass('');
@@ -334,7 +334,7 @@ function rubricView($guid, $connection2, $gibbonRubricID, $mark, $gibbonPersonID
$gradeScaleGrade = $gradeScales[$columns[$n]['gibbonScaleGradeID']];
$column->addContent(''.$gradeScaleGrade['descriptor'].' ')
->append(' ('.$gradeScaleGrade['value'].')')
- ->append(''.__($gradeScaleGrade['name']).' '.__('Scale').' ');
+ ->append(''.__($gradeScaleGrade['name']).' '.__('Scale').' ');
} else {
$column->addContent($columns[$n]['title'])->wrap('', ' ');
}
@@ -351,7 +351,7 @@ function rubricView($guid, $connection2, $gibbonRubricID, $mark, $gibbonPersonID
$outcome = $outcomes[$rows[$i]['gibbonOutcomeID']];
$content = $col->addContent(''.__($outcome['name']).' ')
->append(!empty($outcome['category'])? (' - '.$outcome['category'].' ') : '')
- ->append(''.$outcome['scope'].' '.__('Outcome').' ')
+ ->append(''.$outcome['scope'].' '.__('Outcome').' ')
->wrap('', ' ');
// Highlight unit outcomes with a checkmark
if (isset($unitOutcomes[$rows[$i]['gibbonOutcomeID']])) {
diff --git a/modules/Rubrics/rubrics.php b/modules/Rubrics/rubrics.php
index cfb602b99d..23309c0c8e 100644
--- a/modules/Rubrics/rubrics.php
+++ b/modules/Rubrics/rubrics.php
@@ -57,7 +57,7 @@
// SEARCH
$form = Form::create('searchForm', $session->get('absoluteURL').'/index.php?q=/modules/'.$session->get('module').'/rubrics.php');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$row = $form->addRow();
$row->addLabel('search', __('Search For'))->description(__('Rubric name.'));
diff --git a/modules/Rubrics/rubrics_view.php b/modules/Rubrics/rubrics_view.php
index 5356362e30..b13e57cc82 100644
--- a/modules/Rubrics/rubrics_view.php
+++ b/modules/Rubrics/rubrics_view.php
@@ -51,7 +51,7 @@
// SEARCH
$form = Form::create('searchForm', $session->get('absoluteURL').'/index.php?q=/modules/'.$session->get('module').'/rubrics_view.php');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$row = $form->addRow();
$row->addLabel('search', __('Search For'))->description(__('Rubric name.'));
diff --git a/modules/School Admin/department_manage_editOrderAjax.php b/modules/School Admin/department_manage_editOrderAjax.php
index 8e7526d1a1..e4cdc43718 100644
--- a/modules/School Admin/department_manage_editOrderAjax.php
+++ b/modules/School Admin/department_manage_editOrderAjax.php
@@ -30,7 +30,7 @@
} else {
// Proceed!
$data = $_POST['data'] ?? [];
- $order = json_decode($_POST['order']);
+ $order = $_POST['order'];
if (empty($order)) {
exit;
diff --git a/modules/School Admin/formGroup_manage.php b/modules/School Admin/formGroup_manage.php
index bd7dbbb16b..9f0c54d58d 100644
--- a/modules/School Admin/formGroup_manage.php
+++ b/modules/School Admin/formGroup_manage.php
@@ -69,8 +69,7 @@
->setIcon('copy')
->onClick('return confirm("'.__('Are you sure you want to continue?').' '.__('This operation cannot be undone.').'");')
->displayLabel()
- ->directLink()
- ->append(' | ');
+ ->directLink();
}
$table->addHeaderAction('add', __('Add'))
diff --git a/modules/School Admin/formalAssessmentSettings.php b/modules/School Admin/formalAssessmentSettings.php
index d36d3c4ab5..ced01e1866 100644
--- a/modules/School Admin/formalAssessmentSettings.php
+++ b/modules/School Admin/formalAssessmentSettings.php
@@ -45,7 +45,7 @@
$form->addRow()->addHeading('Primary External Assessement', __('Primary External Assessement'))->append(__('These settings allow a particular type of external assessment to be associated with each year group. The selected assessment will be used as the primary assessment to be used as a baseline for comparison (for example, within the Markbook). You are required to select a particular field category from which to draw data (if no category is chosen, the data will not be saved).'));
$row = $form->addRow()->setClass('break');
- $row->addContent(__('Year Group'));
+ $row->addContent(__('Year Group'))->setClass('w-24');
$row->addContent(__('External Assessment'));
$row->addContent(__('Field Set'));
@@ -87,18 +87,16 @@
$selectedField = (isset($primaryExternalAssessmentByYearGroup[$id]))? $primaryExternalAssessmentByYearGroup[$id] : '';
$row = $form->addRow();
- $row->addContent($yearGroup['name']);
+ $row->addContent($yearGroup['name'])->setClass('w-24');
$row->addSelect('gibbonExternalAssessmentID['.$id.']')
->setID('gibbonExternalAssessmentID'.$id)
- ->setClass('mediumWidth')
->placeholder()
->fromArray($externalAssessments)
->selected($selectedID);
$row->addSelect('category['.$id.']')
->setID('category'.$id)
- ->setClass('mediumWidth')
->placeholder()
->fromArray($externalAssessmentsFieldSetNames)
->selected($selectedField)
diff --git a/modules/School Admin/space_manage.php b/modules/School Admin/space_manage.php
index d0486f54d1..ffec1474b3 100644
--- a/modules/School Admin/space_manage.php
+++ b/modules/School Admin/space_manage.php
@@ -46,7 +46,7 @@
echo '';
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/space_manage.php');
diff --git a/modules/School Admin/yearGroup_manage_editOrderAjax.php b/modules/School Admin/yearGroup_manage_editOrderAjax.php
index b809086f74..760922afda 100644
--- a/modules/School Admin/yearGroup_manage_editOrderAjax.php
+++ b/modules/School Admin/yearGroup_manage_editOrderAjax.php
@@ -30,7 +30,7 @@
} else {
// Proceed!
$data = $_POST['data'] ?? [];
- $order = json_decode($_POST['order']);
+ $order = $_POST['order'] ?? [];
if (empty($order)) {
exit;
diff --git a/modules/Staff/absences_manage.php b/modules/Staff/absences_manage.php
index 96aed45053..3c274d35ce 100644
--- a/modules/Staff/absences_manage.php
+++ b/modules/Staff/absences_manage.php
@@ -46,7 +46,7 @@
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/Staff/absences_manage.php');
@@ -112,8 +112,7 @@
$table->addHeaderAction('view', __('View'))
->setIcon('planner')
->setURL('/modules/Staff/report_absences_summary.php')
- ->displayLabel()
- ->append(' | ');
+ ->displayLabel();
}
$table->addHeaderAction('add', __('New Absence'))
diff --git a/modules/Staff/absences_view_byPerson.php b/modules/Staff/absences_view_byPerson.php
index 5f01cd5656..fc21abcde1 100644
--- a/modules/Staff/absences_view_byPerson.php
+++ b/modules/Staff/absences_view_byPerson.php
@@ -57,7 +57,7 @@
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('q', '/modules/Staff/absences_view_byPerson.php');
diff --git a/modules/Staff/applicationForm_manage.php b/modules/Staff/applicationForm_manage.php
index 151797c4a1..5a3dbc162c 100644
--- a/modules/Staff/applicationForm_manage.php
+++ b/modules/Staff/applicationForm_manage.php
@@ -48,7 +48,7 @@
$form = Form::create('action', $session->get('absoluteURL').'/index.php', 'get');
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('q', "/modules/".$session->get('module')."/applicationForm_manage.php");
@@ -96,7 +96,7 @@
} else {
$output = Format::name('', $row['applicationPreferredName'], $row['applicationSurname'], 'Staff', true, true);
}
- return $output.''.Format::dateTime($row['timestamp']).' ';
+ return $output.''.Format::dateTime($row['timestamp']).' ';
});
$table->addColumn('jobTitle', __('Position'));
@@ -107,7 +107,7 @@
->format(function($row) {
$output = ''.__($row['status']).' ';
if ($row['status'] == 'Pending') {
- $output .= ''.trim(str_replace(',', ' ', $row['milestones'])).' ';
+ $output .= ''.trim(str_replace(',', ' ', $row['milestones'])).' ';
}
return $output;
});
diff --git a/modules/Staff/applicationForm_manage_edit.php b/modules/Staff/applicationForm_manage_edit.php
index 578b2b113c..4ab87d691e 100644
--- a/modules/Staff/applicationForm_manage_edit.php
+++ b/modules/Staff/applicationForm_manage_edit.php
@@ -71,8 +71,7 @@
$form->addHeaderAction('back', __('Back to Search Results'))
->setURL('/modules/Staff/applicationForm_manage.php')
->addParam('search', $search)
- ->displayLabel()
- ->append(' | ');
+ ->displayLabel();
}
$form->addHeaderAction('print', __('Print'))
@@ -135,7 +134,7 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('notes', __('Notes'));
- $column->addTextArea('notes')->setRows(5)->setClass('fullWidth');
+ $column->addTextArea('notes')->setRows(5)->setClass('w-full');
$form->addRow()->addHeading('Job Related Information', __('Job Related Information'));
diff --git a/modules/Staff/coverage_manage.php b/modules/Staff/coverage_manage.php
index 40a3c92583..17601a7f04 100644
--- a/modules/Staff/coverage_manage.php
+++ b/modules/Staff/coverage_manage.php
@@ -44,7 +44,7 @@
// SEARCH FORM
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/Staff/coverage_manage.php');
diff --git a/modules/Staff/coverage_planner.php b/modules/Staff/coverage_planner.php
index cb7aec3855..f58f638e6b 100644
--- a/modules/Staff/coverage_planner.php
+++ b/modules/Staff/coverage_planner.php
@@ -46,8 +46,7 @@
// DATE SELECTOR
$link = $session->get('absoluteURL').'/index.php?q=/modules/Staff/coverage_planner.php';
- $form = Form::create('dateNav', $link);
- $form->setClass('blank fullWidth');
+ $form = Form::createBlank('dateNav', $link);
$form->addHiddenValue('address', $session->get('address'));
$row = $form->addRow()->addClass('flex flex-wrap');
@@ -57,13 +56,13 @@
$nextDay = $date->modify('+1 day')->format('Y-m-d');
$col = $row->addColumn()->setClass('flex-1 flex items-center ');
- $col->addButton(__('Previous Day'))->addClass(' rounded-l-sm')->onClick("window.location.href='{$link}&date={$lastDay}'");
- $col->addButton(__('Today'))->addClass('ml-px')->onClick("window.location.href='{$link}&date={$thisDay}'");
- $col->addButton(__('Next Day'))->addClass('ml-px rounded-r-sm')->onClick("window.location.href='{$link}&date={$nextDay}'");
+ $col->addButton(__('Previous Day'))->groupAlign('left')->onClick("window.location.href='{$link}&date={$lastDay}'");
+ $col->addButton(__('Today'))->groupAlign('middle')->onClick("window.location.href='{$link}&date={$thisDay}'");
+ $col->addButton(__('Next Day'))->groupAlign('right')->onClick("window.location.href='{$link}&date={$nextDay}'");
$col = $row->addColumn()->addClass('flex items-center justify-end');
- $col->addDate('date')->setValue($date->format('Y-m-d'))->setClass('shortWidth');
- $col->addSubmit(__('Go'));
+ $col->addDate('date')->setValue($date->format('Y-m-d'))->setClass('shortWidth')->groupAlign('left');
+ $col->addSubmit(__('Go'))->groupAlign('right');
echo $form->getOutput();
diff --git a/modules/Staff/coverage_planner_assign.php b/modules/Staff/coverage_planner_assign.php
index d834bd55e5..5838abd88f 100644
--- a/modules/Staff/coverage_planner_assign.php
+++ b/modules/Staff/coverage_planner_assign.php
@@ -122,10 +122,10 @@
->fromPOST();
// FORM
- $form = Form::create('staffCoverage', $session->get('absoluteURL').'/modules/Staff/coverage_planner_assignProcess.php');
+ $form = Form::createBlank('staffCoverage', $session->get('absoluteURL').'/modules/Staff/coverage_planner_assignProcess.php');
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('blank bulkActionForm');
+ $form->setClass('bulkActionForm');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('gibbonStaffCoverageID', $coverage['gibbonStaffCoverageID']);
diff --git a/modules/Staff/coverage_requestAjax.php b/modules/Staff/coverage_requestAjax.php
index 011d9c6e92..477b654a22 100644
--- a/modules/Staff/coverage_requestAjax.php
+++ b/modules/Staff/coverage_requestAjax.php
@@ -43,8 +43,8 @@
$timeEnd = $_POST['timeEnd'] ?? '';
// FORM
- $form = $container->get(CoverageRequestForm::class)->createForm($gibbonPersonID, $dateStart, $dateEnd, $allDay, $timeStart, $timeEnd);
- $form->setClass('blank standardForm flex-1');
+ $form = $container->get(CoverageRequestForm::class)->createBlank($gibbonPersonID, $dateStart, $dateEnd, $allDay, $timeStart, $timeEnd);
+ $form->setClass('flex-1');
$form->setAction('ajax');
echo $form->getOutput();
diff --git a/modules/Staff/report_absences_summary.php b/modules/Staff/report_absences_summary.php
index 96798bacc2..a631e69533 100644
--- a/modules/Staff/report_absences_summary.php
+++ b/modules/Staff/report_absences_summary.php
@@ -86,7 +86,7 @@
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('q', '/modules/Staff/report_absences_summary.php');
diff --git a/modules/Staff/report_absences_weekly.php b/modules/Staff/report_absences_weekly.php
index dafb512520..84f8a64eb1 100644
--- a/modules/Staff/report_absences_weekly.php
+++ b/modules/Staff/report_absences_weekly.php
@@ -44,8 +44,7 @@
$staffAbsenceTypeGateway = $container->get(StaffAbsenceTypeGateway::class);
// DATE SELECTOR
- $form = Form::create('action', $session->get('absoluteURL').'/index.php?q=/modules/Staff/report_absences_weekly.php');
- $form->setClass('blank fullWidth');
+ $form = Form::createBlank('action', $session->get('absoluteURL').'/index.php?q=/modules/Staff/report_absences_weekly.php');
$form->addHiddenValue('address', $session->get('address'));
$row = $form->addRow()->addClass('flex flex-wrap');
diff --git a/modules/Staff/report_coverage_summary.php b/modules/Staff/report_coverage_summary.php
index b1a0d07603..f2c9bcc9a7 100644
--- a/modules/Staff/report_coverage_summary.php
+++ b/modules/Staff/report_coverage_summary.php
@@ -90,7 +90,7 @@
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('q', '/modules/Staff/report_coverage_summary.php');
diff --git a/modules/Staff/report_subs_availability.php b/modules/Staff/report_subs_availability.php
index 8af6dcae6e..73103c330f 100644
--- a/modules/Staff/report_subs_availability.php
+++ b/modules/Staff/report_subs_availability.php
@@ -60,7 +60,7 @@
$form = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('sidebar', $_GET['sidebar'] ?? '');
diff --git a/modules/Staff/report_subs_availabilityWeekly.php b/modules/Staff/report_subs_availabilityWeekly.php
index 08b69d94a4..5cbef9a1a2 100644
--- a/modules/Staff/report_subs_availabilityWeekly.php
+++ b/modules/Staff/report_subs_availabilityWeekly.php
@@ -46,8 +46,7 @@
$allStaff = $_GET['allStaff'] ?? $settingGateway->getSettingByScope('Staff', 'coverageInternal');
// DATE SELECTOR
- $form = Form::create('action', $session->get('absoluteURL').'/index.php?q=/modules/Staff/report_subs_availabilityWeekly.php&sidebar=false');
- $form->setClass('blank fullWidth');
+ $form = Form::createBlank('action', $session->get('absoluteURL').'/index.php?q=/modules/Staff/report_subs_availabilityWeekly.php&sidebar=false');
$form->addHiddenValue('address', $session->get('address'));
$row = $form->addRow()->addClass('flex flex-wrap');
diff --git a/modules/Staff/src/Tables/AbsenceFormats.php b/modules/Staff/src/Tables/AbsenceFormats.php
index 9f05a941ef..add081e6aa 100644
--- a/modules/Staff/src/Tables/AbsenceFormats.php
+++ b/modules/Staff/src/Tables/AbsenceFormats.php
@@ -108,7 +108,7 @@ public static function typeAndReason($absence)
$output .= ' '.Format::small($absence['reason']);
}
if ($absence['status'] != 'Approved') {
- $output .= ''.__($absence['status']).' ';
+ $output .= ''.__($absence['status']).' ';
}
return $output;
}
diff --git a/modules/Staff/staff_manage.php b/modules/Staff/staff_manage.php
index c93de8ef33..bb1b8725e8 100644
--- a/modules/Staff/staff_manage.php
+++ b/modules/Staff/staff_manage.php
@@ -50,7 +50,7 @@
$form = Form::create('searchForm', $session->get('absoluteURL')."/index.php", 'get');
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('q', "/modules/".$session->get('module')."/staff_manage.php");
diff --git a/modules/Staff/staff_manage_edit_contract_add.php b/modules/Staff/staff_manage_edit_contract_add.php
index a42d0e1fa3..6c85d56875 100644
--- a/modules/Staff/staff_manage_edit_contract_add.php
+++ b/modules/Staff/staff_manage_edit_contract_add.php
@@ -154,12 +154,12 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('education', __('Education Benefits'));
- $column->addTextArea('education')->setRows(5)->setClass('fullWidth');
+ $column->addTextArea('education')->setRows(5)->setClass('w-full');
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('notes', __('Notes'));
- $column->addTextArea('notes')->setRows(5)->setClass('fullWidth');
+ $column->addTextArea('notes')->setRows(5)->setClass('w-full');
$fileUploader = new Gibbon\FileUploader($pdo, $session);
$row = $form->addRow();
diff --git a/modules/Staff/staff_manage_edit_contract_edit.php b/modules/Staff/staff_manage_edit_contract_edit.php
index cc9f643c36..5020e23661 100644
--- a/modules/Staff/staff_manage_edit_contract_edit.php
+++ b/modules/Staff/staff_manage_edit_contract_edit.php
@@ -150,12 +150,12 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('education', __('Education Benefits'));
- $column->addTextArea('education')->setRows(5)->setClass('fullWidth');
+ $column->addTextArea('education')->setRows(5)->setClass('w-full');
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('notes', __('Notes'));
- $column->addTextArea('notes')->setRows(5)->setClass('fullWidth');
+ $column->addTextArea('notes')->setRows(5)->setClass('w-full');
$fileUploader = new Gibbon\FileUploader($pdo, $session);
$row = $form->addRow();
diff --git a/modules/Staff/staff_view.php b/modules/Staff/staff_view.php
index be5d7b2ab2..d223722a81 100644
--- a/modules/Staff/staff_view.php
+++ b/modules/Staff/staff_view.php
@@ -77,7 +77,7 @@
$form = Form::create('filters', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Search'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('q', '/modules/Staff/staff_view.php');
@@ -179,8 +179,7 @@
$table->addHeaderAction('add', __('Add'))
->setURL('/modules/Staff/staff_manage_add.php')
->addParam('search', $urlParams['search'])
- ->displayLabel()
- ->prepend(' | ');
+ ->displayLabel();
}
$table->addMetaData('filterOptions', [
@@ -275,7 +274,7 @@
->addParam('allStaff', $urlParams['allStaff'])
->addParam('search', $criteria->getSearchText(true))
->format(function ($person, $actions) {
- $actions->addAction('view', __('View Details'))
+ $actions->addAction('profile', __('View'))
->setURL('/modules/Staff/staff_view_details.php');
});
}
diff --git a/modules/Staff/staff_view_details.php b/modules/Staff/staff_view_details.php
index 49012292b8..21dd0cf458 100644
--- a/modules/Staff/staff_view_details.php
+++ b/modules/Staff/staff_view_details.php
@@ -182,8 +182,7 @@
$table->addHeaderAction('edit', __('Edit User'))
->setURL('/modules/User Admin/user_manage_edit.php')
->addParam('gibbonPersonID', $gibbonPersonID)
- ->displayLabel()
- ->append(' | ');
+ ->displayLabel();
}
if (isActionAccessible($guid, $connection2, '/modules/Staff/staff_manage.php')) {
@@ -255,8 +254,7 @@
->setURL('/modules/Timetable/tt_manage_subscription.php')
->addParam('gibbonPersonID', $gibbonPersonID)
->setIcon('download')
- ->displayLabel()
- ->prepend(' | ');
+ ->displayLabel();
}
echo $table->render(['' => '']);
@@ -284,8 +282,7 @@
$table->addHeaderAction('edit', __('Edit User'))
->setURL('/modules/User Admin/user_manage_edit.php')
->addParam('gibbonPersonID', $gibbonPersonID)
- ->displayLabel()
- ->append(' | ');
+ ->displayLabel();
}
if (isActionAccessible($guid, $connection2, '/modules/Staff/staff_manage.php')) {
@@ -527,7 +524,7 @@
$table->addColumn('name', __('Activity'))
->format(function ($activity) {
- return $activity['name'].''.$activity['type'].' ';
+ return $activity['name'].''.$activity['type'].' ';
});
$table->addColumn('role', __('Role'))
->format(function ($activity) {
diff --git a/modules/Staff/substitutes_manage.php b/modules/Staff/substitutes_manage.php
index cea73cc375..ef10d30899 100644
--- a/modules/Staff/substitutes_manage.php
+++ b/modules/Staff/substitutes_manage.php
@@ -45,7 +45,7 @@
// SEARCH FORM
$form = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Search'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/substitutes_manage.php');
diff --git a/modules/Staff/templates/dutySchedule.twig.html b/modules/Staff/templates/dutySchedule.twig.html
index 4d2df3d1ee..a47d7e22cc 100644
--- a/modules/Staff/templates/dutySchedule.twig.html
+++ b/modules/Staff/templates/dutySchedule.twig.html
@@ -17,7 +17,7 @@ {{ weekdayName }}
{% for person in dutyItem.roster %}
-
+
{% if person.image_240 is not empty %}
diff --git a/modules/Students/applicationForm.php b/modules/Students/applicationForm.php
index 4b8db1ef79..6d85971393 100644
--- a/modules/Students/applicationForm.php
+++ b/modules/Students/applicationForm.php
@@ -312,7 +312,7 @@
$row = $form->addRow()->setClass('senDetailsRow');
$column = $row->addColumn();
$column->addLabel('senDetails', __('SEN Details'))->description(__('Provide any comments or information concerning your child\'s development and SEN history.'));
- $column->addTextArea('senDetails')->setRows(5)->required()->setClass('fullWidth');
+ $column->addTextArea('senDetails')->setRows(5)->required()->setClass('w-full');
} else {
$form->addHiddenValue('sen', 'N');
@@ -326,7 +326,7 @@
$col = $form->addRow()->setClass('medicalDetailsRow')->addColumn();
$col->addLabel('medicalInformation', __('Medical Information'))->description(__('Please indicate any medical conditions.'));
- $col->addTextArea('medicalInformation')->setRows(5)->required()->setClass('fullWidth');
+ $col->addTextArea('medicalInformation')->setRows(5)->required()->setClass('w-full');
// STUDENT EDUCATION
$heading = $form->addRow()->addSubheading(__('Student Education'));
@@ -720,7 +720,7 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('languageChoiceExperience', __('Language Choice Experience'))->description(__('Has the applicant studied the selected language before? If so, please describe the level and type of experience.'));
- $column->addTextArea('languageChoiceExperience')->required()->setRows(5)->setClass('fullWidth');
+ $column->addTextArea('languageChoiceExperience')->required()->setRows(5)->setClass('w-full');
}
}
diff --git a/modules/Students/applicationForm_manage.php b/modules/Students/applicationForm_manage.php
index c570cafaf9..91637e13ee 100644
--- a/modules/Students/applicationForm_manage.php
+++ b/modules/Students/applicationForm_manage.php
@@ -56,7 +56,7 @@
$form = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get');
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/applicationForm_manage.php');
$form->addHiddenValue('gibbonSchoolYearID', $gibbonSchoolYearID);
diff --git a/modules/Students/applicationForm_manage_edit.php b/modules/Students/applicationForm_manage_edit.php
index cbe22a2afa..e9606019e5 100644
--- a/modules/Students/applicationForm_manage_edit.php
+++ b/modules/Students/applicationForm_manage_edit.php
@@ -105,7 +105,7 @@
$row = $form->addRow();
$row->addHeading('For Office Use', __('For Office Use'));
- $row->addContent(__('Fix Block Caps'))->wrap('
', ' ');
+ $row->addContent(__('Fix Block Caps'))->wrap('
', ' ');
$row = $form->addRow();
$row->addLabel('gibbonApplicationFormID', __('Application ID'));
@@ -257,7 +257,7 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('notes', __('Notes'));
- $column->addTextArea('notes')->setRows(5)->setClass('fullWidth');
+ $column->addTextArea('notes')->setRows(5)->setClass('w-full');
// SIBLING APPLICATIONS
$heading = $form->addRow()->addSubheading(__('Sibling Applications'));
@@ -427,7 +427,7 @@
$row = $form->addRow()->setClass('senDetailsRow');
$column = $row->addColumn();
$column->addLabel('', __('SEN Details'))->description(__('Provide any comments or information concerning your child\'s development and SEN history.'));
- $column->addTextArea('senDetails')->setRows(5)->setClass('fullWidth');
+ $column->addTextArea('senDetails')->setRows(5)->setClass('w-full');
} else {
$form->addHiddenValue('sen', 'N');
@@ -436,7 +436,7 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('', __('Medical Information'))->description(__('Please indicate any medical conditions.'));
- $column->addTextArea('medicalInformation')->setRows(5)->setClass('fullWidth');
+ $column->addTextArea('medicalInformation')->setRows(5)->setClass('w-full');
// STUDENT EDUCATION
@@ -716,7 +716,7 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('languageChoiceExperience', __('Language Choice Experience'))->description(__('Has the applicant studied the selected language before? If so, please describe the level and type of experience.'));
- $column->addTextArea('languageChoiceExperience')->required()->setRows(5)->setClass('fullWidth');
+ $column->addTextArea('languageChoiceExperience')->required()->setRows(5)->setClass('w-full');
}
}
diff --git a/modules/Students/firstAidRecord.php b/modules/Students/firstAidRecord.php
index 44c9355447..bd0b6b49b5 100644
--- a/modules/Students/firstAidRecord.php
+++ b/modules/Students/firstAidRecord.php
@@ -52,7 +52,7 @@
$form->setTitle(__('Filter'));
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', "/modules/".$session->get('module')."/firstAidRecord.php");
diff --git a/modules/Students/firstAidRecord_add.php b/modules/Students/firstAidRecord_add.php
index e2e520708b..60968183a7 100644
--- a/modules/Students/firstAidRecord_add.php
+++ b/modules/Students/firstAidRecord_add.php
@@ -81,12 +81,12 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('description', __('Description'));
- $column->addTextArea('description')->setRows(8)->setClass('fullWidth')->setValue($firstAidDescriptionTemplate);
+ $column->addTextArea('description')->setRows(8)->setClass('w-full')->setValue($firstAidDescriptionTemplate);
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('actionTaken', __('Action Taken'));
- $column->addTextArea('actionTaken')->setRows(8)->setClass('fullWidth');
+ $column->addTextArea('actionTaken')->setRows(8)->setClass('w-full');
$row = $form->addRow()->addHeading('Follow Up', __('Follow Up'));
@@ -97,7 +97,7 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('followUp', __('Follow Up'))->description(__('If you are the student\'s teacher, please include details such as: the location & lesson, what lead up to the incident, what was the incident, what did you do.'));
- $column->addTextArea('followUp')->setRows(8)->setClass('fullWidth');
+ $column->addTextArea('followUp')->setRows(8)->setClass('w-full');
// CUSTOM FIELDS
$container->get(CustomFieldHandler::class)->addCustomFieldsToForm($form, 'First Aid', []);
diff --git a/modules/Students/firstAidRecord_edit.php b/modules/Students/firstAidRecord_edit.php
index be8bf70de7..06ae6d278e 100644
--- a/modules/Students/firstAidRecord_edit.php
+++ b/modules/Students/firstAidRecord_edit.php
@@ -103,12 +103,12 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('description', __('Description'));
- $column->addTextArea('description')->setValue($values['description'])->setRows(8)->setClass('fullWidth')->readonly();
+ $column->addTextArea('description')->setValue($values['description'])->setRows(8)->setClass('w-full')->readonly();
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('actionTaken', __('Action Taken'));
- $column->addTextArea('actionTaken')->setValue($values['actionTaken'])->setRows(8)->setClass('fullWidth')->readonly();
+ $column->addTextArea('actionTaken')->setValue($values['actionTaken'])->setRows(8)->setClass('w-full')->readonly();
$row = $form->addRow()->addHeading('Follow Up', __('Follow Up'));
@@ -123,7 +123,7 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('followUp0', __("Follow Up by {name} at {date}", ['name' => Format::name('', $values['preferredNameFirstAider'], $values['surnameFirstAider']), 'date' => Format::dateTimeReadable($values['timestamp'])]));
- $column->addContent($values['followUp'])->setClass('fullWidth');
+ $column->addContent($values['followUp'])->setClass('w-full');
}
//Print new-style followup as log
@@ -140,7 +140,7 @@
$row = $form->addRow();
$column = $row->addColumn();
$column->addLabel('followUp', (empty($logs) ? __('Follow Up') : __('Further Follow Up')) .' / '.__('Notes'))->description(__('If you are the student\'s teacher, please include details such as: the location & lesson, what lead up to the incident, what was the incident, what did you do.'));
- $column->addTextArea('followUp')->setRows(8)->setClass('fullWidth');
+ $column->addTextArea('followUp')->setRows(8)->setClass('w-full');
// CUSTOM FIELDS
diff --git a/modules/Students/medicalForm_manage.php b/modules/Students/medicalForm_manage.php
index 92d8e0b867..bb64e19b47 100644
--- a/modules/Students/medicalForm_manage.php
+++ b/modules/Students/medicalForm_manage.php
@@ -47,7 +47,7 @@
echo '';
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/medicalForm_manage.php');
diff --git a/modules/Students/report_familyAddress_byStudent.php b/modules/Students/report_familyAddress_byStudent.php
index 5ba72a4d04..160ce3d362 100644
--- a/modules/Students/report_familyAddress_byStudent.php
+++ b/modules/Students/report_familyAddress_byStudent.php
@@ -50,7 +50,7 @@
$form = Form::create('action', $session->get('absoluteURL')."/index.php?q=/modules/Students/report_familyAddress_byStudent.php");
$form->setTitle(__('Choose Students'));
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$row = $form->addRow();
$row->addLabel('gibbonPersonID', __('Students'));
diff --git a/modules/Students/report_formGroupSummary.php b/modules/Students/report_formGroupSummary.php
index 1085991fcf..c5c1bfaf02 100644
--- a/modules/Students/report_formGroupSummary.php
+++ b/modules/Students/report_formGroupSummary.php
@@ -66,7 +66,7 @@
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', "/modules/".$session->get('module')."/report_formGroupSummary.php");
diff --git a/modules/Students/report_student_emergencySummary.php b/modules/Students/report_student_emergencySummary.php
index f0308ca7df..217d5fc5f2 100644
--- a/modules/Students/report_student_emergencySummary.php
+++ b/modules/Students/report_student_emergencySummary.php
@@ -62,7 +62,7 @@
$form = Form::create('action', $session->get('absoluteURL')."/index.php?q=/modules/Students/report_student_emergencySummary.php");
$form->setTitle(__('Choose Students'));
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$row = $form->addRow();
$row->addLabel('gibbonPersonID', __('Students'));
diff --git a/modules/Students/report_student_medicalSummary.php b/modules/Students/report_student_medicalSummary.php
index 3e69efd2e3..7995213a5d 100644
--- a/modules/Students/report_student_medicalSummary.php
+++ b/modules/Students/report_student_medicalSummary.php
@@ -64,7 +64,7 @@
$form = Form::create('action', $session->get('absoluteURL')."/index.php?q=/modules/Students/report_student_medicalSummary.php");
$form->setTitle(__('Choose Students'));
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$row = $form->addRow();
$row->addLabel('gibbonPersonID', __('Students'));
diff --git a/modules/Students/report_student_personalDocumentSummary.php b/modules/Students/report_student_personalDocumentSummary.php
index f9a6f4a732..0842c0caea 100644
--- a/modules/Students/report_student_personalDocumentSummary.php
+++ b/modules/Students/report_student_personalDocumentSummary.php
@@ -54,7 +54,7 @@
$form->setTitle(__('Choose Students'));
$form->setDescription(__('This report prints a summary of personal documents including passports and ID cards for the selected students.'));
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$row = $form->addRow();
$row->addLabel('gibbonPersonID', __('Students'));
diff --git a/modules/Students/report_students_IDCards.php b/modules/Students/report_students_IDCards.php
index 6bdc079d90..8fb09a9410 100644
--- a/modules/Students/report_students_IDCards.php
+++ b/modules/Students/report_students_IDCards.php
@@ -46,7 +46,7 @@
$form = Form::create('action', $session->get('absoluteURL')."/index.php?q=/modules/Students/report_students_IDCards.php");
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$row = $form->addRow();
$row->addLabel('gibbonPersonID', __('Students'));
diff --git a/modules/Students/report_students_byFormGroup.php b/modules/Students/report_students_byFormGroup.php
index a2f52fe2ba..9b85352549 100644
--- a/modules/Students/report_students_byFormGroup.php
+++ b/modules/Students/report_students_byFormGroup.php
@@ -46,7 +46,7 @@
$form = Form::create('action', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Choose Form Group'))
->setFactory(DatabaseFormFactory::create($pdo))
- ->setClass('noIntBorder fullWidth');
+ ->setClass('noIntBorder w-full');
$form->addHiddenValue('q', "/modules/".$session->get('module')."/report_students_byFormGroup.php");
diff --git a/modules/Students/student_view.php b/modules/Students/student_view.php
index 058225cfe8..b87cab5fdd 100644
--- a/modules/Students/student_view.php
+++ b/modules/Students/student_view.php
@@ -103,7 +103,7 @@
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/student_view.php');
$searchDescription = $canViewFullProfile
@@ -171,7 +171,7 @@
->addParam('sort', $sort)
->addParam('allStudents', $canViewFullProfile ? $allStudents : '')
->format(function ($row, $actions) {
- $actions->addAction('view', __('View Details'))
+ $actions->addAction('profile', __('View'))
->setURL('/modules/Students/student_view_details.php');
});
diff --git a/modules/Students/student_view_details.php b/modules/Students/student_view_details.php
index 43b2f1e550..a7b3554cde 100644
--- a/modules/Students/student_view_details.php
+++ b/modules/Students/student_view_details.php
@@ -570,8 +570,7 @@
->addParam('gibbonSchoolYearID', $session->get('gibbonSchoolYearID'))
->addParam('type', $role)
->addParam('allUsers', $allStudents)
- ->displayLabel()
- ->append(' | ');
+ ->displayLabel();
}
}
@@ -592,8 +591,7 @@
->setURL('/modules/Timetable/tt_manage_subscription.php')
->addParam('gibbonPersonID', $gibbonPersonID)
->setIcon('download')
- ->displayLabel()
- ->prepend(' | ');
+ ->displayLabel();
}
echo $table->render([['' => '']]);
@@ -1401,7 +1399,7 @@
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
$form->setTitle(__('Filter'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/student_view_details.php');
$form->addHiddenValue('gibbonPersonID', $gibbonPersonID);
@@ -1594,7 +1592,7 @@
echo '';
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/student_view_details.php');
$form->addHiddenValue('gibbonPersonID', $gibbonPersonID);
@@ -1643,7 +1641,7 @@
$details = isset($_GET['details'])? $_GET['details'] : 'Yes';
$form->addHiddenValue('details', 'No');
$showHide = $form->getFactory()->createCheckbox('details')->addClass('details')->setValue('Yes')->checked($details)->inline(true)
- ->description(__('Show/Hide Details'))->wrap('
', ' ');
+ ->description(__('Show/Hide Details'))->wrap('
', ' ');
$rowFilter = $form->addRow();
$rowFilter->addSearchSubmit($session, __('Clear Filters'), array('gibbonPersonID', 'allStudents', 'search', 'subpage'))->prepend($showHide->getOutput());
diff --git a/modules/System Admin/dataRetention.php b/modules/System Admin/dataRetention.php
index 86d0088e5b..1f3bc1a1a7 100644
--- a/modules/System Admin/dataRetention.php
+++ b/modules/System Admin/dataRetention.php
@@ -63,7 +63,7 @@
->description($description)
->alignRight()
->setLabelClass('w-full')
- ->addClass('border rounded p-6 my-2 bg-blue-100');
+ ->addClass('border rounded p-6 my-2 bg-blue-50');
}
$row = $form->addRow();
diff --git a/modules/System Admin/emailTemplates_manage.php b/modules/System Admin/emailTemplates_manage.php
index 0d74b403d3..d181a72f1c 100644
--- a/modules/System Admin/emailTemplates_manage.php
+++ b/modules/System Admin/emailTemplates_manage.php
@@ -49,11 +49,12 @@
$actions = $table->addActionColumn()
->addParam('gibbonEmailTemplateID')
->format(function ($values, $actions) {
+ $actions->addAction('edit', __('Edit'))
+ ->setURL('/modules/System Admin/emailTemplates_manage_edit.php');
+
$actions->addAction('duplicate', __('Duplicate'))
->setIcon('copy')
->setURL('/modules/System Admin/emailTemplates_manage_duplicate.php');
- $actions->addAction('edit', __('Edit'))
- ->setURL('/modules/System Admin/emailTemplates_manage_edit.php');
if ($values['type'] == 'Custom') {
$actions->addAction('delete', __('Delete'))
diff --git a/modules/System Admin/formBuilder.php b/modules/System Admin/formBuilder.php
index f3429b2167..b46a33941e 100644
--- a/modules/System Admin/formBuilder.php
+++ b/modules/System Admin/formBuilder.php
@@ -62,14 +62,14 @@
$table->addActionColumn()
->addParam('gibbonFormID')
->format(function ($form, $actions) {
+ $actions->addAction('edit', __('Edit'))
+ ->setURL('/modules/System Admin/formBuilder_edit.php');
+
if ($form['pages'] > 0) {
$actions->addAction('view', __('Preview'))
->setURL('/modules/System Admin/formBuilder_preview.php');
}
- $actions->addAction('edit', __('Edit'))
- ->setURL('/modules/System Admin/formBuilder_edit.php');
-
if ($form['pages'] > 0) {
$actions->addAction('design', __('Design'))
->setIcon('markbook')
diff --git a/modules/System Admin/formBuilder_editOrderAjax.php b/modules/System Admin/formBuilder_editOrderAjax.php
index dc8ba521d5..af6561a956 100644
--- a/modules/System Admin/formBuilder_editOrderAjax.php
+++ b/modules/System Admin/formBuilder_editOrderAjax.php
@@ -30,7 +30,7 @@
} else {
// Proceed!
$data = $_POST['data'] ?? [];
- $order = json_decode($_POST['order']);
+ $order = $_POST['order'];
if (empty($order) || empty($data['gibbonFormID'])) {
exit;
diff --git a/modules/System Admin/formBuilder_page_add.php b/modules/System Admin/formBuilder_page_add.php
index 93df5c3832..b5aced31a8 100644
--- a/modules/System Admin/formBuilder_page_add.php
+++ b/modules/System Admin/formBuilder_page_add.php
@@ -49,6 +49,10 @@
$form = Form::create('formsManage', $session->get('absoluteURL').'/modules/System Admin/formBuilder_page_addProcess.php');
$form->setFactory(DatabaseFormFactory::create($pdo));
+
+ if ($redirect == 'design') {
+ $form->removeMeta();
+ }
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('gibbonFormID', $gibbonFormID);
diff --git a/modules/System Admin/formBuilder_page_design.php b/modules/System Admin/formBuilder_page_design.php
index 3487b05d7b..9ea1059cf1 100644
--- a/modules/System Admin/formBuilder_page_design.php
+++ b/modules/System Admin/formBuilder_page_design.php
@@ -126,7 +126,7 @@
}
if ($element = $row->getElement($field['fieldName'])) {
- $element->addClass('flex-1');
+ $element->addClass('flex-grow');
}
$row->addContent((new Action('edit', __('Edit')))
@@ -140,7 +140,7 @@
->addParam('gibbonFormFieldID', $field['gibbonFormFieldID'])
->addParams($urlParams)
->getOutput()
- );
+ )->setClass('flex-1 relative flex justify-end items-center gap-2 text-right');
}
// $formFields->clearTriggers();
diff --git a/modules/System Admin/formBuilder_page_editOrderAjax.php b/modules/System Admin/formBuilder_page_editOrderAjax.php
index 9b527c6c20..b6dba50037 100644
--- a/modules/System Admin/formBuilder_page_editOrderAjax.php
+++ b/modules/System Admin/formBuilder_page_editOrderAjax.php
@@ -30,7 +30,7 @@
} else {
// Proceed!
$data = $_POST['data'] ?? [];
- $order = json_decode($_POST['order']);
+ $order = $_POST['order'];
if (empty($order) || empty($data['gibbonFormPageID'])) {
exit;
diff --git a/modules/System Admin/formBuilder_page_edit_field_add.php b/modules/System Admin/formBuilder_page_edit_field_add.php
index d5439f7824..eb2cef18a0 100644
--- a/modules/System Admin/formBuilder_page_edit_field_add.php
+++ b/modules/System Admin/formBuilder_page_edit_field_add.php
@@ -58,6 +58,7 @@
$form = Form::create('formFieldAdd', $session->get('absoluteURL').'/modules/System Admin/formBuilder_page_edit_field_addProcess.php');
$form->setFactory(DatabaseFormFactory::create($pdo));
+ $form->removeMeta();
$form->addHiddenValue('address', '/modules/System Admin/formBuilder_page_edit.php');
$form->addHiddenValue('fieldGroup', $fieldGroup);
@@ -223,7 +224,7 @@
->description($description)
->alignLeft()
->setLabelClass('w-full p-4')
- ->addClass('items-center border rounded pl-4 my-2 bg-blue-100');
+ ->addClass('items-center border rounded pl-4 my-2 bg-blue-50');
}
}
}
diff --git a/modules/System Admin/formBuilder_page_edit_field_edit.php b/modules/System Admin/formBuilder_page_edit_field_edit.php
index 7d249dd1ad..4cae38c963 100644
--- a/modules/System Admin/formBuilder_page_edit_field_edit.php
+++ b/modules/System Admin/formBuilder_page_edit_field_edit.php
@@ -56,6 +56,7 @@
}
$form = Form::create('formsManage', $session->get('absoluteURL').'/modules/System Admin/formBuilder_page_edit_field_editProcess.php');
+ $form->removeMeta();
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValues($urlParams);
diff --git a/modules/System Admin/i18n_manage.php b/modules/System Admin/i18n_manage.php
index a3e7b3af49..a4042d375e 100644
--- a/modules/System Admin/i18n_manage.php
+++ b/modules/System Admin/i18n_manage.php
@@ -54,11 +54,9 @@
$i18n['isInstalled'] = i18nFileExists($session->get('absolutePath'), $i18n['code']);
});
- $form = Form::create('i18n_manage', $session->get('absoluteURL').'/modules/'.$session->get('module').'/i18n_manageProcess.php');
+ $form = Form::createBlank('i18n_manage', $session->get('absoluteURL').'/modules/'.$session->get('module').'/i18n_manageProcess.php');
$form->setTitle(__('Installed'));
- $form->setClass('fullWidth');
$form->addHiddenValue('address', $session->get('address'));
- $form->setClass('w-full blank');
// DATA TABLE
$table = $form->addRow()->addDataTable('i18n_installed', $criteria)->withData($languages);
@@ -112,7 +110,7 @@
}
});
- $table = $form->addRow()->addTable()->setClass('smallIntBorder fullWidth standardForm');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder w-full standardForm');
$table->addRow()->addSubmit();
$installedCount = array_reduce($languages->toArray(), function ($count, $i18n) {
diff --git a/modules/System Admin/import_run.php b/modules/System Admin/import_run.php
index 5d50782587..732133097a 100644
--- a/modules/System Admin/import_run.php
+++ b/modules/System Admin/import_run.php
@@ -236,8 +236,7 @@
echo "var columnDataFunction = " . Importer::COLUMN_DATA_FUNCTION .";";
echo "";
- $form = Form::create('importStep2', $session->get('absoluteURL').'/index.php?q=/modules/'.$session->get('module').'/import_run.php&type='.$type.'&step=3');
- $form->setClass('w-full blank');
+ $form = Form::createBlank('importStep2', $session->get('absoluteURL').'/index.php?q=/modules/'.$session->get('module').'/import_run.php&type='.$type.'&step=3');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('mode', $mode);
@@ -256,7 +255,7 @@
$lastColumnValue = $importType->getPrimaryKey();
}
- $table = $form->addRow()->addTable()->setClass('smallIntBorder fullWidth');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder w-full');
$row = $table->addRow();
$row->addLabel('syncField', __('Sync').'?')->description(__('Only rows with a matching database ID will be imported.'));
@@ -277,7 +276,7 @@
// COLUMN SELECTION
if (!empty($importType->getAllFields())) {
- $table = $form->addRow()->addTable()->setClass('colorOddEven fullWidth');
+ $table = $form->addRow()->addTable()->setClass('colorOddEven w-full');
$header = $table->addHeaderRow();
$header->addContent(__('Field Name'));
@@ -382,7 +381,7 @@
$form->addRow()->addContent(' ');
// CSV PREVIEW
- $table = $form->addRow()->addTable()->setClass('smallIntBorder fullWidth');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder w-full');
$row = $table->addRow();
$row->addLabel('csvData', __('Data'));
@@ -509,8 +508,7 @@
echo $page->fetchFromTemplate('importer.twig.html', $results);
if ($step==3) {
- $form = Form::create('importStep2', $session->get('absoluteURL').'/index.php?q=/modules/'.$session->get('module').'/import_run.php&type='.$type.'&step=4');
- $form->setClass('w-full blank');
+ $form = Form::createBlank('importStep2', $session->get('absoluteURL').'/index.php?q=/modules/'.$session->get('module').'/import_run.php&type='.$type.'&step=4');
$form->addHiddenValue('address', $session->get('address'));
$form->addHiddenValue('mode', $mode);
@@ -523,7 +521,7 @@
$form->addHiddenValue('filename', $_POST['filename'] ?? '');
// CSV PREVIEW
- $table = $form->addRow()->addTable()->setClass('smallIntBorder fullWidth');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder w-full');
$row = $table->addRow();
$row->addLabel('csvData', __('Data'));
diff --git a/modules/System Admin/logs_view.php b/modules/System Admin/logs_view.php
index c7fb95d811..4f8cd81fe1 100644
--- a/modules/System Admin/logs_view.php
+++ b/modules/System Admin/logs_view.php
@@ -43,7 +43,7 @@
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->setTitle(__('Filters'));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/logs_view.php');
$sql = "SELECT DISTINCT title AS value, title AS name FROM gibbonLog ORDER BY title";
diff --git a/modules/System Admin/notificationSettings.php b/modules/System Admin/notificationSettings.php
index 4fb9ec0256..79a0649f1e 100644
--- a/modules/System Admin/notificationSettings.php
+++ b/modules/System Admin/notificationSettings.php
@@ -45,7 +45,7 @@
$nameFormat = function ($row) use ($session) {
$output = __($row['event']);
if ($row['type'] == 'CLI') {
- $output .= "
";
+ $output .= Format::tooltip(icon('solid', 'config', 'size-5 ml-2 fill-current text-gray-400 float-right'), __('This is a CLI notification event. It will only run if the corresponding CLI script has been setup on the server.'));
}
return $output;
};
diff --git a/modules/System Admin/stringReplacement_manage.php b/modules/System Admin/stringReplacement_manage.php
index 90af623b57..1c008202e7 100644
--- a/modules/System Admin/stringReplacement_manage.php
+++ b/modules/System Admin/stringReplacement_manage.php
@@ -46,7 +46,7 @@
echo '';
$form = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get');
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/stringReplacement_manage.php');
diff --git a/modules/System Admin/systemCheck.php b/modules/System Admin/systemCheck.php
index 5fc906baa2..76991fc78c 100644
--- a/modules/System Admin/systemCheck.php
+++ b/modules/System Admin/systemCheck.php
@@ -35,8 +35,8 @@
$versionDB = $container->get(SettingGateway::class)->getSettingByScope('System', 'version');
- $trueIcon = "
";
- $falseIcon = "
";
+ $trueIcon = icon('solid', 'check', 'size-6 ml-2 fill-current text-green-600');
+ $falseIcon = icon('solid', 'cross', 'size-6 ml-2 fill-current text-red-700');
$versionTitle = __('%s Version');
$versionMessage = __('%s requires %s version %s or higher');
@@ -72,34 +72,34 @@
]), 'error');
}
- $form = Form::createTable('systemCheck', "")->setClass('smallIntBorder w-full');
+ $form = Form::create('systemCheck', "");
$form->addRow()->addHeading('System Requirements', __('System Requirements'));
$row = $form->addRow();
$row->addLabel('phpVersionLabel', sprintf($versionTitle, 'PHP'))->description(sprintf($versionMessage, __('Gibbon').' v'.$version, 'PHP', $phpRequirement));
- $row->addTextField('phpVersion')->setValue($phpVersion)->readonly();
- $row->addContent((version_compare($phpVersion, $phpRequirement, '>='))? $trueIcon : $falseIcon);
+ $row->addTextField('phpVersion')->setValue($phpVersion)->readonly()
+ ->append((version_compare($phpVersion, $phpRequirement, '>='))? $trueIcon : $falseIcon);
$row = $form->addRow();
$row->addLabel('mysqlVersionLabel', sprintf($versionTitle, 'MySQL'))->description(sprintf($versionMessage, __('Gibbon').' v'.$version, 'MySQL', $mysqlRequirement));
- $row->addTextField('mysqlVersion')->setValue($mysqlVersion)->readonly();
- $row->addContent((version_compare($mysqlVersion, $mysqlRequirement, '>='))? $trueIcon : $falseIcon);
+ $row->addTextField('mysqlVersion')->setValue($mysqlVersion)->readonly()
+ ->append((version_compare($mysqlVersion, $mysqlRequirement, '>='))? $trueIcon : $falseIcon);
$row = $form->addRow();
$row->addLabel('mysqlCollationLabel', __('MySQL Collation'))->description(sprintf( __('Database collation should be set to %s'), 'utf8_general_ci or utf8mb3_general_ci'));
- $row->addTextField('mysqlCollation')->setValue($mysqlCollation)->readonly();
- $row->addContent(($mysqlCollation == 'utf8_general_ci' || $mysqlCollation == 'utf8mb3_general_ci')? $trueIcon : $falseIcon);
+ $row->addTextField('mysqlCollation')->setValue($mysqlCollation)->readonly()
+ ->append(($mysqlCollation == 'utf8_general_ci' || $mysqlCollation == 'utf8mb3_general_ci')? $trueIcon : $falseIcon);
$row = $form->addRow();
$row->addLabel('pdoSupportLabel', __('MySQL PDO Support'));
- $row->addTextField('pdoSupport')->setValue((@extension_loaded('pdo_mysql'))? __('Installed') : __('Not Installed'))->readonly();
- $row->addContent((@extension_loaded('pdo') && extension_loaded('pdo_mysql'))? $trueIcon : $falseIcon);
+ $row->addTextField('pdoSupport')->setValue((@extension_loaded('pdo_mysql'))? __('Installed') : __('Not Installed'))->readonly()
+ ->append((@extension_loaded('pdo') && extension_loaded('pdo_mysql'))? $trueIcon : $falseIcon);
$row = $form->addRow();
$row->addLabel('backgroundProcessingLabel', __('Background Processing'))->description(__('Requires PHP exec() function access'));
- $row->addTextField('backgroundProcessing')->setValue($backgroundProcessing ? __('Enabled') : __('Not Available'))->readonly();
- $row->addContent((@extension_loaded('pdo') && extension_loaded('pdo_mysql'))? $trueIcon : $falseIcon);
+ $row->addTextField('backgroundProcessing')->setValue($backgroundProcessing ? __('Enabled') : __('Not Available'))->readonly()
+ ->append((@extension_loaded('pdo') && extension_loaded('pdo_mysql'))? $trueIcon : $falseIcon);
// APACHE MODULES
if ($apacheVersion !== false) {
@@ -110,8 +110,8 @@
$active = @in_array($moduleName, $apacheModules);
$row = $form->addRow();
$row->addLabel('moduleLabel', $moduleName);
- $row->addTextField('module')->setValue(($active)? __('Enabled') : __('N/A'))->readonly();
- $row->addContent(($active)? $trueIcon : $falseIcon);
+ $row->addTextField('module')->setValue(($active)? __('Enabled') : __('N/A'))->readonly()
+ ->append(($active)? $trueIcon : $falseIcon);
}
}
@@ -125,8 +125,8 @@
$installed = @extension_loaded($extension);
$row = $form->addRow();
$row->addLabel('extensionLabel', $extension);
- $row->addTextField('extension')->setValue(($installed)? __('Installed') : __('Not Installed'))->readonly();
- $row->addContent(($installed)? $trueIcon : $falseIcon);
+ $row->addTextField('extension')->setValue(($installed)? __('Installed') : __('Not Installed'))->readonly()
+ ->append(($installed)? $trueIcon : $falseIcon);
}
}
@@ -151,8 +151,8 @@
$row = $form->addRow();
$row->addLabel('settingLabel', '
'.$setting.' '.$operator.' '.$compare.' ');
- $row->addTextField('setting')->setValue($value)->readonly();
- $row->addContent($isValid? $trueIcon : $falseIcon);
+ $row->addTextField('setting')->setValue($value)->readonly()
+ ->append($isValid? $trueIcon : $falseIcon);
}
}
@@ -161,18 +161,18 @@
$row = $form->addRow();
$row->addLabel('systemWriteLabel', __('System not publicly writeable'));
- $row->addTextArea('systemWrite')->setValue(sprintf(__('%s files checked (%s publicly writeable)'), $fileCount, $publicWriteCount))->setRows(1)->addClass('w-64 max-w-1/2 text-left')->readonly();
- $row->addContent($publicWriteCount == 0? $trueIcon : $falseIcon);
+ $row->addTextArea('systemWrite')->setValue(sprintf(__('%s files checked (%s publicly writeable)'), $fileCount, $publicWriteCount))->setRows(1)->addClass(' max-w-1/2 text-left')->readonly()
+ ->append($publicWriteCount == 0? $trueIcon : $falseIcon);
$row = $form->addRow();
$row->addLabel('systemWriteLabel', __('Uploads folder not publicly accessible'));
- $row->addTextArea('systemWrite')->setValue($session->get('absoluteURL').'/uploads')->setRows(1)->addClass('w-64 max-w-1/2 text-left')->readonly();
- $row->addContent($statusCheck? $trueIcon : $falseIcon);
+ $row->addTextArea('systemWrite')->setValue($session->get('absoluteURL').'/uploads')->setRows(1)->addClass(' max-w-1/2 text-left')->readonly()
+ ->append($statusCheck? $trueIcon : $falseIcon);
$row = $form->addRow();
$row->addLabel('uploadsFolderLabel', __('Uploads folder server writeable'));
- $row->addTextField('uploadsFolder')->setValue($session->get('absoluteURL').'/uploads')->readonly();
- $row->addContent(is_writable($session->get('absolutePath').'/uploads')? $trueIcon : $falseIcon);
+ $row->addTextField('uploadsFolder')->setValue($session->get('absoluteURL').'/uploads')->readonly()
+ ->append(is_writable($session->get('absolutePath').'/uploads')? $trueIcon : $falseIcon);
echo $form->getOutput();
}
diff --git a/modules/System Admin/systemSettings.php b/modules/System Admin/systemSettings.php
index 11f0720c2b..eb9bb215f5 100644
--- a/modules/System Admin/systemSettings.php
+++ b/modules/System Admin/systemSettings.php
@@ -50,7 +50,7 @@
$setting = $settingGateway->getSettingByScope('System', 'absoluteURL', true);
$row = $form->addRow();
$row->addLabel($setting['name'], __($setting['nameDisplay']))->description(__($setting['description']));
- $row->addURL($setting['name'])->setValue($setting['value'])->maxLength(100)->required();
+ $row->addTextField($setting['name'])->setValue($setting['value'])->maxLength(100)->required();
$setting = $settingGateway->getSettingByScope('System', 'absolutePath', true);
$row = $form->addRow();
diff --git a/modules/System Admin/templates/icons.twig.html b/modules/System Admin/templates/icons.twig.html
deleted file mode 100644
index 6481316ea8..0000000000
--- a/modules/System Admin/templates/icons.twig.html
+++ /dev/null
@@ -1,18 +0,0 @@
-{##}
-{% if icon == 'docs' %}
-
-{% elseif icon == 'forums' %}
-
-{% elseif icon == 'license' %}
-
-{% elseif icon == 'support' %}
-
-{% endif %}
diff --git a/modules/System Admin/theme_manage.php b/modules/System Admin/theme_manage.php
index 7caaf65031..35bb7766db 100644
--- a/modules/System Admin/theme_manage.php
+++ b/modules/System Admin/theme_manage.php
@@ -102,11 +102,10 @@
}, array());
// INSTALLED THEMES
- $form = Form::create('theme_manage', $session->get('absoluteURL').'/modules/'.$session->get('module').'/theme_manageProcess.php');
+ $form = Form::createBlank('theme_manage', $session->get('absoluteURL').'/modules/'.$session->get('module').'/theme_manageProcess.php');
- $form->setClass('fullWidth');
+ $form->setClass('w-full');
$form->addHiddenValue('address', $session->get('address'));
- $form->setClass('w-full blank');
// DATA TABLE
$table = $form->addRow()->addDataTable('themeManage', $criteria)->withData($themes);
@@ -148,7 +147,7 @@
}
});
- $table = $form->addRow()->addTable()->setClass('smallIntBorder fullWidth standardForm');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder w-full standardForm');
$table->addRow()->addSubmit();
echo $form->getOutput();
diff --git a/modules/System Admin/thirdPartySettings.php b/modules/System Admin/thirdPartySettings.php
index 984a3c935f..f51c423d73 100644
--- a/modules/System Admin/thirdPartySettings.php
+++ b/modules/System Admin/thirdPartySettings.php
@@ -172,8 +172,8 @@
$row = $form->addRow()->addClass('paymentTest');
$row->addLabel('paymentTest', __('Test Payment'))->description(__('You can use this tool to make a small payment in {currency} to test your gateway configuration.', ['currency' => $session->get('currency')]));
$col = $row->addColumn();
- $col->addCurrency('paymentTest')->setValue(10)->addClass('w-full');
- $col->addButton(__('Go'), 'testPayment()')->addClass('-ml-px w-24');
+ $col->addCurrency('paymentTest')->setValue(10)->groupAlign('left');
+ $col->addButton(__('Send'), 'testPayment()')->groupAlign('right')->setIcon('arrow-right-circle');
}
// SMS
@@ -241,8 +241,8 @@
$row = $form->addRow()->addClass('smsTest');
$row->addLabel('smsTest', __('Test SMS'))->description(__('You can use this tool to send an sms to test your SMS Gateway configuration.'));
$col = $row->addColumn();
- $col->addPhoneNumber('smsTest')->setValue($session->get('sms'))->addClass('w-full');
- $col->addButton(__('Go'), 'testSMS()')->addClass('-ml-px w-24');
+ $col->addPhoneNumber('smsTest')->setValue($session->get('sms'))->groupAlign('left');
+ $col->addButton(__('Send'), 'testSMS()')->groupAlign('right')->setIcon('arrow-right-circle');
}
// SMTP MAIL
@@ -291,8 +291,8 @@
$row = $form->addRow()->addClass('emailTest');
$row->addLabel('emailTest', __('Test Email'))->description(__('You can use this tool to send an email to test your SMTP configuration.'));
$col = $row->addColumn();
- $col->addEmail('emailTest')->setValue($session->get('email'))->addClass('w-full');
- $col->addButton(__('Go'), 'testEmail()')->addClass('-ml-px w-24');
+ $col->addEmail('emailTest')->setValue($session->get('email'))->groupAlign('left');
+ $col->addButton(__('Send'), 'testEmail()')->groupAlign('right')->setIcon('arrow-right-circle');
$row = $form->addRow();
diff --git a/modules/Timetable Admin/courseEnrolment_manage.php b/modules/Timetable Admin/courseEnrolment_manage.php
index 29fc93c05e..568d1522a1 100644
--- a/modules/Timetable Admin/courseEnrolment_manage.php
+++ b/modules/Timetable Admin/courseEnrolment_manage.php
@@ -58,7 +58,7 @@
$form = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get');
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/courseEnrolment_manage.php');
$form->addHiddenValue('gibbonSchoolYearID', $gibbonSchoolYearID);
diff --git a/modules/Timetable Admin/courseEnrolment_manage_byPerson.php b/modules/Timetable Admin/courseEnrolment_manage_byPerson.php
index eb2875e5b1..7fbe87aabb 100644
--- a/modules/Timetable Admin/courseEnrolment_manage_byPerson.php
+++ b/modules/Timetable Admin/courseEnrolment_manage_byPerson.php
@@ -55,7 +55,7 @@
echo '';
$form = Form::create('searchForm', $session->get('absoluteURL').'/index.php', 'get');
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/courseEnrolment_manage_byPerson.php');
$form->addHiddenValue('gibbonSchoolYearID', $gibbonSchoolYearID);
diff --git a/modules/Timetable Admin/courseEnrolment_sync.php b/modules/Timetable Admin/courseEnrolment_sync.php
index fc0386f5be..c8c1dc996b 100644
--- a/modules/Timetable Admin/courseEnrolment_sync.php
+++ b/modules/Timetable Admin/courseEnrolment_sync.php
@@ -69,8 +69,7 @@
$table->addHeaderAction('add', __('Add'))
->setURL('/modules/Timetable Admin/courseEnrolment_sync_add.php')
->addParam('gibbonSchoolYearID', $gibbonSchoolYearID)
- ->displayLabel()
- ->append(' | ');
+ ->displayLabel();
$table->addHeaderAction('sync', __('Sync All'))
->setURL('/modules/Timetable Admin/courseEnrolment_sync_run.php')
diff --git a/modules/Timetable Admin/courseEnrolment_sync_edit.php b/modules/Timetable Admin/courseEnrolment_sync_edit.php
index cf72a1e8c5..366698bfd2 100644
--- a/modules/Timetable Admin/courseEnrolment_sync_edit.php
+++ b/modules/Timetable Admin/courseEnrolment_sync_edit.php
@@ -42,8 +42,7 @@
return;
}
- $form = Form::create('courseEnrolmentSyncEdit', $session->get('absoluteURL').'/modules/'.$session->get('module').'/courseEnrolment_sync_addEditProcess.php');
- $form->setClass('w-full blank');
+ $form = Form::createBlank('courseEnrolmentSyncEdit', $session->get('absoluteURL').'/modules/'.$session->get('module').'/courseEnrolment_sync_addEditProcess.php');
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->addHiddenValue('address', $session->get('address'));
@@ -93,7 +92,7 @@
});
$form->addRow()->addHeading($courseName);
- $table = $form->addRow()->addTable()->setClass('smallIntBorder colorOddEven fullWidth standardForm');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder colorOddEven w-full standardForm');
$header = $table->addHeaderRow();
$header->addCheckbox('checkall'.$course['gibbonCourseID'])->checked(!empty($optionsSelected))->setClass();
@@ -105,16 +104,15 @@
$row = $table->addRow();
$row->addCheckbox('syncEnabled['.$class['gibbonCourseClassID'].']')
->checked(!empty($class['syncTo']))
- ->setClass($course['gibbonCourseID'])
- ->description(' ');
+ ->setClass($course['gibbonCourseID'].' w-12');
$row->addLabel('syncEnabled['.$class['gibbonCourseClassID'].']', $class['courseNameShort'].'.'.$class['classShortName'])
->setTitle($class['courseNameShort'])
- ->setClass('mediumWidth');
+ ->setClass('w-36');
$row->addContent((empty($class['syncTo'])? '
'.__('No match found').' ' : '') )
- ->setClass('shortWidth right');
+ ->setClass('w-1/3 text-right');
$row->addSelectFormGroup('syncTo['.$class['gibbonCourseClassID'].']', $gibbonSchoolYearID)
->selected($class['syncTo'])
- ->setClass('mediumWidth');
+ ->setClass('flex-1');
}
// Checkall by course
@@ -128,7 +126,7 @@
}
}
- $table = $form->addRow()->addTable()->setClass('smallIntBorder colorOddEven fullWidth standardForm');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder colorOddEven w-full standardForm');
$row = $table->addRow();
$row->addFooter();
diff --git a/modules/Timetable Admin/courseEnrolment_sync_run.php b/modules/Timetable Admin/courseEnrolment_sync_run.php
index 6e04ce232e..b852d625a5 100644
--- a/modules/Timetable Admin/courseEnrolment_sync_run.php
+++ b/modules/Timetable Admin/courseEnrolment_sync_run.php
@@ -71,8 +71,7 @@
return;
}
- $form = Form::create('courseEnrolmentSyncRun', $session->get('absoluteURL').'/modules/'.$session->get('module').'/courseEnrolment_sync_runProcess.php');
- $form->setClass('w-full blank');
+ $form = Form::createBlank('courseEnrolmentSyncRun', $session->get('absoluteURL').'/modules/'.$session->get('module').'/courseEnrolment_sync_runProcess.php');
$form->setFactory(DatabaseFormFactory::create($pdo));
$form->addHiddenValue('address', $session->get('address'));
@@ -81,7 +80,7 @@
// Checkall options
$row = $form->addRow()->addContent('
'.__('Options').' ');
- $table = $form->addRow()->addTable()->setClass('smallIntBorder fullWidth');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder w-full');
$row = $table->addRow();
$row->addLabel('includeStudents', __('Include Students'));
@@ -141,7 +140,7 @@
} else {
$enrolableCount += $enrolmentResult->rowCount();
- $table = $form->addRow()->addTable()->setClass('smallIntBorder colorOddEven fullWidth standardForm');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder colorOddEven w-full standardForm');
$header = $table->addHeaderRow();
$header->addCheckbox('checkall'.$classMap['gibbonYearGroupID'])->checked(true);
$header->addContent(__('Name'));
@@ -176,7 +175,7 @@
// Only display a submit button if a sync is required
if ($enrolableCount > 0) {
- $table = $form->addRow()->addTable()->setClass('smallIntBorder colorOddEven fullWidth standardForm');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder colorOddEven w-full standardForm');
$table->addRow()->addSubmit(__('Proceed'));
}
diff --git a/modules/Timetable Admin/course_manage.php b/modules/Timetable Admin/course_manage.php
index 55c377a0d2..1dd108a157 100644
--- a/modules/Timetable Admin/course_manage.php
+++ b/modules/Timetable Admin/course_manage.php
@@ -58,7 +58,7 @@
$form = Form::create('action', $session->get('absoluteURL').'/index.php','get');
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', "/modules/".$session->get('module')."/course_manage.php");
$form->addHiddenValue('gibbonSchoolYearID', $gibbonSchoolYearID);
@@ -94,8 +94,7 @@
->setIcon('copy')
->onCLick('return confirm("'.__('Are you sure you want to do this? All courses and classes, but not their participants, will be copied.').'");')
->displayLabel()
- ->directLink()
- ->append(' | ');
+ ->directLink();
}
$table->addHeaderAction('add', __('Add'))
diff --git a/modules/Timetable Admin/course_rollover.php b/modules/Timetable Admin/course_rollover.php
index c34bb52e1b..a5e2cfa379 100644
--- a/modules/Timetable Admin/course_rollover.php
+++ b/modules/Timetable Admin/course_rollover.php
@@ -138,12 +138,11 @@
return $currentCourse;
}, $currentCourses);
- $form = Form::create('courseRollover', $session->get('absoluteURL').'/index.php?q=/modules/'.$session->get('module').'/course_rollover.php&step=3');
- $form->setClass('w-full blank');
+ $form = Form::createBlank('courseRollover', $session->get('absoluteURL').'/index.php?q=/modules/'.$session->get('module').'/course_rollover.php&step=3');
$form->addHiddenValue('nextYear', $nextYearID);
- $table = $form->addRow()->addTable()->setClass('smallIntBorder fullWidth mb-4');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder w-full mb-4');
$row = $table->addRow();
$row->addLabel('rollStudents', __('Include Students'));
$row->addCheckbox('rollStudents')->checked('on');
@@ -155,7 +154,7 @@
$form->addRow()->addSubheading(__('Map Classes'));
$form->addRow()->addContent(__('Determine which classes from this year roll to which classes in next year, and which not to rollover at all.'))->wrap('
', '
');
- $table = $form->addRow()->addTable()->setClass('colorOddEven fullWidth rowHighlight');
+ $table = $form->addRow()->addTable()->setClass('colorOddEven w-full rowHighlight');
$header = $table->addHeaderRow();
$header->addContent(__('Class'));
@@ -173,7 +172,7 @@
->setClass('mediumWidth');
}
- $table = $form->addRow()->addTable()->setClass('smallIntBorder fullWidth');
+ $table = $form->addRow()->addTable()->setClass('smallIntBorder w-full');
$row = $table->addRow();
$row->addFooter();
$row->addSubmit(__('Proceed'));
diff --git a/modules/Timetable Admin/report_classEnrolment_byFormGroup.php b/modules/Timetable Admin/report_classEnrolment_byFormGroup.php
index e2c5cd0a06..941720fd54 100644
--- a/modules/Timetable Admin/report_classEnrolment_byFormGroup.php
+++ b/modules/Timetable Admin/report_classEnrolment_byFormGroup.php
@@ -43,7 +43,7 @@
$form = Form::create('filter', $session->get('absoluteURL').'/index.php', 'get');
$form->setFactory(DatabaseFormFactory::create($pdo));
- $form->setClass('noIntBorder fullWidth');
+ $form->setClass('noIntBorder w-full');
$form->addHiddenValue('q', '/modules/'.$session->get('module').'/report_classEnrolment_byFormGroup.php');
diff --git a/modules/Timetable Admin/ttDates.php b/modules/Timetable Admin/ttDates.php
index fdfe7baa79..b99f40f900 100644
--- a/modules/Timetable Admin/ttDates.php
+++ b/modules/Timetable Admin/ttDates.php
@@ -95,7 +95,7 @@
$count = 1;
- $table = $form->addRow()->addTable()->setClass('fullWidth');
+ $table = $form->addRow()->addTable()->setClass('w-full');
$row = $table->addHeaderRow();
for ($i = 1; $i < 8; ++$i) {
@@ -103,9 +103,9 @@
$dowShort = date('D', strtotime("Sunday +$i days"));
$script = '';
@@ -171,7 +171,7 @@
JOIN gibbonTT ON (gibbonTTDay.gibbonTTID=gibbonTT.gibbonTTID)
WHERE gibbonTT.gibbonSchoolYearID=:gibbonSchoolYearID ORDER BY gibbonTT.name, gibbonTTDay.name";
- $table = $form->addRow()->addTable()->setClass('fullWidth smallIntBorder');
+ $table = $form->addRow()->addTable()->setClass('w-full smallIntBorder');
$row = $table->addRow();
$row->addLabel('gibbonTTDayID', __('Day'));
$row->addSelect('gibbonTTDayID')->fromQuery($pdo, $sql, $data)->addClass('mediumWidth');
diff --git a/modules/Timetable Admin/tt_edit.php b/modules/Timetable Admin/tt_edit.php
index 2bf09a3c37..3b8ef18c87 100644
--- a/modules/Timetable Admin/tt_edit.php
+++ b/modules/Timetable Admin/tt_edit.php
@@ -135,8 +135,7 @@
->setURL('/modules/Timetable Admin/tt_edit_byClass.php')
->addParam('gibbonSchoolYearID', $gibbonSchoolYearID)
->addParam('gibbonTTID', $gibbonTTID)
- ->displayLabel()
- ->append(' | ');
+ ->displayLabel();
$table->addHeaderAction('add', __('Add'))
->setURL('/modules/Timetable Admin/tt_edit_day_add.php')
diff --git a/modules/Timetable Admin/tt_edit_day_edit_class.php b/modules/Timetable Admin/tt_edit_day_edit_class.php
index 03286be7e9..f1c8a4b6bd 100644
--- a/modules/Timetable Admin/tt_edit_day_edit_class.php
+++ b/modules/Timetable Admin/tt_edit_day_edit_class.php
@@ -96,7 +96,7 @@
->setURL('/modules/Timetable Admin/tt_edit_day_edit_class_delete.php');
$actions->addAction('exceptions', __('Exceptions'))
- ->setIcon('attendance')
+ ->setIcon('user-minus')
->setURL('/modules/Timetable Admin/tt_edit_day_edit_class_exception.php');
});
diff --git a/modules/Timetable/moduleFunctions.php b/modules/Timetable/moduleFunctions.php
index ed224adbf1..391562aaeb 100644
--- a/modules/Timetable/moduleFunctions.php
+++ b/modules/Timetable/moduleFunctions.php
@@ -490,60 +490,6 @@ function renderTT($guid, $connection2, $gibbonPersonID, $gibbonTTID, $title = ''
$gibbonTTID = $row['gibbonTTID'];
$nameShortDisplay = $row['nameShortDisplay']; //Store day short name display setting for later
- if ($title != false) {
- $output .= '
'.$row['name'].' ';
- }
-
- $urlParams = [
- 'q' => $q,
- 'gibbonPersonID' => $gibbonPersonID,
- 'gibbonTTID' => $row['gibbonTTID'],
- 'schoolCalendar' => $session->get('viewCalendarSchool'),
- 'personalCalendar' => $session->get('viewCalendarPersonal'),
- 'spaceBookingCalendar' => $session->get('viewCalendarSpaceBooking'),
- 'narrow' => $narrow,
- 'fromTT' => 'Y',
- ];
-
- $apiEndpoint = Url::fromHandlerRoute('index_tt_ajax.php')->withQueryParams($urlParams);
-
- $output .= "
";
-
- $output .= "
';
//Check which days are school days
$daysInWeek = 0;
@@ -600,6 +546,77 @@ function renderTT($guid, $connection2, $gibbonPersonID, $gibbonTTID, $title = ''
//Count forward to the end of the week
$endDayStamp = $startDayStamp + (86400 * ($daysInWeek - 1));
+
+ if ($title != false) {
+ $output .= '
'.$row['name'].' ';
+ }
+
+ $urlParams = [
+ 'q' => $q,
+ 'gibbonPersonID' => $gibbonPersonID,
+ 'gibbonTTID' => $row['gibbonTTID'],
+ 'schoolCalendar' => $session->get('viewCalendarSchool'),
+ 'personalCalendar' => $session->get('viewCalendarPersonal'),
+ 'spaceBookingCalendar' => $session->get('viewCalendarSpaceBooking'),
+ 'narrow' => $narrow,
+ 'fromTT' => 'Y',
+ ];
+
+ $apiEndpoint = Url::fromHandlerRoute('index_tt_ajax.php')->withQueryParams($urlParams);
+
+ $output .= "
";
+
+ $output .= "
';
+
+
+
$schoolCalendarAlpha = 0.85;
$ttAlpha = 1.0;
@@ -1032,14 +1049,14 @@ function renderTT($guid, $connection2, $gibbonPersonID, $gibbonTTID, $title = ''
$output .= "
";
$countTime = 0;
$time = $timeStart;
- $output .= "
";
+ $output .= "
";
$output .= substr($time, 0, 5).' ';
$output .= '
';
$time = date('H:i:s', strtotime($time) + 3600);
$spinControl = 0;
while ($time <= $timeEnd and $spinControl < (23 - substr($timeStart, 0, 2))) {
++$countTime;
- $output .= "
";
+ $output .= "
";
$output .= substr($time, 0, 5).' ';
$output .= '
';
$time = date('H:i:s', strtotime($time) + 3600);
@@ -1123,12 +1140,12 @@ function renderTTDay($guid, $connection2, $gibbonTTID, $schoolOpen, $startDaySta
{
global $session;
- $schoolCalendarAlpha = 0.90;
+ $schoolCalendarAlpha = 1.0;
$ttAlpha = 1.0;
- if ($session->get('viewCalendarSchool') != 'N' or $session->get('viewCalendarPersonal') != 'N' or $session->get('viewCalendarSpaceBooking') != 'N') {
- $ttAlpha = 0.75;
- }
+ // if ($session->get('viewCalendarSchool') != 'N' or $session->get('viewCalendarPersonal') != 'N' or $session->get('viewCalendarSpaceBooking') != 'N') {
+ // $ttAlpha = 0.75;
+ // }
$date = date('Y-m-d', ($startDayStamp + (86400 * $count)));
@@ -1181,7 +1198,7 @@ function renderTTDay($guid, $connection2, $gibbonTTID, $schoolOpen, $startDaySta
if ($schoolOpen == false || $offTimetable == true) {
$output .= "
";
$output .= "