* [task#126402] remove process fields method of thinkradio.
This commit is contained in:
@@ -41,28 +41,6 @@ class thinkRadio extends thinkQuestion
|
||||
$fields = $step->options->fields ?? array();
|
||||
$items = array();
|
||||
|
||||
/* 多选题引用其他题目,将符合条件的选项渲染为该题的选项。 */
|
||||
/* Multiple-choice questions reference other questions and render the options that meet the conditions as the options of this question. */
|
||||
if(empty($fields) && $isRun)
|
||||
{
|
||||
if($step->options->setOption == 1)
|
||||
{
|
||||
foreach($quoteQuestions as $item)
|
||||
{
|
||||
if($isRun && $item->origin == $step->options->quoteTitle)
|
||||
{
|
||||
$item->answer = json_decode($item->answer);
|
||||
$item->options = json_decode($item->options);
|
||||
$quoteFields = $item->options->fields;
|
||||
if($step->options->citation == 0) $fields = $quoteFields;
|
||||
if($step->options->citation == 1) $fields = array_intersect($item->options->fields, $item->answer->result);
|
||||
if($step->options->citation == 2) $fields = array_diff($item->options->fields, $item->answer->result);
|
||||
if(in_array('other',$item->answer->result)) $fields[] = $item->answer->other;
|
||||
}
|
||||
}
|
||||
}
|
||||
$fields = array_values($fields);
|
||||
}
|
||||
if(!empty($fields)) foreach($fields as $field) $items[] = array('text' => $field, 'value' => $field);
|
||||
if(empty($fields) && !$isRun) $items[] = array('text' => $lang->thinkstep->optionReference, 'disabledPrefix' => true);
|
||||
if(!empty($step->options->enableOther)) $items[] = array('text' => $lang->other, 'value' => 'other', 'isOther' => '1', 'other' => isset($answer->other) ? $answer->other : '');
|
||||
@@ -82,7 +60,7 @@ class thinkRadio extends thinkQuestion
|
||||
{
|
||||
foreach($quoteQuestions as $item)
|
||||
{
|
||||
if(!$isRun && $item->id == $step->options->quoteTitle) $quoteName = $item->title;
|
||||
if(!$isRun && $item->id == $step->options->quoteTitle) $quoteName = $item->index . '. ' . $item->title;
|
||||
if($isRun && $item->origin == $step->options->quoteTitle) $quoteName = $item->title;
|
||||
}
|
||||
$detailWg[] = div
|
||||
|
||||
Reference in New Issue
Block a user