original_string: public static function get_comments($gradeid, $pageno, $draft) {
          global $DB;
  
          $comments = array();
          $params = array('gradeid'=>$gradeid, 'pageno'=>$pageno, 'draft'=>1);
          if (!$draft) {
              $params['draft'] = 0;
          }
          // Fetch comments ordered by position on the page.
          $records = $DB->get_records('assignfeedback_editpdf_cmnt', $params, 'y, x');
          foreach ($records as $record) {
              array_push($comments, new comment($record));
          }
  
          return $comments;
      }
code: public static function get_comments($gradeid, $pageno, $draft) {
          global $DB;
  
          $comments = array();
          $params = array('gradeid'=>$gradeid, 'pageno'=>$pageno, 'draft'=>1);
          if (!$draft) {
              $params['draft'] = 0;
          }
          // Fetch comments ordered by position on the page.
          $records = $DB->get_records('assignfeedback_editpdf_cmnt', $params, 'y, x');
          foreach ($records as $record) {
              array_push($comments, new comment($record));
          }
  
          return $comments;
      }
code_tokens: public static function get_comments ( $ gradeid , $ pageno , $ draft ) { global $ DB ; $ comments = array ( ) ; $ params = array ( 'gradeid' => $ gradeid , 'pageno' => $ pageno , 'draft' => 1 ) ; if ( ! $ draft ) { $ params [ 'draft' ] = 0 ; } // Fetch comments ordered by position on the page. $ records = $ DB -> get_records ( 'assignfeedback_editpdf_cmnt' , $ params , 'y, x' ) ; foreach ( $ records as $ record ) { array_push ( $ comments , new comment ( $ record ) ) ; } return $ comments ; }
docstring: Get all comments for a page.
  @param int $gradeid
  @param int $pageno
  @param bool $draft
  @return comment[]
docstring_tokens: Get all comments for a page .