##Sortable Table Plug-in for Moodle
####Note: This is a work in progress
-
Clone repo into moodle's /mod/ directory.
-
Require mod/sortableTable.php
-
Create new SortableTable()
-
Create an assosiative array represnting the row. Use the header name as the key and the data to be displayed in that column as the value.
-
Pass the array to the table using the add_row($row) function.
This function is not required. And header included in a row will automatically be added to the table.
- Pass the name of the desired column header to the table using the add_header($string) function.
Simply call the print_table() function to echo the table onto the page.
#####OR
-
Call generate_external_includes() to add scripts to the page
-
Call generate_dataset() to have a string representation of the dataset returned. (Note: this is a javascript dataset).
-
Call generate_table_script() to have a string representation of the table building script returned. (Note: this is javascript).