2021-09-09 06:29:31 -07:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2021-09-24 22:31:36 -07:00
|
|
|
|
<title>Group 分組 - Attendance 點名</title>
|
2021-09-09 06:29:31 -07:00
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet"
|
|
|
|
|
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
|
|
|
|
|
<link rel="stylesheet" href="/static/login.css">
|
2021-10-19 07:30:49 -07:00
|
|
|
|
<link rel="stylesheet" href="/static/allpages.css">
|
2021-09-18 04:26:06 -07:00
|
|
|
|
<link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico" />
|
|
|
|
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
|
|
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-H6D61RSBHR"></script>
|
2021-10-19 07:30:49 -07:00
|
|
|
|
<script src="/static/gtag.js"></script>
|
2021-09-09 06:29:31 -07:00
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body>
|
2021-09-26 06:37:34 -07:00
|
|
|
|
<div class="showTime"><span id="showTime"></span></div>
|
2021-09-10 07:30:39 -07:00
|
|
|
|
<div class="container">
|
2021-09-18 04:26:06 -07:00
|
|
|
|
<h1 class="margin-top">Group Class View | 分組課頁面</h1>
|
|
|
|
|
<h2 class="margin-top">{{cclass['category']}}: {{cclass['class_id']}}: {{cclass['name']}}</h2>
|
|
|
|
|
<h2>[{{currDate}}]</h2>
|
|
|
|
|
<a href="/logout"><button class="btn btn-primary margin-top logout">Logout 登出</button></a>
|
2021-10-03 07:33:53 -07:00
|
|
|
|
<a href="/select"><button class="btn btn-primary margin-top logout">Choose Subuser 選擇其他帳號</button></a>
|
2021-10-15 05:32:24 -07:00
|
|
|
|
<select name="date" id="date" class="form-select logout" onchange="chgDate();">
|
2021-10-18 00:42:51 -07:00
|
|
|
|
{% for date in range(dateKeys|length) %}
|
|
|
|
|
{% if dateKeys[date] == currDate %}
|
|
|
|
|
{% if date-2 >= 0 %}<option value="{{dateKeys[date-2]}}">{{dateKeys[date-2]}}</option>{% endif %}
|
|
|
|
|
{% if date-1 >= 0 %}<option value="{{dateKeys[date-1]}}">{{dateKeys[date-1]}}</option>{% endif %}
|
|
|
|
|
<option value="{{dateKeys[date]}}" selected="selected">{{dateKeys[date]}} ★</option>
|
|
|
|
|
{% for i in range(1,5) %}
|
|
|
|
|
{% if date+i < dateKeys|length %}<option value="{{dateKeys[date+i]}}">{{dateKeys[date+i]}}</option>{%endif%}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endfor %}
|
2021-10-15 05:32:24 -07:00
|
|
|
|
</select>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% for i in absData %}
|
2021-09-14 02:49:16 -07:00
|
|
|
|
{% set alr_fill = namespace(found=false) %}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<form action="/manage/group_teach_publish" id="attendanceData^{{i}}" method="post">
|
2021-09-10 07:30:39 -07:00
|
|
|
|
<input type="hidden" name="date" value="{{currDate}}">
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<input type="hidden" name="period" value="{{i}}">
|
|
|
|
|
<input type="hidden" class="signatureData" name="signatureData" value="">
|
2021-09-18 04:26:06 -07:00
|
|
|
|
<div class="col" style="margin-top: 30px;">
|
2021-09-13 07:42:12 -07:00
|
|
|
|
<div class="row title sticky-top" style="background-color: white">
|
2021-09-18 07:04:31 -07:00
|
|
|
|
<div class="col">Grade 年級</div>
|
|
|
|
|
<div class="col">Class 班級</div>
|
|
|
|
|
<div class="col">Number 座號</div>
|
|
|
|
|
<div class="col">Name 姓名</div>
|
|
|
|
|
<div class="col">English Name 英文名</div>
|
|
|
|
|
<div class="col">Period {{i}} | 第 {{i}} 節</div>
|
2021-09-10 07:30:39 -07:00
|
|
|
|
</div>
|
|
|
|
|
{% if data != None %}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% for grade in absData[i] %}
|
|
|
|
|
{% for homeroom in absData[i][grade] %}
|
|
|
|
|
{% for student in absData[i][grade][homeroom] %}
|
2021-09-14 03:42:17 -07:00
|
|
|
|
{% if student != 'notes' %}
|
2021-09-10 07:30:39 -07:00
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col">{{grade}}</div>
|
|
|
|
|
<div class="col">{{homeroom}}</div>
|
|
|
|
|
<div class="col">{{ student }}</div>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<div class="col">{{ absData[i][grade][homeroom][student]['name'] }}</div>
|
|
|
|
|
<div class="col">{{ absData[i][grade][homeroom][student]['eng_name'] }}</div>
|
|
|
|
|
{% if absData[i][grade][homeroom][student]['alr_fill'] %}
|
|
|
|
|
{% set alr_fill.found = true %}
|
2021-09-13 07:42:12 -07:00
|
|
|
|
{% if absData[i][grade][homeroom][student]['absent'] == 1 %}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<div class="col">
|
|
|
|
|
<p class="highlightAbs n-2">X</p>
|
|
|
|
|
</div>
|
2021-09-13 07:42:12 -07:00
|
|
|
|
{% elif absData[i][grade][homeroom][student]['absent'] == 2 %}
|
|
|
|
|
<div class="col">
|
2021-09-18 07:04:31 -07:00
|
|
|
|
<p class="highlightAbs n-3">𝜑</p>
|
2021-09-13 07:42:12 -07:00
|
|
|
|
</div>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% else %}
|
|
|
|
|
<div class="col">
|
|
|
|
|
<p class="highlightAbs n-1">V</p>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% else %}
|
|
|
|
|
<div class="col">
|
2021-09-12 05:15:19 -07:00
|
|
|
|
{% if [grade,homeroom] in confirmed %}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<p class="highlightAbs">--</p>
|
|
|
|
|
{% else %}
|
2021-10-27 03:12:33 -07:00
|
|
|
|
{% set alr_fill.found = false %}
|
2021-09-13 07:42:12 -07:00
|
|
|
|
<input type="checkbox" class="tobeform {{grade}}^{{homeroom}}^{{student}} late"
|
|
|
|
|
id="late^{{i}}^{{grade}}^{{homeroom}}^{{student}}"
|
|
|
|
|
name="2^{{grade}}^{{homeroom}}^{{student}}"
|
|
|
|
|
onchange="unCheckAbs('{{i}}^{{grade}}^{{homeroom}}^{{student}}')">
|
|
|
|
|
<input type="checkbox" class="tobeform {{grade}}^{{homeroom}}^{{student}} absent"
|
|
|
|
|
id="absent^{{i}}^{{grade}}^{{homeroom}}^{{student}}"
|
|
|
|
|
name="1^{{grade}}^{{homeroom}}^{{student}}"
|
|
|
|
|
onchange="unCheckLate('{{i}}^{{grade}}^{{homeroom}}^{{student}}')">
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
2021-09-10 07:30:39 -07:00
|
|
|
|
</div>
|
2021-09-14 03:42:17 -07:00
|
|
|
|
{% endif %}
|
2021-09-10 07:30:39 -07:00
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% if alr_fill.found %}
|
|
|
|
|
<button class="btn btn-primary margin-bottom viewSignatureBtn" type="button"
|
|
|
|
|
onclick="viewSignature('{{i}}')" disabled="disabled">
|
|
|
|
|
Already Submitted</button>
|
|
|
|
|
{% else %}
|
|
|
|
|
<button class="btn btn-primary margin-bottom viewSignatureBtn" type="button"
|
|
|
|
|
onclick="viewSignature('{{i}}')">
|
2021-09-18 07:04:31 -07:00
|
|
|
|
↑ Confirm 確認 (Period {{i}}) ↑</button>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% endif %}
|
2021-10-19 07:30:49 -07:00
|
|
|
|
<div id="sign-{{i}}" class="signDiv modal fade" id="staticBackdrop" data-bs-backdrop="static"
|
|
|
|
|
data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
|
|
|
|
<div class="modal-dialog modal-dialog-centered modal-xl">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h5 class="modal-title" id="staticBackdropLabel">Please Sign Below 請在下方簽名</h5>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<div class="alert alert-warning margin-top" id="allPresentWarning-{{i}}" role="alert"
|
|
|
|
|
hidden="hidden">
|
|
|
|
|
<h4 class="alert-heading">請確認是否全班全到!Please check if everyone is present!</h4>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="forSign"><canvas id="signature_pad^{{i}}"></canvas></div>
|
|
|
|
|
<h3 class="margin-top">Notes 備註欄</h3>
|
|
|
|
|
<input type="textarea" class="form-control" name="notes" id="subjectNotes^{{i}}"
|
|
|
|
|
placeholder="Enter Notes 請輸入備註" style="width: 80%; margin-left: 10%;" row="3">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<button class="btn btn-secondary" type="button" onclick="signaturePad.clear()">Clear
|
|
|
|
|
Signature 清除簽名</button>
|
|
|
|
|
<button type="button" class="btn btn-danger" onclick="location.reload();">Cancel
|
|
|
|
|
取消</button>
|
|
|
|
|
<button type="button" class="btn btn-primary submitButton" onclick="submitForm()">Submit
|
|
|
|
|
提交</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-09-12 07:21:10 -07:00
|
|
|
|
</div>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
</div>
|
2021-09-10 07:30:39 -07:00
|
|
|
|
</div>
|
|
|
|
|
</form>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% endfor %}
|
2021-09-10 07:30:39 -07:00
|
|
|
|
</div>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<script src=" https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/signature_pad.min.js"></script>
|
2021-10-28 03:51:44 -07:00
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
2021-10-19 07:30:49 -07:00
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
|
|
|
|
|
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
|
|
|
|
|
crossorigin="anonymous"></script>
|
2021-09-24 22:31:36 -07:00
|
|
|
|
{% include 'footer.html' %}
|
2021-10-19 07:30:49 -07:00
|
|
|
|
<script src="/static/pagejs/group_teach.js"></script>
|
2021-09-18 07:04:31 -07:00
|
|
|
|
<script src="/static/time.js"></script>
|
2021-09-09 06:29:31 -07:00
|
|
|
|
</body>
|
|
|
|
|
|
|
|
|
|
</html>
|