]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12707 - moved hotpot/ lams to use new admin settings
authorpoltawski <poltawski>
Sat, 22 Dec 2007 19:57:46 +0000 (19:57 +0000)
committerpoltawski <poltawski>
Sat, 22 Dec 2007 19:57:46 +0000 (19:57 +0000)
lang/en_utf8/hotpot.php
lang/en_utf8/lams.php
mod/hotpot/config.html [deleted file]
mod/hotpot/settings.php [new file with mode: 0644]
mod/lams/config.html [deleted file]
mod/lams/settings.php [new file with mode: 0644]

index 6611c426ff6eb90dc7835fb331e8693f156b144b..fb7b446fdfcca184b6510f6bc788ad43ba747d96 100644 (file)
@@ -36,6 +36,7 @@ $string['error_nofeedbackurlwebpage'] = 'Please enter a URL for the webpage';
 $string['error_nofilename'] = 'Please enter a file name';
 $string['error_noquizzesfound'] = 'No Hot Potatoes quizzes found';
 $string['error_notfileorfolder'] = '&quot;$a&quot; is not file or folder';
+$string['excelencodings'] = 'Excel encodings';
 $string['feedbackformmail'] = 'Feedback form';
 $string['feedbackmoodleforum'] = 'Moodle forum';
 $string['feedbackmoodlemessaging'] = 'Moodle messaging';
@@ -139,6 +140,7 @@ $string['resultssaved'] = 'Quiz results were saved';
 $string['score'] = 'Score';
 $string['showhtmlsource'] = 'Show HTML source';
 $string['shownextquiz'] = 'Show next quiz';
+$string['showtimes'] = 'Show processing times';
 $string['showxmlsource'] = 'Show XML source';
 $string['showxmltree'] = 'Show XML tree';
 $string['specifictime'] = 'Specific time';
index bed655fb1f0e9488baa14566ee05c6354733c5ee..ce022d39e2b1fc68fe14e05046d8ed6abb6704c4 100644 (file)
@@ -21,8 +21,11 @@ $string['refreshSequenceList'] = 'Refresh sequence list';
 $string['selectExistingSequence'] = 'Select an existing sequence or create a new sequence.';
 $string['sequence'] = 'Select Sequence';
 $string['serverid'] = 'Enter the server ID received from <a href=\"http://www.lamsinternational.com\">LAMS international</a>.';
+$string['server_id'] = 'Server ID';
 $string['serverkey'] = 'Enter the server key received from <a href=\"http://www.lamsinternational.com\">LAMS international</a>.';
+$string['server_key'] = 'Server key';
 $string['serverurl'] = 'Enter the basic URL used to access the LAMS server. For example http://localhost:8080/lams';
+$string['server_url'] = 'Server URL';
 $string['useSequence'] = 'Use selected sequence';
 $string['visibletostudents'] = 'Show activity to students';
 $string['wikistartederror'] = 'Wiki already has entries - can\'t change.';
diff --git a/mod/hotpot/config.html b/mod/hotpot/config.html
deleted file mode 100644 (file)
index 096b72d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<form method="post" action="module.php" id="form">
-<input type="hidden" name="sesskey" value="<?PHP print isset($USER->sesskey) ? $USER->sesskey : '' ?>" />
-<div>
-<table cellpadding="9" cellspacing="0">
-    <tr valign="top">
-        <td align="right">hotpot_showtimes:</td>
-        <td><?PHP 
-            unset($choices);
-            $choices["0"] = get_string("no");
-            $choices["1"] = get_string("yes");
-            choose_from_menu ($choices, "hotpot_showtimes", $CFG->hotpot_showtimes, "");
-        ?></td>
-        <td><?PHP print_string("configshowtimes", "hotpot") ?></td>
-    </tr>
-    <tr valign="top">
-        <td align="right">hotpot_excelencodings:</td>
-        <td><input name="hotpot_excelencodings" type="text" size="30" value="<?PHP p($CFG->hotpot_excelencodings) ?>" /></td>
-        <td><?PHP print_string("configexcelencodings", "hotpot") ?></td>
-    </tr>
-    <tr>
-        <td colspan="3" align="center"><input type="submit" value="<?PHP print_string("savechanges") ?>" /></td>
-    </tr>
-</table>
-</div>
-</form>
diff --git a/mod/hotpot/settings.php b/mod/hotpot/settings.php
new file mode 100644 (file)
index 0000000..a84acc2
--- /dev/null
@@ -0,0 +1,9 @@
+<?php  //$Id$
+
+$settings->add(new admin_setting_configcheckbox('hotpot_showtimes', get_string('showtimes', 'hotpot'), 
+                    get_string('configshowtimes', 'hotpot'), 0) );
+
+$settings->add(new admin_setting_configtext('hotpot_excelencodings', get_string('excelencodings', 'hotpot'),
+                   get_string('configexcelencodings', 'hotpot'), '') );
+
+?>
diff --git a/mod/lams/config.html b/mod/lams/config.html
deleted file mode 100644 (file)
index 33257c2..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<form method="post" action="module.php" id="form">
-<div>
-<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
-
-<table cellpadding="9" cellspacing="0">
-<tr valign="top">
-    <th>server_url:</th>
-    <td> <input name="lams_serverurl" type="text" size="50" value="<?php if (isset($CFG->lams_serverurl)) p($CFG->lams_serverurl) ?>" /></td>
-    <td>
-    <?php print_string('serverurl', 'lams') ?>
-    </td>
-</tr>
-<tr valign="top">
-    <th>server_id:</th>
-    <td> <input name="lams_serverid" type="text" size="50" value="<?php if (isset($CFG->lams_serverid)) p($CFG->lams_serverid) ?>" />    </td>
-    <td>
-    <?php print_string('serverid', 'lams') ?>
-    </td>
-</tr>
-<tr valign="top">
-    <th>server_key:</th>
-    <td> <input name="lams_serverkey" type="text" size="50" value="<?php if (isset($CFG->lams_serverkey)) p($CFG->lams_serverkey) ?>" />    </td>
-    <td>
-    <?php print_string('serverkey', 'lams') ?>
-    </td>
-</tr>
-
-<tr>
-    <td colspan="3">
-    <input type="submit" value="<?php print_string("savechanges") ?>" /></td>
-</tr>
-</table>
-</div>
-</form>
diff --git a/mod/lams/settings.php b/mod/lams/settings.php
new file mode 100644 (file)
index 0000000..aae695f
--- /dev/null
@@ -0,0 +1,12 @@
+<?php  //$Id$
+
+$settings->add(new admin_setting_configtext('lams_serverurl', get_string('server_url', 'lams'), 
+                    get_string('serverurl', 'lams'), '') );
+
+$settings->add(new admin_setting_configtext('lams_serverid', get_string('server_id', 'lams'), 
+                    get_string('serverid', 'lams'), '') );
+
+$settings->add(new admin_setting_configtext('lams_serverkey', get_string('server_key', 'lams'), 
+                    get_string('serverkey', 'lams'), '') );
+
+?>