fix test and add invocie to parent enrollment
This commit is contained in:
@@ -1,4 +1,81 @@
|
||||
<?= $this->extend('layout/management_layout') ?>
|
||||
<?= $this->section('styles') ?>
|
||||
<style>
|
||||
.homework-table-scroll {
|
||||
overflow-x: auto;
|
||||
max-width: 100%;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.homework-sticky-table {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
min-width: max-content;
|
||||
width: auto;
|
||||
}
|
||||
.homework-sticky-table th,
|
||||
.homework-sticky-table td {
|
||||
box-sizing: border-box;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.homework-sticky-table th.homework-rownum-col,
|
||||
.homework-sticky-table td.homework-rownum-col {
|
||||
min-width: 56px;
|
||||
width: 56px;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.homework-sticky-table th.homework-school-id-col,
|
||||
.homework-sticky-table td.homework-school-id-col {
|
||||
position: sticky;
|
||||
left: 0;
|
||||
z-index: 4;
|
||||
min-width: 112px;
|
||||
width: 112px;
|
||||
max-width: 112px;
|
||||
}
|
||||
.homework-sticky-table th.homework-first-name-col,
|
||||
.homework-sticky-table td.homework-first-name-col {
|
||||
position: sticky;
|
||||
left: 112px;
|
||||
z-index: 4;
|
||||
min-width: 168px;
|
||||
width: 168px;
|
||||
max-width: 168px;
|
||||
}
|
||||
.homework-sticky-table th.homework-last-name-col,
|
||||
.homework-sticky-table td.homework-last-name-col {
|
||||
position: sticky;
|
||||
left: 280px;
|
||||
z-index: 4;
|
||||
min-width: 168px;
|
||||
width: 168px;
|
||||
max-width: 168px;
|
||||
box-shadow: 1px 0 0 rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
.homework-sticky-table th.homework-school-id-col,
|
||||
.homework-sticky-table td.homework-school-id-col,
|
||||
.homework-sticky-table th.homework-first-name-col,
|
||||
.homework-sticky-table td.homework-first-name-col,
|
||||
.homework-sticky-table th.homework-last-name-col,
|
||||
.homework-sticky-table td.homework-last-name-col {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
background: #fff;
|
||||
}
|
||||
.homework-sticky-table thead th.homework-school-id-col,
|
||||
.homework-sticky-table thead th.homework-first-name-col,
|
||||
.homework-sticky-table thead th.homework-last-name-col {
|
||||
z-index: 6;
|
||||
background: #f8f9fa;
|
||||
}
|
||||
.homework-sticky-table th.text-center,
|
||||
.homework-sticky-table tbody td:not(.homework-rownum-col):not(.homework-school-id-col):not(.homework-first-name-col):not(.homework-last-name-col) {
|
||||
min-width: 132px;
|
||||
width: 132px;
|
||||
}
|
||||
</style>
|
||||
<?= $this->endSection() ?>
|
||||
<?= $this->section('content') ?>
|
||||
|
||||
<?php
|
||||
@@ -37,13 +114,14 @@ $lockAttr = $scoresLocked ? 'disabled' : '';
|
||||
<input type="hidden" name="school_year" value="<?= esc($schoolYear) ?>">
|
||||
<input type="hidden" name="class_section_id" value="<?= esc($classSectionId ?? '') ?>">
|
||||
|
||||
<table id="homeworkTable" class="table table-bordered mt-4 w-100" data-no-mgmt-sticky>
|
||||
<div class="homework-table-scroll">
|
||||
<table id="homeworkTable" class="table table-bordered mt-4 homework-sticky-table homework-sticky-table--grading" data-no-mgmt-sticky>
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>School ID</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th class="homework-rownum-col">#</th>
|
||||
<th class="homework-school-id-col">School ID</th>
|
||||
<th class="homework-first-name-col">First Name</th>
|
||||
<th class="homework-last-name-col">Last Name</th>
|
||||
<?php foreach ($homeworkHeaders as $index): ?>
|
||||
<th class="text-center"><?= esc("Homework " . $index) ?></th>
|
||||
<?php endforeach; ?>
|
||||
@@ -59,15 +137,15 @@ $lockAttr = $scoresLocked ? 'disabled' : '';
|
||||
$rowLockAttr = $scoresLocked ? $lockAttr : ($rowLocked ? 'readonly aria-disabled="true"' : '');
|
||||
?>
|
||||
<tr class="<?= $rowLocked ? 'table-secondary text-muted' : '' ?>">
|
||||
<td><?= $row++ ?></td>
|
||||
<td><?= esc($student['school_id']) ?></td>
|
||||
<td>
|
||||
<td class="homework-rownum-col"><?= $row++ ?></td>
|
||||
<td class="homework-school-id-col"><?= esc($student['school_id']) ?></td>
|
||||
<td class="homework-first-name-col">
|
||||
<a href="#" class="text-decoration-none" data-family-student-id="<?= (int)$studentId ?>">
|
||||
<?= esc($student['firstname']) ?>
|
||||
</a>
|
||||
<?= student_enrollment_status_button($student, $schoolYear ?? null) ?>
|
||||
</td>
|
||||
<td>
|
||||
<td class="homework-last-name-col">
|
||||
<a href="#" class="text-decoration-none" data-family-student-id="<?= (int)$studentId ?>">
|
||||
<?= esc($student['lastname']) ?>
|
||||
</a>
|
||||
@@ -89,6 +167,7 @@ $lockAttr = $scoresLocked ? 'disabled' : '';
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-between mt-4 flex-wrap gap-2">
|
||||
<button type="submit" class="btn btn-success" <?= $lockAttr ?>>
|
||||
@@ -144,9 +223,11 @@ $lockAttr = $scoresLocked ? 'disabled' : '';
|
||||
autoWidth: false,
|
||||
order: [[2, 'asc'], [3, 'asc']],
|
||||
columnDefs: [
|
||||
{ targets: 0, orderable: false, searchable: false },
|
||||
{ targets: 1, className: 'text-nowrap' },
|
||||
...(scoreCols.length ? [{ targets: scoreCols, orderDataType: 'dom-num-input', orderSequence: ['desc', 'asc'], type: 'num' }] : []),
|
||||
{ targets: 0, orderable: false, searchable: false, width: '56px' },
|
||||
{ targets: 1, className: 'text-nowrap', width: '112px' },
|
||||
{ targets: 2, width: '168px' },
|
||||
{ targets: 3, width: '168px' },
|
||||
...(scoreCols.length ? [{ targets: scoreCols, width: '132px', orderDataType: 'dom-num-input', orderSequence: ['desc', 'asc'], type: 'num' }] : []),
|
||||
],
|
||||
fixedHeader: {
|
||||
header: true,
|
||||
|
||||
Reference in New Issue
Block a user