<?php 

function class_timetable_cb() {
	global $app;
	$user_meta = $app->user_meta;
	$user = new user;
	$post = new post;
	if($user_meta['role'] == 'student') {
		do_action('class_timetable', ['class' => $user_meta['class'], 'category' => $user_meta['category']]);
		return;
	}
	do_action("class_category_filter");
	if(!isset($_POST['class'])) return;
	
	do_action('class_timetable', ['class' => $_POST['class'], 'category' => $_POST['category']]);
}