]> git.mjollnir.org Git - moodle.git/commitdiff
Various small fixes across all modules. Most notable was the revised
authormartin <martin>
Fri, 31 May 2002 09:07:11 +0000 (09:07 +0000)
committermartin <martin>
Fri, 31 May 2002 09:07:11 +0000 (09:07 +0000)
use of add_to_log, and the new logging format.

20 files changed:
mod/choice/index.php
mod/choice/install.sql [deleted file]
mod/choice/mod.html
mod/choice/report.php
mod/choice/view.php
mod/journal/edit.php
mod/journal/index.php
mod/journal/install.sql [deleted file]
mod/journal/mod.html
mod/journal/report.php
mod/journal/view.php
mod/survey/details.php
mod/survey/download.php
mod/survey/edit.php
mod/survey/index.php
mod/survey/install.sql [deleted file]
mod/survey/mod.html
mod/survey/report.php
mod/survey/save.php
mod/survey/view.php

index 51f07adaa14548359f4626fff4f0f281d40ec336..d3834145652c6a442a7cfb2641e955cbe6af84f6 100644 (file)
@@ -10,7 +10,7 @@
 
     require_login($course->id);
 
-    add_to_log("View list of all choices", $course->id);
+    add_to_log($course->id, "choice", "view all", "index?id=$course->id", "");
 
     print_header("$course->shortname: Choices", "$course->fullname",
                  "<A HREF=../../course/view.php?id=$course->id>$course->shortname</A> -> Choices", "");
diff --git a/mod/choice/install.sql b/mod/choice/install.sql
deleted file mode 100755 (executable)
index 6e747a4..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-# phpMyAdmin MySQL-Dump\r
-# version 2.2.1\r
-# http://phpwizard.net/phpMyAdmin/\r
-# http://phpmyadmin.sourceforge.net/ (download page)\r
-#\r
-# Host: localhost\r
-# Generation Time: Nov 14, 2001 at 04:44 PM\r
-# Server version: 3.23.36\r
-# PHP Version: 4.0.6\r
-# Database : `moodle`\r
-# --------------------------------------------------------\r
-\r
-#\r
-# Table structure for table `choice`\r
-#\r
-\r
-CREATE TABLE choice (\r
-  id int(10) unsigned NOT NULL auto_increment,\r
-  course int(10) unsigned NOT NULL default '0',\r
-  name varchar(255) NOT NULL default '',\r
-  text text NOT NULL,\r
-  answer1 varchar(255) NOT NULL default 'Yes',\r
-  answer2 varchar(255) NOT NULL default 'No',\r
-  timemodified int(10) unsigned NOT NULL default '0',\r
-  PRIMARY KEY  (id),\r
-  UNIQUE KEY id (id)\r
-) TYPE=MyISAM;\r
-# --------------------------------------------------------\r
-\r
-#\r
-# Table structure for table `choice_answers`\r
-#\r
-\r
-CREATE TABLE choice_answers (\r
-  id int(10) unsigned NOT NULL auto_increment,\r
-  choice int(10) unsigned NOT NULL default '0',\r
-  user int(10) unsigned NOT NULL default '0',\r
-  answer tinyint(4) NOT NULL default '0',\r
-  timemodified int(10) NOT NULL default '0',\r
-  PRIMARY KEY  (id),\r
-  UNIQUE KEY id (id)\r
-) TYPE=MyISAM;\r
-\r
index 2f592bd9f6dd5e3903c8717046b44996986c6445..ba9a919d7691ea351550f654e7d7d5e6e7c142c8 100644 (file)
@@ -44,6 +44,7 @@
 
 <CENTER>
 <input type="hidden" name=course     value="<? p($form->course) ?>">
+<input type="hidden" name=coursemodule  value="<? p($form->coursemodule) ?>">
 <input type="hidden" name=week       value="<? p($form->week) ?>">
 <input type="hidden" name=module     value="<? p($form->module) ?>">
 <input type="hidden" name=modulename value="<? p($form->modulename) ?>">
