(Size);
Var:'Updated'=(Server_Date)+' at '+(Server_Time);
Define_Tag: 'Process_Data';
Local: theAry=(Named_Param: '-TheArray');
Inline: -Database='Gradebooks', -Table='Main',-KeyField='Id', -Search, -MaxRecords='all','Teacher'=$TeacherName, 'Hr'=$Hr;
//Assume a record will have to be added in next line
Local: 'AddFlag'=true;
Records;
If: ((Field:'StudentID')==(#theAry->(Get:2)));
Inline: -Database='Gradebooks', -Table='Main', -Update, -KeyField='Id', -KeyValue=(KeyField_Value), 'Mail'=#theAry->(Get:31), 'FinalExamGr'=#theAry->(Get:6), 'Term1Ave'=#theAry->(Get:9), 'Term1Gr'=#theAry->(Get:10), 'Term2Ave'=#theAry->(Get:11), 'Term2Gr'=#theAry->(Get:12), 'Term3Ave'=#theAry->(Get:13), 'Term3Gr'=#theAry->(Get:14), 'Term4Ave'=#theAry->(Get:15), 'Term4Gr'=#theAry->(Get:16), 'Semester1Gr'=#theAry->(Get:26), 'Semester2Gr'=#theAry->(Get:28), 'FinalGr'=#theAry->(Get:30), 'Updated'=$Updated;
/Inline;
// No Need to Add a new record
Local: 'AddFlag'=false;
/If;
/Records;
//No Record Found so Add one
If: (#AddFlag==true);
Inline: -Database='Gradebooks', -Table='Main', -Add, -KeyField='Id', 'Teacher'=$TeacherName, 'Student'=#theAry->(Get:1), 'StudentID'=#theAry->(Get:2), 'Hr'=$Hr, 'Mail'=#theAry->(Get:31), 'FinalExamGr'=#theAry->(Get:6), 'Term1Ave'=#theAry->(Get:9), 'Term1Gr'=#theAry->(Get:10), 'Term2Ave'=#theAry->(Get:11), 'Term2Gr'=#theAry->(Get:12), 'Term3Ave'=#theAry->(Get:13), 'Term3Gr'=#theAry->(Get:14), 'Term4Ave'=#theAry->(Get:15), 'Term4Gr'=#theAry->(Get:16), 'Semester1Gr'=#theAry->(Get:26), 'Semester2Gr'=#theAry->(Get:28), 'FinalGr'=#theAry->(Get:30), 'Updated'=$Updated;
/Inline;
/If;
/Inline;
/Define_Tag;
Inline;
Loop: $nClasses;
File_Control;
Var: 'theClass'=$ClassAry->(Get:(Loop_Count));
Var: 'Hr'=(String_Extract:$theClass, -StartPosition=5, -EndPosition=5);
If: ((File_GetLineCount:$theClass)>2);
//Now read each line of file
Var: 'Counter'=1;
While: $Counter<=(File_GetLineCount:$theClass);
Var: testLine=(File_ReadLine: $theClass,-FileLineNumber=$Counter);
//Protect against blank lines.
if: String_Length:$testLine>6;
//Output: (String_Length:$testLine) + '
', -EncodeRaw; //Debug line
Var: newAry=$testLine->(Split:'\t');
Process_Data: -TheArray=$newAry;
/if;
$Counter=++$Counter;
/While;
/If;
/File_Control;
/Loop;
/Inline;
?>
You have successfully updated your gradebook!!
Click here to return to the Administration Page.
| Questions? Comments?? Web Master |
[Date_Format:(File_ModDate:(Response_FilePath)), -DateFormat='Revised on: %A %B %d, %Y at %T'] |
|
![]() |