code: protected function buildOptions(RunnerServiceContext $context)
      {
          $session = $context->getTestSession();
  
          // Comment allowed? Skipping allowed? Logout or Exit allowed ?
          $options = [
              'allowComment'      => \taoQtiTest_helpers_TestRunnerUtils::doesAllowComment($session),
              'allowSkipping'     => \taoQtiTest_helpers_TestRunnerUtils::doesAllowSkipping($session),
              'exitButton'        => \taoQtiTest_helpers_TestRunnerUtils::doesAllowExit($session, $context),
              'logoutButton'      => \taoQtiTest_helpers_TestRunnerUtils::doesAllowLogout($session),
              'validateResponses' => \taoQtiTest_helpers_TestRunnerUtils::doesValidateResponses($session),
              'sectionPause'      => $this->getServiceManager()->get(SectionPauseService::SERVICE_ID)->couldBePaused($session)
          ];
  
          // get the options from the categories owned by the current item
          $categories = $this->getCategories($context);
          $prefixCategory = 'x-tao-option-';
          $prefixCategoryLen = strlen($prefixCategory);
          foreach ($categories as $category) {
              if (!strncmp($category, $prefixCategory, $prefixCategoryLen)) {
                  // extract the option name from the category, transform to camelCase if needed
                  $optionName = lcfirst(str_replace(' ', '', ucwords(strtr(substr($category, $prefixCategoryLen), ['-' => ' ', '_' => ' ']))));
  
                  // the options added by the categories are just flags
                  $options[$optionName] = true;
              }
          }
  
          return $options;
      }
docs: Returns the options related to the current test context
  @param RunnerServiceContext $context The test context
  @return mixed