index 7c4049c9b7907b1cad733322e5ca1022cb841b1b..9ec4822d35bb0dcc08fa57810da3140b61c1b025 100644 (file)
@@ -22,7 +22,7 @@
         error("Course module is incorrect");
     }
 
-    add_to_log("View choices report", $course->id);
+    add_to_log($course->id, "choice", "report", "report.php?id=$cm->id", "$choice->id");
 
     print_header("$course->shortname: $choice->name: Responses", "$course->fullname",
                  "<A HREF=/course/view.php?id=$course->id>$course->shortname</A> ->
index 901d92831327e840b67a7f70fa1e0b9b04bef976..d4f166f91f55c4b6a5a36aa7631b49a73d9a22d6 100644 (file)
     if (match_referer() && isset($HTTP_POST_VARS)) {    // form submitted
         $form = (object)$HTTP_POST_VARS;
         if ($current) {
-            add_to_log("Update choice: $choice->name", $course->id);
             if (! update_choice_in_database($current, $form->answer)) {
                 error("Could not update your choice");
             }
+            add_to_log($course->id, "choice", "update", "view.php?id=$cm->id", "$choice->id");
         } else {
-            add_to_log("Save choice: $choice->name", $course->id);
             if (! add_new_choice_to_database($choice, $form->answer)) {
                 error("Could not save your choice");
             }
+            add_to_log($course->id, "choice", "add", "view.php?id=$cm->id", "$choice->id");
         }
         redirect("$CFG->wwwroot/course/view.php?id=$course->id");
         exit;
     }
 
-    add_to_log("View choice: $choice->name", $course->id);
+    add_to_log($course->id, "choice", "view", "view.php?id=$cm->id", "$choice->id");
+
     print_header("$course->shortname: $choice->name", "$course->fullname",
                  "<A HREF=../../course/view.php?id=$course->id>$course->shortname</A> -> 
                   <A HREF=index.php?id=$course->id>Choices</A> -> $choice->name", "");
index ea2cfc3cacf91eaa5b10ca38c5bd6ef776be36bf..fdd575b09d85b6657c4f4def9882bf5fcb46c8f7 100644 (file)
                        if (! update_record("journal_entries", $newentry)) {
                                error("Could not update your journal");
                        }
-            add_to_log("Update journal: $journal->name", $course->id);
+            add_to_log($course->id, "journal", "update entry", "view.php?id=$cm->id", "$newentry->id");
                } else {
             $newentry->user = $USER->id;
             $newentry->journal = $journal->id;
             $newentry->modified = $timenow;
             $newentry->text = $text;
-                       if (! insert_record("journal_entries", $newentry)) {
+                       if (! $newentry->id = insert_record("journal_entries", $newentry)) {
                                error("Could not insert a new journal entry");
                        }
-            add_to_log("Add journal: $journal->name", $course->id);
+            add_to_log($course->id, "journal", "add entry", "view.php?id=$cm->id", "$newentry->id");
                } 
                
                redirect("view.php?id=$cm->id");
index 014f249e21c0e328d634ce7b751cc63c8eb43131..332949374fce334c3721bf58fb50263562ec4e83 100644 (file)
@@ -10,7 +10,7 @@
     }
 
     require_login($course->id);
-    add_to_log("View all journals", $course->id);
+    add_to_log($course->id, "journal", "view all", "index.php?id=$course->id", "");
 
     print_header("$course->shortname: Journals", "$course->fullname",
                  "<A HREF=../../course/view.php?id=$course->id>$course->shortname</A> -> Journals", "");
diff --git a/mod/journal/install.sql b/mod/journal/install.sql
deleted file mode 100755 (executable)
index d33e36f..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# phpMyAdmin MySQL-Dump\r
-# version 2.2.1\r
-# http://phpwizard.net/phpMyAdmin/\r
-# http://phpmyadmin.sourceforge.net/ (download page)\r
-#\r
-# Host: localhost\r
-# Generation Time: Nov 14, 2001 at 04:44 PM\r
-# Server version: 3.23.36\r
-# PHP Version: 4.0.6\r
-# Database : `moodle`\r
-# --------------------------------------------------------\r
-\r
-#\r
-# Table structure for table `journal`\r
-#\r
-\r
-CREATE TABLE journal (\r
-  id int(10) unsigned NOT NULL auto_increment,\r
-  course int(10) unsigned NOT NULL default '0',\r
-  name varchar(255) default NULL,\r
-  intro text,\r
-  days smallint(5) unsigned NOT NULL default '7',\r
-  assessed tinyint(1) NOT NULL default '1',\r
-  timemodified int(10) unsigned NOT NULL default '0',\r
-  PRIMARY KEY  (id)\r
-) TYPE=MyISAM;\r
-# --------------------------------------------------------\r
-\r
-#\r
-# Table structure for table `journal_entries`\r
-#\r
-\r
-CREATE TABLE journal_entries (\r
-  id int(10) unsigned NOT NULL auto_increment,\r
-  journal int(10) unsigned NOT NULL default '0',\r
-  user int(10) unsigned NOT NULL default '0',\r
-  modified int(10) unsigned NOT NULL default '0',\r
-  text text NOT NULL,\r
-  rating tinyint(4) default '0',\r
-  comment text,\r
-  teacher int(10) unsigned NOT NULL default '0',\r
-  timemarked int(10) unsigned NOT NULL default '0',\r
-  PRIMARY KEY  (id)\r
-) TYPE=MyISAM COMMENT='All the journal entries of all people';\r
-\r
index 6ee349e1581d9065e7016934808732c5a3d8932e..988f3854243f87d2d3c143e9927abedc0a91f04f 100644 (file)
@@ -36,6 +36,7 @@
 </table>
 <CENTER>
 <input type="hidden" name=course     value="<? p($form->course) ?>">
+<input type="hidden" name=coursemodule  value="<? p($form->coursemodule) ?>">
 <input type="hidden" name=week       value="<? p($form->week) ?>">
 <input type="hidden" name=module     value="<? p($form->module) ?>">
 <input type="hidden" name=modulename value="<? p($form->modulename) ?>">
index 3ae4513a005f7395fc844d53a4d9728ed66d0ab6..765b8e97399ca63eca4aeead18fae145f7f7ffa5 100644 (file)
                 $count++;
             }
         }
