original_string: protected function populate_missing_questions($slots) {
          // Address missing question types.
          foreach ($slots as $slot) {
              if ($slot->qtype === null) {
                  // If the questiontype is missing change the question type.
                  $slot->id = $slot->questionid;
                  $slot->category = 0;
                  $slot->qtype = 'missingtype';
                  $slot->name = get_string('missingquestion', 'quiz');
                  $slot->slot = $slot->slot;
                  $slot->maxmark = 0;
                  $slot->requireprevious = 0;
                  $slot->questiontext = ' ';
                  $slot->questiontextformat = FORMAT_HTML;
                  $slot->length = 1;
  
              } else if (!\question_bank::qtype_exists($slot->qtype)) {
                  $slot->qtype = 'missingtype';
              }
          }
  
          return $slots;
      }
code: protected function populate_missing_questions($slots) {
          // Address missing question types.
          foreach ($slots as $slot) {
              if ($slot->qtype === null) {
                  // If the questiontype is missing change the question type.
                  $slot->id = $slot->questionid;
                  $slot->category = 0;
                  $slot->qtype = 'missingtype';
                  $slot->name = get_string('missingquestion', 'quiz');
                  $slot->slot = $slot->slot;
                  $slot->maxmark = 0;
                  $slot->requireprevious = 0;
                  $slot->questiontext = ' ';
                  $slot->questiontextformat = FORMAT_HTML;
                  $slot->length = 1;
  
              } else if (!\question_bank::qtype_exists($slot->qtype)) {
                  $slot->qtype = 'missingtype';
              }
          }
  
          return $slots;
      }
code_tokens: protected function populate_missing_questions ( $ slots ) { // Address missing question types. foreach ( $ slots as $ slot ) { if ( $ slot -> qtype === null ) { // If the questiontype is missing change the question type. $ slot -> id = $ slot -> questionid ; $ slot -> category = 0 ; $ slot -> qtype = 'missingtype' ; $ slot -> name = get_string ( 'missingquestion' , 'quiz' ) ; $ slot -> slot = $ slot -> slot ; $ slot -> maxmark = 0 ; $ slot -> requireprevious = 0 ; $ slot -> questiontext = ' ' ; $ slot -> questiontextformat = FORMAT_HTML ; $ slot -> length = 1 ; } else if ( ! \ question_bank :: qtype_exists ( $ slot -> qtype ) ) { $ slot -> qtype = 'missingtype' ; } } return $ slots ; }
docstring: Used by populate. Make up fake data for any missing questions.
  @param \stdClass[] $slots the data about the slots and questions in the quiz.
  @return \stdClass[] updated $slots array.
docstring_tokens: Used by populate . Make up fake data for any missing questions .