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;
    }
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;
    }
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 ; }
Get all comments for a page.
@param int $gradeid
@param int $pageno
@param bool $draft
@return comment[]
Get all comments for a page .