if (isset($_POST['day1']) && isset($_POST['day2'])) { new_section($_POST['crn'], $_SESSION['dept'], $_SESSION['course'], $_POST['addingsection'], $_SESSION['year'], $_SESSION['season'], $_POST['day'], $_POST['lecturestart'], $_POST['lectureend'], $_POST['day1'], $_POST['discstart'], $_POST['discend'], $_POST['day2'], $_POST['labstart'], $_POST['labend']); } else { if (isset($_POST['day1'])) { new_section($_POST['crn'], $_SESSION['dept'], $_SESSION['course'], $_POST['addingsection'], $_SESSION['year'], $_SESSION['season'], $_POST['day'], $_POST['lecturestart'], $_POST['lectureend'], $_POST['day1'], $_POST['discstart'], $_POST['discend']); } else { if (isset($_POST['day2'])) { new_section($_POST['crn'], $_SESSION['dept'], $_SESSION['course'], $_POST['addingsection'], $_SESSION['year'], $_SESSION['season'], $_POST['day'], $_POST['lecturestart'], $_POST['lectureend'], $_POST['day2'], $_POST['labstart'], $_POST['labend']); } else { //just lecture new_section($_POST['crn'], $_SESSION['dept'], $_SESSION['course'], $_POST['addingsection'], $_SESSION['year'], $_SESSION['season'], $_POST['day'], $_POST['lecturestart'], $_POST['lectureend']); } } } } staffheader($_SESSION['name'], "mansection.php", $_SESSION['year'], $_SESSION['season_name'], $_SESSION['season']); ?> <br><br><br> <p style="text-align:center"> <fieldset class="scheduler-border" style="border-color:#3BA4C7; width: 80%; text-align: center; margin-left: 10%; margin-right: 10%"> <legend><b>Section Management:</b></legend> <input type="button" onClick="parent.location='mancourse.php'" value="Back to Courses"> <p>This page can be used to manage the sections offered for <b> <?php print $_SESSION['dept'] . ' ' . $_SESSION['course']; ?> .</b></p> <table class="gridtable"> <thead>
session_regenerate_id(true); session_write_close(); header("Location:quarterstaff.php"); } if (isset($_POST['new'])) { //new custom event $_SESSION['error'] = custom_section($_POST['tacal'], '', '', $_POST['name'], $_SESSION['year'], $_SESSION['season'], $_POST['day'], $_POST['eventstart'], $_POST['eventend']); $_GET['tacal'] = $_POST['tacal']; } //new custom event if (isset($_POST['r'])) { $_GET['tacal'] = $_POST['tacal']; drop_section($_POST['drop'], '', '', $_SESSION['year'], $_SESSION['season'], $_POST['tacal']); } //remove custom event staffheader($_SESSION['name'], "tacal.php", $_SESSION['year'], $_SESSION['season_name'], $_SESSION['season']); ?> <link rel="stylesheet" type="text/css" href="css/calendar.css"> <!--start main container --> <div style="margin-top:10px;" id="error-message"> <?php print $_SESSION['error']; unset($_SESSION['error']); ?> </div> <fieldset style="background-color:white;"> <legend><p2 class="shadow40">Select TA : <select id="tacal" name="tacal" onchange="redirectMe(this);"> <?php populate_tas($_SESSION['year'], $_SESSION['season'], $_SESSION['dept'], $_GET['tacal']);
} if (isset($_GET['course'])) { $_SESSION['course'] = $_GET['course']; } else { unset($_SESSION['course']); } if (isset($_GET['section'])) { $_SESSION['section'] = $_GET['section']; } else { unset($_SESSION['section']); } if (!isset($_SESSION['pref'])) { $status = scip_input($_SESSION['year'], $_SESSION['season'], $_SESSION['dept'], $_SESSION['season_name']); $_SESSION['pref'] = 'created'; } staffheader($_SESSION['name'], "noresponse.php", $_SESSION['year'], $_SESSION['season_name'], $_SESSION['season']); ?> <br><br> <center><b>The following TAs have not yet ranked their preferences:</b></center> <?php //noresponse returns an array of TA names who didn't fill out the forms this quarter. $tas = noresponse($_SESSION['dept'], $_SESSION['year'], $_SESSION['season']); print '<table class="stafftable" border="1"><tbody>'; foreach ($tas as $t) { if ($t != "") { print '<tr><td>' . $t . '</td></tr>'; } //don't print out blanks } //print out each TA print '</tbody></table>';
} unset($_SESSION['course']); unset($_SESSION['section']); } if (isset($_POST['mremove'])) { $l = explode("|", $_POST['tamatch']); //remove this record from the db. drop_match($l[0], $l[1], $l[2], $_SESSION['dept'], $_SESSION['year'], $_SESSION['season']); } if (isset($_GET['course'])) { $_SESSION['course'] = $_GET['course']; } if (isset($_GET['section'])) { $_SESSION['section'] = $_GET['section']; } staffheader($_SESSION['name'], "conflicts.php", $_SESSION['year'], $_SESSION['season_name'], $_SESSION['season']); ?> <div style="width: 100%;"> <!-- FULL DOC--> <h5 style="margin-left:25%; margin-right:25%">If you would like to add in constraints of your own, the tools below will allow you to either force a TA to teach a course or add conflicts between TAs and professors:</h5> <?php if (isset($status)) { print '<div id="' . $status[0] . '" style="float:right;margin-right:12%;">' . $status[1] . '</div>'; } ?> <div style="float:left;clear:left; width: 49%;"> <!--LEFT SIDE--> <h3 style="text-align:center"> Add Conflicts between Professors and TAs </h3>
set_course('deleted', $_POST['course'], $_SESSION['dept']); } if (isset($_POST['add'])) { //set this course to 'added' set_course('added', $_POST['course'], $_SESSION['dept']); } if (isset($_POST['modify'])) { //change units, weight of this course mod_course($_POST['weight'], $_POST['units'], $_POST['course'], $_SESSION['dept']); force_checks($_SESSION['dept'], $_SESSION['year'], $_SESSION['season']); } if (isset($_POST['newcourse'])) { //add this course add_course($_POST['course'], $_SESSION['dept']); } staffheader($_SESSION['name'], "mancourse.php", $_SESSION['year'], $_SESSION['season_name'], $_SESSION['season']); ?> <p style="text-align:center;"> <fieldset class="scheduler-border" style="border-color:#3BA4C7"> <legend class="scheduler-border"><b>Course & Section Management:</b></legend> <p>This page can be used to manage the courses and sections offered this quarter.</p> </p> <form action="mancourse.php" method="post"> <input name="course" type="text"/> <input type="submit" value="Add Course" name="newcourse"/> </form> <?php course_table($_SESSION['dept'], $_SESSION['year'], $_SESSION['season']); ?>
require 'functions.php'; session_start(); if (!isset($_SESSION['name'])) { session_regenerate_id(true); session_write_close(); header("Location:loginstaff.php"); } if (isset($_POST['password'])) { //check that passwords match. if ($_POST['p1'] != $_POST['p2']) { $status = array("error-message", "Passwords do not match."); } else { $status = update_password($_SESSION['name'], $_POST['p1'], "staff"); } } staffheader($_SESSION['name'], "passwordstaff.php", $_SESSION['year'], $_SESSION['season_name'], $_SESSION['season']); ?> <h3> <center> Change your password below </center></h3> <br> <fieldset style="margin-right:25%%; margin-left: 25%"> <legend>Change Your Password </legend> <div> <form action="passwordstaff.php" method="post"> <label class="selections" for="p1">Your New Password:</label> <input class="input" type="password" name="p1" id="p1" /> <br> <label class="selections" for="p2">Confirm Your New Password:</label> <input class="input" type="password" name="p2" id="p2" />
} if (isset($_GET['course'])) { $_SESSION['course'] = $_GET['course']; } else { unset($_SESSION['course']); } if (isset($_GET['section'])) { $_SESSION['section'] = $_GET['section']; } else { unset($_SESSION['section']); } if (!isset($_SESSION['pref'])) { $status = scip_input($_SESSION['year'], $_SESSION['season'], $_SESSION['dept'], $_SESSION['season_name']); $_SESSION['pref'] = 'created'; } staffheader($_SESSION['name'], "coursepref.php", $_SESSION['year'], $_SESSION['season_name'], $_SESSION['season']); ?> <br><br> <form> <fieldset> <p> Select a section below to view TA preferences for that section. The TAs will be ranked in order of preference for that section, with the TA that wants it most at the top. <b><font color="green">GREEN</font></b> TAs like this section, <b><font color = "gold">YELLOW</font></b> TAs are neutral, and <b><font color = "red">RED</font></b> TAs dislike the section. </p> </fieldset> </form> <label class="selections" for="course"><p2 class="shadow40" style="margin-left:65%"><b>Course:</b></p2></label> <select id="course" name="course" class="selection_drops" onchange="redirectMe(this);"> <?php populate_courses($_SESSION['dept'], "http://tamatch.math.ucdavis.edu/MathWeb/coursepref.php"); ?>
} if (!isset($_SESSION['name'])) { session_regenerate_id(true); session_write_close(); header("Location:loginstaff.php"); } if (!isset($_SESSION['year'])) { session_regenerate_id(true); session_write_close(); header("Location:quarterstaff.php"); } $filename = 'xls/' . $_SESSION['season_name'] . '_' . $_SESSION['year'] . '_' . $_SESSION['dept'] . 'final.xls'; if (!isset($_POST['a1']) && !isset($_POST['a2'])) { write_excel2($_SESSION['year'], $_SESSION['season'], $_SESSION['dept'], $_SESSION['season_name']); } staffheader($_SESSION['name'], "results.php", $_SESSION['year'], $_SESSION['season_name']); ?> <h3> <center> View the Results or Download a Hard Copy Below </center></h3> <!-- Let this button download VictorStylefinal.xls to the user. --> <form action="results.php" method="post"> <div id="resultset"> <input type="button" name="download" id ="download" value="Download TA Assignment Sheet (.xls)" onClick="window.location.href='<?php print $filename; ?> '"> <input type="submit" name="a1" id ="a1" value="View Assignment #1"> <input type="submit" name="a2" id ="a2" value="View Assignment #2"> </div>
<?php require 'values.php'; require 'functions.php'; session_start(); if (!isset($_SESSION['name'])) { session_regenerate_id(true); session_write_close(); header("Location:quarterstaff.php"); } if (!isset($_POST['submit'])) { staffheader($_SESSION['name'], "quarterstaff.php", $_SESSION['year'], $_SESSION['season_name'], $_SESSION['season']); ?> <h3> <center> Please select the quarter </center></h3> <form name="quarter_form" id="quarter_form" action="quarterstaff.php" method="post" style="margin-left: 50px"> <p style="margin-left:20px"> Select a quarter: <select name="quarter" id="quarter"> <?php populate_quarters(); ?> </select> </p> <input class="button blue" style="padding: 5px; font-size:small; float:right" type="submit" name="submit" id="submit" value="Submit"/> </form> <?php } else { $quarter = explode("|", $_POST['quarter']); $_SESSION['year'] = $quarter[0]; $_SESSION['season'] = $quarter[1]; $_SESSION['season_name'] = $quarter[2]; session_regenerate_id(true); session_write_close(); header("Location:ta.php");