forked from science-ation/science-ation
revert 2052. It was causing the AC script to show all award that the selected categories were ELIGIBLE for, rather than all awards won by a selected category. This causes an award available to a junior and senior to appear in both scripts regardless of who won it, rather than only in the script of the project category that won the award.
This commit is contained in:
parent
bb1823b2db
commit
4d67f395f3
@ -24,7 +24,11 @@
|
|||||||
if(is_array($_GET['show_category'])) {
|
if(is_array($_GET['show_category'])) {
|
||||||
$show_category = array();
|
$show_category = array();
|
||||||
foreach($_GET['show_category'] as $id=>$val) {
|
foreach($_GET['show_category'] as $id=>$val) {
|
||||||
$show_category[] = "award_awards_projectcategories.projectcategories_id='$id'";
|
$show_category[] = "projects.projectcategories_id='$id'";
|
||||||
|
}
|
||||||
|
if($show_unawarded_prizes=="yes")
|
||||||
|
{
|
||||||
|
$show_category[] = "projects.projectcategories_id IS NULL";
|
||||||
}
|
}
|
||||||
$and_categories = join(' OR ', $show_category);
|
$and_categories = join(' OR ', $show_category);
|
||||||
} else {
|
} else {
|
||||||
@ -64,18 +68,14 @@ if(!$scriptformat) $scriptformat="default";
|
|||||||
FROM
|
FROM
|
||||||
award_awards,
|
award_awards,
|
||||||
award_types,
|
award_types,
|
||||||
sponsors,
|
sponsors
|
||||||
award_awards_projectcategories
|
|
||||||
WHERE
|
WHERE
|
||||||
award_awards.year='$foryear'
|
award_awards.year='$foryear'
|
||||||
AND award_types.year='$foryear'
|
AND award_types.year='$foryear'
|
||||||
AND award_awards.award_types_id=award_types.id
|
AND award_awards.award_types_id=award_types.id
|
||||||
AND award_awards.sponsors_id=sponsors.id
|
AND award_awards.sponsors_id=sponsors.id
|
||||||
AND award_awards.id=award_awards_projectcategories.award_awards_id
|
|
||||||
AND award_awards.excludefromac='0'
|
AND award_awards.excludefromac='0'
|
||||||
AND ($and_categories)
|
|
||||||
$awardtype
|
$awardtype
|
||||||
GROUP BY award_awards.id
|
|
||||||
ORDER BY awards_order");
|
ORDER BY awards_order");
|
||||||
|
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
@ -107,6 +107,7 @@ if(!$scriptformat) $scriptformat="default";
|
|||||||
award_awards_id='{$r->id}'
|
award_awards_id='{$r->id}'
|
||||||
AND award_prizes.year='$foryear'
|
AND award_prizes.year='$foryear'
|
||||||
AND award_prizes.excludefromac='0'
|
AND award_prizes.excludefromac='0'
|
||||||
|
AND ($and_categories)
|
||||||
ORDER BY
|
ORDER BY
|
||||||
`order`,
|
`order`,
|
||||||
projects.projectnumber");
|
projects.projectnumber");
|
||||||
|
Loading…
Reference in New Issue
Block a user