From: martin Date: Fri, 31 May 2002 09:07:11 +0000 (+0000) Subject: Various small fixes across all modules. Most notable was the revised X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5eb45fa058a73201ae3d960b375358cc9f5060f8;p=moodle.git Various small fixes across all modules. Most notable was the revised use of add_to_log, and the new logging format. --- diff --git a/mod/choice/index.php b/mod/choice/index.php index 51f07adaa1..d383414565 100644 --- a/mod/choice/index.php +++ b/mod/choice/index.php @@ -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", "id>$course->shortname -> Choices", ""); diff --git a/mod/choice/install.sql b/mod/choice/install.sql deleted file mode 100755 index 6e747a47ef..0000000000 --- a/mod/choice/install.sql +++ /dev/null @@ -1,43 +0,0 @@ -# phpMyAdmin MySQL-Dump -# version 2.2.1 -# http://phpwizard.net/phpMyAdmin/ -# http://phpmyadmin.sourceforge.net/ (download page) -# -# Host: localhost -# Generation Time: Nov 14, 2001 at 04:44 PM -# Server version: 3.23.36 -# PHP Version: 4.0.6 -# Database : `moodle` -# -------------------------------------------------------- - -# -# Table structure for table `choice` -# - -CREATE TABLE choice ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - text text NOT NULL, - answer1 varchar(255) NOT NULL default 'Yes', - answer2 varchar(255) NOT NULL default 'No', - timemodified int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - UNIQUE KEY id (id) -) TYPE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `choice_answers` -# - -CREATE TABLE choice_answers ( - id int(10) unsigned NOT NULL auto_increment, - choice int(10) unsigned NOT NULL default '0', - user int(10) unsigned NOT NULL default '0', - answer tinyint(4) NOT NULL default '0', - timemodified int(10) NOT NULL default '0', - PRIMARY KEY (id), - UNIQUE KEY id (id) -) TYPE=MyISAM; - diff --git a/mod/choice/mod.html b/mod/choice/mod.html index 2f592bd9f6..ba9a919d76 100644 --- a/mod/choice/mod.html +++ b/mod/choice/mod.html @@ -44,6 +44,7 @@
+ diff --git a/mod/choice/report.php b/mod/choice/report.php index 7c4049c9b7..9ec4822d35 100644 --- a/mod/choice/report.php +++ b/mod/choice/report.php @@ -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", "id>$course->shortname -> diff --git a/mod/choice/view.php b/mod/choice/view.php index 901d928313..d4f166f91f 100644 --- a/mod/choice/view.php +++ b/mod/choice/view.php @@ -30,21 +30,22 @@ 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", "id>$course->shortname -> id>Choices -> $choice->name", ""); diff --git a/mod/journal/edit.php b/mod/journal/edit.php index ea2cfc3cac..fdd575b09d 100644 --- a/mod/journal/edit.php +++ b/mod/journal/edit.php @@ -35,16 +35,16 @@ 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"); diff --git a/mod/journal/index.php b/mod/journal/index.php index 014f249e21..332949374f 100644 --- a/mod/journal/index.php +++ b/mod/journal/index.php @@ -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", "id>$course->shortname -> Journals", ""); diff --git a/mod/journal/install.sql b/mod/journal/install.sql deleted file mode 100755 index d33e36f502..0000000000 --- a/mod/journal/install.sql +++ /dev/null @@ -1,45 +0,0 @@ -# phpMyAdmin MySQL-Dump -# version 2.2.1 -# http://phpwizard.net/phpMyAdmin/ -# http://phpmyadmin.sourceforge.net/ (download page) -# -# Host: localhost -# Generation Time: Nov 14, 2001 at 04:44 PM -# Server version: 3.23.36 -# PHP Version: 4.0.6 -# Database : `moodle` -# -------------------------------------------------------- - -# -# Table structure for table `journal` -# - -CREATE TABLE journal ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - name varchar(255) default NULL, - intro text, - days smallint(5) unsigned NOT NULL default '7', - assessed tinyint(1) NOT NULL default '1', - timemodified int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id) -) TYPE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `journal_entries` -# - -CREATE TABLE journal_entries ( - id int(10) unsigned NOT NULL auto_increment, - journal int(10) unsigned NOT NULL default '0', - user int(10) unsigned NOT NULL default '0', - modified int(10) unsigned NOT NULL default '0', - text text NOT NULL, - rating tinyint(4) default '0', - comment text, - teacher int(10) unsigned NOT NULL default '0', - timemarked int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id) -) TYPE=MyISAM COMMENT='All the journal entries of all people'; - diff --git a/mod/journal/mod.html b/mod/journal/mod.html index 6ee349e158..988f385424 100644 --- a/mod/journal/mod.html +++ b/mod/journal/mod.html @@ -36,6 +36,7 @@
+ diff --git a/mod/journal/report.php b/mod/journal/report.php index 3ae4513a00..765b8e9739 100644 --- a/mod/journal/report.php +++ b/mod/journal/report.php @@ -73,10 +73,10 @@ $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"); } diff --git a/mod/journal/view.php b/mod/journal/view.php index 75d603ac96..cc92c971f9 100644 --- a/mod/journal/view.php +++ b/mod/journal/view.php @@ -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"); diff --git a/mod/survey/details.php b/mod/survey/details.php index 189d796fd3..0e280a47ea 100644 --- a/mod/survey/details.php +++ b/mod/survey/details.php @@ -45,6 +45,7 @@ + diff --git a/mod/survey/download.php b/mod/survey/download.php index adbf6dd793..31ba883454 100644 --- a/mod/survey/download.php +++ b/mod/survey/download.php @@ -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 diff --git a/mod/survey/edit.php b/mod/survey/edit.php index 40e97d3b89..d7350e14c1 100644 --- a/mod/survey/edit.php +++ b/mod/survey/edit.php @@ -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"); } diff --git a/mod/survey/index.php b/mod/survey/index.php index 1f70c70961..1a92b232cb 100644 --- a/mod/survey/index.php +++ b/mod/survey/index.php @@ -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", "id>$course->shortname -> Surveys", ""); diff --git a/mod/survey/install.sql b/mod/survey/install.sql deleted file mode 100755 index 2baf77188e..0000000000 --- a/mod/survey/install.sql +++ /dev/null @@ -1,167 +0,0 @@ -# phpMyAdmin MySQL-Dump -# version 2.2.1 -# http://phpwizard.net/phpMyAdmin/ -# http://phpmyadmin.sourceforge.net/ (download page) -# -# Host: localhost -# Generation Time: Nov 14, 2001 at 04:39 PM -# Server version: 3.23.36 -# PHP Version: 4.0.6 -# Database : `moodle` -# -------------------------------------------------------- - -# -# Table structure for table `survey` -# - -CREATE TABLE survey ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - template int(10) unsigned NOT NULL default '0', - days smallint(6) NOT NULL default '0', - timecreated int(10) unsigned NOT NULL default '0', - timemodified int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - intro text, - questions varchar(255) default NULL, - PRIMARY KEY (id) -) TYPE=MyISAM COMMENT='all surveys'; - -# -# Dumping data for table `survey` -# - -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'); -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 preferred (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'); -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 preferred (ideal) and actual 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'); -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'); -# -------------------------------------------------------- - -# -# Table structure for table `survey_analysis` -# - -CREATE TABLE survey_analysis ( - id int(10) unsigned NOT NULL auto_increment, - survey int(10) unsigned NOT NULL default '0', - user int(10) unsigned NOT NULL default '0', - notes text NOT NULL, - PRIMARY KEY (id), - UNIQUE KEY id (id) -) TYPE=MyISAM; - -# -# Dumping data for table `survey_analysis` -# - -# -------------------------------------------------------- - -# -# Table structure for table `survey_answers` -# - -CREATE TABLE survey_answers ( - id int(10) unsigned NOT NULL auto_increment, - user int(10) unsigned NOT NULL default '0', - survey int(10) unsigned NOT NULL default '0', - question int(10) unsigned NOT NULL default '0', - time int(10) unsigned default NULL, - answer1 char(255) default NULL, - answer2 char(255) default NULL, - PRIMARY KEY (id), - UNIQUE KEY id (id) -) TYPE=MyISAM; - -# -# Dumping data for table `survey_answers` -# - -# -------------------------------------------------------- - -# -# Table structure for table `survey_questions` -# - -CREATE TABLE survey_questions ( - id int(10) unsigned NOT NULL auto_increment, - owner int(10) unsigned NOT NULL default '0', - text varchar(255) NOT NULL default '', - multi varchar(100) NOT NULL default '', - intro varchar(50) default NULL, - type tinyint(3) NOT NULL default '0', - options text, - PRIMARY KEY (id) -) TYPE=MyISAM; - -# -# Dumping data for table `survey_questions` -# - -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'); -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'); -INSERT INTO survey_questions VALUES (3, 0, 'I learn how to improve my professional practice.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\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'); -INSERT INTO survey_questions VALUES (5, 0, 'I think critically about how I learn.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r'); -INSERT INTO survey_questions VALUES (6, 0, 'I think critically about my own ideas.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r'); -INSERT INTO survey_questions VALUES (7, 0, 'I think critically about other students\' ideas.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\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'); -INSERT INTO survey_questions VALUES (9, 0, 'I explain my ideas to other students.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\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'); -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'); -INSERT INTO survey_questions VALUES (12, 0, 'other students respond to my ideas.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n'); -INSERT INTO survey_questions VALUES (13, 0, 'the tutor stimulates my thinking.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n'); -INSERT INTO survey_questions VALUES (14, 0, 'the tutor encourages me to participate.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n'); -INSERT INTO survey_questions VALUES (15, 0, 'the tutor models good discourse.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n'); -INSERT INTO survey_questions VALUES (16, 0, 'the tutor models critical self-reflection.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n'); -INSERT INTO survey_questions VALUES (17, 0, 'other students encourage my participation.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n'); -INSERT INTO survey_questions VALUES (18, 0, 'other students praise my contribution.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n'); -INSERT INTO survey_questions VALUES (19, 0, 'other students value my contribution.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\r\n'); -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'); -INSERT INTO survey_questions VALUES (21, 0, 'I make good sense of other students\' messages.', '', '', 1, 'Almost Never,Seldom,Sometimes,Often,Almost Always\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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -INSERT INTO survey_questions VALUES (44, 0, 'Do you have any other comments?', '', '', 0, '\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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); -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'); - diff --git a/mod/survey/mod.html b/mod/survey/mod.html index e9dcb4d569..6e4f1607f4 100644 --- a/mod/survey/mod.html +++ b/mod/survey/mod.html @@ -24,6 +24,7 @@ + diff --git a/mod/survey/report.php b/mod/survey/report.php index a0a16a23c4..9397f27004 100644 --- a/mod/survey/report.php +++ b/mod/survey/report.php @@ -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 "Report: $survey->name\n"; echo " "; echo " \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"); @@ -110,7 +108,6 @@ 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 @@ -174,7 +171,6 @@ 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"); } @@ -218,7 +214,6 @@ 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) ) { @@ -247,9 +242,6 @@ 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"); diff --git a/mod/survey/save.php b/mod/survey/save.php index 2722740e52..665389b21f 100644 --- a/mod/survey/save.php +++ b/mod/survey/save.php @@ -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); diff --git a/mod/survey/view.php b/mod/survey/view.php index 11451c89f1..622766b5fd 100644 --- a/mod/survey/view.php +++ b/mod/survey/view.php @@ -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", "id>$course->shortname -> @@ -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 "
"; echo "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 "
"; echo "";