original_string: public static function set_course_competency_ruleoutcome($coursecompetencyorid, $ruleoutcome) {
          static::require_enabled();
          $coursecompetency = $coursecompetencyorid;
          if (!is_object($coursecompetency)) {
              $coursecompetency = new course_competency($coursecompetencyorid);
          }
  
          $courseid = $coursecompetency->get('courseid');
          self::validate_course($courseid);
          $coursecontext = context_course::instance($courseid);
  
          require_capability('moodle/competency:coursecompetencymanage', $coursecontext);
  
          $coursecompetency->set('ruleoutcome', $ruleoutcome);
          return $coursecompetency->update();
      }
code: public static function set_course_competency_ruleoutcome($coursecompetencyorid, $ruleoutcome) {
          static::require_enabled();
          $coursecompetency = $coursecompetencyorid;
          if (!is_object($coursecompetency)) {
              $coursecompetency = new course_competency($coursecompetencyorid);
          }
  
          $courseid = $coursecompetency->get('courseid');
          self::validate_course($courseid);
          $coursecontext = context_course::instance($courseid);
  
          require_capability('moodle/competency:coursecompetencymanage', $coursecontext);
  
          $coursecompetency->set('ruleoutcome', $ruleoutcome);
          return $coursecompetency->update();
      }
code_tokens: public static function set_course_competency_ruleoutcome ( $ coursecompetencyorid , $ ruleoutcome ) { static :: require_enabled ( ) ; $ coursecompetency = $ coursecompetencyorid ; if ( ! is_object ( $ coursecompetency ) ) { $ coursecompetency = new course_competency ( $ coursecompetencyorid ) ; } $ courseid = $ coursecompetency -> get ( 'courseid' ) ; self :: validate_course ( $ courseid ) ; $ coursecontext = context_course :: instance ( $ courseid ) ; require_capability ( 'moodle/competency:coursecompetencymanage' , $ coursecontext ) ; $ coursecompetency -> set ( 'ruleoutcome' , $ ruleoutcome ) ; return $ coursecompetency -> update ( ) ; }
docstring: Update ruleoutcome value for a course competency.
  
  @param int|course_competency $coursecompetencyorid The course_competency, or its ID.
  @param int $ruleoutcome The value of ruleoutcome.
  @return bool True on success.
docstring_tokens: Update ruleoutcome value for a course competency .