/**
  * TODO comment this
  */
 function __construct($report_id)
 {
     global $CFG;
     $this->report_id = $report_id;
     $this->dbc = new ilp_db();
     // call the parent constructor
     parent::__construct("{$CFG->wwwroot}/blocks/ilp/actions/report_entry_preview.php?report_id={$this->report_id}");
 }
 function __construct($report_id, $plugin_id, $creator_id, $reportfield_id = null)
 {
     global $CFG;
     $this->report_id = $report_id;
     $this->plugin_id = $plugin_id;
     $this->creator_id = $creator_id;
     $this->reportfield_id = $reportfield_id;
     $this->dbc = new ilp_db();
     parent::__construct("{$CFG->wwwroot}/blocks/ilp/actions/edit_field.php?plugin_id={$plugin_id}&report_id={$report_id}");
 }
 /**
  * TODO comment this
  */
 function __construct($report_id)
 {
     global $CFG;
     $this->report_id = $report_id;
     // include the ilb db
     require_once $CFG->dirroot . '/blocks/ilp/db/ilp_db.php';
     $this->dbc = new ilp_db();
     // call the parent constructor
     parent::__construct("{$CFG->wwwroot}/blocks/ilp/actions/edit_report_permissions.php?report_id={$this->report_id}");
 }
 /**
  * TODO comment this
  */
 function __construct($report_id = null)
 {
     global $CFG;
     $this->report_id = $report_id;
     $this->dbc = new ilp_db();
     $this->tablename = "block_ilp_plu_sts";
     $this->items_tablename = "block_ilp_plu_sts_items";
     $this->data_entry_tablename = "block_ilp_plu_sts_ent";
     // call the parent constructor
     parent::__construct("{$CFG->wwwroot}/blocks/ilp/actions/edit_status_items.php?report_id={$this->report_id}");
 }
 /**
  * TODO comment this
  */
 function __construct($report_id, $entry_id, $user_id, $course_id = NULL, $comment_id = NULL, $selectedtab = NULL, $tabitem = NULL)
 {
     global $CFG;
     $this->course_id = $course_id;
     $this->report_id = $report_id;
     $this->entry_id = $entry_id;
     $this->user_id = $user_id;
     $this->comment_id = $comment_id;
     $this->selectedtab = $selectedtab;
     $this->tabitem = $tabitem;
     $this->dbc = new ilp_db();
     // call the parent constructor
     parent::__construct("{$CFG->wwwroot}/blocks/ilp/actions/edit_entrycomment.php?course_id={$this->course_id}&report_id={$this->report_id}&entry_id={$this->entry_id}&user_id={$this->user_id}&comment_id={$this->comment_id}&selectedtab={$this->selectedtab}&tabitem={$this->tabitem}");
 }
 /**
  * TODO comment this
  */
 function __construct($report_id, $user_id, $entry_id = null, $course_id = null)
 {
     global $CFG;
     $this->course_id = $course_id;
     $this->report_id = $report_id;
     $this->user_id = $user_id;
     $this->entry_id = $entry_id;
     $this->dbc = new ilp_db();
     $query_string = "?report_id={$report_id}&user_id={$user_id}";
     if (!empty($entry_id)) {
         $query_string .= "&entry_id={$entry_id}";
     }
     if (!empty($course_id)) {
         $query_string .= "&course_id={$course_id}";
     }
     // call the parent constructor
     parent::__construct("{$CFG->wwwroot}/blocks/ilp/actions/edit_reportentry.php");
 }
 /**
  * TODO comment this
  */
 function __construct($pluginname, $type)
 {
     global $CFG, $PARSER;
     $this->pluginname = $pluginname;
     $this->dbc = new ilp_db();
     //choose the plugins class directory based on the table
     switch ($type) {
         case 'mis':
             $this->plugintable = 'block_ilp_mis_plugin';
             $this->plugindirectory = 'dashboard/mis/';
             break;
         case 'formelement':
             $this->plugintable = 'block_ilp_mis_plugin';
             $this->plugindirectory = 'form_elements/plugins/';
             break;
         case 'templateplugin':
             $this->plugintable = 'block_ilp_dash_plugin';
             $this->plugindirectory = 'dashboard/plugins/';
             break;
         case 'tab':
             $this->plugintable = 'block_ilp_dash_tab';
             $this->plugindirectory = 'dashboard/tabs/';
             break;
         case 'template':
             $this->plugintable = 'block_ilp_dash_temp';
             $this->plugindirectory = 'dashboard/templates/';
             break;
         default:
             $this->plugintable = '';
             $this->plugindirectory = '';
             break;
     }
     $params = $PARSER->get_params();
     $urlparams = "";
     foreach ($params as $k => $v) {
         $urlparams .= "{$k}={$v}&";
     }
     // call the parent constructor
     parent::__construct("{$CFG->wwwroot}/blocks/ilp/actions/edit_plugin_config.php?{$urlparams}");
 }
 /**
  * Creates a select element with a description on the config page for the plugin
  * 
  * @param ilp_moodleform $mform the form that the select element will be added to
  * @param string $elementname the name of the element this will be saved to the s
  * 							  block_config table with the value
  * @param string $label the label to be put on the select element
  * @param array $options options to be placed in the select
  * @param strnig $description a description of what should be in the config element
  * @param mixed $defaultvalue the default contents of the text element 
  */
 function config_date_element(&$mform, $elementname, $label, $description, $defaultvalue = '')
 {
     $configsetting = get_config('block_ilp', $elementname);
     $value = !empty($configsetting) ? $configsetting : $defaultvalue;
     $mform->addElement('date_selector', "s_{$elementname}", $label, array('class' => 'form_input'));
     $mform->addElement('static', "{$elementname}_desc", NULL, $description);
     $mform->setDefault("s_{$elementname}", $value);
 }