original_string: public function get_all_assessments() {
          global $DB;
  
          $reviewerfields = user_picture::fields('reviewer', null, 'revieweridx', 'reviewer');
          $authorfields   = user_picture::fields('author', null, 'authorid', 'author');
          $overbyfields   = user_picture::fields('overby', null, 'gradinggradeoverbyx', 'overby');
          list($sort, $params) = users_order_by_sql('reviewer');
          $sql = "SELECT a.id, a.submissionid, a.reviewerid, a.timecreated, a.timemodified,
                         a.grade, a.gradinggrade, a.gradinggradeover, a.gradinggradeoverby,
                         $reviewerfields, $authorfields, $overbyfields,
                         s.title
                    FROM {workshop_assessments} a
              INNER JOIN {user} reviewer ON (a.reviewerid = reviewer.id)
              INNER JOIN {workshop_submissions} s ON (a.submissionid = s.id)
              INNER JOIN {user} author ON (s.authorid = author.id)
               LEFT JOIN {user} overby ON (a.gradinggradeoverby = overby.id)
                   WHERE s.workshopid = :workshopid AND s.example = 0
                ORDER BY $sort";
          $params['workshopid'] = $this->id;
  
          return $DB->get_records_sql($sql, $params);
      }
code: public function get_all_assessments() {
          global $DB;
  
          $reviewerfields = user_picture::fields('reviewer', null, 'revieweridx', 'reviewer');
          $authorfields   = user_picture::fields('author', null, 'authorid', 'author');
          $overbyfields   = user_picture::fields('overby', null, 'gradinggradeoverbyx', 'overby');
          list($sort, $params) = users_order_by_sql('reviewer');
          $sql = "SELECT a.id, a.submissionid, a.reviewerid, a.timecreated, a.timemodified,
                         a.grade, a.gradinggrade, a.gradinggradeover, a.gradinggradeoverby,
                         $reviewerfields, $authorfields, $overbyfields,
                         s.title
                    FROM {workshop_assessments} a
              INNER JOIN {user} reviewer ON (a.reviewerid = reviewer.id)
              INNER JOIN {workshop_submissions} s ON (a.submissionid = s.id)
              INNER JOIN {user} author ON (s.authorid = author.id)
               LEFT JOIN {user} overby ON (a.gradinggradeoverby = overby.id)
                   WHERE s.workshopid = :workshopid AND s.example = 0
                ORDER BY $sort";
          $params['workshopid'] = $this->id;
  
          return $DB->get_records_sql($sql, $params);
      }
code_tokens: public function get_all_assessments ( ) { global $ DB ; $ reviewerfields = user_picture :: fields ( 'reviewer' , null , 'revieweridx' , 'reviewer' ) ; $ authorfields = user_picture :: fields ( 'author' , null , 'authorid' , 'author' ) ; $ overbyfields = user_picture :: fields ( 'overby' , null , 'gradinggradeoverbyx' , 'overby' ) ; list ( $ sort , $ params ) = users_order_by_sql ( 'reviewer' ) ; $ sql = "SELECT a.id, a.submissionid, a.reviewerid, a.timecreated, a.timemodified,
                         a.grade, a.gradinggrade, a.gradinggradeover, a.gradinggradeoverby,
                         $reviewerfields, $authorfields, $overbyfields,
                         s.title
                    FROM {workshop_assessments} a
              INNER JOIN {user} reviewer ON (a.reviewerid = reviewer.id)
              INNER JOIN {workshop_submissions} s ON (a.submissionid = s.id)
              INNER JOIN {user} author ON (s.authorid = author.id)
               LEFT JOIN {user} overby ON (a.gradinggradeoverby = overby.id)
                   WHERE s.workshopid = :workshopid AND s.example = 0
                ORDER BY $sort" ; $ params [ 'workshopid' ] = $ this -> id ; return $ DB -> get_records_sql ( $ sql , $ params ) ; }
docstring: Returns the list of all assessments in the workshop with some data added
  
  Fetches data from {workshop_assessments} and adds some useful information from other
  tables. The returned object does not contain textual fields (i.e. comments) to prevent memory
  lack issues.
  
  @return array [assessmentid] => assessment stdclass
docstring_tokens: Returns the list of all assessments in the workshop with some data added