Administration panel


Copy & paste student number to the following box, and separate two student numbers with a space.


Create TA Accounts

"; } else if($_SESSION['user_type'] == "Admin"){ echo "

Create Lecturer Accounts

"; } ?>
Full name
Email
Initial password (Enter a strong password or leave it empty to let LRR generate one)
User type: TA (Teaching Assistant) '; } else if ($_SESSION['user_type'] == "Admin"){ echo " Lecturer "; } ?>

'; $_SESSION['info_Admin_Users'] = null; } ?>

console.log('here {$user_id}');"; // debug trick // find the TAs in the courses taught by this instructor $ta_result = mysqli_query( $con, "SELECT TA FROM course_ta INNER JOIN courses_table ON course_ta.Course_ID=courses_table.Course_ID WHERE courses_table.Lecturer_User_ID=$user_id" ); $ta_ids = array(-1); // -1 is non-existent ID while ($row = mysqli_fetch_assoc($ta_result)) { array_push($ta_ids, $row['TA']); } $ta_ids2 = implode(', ', $ta_ids); $result = mysqli_query( $con, "SELECT * FROM users_table WHERE UserType in ('TA') and User_ID in ($ta_ids2)" ); } else if ($_SESSION['user_type'] == "Admin"){ $result = mysqli_query( $con, "SELECT * FROM users_table WHERE UserType in ('Lecturer')" ); } $num_rows = 0; while ($row = mysqli_fetch_assoc($result)) { $pass = $row['Password']; $btn = ""; if ($row['Status'] == "Active") { $newstatus = "Blocked"; $btnBlock = ""; } else { $newstatus = "Active"; $btnBlock = ""; } echo ""; $num_rows += 1; } if ($num_rows == 0) { echo "

No TA

"; } ?>
ID Name Email Reset password Block/Activate
" . $row['User_ID'] . "" . $row['Full_Name'] . "" . $row['Email'] . "$btn$btnBlock

Past courses

"; } } ?>
Course name Faculty Lecturer TAs Assign a new TA
$code - $name $faculty $lecturer$ta