Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

Re: moodle webservice(mod_quiz_save_attempt) is no longer working

$
0
0
by kumar ret.  

Thanks  for the reply


I checked the same.  But getting same problem ...


my code is ///


require_once('./curl.php');
$token = 'mytoken';        
$functionname = 'mod_quiz_save_attempt';   
$domainname = 'http://localhost/moodle';
$restformat = 'json'; 
$params=array('attemptid'=>1 , 'data' => array (array('name' => 'slot','value' => 1 ),array('name' =>'q1:1_:sequencecheck','value' => 1),array('name' =>'q1:1_answer','value' => 2)), 'preflightdata' => array (array('name' => "",'value' => "")));
$functionname = 'mod_quiz_save_attempt'; 
$serverurl = $domainname . '/webservice/rest/server.php'. '?wstoken=' . $token . '&wsfunction='.$functionname;
$curl = new curl;  
$restformat = ($restformat == 'json')?'&moodlewsrestformat=' .$restformat:'';
$resp = $curl->post($serverurl . $restformat, $params);
print_r($resp);

Please check ... Thanks in advance


Viewing all articles
Browse latest Browse all 2361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>