Exemple #1
0
    /**
     * Contructor.
     *
     * @param  string    $id                  An identifier for this report
     * @param  int|NULL  $userid              Id of the Moodle user who this report is being
     *                                        for
     * @param  int       $execution_mode      The mode in which this report is being executed
     *
     * @retrn none
     */
    function table_report($id, $userid = NULL, $execution_mode = php_report::EXECUTION_MODE_INTERACTIVE) {
        //set up variables in parent class
        parent::__construct($id, $userid, $execution_mode);

        $this->table           = new stdClass;
        $this->columns         = array();
        $this->headers         = array();
        $this->css_identifiers = array();
        $this->align           = array();
        $this->sortable        = array();
        $this->wrap            = array();
        $this->header_wrap     = array();
        $this->defsort         = '';
        $this->defdir          = '';
        $this->data            = array();
        $this->numrecs         = 0;
        $this->baseurl         = '';
        $this->sort            = '';
        $this->dir             = '';
        $this->page            = 0;
        $this->perpage         = 0;
        $this->fileformats     = array();
        $this->effective_url   = '';

        //horizontal bar stuff
        $this->ishorizontalbar = array();
        $this->totalcolumn = array();
        $this->displaystring = array();
        $this->displaypercentsign = array();
        $this->horizontalbarwidth = array();
        $this->horizontalbarheight = array();

        //mapping of column ids to the formats in which they will export
        $this->columnexportformats = array();

        //SQL statement that represents an aggregation on a per-column basis
        $this->aggregation_sql = array();
    }