original_string: public function mark_complete() {
          // Create record
          $this->timecompleted = time();
  
          // Save record
          if ($this->id) {
              $this->update();
          } else {
              $this->insert();
          }
  
          // Mark course completion record as started (if not already)
          $cc = array(
              'course'    => $this->course,
              'userid'    => $this->userid
          );
          $ccompletion = new completion_completion($cc);
          $ccompletion->mark_inprogress($this->timecompleted);
      }
code: public function mark_complete() {
          // Create record
          $this->timecompleted = time();
  
          // Save record
          if ($this->id) {
              $this->update();
          } else {
              $this->insert();
          }
  
          // Mark course completion record as started (if not already)
          $cc = array(
              'course'    => $this->course,
              'userid'    => $this->userid
          );
          $ccompletion = new completion_completion($cc);
          $ccompletion->mark_inprogress($this->timecompleted);
      }
code_tokens: public function mark_complete ( ) { // Create record $ this -> timecompleted = time ( ) ; // Save record if ( $ this -> id ) { $ this -> update ( ) ; } else { $ this -> insert ( ) ; } // Mark course completion record as started (if not already) $ cc = array ( 'course' => $ this -> course , 'userid' => $ this -> userid ) ; $ ccompletion = new completion_completion ( $ cc ) ; $ ccompletion -> mark_inprogress ( $ this -> timecompleted ) ; }
docstring: Mark this criteria complete for the associated user
  
  This method creates a course_completion_crit_compl record
docstring_tokens: Mark this criteria complete for the associated user