-        add_to_log("Updated journal feedback: $journal->name ($count students)", $course->id);
+        add_to_log($course->id, "journal", "update feedback", "report.php?id=$cm->id", "$count students");
         notify("Journal feedback updated for $count students.");
     } else {
-        add_to_log("View journal responses: $journal->name", $course->id);
+        add_to_log($course->id, "journal", "view responses", "report.php?id=$cm->id", "$journal->id");
     }
 
 
index 75d603ac963b2d9d4bfe2ff8e3289a5bbe7ca5ca..cc92c971f9c2b325762f19c5f5634e904a716fef 100644 (file)
@@ -20,7 +20,7 @@
         error("Course module is incorrect");
     }
 
-    add_to_log("View journal: $journal->name", $course->id);
+    add_to_log($course->id, "journal", "view", "view.php?id=$cm->id", "$journal->id");
 
     if (! $cw = get_record("course_weeks", "id", $cm->week)) {
         error("Course module is incorrect");
index 189d796fd3edd96b3b9ba3be181767910c9040d7..0e280a47eac4949d1ff2591bb9acbf3b20e06e46 100644 (file)
@@ -45,6 +45,7 @@
         <input type="hidden" name=template   value="<? p($form->template) ?>">
 
         <input type="hidden" name=course     value="<? p($form->course) ?>">
+        <input type="hidden" name=coursemodule     value="<? p($form->coursemodule) ?>">
         <input type="hidden" name=week       value="<? p($form->week) ?>">
         <input type="hidden" name=module     value="<? p($form->module) ?>">
         <input type="hidden" name=modulename value="<? p($form->modulename) ?>">
index adbf6dd793fd68164b498c5ebc7786d6de0f2539..31ba883454eea5046c5155dce61127449923a32d 100644 (file)
@@ -25,7 +25,7 @@
         error("Survey ID was incorrect");
     }
 
