public static function competency_framework_viewed($frameworkorid) {
        static::require_enabled();
        $framework = $frameworkorid;
        if (!is_object($framework)) {
            $framework = new competency_framework($framework);
        }
        if (!has_any_capability(array('moodle/competency:competencyview', 'moodle/competency:competencymanage'),
                $framework->get_context())) {
            throw new required_capability_exception($framework->get_context(), 'moodle/competency:competencyview',
                'nopermissions', '');
        }
        \core\event\competency_framework_viewed::create_from_framework($framework)->trigger();
        return true;
    }
public static function competency_framework_viewed($frameworkorid) {
        static::require_enabled();
        $framework = $frameworkorid;
        if (!is_object($framework)) {
            $framework = new competency_framework($framework);
        }
        if (!has_any_capability(array('moodle/competency:competencyview', 'moodle/competency:competencymanage'),
                $framework->get_context())) {
            throw new required_capability_exception($framework->get_context(), 'moodle/competency:competencyview',
                'nopermissions', '');
        }
        \core\event\competency_framework_viewed::create_from_framework($framework)->trigger();
        return true;
    }
public static function competency_framework_viewed ( $ frameworkorid ) { static :: require_enabled ( ) ; $ framework = $ frameworkorid ; if ( ! is_object ( $ framework ) ) { $ framework = new competency_framework ( $ framework ) ; } if ( ! has_any_capability ( array ( 'moodle/competency:competencyview' , 'moodle/competency:competencymanage' ) , $ framework -> get_context ( ) ) ) { throw new required_capability_exception ( $ framework -> get_context ( ) , 'moodle/competency:competencyview' , 'nopermissions' , '' ) ; } \ core \ event \ competency_framework_viewed :: create_from_framework ( $ framework ) -> trigger ( ) ; return true ; }
Logg the competency framework viewed event.

@param competency_framework|int $frameworkorid The competency_framework object or competency framework id
@return bool
Logg the competency framework viewed event .