forked from science-ation/science-ation
update scripts for 2007, also append the language to the end of the project title, so its easier to tell if a language is english of french
This commit is contained in:
parent
83691b07b8
commit
5c9920cfab
@ -117,18 +117,18 @@ for($x=0;$x<$numjudges;$x++)
|
|||||||
for($a=1;$a<=3;$a++)
|
for($a=1;$a<=3;$a++)
|
||||||
{
|
{
|
||||||
$catrank=rand(-2,2);
|
$catrank=rand(-2,2);
|
||||||
mysql_query("INSERT INTO judges_catpref (judges_id,projectcategories_id,rank,year) VALUES ('$id','$a','$catrank','2006')");
|
mysql_query("INSERT INTO judges_catpref (judges_id,projectcategories_id,rank,year) VALUES ('$id','$a','$catrank','2007')");
|
||||||
}
|
}
|
||||||
|
|
||||||
//expertise is ranked 1-5
|
//expertise is ranked 1-5
|
||||||
for($a=1;$a<=6;$a++)
|
for($a=1;$a<=6;$a++)
|
||||||
{
|
{
|
||||||
$divrank=rand(1,5);
|
$divrank=rand(1,5);
|
||||||
mysql_query("INSERT INTO judges_expertise (judges_id,projectdivisions_id,val,year) VALUES ('$id','$a','$divrank','2006')");
|
mysql_query("INSERT INTO judges_expertise (judges_id,projectdivisions_id,val,year) VALUES ('$id','$a','$divrank','2007')");
|
||||||
}
|
}
|
||||||
|
|
||||||
//and add the record to the judges_years table so they will be 'active' for this year
|
//and add the record to the judges_years table so they will be 'active' for this year
|
||||||
mysql_query("INSERT INTO judges_years (judges_id,year) VALUES ('$id','2006')");
|
mysql_query("INSERT INTO judges_years (judges_id,year) VALUES ('$id','2007')");
|
||||||
|
|
||||||
//60% chance they only speak english
|
//60% chance they only speak english
|
||||||
//20% chance they only speak french
|
//20% chance they only speak french
|
||||||
|
@ -101,7 +101,7 @@ for($x=0;$x<$numprojects;$x++)
|
|||||||
if($langnum<4) $lang="fr"; else $lang="en";
|
if($langnum<4) $lang="fr"; else $lang="en";
|
||||||
|
|
||||||
|
|
||||||
mysql_query("INSERT INTO projects (registrations_id,projectcategories_id,projectdivisions_id,title,year,req_electricity,req_table,language) VALUES ('$id','$cat','$div','$title',2007,'$req_e','$req_t','$lang')");
|
mysql_query("INSERT INTO projects (registrations_id,projectcategories_id,projectdivisions_id,title,year,req_electricity,req_table,language) VALUES ('$id','$cat','$div','$title $lang',2007,'$req_e','$req_t','$lang')");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user