public static function set_course_module_competency_ruleoutcome($coursemodulecompetencyorid, $ruleoutcome) {
        static::require_enabled();
        $coursemodulecompetency = $coursemodulecompetencyorid;
        if (!is_object($coursemodulecompetency)) {
            $coursemodulecompetency = new course_module_competency($coursemodulecompetencyorid);
        }

        $cm = get_coursemodule_from_id('', $coursemodulecompetency->get('cmid'), 0, true, MUST_EXIST);

        self::validate_course_module($cm);
        $context = context_module::instance($cm->id);

        require_capability('moodle/competency:coursecompetencymanage', $context);

        $coursemodulecompetency->set('ruleoutcome', $ruleoutcome);
        return $coursemodulecompetency->update();
    }
public static function set_course_module_competency_ruleoutcome($coursemodulecompetencyorid, $ruleoutcome) {
        static::require_enabled();
        $coursemodulecompetency = $coursemodulecompetencyorid;
        if (!is_object($coursemodulecompetency)) {
            $coursemodulecompetency = new course_module_competency($coursemodulecompetencyorid);
        }

        $cm = get_coursemodule_from_id('', $coursemodulecompetency->get('cmid'), 0, true, MUST_EXIST);

        self::validate_course_module($cm);
        $context = context_module::instance($cm->id);

        require_capability('moodle/competency:coursecompetencymanage', $context);

        $coursemodulecompetency->set('ruleoutcome', $ruleoutcome);
        return $coursemodulecompetency->update();
    }
public static function set_course_module_competency_ruleoutcome ( $ coursemodulecompetencyorid , $ ruleoutcome ) { static :: require_enabled ( ) ; $ coursemodulecompetency = $ coursemodulecompetencyorid ; if ( ! is_object ( $ coursemodulecompetency ) ) { $ coursemodulecompetency = new course_module_competency ( $ coursemodulecompetencyorid ) ; } $ cm = get_coursemodule_from_id ( '' , $ coursemodulecompetency -> get ( 'cmid' ) , 0 , true , MUST_EXIST ) ; self :: validate_course_module ( $ cm ) ; $ context = context_module :: instance ( $ cm -> id ) ; require_capability ( 'moodle/competency:coursecompetencymanage' , $ context ) ; $ coursemodulecompetency -> set ( 'ruleoutcome' , $ ruleoutcome ) ; return $ coursemodulecompetency -> update ( ) ; }
Update ruleoutcome value for a course module competency.

@param int|course_module_competency $coursemodulecompetencyorid The course_module_competency, or its ID.
@param int $ruleoutcome The value of ruleoutcome.
@return bool True on success.
Update ruleoutcome value for a course module competency .