-    add_to_log("Downloaded report as $type:  $survey->name", $course->id);
+    add_to_log($course->id, "survey", "download", "download.php?id=$cm->id&type=$type", "$survey->id");
 
 
 // Get all the questions and their proper order
index 40e97d3b89a62d42360d9e9c4074a8f409cfa4a4..d7350e14c1f106ccb53612f73a31fdba336f39f9 100644 (file)
@@ -14,7 +14,6 @@
 
        if ($edit == "release") {
                release_survey($id);
-               add_to_log("Survey released: $id");
                unset($edit);
        }
 
@@ -25,7 +24,6 @@
                        if (count($err) == 0) {
                                update_survey($survey);
                                notify("The survey \"$survey->name\" was updated.");
-                               add_to_log("Survey update: $survey->name");
                                unset($edit);
                        }
                } else {
@@ -41,7 +39,6 @@
 
                        } else if ($ss = $db->Execute("DELETE FROM surveys WHERE owner = $USER->id AND id = $id")) {
                                notify("The survey was deleted.");
-                               add_to_log("Survey deleted: $id");
 
                        } else {
                                notify("Serious error: could not find any templates.");
@@ -62,7 +59,6 @@
                 $survey->name = "";
                                $survey->template = $template;
                                add_survey($survey);
-                               add_to_log("Survey added: $survey->name");
                        } else {
                                notify("Serious error: could not find template $template");
                        }
index 1f70c7096158c87f638cece7f4a71aca92a6d69b..1a92b232cbbd7c8f410858f55a0fba8b122d3178 100644 (file)
@@ -10,7 +10,8 @@
     }
 
     require_login($course->id);
-    add_to_log("View all surveys", $course->id);
+
+    add_to_log($course->id, "survey", "view all", "index.php?id=$course->id", "");
 
     print_header("$course->shortname: Surveys", "$course->fullname",
                  "<A HREF=../../course/view.php?id=$course->id>$course->shortname</A> -> Surveys", "");
