forked from mrlan/LRR
				
			Compare commits
	
		
			No commits in common. "SeleniumIbrahim-Ibrahim" and "master" have entirely different histories. 
		
	
	
		
			SeleniumIb
			...
			master
		
	
		| 
						 | 
					@ -157,7 +157,7 @@ if ($_SESSION['user_type'] != "Lecturer") {
 | 
				
			||||||
      <!-- Nav tabs -->
 | 
					      <!-- Nav tabs -->
 | 
				
			||||||
      <ul class="nav nav-tabs" role="tablist">
 | 
					      <ul class="nav nav-tabs" role="tablist">
 | 
				
			||||||
        <li class="nav-item">
 | 
					        <li class="nav-item">
 | 
				
			||||||
          <a class="nav-link active" data-toggle="tab" href="#menub" id="existing_courses">Existing Courses</a>
 | 
					          <a class="nav-link active" data-toggle="tab" href="#menub">Existing Courses</a>
 | 
				
			||||||
        </li>
 | 
					        </li>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      </ul>
 | 
					      </ul>
 | 
				
			||||||
| 
						 | 
					@ -182,7 +182,6 @@ if ($_SESSION['user_type'] != "Lecturer") {
 | 
				
			||||||
            $result = mysqli_query($con, "SELECT `Course_ID`, `Course_Name`, `Academic_Year`, `Faculty`, `Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members`   , users_table.Full_Name  FROM `courses_table` INNER JOIN users_table ON users_table.User_ID=courses_table.Lecturer_User_ID");
 | 
					            $result = mysqli_query($con, "SELECT `Course_ID`, `Course_Name`, `Academic_Year`, `Faculty`, `Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members`   , users_table.Full_Name  FROM `courses_table` INNER JOIN users_table ON users_table.User_ID=courses_table.Lecturer_User_ID");
 | 
				
			||||||
            if (mysqli_num_rows($result) == 0) {
 | 
					            if (mysqli_num_rows($result) == 0) {
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
              $counter = 0;
 | 
					 | 
				
			||||||
              while ($row = mysqli_fetch_assoc($result)) {
 | 
					              while ($row = mysqli_fetch_assoc($result)) {
 | 
				
			||||||
                $name = $row['Course_Name'];
 | 
					                $name = $row['Course_Name'];
 | 
				
			||||||
                $code = $row['Course_Code'];
 | 
					                $code = $row['Course_Code'];
 | 
				
			||||||
| 
						 | 
					@ -190,7 +189,6 @@ if ($_SESSION['user_type'] != "Lecturer") {
 | 
				
			||||||
                $lecturer = $row['Full_Name'];
 | 
					                $lecturer = $row['Full_Name'];
 | 
				
			||||||
                $academic = $row['Academic_Year'];
 | 
					                $academic = $row['Academic_Year'];
 | 
				
			||||||
                $c_id = $row['Course_ID'];
 | 
					                $c_id = $row['Course_ID'];
 | 
				
			||||||
                $counter += 1;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                $resultTA = mysqli_query($con, "SELECT `Course_ID`, `TA`,users_table.Full_Name as TA_NAME FROM `course_ta`
 | 
					                $resultTA = mysqli_query($con, "SELECT `Course_ID`, `TA`,users_table.Full_Name as TA_NAME FROM `course_ta`
 | 
				
			||||||
INNER JOIN users_table on users_table.User_ID=course_ta.TA
 | 
					INNER JOIN users_table on users_table.User_ID=course_ta.TA
 | 
				
			||||||
| 
						 | 
					@ -202,7 +200,7 @@ where course_ta.Course_ID=$c_id");
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                echo "  
 | 
					                echo "  
 | 
				
			||||||
                          <tr> <td>$code - $name</td>  <td>$faculty </td> <td>$lecturer</td><td>$ta</td>  <td><form method='get' action='Script.php' id='drop_menu_form_$counter'> <select name='ta' class=''>";
 | 
					                          <tr> <td>$code - $name</td>  <td>$faculty </td> <td>$lecturer</td><td>$ta</td>  <td><form method='get' action='Script.php'> <select name='ta' class=''>";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                $resultx = mysqli_query($con, "SELECT * FROM Users_Table WHERE UserType='TA'");
 | 
					                $resultx = mysqli_query($con, "SELECT * FROM Users_Table WHERE UserType='TA'");
 | 
				
			||||||
                if (mysqli_num_rows($resultx) == 0) {
 | 
					                if (mysqli_num_rows($resultx) == 0) {
 | 
				
			||||||
| 
						 | 
					@ -214,7 +212,7 @@ where course_ta.Course_ID=$c_id");
 | 
				
			||||||
                  }
 | 
					                  }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                echo "</select>  <input type='hidden' name='assignTA' value='true'> <input type='hidden' name='id' value='$c_id'>  <input type='submit' value='assign' id='assign_btn_$counter'></form> </td></tr>
 | 
					                echo "</select>  <input type='hidden' name='assignTA' value='true'> <input type='hidden' name='id' value='$c_id'>  <input type='submit' value='assign'></form> </td></tr>
 | 
				
			||||||
                         ";
 | 
					                         ";
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            } ?>
 | 
					            } ?>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										10
									
								
								Course.php
								
								
								
								
							
							
						
						
									
										10
									
								
								Course.php
								
								
								
								
							| 
						 | 
					@ -90,7 +90,7 @@ if ($_SESSION['user_type'] == "Student") {
 | 
				
			||||||
                    <a class="nav-link" data-toggle="tab" href="#menu3">Submitted</a>
 | 
					                    <a class="nav-link" data-toggle="tab" href="#menu3">Submitted</a>
 | 
				
			||||||
                </li>
 | 
					                </li>
 | 
				
			||||||
                <li class="nav-item">
 | 
					                <li class="nav-item">
 | 
				
			||||||
                    <a class="nav-link" data-toggle="tab" href="#menu4" id="marked_tab">Marked</a>
 | 
					                    <a class="nav-link" data-toggle="tab" href="#menu4">Marked</a>
 | 
				
			||||||
                </li>
 | 
					                </li>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                <!----------Delete Course Button----------->
 | 
					                <!----------Delete Course Button----------->
 | 
				
			||||||
| 
						 | 
					@ -239,7 +239,7 @@ if ($_SESSION['user_type'] == "Student") {
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    echo "   <k href='#'>   <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'>
 | 
					                    echo "   <k href='#'>   <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'>
 | 
				
			||||||
  $title ($type) <br> <span style='font-size:8pt'> $ins</span> 
 | 
					  $title ($type) <br> <span style='font-size:8pt'> $ins</span> 
 | 
				
			||||||
   <br> <span style='font-size:8pt'>Posted : $posted      Deadline :   $deadline       ($Marks Marks)         <a href='~\..\SubmitLab.php?id=$labid&url=$url' class='btn-sm btn-info' style='margin-left:50px;' id='submit_lab_report_btn'> Submit Lab Report</a><br> Attachments : $full_link </span>  
 | 
					   <br> <span style='font-size:8pt'>Posted : $posted      Deadline :   $deadline       ($Marks Marks)         <a href='~\..\SubmitLab.php?id=$labid&url=$url' class='btn-sm btn-info' style='margin-left:50px;'> Submit Lab Report</a><br> Attachments : $full_link </span>  
 | 
				
			||||||
</div></k>";
 | 
					</div></k>";
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -457,7 +457,7 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
 | 
				
			||||||
                    $remarking_reason = $row['Remarking_Reason'];
 | 
					                    $remarking_reason = $row['Remarking_Reason'];
 | 
				
			||||||
                    if ($status == 'Marked') {
 | 
					                    if ($status == 'Marked') {
 | 
				
			||||||
                        $rm_data = "\Script.php?remarking=yes&id=$Submission_ID&url=$url&status=Remarking";
 | 
					                        $rm_data = "\Script.php?remarking=yes&id=$Submission_ID&url=$url&status=Remarking";
 | 
				
			||||||
                        $remarking = "<button  onclick='remarking(\"$rm_data\")' class='btn-sm btn-success' id='request_remarking_btn'>  Request Remarking </button>";
 | 
					                        $remarking = "<button  onclick='remarking(\"$rm_data\")' class='btn-sm btn-success'>  Request Remarking </button>";
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    if ($status == 'Remarking') {
 | 
					                    if ($status == 'Remarking') {
 | 
				
			||||||
                        $remarking = "<span  style='color:orange'><i class='fa fa-info-circle'></i> Remarking Request sent </span> <br> Remarking Reason:<i>$remarking_reason </i> <br>";
 | 
					                        $remarking = "<span  style='color:orange'><i class='fa fa-info-circle'></i> Remarking Request sent </span> <br> Remarking Reason:<i>$remarking_reason </i> <br>";
 | 
				
			||||||
| 
						 | 
					@ -520,7 +520,7 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
 | 
				
			||||||
            $count_groups = $row['Course_Group_id'];
 | 
					            $count_groups = $row['Course_Group_id'];
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        echo " <button onclick='CreateGroup()' class='btn btn-primary' id='create_group_btn'> Create Group</button>";
 | 
					        echo " <button onclick='CreateGroup()' class='btn btn-primary'> Create Group</button>";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ?>
 | 
					        ?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -584,7 +584,7 @@ include 'Footer.php';
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $('<form id="frm" method="get" action="Script.php"><input type="hidden" name="creategroup" value="true">\n\
 | 
					            $('<form id="frm" method="get" action="Script.php"><input type="hidden" name="creategroup" value="true">\n\
 | 
				
			||||||
 <input type="hidden" name="student_id" value="<?php echo $student_id; ?>" > Group Name  <input type="text" name="name" id="group_name">\n\
 | 
					 <input type="hidden" name="student_id" value="<?php echo $student_id; ?>" > Group Name  <input type="text" name="name">\n\
 | 
				
			||||||
<input type="hidden" name="url" value="<?php echo $url; ?>">  <input type="hidden" name="id" value="<?php echo $course_id; ?>">    </form>').dialog({
 | 
					<input type="hidden" name="url" value="<?php echo $url; ?>">  <input type="hidden" name="id" value="<?php echo $course_id; ?>">    </form>').dialog({
 | 
				
			||||||
                modal: true,
 | 
					                modal: true,
 | 
				
			||||||
                title: 'Create Group',
 | 
					                title: 'Create Group',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,9 +30,9 @@ if ($_SESSION['user_type'] == "Lecturer" || $_SESSION['user_type'] == "TA") {
 | 
				
			||||||
                    $('<form id="frm" method="get" action="Script.php">\n\
 | 
					                    $('<form id="frm" method="get" action="Script.php">\n\
 | 
				
			||||||
    <input type="hidden" name="extenddeadline" value="true" >\n\
 | 
					    <input type="hidden" name="extenddeadline" value="true" >\n\
 | 
				
			||||||
   <input type="hidden" name="id" value="' + id + '" > \n\
 | 
					   <input type="hidden" name="id" value="' + id + '" > \n\
 | 
				
			||||||
New Date/Time <br><input type="date" name="date" required="" id="new_date"> <input type="time" name="time" required=""> \n\
 | 
					New Date/Time <br><input type="date" name="date" required=""> <input type="time" name="time" required=""> \n\
 | 
				
			||||||
  \n\
 | 
					  \n\
 | 
				
			||||||
<br><input type="radio" value="1" name="type" required="" id="extend_for_all"> Extend for All<hr>  \n\
 | 
					<br><input type="radio" value="1" name="type" required=""> Extend for All<hr>  \n\
 | 
				
			||||||
<input type="radio" value="2" name="type" required=""> Extend for these Individual Students \n\
 | 
					<input type="radio" value="2" name="type" required=""> Extend for these Individual Students \n\
 | 
				
			||||||
 ' + dropstudents + '   \n\
 | 
					 ' + dropstudents + '   \n\
 | 
				
			||||||
</form>').dialog({
 | 
					</form>').dialog({
 | 
				
			||||||
| 
						 | 
					@ -259,7 +259,6 @@ New Date/Time <br><input type="date" name="date" required="" id="new_date"> <inp
 | 
				
			||||||
            if (mysqli_num_rows($result) == 0) {
 | 
					            if (mysqli_num_rows($result) == 0) {
 | 
				
			||||||
                echo "No assignments posted so far.";
 | 
					                echo "No assignments posted so far.";
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                $counter = 0;
 | 
					 | 
				
			||||||
                while ($row = mysqli_fetch_assoc($result)) {
 | 
					                while ($row = mysqli_fetch_assoc($result)) {
 | 
				
			||||||
                    $marks = $row['Marks'];
 | 
					                    $marks = $row['Marks'];
 | 
				
			||||||
                    $title = $row['Title'];
 | 
					                    $title = $row['Title'];
 | 
				
			||||||
| 
						 | 
					@ -274,7 +273,6 @@ New Date/Time <br><input type="date" name="date" required="" id="new_date"> <inp
 | 
				
			||||||
                    $cours_id = $row['Course_ID'];
 | 
					                    $cours_id = $row['Course_ID'];
 | 
				
			||||||
                    $as_type = $row['Type'];
 | 
					                    $as_type = $row['Type'];
 | 
				
			||||||
                    $full_link = "<a href='~\..\Lab_Report_Assignments\\$att1'>$att1</a>";
 | 
					                    $full_link = "<a href='~\..\Lab_Report_Assignments\\$att1'>$att1</a>";
 | 
				
			||||||
                    $counter += 1;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    if ($att2 != "") {
 | 
					                    if ($att2 != "") {
 | 
				
			||||||
                        $full_link = $full_link . "  |  <a href='~\..\Lab_Report_Assignments\\$att2'>$att2</a>";
 | 
					                        $full_link = $full_link . "  |  <a href='~\..\Lab_Report_Assignments\\$att2'>$att2</a>";
 | 
				
			||||||
| 
						 | 
					@ -309,7 +307,7 @@ New Date/Time <br><input type="date" name="date" required="" id="new_date"> <inp
 | 
				
			||||||
   <br> <span style='font-size:8pt'>Posted : $posted  Deadline :  <b> $deadline </b>   ($marks Marks)                     "
 | 
					   <br> <span style='font-size:8pt'>Posted : $posted  Deadline :  <b> $deadline </b>   ($marks Marks)                     "
 | 
				
			||||||
                        . "<br>"
 | 
					                        . "<br>"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        . "<span class='btn-default'>    $count_subs Submissions ( $count_marked Marked )       <a href='Courses.php?course=" . $url . "&act=edit&cid=" . $id . "'>Edit</a>   |  <a href='~\..\Submissions.php?id=$id&header=$header&total=$marks' onclick='' id='view_submissions_link_$counter'> View </a>        |           <a href='#'  onclick='extend_deadline($id)' id='extend_deadline_link'> Extend Deadline </a>  </span>         <hr> Attachments : $full_link </span>"
 | 
					                        . "<span class='btn-default'>    $count_subs Submissions ( $count_marked Marked )       <a href='Courses.php?course=" . $url . "&act=edit&cid=" . $id . "'>Edit</a>   |  <a href='~\..\Submissions.php?id=$id&header=$header&total=$marks' onclick=''> View </a>        |           <a href='#'  onclick='extend_deadline($id)'> Extend Deadline </a>  </span>         <hr> Attachments : $full_link </span>"
 | 
				
			||||||
                        . "  </div>
 | 
					                        . "  </div>
 | 
				
			||||||
                        ";
 | 
					                        ";
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -139,7 +139,6 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Sub
 | 
				
			||||||
                    if (mysqli_num_rows($result1) == 0) {
 | 
					                    if (mysqli_num_rows($result1) == 0) {
 | 
				
			||||||
                        echo "No Un-Marked Submissions for this Lab Report.";
 | 
					                        echo "No Un-Marked Submissions for this Lab Report.";
 | 
				
			||||||
                    } else {
 | 
					                    } else {
 | 
				
			||||||
                        $mark_submission_btn_counter = 0;
 | 
					 | 
				
			||||||
                        while ($row = mysqli_fetch_assoc($result1)) {
 | 
					                        while ($row = mysqli_fetch_assoc($result1)) {
 | 
				
			||||||
                            $title = $row['Title'];
 | 
					                            $title = $row['Title'];
 | 
				
			||||||
                            $Marks = $row['Marks'];
 | 
					                            $Marks = $row['Marks'];
 | 
				
			||||||
| 
						 | 
					@ -158,7 +157,6 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Sub
 | 
				
			||||||
                            $groupname = $row['Group_Name'];
 | 
					                            $groupname = $row['Group_Name'];
 | 
				
			||||||
                            $groupleader = $row['Group_Leader'];
 | 
					                            $groupleader = $row['Group_Leader'];
 | 
				
			||||||
                            $student_id = $row['sub_std'];
 | 
					                            $student_id = $row['sub_std'];
 | 
				
			||||||
                            $mark_submission_btn_counter += 1;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            if ($submitted_group == 0) {
 | 
					                            if ($submitted_group == 0) {
 | 
				
			||||||
                                $submitted_by = $student_name . "(" . $student_id . ")";
 | 
					                                $submitted_by = $student_name . "(" . $student_id . ")";
 | 
				
			||||||
| 
						 | 
					@ -186,7 +184,7 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Sub
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            echo "   <k href='#'>   <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'>
 | 
					                            echo "   <k href='#'>   <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'>
 | 
				
			||||||
  $title  <br> by: <b> $submitted_by </b>
 | 
					  $title  <br> by: <b> $submitted_by </b>
 | 
				
			||||||
   <br> <span style='font-size:8pt'>Submitted : $posted   <button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)' id='mark_submission_btn_$mark_submission_btn_counter'>  Mark Submission</button><br> Attachments : $full_link </span>  
 | 
					   <br> <span style='font-size:8pt'>Submitted : $posted   <button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)'>  Mark Submission</button><br> Attachments : $full_link </span>  
 | 
				
			||||||
</div></k>";
 | 
					</div></k>";
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
| 
						 | 
					@ -421,8 +419,8 @@ where course_group_members_table.Course_Group_id=$id");
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $('<form id="submit-form" method="get" action="Script.php">' + title + '(' + marks + ' marks) <input type="hidden" name="savemarks" value="true">\n\
 | 
					            $('<form id="submit-form" method="get" action="Script.php">' + title + '(' + marks + ' marks) <input type="hidden" name="savemarks" value="true">\n\
 | 
				
			||||||
 <input type="hidden" name="total" value="' + marks + '" > <input type="hidden" name="id" value="' + id + '" ><br> Marks <input type="text" name="marks" id="marks">\n\
 | 
					 <input type="hidden" name="total" value="' + marks + '" > <input type="hidden" name="id" value="' + id + '" ><br> Marks <input type="text" name="marks">\n\
 | 
				
			||||||
 Comments <textarea name="feedback" id="feedback"></textarea>  \n\
 | 
					 Comments <textarea name="feedback"></textarea>  \n\
 | 
				
			||||||
<input type="hidden" name="labid" value="<?php echo $course_id; ?>"> <input type="hidden" name="header" value="<?php echo $header; ?>">  </form>').dialog({
 | 
					<input type="hidden" name="labid" value="<?php echo $course_id; ?>"> <input type="hidden" name="header" value="<?php echo $header; ?>">  </form>').dialog({
 | 
				
			||||||
                modal: true,
 | 
					                modal: true,
 | 
				
			||||||
                title: 'Mark Submission',
 | 
					                title: 'Mark Submission',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -88,7 +88,7 @@ include 'Header.php';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <div class="col-md-6">
 | 
					        <div class="col-md-6">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <form method='post' enctype='multipart/form-data' action='Script.php' id="submit_lab_report_form">
 | 
					            <form method='post' enctype='multipart/form-data' action='Script.php'>
 | 
				
			||||||
                <input type='hidden' name='frm_submitlab' value='true' required='' />
 | 
					                <input type='hidden' name='frm_submitlab' value='true' required='' />
 | 
				
			||||||
                <input type='hidden' name='lab_id' value='<?php echo $id; ?>' required='' />
 | 
					                <input type='hidden' name='lab_id' value='<?php echo $id; ?>' required='' />
 | 
				
			||||||
                <input type='hidden' name='student_id' value='<?php echo $student_id; ?>' required='' />
 | 
					                <input type='hidden' name='student_id' value='<?php echo $student_id; ?>' required='' />
 | 
				
			||||||
| 
						 | 
					@ -96,10 +96,10 @@ include 'Header.php';
 | 
				
			||||||
                <input type='hidden' name='url' value='<?php echo $url; ?>' required='' />
 | 
					                <input type='hidden' name='url' value='<?php echo $url; ?>' required='' />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                Title
 | 
					                Title
 | 
				
			||||||
                <input type='text' name='title' placeholder='Ttle' class='form-control' required='' id="title">
 | 
					                <input type='text' name='title' placeholder='Ttle' class='form-control' required=''>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                Attachment 1
 | 
					                Attachment 1
 | 
				
			||||||
                <input type='file' name='attachment1' placeholder='Attachment 1' class='form-control' required='' id="attachment1">
 | 
					                <input type='file' name='attachment1' placeholder='Attachment 1' class='form-control' required=''>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                Attachment 2
 | 
					                Attachment 2
 | 
				
			||||||
                <input type='file' name='attachment2' placeholder='Attachment 2' class='form-control'>
 | 
					                <input type='file' name='attachment2' placeholder='Attachment 2' class='form-control'>
 | 
				
			||||||
| 
						 | 
					@ -115,7 +115,7 @@ include 'Header.php';
 | 
				
			||||||
            <input type='file' name='attachment4' placeholder='Attachment 4' class='form-control'>
 | 
					            <input type='file' name='attachment4' placeholder='Attachment 4' class='form-control'>
 | 
				
			||||||
            <br>
 | 
					            <br>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <input type='submit' class='btn btn-primary' value='Submit Lab Assignment' id="submit_lab_assignment_btn"><br>
 | 
					            <input type='submit' class='btn btn-primary' value='Submit Lab Assignment'><br>
 | 
				
			||||||
            </form>
 | 
					            </form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -188,18 +188,18 @@ class Admin(Actor):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			#Locate the "Admin" tab.
 | 
								#Locate the "Admin" tab.
 | 
				
			||||||
			wait = WebDriverWait(driver, 10)
 | 
								wait = WebDriverWait(driver, 10)
 | 
				
			||||||
			admin = wait.until(EC.presence_of_element_located((By.ID, "admin_tab")))
 | 
								admin = wait.until(EC.presence_of_element_located((By.XPATH, "/html/body/nav/div/form/a[1]")))
 | 
				
			||||||
			admin.click()
 | 
								admin.click()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			#Navigate to "Existing Courses" table.
 | 
								#Navigate to "Existing Courses" table.
 | 
				
			||||||
			wait2 = WebDriverWait(driver, 10)
 | 
								wait2 = WebDriverWait(driver, 10)
 | 
				
			||||||
			courses_table = wait2.until(EC.presence_of_element_located((By.ID, "existing_courses")))
 | 
								courses_table = wait2.until(EC.presence_of_element_located((By.XPATH, "/html/body/div[2]/div[2]/div/ul/li[2]/a")))
 | 
				
			||||||
			courses_table.click()
 | 
								courses_table.click()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			#Assign TA to the first course in "Existing Courses" table
 | 
								#Assign TA to the first course in "Existing Courses" table
 | 
				
			||||||
			wait3 = WebDriverWait(driver, 10)
 | 
								wait3 = WebDriverWait(driver, 10)
 | 
				
			||||||
			drop_menu_form = wait3.until(EC.presence_of_element_located((By.ID, "drop_menu_form_1")))
 | 
								drop_menu_form = wait3.until(EC.presence_of_element_located((By.XPATH, "//*[@id='menub']/table/tbody/tr[2]/td[5]/form")))
 | 
				
			||||||
			assign_btn = drop_menu_form.find_element(By.ID, "assign_btn_1")
 | 
								assign_btn = drop_menu_form.find_element(By.XPATH, "//input[@type='submit'][@value='assign']")
 | 
				
			||||||
			assign_btn.click()
 | 
								assign_btn.click()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			return 0
 | 
								return 0
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -164,12 +164,12 @@ class Instructor(Actor):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			#Wait until the submission portal card appears
 | 
								#Wait until the submission portal card appears
 | 
				
			||||||
			wait2 = WebDriverWait(driver, 10)
 | 
								wait2 = WebDriverWait(driver, 10)
 | 
				
			||||||
			view = wait2.until(EC.presence_of_element_located((By.ID, "view_submissions_link_1")))
 | 
								view = wait2.until(EC.presence_of_element_located((By.ID, "view_btn")))
 | 
				
			||||||
			view.click()
 | 
								view.click()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			#Locate and click the 'Mark Submission' btn
 | 
								#Locate and click the 'Mark Submission' btn
 | 
				
			||||||
			wait3 = WebDriverWait(driver, 10)
 | 
								wait3 = WebDriverWait(driver, 10)
 | 
				
			||||||
			mark_submission = wait3.until(EC.presence_of_element_located((By.ID, "mark_submission_btn_1")))
 | 
								mark_submission = wait3.until(EC.presence_of_element_located((By.ID, "mark_btn")))
 | 
				
			||||||
			mark_submission.click()
 | 
								mark_submission.click()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			#Fill and submit marking descision
 | 
								#Fill and submit marking descision
 | 
				
			||||||
| 
						 | 
					@ -210,7 +210,7 @@ class Instructor(Actor):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			#Wait until lab report assignment list appears.
 | 
								#Wait until lab report assignment list appears.
 | 
				
			||||||
			wait = WebDriverWait(driver, 10)
 | 
								wait = WebDriverWait(driver, 10)
 | 
				
			||||||
			extend_deadline = wait.until(EC.presence_of_element_located((By.ID, "extend_deadline_link")))
 | 
								extend_deadline = wait.until(EC.presence_of_element_located((By.ID, "ext_btn")))
 | 
				
			||||||
			extend_deadline.click()
 | 
								extend_deadline.click()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			#Wait until the extend deadline popup window shows up.
 | 
								#Wait until the extend deadline popup window shows up.
 | 
				
			||||||
| 
						 | 
					@ -218,10 +218,10 @@ class Instructor(Actor):
 | 
				
			||||||
			extend_deadline_form = wait2.until(EC.presence_of_element_located((By.ID, "frm")))
 | 
								extend_deadline_form = wait2.until(EC.presence_of_element_located((By.ID, "frm")))
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			#Insert the new deadline and submit for all.
 | 
								#Insert the new deadline and submit for all.
 | 
				
			||||||
			new_date = extend_deadline_form.find_element(By.ID, "new_date")
 | 
								new_date = extend_deadline_form.find_element(By.XPATH, "//form[@id='frm']/input[3]")
 | 
				
			||||||
			dateStr = self.utility.getTomorrowDate()
 | 
								dateStr = self.utility.getTomorrowDate()
 | 
				
			||||||
			new_date.send_keys(str(dateStr))
 | 
								new_date.send_keys(str(dateStr))
 | 
				
			||||||
			target = extend_deadline_form.find_element(By.ID, "extend_for_all")
 | 
								target = extend_deadline_form.find_element(By.XPATH, "//form[@id='frm']/input[5]")
 | 
				
			||||||
			target.click()
 | 
								target.click()
 | 
				
			||||||
			submit = extend_deadline_form.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/button[1]")
 | 
								submit = extend_deadline_form.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/button[1]")
 | 
				
			||||||
			submit.click()
 | 
								submit.click()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -89,19 +89,19 @@ class Student(Actor):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			#Locate and click assignment submission button.
 | 
								#Locate and click assignment submission button.
 | 
				
			||||||
			wait2 = WebDriverWait(driver, 10)
 | 
								wait2 = WebDriverWait(driver, 10)
 | 
				
			||||||
			assignment_card = wait2.until(EC.element_to_be_clickable((By.ID, "submit_lab_report_btn")))
 | 
								assignment_card = wait2.until(EC.element_to_be_clickable((By.LINK_TEXT, "Submit Lab Report")))
 | 
				
			||||||
			assignment_card.click()
 | 
								assignment_card.click()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			#Locate the assignment submission form and fill in the required data.
 | 
								#Locate the assignment submission form and fill in the required data.
 | 
				
			||||||
			wait3 = WebDriverWait(driver, 10)
 | 
								wait3 = WebDriverWait(driver, 10)
 | 
				
			||||||
			assignment_form = wait3.until(EC.presence_of_element_located((By.ID, "submit_lab_report_form")))
 | 
								assignment_form = wait3.until(EC.presence_of_element_located((By.ID, "sub_form")))
 | 
				
			||||||
			title = assignment_form.find_element(By.ID, "title")
 | 
								title = assignment_form.find_element(By.ID, "title")
 | 
				
			||||||
			dateStr = self.utility.getTodayDate()
 | 
								dateStr = self.utility.getTodayDate()
 | 
				
			||||||
			timeStr = self.utility.getTime()
 | 
								timeStr = self.utility.getTime()
 | 
				
			||||||
			title.send_keys("TESTSUBMISSIOM"+dateStr+timeStr)
 | 
								title.send_keys("TESTSUBMISSIOM"+dateStr+timeStr)
 | 
				
			||||||
			attachment = assignment_form.find_element(By.ID, "attachment1")
 | 
								attachment = assignment_form.find_element(By.ID, "att_one")
 | 
				
			||||||
			attachment.send_keys(os.getcwd()+"/DUMMY_SUBMISSION.txt")
 | 
								attachment.send_keys(os.getcwd()+"/DUMMY_SUBMISSION.txt")
 | 
				
			||||||
			submit = driver.find_element(By.ID, "submit_lab_assignment_btn")
 | 
								submit = driver.find_element(By.ID, "submit_btn")
 | 
				
			||||||
			submit.click()
 | 
								submit.click()
 | 
				
			||||||
			return 0
 | 
								return 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -135,7 +135,7 @@ class Student(Actor):
 | 
				
			||||||
			wait2 = WebDriverWait(driver, 10)
 | 
								wait2 = WebDriverWait(driver, 10)
 | 
				
			||||||
			marked_tab = wait2.until(EC.presence_of_element_located((By.ID, "marked_tab")))
 | 
								marked_tab = wait2.until(EC.presence_of_element_located((By.ID, "marked_tab")))
 | 
				
			||||||
			marked_tab.click()
 | 
								marked_tab.click()
 | 
				
			||||||
			req_remark = driver.find_element(By.ID, "request_remarking_btn")
 | 
								req_remark = driver.find_element(By.ID, "req_remark")
 | 
				
			||||||
			req_remark.click()
 | 
								req_remark.click()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			#Fill in the remarking form and submit.
 | 
								#Fill in the remarking form and submit.
 | 
				
			||||||
| 
						 | 
					@ -172,7 +172,7 @@ class Student(Actor):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			#Locate the create course group button and click it.
 | 
								#Locate the create course group button and click it.
 | 
				
			||||||
			wait2 = WebDriverWait(driver, 10)
 | 
								wait2 = WebDriverWait(driver, 10)
 | 
				
			||||||
			create_group = wait2.until(EC.presence_of_element_located((By.ID, "create_group_btn")))
 | 
								create_group = wait2.until(EC.presence_of_element_located((By.ID, "g_create_btn")))
 | 
				
			||||||
			create_group.click()
 | 
								create_group.click()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			#Fill in the course group form and create.
 | 
								#Fill in the course group form and create.
 | 
				
			||||||
| 
						 | 
					@ -180,9 +180,9 @@ class Student(Actor):
 | 
				
			||||||
			group_form = wait3.until(EC.presence_of_element_located((By.ID, "frm")))
 | 
								group_form = wait3.until(EC.presence_of_element_located((By.ID, "frm")))
 | 
				
			||||||
			timeStr = self.utility.getTime()
 | 
								timeStr = self.utility.getTime()
 | 
				
			||||||
			dateStr = self.utility.getTodayDate()
 | 
								dateStr = self.utility.getTodayDate()
 | 
				
			||||||
			group_name = group_form.find_element(By.ID, "group_name")
 | 
								group_name = group_form.find_element(By.ID, "g_name")
 | 
				
			||||||
			group_name.send_keys("TESTGROUP"+str(dateStr)+str(timeStr))
 | 
								group_name.send_keys("TESTGROUP"+str(dateStr)+str(timeStr))
 | 
				
			||||||
			create = driver.find_element(By.XPATH, "/html/body/div[7]/div[2]/div/button[1]")
 | 
								create = group_form.find_element(By.XPATH, "//div[2]/div/button[1]")
 | 
				
			||||||
			create.click()
 | 
								create.click()
 | 
				
			||||||
			return 0
 | 
								return 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -175,9 +175,8 @@ class MyUtility:
 | 
				
			||||||
		- date: formatted date string.
 | 
							- date: formatted date string.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		"""
 | 
							"""
 | 
				
			||||||
		date = datetime.datetime.today() + datetime.timedelta(days=1)
 | 
							date = datetime.datetime.today().strftime ('%d%m%Y')
 | 
				
			||||||
		date_str = date.strftime ('%m%d%Y')
 | 
							return date
 | 
				
			||||||
		return date_str
 | 
					 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	def getTomorrowDate(self):
 | 
						def getTomorrowDate(self):
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
| 
						 | 
					@ -188,8 +187,8 @@ class MyUtility:
 | 
				
			||||||
		- date: formatted date string.
 | 
							- date: formatted date string.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		"""		
 | 
							"""		
 | 
				
			||||||
		date = datetime.datetime.today() + datetime.timedelta(days=2)
 | 
							date = datetime.datetime.today() + datetime.timedelta(days=1)
 | 
				
			||||||
		date_str = date.strftime('%m%d%Y')
 | 
							date_str = date.strftime('%d%m%Y')
 | 
				
			||||||
		return date_str
 | 
							return date_str
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	def getYesterdayDate(self):
 | 
						def getYesterdayDate(self):
 | 
				
			||||||
| 
						 | 
					@ -202,7 +201,7 @@ class MyUtility:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		"""
 | 
							"""
 | 
				
			||||||
		date = datetime.datetime.today() - datetime.timedelta(days=1)
 | 
							date = datetime.datetime.today() - datetime.timedelta(days=1)
 | 
				
			||||||
		date_str = date.strftime('%m%d%Y')
 | 
							date_str = date.strftime('%d%m%Y')
 | 
				
			||||||
		return date_str
 | 
							return date_str
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	def storeCourseCode(self, course_code):
 | 
						def storeCourseCode(self, course_code):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue