forked from science-ation/science-ation
Handle > 2 students on a project. Print schools for all students in the formatted report.
This commit is contained in:
parent
81461c0601
commit
8c83a9a755
@ -194,37 +194,29 @@ if(!$scriptformat) $scriptformat="default";
|
||||
|
||||
$student_winner[$studnum] = "$studentinfo->firstname $studentinfo->lastname";
|
||||
$student_win_pronunc[$studnum] = "$studentinfo->pronunciation";
|
||||
$student_school[$studnum] = $studentinfo->school;
|
||||
$studnum++;
|
||||
|
||||
//we will assume that they are coming from the same school, so lets just grab the last students school
|
||||
//and use it.
|
||||
$school=$studentinfo->school;
|
||||
}
|
||||
|
||||
if($scriptformat=="default") {
|
||||
$rep->addText($students);
|
||||
if(trim($pronounce) != '' && $show_pronunciation == TRUE)
|
||||
$rep->addText("Pronunciation: $pronounce");
|
||||
$rep->addText(" School: $school");
|
||||
$rep->addText(" School: {$student_school[0]}");
|
||||
}
|
||||
if($scriptformat=="formatted") {
|
||||
$rep->addTextX("$pr->projectnumber",0.5);
|
||||
$rep->addTextX("$student_winner[0]",1.4);
|
||||
$rep->addTextX("$school",5.5);
|
||||
if($show_pronunciation == TRUE && $student_win_pronunc[0])
|
||||
$rep->addTextX("({$student_win_pronunc[0]})",4.0);
|
||||
if($type=="pdf")
|
||||
$rep->nextline();
|
||||
if($studnum==2) {
|
||||
$rep->addTextX("$student_winner[1]",1.4);
|
||||
if($show_pronunciation == TRUE && $student_win_pronunc[1])
|
||||
$rep->addTextX("({$student_win_pronunc[1]})",4.0);
|
||||
for($x=0; $x<$studnum; $x++) {
|
||||
$rep->addTextX($student_winner[$x],1.4);
|
||||
$rep->addTextX($student_school[$x],5.5);
|
||||
if($show_pronunciation == TRUE && $student_win_pronunc[$x])
|
||||
$rep->addTextX("({$student_win_pronunc[$x]})",4.0);
|
||||
if($type=="pdf")
|
||||
$rep->nextline();
|
||||
}
|
||||
if(($studnum==1) && ($type == "csv")) $rep->addTextX("");
|
||||
if(($studnum==1) && ($type == "csv")) $rep->addTextX("");
|
||||
$rep->addTextX("$pr->title",1.4);
|
||||
$rep->addText($pr->title,'left', 1.4);
|
||||
if($type=="pdf") $rep->nextline();
|
||||
$rep->nextline();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user