-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreateCourseOutlineConfig.php
121 lines (100 loc) · 4.42 KB
/
createCourseOutlineConfig.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
<?php
session_start();
include 'connect.php';
if(isset($_POST['submit'])){
$courseCode=NULL;
$secNum=NULL;
$courseTitle=NULL;
$prerequisite=NULL;
$creditValue=NULL;
$semesterName=NULL;
$courseDescription=NULL;
$courseObjective=NULL;
$sectionID=NULL;
$refMaterials=NULL;
$topic=NULL;
$learningStrategy=NULL;
$assessmentStrategy=NULL;
$correspondingclo=NULL;
$queryResult=NULL;
$courseContent=NULL;
$courseCode=$_POST['courseCode'];
$secNum=$_POST['secNum'];
$courseTitle=$_POST['courseTitle'];
$prerequisite=$_POST['prerequisite'];
$creditValue=$_POST['creditValue'];
$semesterName=$_POST['semesterName'];
$courseDescription=$_POST['courseDescription'];
$courseObjective=$_POST['courseObjective'];
$sectionID=$_SESSION['sectionID'];
$refMaterials=$_POST['refMaterials'];
$courseContent=$_POST['courseContent'];
$queryResult=mysqli_query($con,"INSERT INTO `course_outline_t`
(`courseOutlineID`, `sectionID`, `semester`, `courseDescription`,
`objective`, `content`, `refMaterials`, `sectionNum`, `courseTitle`,
`prerequisiteCode`, `creditValue`)
VALUES (NULL, '$sectionID', '$semesterName', '$courseDescription', '$courseObjective',
'$courseContent','$refMaterials', '$secNum', '$courseTitle',
'$prerequisite', '$creditValue')");
//Getting course Outline ID from Database
$res=mysqli_query($con,"SELECT courseOutlineID
FROM course_outline_t AS cot
WHERE cot.sectionID='$sectionID'");
$row=mysqli_fetch_assoc($res);
$courseOutlineID=$row['courseOutlineID'];
for($i=1;$i<=$_POST['topicNum'];$i++){
$queryResult=NULL;
$topic=$_POST["topic".$i];
$learningStrategy=$_POST["learningStrategy".$i];
$assessmentStrategy=$_POST["assessmentStrategy".$i];
$correspondingclo=$_POST["correspondingclo".$i];
$queryResult=mysqli_query($con,"INSERT INTO `lesson_plan_strategy_t` (`lPSID`,
`week`, `topic`, `learningStrategy`, `assessmentStrategy`,
`correspondingClo`, `courseOutlineID`) VALUES (NULL, '$i', '$topic', '$learningStrategy',
'$assessmentStrategy', '$correspondingclo', '$courseOutlineID')");
}
$j=1;
for($i=1;$i<=$_POST['assessmentCount'];$i++){
$queryResult=NULL;
$assessmentType=$_POST["assessmentType".$i];
$subTotal=$_POST["subTotal".$i];
$assessmentTool1=$_POST["assessmentTool".$j];
$markDistribution1=$_POST["markDistribution".$j];
$bloomsCategory1=$_POST["bloomsCategory".$j];
$j++;
$assessmentTool2=$_POST["assessmentTool".$j];
$markDistribution2=$_POST["markDistribution".$j];
$bloomsCategory2=$_POST["bloomsCategory".$j];
$j++;
$assessmentTool3=$_POST["assessmentTool".$j];
$markDistribution3=$_POST["markDistribution".$j];
$bloomsCategory3=$_POST["bloomsCategory".$j];
$j++;
$queryResult=mysqli_query($con,"INSERT INTO `evaluation_strategy_t`
(`eSID`, `assessmentTool1`, `markDistribution1`, `bloomsCategory1`,
`courseOutlineID`, `assessmentTool2`, `assessmentTool3`,
`markDistribution2`, `markDistribution3`, `bloomsCategory2`,
`bloomsCategory3`, `assessmentType`,`subTotal`) VALUES
(NULL, '$assessmentTool1', '$markDistribution1', '$bloomsCategory1',
'$courseOutlineID', '$assessmentTool2', '$assessmentTool3',
'$markDistribution2', '$markDistribution3',
'$bloomsCategory2', '$bloomsCategory3', '$assessmentType','$subTotal')");
}
for($i=1;$i<=$_POST['cloCount'];$i++){
$queryResult=NULL;
$cloNum=$_POST["cloNum".$i];
$clo=$_POST["clo".$i];
$c=$_POST["c".$i];
$p=$_POST["p".$i];
$a=$_POST["a".$i];
$s=$_POST["s".$i];
$plo=$_POST["plo".$i];
$correlation=$_POST["correlation".$i];
$queryResult=mysqli_query($con,"INSERT INTO `clo_matrix_t`
(`clo_MatID`, `cloNum`, `coDescription`, `ploAssessed`,
`correlation`, `courseOutlineID`, `c`, `p`, `a`, `s`)
VALUES (NULL, '$cloNum', '$clo', '$plo', '$correlation', '$courseOutlineID', '$c', '$p', '$a', '$s')");
}
header('location:createCourseOutline.php');
}
?>