Commit 8bd4af97 authored by pkdille's avatar pkdille

[FIX] tiki-take_survey - </DIV> tag missing

parent abfe445a
......@@ -6,7 +6,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
exit;
}
class SurveyLib extends TikiLib {
class SurveyLib extends TikiLib
{
function SurveyLib($db) {
parent::TikiLib($db);
}
......
<form name="aform" formId='editpageform' action="tiki-take_survey.php" method="post">
<input type="hidden" name="surveyId" value="{$surveyId|escape}" />
<h2>{$survey_info.name}</h2>
<div class="quizdescription">{$survey_info.description}</div>
{section name=ix loop=$questions}
<div class="questionblock">
<div class="quizquestion">{$questions[ix].question}</div>
{if $questions[ix].type eq 'c'}
<div class="quizoptions">
{section name=jx loop=$questions[ix].qoptions}
<input type="radio" value="{$questions[ix].qoptions[jx].optionId|escape}" name="question_{$questions[ix].questionId}" />{$questions[ix].qoptions[jx].qoption}<br />
<h2>{$survey_info.name}</h2>
<div class="quizdescription">{$survey_info.description}</div>
{section name=ix loop=$questions}
<div class="questionblock">
<div class="quizquestion">{$questions[ix].question}</div>
{if $questions[ix].type eq 'c'}
<div class="quizoptions">
{section name=jx loop=$questions[ix].qoptions}
<input type="radio" value="{$questions[ix].qoptions[jx].optionId|escape}" name="question_{$questions[ix].questionId}" />{$questions[ix].qoptions[jx].qoption}<br />
{/section}
</div>
{/if}
{if $questions[ix].type eq 't'}
<div class="quizoptions">
<input type="text" name="question_{$questions[ix].questionId}" />
</div>
{/if}
{if $questions[ix].type eq 'x'}
<div class="quizoptions">
<table class="normal">
<tr>
<td valign="top">
{include file="textareasize.tpl" area_name='editwiki' formId='editpageform'}<br /><br />
{include file=tiki-edit_help_tool.tpl area_name='editwiki'}
</td>
<td valign="top">
<textarea id='editwiki' name="question_{$questions[ix].questionId}" rows="{$rows}" cols="{$cols}"></textarea>
</td>
</tr>
</table>
</div>
{/if}
{if $questions[ix].type eq 'm'}
<div class="quizoptions">
{section name=jx loop=$questions[ix].qoptions}
<input type="checkbox" value="{$questions[ix].qoptions[jx].optionId|escape}" name="question_{$questions[ix].questionId}[{$questions[ix].qoptions[jx].optionId}]" />{$questions[ix].qoptions[jx].qoption}<br />
{/section}
</div>
{/if}
{if $questions[ix].type eq 'r' or $questions[ix].type eq 's'}
<div class="quizoptions">
{if $questions[ix].options}
{foreach from=$questions[ix].explode key=k item=j}
{$k}<input type="radio" value="{$k}" name="question_{$questions[ix].questionId}" />
{/foreach}
{elseif $questions[ix].type eq 'r'}
1<input type="radio" value="1" name="question_{$questions[ix].questionId}" />
<input type="radio" value="2" name="question_{$questions[ix].questionId}" />
<input type="radio" value="3" name="question_{$questions[ix].questionId}" />
<input type="radio" value="4" name="question_{$questions[ix].questionId}" />
<input type="radio" value="5" name="question_{$questions[ix].questionId}" />5
{elseif $questions[ix].type eq 's'}
1<input type="radio" value="1" name="question_{$questions[ix].questionId}" />
<input type="radio" value="2" name="question_{$questions[ix].questionId}" />
<input type="radio" value="3" name="question_{$questions[ix].questionId}" />
<input type="radio" value="4" name="question_{$questions[ix].questionId}" />
<input type="radio" value="5" name="question_{$questions[ix].questionId}" />
<input type="radio" value="6" name="question_{$questions[ix].questionId}" />
<input type="radio" value="7" name="question_{$questions[ix].questionId}" />
<input type="radio" value="8" name="question_{$questions[ix].questionId}" />
<input type="radio" value="9" name="question_{$questions[ix].questionId}" />
<input type="radio" value="10" name="question_{$questions[ix].questionId}" />10
{/if}
</div>
{/if}
</div>
{/section}
</div>
{/if}
{if $questions[ix].type eq 't'}
<div class="quizoptions">
<input type="text" name="question_{$questions[ix].questionId}" />
</div>
{/if}
{if $questions[ix].type eq 'x'}
<div class="quizoptions">
<table class="normal"><tr><td valign="top">
{include file="textareasize.tpl" area_name='editwiki' formId='editpageform'}<br /><br />
{include file=tiki-edit_help_tool.tpl area_name='editwiki'}
</td><td valign="top">
<textarea id='editwiki' name="question_{$questions[ix].questionId}" rows="{$rows}" cols="{$cols}"></textarea>
</td></tr></table>
</div>
{/if}
{if $questions[ix].type eq 'm'}
<div class="quizoptions">
{section name=jx loop=$questions[ix].qoptions}
<input type="checkbox" value="{$questions[ix].qoptions[jx].optionId|escape}" name="question_{$questions[ix].questionId}[{$questions[ix].qoptions[jx].optionId}]" />{$questions[ix].qoptions[jx].qoption}<br />
{/section}
</div>
{/if}
{if $questions[ix].type eq 'r' or $questions[ix].type eq 's'}
<div class="quizoptions">
{if $questions[ix].options}
{foreach from=$questions[ix].explode key=k item=j}
{$k}<input type="radio" value="{$k}" name="question_{$questions[ix].questionId}" />
{/foreach}
{elseif $questions[ix].type eq 'r'}
1<input type="radio" value="1" name="question_{$questions[ix].questionId}" />
<input type="radio" value="2" name="question_{$questions[ix].questionId}" />
<input type="radio" value="3" name="question_{$questions[ix].questionId}" />
<input type="radio" value="4" name="question_{$questions[ix].questionId}" />
<input type="radio" value="5" name="question_{$questions[ix].questionId}" />5
{elseif $questions[ix].type eq 's'}
1<input type="radio" value="1" name="question_{$questions[ix].questionId}" />
<input type="radio" value="2" name="question_{$questions[ix].questionId}" />
<input type="radio" value="3" name="question_{$questions[ix].questionId}" />
<input type="radio" value="4" name="question_{$questions[ix].questionId}" />
<input type="radio" value="5" name="question_{$questions[ix].questionId}" />
<input type="radio" value="6" name="question_{$questions[ix].questionId}" />
<input type="radio" value="7" name="question_{$questions[ix].questionId}" />
<input type="radio" value="8" name="question_{$questions[ix].questionId}" />
<input type="radio" value="9" name="question_{$questions[ix].questionId}" />
<input type="radio" value="10" name="question_{$questions[ix].questionId}" />10
{/if}
</div>
{/if}
{/section}
<input type="submit" value="{tr}send answers{/tr}" name="ans" />
</form>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment