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
CloudStarTreck 2020-04-08 10:05:17 +08:00
parent 25f9b4ff0f
commit f894e79de1
2 changed files with 11 additions and 8 deletions

View File

@ -117,11 +117,15 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
while($row1 = mysqli_fetch_assoc($result1)) {
$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['Time'] = strstr($Deadline, ' ');
$_SESSION['Instructions']=$row1['Instructions'];
$_SESSION['Title']=$row1['Title'];
$_SESSION['Marks']=$row1['Marks'];
$_SESSION['Type']=$row1['Type'];
}
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'];
$Marks=$_SESSION['Marks'];
echo " <h3><a href='Courses.php?course=".$url."'> Editing Lab Assignment </a></h3>";
?>
<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
<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-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>
Title
<input type='text' name='title' placeholder='Ttle' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Title : ""; ?>">
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
<input type='text' name='marks' placeholder='Marks' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Marks : ""; ?>">
Attachment 1
@ -183,7 +186,7 @@ Attachment 4
<br>
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>
<input type='submit' class='btn btn-primary' value='Post Lab Assignment'><br>
</form><br><br><br><br>

View File

@ -724,17 +724,17 @@ $count=0;
//check zise
if(!checksize("attachment1"))
{
echo "20 MB is the maximum file size allowed";
echo "2 MB is the maximum file size allowed";
return;
}
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;
}
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;
}