forked from science-ation/science-ation
Erg - indeed, a fix for something I overlooked
This commit is contained in:
parent
0c6f1c3b70
commit
b955b01965
@ -22,9 +22,9 @@
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
require("common.inc.php");
|
||||
include "register_participants.inc.php";
|
||||
include "projects.inc.php";
|
||||
require_once("common.inc.php");
|
||||
require_once("register_participants.inc.php");
|
||||
require_once("projects.inc.php");
|
||||
$q = mysql_query("SELECT registrations.status AS status, registrations.id AS regid, users.id AS studentid, users.firstname FROM registrations, users " .
|
||||
"WHERE users.id = {$_SESSION['users_id']} AND users.registrations_id = registrations.id");
|
||||
|
||||
|
@ -868,13 +868,12 @@ function user_save(&$u)
|
||||
}
|
||||
if(mysql_error() != '') return "SQLERR7: " . mysql_error();
|
||||
}
|
||||
|
||||
if($u['orig']['grade'] != $u['grade'] && $u['registrations_id']){
|
||||
// their grade has changed and they're connected to a registration. Let's update
|
||||
// the registration's grade level to match if necessary
|
||||
$category = getProjectCategory($u['registrations_id']);
|
||||
if($category !== null){
|
||||
mysql_query("UPDATE projects SET projectcategories_id = $category WHERE registrations_id = $registration_id");
|
||||
mysql_query("UPDATE projects SET projectcategories_id = $category WHERE registrations_id = {$u['registrations_id']}");
|
||||
if(mysql_error() != '') return "SQLERR8: " . mysql_error();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user