original_string: protected function get_current_assessment_data(stdclass $assessment) {
          global $DB;
  
          if (empty($this->dimensions)) {
              return array();
          }
          list($dimsql, $dimparams) = $DB->get_in_or_equal(array_keys($this->dimensions), SQL_PARAMS_NAMED);
          // beware! the caller may rely on the returned array is indexed by dimensionid
          $sql = "SELECT dimensionid, wg.*
                    FROM {workshop_grades} wg
                   WHERE assessmentid = :assessmentid AND strategy= :strategy AND dimensionid $dimsql";
          $params = array('assessmentid' => $assessment->id, 'strategy' => 'rubric');
          $params = array_merge($params, $dimparams);
  
          return $DB->get_records_sql($sql, $params);
      }
code: protected function get_current_assessment_data(stdclass $assessment) {
          global $DB;
  
          if (empty($this->dimensions)) {
              return array();
          }
          list($dimsql, $dimparams) = $DB->get_in_or_equal(array_keys($this->dimensions), SQL_PARAMS_NAMED);
          // beware! the caller may rely on the returned array is indexed by dimensionid
          $sql = "SELECT dimensionid, wg.*
                    FROM {workshop_grades} wg
                   WHERE assessmentid = :assessmentid AND strategy= :strategy AND dimensionid $dimsql";
          $params = array('assessmentid' => $assessment->id, 'strategy' => 'rubric');
          $params = array_merge($params, $dimparams);
  
          return $DB->get_records_sql($sql, $params);
      }
code_tokens: protected function get_current_assessment_data ( stdclass $ assessment ) { global $ DB ; if ( empty ( $ this -> dimensions ) ) { return array ( ) ; } list ( $ dimsql , $ dimparams ) = $ DB -> get_in_or_equal ( array_keys ( $ this -> dimensions ) , SQL_PARAMS_NAMED ) ; // beware! the caller may rely on the returned array is indexed by dimensionid $ sql = "SELECT dimensionid, wg.*
                    FROM {workshop_grades} wg
                   WHERE assessmentid = :assessmentid AND strategy= :strategy AND dimensionid $dimsql" ; $ params = array ( 'assessmentid' => $ assessment -> id , 'strategy' => 'rubric' ) ; $ params = array_merge ( $ params , $ dimparams ) ; return $ DB -> get_records_sql ( $ sql , $ params ) ; }
docstring: Returns the list of current grades filled by the reviewer indexed by dimensionid
  
  @param stdClass $assessment Assessment record
  @return array [int dimensionid] => stdclass workshop_grades record
docstring_tokens: Returns the list of current grades filled by the reviewer indexed by dimensionid