Custom Reports

Custom Reports

EduBrite provides some detailed reports and analytics. These are accessed from the menu Site Admin -> Reports. These reports are divided into three categories Site Reports, Course Reports and Program Reports. However not all reporting requirements for every user can be met using any standard reports. EduBrite therefore provides necessary data objects which allows the site administrators to create custom reports. Some amount of HTML and programming experience is necessary to create and configure any custom report. Such custom reports can be created using either Javascript or Velocity template engine. Here we show an example of how to create a completely custom report for the result of a test taken by a user. The report script is in Velocity template engine.


Report Script

The script is a pure HTML code with embedded Velocity scripts to populate the actual data. The velocity script code fetches run time data from data objects which are made available by EduBrite platform.

<table width="100%">
        <tr align="center">
            <td colspan="2"><b>${testInstance.getTest().getName()} Report</b>
            <td><b>Exam Date:</b> $DateFormatter.getFormattedDate($testInstance.getStartedOn(), "dd/MM/yyyy")</td>
            <td><b>Time Duration:</b> #set ($minute = ${testInstance.getTest().getDuration()}/1000/60)${minute} min
            <td><b>Candidate Name:</b> ${testInstance.getStudent().getFullNameString()} (${testInstance.getStudent().getNonPrefixedUserName()})</td>
            <td colspan="2"><b>Module Name:</b> ${testInstance.getTest().getMdWidget().getSelectedSubjectsAsString()}</td>
<table width="100%" class="grid" border="1">
            <td><b>Total Questions</b></td>
            <td><b>Total Points</b></td>
            <td><b>Passing Points</b></td>
            <td><b>Negative Points</b></td>
            <td><b>Points Obtained</b></td>
            <td><b>% Score</b></td>
                #set ($percentTotal = ${testInstance.getTotalScore()} * 100 / ${testInstance.getTest().getTotalMarks()})
                #set ($percent = $Utility.formatFloat($percentTotal, 2, 2))
            <td>#if (${testInstance.isResult()} == true)
                #elseif (${testInstance.isResult()} == false)                                         
                #if ($percent > 70)                                         
                #elseif ($percent > 60)                                         
                #elseif ($percent > 50)                                         
                #elseif ($percent > 40)                                         
<br/>Grading system is as follows:<br/>
>70% = A+ <br/>
>60%-70% = A<br/>
>50%-60% = B<br/>
>40%-50% = C<br/>
<40% = Fail
<p>This is a computer generated report, does not require any signature</p>
#if (!$UIContext.isInner())
<p><input type="button" onClick="printReport()" value="Print" /></p>
function printReport(){

===== PDFStyles =====


Setting up the Report

Go to the CMS browser (Site Admin -> CMS) . Create new "Report Template". Give any suitable title and paste the above code inside this Report Template. Save and publish. Now go back to the CMS browser and click on the report template that has just been created. Note the browser URL. It would be something like


Note the value for the parameter id. It would be report template id. Now go to Site Admin -> Site Details -> Customizations and specify CUSTOM_TEST_INSTANCE_REPORT_TEMPLATE=<Template Id>


Accessing the Report

Create a test and allow any user to take the test. Open the result page for the test taken by the user. The result page can be opened by the user himself/herself through the menu item My Items -> Test History. The administrator can access it by using Test -> View Tests and clicking on the Attempts link.


Click the "Detailed Report" link to access the custom report that we created.