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
        );
    }
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
        );
    }
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 ) ; }
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
Notify that the course module was viewed .