How to add a new column to the Feedback table?

How to add a new column to the Feedback table?

by OMKAR A SAWANT . -
Number of replies: 0

I tried debugging the code today for adding the “Average” column to the table displayed on the Feedback page; however, I am stuck. Following steps show the progress I made today:

1. The table page begins in show_entries.php file (line 160):

// Show anonymous responses (always retrieve them even if current feedback is not anonymous).

$feedbackstructure->shuffle_anonym_responses();$totalrows = $anonresponsestable->get_total_responses_count();

if ($feedbackstructure->is_anonymous() || $totalrows)

{echo $OUTPUT->heading(get_string('anonymous_entries', 'feedback', $totalrows), 4); $anonresponsestable->display();}

2. This get_total_responses_count() function is defined in the file responses_table.php:

The lines of code responsible for displaying the table in responses_table.php file are:

(line 440)

$this->out($this->showall ? $grandtotal : FEEDBACK_DEFAULT_PAGE_COUNT,

            $grandtotal > FEEDBACK_DEFAULT_PAGE_COUNT);

3. The out() function is defined in moodle>lib>tablelib.php:

The lines of code defining out() function are (line 2140 onwards):

function out($pagesize, $useinitialsbar, $downloadhelpbutton='') {

$this->define_columns(array_keys((array)$onerow));$this->define_headers(array_keys((array)$onerow));


Can you please provide some guidance on how to move forward from here?

Average of ratings: -