-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate-assignment.php
171 lines (156 loc) · 8.98 KB
/
create-assignment.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?php //access controlling
session_start();
if( !isset($_SESSION['signed_in']) ) { //session not set
header('location:index.php');
exit();
}else if( !$_SESSION['signed_in'] ){ //session set, but not signed_in
header('location:index.php');
exit();
}else if( substr($_SESSION['username'], -1) != "L" ){ //session set, but not for HR
header('location:index.php');
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Create New Assignment</title>
<!--css styles-->
<link rel="stylesheet" href="css/styles_header.css">
<link rel="stylesheet" href="css/styles_create-assignment.css">
<link rel="stylesheet" href="css/styles_footer.css">
<link rel="stylesheet" href="css/subnav.css">
<link rel="stylesheet" href="css/navpannel.css">
<!--jquery sources-->
<script src="js/jquery-3.3.1.js"></script>
<script src="js/addQueTemp.js" type="text/javascript"></script>
<script src="js/assign-buttons.js" type="text/javascript"></script>
<script src="js/subnav.js" type="text/javascript"></script>
</head>
<body>
<!--Including header file and navigation-->
<?php
include_once("inc/header.php");
include_once("inc/navpannel.php");
$index = trim($_SESSION['username']);
include_once("inc/subnavlec.php");
?>
<input type="hidden" name="index" id="index" value=<?php echo $index ?> >
<!--confirm dialog box (hidden)-->
<div class="confirmBox">
<div class="message"></div>
<span class="button yes">Yes</span>
<span class="button no">No</span>
</div>
<!--set deadline dialog box (hidden)-->
<div id="set_deadline">
<input type="radio" name="deadline" value="0000-00-00 00:00:00" checked="checked" id="noDeadline">No deadline<br>
<input type="radio" name="deadline" value="" id="hasDeadline">Set deadline<br>
<div id="deadline_option">
<label class="label_h">date :</label>
<input type="text" name="year" value="2018" id="year">
<select name="month" id="month">
<option value="01">Jan</option><option value="02">Feb</option><option value="03">Mar</option><option value="04">Apr</option>
<option value="05">May</option><option value="06">Jun</option><option value="07">Jul</option><option value="08">Aug</option>
<option value="09">Sep</option><option value="10">Oct</option><option value="11">Nov</option><option value="12">Dec</option>
</select>
<select name="day" id="day">
<option value="01">01</option><option value="02">02</option><option value="03">03</option><option value="04">04</option>
<option value="05">05</option><option value="06">06</option><option value="07">07</option><option value="08">08</option>
<option value="09">09</option><option value="10">10</option><option value="11">11</option><option value="12">12</option>
<option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option>
<option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option>
<option value="21">21</option><option value="22">22</option><option value="23">23</option><option value="24">24</option>
<option value="25">25</option><option value="26">26</option><option value="27">27</option><option value="28">28</option>
<option value="29">29</option><option value="30">30</option><option value="31">31</option>
</select>
<br><label class="label_h">time (24h) :</label>
<select name="hour" id="hour">
<option value="00">00</option><option value="01">01</option><option value="02">02</option>
<option value="03">03</option><option value="04">04</option><option value="05">05</option>
<option value="06">06</option><option value="07">07</option><option value="08">08</option>
<option value="09">09</option><option value="10">10</option><option value="11">11</option>
<option value="12">12</option><option value="13">13</option><option value="14">14</option>
<option value="15">15</option><option value="16">16</option><option value="17">17</option>
<option value="18">18</option><option value="19">19</option><option value="20">20</option>
<option value="21">21</option><option value="22">22</option><option value="23">23</option>
</select><label class="label">hr</label>
<select name="minute" id="minute">
<option value="00">00</option><option value="01">01</option><option value="02">02</option><option value="03">03</option><option value="04">04</option>
<option value="05">05</option><option value="06">06</option><option value="07">07</option><option value="08">08</option><option value="09">09</option>
<option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option>
<option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option>
<option value="20">20</option><option value="21">21</option><option value="22">22</option><option value="23">23</option><option value="24">24</option>
<option value="25">25</option><option value="26">26</option><option value="27">27</option><option value="28">28</option><option value="29">29</option>
<option value="30">30</option><option value="31">31</option><option value="32">32</option><option value="33">33</option><option value="34">34</option>
<option value="35">35</option><option value="36">36</option><option value="37">37</option><option value="38">38</option><option value="39">39</option>
<option value="40">40</option><option value="41">41</option><option value="42">42</option><option value="43">43</option><option value="44">44</option>
<option value="45">45</option><option value="46">46</option><option value="47">47</option><option value="48">48</option><option value="49">49</option>
<option value="50">50</option><option value="51">51</option><option value="52">52</option><option value="53">53</option><option value="54">54</option>
<option value="55">55</option><option value="56">56</option><option value="57">57</option><option value="58">58</option><option value="59">59</option>
</select><label class="label">min</label>
</div>
<div id="deadline_buttons">
<button type="submit" name="create" id="create">Create</button>
</div>
</div>
<!--verify assignment popup table (hidden)-->
<div id="popup_verify">
<table id="table_verify">
<tr>
<th>Question</th>
<th>Option1</th>
<th>Option2</th>
<th>Option3</th>
<th>Option4</th>
<th>Correct Option</th>
</tr>
</table>
<div class="container_buttons">
<button type="submit" name="back" class="assign_button" id="back">Back</button>
<button type="submit" name="verify_next" class="assign_button" id="verify_next">Next</button>
</div>
</div>
<!--assignment details panel-->
<div class="assignment_details" id="ass_det_1">
<label class="label">Module name :</label>
<label class="label" id="module_select">Module name :</label> <!--loads from php-->
<label class="label"> Assignment name :</label>
<input type="text" name="assignment_name" class="details_input" id="assignment_name">
<label class="label"> No of Attempts :</label>
<select name="attempts" id="attempts">
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="04">05</option>
</select>
<label class="label"> Late Submission Allowed :</label>
<select name="late" id="late_allowed">
<option value="0">No</option>
<option value="1">Yes</option>
</select>
</div>
<div class="assignment_details" id="ass_det_2">
<label class="label">Description : </label>
<textarea id="assignment_des" class="des_input" placeholder="Add a optional description" rows="4"></textarea><br>
</div>
<!--question container-->
<div class="container_questions">
<nav class="questions">
<ul id="que_list">
</ul>
</nav>
</div>
<!--button container-->
<div class="container_buttons">
<button type="submit" name="cancel" class="assign_button" id="cancel">Cancel</button>
<button type="submit" name="new-question" class="assign_button" id="new-question">Add new question</button>
<button type="submit" name="complete" class="assign_button" id="complete">Complete</button>
</div>
<!--Include footer file-->
<?php include_once("inc/footer.php"); ?>
</body>
</html>