by Jan Philipp Weber.
Hi Daniel,
I send quizid and userid with REST to the Web Service, here is my function from my Web Service test project:
public function getQuizUserAttempts($token,$quizid,$userid)
{
$domainname = 'https://mymoodle.com';
$functionname = 'mod_quiz_get_user_attempts';
$restformat = 'json';
$params = array('quizid' => $quizid,'userid' => $userid);
$serverurl = $domainname . '/webservice/rest/server.php'. '?wstoken=' . $token . '&wsfunction='.$functionname;
$this->load->library('Curl');
$curl = new Curl();
$restformat = ($restformat == 'json')?'&moodlewsrestformat=' . $restformat:'';
$resp = $curl->post($serverurl . $restformat, $params);
return $resp;
}
Best regards,
Jan Philipp