OTAS Reports
Introduction
Reports provide a concise overview of system statistics in a structured format, utilizing charts, tables, and custom widgets for a rapid assessment of academic progress either annually or across all years. All reports share a common user interface (UI) and backend codebase for consistency and ease of use.
These reports are housed within a custom plugin named Otas.Reports
, located at plugins/otas/reports
. Each report's UI comprises filters, widget counters (such as Students, Applications, Paid, etc.), a bar chart, and a table for a comprehensive view of the data.
Technical Overview
Each report has it's own class but they all extends a parent abstract class with the name Reporter
and it has the common logic across various types, of calculating apps and students and countries, the prototype of the class is:
interface ReportInterface{ /** * Prepare and get valid report query */ public function query(); /** * Return reporter data * */ public function get();}
abstract class Reporter implements ReportInterface{ public $request; /** * Number of records per page */ public $pagination; /** * Current pagination page */ public $page; public $defaultOrder = "newlyPaid"; public $orderBy; public $orderDir; public function __construct() { $this->request = request(); $column = isset($this->request->order[0]) ? $this->request->order[0]["column"] : ""; $this->orderBy = isset($this->request->columns[$column]) ? $this->request->columns[$column]['data'] : $this->defaultOrder; $this->orderDir = isset($this->request->order[0]) ? $this->request->order[0]['dir'] : ""; $this->pagination = $this->request->get('length', 10); $this->page = $this->request->get('start', 0); } public function mostCreatorTransform($employee) { return collect([ 'id' => $employee->id, 'name' => $employee->name, "studentsCount" => $employee->studentsCount, "studentsCountRaw" => number_format($employee->studentsCount), ]); } public function mostConversionTransform($employee) { return collect([ 'id' => $employee->id, 'name' => $employee->name, "newlyPaid" => $employee->newlyPaid, "newlyPaidRaw" => number_format($employee->newlyPaid), "selfPaidPercentage" => percentage($employee->newlyPaid, $employee->studentsCount) . "%", ]); } public function mostFastestTransform($employee) { return collect([ 'id' => $employee->id, 'name' => $employee->name, "avgDuration" => $employee->paymentAverageTime ? formatDuration($employee->paymentAverageTime) : __("N/A"), ]); } public function chartTransform($employee, $paid_apps) { return collect([ 'id' => $employee->id, 'name' => $employee->name, 'organization' => $employee->organization, "studentsCount" => $employee->studentsCount, "applicationsCount" => $employee->applicationsTotal, "newlyPaid" => $employee->newlyPaid, "selfPaidPercentageRaw" => percentage($employee->newlyPaid, $employee->studentsCount), "paidPercentageRaw" => percentage($employee->newlyPaid, $paid_apps), "avgDurationInMinutes" => $employee->paymentAverageTime ? round($employee->paymentAverageTime / 60, 2) : 0, "appsPerStudent" => $employee->studentsCount ? round($employee->applicationsTotal / $employee->studentsCount, 2) : __("N/A"), ]); } }
Shared Views
Within the reports functionality, there are several shared partials that can be found at plugins/otas/reports/components/partials
. These common partials include:
- chart.htm: This file contains the chart component utilized across the reports pages to visually represent data.
- factsheet.htm: The fact sheet details key reports such as the program with the most student additions, the highest number of paid students, top conversion rates, and the fastest payments by students.
- filters.htm: This holds the filters form, which is consistent across all reports, facilitating uniform criteria for data filtering.
- cls-filters.htm & cls-factsheet.htm: These are specific to CL1 and CL2 performance reports, offering tailored filters and factsheets to address the unique requirements of these evaluations.
Reports Type
The reports module features a variety of report types, which are differentiated based on the application creator type and the source of the application. This categorization allows for tailored analytics and insights, enabling users to understand application trends, performance, and outcomes from specific creator segments or application origins.
Overall Performance Teams Performance Agents Performance Site Performance Cl1 Performance Cl2 Performance
Overall Performance
This report provides insights into the performance across all applications in the system, filtered based on specified criteria. It allows for a comprehensive analysis of application trends and outcomes.
Teams Performance
Focuses on applications created by company employees. It includes applications originating from the system (where the source is unspecified) and excludes those created by users in the agent (group id = 5) or sub-agent (group id = 20) groups, highlighting the contributions of internal staff.
Agents Performance
Targets applications submitted by agents, specifically including those by users belonging to the main agent group (id 5) or the sub-agent group (id 20), offering a view into agent-driven application activities.
Site Performance
Analyzes applications generated through the company's website, specifically those marked with the source oktamama.com
. This report sheds light on the direct engagement and conversion through the corporate site.
CL1 Performance
Dedicated to Consultant Level 1 (CL1) users, this report tallies applications managed by CL1 consultants, leveraging the cl1
column in the applications table to identify and summarize their workload.
CL2 Performance
Similar to the CL1 report but for Consultant Level 2 (CL2) users, focusing on the applications they oversee. This report utilizes the cl2
column to track and evaluate the performance of CL2 consultants.
Each report segment provides targeted insights, enabling detailed performance analysis across different dimensions of the application process.