original_string: public function prepare_example_assessment(stdClass $record, $form = null, array $options = array()) {
  
          $assessment             = new workshop_example_assessment($this, $record, $options);
          $assessment->url        = $this->exassess_url($record->id);
          $assessment->maxgrade   = $this->real_grade(100);
  
          if (!empty($options['showform']) and !($form instanceof workshop_assessment_form)) {
              debugging('Not a valid instance of workshop_assessment_form supplied', DEBUG_DEVELOPER);
          }
  
          if (!empty($options['showform']) and ($form instanceof workshop_assessment_form)) {
              $assessment->form = $form;
          }
  
          if (!is_null($record->grade)) {
              $assessment->realgrade = $this->real_grade($record->grade);
          }
  
          $assessment->weight = null;
  
          return $assessment;
      }
code: public function prepare_example_assessment(stdClass $record, $form = null, array $options = array()) {
  
          $assessment             = new workshop_example_assessment($this, $record, $options);
          $assessment->url        = $this->exassess_url($record->id);
          $assessment->maxgrade   = $this->real_grade(100);
  
          if (!empty($options['showform']) and !($form instanceof workshop_assessment_form)) {
              debugging('Not a valid instance of workshop_assessment_form supplied', DEBUG_DEVELOPER);
          }
  
          if (!empty($options['showform']) and ($form instanceof workshop_assessment_form)) {
              $assessment->form = $form;
          }
  
          if (!is_null($record->grade)) {
              $assessment->realgrade = $this->real_grade($record->grade);
          }
  
          $assessment->weight = null;
  
          return $assessment;
      }
code_tokens: public function prepare_example_assessment ( stdClass $ record , $ form = null , array $ options = array ( ) ) { $ assessment = new workshop_example_assessment ( $ this , $ record , $ options ) ; $ assessment -> url = $ this -> exassess_url ( $ record -> id ) ; $ assessment -> maxgrade = $ this -> real_grade ( 100 ) ; if ( ! empty ( $ options [ 'showform' ] ) and ! ( $ form instanceof workshop_assessment_form ) ) { debugging ( 'Not a valid instance of workshop_assessment_form supplied' , DEBUG_DEVELOPER ) ; } if ( ! empty ( $ options [ 'showform' ] ) and ( $ form instanceof workshop_assessment_form ) ) { $ assessment -> form = $ form ; } if ( ! is_null ( $ record -> grade ) ) { $ assessment -> realgrade = $ this -> real_grade ( $ record -> grade ) ; } $ assessment -> weight = null ; return $ assessment ; }
docstring: Prepares renderable example submission's assessment component
  
  The $options array supports the following keys:
  showauthor - should the author user info be available for the renderer
  showreviewer - should the reviewer user info be available for the renderer
  showform - show the assessment form if it is available
  
  @param stdClass $record as returned by eg {@link self::get_assessment_by_id()}
  @param workshop_assessment_form|null $form as returned by {@link workshop_strategy::get_assessment_form()}
  @param array $options
  @return workshop_example_assessment
docstring_tokens: Prepares renderable example submission s assessment component