forked from mrlan/LRR
Editing report by Instructor
In the previous update, the form for editing assignments by instructor was failing to retrieve <textarea> Now its working fine. (Line 171 Courses.php)SIMPLICITY_Bug-189_Course_Delete_btn
parent
25f9b4ff0f
commit
f894e79de1
11
Courses.php
11
Courses.php
|
@ -117,11 +117,15 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
|
||||||
|
|
||||||
while($row1 = mysqli_fetch_assoc($result1)) {
|
while($row1 = mysqli_fetch_assoc($result1)) {
|
||||||
$Deadline = $row1['Deadline'];
|
$Deadline = $row1['Deadline'];
|
||||||
|
// $datetime = explode(" ", $Deadline); explode() is another famous way of spliting a string from the database
|
||||||
|
// $_SESSION['Date'] = $datetime[0];
|
||||||
|
// $_SESSION['Time'] = $datetime[1];
|
||||||
$_SESSION['Date'] = strstr($Deadline, ' ', true);
|
$_SESSION['Date'] = strstr($Deadline, ' ', true);
|
||||||
$_SESSION['Time'] = strstr($Deadline, ' ');
|
$_SESSION['Time'] = strstr($Deadline, ' ');
|
||||||
$_SESSION['Instructions']=$row1['Instructions'];
|
$_SESSION['Instructions']=$row1['Instructions'];
|
||||||
$_SESSION['Title']=$row1['Title'];
|
$_SESSION['Title']=$row1['Title'];
|
||||||
$_SESSION['Marks']=$row1['Marks'];
|
$_SESSION['Marks']=$row1['Marks'];
|
||||||
|
$_SESSION['Type']=$row1['Type'];
|
||||||
|
|
||||||
}
|
}
|
||||||
if(isset($_POST['frm_uploadlab'])){
|
if(isset($_POST['frm_uploadlab'])){
|
||||||
|
@ -148,7 +152,6 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
|
||||||
$Title=$_SESSION['Title'];
|
$Title=$_SESSION['Title'];
|
||||||
$Marks=$_SESSION['Marks'];
|
$Marks=$_SESSION['Marks'];
|
||||||
|
|
||||||
|
|
||||||
echo " <h3><a href='Courses.php?course=".$url."'> Editing Lab Assignment </a></h3>";
|
echo " <h3><a href='Courses.php?course=".$url."'> Editing Lab Assignment </a></h3>";
|
||||||
?>
|
?>
|
||||||
<form method='post' enctype='multipart/form-data' action=''>
|
<form method='post' enctype='multipart/form-data' action=''>
|
||||||
|
@ -159,13 +162,13 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
|
||||||
Dealine Date/Time
|
Dealine Date/Time
|
||||||
<div class='row'>
|
<div class='row'>
|
||||||
<div class='col-md-7'><input type='date' id='date' name='deadlinedate' placeholder='' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Date : ""; ?>"> </div>
|
<div class='col-md-7'><input type='date' id='date' name='deadlinedate' placeholder='' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Date : ""; ?>"> </div>
|
||||||
<div class='col-md-5'> <input type='time' class='form-control' name='deadlinetime' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Time : ""; ?>"> </div>
|
<div class='col-md-5'> <input type='text' id='time' class='form-control' name='deadlinetime' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Time : ""; ?>"> </div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
Title
|
Title
|
||||||
<input type='text' name='title' placeholder='Ttle' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Title : ""; ?>">
|
<input type='text' name='title' placeholder='Ttle' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Title : ""; ?>">
|
||||||
Instructions
|
Instructions
|
||||||
<textarea name='instructions' placeholder='Assignment Instructions' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=='edit' ? $Instructions : ''; ?>"></textarea>
|
<textarea name='instructions' placeholder='Assignment Instructions' class='form-control' required='' ><?php echo isset($_GET['act']) && $_GET['act']=='edit' ? $Instructions : ''; ?></textarea>
|
||||||
Marks
|
Marks
|
||||||
<input type='text' name='marks' placeholder='Marks' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Marks : ""; ?>">
|
<input type='text' name='marks' placeholder='Marks' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Marks : ""; ?>">
|
||||||
Attachment 1
|
Attachment 1
|
||||||
|
@ -183,7 +186,7 @@ Attachment 4
|
||||||
<br>
|
<br>
|
||||||
Submission Type <input type='radio' name='type' value='Individual' required=''> Invidual
|
Submission Type <input type='radio' name='type' value='Individual' required=''> Invidual
|
||||||
|
|
||||||
<input type='radio' name='type' value='Group' required=''> Group
|
<input type='radio' name='type' required='' value='Group'> Group
|
||||||
<hr>
|
<hr>
|
||||||
<input type='submit' class='btn btn-primary' value='Post Lab Assignment'><br>
|
<input type='submit' class='btn btn-primary' value='Post Lab Assignment'><br>
|
||||||
</form><br><br><br><br>
|
</form><br><br><br><br>
|
||||||
|
|
|
@ -724,17 +724,17 @@ $count=0;
|
||||||
//check zise
|
//check zise
|
||||||
if(!checksize("attachment1"))
|
if(!checksize("attachment1"))
|
||||||
{
|
{
|
||||||
echo "20 MB is the maximum file size allowed";
|
echo "2 MB is the maximum file size allowed";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!checksize("attachment2") && $_FILES["attachment2"]["name"]!="")
|
if(!checksize("attachment2") && $_FILES["attachment2"]["name"]!="")
|
||||||
{
|
{
|
||||||
echo "20 MB is the maximum file size allowed";
|
echo "2 MB is the maximum file size allowed";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!checksize("attachment3") && $_FILES["attachment3"]["name"]!="")
|
if(!checksize("attachment3") && $_FILES["attachment3"]["name"]!="")
|
||||||
{
|
{
|
||||||
echo "20 MB is the maximum file size allowed";
|
echo "2 MB is the maximum file size allowed";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue