-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_plan.php
104 lines (100 loc) · 3.41 KB
/
lesson_plan.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
<?php
//echo "Here";
session_start();
if(!isset($_SESSION['role']))
{
header('location:login.php');
}
//echo "skipped";
if(isset($_POST['save'])) {
include("config.php");
$user_id = $_SESSION['user_id'];
$l_name = $_POST['l_name'];
$s_activity = $_POST['s_activity'];
$obj=$_POST['obj'];
$resource=$_POST['resource'];
$sql = "INSERT INTO learning_plan (user_id,name,starter_activity,objective,material) VALUES ('$user_id','$l_name','$s_activity','$obj','$resource')";
if(mysqli_query($db, $sql)){
//echo "Records inserted successfully.";
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($db);
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="css/teacher.css">
</head>
<body>
<div class="header">
<div class="side_bar_btn">
<span>☰</span>
</div>
</div>
<div class="jumbotron">
<div class="container">
<div class="section_header">
<h2>Submit Your Lesson Plan...</h2>
</div>
<hr>
<div class="form_container">
<form method="POST">
<div class="form-group">
<label>Lesson Name</label>
<input type="text" class="form-control" id="lesson_name" name="l_name">
</div>
<div class="form-group">
<label>Starter Activity</label>
<input type="text" class="form-control" id="s_activity" name="s_activity">
</div>
<div class="form-group">
<label>Objective</label>
<input type="text" class="form-control" id="obj" name="obj">
</div>
<div class="form-group">
<label>Resource</label>
<input type="text" class="form-control" id="resource" name="resource">
</div>
<div type="hidden" name="is_submit" value=1></div>
<div style="text-align: center; margin-top: 30px">
<button type="submit" class="btn btn-default btn-success" style="width: 120px" name="save">Submit</button>
</div>
</form>
</div>
</div>
</div>
<div class="side_bar">
<div style="width: 100%; height: 20px; line-height: 20px; padding: 20px; text-align: right" class="hide_side_bar">
<span style="color: black">X</span>
</div>
<div class="side_bar_opt">
<a href="/profile.php">Teacher Profile</a>
</div>
<div class="side_bar_opt">
<a href="/quick_start.php">Upload Video</a>
</div>
<div class="side_bar_opt">
<a href="/unit_plan.php">Submit User Plan</a>
</div>
<div class="side_bar_opt">
<a href="/lesson_plan.php">Submit Lesson Plan</a>
</div>
<div class="side_bar_opt">
<a href="/get_feedback.php">Update Learning Plan</a>
</div>
<div class="side_bar_opt">
<a href="/logout.php">Logout</a>
</div>
</div>
<!-- scripts -->
<script
src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g="
crossorigin="anonymous"></script>
<script src="js/teacher.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</body>
</html>