forked from eLearning-BS23/moodle-quizaccess_proctoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalyzesingleimage.php
32 lines (28 loc) · 994 Bytes
/
analyzesingleimage.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
require_once(__DIR__ . '/../../../../config.php');
require_once($CFG->libdir.'/filelib.php');
require_once(__DIR__ .'/lib.php');
$studentid = required_param('studentid', PARAM_INT);
$cmid = required_param('cmid', PARAM_INT);
$courseid = required_param('courseid', PARAM_INT);
$reportid = required_param('reportid', PARAM_INT);
$imgid = required_param('imgid', PARAM_INT);
$fcmethod = get_proctoring_settings("fcmethod");
$params = array(
"courseid" => $courseid,
"quizid" => $cmid,
"cmid" => $cmid,
"studentid" => $studentid,
"reportid" => $reportid
);
$redirecturl = new moodle_url('/mod/quiz/accessrule/proctoring/report.php',$params);
if($fcmethod == "AWS"){
aws_analyze_specific_image($imgid);
}
else if($fcmethod == "BS"){
bs_analyze_specific_image($imgid);
}
else{
redirect($redirecturl, "Invalid facematch method in settings. Please give 'BS' or 'AWS' as face match method", 1, \core\output\notification::NOTIFY_ERROR);
}
redirect($redirecturl);