Beispiel #1
0
 * @package    local_datahub
 * @author     Remote-Learner.net Inc
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 * @copyright  (C) 2008-2013 Remote-Learner.net Inc (http://www.remote-learner.net)
 *
 */
require_once '../../../../config.php';
$file = get_plugin_directory('dhexport', 'version1') . '/lib.php';
require_once $file;
//permissions checking
require_login();
$context = context_system::instance();
require_capability('moodle/site:config', $context);
//handle submitted actions
$baseurl = $CFG->wwwroot . '/local/datahub/exportplugins/version1/config_fields.php';
rlipexport_version1_config::handle_field_action($baseurl);
//page header
rlipexport_version1_page_setup($baseurl);
echo $OUTPUT->header();
//initialize the display table
$table = new html_table();
$table->head = array(get_string('profilefieldname', 'dhexport_version1'), get_string('columnheader', 'dhexport_version1'), '', '', '');
$table->data = array();
//fill table rows with selected field information
//information used to track first / last rows
$first = true;
$max_order = $DB->get_field(RLIPEXPORT_VERSION1_FIELD_TABLE, 'MAX(fieldorder)', array());
if ($recordset = rlipexport_version1_config::get_configured_fields()) {
    foreach ($recordset as $record) {
        //text box for setting header
        $attributes = array('type' => 'text', 'name' => 'header_' . $record->id, 'value' => $record->header);