-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist_coursegroup_department.php
More file actions
230 lines (174 loc) · 8.27 KB
/
list_coursegroup_department.php
File metadata and controls
230 lines (174 loc) · 8.27 KB
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<!DOCTYPE html>
<html>
<head>
<script language="javascript" type="text/javascript" src="<?php echo base_url(). 'js/jquery.min.js'; ?>"></script>
</head>
<script type="text/javascript">
$(function() {
/*
$('#DSdate').click( function()
{
var GetDate=$('#DSdate').val();
alert(GetDate);
});
*/
$('#sch').change( function()
{
GetNumOfDept();
});
});
function GetNumOfDept()
{
var GetDate=$('#sch').val();
var dataString='dsSchool='+GetDate;
dataString=dataString.trim();
echo GetDate;
if (dataString !='')
{
$.ajax({
type: "POST",
url: "<?php echo site_url('/admin/getDepartmentNumber'); ?>",
data: dataString,
success: function(data)
{
$("#department").empty();
var item = '';
for(var i=1;i<= data;i++)
{
//alert(i);
item += '<option value="'+data+'">'+123+'</option>';
}
$("#department").append(item);
// item +='</select>' ;
// $("#DSslot").
}
});
}
}
</script>
<body>
<div class="span8 center-spread">
<!--?php if (!empty($class) { ?-->
<br/><br/> <br/><br/>
<fieldset>
<legend> <b>List of Classes Taught by <?php echo ' '.$teacherName; ?> </b></legend>
<?php
if(!empty($imagePath))
{
echo'<table><tr> <td><img src="'.base_url().'uploads/'.$imagePath.'" width="200px" height="300px" alt="img" class="thumbnail"/></td></tr></table>';
}
if($teacherDetails->num_rows() > 0)
{ ?>
<table class="table-striped table">
<thead>
<tr><th>SN</th><th>Level </th><th>Class </th>
</tr>
</thead>
<tbody>
<?php
$serial = 1;
foreach($teacherDetails->result() as $row)
{
echo "<tr>
<td>$serial</td>
<td>$row->level</td>
<td>$row->class</td>";
$serial++;
$itemsToDelete = $row->level.'---'.$row->class;
$deleteParameter = 'admin-delete_teacher_details-'.$row->td_ID.'-'.$teacherID.'-'.$teacherName;
$newcaller = 'admin-teacher_details-'.$teacherID.'-'.$teacherName.'-'.$caller;
echo "<td>".anchor('admin/confirm_delete/'.$deleteParameter.'/'.$itemsToDelete.'/'.$newcaller ,"Delete")."</td>";
/* " <td>". form_input('teacherName', $teacherNameArr[$i])."</td><td><select class=\"input-xlarge\" id=\"courseID\" name=\"courseID\" width=\"120px\">";
foreach($courseDetails->result() as $rowCs)
{
if($rowCs->id == $courseIDArr[$i])
{
echo '<option value="'.$rowCs->id.'" selected="selected">'.$rowCs->code.'</option>' ;
}
else
{
echo '<option value="'.$rowCs->id.'">'.$rowCs->code.'</option>' ;
}
}
echo "</select></td>"
*/ }
$dcdCaller = str_replace('-', '/', $caller);
$attr = 'class="btn btn-danger btn-large"';
echo "
".anchor($dcdCaller,"Back to Summary",$attr) ;
}
else
{echo "<p>There are no classes attached yet for $teacherName in this app!</p>";}
?>
</tbody>
</table>
<hr/>
<a data-toggle="modal" href="#addNewDept" class="btn btn-success btn-large">Add Class and Level</a>
</fieldset>
<div id="addNewDept" class="modal hide fade">
<div class="modal-header">
<a class="close" data-dismiss="modal" >×</a>
<h3>Add Class and Level taught by the Teacher</h3>
</div>
<div class="modal-body">
<?php
$attributes = array('class'=>'form-horizontal');
echo form_open_multipart("admin/Add_class_level", $attributes);
// form_open_multipart('admin/upload_images', $attributes)
?>
<div class="control-group" >
<?php echo form_label('Teacher Name','Teacher Name',array('class'=>'control-label disabled'));?>
<div class="controls">
<?php
echo "<b>$teacherName</b>";
?>
</div>
</div>
<div class="control-group" >
<?php echo form_label('Class','Class',array('class'=>'control-label disabled'));?>
<div class="controls">
<select class="input-xlarge" id="class" name="class" width="120px">
<?php
foreach($classList as $row3)
{
echo '<option value="'.$row3.'"> '.$row3.'</option>' ;
}
?>
</select>
</div>
</div>
<div class="control-group" >
<?php echo form_label('Select Level','Select Level',array('class'=>'control-label disabled'));?>
<div class="controls">
<?php
$i=0;
foreach ($levelList as $lvl)
{
echo '<input type="checkbox" class="input-xlarge" name="'."level".$i.'" value="'.$lvl.'" />'.$lvl." ";
$i++;
if(($i % 4)== 0)
echo '<br/><br/>';
}
echo form_hidden("count",$i);
echo form_hidden("teacherName",$teacherName);
echo form_hidden("teacherID",$teacherID);
echo form_hidden("caller",$caller);
?>
</div>
<div class="modal-footer form-actions">
<?php
$attr = array('id'=>'submit', 'value'=>'Submit','class'=>'btn btn-success');
echo form_submit($attr);
echo '  ';
$attr = array('id'=>'cancel', 'value'=>'Cancel','class'=>'btn');
echo form_reset($attr);
?>
</div>
<?php echo form_close(); ?>
</div>
</div>