Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 64feeff

Browse files
committed
v1.7.03
1 parent 0733a23 commit 64feeff

File tree

6 files changed

+19
-5
lines changed

6 files changed

+19
-5
lines changed

Data Admin/CHANGEDB.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,8 @@
166166
$count++;
167167
$sql[$count][0]="1.7.02" ;
168168
$sql[$count][1]="";
169+
170+
//v1.7.03
171+
$count++;
172+
$sql[$count][0]="1.7.03" ;
173+
$sql[$count][1]="";

Data Admin/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
CHANGELOG
22
=========
3+
## [1.7.03] 2024-04-12
4+
- Added school year to Find Usernames tool
5+
36
## [1.7.02] 2023-10-20
47
- Fixed export option in Manage Records when fields have multiple relational keys
58

Data Admin/manifest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
$entryURL="import_manage.php" ; //The landing page for the unit, used in the main menu
2626
$type="Additional" ; //Do not change.
2727
$category="Admin" ; //The main menu area to place the module in
28-
$version="1.7.02" ; //Version number
28+
$version="1.7.03" ; //Version number
2929
$author="Sandra Kuipers" ; //Your name
3030
$url="https://github.com/SKuipers/" ; //Your URL
3131

Data Admin/tools_findUsernames.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919

2020
use Gibbon\Forms\Form;
21+
use Gibbon\Forms\DatabaseFormFactory;
2122

2223
// Module Bootstrap
2324
require __DIR__ . '/module.php';
@@ -59,7 +60,11 @@
5960

6061
$form = Form::create('findUsernames', $session->get('absoluteURL').'/modules/Data Admin/tools_findUsernamesProcess.php');
6162
$form->addHiddenValue('address', $session->get('address'));
62-
$form->setClass('fullWidth smallIntBorder');
63+
$form->setFactory(DatabaseFormFactory::create($pdo));
64+
65+
$row = $form->addRow();
66+
$row->addLabel('gibbonSchoolYearID', __('School Year'));
67+
$row->addSelectSchoolYear('gibbonSchoolYearID')->required()->selected($session->get('gibbonSchoolYearID'));
6368

6469
$row = $form->addRow();
6570
$row->addLabel('file', __('Spreadsheet'));

Data Admin/tools_findUsernamesProcess.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
require __DIR__ . '/module.php';
2828

2929
$filePath = isset($_FILES['file']['tmp_name'])? $_FILES['file']['tmp_name'] : '';
30+
$gibbonSchoolYearID = $_POST['gibbonSchoolYearID'] ?? '';
3031
$roleCategory = $_POST['roleCategory'] ?? '';
3132
$columnType = $_POST['columnType'] ?? '';
3233
$nameType = $_POST['nameType'] ?? '';
@@ -42,7 +43,7 @@
4243
$URL .= '&return=error0';
4344
header("Location: {$URL}");
4445
exit;
45-
} elseif (empty($filePath)) {
46+
} elseif (empty($filePath) || empty($gibbonSchoolYearID)) {
4647
$URL .= '&return=error1';
4748
header("Location: {$URL}");
4849
exit;
@@ -122,7 +123,7 @@
122123

123124
if ($roleCategory == 'Student') {
124125
// Locate a student enrolment for the target year group with a matching student name
125-
$data = ['gibbonSchoolYearID' => $session->get('gibbonSchoolYearID'), 'yearGroup' => $yearGroup, 'preferredName' => trim($preferredName), 'firstName' => trim($firstName), 'surname1' => trim($surname1), 'surname2' => trim($surname2), 'fullName' => $studentName ];
126+
$data = ['gibbonSchoolYearID' => $gibbonSchoolYearID, 'yearGroup' => $yearGroup, 'preferredName' => trim($preferredName), 'firstName' => trim($firstName), 'surname1' => trim($surname1), 'surname2' => trim($surname2), 'fullName' => $studentName ];
126127
$sql = "SELECT gibbonPerson.username, gibbonPerson.gibbonPersonID
127128
FROM gibbonPerson
128129
JOIN gibbonStudentEnrolment ON (gibbonStudentEnrolment.gibbonPersonID=gibbonPerson.gibbonPersonID)

Data Admin/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/**
2121
* Sets version information
2222
*/
23-
$moduleVersion="1.7.02" ;
23+
$moduleVersion="1.7.03" ;
2424
$coreVersion = '23.0.00';
2525

2626
$gibbonVersionRequired="23.0.00";

0 commit comments

Comments
 (0)