[system] / trunk / wwmoodle / wwquestion / questiontype.php Repository:
ViewVC logotype

Diff of /trunk/wwmoodle/wwquestion/questiontype.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 5173 Revision 5174
3require_once("$CFG->libdir/soap/nusoap.php"); 3require_once("$CFG->libdir/soap/nusoap.php");
4 4
5require_once("htmlparser.php"); 5require_once("htmlparser.php");
6 6
7//Path to the WSDL file on the Webwork Server 7//Path to the WSDL file on the Webwork Server
8define('PROBLEMSERVER_WSDL','http://128.151.231.20/problemserver_wsdl/'); 8define('PROBLEMSERVER_WSDL','http://128.151.231.20/WSDL.wsdl');
9define('PROBLEMSERVER_DISPLAYMODE','images'); 9define('PROBLEMSERVER_DISPLAYMODE','images');
10 10
11 11
12/** 12/**
13 * The question type class for the webwork question type. 13 * The question type class for the webwork question type.
251 //get code 251 //get code
252 //echo "GRADE"; 252 //echo "GRADE";
253 //var_dump($state); 253 //var_dump($state);
254 $code = base64_encode($question->code); 254 $code = base64_encode($question->code);
255 $seed = $state->responses['seed']; 255 $seed = $state->responses['seed'];
256 echo $seed;
256 //get answers 257 //get answers
257 $answerarray = array(); 258 $answerarray = array();
258 foreach($state->responses as $key => $value) { 259 foreach($state->responses as $key => $value) {
259 array_push($answerarray, array('field' => $key, 'answer'=> $value)); 260 array_push($answerarray, array('field' => $key, 'answer'=> $value));
260 } 261 }
311 * @desc Gets the correct answers from the server for the seed in state. Places them into the state->responses array. 312 * @desc Gets the correct answers from the server for the seed in state. Places them into the state->responses array.
312 */ 313 */
313 function get_correct_responses(&$question, &$state) { 314 function get_correct_responses(&$question, &$state) {
314 315
315 $code = base64_encode($question->code); 316 $code = base64_encode($question->code);
317
316 $seed = $state->responses['seed']; 318 $seed = $state->responses['seed'];
319 echo $seed;
317 320
318 //tricks checkAnswer into believing we are sending an anwer 321 //tricks checkAnswer into believing we are sending an anwer
319 $answerarray = array(array('field'=>'','answer'=>'')); 322 $answerarray = array(array('field'=>'','answer'=>''));
320 323
321 324

Legend:
Removed from v.5173  
changed lines
  Added in v.5174

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9