View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
05190 | Bug reports | Other | public | 2011-05-22 19:02 | 2012-10-02 14:21 |
Reporter | fvillerot | Assigned To | c_schmitz | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.91 | ||||
Fixed in Version | 2.00+ | ||||
Summary | 05190: function importFreetext : param 'help' forget | ||||
Description | All in the title ! | ||||
Additional Information | I join the correction in diff mode | ||||
Tags | No tags attached. | ||||
Attached Files | correction_lsrc.client (15,723 bytes)
--- C:/Users/FV011021/AppData/Local/Temp/lsrc.client.php-rev9647.svn000.tmp.php dim. 22 mai 2011, 18:47:09 +++ C:/Users/FV011021/Documents/Projets/Enqu�te/Sources/limesurvey/admin/remotecontrol/lsrc.client.php dim. 22 mai 2011, 18:46:15 @@ -10,24 +10,25 @@ * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. * - * $Id: lsrc.client.php 8930 2010-07-13 06:58:37Z c_schmitz $ + * $Id: lsrc.client.php 9648 2011-01-07 13:06:39Z c_schmitz $ * */ class lsrcClient { //Configuration... - /**change this to the installation path, where you want to try the functions.*/ - public $limeUrl = 'http://localhost/limesurvey'; + /** change this to the installation path, where you want to try the functions. */ + public $limeUrl = 'http://localhost/limesource/limesurvey_dev'; - /** this have to be an admin account for full functionality*/ + /** this have to be an admin account for full functionality */ public $user = 'admin'; - /** password to the account*/ + /** password to this account */ public $pass = 'password'; /** * normally you do not have to change following. - * But sometimes you maybe want to change this to an static wsdl file like i.e. '/admin/remotecontrol/lsrc.wsdl'.*/ + * But sometimes you maybe want to change this to an static wsdl file like i.e. '/admin/remotecontrol/lsrc.wsdl'. + */ public $wsdl = '/admin/remotecontrol/lsrc.wsdl'; public $path2wsdl = ''; //will get concatinated from $limeUrl and $wsdl on prepare @@ -36,28 +37,25 @@ private $soapClient; //the soapClient object /** - * use this to initiate the SoapClient Class and prepare the use of it - * you have to set the surveyId here, if you work on a particular survey - * @param $sid the surveyid - * @return 1 for "client initiated", 0 for "something went wrong" - */ + * use this to initiate the SoapClient Class and prepare the use of it + * you have to set the surveyId here, if you work on a particular survey + * @param $sid the surveyid + * @return 1 for "client initiated", 0 for "something went wrong" + */ public function prepare($sid = 0) { $this->path2wsdl = $this->limeUrl.$this->wsdl; - // $this->user = $user; - // $this->pass = $pass; $this->sid = $sid; //print_r(get_declared_classes()); ini_set("allow_url_fopen", 1); - $file = fopen($this->path2wsdl,"r"); + $file = fopen($this->path2wsdl, "r"); if(class_exists('SoapClient') && $file!=FALSE) { try { - $this->soapClient = new SoapClient($this->path2wsdl, array('soap_version' => SOAP_1_1, - 'trace' => 1)); + $this->soapClient = new SoapClient($this->path2wsdl, array('soap_version' => SOAP_1_1, 'trace' => 1)); return 1; } catch (SoapFault $fault) @@ -74,22 +72,22 @@ * Used in the testclient to show if the SOAP class is available, libXML is there in the minimum version and if the wsdl can be reached * @return HTML String */ - public function soapCheck () + public function soapCheck() { - $soapCheck ='<div style="color:white;background-color:black;border: 1px solid green;">'; + $soapCheck = "<div style='color:white;background-color:black;border: 1px solid green;'>"; if(class_exists('SoapClient')) { $soapCheck .= "<div style='float:left;background:green;color:white;padding:5px;margin-right:5px;'> - SOAP Erweiterung existiert</div> "; + SOAP Erweiterung existiert</div>"; } else { $soapCheck .= "<div style='float:left;background:red;color:white;padding:5px;margin-right:5px;'> - SOAP Erweiterung fehlt!</div> "; + SOAP Erweiterung fehlt!</div>"; } if(LIBXML_VERSION>=20540) { - $soapCheck .= " <div style='float:left;background:green;color:white;padding:5px;margin-right:5px;'> + $soapCheck .= "<div style='float:left;background:green;color:white;padding:5px;margin-right:5px;'> libXML version '".LIBXML_DOTTED_VERSION."' OK</div>"; } else @@ -101,7 +99,7 @@ //$wsdlfile = ; ini_set("allow_url_fopen", 1); - if (!fopen($this->path2wsdl,"r")) + if (!fopen($this->path2wsdl, "r")) { $soapCheck .= "<div style='float:left;background:red;color:white;padding:5px;'> Der Pfad zur WSDL Datei ist nicht korrekt oder die WSDL Datei fehlt!</div>"; @@ -116,7 +114,8 @@ <input type='text' name='wsdl' size='97' value='".$this->path2wsdl."' disabled='disabled' /> <input type='submit' name='validate' value='neu checken!' /> </form> - </div></div>"; + </div> + </div>"; return $soapCheck; } /** @@ -125,19 +124,19 @@ */ public function getServerFunctions() { - $return = "<b>Client object public functions:</b> <font style='font-size:x-small'>(As given in the wsdl file. Functions could be disabled or else on the serverside. There is no guarantee the public functions really have these Params nor that the public functions exist on the serverside.)</font><br/>"; - if (fopen($this->path2wsdl,"r")) + $sReturn = "<b>Client object public functions:</b> <font style='font-size:x-small'>(As given in the wsdl file. Functions could be disabled or else on the serverside. There is no guarantee the public functions really have these Params nor that the public functions exist on the serverside.)</font><br />"; + if (!(!fopen($this->path2wsdl, "r"))) { $funcs = $this->soapClient->__getFunctions(); foreach($funcs as $func) { - $return .= '<p><font style="font-family:tahoma, arial;font-size:small;" >'; - $return .= $func; - $return .= '</font></p>'; + $sReturn .= "<p><font style='font-family:tahoma,arial;font-size:small;'>"; + $sReturn .= $func; + $sReturn .= "</font></p>"; } } - return $return; + return $sReturn; } /** * Used by testclient to show the Request and Response. This is valuable information for debugging. @@ -145,32 +144,41 @@ */ public function getResponse() { - $sOutput .="<br/><br/>Dumping <b>request headers</b>:<br/><pre>" - .$this->soapClient->__getLastRequestHeaders()."</pre>"; - - $sOutput .="Dumping <b>request</b>:<code>".htmlentities($this->soapClient->__getLastRequest())."</code>"; - - $sOutput .="<br/><br/><br/> Dumping <b>response headers</b>:<br/><pre>" - .$this->soapClient->__getLastResponseHeaders()."</pre>"; - $sOutput .="<br/>Dumping <b>response</b>:<br/><code>".htmlentities($this->soapClient->__getLastResponse())."</code>"; + $sOutput = "<br />Dumping <b>request headers</b>:<br />\n" + . "<pre>\n" + . $this->soapClient->__getLastRequestHeaders() + . "</pre>\n" + . "<br />Dumping <b>request</b>:<br />\n" + . "<code>\n" + . htmlentities($this->soapClient->__getLastRequest()) + . "</code>\n" + . "<br />Dumping <b>response headers</b>:<br />\n" + . "<pre>\n" + . $this->soapClient->__getLastResponseHeaders() + . "</pre>\n" + . "<br />Dumping <b>response</b>:<br />\n" + . "<code>\n" + . htmlentities($this->soapClient->__getLastResponse()) + . "</code>\n" + . "<br />\n"; return $sOutput; - } /** * Used to get the available module names for other functions like importQuestion, importGroup, createSurvey and so on * @param $mode - can be 'core'(surveys), 'mod'(groups) or 'que'(questions) * @return modules csv */ - public function getAvailableModules ($mode = 'mod') + public function getAvailableModules($mode = 'mod') { try { - return $this->soapClient->sAvailableModules($this->user, $this->pass, $mode); + $asReturn = $this->soapClient->sAvailableModules($this->user, $this->pass, $mode); } catch (SoapFault $fault) { throw new SoapFault($fault->faultcode, $fault->faultstring); } + return $asReturn; } /** * Sends a statistic of a particular survey, to the given E-Mail adress @@ -179,7 +187,7 @@ * @param $graph - '0' or '1' ... have only an effect on pdf statistics. If '1' graphs will be embedded in the pdf, '0' will embed no images in the pdf * @return 'PDF send', 'HTML send, 'XLS send' or throws a SoapFault */ - public function sendStatistics ( $email, $type = 'pdf', $graph) + public function sendStatistics($email, $type = 'pdf', $graph) { try { @@ -197,7 +205,6 @@ */ public function getFieldmap() { - try { $sReturn = $this->soapClient->sGetFieldmap($this->user, $this->pass, $this->sid); @@ -216,9 +223,8 @@ * @param $message - set the message for custom mails * @return String ('No Mails to send', 'XX Mails send', 'XX Mails send, XX Mails left to send') */ - public function sendMail( $type, $maxmails, $subject, $message) + public function sendMail($type, $maxmails, $subject, $message) { - try { $sReturn = $this->soapClient->sSendEmail($this->user, $this->pass, $this->sid, $type, $maxmails, $subject, $message); @@ -227,7 +233,6 @@ { throw new SoapFault($fault->faultcode, $fault->faultstring); } - return $sReturn; } /** @@ -244,7 +249,6 @@ { throw new SoapFault($fault->faultcode, $fault->faultstring); } - return $sReturn; } /** @@ -253,11 +257,11 @@ * @param $question - The Question text * @param $help - Help Text for this question * @param $items - Items to rate on the 5scale, Comma seperated - * @param $module - optional Parameter, if not given, he tries with Matrix5, which should be OK - * @param $mandatory - optional paramter. If not given, the question will not be mandatory. Use 'Y' to make the question mandatory + * @param $module - optional parameter, if not given, he tries with Matrix5, which should be OK + * @param $mandatory - optional parameter. If not given, the question will not be mandatory. Use 'Y' to make the question mandatory * @return String 'OK' or throws a SoapFault */ - public function importMatrix ($title, $question, $help, $items, $module = "Matrix5", $mandatory='N' ) + public function importMatrix($title, $question, $help, $items, $module = "Matrix5", $mandatory = 'N') { try { @@ -267,7 +271,6 @@ { throw new SoapFault($fault->faultcode, $fault->faultstring); } - return $sReturn; } /** @@ -275,30 +278,29 @@ * @param $title - Question Code * @param $question - The Question text * @param $help - Help Text for this question - * @param $module - optional Parameter, if not given, he tries with 'Freitext', which should be OK - * @param $mandatory - optional paramter. If not given, the question will not be mandatory. Use 'Y' to make the question mandatory + * @param $module - optional parameter, if not given, he tries with 'Freitext', which should be OK + * @param $mandatory - optional parameter. If not given, the question will not be mandatory. Use 'Y' to make the question mandatory * @return String "OK" or throws SoapFault */ - public function importFreetext ($title, $question, $help, $module = "Freitext", $mandatory='N' ) + public function importFreetext($title, $question, $help, $module = "Freitext", $mandatory = 'N') { try { - $sReturn = $this->soapClient->sImportFreetext($this->user, $this->pass, $this->sid, $title, $question, $module, $mandatory); + $sReturn = $this->soapClient->sImportFreetext($this->user, $this->pass, $this->sid, $title, $question, $help, $module, $mandatory); } catch (SoapFault $fault) { throw new SoapFault($fault->faultcode, $fault->faultstring); } - return $sReturn; } /** * Imports a Question in questions directory. Use getAvailableModules('que') to get all available question.csv's to import. * @param $module - name of the question file, without the filesuffix - * @param $mandatory - optional paramter. If not given, the question will not be mandatory. Use 'Y' to make the question mandatory + * @param $mandatory - optional parameter. If not given, the question will not be mandatory. Use 'Y' to make the question mandatory * @return String "OK" or throws SoapFault */ - public function importQuestion ($module, $mandatory='N') + public function importQuestion($module, $mandatory = 'N') { try { @@ -308,8 +310,7 @@ { throw new SoapFault($fault->faultcode, $fault->faultstring); } - - $sOutput .= "<br/><br/><b>Return</b>: ". $sReturn; + return $sReturn; } /** * Imports a Group in groups directory. Use getAvailableModules('mod') to get all available group.csv's to import. @@ -318,7 +319,7 @@ * @param $description - description text for the group * @return String "Import OK" or throws SoapFault */ - public function importGroup ($module, $name, $description) + public function importGroup($module, $name, $description) { try { @@ -328,7 +329,6 @@ { throw new SoapFault($fault->faultcode, $fault->faultstring); } - return $sReturn; } /** @@ -347,7 +347,6 @@ { throw new SoapFault($fault->faultcode, $fault->faultstring); } - return $sReturn; } /** @@ -370,7 +369,6 @@ { throw new SoapFault($fault->faultcode, $fault->faultstring); } - return $sReturn; } /** @@ -387,7 +385,7 @@ * @param $autord - optional * @return unknown_type */ - public function createSurvey($title, $description, $welcome, $endtext, $email, $name, $url, $urldesc, $module, $autord='N') + public function createSurvey($title, $description, $welcome, $endtext, $email, $name, $url, $urldesc, $module, $autord = 'N') { try { @@ -408,7 +406,7 @@ { try { - $sReturn = $this->soapClient->sInsertToken($this->user, $this->pass, $this->sid, $tokencsv ); + $sReturn = $this->soapClient->sInsertToken($this->user, $this->pass, $this->sid, $tokencsv); } catch (SoapFault $fault) { @@ -434,7 +432,7 @@ return $sReturn; } /** - * function to return unused Tokens as String, seperated by commas, to get the people who did not complete the Survey + * function to return unused Tokens as String, separated by commas, to get the people who did not complete the Survey * @return String unused Tokes as csv */ public function tokenReturn () @@ -449,5 +447,4 @@ } return $sReturn; } - -} \ No newline at end of file +} | ||||
Bug heat | 0 | ||||
Complete LimeSurvey version number (& build) | 10089 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | MySQL 5.1.31 | ||||
Server OS (if known) | Linux RHEL 5 | ||||
Webserver software & version (if known) | Apache 2.2.11 | ||||
PHP Version | PHP 5.2.9 | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2011-05-22 19:02 | fvillerot | New Issue | |
2011-05-22 19:02 | fvillerot | File Added: correction_lsrc.client | |
2011-05-23 00:08 | c_schmitz | Assigned To | => elameno |
2011-05-23 00:08 | c_schmitz | Status | new => assigned |
2011-06-16 15:56 | c_schmitz | Project | Bug reports => Development |
2012-08-14 22:53 | c_schmitz | Project | Development => Bug reports |
2012-08-14 22:53 | c_schmitz | Category | RemoteControl => Other issues |
2012-10-02 14:21 | c_schmitz | Status | assigned => closed |
2012-10-02 14:21 | c_schmitz | Assigned To | elameno => c_schmitz |
2012-10-02 14:21 | c_schmitz | Resolution | open => fixed |
2012-10-02 14:21 | c_schmitz | Fixed in Version | => 2.00+ |