-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgpitsservice.php
More file actions
33 lines (27 loc) · 803 Bytes
/
gpitsservice.php
File metadata and controls
33 lines (27 loc) · 803 Bytes
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
33
<?php
include_once("gpits_core.php");
include_once("XmlDriver.php");
include_once("MoodleToolsDomainKnowledge.php");
include_once("mits.php");
include_once("StringUtils.php");
function getResponse($msg, $user) {
$tutor = new MITSTutor();
return $tutor->attendRequest($msg, $user);
}
function getRecommendation($user) {
$tutor = new MITSTutor();
return $tutor->decideFedBack($user);
}
$msg = $_REQUEST["msg"];
$user = ($_REQUEST["user"])?$_REQUEST["user"]:'1';
$r = ($_REQUEST["r"])?$_REQUEST["r"]:'0';
if($r != '0') {
//echo "Recommending <br />";
echo getRecommendation($user);
} else {
//echo "Responding to $msg <br />";
echo getResponse($msg, $user);
}
//This output should be commented
/*$profiler = new MITSUserProfiler();
var_dump($profiler->decideUserProfile($user));*/