summaryrefslogtreecommitdiff
path: root/sqlbox/index.php
diff options
context:
space:
mode:
authorJan Klemkow <j.klemkow@wemelug.de>2012-10-09 15:28:22 +0200
committerJan Klemkow <j.klemkow@wemelug.de>2012-10-09 15:28:22 +0200
commit5c7511c7c64f62f44244ba1c9f1aac9952c564e1 (patch)
tree9f10a75a48b2d7df333ada2f6d750dddf430bafb /sqlbox/index.php
parent459313e56b0653e4709694a7e86afc11be514097 (diff)
downloadsqltutor-plugin-5c7511c7c64f62f44244ba1c9f1aac9952c564e1.tar.gz
sqltutor-plugin-5c7511c7c64f62f44244ba1c9f1aac9952c564e1.tar.bz2
sqltutor-plugin-5c7511c7c64f62f44244ba1c9f1aac9952c564e1.zip
Rename 'newmodule' into sqlbox in all files.
Diffstat (limited to 'sqlbox/index.php')
-rw-r--r--sqlbox/index.php30
1 files changed, 14 insertions, 16 deletions
diff --git a/sqlbox/index.php b/sqlbox/index.php
index 60e85d0..b4c9456 100644
--- a/sqlbox/index.php
+++ b/sqlbox/index.php
@@ -22,13 +22,11 @@
* if you like, and it can span multiple lines.
*
* @package mod
- * @subpackage newmodule
- * @copyright 2011 Your Name
+ * @subpackage sqlbox
+ * @copyright 2012 Jan Klemkow, Benjamin Franzke
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-/// Replace newmodule with the name of your module and remove this line
-
require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
require_once(dirname(__FILE__).'/lib.php');
@@ -38,19 +36,19 @@ $course = $DB->get_record('course', array('id' => $id), '*', MUST_EXIST);
require_course_login($course);
-add_to_log($course->id, 'newmodule', 'view all', 'index.php?id='.$course->id, '');
+add_to_log($course->id, 'sqlbox', 'view all', 'index.php?id='.$course->id, '');
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
-$PAGE->set_url('/mod/newmodule/index.php', array('id' => $id));
+$PAGE->set_url('/mod/sqlbox/index.php', array('id' => $id));
$PAGE->set_title(format_string($course->fullname));
$PAGE->set_heading(format_string($course->fullname));
$PAGE->set_context($coursecontext);
echo $OUTPUT->header();
-if (! $newmodules = get_all_instances_in_course('newmodule', $course)) {
- notice(get_string('nonewmodules', 'newmodule'), new moodle_url('/course/view.php', array('id' => $course->id)));
+if (! $sqlboxs = get_all_instances_in_course('sqlbox', $course)) {
+ notice(get_string('nosqlboxs', 'sqlbox'), new moodle_url('/course/view.php', array('id' => $course->id)));
}
if ($course->format == 'weeks') {
@@ -64,25 +62,25 @@ if ($course->format == 'weeks') {
$table->align = array('left', 'left', 'left');
}
-foreach ($newmodules as $newmodule) {
- if (!$newmodule->visible) {
+foreach ($sqlboxs as $sqlbox) {
+ if (!$sqlbox->visible) {
$link = html_writer::link(
- new moodle_url('/mod/newmodule.php', array('id' => $newmodule->coursemodule)),
- format_string($newmodule->name, true),
+ new moodle_url('/mod/sqlbox.php', array('id' => $sqlbox->coursemodule)),
+ format_string($sqlbox->name, true),
array('class' => 'dimmed'));
} else {
$link = html_writer::link(
- new moodle_url('/mod/newmodule.php', array('id' => $newmodule->coursemodule)),
- format_string($newmodule->name, true));
+ new moodle_url('/mod/sqlbox.php', array('id' => $sqlbox->coursemodule)),
+ format_string($sqlbox->name, true));
}
if ($course->format == 'weeks' or $course->format == 'topics') {
- $table->data[] = array($newmodule->section, $link);
+ $table->data[] = array($sqlbox->section, $link);
} else {
$table->data[] = array($link);
}
}
-echo $OUTPUT->heading(get_string('modulenameplural', 'newmodule'), 2);
+echo $OUTPUT->heading(get_string('modulenameplural', 'sqlbox'), 2);
echo html_writer::table($table);
echo $OUTPUT->footer();