original_string: protected function add_question_form(structure $structure, $page, \moodle_url $pageurl, array $pagevars) {
  
          $questioncategoryid = question_get_category_id_from_pagevars($pagevars);
  
          $output = html_writer::tag('input', null,
                  array('type' => 'hidden', 'name' => 'returnurl',
                          'value' => $pageurl->out_as_local_url(false, array('addonpage' => $page))));
          $output .= html_writer::tag('input', null,
                  array('type' => 'hidden', 'name' => 'cmid', 'value' => $structure->get_cmid()));
          $output .= html_writer::tag('input', null,
                  array('type' => 'hidden', 'name' => 'appendqnumstring', 'value' => 'addquestion'));
          $output .= html_writer::tag('input', null,
                  array('type' => 'hidden', 'name' => 'category', 'value' => $questioncategoryid));
  
          return html_writer::tag('form', html_writer::div($output),
                  array('class' => 'addnewquestion', 'method' => 'post',
                          'action' => new \moodle_url('/question/addquestion.php')));
      }
code: protected function add_question_form(structure $structure, $page, \moodle_url $pageurl, array $pagevars) {
  
          $questioncategoryid = question_get_category_id_from_pagevars($pagevars);
  
          $output = html_writer::tag('input', null,
                  array('type' => 'hidden', 'name' => 'returnurl',
                          'value' => $pageurl->out_as_local_url(false, array('addonpage' => $page))));
          $output .= html_writer::tag('input', null,
                  array('type' => 'hidden', 'name' => 'cmid', 'value' => $structure->get_cmid()));
          $output .= html_writer::tag('input', null,
                  array('type' => 'hidden', 'name' => 'appendqnumstring', 'value' => 'addquestion'));
          $output .= html_writer::tag('input', null,
                  array('type' => 'hidden', 'name' => 'category', 'value' => $questioncategoryid));
  
          return html_writer::tag('form', html_writer::div($output),
                  array('class' => 'addnewquestion', 'method' => 'post',
                          'action' => new \moodle_url('/question/addquestion.php')));
      }
code_tokens: protected function add_question_form ( structure $ structure , $ page , \ moodle_url $ pageurl , array $ pagevars ) { $ questioncategoryid = question_get_category_id_from_pagevars ( $ pagevars ) ; $ output = html_writer :: tag ( 'input' , null , array ( 'type' => 'hidden' , 'name' => 'returnurl' , 'value' => $ pageurl -> out_as_local_url ( false , array ( 'addonpage' => $ page ) ) ) ) ; $ output .= html_writer :: tag ( 'input' , null , array ( 'type' => 'hidden' , 'name' => 'cmid' , 'value' => $ structure -> get_cmid ( ) ) ) ; $ output .= html_writer :: tag ( 'input' , null , array ( 'type' => 'hidden' , 'name' => 'appendqnumstring' , 'value' => 'addquestion' ) ) ; $ output .= html_writer :: tag ( 'input' , null , array ( 'type' => 'hidden' , 'name' => 'category' , 'value' => $ questioncategoryid ) ) ; return html_writer :: tag ( 'form' , html_writer :: div ( $ output ) , array ( 'class' => 'addnewquestion' , 'method' => 'post' , 'action' => new \ moodle_url ( '/question/addquestion.php' ) ) ) ; }
docstring: Render the form that contains the data for adding a new question to the quiz.
  
  @param structure $structure object containing the structure of the quiz.
  @param int $page the page number that this menu will add to.
  @param \moodle_url $pageurl the canonical URL of this page.
  @param array $pagevars the variables from {@link \question_edit_setup()}.
  @return string HTML to output.
docstring_tokens: Render the form that contains the data for adding a new question to the quiz .