Difference between revisions of "OUTPUT.XML"

From PARS
Jump to navigationJump to search
Line 1: Line 1:
[[Image:Xslt.jpg|thumb|Using XSLT and XML to generate a [[slip designer|Student review]].]]
+
{{permissions|Reviews|Access student reviews|Add and modify student review designs|Allow users to add edit and delete review periods}}
 
This file is generated by PARS every time a [[slip designer|Student review]] is run. It contains all of the grading, behaviour and attendance data for a student (even data not visible on the review) as well as a number of other useful pieces of information. <br> <br>
 
This file is generated by PARS every time a [[slip designer|Student review]] is run. It contains all of the grading, behaviour and attendance data for a student (even data not visible on the review) as well as a number of other useful pieces of information. <br> <br>
  

Revision as of 13:21, 7 July 2016

Lock.gif| Permissions required
to access this module:
Section:
Reviews
Permission(s):
Access student reviews
Add and modify student review designs
Allow users to add edit and delete review periods

This file is generated by PARS every time a Student review is run. It contains all of the grading, behaviour and attendance data for a student (even data not visible on the review) as well as a number of other useful pieces of information.

How to generate an OUTPUT.XML file

Import the Default Slip

To generate an OUTPUT.XML file go to:
PARS main menu > Grading > Configure > Review designer

If there is no existing design called "Default slip", click the Add button at the top left of the page. Name the new design "Default slip" and copy the following text into PARS:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:my="http://whatever" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" >
	<xsl:template match="/" >
<html>
	<head>
	
<link rel="stylesheet" type="text/css" href="" />
<script type="text/javascript" src="" />
		<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8"/>
		<title>all grades</title>			
		<style type="text/css">
body {font-family:calibri}

table
{
    border-collapse: collapse;
}
.studName{font-size:25pt; font-weight:bold;text-align:center;}
		</style>		
	</head>				
		<body bgcolor="white" TOPMARGIN="0"  onload="" >			
			<center>
				<xsl:apply-templates select="//STUDENT" >					
					<xsl:sort select="surname" order="ascending"/>					
				</xsl:apply-templates>	
			</center>
		</body>				
</html>		
	</xsl:template>
<xsl:template match="//STUDENT" >
<table class="oneStud" border="1" frame= "box" cellpadding="3" width="100%">
	<tr><td class="studName" colspan="8"><xsl:value-of select="forename"/> <xsl:value-of select="surname"/> (<xsl:value-of select="reg_group"/>)</td></tr>
	<tr><td>Subject</td><td>Class</td><td>ElementID</td><td>Description</td><td>CODE</td><td>Date</td><td>Ev_inst_id</td><td>SCHEME1</td><td>ACTUALMARK</td><td>COMMENTTEXT</td><td>SIMS Details</td></tr>	
	<xsl:apply-templates select="SUBJECTS" >				 
		<xsl:sort select="SUBJECTDESC" order="ascending"/>				
	</xsl:apply-templates>
</table>
<br/><br/>
	<br style="page-break-after: always"/>
</xsl:template>
	<xsl:template match="SUBJECTS" >
	<xsl:for-each select="CLASSES/GRADEISSUE">
		<tr>
			<td><xsl:value-of select="../../SUBJECTDESC"/></td>
			<td>
				<xsl:if test="../CLASSDESC=''">(Subject)</xsl:if>
				<xsl:value-of select="../CLASSDESC"/>
			</td>
			<td>				
				<xsl:value-of select="ELEMENTID"/>
			</td>
			<td>				
				<xsl:value-of select="DESCRIPTION"/>
			</td>
			<td>				
				<xsl:value-of select="CODE"/>
			</td>
			<td>				
				<xsl:value-of select="DATE"/>
			</td>
			<td>				
				<xsl:value-of select="EV_INST_ID"/>
			</td>
			<td>				
				<xsl:value-of select="SCHEME1"/>
			</td>
			<td>				
				<xsl:value-of select="ACTUALMARK"/>
			</td>
                        <td>				
				<xsl:value-of select="COMMENTTEXT"/>
			</td>			
			<td>				
				<xsl:value-of select="SIMSDETAIL"/>
			</td>			
		</tr>
		<xsl:if test="COMMENTTEXT!=''">
			<tr>
				<td colspan="8">COMMENTTEXT:<br/><br/>	<xsl:value-of select="COMMENTTEXT"/></td>
			</tr>
		</xsl:if>
	</xsl:for-each>
	</xsl:template>	
</xsl:stylesheet>

Create a Review Period

Next go to:
PARS main menu > Grading > Review periods

Use the Add button at the top of the page to create a new review period. The review period will need a title and the date range should cover the academic year. Click the ellipsis button next to a year group to open a new window. In the drop down at the top of the window, select the Default Slip design, then click OK. Repeat this for each year group.

On the Review Periods page, select the review period you have created then click the XML button on the top toolbar. Select the students for whom you wish to generate an OUTPUT.XML and the file will be downloaded to your computer.

Additional info

Student review designs use XSLT to layout the data in the OUTPUT.XML file, converting it to PDF or HTML in the final printable copy.

There are various free pieces of software that make it easier to work with XML and XSLT:
XMLfox rearranges the XML into a grid view and makes it easy to navigate through large files.
Notepad++ is a useful program for editing code and has settings for a wide range of different languages.