original_string: public function prepare_example_summary(stdClass $example) {
  
          $summary = new workshop_example_submission_summary($this, $example);
  
          if (is_null($example->grade)) {
              $summary->status = 'notgraded';
              $summary->assesslabel = get_string('assess', 'workshop');
          } else {
              $summary->status = 'graded';
              $summary->assesslabel = get_string('reassess', 'workshop');
          }
  
          $summary->gradeinfo           = new stdclass();
          $summary->gradeinfo->received = $this->real_grade($example->grade);
          $summary->gradeinfo->max      = $this->real_grade(100);
  
          $summary->url       = new moodle_url($this->exsubmission_url($example->id));
          $summary->editurl   = new moodle_url($this->exsubmission_url($example->id), array('edit' => 'on'));
          $summary->assessurl = new moodle_url($this->exsubmission_url($example->id), array('assess' => 'on', 'sesskey' => sesskey()));
  
          return $summary;
      }
code: public function prepare_example_summary(stdClass $example) {
  
          $summary = new workshop_example_submission_summary($this, $example);
  
          if (is_null($example->grade)) {
              $summary->status = 'notgraded';
              $summary->assesslabel = get_string('assess', 'workshop');
          } else {
              $summary->status = 'graded';
              $summary->assesslabel = get_string('reassess', 'workshop');
          }
  
          $summary->gradeinfo           = new stdclass();
          $summary->gradeinfo->received = $this->real_grade($example->grade);
          $summary->gradeinfo->max      = $this->real_grade(100);
  
          $summary->url       = new moodle_url($this->exsubmission_url($example->id));
          $summary->editurl   = new moodle_url($this->exsubmission_url($example->id), array('edit' => 'on'));
          $summary->assessurl = new moodle_url($this->exsubmission_url($example->id), array('assess' => 'on', 'sesskey' => sesskey()));
  
          return $summary;
      }
code_tokens: public function prepare_example_summary ( stdClass $ example ) { $ summary = new workshop_example_submission_summary ( $ this , $ example ) ; if ( is_null ( $ example -> grade ) ) { $ summary -> status = 'notgraded' ; $ summary -> assesslabel = get_string ( 'assess' , 'workshop' ) ; } else { $ summary -> status = 'graded' ; $ summary -> assesslabel = get_string ( 'reassess' , 'workshop' ) ; } $ summary -> gradeinfo = new stdclass ( ) ; $ summary -> gradeinfo -> received = $ this -> real_grade ( $ example -> grade ) ; $ summary -> gradeinfo -> max = $ this -> real_grade ( 100 ) ; $ summary -> url = new moodle_url ( $ this -> exsubmission_url ( $ example -> id ) ) ; $ summary -> editurl = new moodle_url ( $ this -> exsubmission_url ( $ example -> id ) , array ( 'edit' => 'on' ) ) ; $ summary -> assessurl = new moodle_url ( $ this -> exsubmission_url ( $ example -> id ) , array ( 'assess' => 'on' , 'sesskey' => sesskey ( ) ) ) ; return $ summary ; }
docstring: Prepares renderable example submission summary component
  
  If the example is editable, the caller must set the 'editable' flag explicitly.
  
  @param stdClass $example as returned by {@link workshop::get_examples_for_manager()} or {@link workshop::get_examples_for_reviewer()}
  @return workshop_example_submission_summary to be rendered
docstring_tokens: Prepares renderable example submission summary component