From: pkiddie <pk...@us...> - 2005-08-25 15:46:30
|
Update of /cvsroot/stack/stack-1-0/scripts/rqp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12713/scripts/rqp Modified Files: Tag: development_xmlrqp RQPv1p0Server.php nb_soapfuncs.php Log Message: Latest version of DOMIT. Dynamic schemas saved to users temp_logfiles directory, as they may need updating over time, and server has write permissions Removed old schema related stuff Fixed bug in import code Index: RQPv1p0Server.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/rqp/Attic/RQPv1p0Server.php,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -C2 -d -r1.1.2.6 -r1.1.2.7 *** RQPv1p0Server.php 19 Aug 2005 15:32:49 -0000 1.1.2.6 --- RQPv1p0Server.php 25 Aug 2005 15:46:20 -0000 1.1.2.7 *************** *** 3,7 **** include("nb_soapfuncs.php"); ! include("rqp_util.php"); //Stack/RQP utility functions include("../../stackstd.php"); //Reqd for version info for STACK --- 3,7 ---- include("nb_soapfuncs.php"); ! //include("rqp_util.php"); //Stack/RQP utility functions include("../../stackstd.php"); //Reqd for version info for STACK *************** *** 81,85 **** $si['type'] = "STACK"; - $si['name'] = "STACK"; $si['version'] = $stack_ver['release']; $si['rqpVersion'] = "1.0"; --- 81,84 ---- *************** *** 88,94 **** $si['teacherDocs'] = "{$stack_web_url}scripts/rqp/stackDocs.php?action=teacher"; //about $si['adminDocs'] = "{$stack_web_url}scripts/rqp/stackDocs.php?action=admin"; //author - /*$si['serverProperties']=array('rendering' => TRUE, 'implicitCloning' => FALSE, 'explicitCloning' => FALSE, - 'authoring' => TRUE , 'adminOptions' => TRUE, 'teacherOptions' => FALSE , - 'userOptions' => TRUE); */ $si['serverProperties'] = array(array ('key' => 'rendering', 'val' => TRUE), array ('key' => 'implicitCloning', 'val' => FALSE), --- 87,90 ---- *************** *** 191,195 **** function RQP_Render($source, $options, $persistentData, $inputData, $directives, $mimetypes, $namePrefix, $itemBase, $resourceBase, $tempfileBase) { ! $outcomeVars = array(); $stem = ''; --- 187,233 ---- function RQP_Render($source, $options, $persistentData, $inputData, $directives, $mimetypes, $namePrefix, $itemBase, $resourceBase, $tempfileBase) { ! if (empty($source) && $directives[4]['val']==TRUE) ! { ! require_once('../stackAuthor.php'); ! ! $question = ''; ! $errors = ''; ! ! $render['persistentData'] = ''; ! $render['outcomeVars'] = array( array('key' => 'completion', 'val' => 'unknown'), ! array('key' => 'score', 'val' => '0'), ! array('key' => 'rawScore', 'val' => '0'), ! array('key' => 'penalty', 'val' => '0'), ! array('key' => 'valid', 'val' => TRUE), ! array('key' => 'source', 'val' => 'edited sourcce'), ! array('key' => 'options', 'val' => 'options string') ) ; ! $render['onSubmit'] = "</script> ! function EditQ(action) { ! f = document.stackeditqform; ! f.action.value = action; ! f.target = '_self'; ! f.submit(); ! }; ! <script type=".'"'.'text/javascript">'; ! $render['head'] = array(); ! $render['output'] = array( array('key' => 'title', 'val' => ''), //initially question will have no title ! array('key' => 'body', 'val' => stack_question_edit_form_rqp($question,&$errors)), ! array('key' => 'stem', 'val' => ''), ! array('key' => 'feedback', 'val' => ''), ! array('key' => 'response', 'val' => ''), ! array('key' => 'answer', 'val' => ''), ! array('key' => 'solution', 'val' => '') ); ! ! $render['mimetype'] = 'text/html'; ! $render['files'] = array(); ! ! ! //New question - return this form in render op ! //May need to set $questionId initially; ! ! return $render; ! } ! ! /*$outcomeVars = array(); $stem = ''; *************** *** 1009,1013 **** } ! $outcomeVars['answerNote'] = trim($this_attempt['AnswerNote']);*/ --- 1047,1051 ---- } ! $outcomeVars['answerNote'] = trim($this_attempt['AnswerNote']); *************** *** 1049,1058 **** $outcomeVars = soap_encode_array($outcomeVars, 'outcomeVars', 'variable', RQP_URI_NAMESPACE); ! $output = soap_encode_array($output, 'output', 'output', RQP_URI_NAMESPACE); ! return array('templateVars' => $templateVars, 'persistentData' => $persistentData, 'outcomeVars'=> $outcomeVars, 'output' => $output); ! //return new nbSOAPFault("unimplemented", "The RQP_Renderservice has not been implemented yet", ""); // Fill in web method fuctionality here. --- 1087,1096 ---- $outcomeVars = soap_encode_array($outcomeVars, 'outcomeVars', 'variable', RQP_URI_NAMESPACE); ! $output = soap_encode_array($output, 'output', 'output', RQP_URI_NAMESPACE);*/ ! //return array('templateVars' => $templateVars, 'persistentData' => $persistentData, 'outcomeVars'=> $outcomeVars, 'output' => $output); ! return new nbSOAPFault("unimplemented", "The RQP_Renderservice has not been implemented yet", ""); // Fill in web method fuctionality here. Index: nb_soapfuncs.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/rqp/Attic/nb_soapfuncs.php,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** nb_soapfuncs.php 19 Aug 2005 15:32:49 -0000 1.1.2.3 --- nb_soapfuncs.php 25 Aug 2005 15:46:20 -0000 1.1.2.4 *************** *** 129,133 **** $sock = fsockopen($urldata['host'],$urldata['port'], $errno, $errmsg, 30); stream_set_blocking($sock, false); ! //echo "<pre>".htmlentities($request)."</pre>"; // Uncomment this for debugging if($sock == false) --- 129,133 ---- $sock = fsockopen($urldata['host'],$urldata['port'], $errno, $errmsg, 30); stream_set_blocking($sock, false); ! echo "<pre>".htmlentities($request)."</pre>"; // Uncomment this for debugging if($sock == false) *************** *** 144,148 **** fclose($sock); } ! //echo "<pre>" . htmlentities($contents) . "</pre>"; // Uncomment this for debugging return $contents; --- 144,148 ---- fclose($sock); } ! echo "<pre>" . htmlentities($contents) . "</pre>"; // Uncomment this for debugging return $contents; |