<i class="dashicons dashicons-sort"></i> </td> </tr> <?php do_action('learn_press_after_question_answer_option', $this); ?> <?php } ?> <?php } ?> </tbody> </table> <p class="question-bottom-actions"> <?php $buttons = apply_filters('learn_press_question_bottom_buttons', array('add_option' => sprintf(__('<button class="button add-question-option-button add-question-option-button-%1$d" data-id="%1$d" type="button">%2$s</button>', 'learn_press'), $this->id, __('Add Option', 'learn_press')), 'change_type' => learn_press_dropdown_question_types(array('echo' => false, 'id' => 'learn-press-dropdown-question-types-' . $this->id, 'selected' => $this->type))), $this); echo join("\n", $buttons); ?> </p> </div> <script type="text/javascript"> jQuery(function ($) { LearnPress.sortableQuestionAnswers($('#learn-press-question-<?php echo $this->id; ?> ')); }) </script>
<?php do_action('learn_press_after_question_answer_option', $this); ?> <?php } ?> <?php } ?> </tbody> </table> <p class="question-bottom-actions"> <?php $buttons = array('change_type' => learn_press_dropdown_question_types(array('echo' => false, 'id' => 'learn-press-dropdown-question-types-' . $this->id, 'selected' => $this->type))); if ($this->type != 'true_or_false') { array_splice($buttons, 0, 0, sprintf(__('<button class="button add-question-option-button add-question-option-button-%1$d" data-id="%1$d" type="button">%2$s</button>', 'learn_press'), $this->id, __('Add Option', 'learn_press'))); } $buttons = apply_filters('learn_press_question_bottom_buttons', $buttons, $this); echo join("\n", $buttons); ?> </p> </div> <script type="text/javascript"> jQuery(function ($) { LearnPress.sortableQuestionAnswers($('#learn-press-question-<?php echo $this->id; ?> ')); })
<div class="learn-press-question" id="learn-press-question-<?php echo $this->id; ?> " data-type="none" data-id="<?php echo $this->id; ?> "> <?php _e('Please select a type for this question'); ?> <p class="question-bottom-actions"> <?php $buttons = apply_filters('learn_press_question_bottom_buttons', array('change_type' => learn_press_dropdown_question_types(array('echo' => false, 'id' => 'learn-press-dropdown-question-types-' . $this->id, 'selected' => 'none'))), $this); echo join("\n", $buttons); ?> </p> </div>