<?php 

function print_results_cb() {
	add_page_stylesheet("contents/plugins/eedu_portal/css/broadsheet.css", "eedu_broadsheetCss");
	add_page_stylesheet("contents/plugins/eedu_portal/css/result.css", "eedu_resultCss");
	global $app;
	if($app->user_meta['role'] !== 'student') {
		do_action("display_qf_search_box", [
		  	'default' => ['status' => "unlocked"],
		    'id' => "eedu_portal_print_results",
		    'query_function' => 'eedu_portal_print_results',
		    'settings' => ['autoload' => true, 'limit' => 20, 'callback' => 'initDataTableKoweb', 'callbackid' => '#results-table table', 'autostart' => false]
		]);
	} else {
		do_action("display_qf_search_box", [
		  	'default' => ['student_id' => $app->user_meta['id']],
		    'id' => "eedu_portal_print_student_results",
		    'query_function' => 'eedu_portal_print_student_results',
		    'settings' => ['autoload' => true, 'limit' => 100, 'callback' => 'initDataTableKoweb', 'callbackid' => '#results-table table', 'autostart' => true]
		]);
	}
	
}