<?php
/**
 * Basic per-class reports (Free).
 *
 * @package TradeSchoolManager
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class TSM_Reports {

	public static function class_summary( $class_id ) {
		$students = TSM_Classes::students_in_class( $class_id );
		$rows     = array();
		foreach ( $students as $s ) {
			$rows[] = array(
				'student' => $s,
				'grade'   => TSM_Gradebook::calc_class_grade( $class_id, $s->id ),
			);
		}
		return $rows;
	}
}
