original_string: public function setup_table() {
          /*
           * Table has 3 columns
           *| course  | final grade | rank (optional) |
           */
  
          // setting up table headers
          if ($this->showrank['any']) {
              $tablecolumns = array('coursename', 'grade', 'rank');
              $tableheaders = array($this->get_lang_string('coursename', 'grades'),
                                    $this->get_lang_string('grade'),
                                    $this->get_lang_string('rank', 'grades'));
          } else {
              $tablecolumns = array('coursename', 'grade');
              $tableheaders = array($this->get_lang_string('coursename', 'grades'),
                                    $this->get_lang_string('grade'));
          }
          $this->table = new flexible_table('grade-report-overview-'.$this->user->id);
  
          $this->table->define_columns($tablecolumns);
          $this->table->define_headers($tableheaders);
          $this->table->define_baseurl($this->baseurl);
  
          $this->table->set_attribute('cellspacing', '0');
          $this->table->set_attribute('id', 'overview-grade');
          $this->table->set_attribute('class', 'boxaligncenter generaltable');
  
          $this->table->setup();
      }
code: public function setup_table() {
          /*
           * Table has 3 columns
           *| course  | final grade | rank (optional) |
           */
  
          // setting up table headers
          if ($this->showrank['any']) {
              $tablecolumns = array('coursename', 'grade', 'rank');
              $tableheaders = array($this->get_lang_string('coursename', 'grades'),
                                    $this->get_lang_string('grade'),
                                    $this->get_lang_string('rank', 'grades'));
          } else {
              $tablecolumns = array('coursename', 'grade');
              $tableheaders = array($this->get_lang_string('coursename', 'grades'),
                                    $this->get_lang_string('grade'));
          }
          $this->table = new flexible_table('grade-report-overview-'.$this->user->id);
  
          $this->table->define_columns($tablecolumns);
          $this->table->define_headers($tableheaders);
          $this->table->define_baseurl($this->baseurl);
  
          $this->table->set_attribute('cellspacing', '0');
          $this->table->set_attribute('id', 'overview-grade');
          $this->table->set_attribute('class', 'boxaligncenter generaltable');
  
          $this->table->setup();
      }
code_tokens: public function setup_table ( ) { /*
           * Table has 3 columns
           *| course  | final grade | rank (optional) |
           */ // setting up table headers if ( $ this -> showrank [ 'any' ] ) { $ tablecolumns = array ( 'coursename' , 'grade' , 'rank' ) ; $ tableheaders = array ( $ this -> get_lang_string ( 'coursename' , 'grades' ) , $ this -> get_lang_string ( 'grade' ) , $ this -> get_lang_string ( 'rank' , 'grades' ) ) ; } else { $ tablecolumns = array ( 'coursename' , 'grade' ) ; $ tableheaders = array ( $ this -> get_lang_string ( 'coursename' , 'grades' ) , $ this -> get_lang_string ( 'grade' ) ) ; } $ this -> table = new flexible_table ( 'grade-report-overview-' . $ this -> user -> id ) ; $ this -> table -> define_columns ( $ tablecolumns ) ; $ this -> table -> define_headers ( $ tableheaders ) ; $ this -> table -> define_baseurl ( $ this -> baseurl ) ; $ this -> table -> set_attribute ( 'cellspacing' , '0' ) ; $ this -> table -> set_attribute ( 'id' , 'overview-grade' ) ; $ this -> table -> set_attribute ( 'class' , 'boxaligncenter generaltable' ) ; $ this -> table -> setup ( ) ; }
docstring: Prepares the headers and attributes of the flexitable.
docstring_tokens: Prepares the headers and attributes of the flexitable .