original_string: public static function get_current_completed_tmp($feedbackid, $courseid = 0) {
          global $PAGE;
  
          $params = array('feedbackid' => $feedbackid, 'courseid' => $courseid);
          $params = self::validate_parameters(self::get_current_completed_tmp_parameters(), $params);
          $warnings = array();
  
          list($feedback, $course, $cm, $context, $completioncourse) = self::validate_feedback($params['feedbackid'],
              $params['courseid']);
          $feedbackcompletion = new mod_feedback_completion($feedback, $cm, $completioncourse->id);
  
          if ($completed = $feedbackcompletion->get_current_completed_tmp()) {
              $exporter = new feedback_completedtmp_exporter($completed);
              return array(
                  'feedback' => $exporter->export($PAGE->get_renderer('core')),
                  'warnings' => $warnings,
              );
          }
          throw new moodle_exception('not_started', 'feedback');
      }
code: public static function get_current_completed_tmp($feedbackid, $courseid = 0) {
          global $PAGE;
  
          $params = array('feedbackid' => $feedbackid, 'courseid' => $courseid);
          $params = self::validate_parameters(self::get_current_completed_tmp_parameters(), $params);
          $warnings = array();
  
          list($feedback, $course, $cm, $context, $completioncourse) = self::validate_feedback($params['feedbackid'],
              $params['courseid']);
          $feedbackcompletion = new mod_feedback_completion($feedback, $cm, $completioncourse->id);
  
          if ($completed = $feedbackcompletion->get_current_completed_tmp()) {
              $exporter = new feedback_completedtmp_exporter($completed);
              return array(
                  'feedback' => $exporter->export($PAGE->get_renderer('core')),
                  'warnings' => $warnings,
              );
          }
          throw new moodle_exception('not_started', 'feedback');
      }
code_tokens: public static function get_current_completed_tmp ( $ feedbackid , $ courseid = 0 ) { global $ PAGE ; $ params = array ( 'feedbackid' => $ feedbackid , 'courseid' => $ courseid ) ; $ params = self :: validate_parameters ( self :: get_current_completed_tmp_parameters ( ) , $ params ) ; $ warnings = array ( ) ; list ( $ feedback , $ course , $ cm , $ context , $ completioncourse ) = self :: validate_feedback ( $ params [ 'feedbackid' ] , $ params [ 'courseid' ] ) ; $ feedbackcompletion = new mod_feedback_completion ( $ feedback , $ cm , $ completioncourse -> id ) ; if ( $ completed = $ feedbackcompletion -> get_current_completed_tmp ( ) ) { $ exporter = new feedback_completedtmp_exporter ( $ completed ) ; return array ( 'feedback' => $ exporter -> export ( $ PAGE -> get_renderer ( 'core' ) ) , 'warnings' => $ warnings , ) ; } throw new moodle_exception ( 'not_started' , 'feedback' ) ; }
docstring: Returns the temporary completion record for the current user.
  
  @param int $feedbackid feedback instance id
  @param int $courseid course where user completes the feedback (for site feedbacks only)
  @return array of warnings and status result
  @since Moodle 3.3
  @throws moodle_exception
docstring_tokens: Returns the temporary completion record for the current user .