Esempio n. 1
0
 /**
  * Set up the table.
  * @param table_sql $table the table being constructed.
  * @param array $columns the list of columns.
  * @param array $headers the columns headings.
  * @param moodle_url $reporturl the URL of this report.
  * @param mod_quiz_attempts_report_options $options the display options.
  * @param bool $collapsible whether to allow columns in the report to be collapsed.
  */
 protected function set_up_table_columns($table, $columns, $headers, $reporturl, mod_quiz_attempts_report_options $options, $collapsible)
 {
     $table->define_columns($columns);
     $table->define_headers($headers);
     $table->sortable(true, 'uniqueid');
     $table->define_baseurl($options->get_url());
     $this->configure_user_columns($table);
     $table->no_sorting('feedbacktext');
     $table->column_class('sumgrades', 'bold');
     $table->set_attribute('id', 'attempts');
     $table->collapsible($collapsible);
 }
Esempio n. 2
0
 /**
  * Defines columns
  * @param array $columns an array of identifying names for columns. If
  * columns are sorted then column names must correspond to a field in sql.
  */
 public function define_columns($columns)
 {
     parent::define_columns($columns);
     foreach ($this->columns as $column => $column) {
         // Automatically assign classes to columns.
         $this->column_class[$column] = ' ' . $column;
     }
 }