original_string: public static function step_shown($tourid, $context, $pageurl, $stepid, $stepindex) {
          $params = self::validate_parameters(self::step_shown_parameters(), [
                  'tourid'    => $tourid,
                  'context'   => $context,
                  'pageurl'   => $pageurl,
                  'stepid'    => $stepid,
                  'stepindex' => $stepindex,
              ]);
  
          $context = \context_helper::instance_by_id($params['context']);
          self::validate_context($context);
  
          $step = step::instance($params['stepid']);
          if ($step->get_tourid() != $params['tourid']) {
              throw new \moodle_exception('Incorrect tour specified.');
          }
  
          \tool_usertours\event\step_shown::create([
              'contextid' => $context->id,
              'objectid'  => $params['stepid'],
  
              'other'     => [
                  'pageurl'   => $params['pageurl'],
                  'tourid'    => $params['tourid'],
                  'stepindex' => $params['stepindex'],
              ],
          ])->trigger();
  
          return [];
      }
code: public static function step_shown($tourid, $context, $pageurl, $stepid, $stepindex) {
          $params = self::validate_parameters(self::step_shown_parameters(), [
                  'tourid'    => $tourid,
                  'context'   => $context,
                  'pageurl'   => $pageurl,
                  'stepid'    => $stepid,
                  'stepindex' => $stepindex,
              ]);
  
          $context = \context_helper::instance_by_id($params['context']);
          self::validate_context($context);
  
          $step = step::instance($params['stepid']);
          if ($step->get_tourid() != $params['tourid']) {
              throw new \moodle_exception('Incorrect tour specified.');
          }
  
          \tool_usertours\event\step_shown::create([
              'contextid' => $context->id,
              'objectid'  => $params['stepid'],
  
              'other'     => [
                  'pageurl'   => $params['pageurl'],
                  'tourid'    => $params['tourid'],
                  'stepindex' => $params['stepindex'],
              ],
          ])->trigger();
  
          return [];
      }
code_tokens: public static function step_shown ( $ tourid , $ context , $ pageurl , $ stepid , $ stepindex ) { $ params = self :: validate_parameters ( self :: step_shown_parameters ( ) , [ 'tourid' => $ tourid , 'context' => $ context , 'pageurl' => $ pageurl , 'stepid' => $ stepid , 'stepindex' => $ stepindex , ] ) ; $ context = \ context_helper :: instance_by_id ( $ params [ 'context' ] ) ; self :: validate_context ( $ context ) ; $ step = step :: instance ( $ params [ 'stepid' ] ) ; if ( $ step -> get_tourid ( ) != $ params [ 'tourid' ] ) { throw new \ moodle_exception ( 'Incorrect tour specified.' ) ; } \ tool_usertours \ event \ step_shown :: create ( [ 'contextid' => $ context -> id , 'objectid' => $ params [ 'stepid' ] , 'other' => [ 'pageurl' => $ params [ 'pageurl' ] , 'tourid' => $ params [ 'tourid' ] , 'stepindex' => $ params [ 'stepindex' ] , ] , ] ) -> trigger ( ) ; return [ ] ; }
docstring: Mark the specified toru step as shown for the current user.
  
  @param   int     $tourid     The ID of the tour.
  @param   int     $context    The Context ID of the current page.
  @param   string  $pageurl    The path of the current page.
  @param   int     $stepid     The step id
  @param   int     $stepindex  The step index
  @return  array               As described in complete_tour_returns
docstring_tokens: Mark the specified toru step as shown for the current user .