original_string: public function get_examples_for_reviewer($reviewerid) {
          global $DB;
  
          if (empty($reviewerid)) {
              return false;
          }
          $sql = 'SELECT s.id, s.title,
                         a.id AS assessmentid, a.grade, a.gradinggrade
                    FROM {workshop_submissions} s
               LEFT JOIN {workshop_assessments} a ON (a.submissionid = s.id AND a.reviewerid = :reviewerid AND a.weight = 0)
                   WHERE s.example = 1 AND s.workshopid = :workshopid
                ORDER BY s.title';
          return $DB->get_records_sql($sql, array('workshopid' => $this->id, 'reviewerid' => $reviewerid));
      }
code: public function get_examples_for_reviewer($reviewerid) {
          global $DB;
  
          if (empty($reviewerid)) {
              return false;
          }
          $sql = 'SELECT s.id, s.title,
                         a.id AS assessmentid, a.grade, a.gradinggrade
                    FROM {workshop_submissions} s
               LEFT JOIN {workshop_assessments} a ON (a.submissionid = s.id AND a.reviewerid = :reviewerid AND a.weight = 0)
                   WHERE s.example = 1 AND s.workshopid = :workshopid
                ORDER BY s.title';
          return $DB->get_records_sql($sql, array('workshopid' => $this->id, 'reviewerid' => $reviewerid));
      }
code_tokens: public function get_examples_for_reviewer ( $ reviewerid ) { global $ DB ; if ( empty ( $ reviewerid ) ) { return false ; } $ sql = 'SELECT s.id, s.title,
                         a.id AS assessmentid, a.grade, a.gradinggrade
                    FROM {workshop_submissions} s
               LEFT JOIN {workshop_assessments} a ON (a.submissionid = s.id AND a.reviewerid = :reviewerid AND a.weight = 0)
                   WHERE s.example = 1 AND s.workshopid = :workshopid
                ORDER BY s.title' ; return $ DB -> get_records_sql ( $ sql , array ( 'workshopid' => $ this -> id , 'reviewerid' => $ reviewerid ) ) ; }
docstring: Returns the list of all example submissions in this workshop with the information of assessments done by the given user
  
  @param int $reviewerid user id
  @return array of objects, indexed by example submission id
  @see workshop::prepare_example_summary()
docstring_tokens: Returns the list of all example submissions in this workshop with the information of assessments done by the given user