diff --git a/mod/survey/install.sql b/mod/survey/install.sql
deleted file mode 100755 (executable)
index 2baf771..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-# phpMyAdmin MySQL-Dump\r
-# version 2.2.1\r
-# http://phpwizard.net/phpMyAdmin/\r
-# http://phpmyadmin.sourceforge.net/ (download page)\r
-#\r
-# Host: localhost\r
-# Generation Time: Nov 14, 2001 at 04:39 PM\r
-# Server version: 3.23.36\r
-# PHP Version: 4.0.6\r
-# Database : `moodle`\r
-# --------------------------------------------------------\r
-\r
-#\r
-# Table structure for table `survey`\r
-#\r
-\r
-CREATE TABLE survey (\r
-  id int(10) unsigned NOT NULL auto_increment,\r
-  course int(10) unsigned NOT NULL default '0',\r
-  template int(10) unsigned NOT NULL default '0',\r
-  days smallint(6) NOT NULL default '0',\r
-  timecreated int(10) unsigned NOT NULL default '0',\r
-  timemodified int(10) unsigned NOT NULL default '0',\r
-  name varchar(255) NOT NULL default '',\r
-  intro text,\r
-  questions varchar(255) default NULL,\r
-  PRIMARY KEY  (id)\r
-) TYPE=MyISAM COMMENT='all surveys';\r
-\r
-#\r
-# Dumping data for table `survey`\r
-#\r
-\r
-INSERT INTO survey VALUES (1, 0, 0, 0, 985017600, 985017600, 'COLLES (Actual)', 'The purpose of this questionnaire is to help us understand how well the online delivery of this unit enabled you to learn. \r\n\r\nEach one of the 24 statements below asks about your experience in this unit.\r\n\r\nThere are no \'right\' or \'wrong\' answers; we are interested only in your opinion. Please be assured that your responses will be treated with a high degree of confidentiality, and will not affect your assessment.\r\n\r\nYour carefully considered responses will help us improve the way this unit is presented online in the future.\r\n\r\nThanks very much.\r\n', '25,26,27,28,29,30,43,44');\r
-INSERT INTO survey VALUES (2, 0, 0, 0, 985017600, 985017600, 'COLLES (Preferred)', 'The purpose of this questionnaire is to help us understand what you value in an online learning experience.\r\n\r\nEach one of the 24 statements below asks about your <B>preferred</B> (ideal) experience in this unit.\r\n\r\nThere are no \'right\' or \'wrong\' answers; we are interested only in your opinion. Please be assured that your responses will be treated with a high degree of confidentiality, and will not affect your assessment.\r\n\r\nYour carefully considered responses will help us improve the way this unit is presented online in the future.\r\n\r\nThanks very much.\r\n', '31,32,33,34,35,36,43,44');\r
-INSERT INTO survey VALUES (3, 0, 0, 0, 985017600, 985017600, 'COLLES (Preferred and Actual)', 'The purpose of this questionnaire is to help us understand how well the online delivery of this unit enabled you to learn. \r\n\r\nEach one of the 24 statements below asks you to compare your <B>preferred</B> (ideal) and <B>actual</B> experience in this unit.\r\n\r\nThere are no \'right\' or \'wrong\' answers; we are interested only in your opinion. Please be assured that your responses will be treated with a high degree of confidentiality, and will not affect your assessment.\r\n\r\nYour carefully considered responses will help us improve the way this unit is presented online in the future.\r\n\r\nThanks very much.\r\n', '37,38,39,40,41,42,43,44');\r
-INSERT INTO survey VALUES (4, 0, 0, 0, 985017600, 985017600, 'ATTLS (20 item version)', 'The purpose of this questionnaire is to help \r\nus evaluate your attitudes towards thinking and learning.\r\n', '65,67,68');\r
-# --------------------------------------------------------\r
-\r
-#\r
-# Table structure for table `survey_analysis`\r
-#\r
-\r
-CREATE TABLE survey_analysis (\r
-  id int(10) unsigned NOT NULL auto_increment,\r
-  survey int(10) unsigned NOT NULL default '0',\r
-  user int(10) unsigned NOT NULL default '0',\r
-  notes text NOT NULL,\r
-  PRIMARY KEY  (id),\r
-  UNIQUE KEY id (id)\r
-) TYPE=MyISAM;\r
-\r
-#\r
-# Dumping data for table `survey_analysis`\r
-#\r
-\r
-# --------------------------------------------------------\r
-\r
-#\r
-# Table structure for table `survey_answers`\r
-#\r
-\r
-CREATE TABLE survey_answers (\r
-  id int(10) unsigned NOT NULL auto_increment,\r
-  user int(10) unsigned NOT NULL default '0',\r
-  survey int(10) unsigned NOT NULL default '0',\r
-  question int(10) unsigned NOT NULL default '0',\r
-  time int(10) unsigned default NULL,\r
-  answer1 char(255) default NULL,\r
-  answer2 char(255) default NULL,\r
-  PRIMARY KEY  (id),\r
-  UNIQUE KEY id (id)\r
-) TYPE=MyISAM;\r
-\r
-#\r
-# Dumping data for table `survey_answers`\r
-#\r
-\r
-# --------------------------------------------------------\r
-\r
-#\r
-# Table structure for table `survey_questions`\r
-#\r
-\r
-CREATE TABLE survey_questions (\r
-  id int(10) unsigned NOT NULL auto_increment,\r
-  owner int(10) unsigned NOT NULL default '0',\r
-  text varchar(255) NOT NULL default '',\r
-  multi varchar(100) NOT NULL default '',\r
-  intro varchar(50) default NULL,\r
-  type tinyint(3) NOT NULL default '0',\r
-  options text,\r
-  PRIMARY KEY  (id)\r
-) TYPE=MyISAM;\r
-\r
-#\r
-# Dumping data for table `survey_questions`\r
-#\r
-\r
-INSERT INTO survey_questions VALUES (1, 0, 'my learning focuses on issues that interest me.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n');\r
-INSERT INTO survey_questions VALUES (2, 0, 'what I learn is important for my professional practice.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n');\r
-INSERT INTO survey_questions VALUES (3, 0, 'I learn how to improve my professional practice.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (4, 0, 'what I learn connects well with my professional practice.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n');\r
-INSERT INTO survey_questions VALUES (5, 0, 'I think critically about how I learn.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (6, 0, 'I think critically about my own ideas.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (7, 0, 'I think critically about other students\' ideas.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (8, 0, 'I think critically about ideas in the readings.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (9, 0, 'I explain my ideas to other students.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (10, 0, 'I ask other students to explain their ideas.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (11, 0, 'other students ask me to explain my ideas.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n');\r
-INSERT INTO survey_questions VALUES (12, 0, 'other students respond to my ideas.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n');\r
-INSERT INTO survey_questions VALUES (13, 0, 'the tutor stimulates my thinking.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n');\r
-INSERT INTO survey_questions VALUES (14, 0, 'the tutor encourages me to participate.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n');\r
-INSERT INTO survey_questions VALUES (15, 0, 'the tutor models good discourse.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n');\r
-INSERT INTO survey_questions VALUES (16, 0, 'the tutor models critical self-reflection.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n');\r
-INSERT INTO survey_questions VALUES (17, 0, 'other students encourage my participation.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n');\r
-INSERT INTO survey_questions VALUES (18, 0, 'other students praise my contribution.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n');\r
-INSERT INTO survey_questions VALUES (19, 0, 'other students value my contribution.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n');\r
-INSERT INTO survey_questions VALUES (20, 0, 'other students empathise with my struggle to learn.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n');\r
-INSERT INTO survey_questions VALUES (21, 0, 'I make good sense of other students\' messages.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (22, 0, 'other students make good sense of my messages.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n');\r
-INSERT INTO survey_questions VALUES (23, 0, 'I make good sense of the tutor\'s messages.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (24, 0, 'the tutor makes good sense of my messages.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n');\r
-INSERT INTO survey_questions VALUES (25, 0, 'Relevance', '1,2,3,4', 'In this online unit...', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (26, 0, 'Reflective Thinking', '5,6,7,8', 'In this online unit...', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (27, 0, 'Interactivity', '9,10,11,12', 'In this online unit...', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (28, 0, 'Tutor Support', '13,14,15,16', 'In this online unit...', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (29, 0, 'Peer Support', '17,18,19,20', 'In this online unit...', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (30, 0, 'Interpretation', '21,22,23,24', 'In this online unit...', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (31, 0, 'Relevance', '1,2,3,4', 'In this online unit, I prefer that...', 2, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (32, 0, 'Reflective Thinking', '5,6,7,8', 'In this online unit, I prefer that...', 2, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (33, 0, 'Interactivity', '9,10,11,12', 'In this online unit, I prefer that...', 2, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (34, 0, 'Tutor Support', '13,14,15,16', 'In this online unit, I prefer that...', 2, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (35, 0, 'Peer Support', '17,18,19,20', 'In this online unit, I prefer that...', 2, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (36, 0, 'Interpretation', '21,22,23,24', 'In this online unit, I prefer that...', 2, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (37, 0, 'Relevance', '1,2,3,4', 'In this online unit...', 3, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (38, 0, 'Reflective Thinking', '5,6,7,8', 'In this online unit...', 3, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (39, 0, 'Interactivity', '9,10,11,12', 'In this online unit...', 3, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (40, 0, 'Tutor Support', '13,14,15,16', 'In this online unit...', 3, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (41, 0, 'Peer Support', '17,18,19,20', 'In this online unit...', 3, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (42, 0, 'Interpretation', '21,22,23,24', 'In this online unit...', 3, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r');\r
-INSERT INTO survey_questions VALUES (43, 0, 'How long did this survey take you to complete?', '', '', 1, 'under 1 min,1-2 min,2-3 min,3-4 min,4-5-min,5-10 min,more than 10\r');\r
-INSERT INTO survey_questions VALUES (44, 0, 'Do you have any other comments?', '', '', 0, '\r');\r
-INSERT INTO survey_questions VALUES (64, 0, 'I spend time figuring out what\'s "wrong" with things. For example, I\'ll look for something in a literary interpretation that isn\'t argued well enough.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (58, 0, 'I try to point out weaknesses in other people\'s thinking to help them clarify their arguments.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (59, 0, 'I tend to put myself in other people\'s shoes when discussing controversial issues, to see why they think the way they do.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (60, 0, 'One could call my way of analysing things "putting them on trial" because I am careful to consider all the evidence.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (61, 0, 'I value the use of logic and reason over the incorporation of my own concerns when solving problems.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (62, 0, 'I can obtain insight into opinions that differ from mine through empathy.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (63, 0, 'When I encounter people whose opinions seem alien to me, I make a deliberate effort to "extend" myself into that person, to try to see how they could have those opinions.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (56, 0, 'I have certain criteria I use in evaluating arguments.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (57, 0, 'I\'m more likely to try to understand someone else\'s opinion that to try to evaluate it.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (55, 0, 'I try to think with people instead of against them.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (54, 0, 'It\'s important for me to remain as objective as possible when I analyze something.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (53, 0, 'I often find myself arguing with the authors of books that I read, trying to logically figure out why they\'re wrong.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (52, 0, 'I am always interested in knowing why people say and believe the things they do.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (51, 0, 'I find that I can strengthen my own position through arguing with someone who disagrees with me.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (50, 0, 'I enjoy hearing the opinions of people who come from backgrounds different to mine - it helps me to understand how the same things can be seen in such different ways.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (49, 0, 'I feel that the best way for me to achieve my own identity is to interact with a variety of other people.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (48, 0, 'The most important part of my education has been learning to understand people who are very different to me.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (47, 0, 'I like to understand where other people are "coming from", what experiences have led them to feel the way they do.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (45, 0, 'In evaluating what someone says, I focus on the quality of their argument, not on the person who\'s presenting it.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (46, 0, 'I like playing devil\'s advocate - arguing the opposite of what someone is saying.', '', '', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (65, 0, 'Attitudes Towards Thinking and Learning', '45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64', 'In discussion ...', 1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (67, 0, 'Connected Learning', '63,62,59,57,55,49,52,50,48,47', 'Connected knowers...', -1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-INSERT INTO survey_questions VALUES (68, 0, 'Separate Learning', '46,54,45,51,60,53,56,58,61,64', 'Separate knowers...', -1, 'Strongly disagree,Somewhat disagree,Neither agree nor disagree,Somewhat agree,Strongly agree');\r
-\r
index e9dcb4d569619607eea40318aba07746a5c38722..6e4f1607f458148576cf9ac9af082e361c066839 100644 (file)
@@ -24,6 +24,7 @@
 <input type="hidden" name=destination value="<?=$ME ?>">
 
 <input type="hidden" name=course     value="<? p($form->course) ?>">
+<input type="hidden" name=coursemodule  value="<? p($form->coursemodule) ?>">
 <input type="hidden" name=week       value="<? p($form->week) ?>">
 <input type="hidden" name=module     value="<? p($form->module) ?>">
 <input type="hidden" name=modulename value="<? p($form->modulename) ?>">
index a0a16a23c472f811acd61f59796768b827ccbe04..9397f27004a1f03de7f5b65589f4d5b4401ba93f 100644 (file)
@@ -35,7 +35,7 @@
 
     if ($display)  { // Display the frame containing something.
 
-        add_to_log("View survey report: $survey->name", $course->id);
+        add_to_log($course->id, "survey", "view report", "report.php?id=$cm->id", "$survey->id");
         echo "<HEAD><TITLE>Report: $survey->name</TITLE>\n";
         echo "<FRAMESET COLS=150,* BORDER=1> ";
         echo "  <FRAME NAME=reportmenu SRC=\"report.php?action=menu&id=$id\"> \n";
@@ -67,7 +67,6 @@
         break;
 
       case "summary":
-        add_to_log("View survey report summary: $survey->name", $course->id);
         print_header("Overall Summary", "$survey->name: Overall Summary", "", "");
 
         print_heading("All scales, all students");
@@ -77,7 +76,6 @@
         break;
 
       case "scales":
-        add_to_log("View survey report scales: $survey->name", $course->id);
         print_header("Scales", "$survey->name: Scales", "", "");
 
         print_heading("All scales, all students");
         break;
 
       case "questions":
-        add_to_log("View survey report questions: $survey->name", $course->id);
         print_header("Analysis by Question", "$survey->name: Questions", "", "");
 
         if ($qid) {     // just get one multi-question
         break;
 
       case "question":
-        add_to_log("View survey report question: $survey->name", $course->id);
         if (!$question = get_record("survey_questions", "id", $qid)) {
             error("Question doesn't exist");
         }
 
       case "students":
 
-         add_to_log("View survey report students: $survey->name", $course->id);
          print_header("Analysis by Student", "$survey->name: Students", "", "");
         
          if (! $results = get_survey_responses($survey->id) ) {
                      notify("An error occurred while saving your notes.  Sorry.");
                  }
              }
-             add_to_log("Update survey analysis for $user->firstname $user->lastname: $survey->name", $course->id);
-         } else {
-             add_to_log("View survey report $user->firstname $user->lastname: $survey->name", $course->id);
          }
 
          print_heading("$user->firstname $user->lastname");
index 2722740e525f4b2b372f13e4e7d6cc4a5a51ab74..665389b21f41a9af3b3fc8c75dfc955715429406 100644 (file)
@@ -26,7 +26,7 @@
         error("Survey ID was incorrect");
     }
 
-    add_to_log("Submit survey $survey->name", $course->id);
+    add_to_log($course->id, "survey", "submit", "view.php?id=$cm->id", "$survey->id");
 
     if (survey_already_done($survey->id, $USER->id)) {
         notice("You've already submitted this survey!", $HTTP_REFERER);
index 11451c89f139017341375d3019a040b9ddaed026..622766b5fdff504c629498af59a5118b4ce3f0fe 100644 (file)
@@ -19,7 +19,6 @@
         error("Survey ID was incorrect");
     }
 
-    add_to_log("View survey $survey->name", $course->id);
 
     print_header("$course->shortname: $survey->name", "$course->fullname",
                  "<A HREF=../../course/view.php?id=$course->id>$course->shortname</A> ->
@@ -38,6 +37,7 @@
 //  Check the survey hasn't already been filled out.
 
     if (survey_already_done($survey->id, $USER->id)) {
+        add_to_log($course->id, "survey", "view graph", "view.php?id=$cm->id", "$survey->id");
         print_heading("You've completed this survey.  The graph below shows a summary of your results compared to the class averages.");
         echo "<CENTER>";
         echo "<IMG SRC=\"$CFG->wwwroot/mod/survey/graph.php?id=$cm->id&sid=$USER->id&type=student.png\">";
@@ -47,6 +47,7 @@
     }
 
 //  Start the survey form
+    add_to_log($course->id, "survey", "view form", "view.php?id=$cm->id", "$survey->id");
 
     echo "<FORM NAME=form METHOD=post ACTION=save.php>";
     echo "<INPUT TYPE=hidden NAME=id VALUE=$id>";