original_string: protected function get_array_of_placeholders($question) {
          $qtext = $question->questiontext;
          $error = '<b> ERROR</b>: Please check the form for this question. ';
          if (!$qtext) {
              echo $error . 'The question text is empty!';
              return false;
          }
  
          // Get the slots.
          $slots = $this->getEmbeddedTextArray($question);
  
          if (!$slots) {
              echo $error . 'The question text is not in the correct format!';
              return false;
          }
  
          $output = array();
          foreach ($slots as $slot) {
              $output[] = substr($slot, 2, strlen($slot) - 4); // 2 is for '[[' and 4 is for '[[]]'.
          }
          return $output;
      }
code: protected function get_array_of_placeholders($question) {
          $qtext = $question->questiontext;
          $error = '<b> ERROR</b>: Please check the form for this question. ';
          if (!$qtext) {
              echo $error . 'The question text is empty!';
              return false;
          }
  
          // Get the slots.
          $slots = $this->getEmbeddedTextArray($question);
  
          if (!$slots) {
              echo $error . 'The question text is not in the correct format!';
              return false;
          }
  
          $output = array();
          foreach ($slots as $slot) {
              $output[] = substr($slot, 2, strlen($slot) - 4); // 2 is for '[[' and 4 is for '[[]]'.
          }
          return $output;
      }
code_tokens: protected function get_array_of_placeholders ( $ question ) { $ qtext = $ question -> questiontext ; $ error = '<b> ERROR</b>: Please check the form for this question. ' ; if ( ! $ qtext ) { echo $ error . 'The question text is empty!' ; return false ; } // Get the slots. $ slots = $ this -> getEmbeddedTextArray ( $ question ) ; if ( ! $ slots ) { echo $ error . 'The question text is not in the correct format!' ; return false ; } $ output = array ( ) ; foreach ( $ slots as $ slot ) { $ output [ ] = substr ( $ slot , 2 , strlen ( $ slot ) - 4 ) ; // 2 is for '[[' and 4 is for '[[]]'. } return $ output ; }
docstring: Return the list of groups used in a question.
  @param stdClass $question the question data.
  @return array the groups used, or false if an error occurs.
docstring_tokens: Return the list of groups used in a question .