forked from science-ation/science-ation
Add support to omit unawarded awards and prizes from the awards ceremony script. Resolves RFE 136.
-Note: currently adds two configuration variables and a new category, they didn't seem to fit elsewhere.
This commit is contained in:
parent
4043df2e66
commit
30072d182d
@ -56,14 +56,6 @@
|
||||
{
|
||||
while($r=mysql_fetch_object($q))
|
||||
{
|
||||
$rep->heading("$r->name ($r->type)");
|
||||
if($r->type!="Divisional")
|
||||
$rep->addText(i18n("Sponsored by: %1",array($r->organization)));
|
||||
if($r->presenter)
|
||||
$rep->addText(i18n("Presented by: %1",array($r->presenter)));
|
||||
if($r->description)
|
||||
$rep->addText(i18n("Description: %1",array($r->description)));
|
||||
|
||||
$pq=mysql_query("SELECT
|
||||
award_prizes.prize,
|
||||
award_prizes.number,
|
||||
@ -85,8 +77,36 @@
|
||||
ORDER BY
|
||||
`order`");
|
||||
echo mysql_error();
|
||||
|
||||
if($config['reports_show_unawarded_awards']==no)
|
||||
{
|
||||
$skipAward=true;
|
||||
while($pr=mysql_fetch_object($pq))
|
||||
{
|
||||
if($pr->projectnumber)
|
||||
{
|
||||
$skipAward=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if($skipAward)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
mysql_data_seek($pq, 0);
|
||||
}
|
||||
$rep->heading("$r->name ($r->type)");
|
||||
if($r->type!="Divisional")
|
||||
$rep->addText(i18n("Sponsored by: %1",array($r->organization)));
|
||||
if($r->presenter)
|
||||
$rep->addText(i18n("Presented by: %1",array($r->presenter)));
|
||||
if($r->description)
|
||||
$rep->addText(i18n("Description: %1",array($r->description)));
|
||||
|
||||
$prevprizeid=-1;
|
||||
while($pr=mysql_fetch_object($pq))
|
||||
{
|
||||
if($pr->projectnumber || $config['reports_show_unawarded_prizes']==yes)
|
||||
{
|
||||
if($prevprizeid!=$pr->id)
|
||||
{
|
||||
@ -145,6 +165,7 @@
|
||||
$rep->addText(" Prize not awarded");
|
||||
}
|
||||
}
|
||||
}
|
||||
$rep->nextLine();
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
81
|
||||
82
|
||||
|
1
db/db.update.82.sql
Normal file
1
db/db.update.82.sql
Normal file
@ -0,0 +1 @@
|
||||
INSERT INTO `config` ( `var` , `val` , `category` , `type` , `ord` , `description` , `year`) VALUES ( 'reports_show_unawarded_awards', 'yes', 'Reports', 'yesno', 100, 'Display awards that were not awarded in the Award Ceremony script.', -1), ('reports_show_unawarded_prizes', 'yes', 'Reports', 'yesno', 200, 'Display prizes that were not awarded in the Award Ceremony script.', -1);
|
Loading…
x
Reference in New Issue
Block a user