123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <?php
- defined('MOODLE_INTERNAL') || die();
- global $OUTPUT, $CFG, $DB;
- require_once($CFG->dirroot . '/mod/nasatlx/lib.php');
- require_once($CFG->dirroot . '/mod/nasatlx/locallib.php');
- $action = optional_param('action', 'view', PARAM_TEXT);
- $ilm_id = optional_param('ilm_id', 0, PARAM_INT);
- $ilm_param_id = optional_param('ilm_param_id', 0, PARAM_INT);
- $ilm_id_parent = optional_param('ilm_id_parent', 0, PARAM_INT);
- $status = optional_param('status', 0, PARAM_INT);
- if (!$action && !$ilm_id) {
- return;
- }
- $str = '';
- if ($action == 'view') {
-
- $url_export_all = new moodle_url('/mod/nasatlx/settings_nasatlx_line.php', array('action' => 'export'));
- $action_add = new popup_action('click', $url_export_all, 'popup', array('width' => 900, 'height' => 650));
- $link_export_all = $OUTPUT->action_link($url_export_all, get_string('export_all_nasatlx', 'nasatlx'), $action_add) . $OUTPUT->help_icon('export_all_nasatlx', 'nasatlx');
-
-
-
-
-
-
-
- $nasatlx_list = $DB->get_records_sql("SELECT * FROM {nasatlx} WHERE 1 = 1");
-
- $str .= '<table id="outlinetable" class="generaltable boxaligncenter" cellpadding="5" width="100%">' . chr(13);
- $str .= '<tr><td colspan=2 align=left>' . $link_export_all . '</td>';
-
- if ($nasatlx_list) {
- foreach ($nasatlx_list as $item_quest) {
- $url_view_quest = new moodle_url('/admin/settings.php', array('section' => 'modsettingnasatlx', 'action' => 'config', 'ilm_id' => $item_quest->id));
-
- $str .= ' <tr>' . chr(13);
- $str .= ' <td class="header c1" width=75% title="fields: name, description"><strong>' . $item_quest->name . ' (' . $item_quest->id . ')</strong></td>' . chr(13);
- $str .= '<td class="header c1" width=10% ><strong title="course id">' . $item_quest->course . '</strong></td>' . chr(13);
-
-
- $str .= '</tr>';
- }
- }
- $str .= '</table>';
- $settings->add(new admin_setting_heading('nasatlx', get_string('view_nasatlx', 'nasatlx') . $OUTPUT->help_icon('modulename', 'nasatlx'), $str));
- }
- else if ($action == 'confirm_upgrade') {
-
- if (is_debugging()) print "nasatlx: settings.php: action==confirm_upgrade - to be implemented<br/>";
-
- }
- else if ($action == 'config') {
-
-
-
-
- }
|