original_string: public function use_in($courseid) {
          global $DB;
          if (!empty($this->courseid) and $courseid != $this->courseid) {
              return false;
          }
  
          if (!$DB->record_exists('grade_outcomes_courses', array('courseid' => $courseid, 'outcomeid' => $this->id))) {
              $goc = new stdClass();
              $goc->courseid  = $courseid;
              $goc->outcomeid = $this->id;
              $DB->insert_record('grade_outcomes_courses', $goc);
          }
          return true;
      }
code: public function use_in($courseid) {
          global $DB;
          if (!empty($this->courseid) and $courseid != $this->courseid) {
              return false;
          }
  
          if (!$DB->record_exists('grade_outcomes_courses', array('courseid' => $courseid, 'outcomeid' => $this->id))) {
              $goc = new stdClass();
              $goc->courseid  = $courseid;
              $goc->outcomeid = $this->id;
              $DB->insert_record('grade_outcomes_courses', $goc);
          }
          return true;
      }
code_tokens: public function use_in ( $ courseid ) { global $ DB ; if ( ! empty ( $ this -> courseid ) and $ courseid != $ this -> courseid ) { return false ; } if ( ! $ DB -> record_exists ( 'grade_outcomes_courses' , array ( 'courseid' => $ courseid , 'outcomeid' => $ this -> id ) ) ) { $ goc = new stdClass ( ) ; $ goc -> courseid = $ courseid ; $ goc -> outcomeid = $ this -> id ; $ DB -> insert_record ( 'grade_outcomes_courses' , $ goc ) ; } return true ; }
docstring: Mark outcome as used in a course
  
  @param int $courseid
  @return False if invalid courseid requested
docstring_tokens: Mark outcome as used in a course