Skip to content

Commit

Permalink
updated: to test new functions, too.
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev@7305 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Tim Wahrendorff committed Jul 13, 2009
1 parent 57dd850 commit 10cd2e7
Showing 1 changed file with 57 additions and 12 deletions.
69 changes: 57 additions & 12 deletions admin/remotecontrol/lsrc.testclient.php
Expand Up @@ -173,6 +173,13 @@ function soapCheck ($path2wsdl)
}
}
if($file!=FALSE)
{
try
{ $ques = $client->sAvailableModules($user, "password", "que");}
catch (SoapFault $fault)
{ $ques .= "<br/><br/><b>SOAP Error: ".$fault->faultcode." : ".$fault->faultstring."</b>";}
}
if($file!=FALSE)
{
try
{ $mods = $client->sAvailableModules($user, "password", "mod");}
Expand Down Expand Up @@ -308,8 +315,7 @@ function soapCheck ($path2wsdl)
//these are just outputs for testing
$sOutput .= "<br/><br/><b>Return</b>: ". $sReturn;
}

if(substr($key,0,8)=="impQuest")
if(substr($key,0,8)=="impFree")
{
$iVid = $_REQUEST['sid'];
// $sMod = $_REQUEST['mod'];
Expand All @@ -330,6 +336,25 @@ function soapCheck ($path2wsdl)
//these are just outputs for testing
$sOutput .= "<br/><br/><b>Return</b>: ". $sReturn;
}
if(substr($key,0,8)=="impQuest")
{
$iVid = $_REQUEST['sid'];
// $sMod = $_REQUEST['mod'];
$sMod = $_REQUEST['mod'];
$mandatory = $_REQUEST['mandatory'];

try
{

$sReturn = $client->sImportQuestion($user, $pass, $iVid, $sMod, $mandatory);
}
catch (SoapFault $fault)
{
$sOutput .= " <br/><br/><b>SOAP Error: ".$fault->faultcode." : ".$fault->faultstring."</b>";
}
//these are just outputs for testing
$sOutput .= "<br/><br/><b>Return</b>: ". $sReturn;
}

if(substr($key,0,8)=="impGroup")
{
Expand Down Expand Up @@ -511,7 +536,7 @@ function soapCheck ($path2wsdl)
echo '</div>';
}
?>
<div style='margin-bottom: 5px'>
<div style='float:left; margin-bottom: 5px; margin-right: 5px;'>
<h3>sCreateSurvey function</h3>
<form action='<?php echo $_SERVER['PHP_SELF'] ?>' method='post'>
<b><font color='red'>* </font>VeranstaltungsTyp:</b>
Expand Down Expand Up @@ -550,7 +575,7 @@ function soapCheck ($path2wsdl)
</div>


<div style='float: left; margin-bottom: 5px'>
<div style='float: left; margin-bottom: 5px; margin-right: 5px;'>
<h3>sActivateSurvey function</h3>
<form action='<?php echo $_SERVER['PHP_SELF'] ?>' method='post'><b><font
color='red'>* </font>VeranstaltungsID / SurveyID:</b>
Expand All @@ -565,7 +590,7 @@ function soapCheck ($path2wsdl)
<input type='submit' name='activate' value='Start Survey!' /></form>
</div>

<div style='float: left; margin-bottom: 5px; margin-left: 5px'>
<div style='float: left; margin-bottom: 5px; margin-right: 5px'>
<h3>sDeleteSurvey function</h3>(attention: no safetyquestion is asked!)<br/>
<form action='<?php echo $_SERVER['PHP_SELF'] ?>' method='post'><b><font
color='red'>* </font>VeranstaltungsID / SurveyID:</b>
Expand All @@ -576,7 +601,7 @@ function soapCheck ($path2wsdl)
<input type='submit' name='delsurvey' value='Delete Survey!' /></form>
</div>

<div style='float: right; margin-bottom: 5px'>
<div style='float: left; margin-bottom: 5px; margin-right: 5px;'>
<h3>sImportGroup function</h3>
<form action='<?php echo $_SERVER['PHP_SELF'] ?>' method='post'><b><font
color='red'>* </font>VeranstaltungsID / SurveyID (have to be Integer):</b>
Expand All @@ -600,9 +625,8 @@ function soapCheck ($path2wsdl)
<input type='submit' name='impGroup' value='add group to survey!' /></form>
</div>

<div
style='clear: both; float: left; width: 49%; margin-bottom: 5px'>
<h3>sImportQuestion</h3>
<div style='float: left; margin-bottom: 5px; margin-right: 5px;'>
<h3>sImportFreetext</h3>
<form action='<?php echo $_SERVER['PHP_SELF'] ?>' method='post'><b><font
color='red'>* </font>VeranstaltungsID / SurveyID (have to be Integer):</b>
<br />
Expand All @@ -616,11 +640,32 @@ function soapCheck ($path2wsdl)
<b>Helptext:</b> <br />
<textarea name='help' cols='50' rows='3'></textarea> <br />
<?php echo "<input type='hidden' name='wsdl' size='97' value='".$wsdl."' />" ?>
<input type='submit' name='impQuest' value='Create Question!' /></form>
<input type='submit' name='impFree' value='Create Question!' /></form>
</div>

<div style='float: left; margin-bottom: 5px; margin-right: 5px;'>
<h3>sImportQuestion</h3>
<form action='<?php echo $_SERVER['PHP_SELF'] ?>' method='post'><b><font
color='red'>* </font>VeranstaltungsID / SurveyID (have to be Integer):</b>
<br />
<input type='text' name='sid' size='5' maxlength='5'
value='<?php echo $iVid ?>' /> <br />
<input type='checkbox' name='mandatory' value='Y' /> Mandatory <br />
<b><font color='red'>* </font>Question csv to import:</b> <br />
<select name='mod' size='1'>
<?php
$aQues = explode(",", $ques);
for($n=0;$n<count($aQues);++$n)
{echo "<option value='".$aQues[$n]."'>".$aQues[$n]."</option>";}
?>
</select> <br />
<?php echo "<input type='hidden' name='wsdl' size='97' value='".$wsdl."' />" ?>
<input type='submit' name='impFree' value='Create Question!' /></form>
</div>


<div
style='float: right; width: 49%; margin-bottom: 5px'>
style='float: left; margin-bottom: 5px; margin-right: 5px;'>
<h3>sImportMatrix</h3>
<form action='<?php echo $_SERVER['PHP_SELF'] ?>' method='post'><b><font
color='red'>* </font>VeranstaltungsID / SurveyID (have to be Integer):</b>
Expand All @@ -644,7 +689,7 @@ function soapCheck ($path2wsdl)
</div>


<div style='float: left; margin-bottom: 5px'>
<div style='float: left; margin-bottom: 5px; margin-right: 5px;'>
<h3>sChangeSurvey function</h3>
( this is not part of the lsrc, it just shows the power of it, <br/>it has to be activated in server.php on line ~60 )
<form action='<?php echo $_SERVER['PHP_SELF'] ?>' method='post'>
Expand Down

0 comments on commit 10cd2e7

Please sign in to comment.