original_string: public static function get_annotations($gradeid, $pageno, $draft) {
          global $DB;
  
          $params = array('gradeid'=>$gradeid, 'pageno'=>$pageno, 'draft'=>1);
          if (!$draft) {
              $params['draft'] = 0;
          }
          $annotations = array();
          $records = $DB->get_records('assignfeedback_editpdf_annot', $params);
          foreach ($records as $record) {
              array_push($annotations, new annotation($record));
          }
  
          return $annotations;
      }
code: public static function get_annotations($gradeid, $pageno, $draft) {
          global $DB;
  
          $params = array('gradeid'=>$gradeid, 'pageno'=>$pageno, 'draft'=>1);
          if (!$draft) {
              $params['draft'] = 0;
          }
          $annotations = array();
          $records = $DB->get_records('assignfeedback_editpdf_annot', $params);
          foreach ($records as $record) {
              array_push($annotations, new annotation($record));
          }
  
          return $annotations;
      }
code_tokens: public static function get_annotations ( $ gradeid , $ pageno , $ draft ) { global $ DB ; $ params = array ( 'gradeid' => $ gradeid , 'pageno' => $ pageno , 'draft' => 1 ) ; if ( ! $ draft ) { $ params [ 'draft' ] = 0 ; } $ annotations = array ( ) ; $ records = $ DB -> get_records ( 'assignfeedback_editpdf_annot' , $ params ) ; foreach ( $ records as $ record ) { array_push ( $ annotations , new annotation ( $ record ) ) ; } return $ annotations ; }
docstring: Get all annotations for a page.
  @param int $gradeid
  @param int $pageno
  @param bool $draft
  @return annotation[]
docstring_tokens: Get all annotations for a page .