original_string: public static function view_glossary($id, $mode) {
          $params = self::validate_parameters(self::view_glossary_parameters(), array(
              'id' => $id,
              'mode' => $mode
          ));
          $id = $params['id'];
          $mode = $params['mode'];
          $warnings = array();
  
          // Get and validate the glossary.
          list($glossary, $context, $course, $cm) = self::validate_glossary($id);
  
          // Trigger module viewed event.
          glossary_view($glossary, $course, $cm, $context, $mode);
  
          return array(
              'status' => true,
              'warnings' => $warnings
          );
      }
code: public static function view_glossary($id, $mode) {
          $params = self::validate_parameters(self::view_glossary_parameters(), array(
              'id' => $id,
              'mode' => $mode
          ));
          $id = $params['id'];
          $mode = $params['mode'];
          $warnings = array();
  
          // Get and validate the glossary.
          list($glossary, $context, $course, $cm) = self::validate_glossary($id);
  
          // Trigger module viewed event.
          glossary_view($glossary, $course, $cm, $context, $mode);
  
          return array(
              'status' => true,
              'warnings' => $warnings
          );
      }
code_tokens: public static function view_glossary ( $ id , $ mode ) { $ params = self :: validate_parameters ( self :: view_glossary_parameters ( ) , array ( 'id' => $ id , 'mode' => $ mode ) ) ; $ id = $ params [ 'id' ] ; $ mode = $ params [ 'mode' ] ; $ warnings = array ( ) ; // Get and validate the glossary. list ( $ glossary , $ context , $ course , $ cm ) = self :: validate_glossary ( $ id ) ; // Trigger module viewed event. glossary_view ( $ glossary , $ course , $ cm , $ context , $ mode ) ; return array ( 'status' => true , 'warnings' => $ warnings ) ; }
docstring: Notify that the course module was viewed.
  
  @param int $id The glossary instance ID.
  @param string $mode The view mode.
  @return array of warnings and status result
  @since Moodle 3.1
  @throws moodle_exception
docstring_tokens: Notify that the course module was viewed .