Mass Exam Marker Plugin
A Moodle plugin to help mark massive exams.
 All Data Structures Namespaces Files Functions Variables
search.php File Reference

Namespaces

 local
 

Functions

 display_search ($js)
 

Variables

global $PAGE
 
global $CFG
 
global $DB
 
 $bid = intval($_GET['booklet_id'])
 
 $page = intval($_GET['page'])
 
 $datstudents = array()
 
 $enrolled = enrol_get_users_courses($USER->id, true,'*', 'visible DESC, sortorder ASC')
 
foreach($enrolled as $course) $searchable_students
 
 $img
 

Function Documentation

display_search (   $js)

Display search method prints everything on screen to actually display everything, and links the Javascript file.

Variable Documentation

$bid = intval($_GET['booklet_id'])
global $CFG
$datstudents = array()
global $DB
$enrolled = enrol_get_users_courses($USER->id, true,'*', 'visible DESC, sortorder ASC')

Retrieve Teacher's courses. Note: enrolled, with no role. this is too generic, later make this so it retrieves only where user has teacher+ privilige.

$img
Initial value:
= $DB->get_record_sql('SELECT pdf_file_id, pdf_file
FROM {mem_booklet_data}, {mem_pdf_files}
WHERE {mem_booklet_data}.booklet_id=?
AND {mem_pdf_files}.page_num=0
AND {mem_pdf_files}.booklet_id={mem_booklet_data}.booklet_id', array($bid))
global $DB
Definition: search.php:27
$bid
Definition: search.php:38
global $PAGE
$page = intval($_GET['page'])
foreach ($enrolled as $course) $searchable_students
Initial value:
= '<script>var data = '.json_encode($datstudents).';
var bid = '.$bid.';
var page = '.$page.';
window.onload = init(data, bid, page);
</script>'
$datstudents
Definition: search.php:41
$page
Definition: search.php:39
$bid
Definition: search.php:38

Retrieves each student enrolled in the list of all courses the teacher is enrolled in.