0 => get_string('no'))));
$temp->add(new admin_setting_configselect('filteruploadedfiles', get_string('filteruploadedfiles', 'admin'), get_string('configfilteruploadedfiles', 'admin'), 0, array('0' => get_string('none'),
'1' => get_string('allfiles'),
- '2' => get_string('htmlfilesonly'))));
+ '2' => get_string('htmlfilesonly'))));
$temp->add(new admin_setting_configcheckbox('filtermatchoneperpage', get_string('filtermatchoneperpage', 'admin'), get_string('configfiltermatchoneperpage', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('filtermatchonepertext', get_string('filtermatchonepertext', 'admin'), get_string('configfiltermatchonepertext', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('filterall', get_string('filterall', 'admin'), get_string('configfilterall', 'admin'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_messages', get_string('messages', 'message'), get_string('backupmessageshelp','message'), 0));
$temp->add(new admin_setting_backupselect('backup_sche_keep', get_string('keep'), get_string('backupkeephelp'), 1, array(0 => get_string('all'),
1 => '1',
- 2 => '2',
- 5 => '5',
- 10 => '10',
- 20 => '20',
- 30 => '30',
- 40 => '40',
- 50 => '50',
- 100 => '100',
- 200 => '200',
- 300 => '300',
- 400 => '400',
- 500 => '500')));
+ 2 => '2',
+ 5 => '5',
+ 10 => '10',
+ 20 => '20',
+ 30 => '30',
+ 40 => '40',
+ 50 => '50',
+ 100 => '100',
+ 200 => '200',
+ 300 => '300',
+ 400 => '400',
+ 500 => '500')));
$temp->add(new admin_setting_backupcheckbox('backup_sche_active', get_string('active'), get_string('backupactivehelp'), 0));
$temp->add(new admin_setting_special_backupdays());
$temp->add(new admin_setting_special_backuptime());
$temp->add(new admin_setting_configselect('maxeditingtime', get_string('maxeditingtime','admin'), get_string('configmaxeditingtime','admin'), 1800,
array(60 => get_string('numminutes', '', 1),
300 => get_string('numminutes', '', 5),
- 900 => get_string('numminutes', '', 15),
- 1800 => get_string('numminutes', '', 30),
- 2700 => get_string('numminutes', '', 45),
- 3600 => get_string('numminutes', '', 60))));
+ 900 => get_string('numminutes', '', 15),
+ 1800 => get_string('numminutes', '', 30),
+ 2700 => get_string('numminutes', '', 45),
+ 3600 => get_string('numminutes', '', 60))));
$temp->add(new admin_setting_configselect('fullnamedisplay', get_string('fullnamedisplay', 'admin'), get_string('configfullnamedisplay', 'admin'),
'firstname lastname', array('language' => get_string('language'),
'firstname lastname' => get_string('firstname') . ' + ' . get_string('lastname'),
- 'lastname firstname' => get_string('lastname') . ' + ' . get_string('firstname'),
- 'firstname' => get_string('firstname'))));
+ 'lastname firstname' => get_string('lastname') . ' + ' . get_string('firstname'),
+ 'firstname' => get_string('firstname'))));
$temp->add(new admin_setting_configcheckbox('extendedusernamechars', get_string('extendedusernamechars', 'admin'), get_string('configextendedusernamechars', 'admin'), 0));
$temp->add(new admin_setting_configtext('sitepolicy', get_string('sitepolicy', 'admin'), get_string('configsitepolicy', 'admin'), '', PARAM_URL));
$temp->add(new admin_setting_configselect('bloglevel', get_string('bloglevel', 'admin'), get_string('configbloglevel', 'admin'), 4, array(5 => get_string('worldblogs','blog'),
$temp = new admin_settingpage('modulesecurity', get_string('modulesecurity', 'admin'));
$temp->add(new admin_setting_configselect('restrictmodulesfor', get_string('restrictmodulesfor', 'admin'), get_string('configrestrictmodulesfor', 'admin'), 'none', array('none' => 'No courses',
'all' => 'All courses',
- 'requested' => 'Requested courses')));
-$temp->add(new admin_setting_configcheckbox('restrictbydefault', get_string('restrictbydefault', 'admin'), get_string('configrestrictbydefault', 'admin'), 0));
+ 'requested' => 'Requested courses')));
+$temp->add(new admin_setting_configcheckbox('restrictbydefault', get_string('restrictbydefault', 'admin'), get_string('configrestrictbydefault', 'admin'), 0));
if (!$options = get_records("modules")) {
$options = array();
}
$temp = new admin_settingpage('notifications', get_string('notifications', 'admin'));
$temp->add(new admin_setting_configselect('displayloginfailures', get_string('displayloginfailures', 'admin'), get_string('configdisplayloginfailures', 'admin'), '', array('' => get_string('nobody'),
'admin' => get_string('administrators'),
- 'teacher' => get_string('administratorsandteachers'),
+ 'teacher' => get_string('administratorsandteachers'),
'everybody' => get_string('everybody'))));
$temp->add(new admin_setting_configselect('notifyloginfailures', get_string('notifyloginfailures', 'admin'), get_string('confignotifyloginfailures', 'admin'), '', array('' => get_string('nobody'),
'mainadmin' => get_string('administrator'),
- 'alladmins' => get_string('administratorsall'))));
+ 'alladmins' => get_string('administratorsall'))));
$options = array();
for ($i = 1; $i <= 100; $i++) {
$options[$i] = $i;
$temp = new admin_settingpage('systempaths', get_string('systempaths','admin'));
$temp->add(new admin_setting_configselect('gdversion', get_string('gdversion','admin'), get_string('configgdversion', 'admin'), check_gd_version(), array('0' => get_string('gdnot'),
'1' => get_string('gd1'),
- '2' => get_string('gd2'))));
+ '2' => get_string('gd2'))));
$temp->add(new admin_setting_configtext('zip', get_string('pathtozip','admin'), get_string('configzip', 'admin'), '', PARAM_PATH));
$temp->add(new admin_setting_configtext('unzip', get_string('pathtounzip','admin'), get_string('configunzip', 'admin'), '', PARAM_PATH));
$temp->add(new admin_setting_configtext('pathtodu', get_string('pathtodu', 'admin'), get_string('configpathtodu', 'admin'), '', PARAM_PATH));
$temp->add(new admin_setting_configtext('denyemailaddresses', get_string('denyemailaddresses', 'admin'), get_string('configdenyemailaddresses', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configselect('digestmailtime', get_string('digestmailtime', 'admin'), get_string('configdigestmailtime', 'admin'), 17, array('00' => '00',
'01' => '01',
- '02' => '02',
- '03' => '03',
- '04' => '04',
- '05' => '05',
- '06' => '06',
- '07' => '07',
- '08' => '08',
- '09' => '09',
- '10' => '10',
- '11' => '11',
- '12' => '12',
- '13' => '13',
- '14' => '14',
- '15' => '15',
- '16' => '16',
- '17' => '17',
- '18' => '18',
- '19' => '19',
- '20' => '20',
- '21' => '21',
- '22' => '22',
- '23' => '23')));
+ '02' => '02',
+ '03' => '03',
+ '04' => '04',
+ '05' => '05',
+ '06' => '06',
+ '07' => '07',
+ '08' => '08',
+ '09' => '09',
+ '10' => '10',
+ '11' => '11',
+ '12' => '12',
+ '13' => '13',
+ '14' => '14',
+ '15' => '15',
+ '16' => '16',
+ '17' => '17',
+ '18' => '18',
+ '19' => '19',
+ '20' => '20',
+ '21' => '21',
+ '22' => '22',
+ '23' => '23')));
if (!empty($CFG->unicodedb)) { // These options are only available if running under unicodedb
unset($options);
unset($charsets);
$temp->add(new admin_setting_configcheckbox('enablestats', get_string('enablestats', 'admin'), get_string('configenablestats', 'admin'), 0));
$temp->add(new admin_setting_configselect('statsfirstrun', get_string('statsfirstrun', 'admin'), get_string('configstatsfirstrun', 'admin'), 'none', array('none' => get_string('none'),
60*60*24*7 => get_string('numweeks','moodle',1),
- 60*60*24*14 => get_string('numweeks','moodle',2),
- 60*60*24*21 => get_string('numweeks','moodle',3),
- 60*60*24*28 => get_string('nummonths','moodle',1),
- 60*60*24*56 => get_string('nummonths','moodle',2),
- 60*60*24*84 => get_string('nummonths','moodle',3),
- 60*60*24*112 => get_string('nummonths','moodle',4),
- 60*60*24*140 => get_string('nummonths','moodle',5),
- 60*60*24*168 => get_string('nummonths','moodle',6),
- 'all' => get_string('all') )));
+ 60*60*24*14 => get_string('numweeks','moodle',2),
+ 60*60*24*21 => get_string('numweeks','moodle',3),
+ 60*60*24*28 => get_string('nummonths','moodle',1),
+ 60*60*24*56 => get_string('nummonths','moodle',2),
+ 60*60*24*84 => get_string('nummonths','moodle',3),
+ 60*60*24*112 => get_string('nummonths','moodle',4),
+ 60*60*24*140 => get_string('nummonths','moodle',5),
+ 60*60*24*168 => get_string('nummonths','moodle',6),
+ 'all' => get_string('all') )));
$temp->add(new admin_setting_configselect('statsmaxruntime', get_string('statsmaxruntime', 'admin'), get_string('configstatsmaxruntime', 'admin'), 0, array(0 => get_string('untilcomplete'),
60*60 => '1 '.get_string('hour'),
- 60*60*2 => '2 '.get_string('hours'),
- 60*60*3 => '3 '.get_string('hours'),
- 60*60*4 => '4 '.get_string('hours'),
- 60*60*5 => '5 '.get_string('hours'),
- 60*60*6 => '6 '.get_string('hours'),
- 60*60*7 => '7 '.get_string('hours'),
- 60*60*8 => '8 '.get_string('hours') )));
+ 60*60*2 => '2 '.get_string('hours'),
+ 60*60*3 => '3 '.get_string('hours'),
+ 60*60*4 => '4 '.get_string('hours'),
+ 60*60*5 => '5 '.get_string('hours'),
+ 60*60*6 => '6 '.get_string('hours'),
+ 60*60*7 => '7 '.get_string('hours'),
+ 60*60*8 => '8 '.get_string('hours') )));
$temp->add(new admin_setting_configtime('statsruntimestarthour', 'statsruntimestartminute', get_string('statsruntimestart', 'admin'), get_string('configstatsruntimestart', 'admin'), array('h' => 0, 'm' => 0)));
$temp->add(new admin_setting_configtext('statsuserthreshold', get_string('statsuserthreshold', 'admin'), get_string('configstatsuserthreshold', 'admin'), 0, PARAM_INT));
-$ADMIN->add('server', $temp);
+$ADMIN->add('server', $temp);
// "http" settingpage
$temp = new admin_settingpage('cleanup', get_string('cleanup', 'admin'));
$temp->add(new admin_setting_configselect('longtimenosee', get_string('longtimenosee', 'admin'), get_string('configlongtimenosee', 'admin'), 120, array(0 => get_string('never'),
1000 => get_string('numdays', '', 1000),
- 365 => get_string('numdays', '', 365),
- 180 => get_string('numdays', '', 180),
- 150 => get_string('numdays', '', 150),
- 120 => get_string('numdays', '', 120),
- 90 => get_string('numdays', '', 90),
- 60 => get_string('numdays', '', 60),
- 30 => get_string('numdays', '', 30),
- 21 => get_string('numdays', '', 21),
- 14 => get_string('numdays', '', 14),
- 7 => get_string('numdays', '', 7) )));
+ 365 => get_string('numdays', '', 365),
+ 180 => get_string('numdays', '', 180),
+ 150 => get_string('numdays', '', 150),
+ 120 => get_string('numdays', '', 120),
+ 90 => get_string('numdays', '', 90),
+ 60 => get_string('numdays', '', 60),
+ 30 => get_string('numdays', '', 30),
+ 21 => get_string('numdays', '', 21),
+ 14 => get_string('numdays', '', 14),
+ 7 => get_string('numdays', '', 7) )));
$temp->add(new admin_setting_configselect('deleteunconfirmed', get_string('deleteunconfirmed', 'admin'), get_string('configdeleteunconfirmed', 'admin'), 168, array(0 => get_string('never'),
168 => get_string('numdays', '', 7),
144 => get_string('numdays', '', 6),
// first we deal with the case where there are no new settings to be set
if ($newsettingshtml == '') {
- redirect($CFG->wwwroot . '/' . $CFG->admin . '/index.php');
+ redirect($CFG->wwwroot . '/' . $CFG->admin . '/index.php');
die;
}
<tr valign="top" class="required">
- <td align="right">auth_fchost:</td>
+ <td align="right">auth_fchost:</td>
- <td>
+ <td>
<input name="auth_fchost" type="text" size="30" value="<?php echo $config->auth_fchost?>" />
- <?php if (isset($err["auth_fchost"])) formerr($err["auth_fchost"]); ?>
+ <?php if (isset($err["auth_fchost"])) formerr($err["auth_fchost"]); ?>
- </td>
+ </td>
<td>
<tr valign="top" class="required">
- <td align="right">auth_fcfppport:</td>
+ <td align="right">auth_fcfppport:</td>
- <td>
+ <td>
<input name="auth_fcfppport" type="text" size="30" value="<?php echo $config->auth_fcfppport?>" />
- <?php if (isset($err["auth_fcfppport"])) formerr($err["auth_fchost"]); ?>
+ <?php if (isset($err["auth_fcfppport"])) formerr($err["auth_fchost"]); ?>
- </td>
+ </td>
<td>
<tr valign="top" class="required">
- <td align="right">auth_fcuserid:</td>
+ <td align="right">auth_fcuserid:</td>
- <td>
+ <td>
<input name="auth_fcuserid" type="text" size="30" maxlength="15" value="<?php echo $config->auth_fcuserid?>" />
- <?php if (isset($err["auth_fcuserid"])) formerr($err["auth_fcuserid"]); ?>
+ <?php if (isset($err["auth_fcuserid"])) formerr($err["auth_fcuserid"]); ?>
- </td>
+ </td>
<td>
<tr valign="top" class="required">
- <td align="right">auth_fcpasswd:</td>
+ <td align="right">auth_fcpasswd:</td>
- <td>
+ <td>
<input name="auth_fcpasswd" type="password" size="30" maxlength="12" value="<?php echo $config->auth_fcpasswd?>" />
- <?php if (isset($err["auth_fcpasswd"])) formerr($err["auth_fcpasswd"]); ?>
+ <?php if (isset($err["auth_fcpasswd"])) formerr($err["auth_fcpasswd"]); ?>
- </td>
+ </td>
<td>
<tr valign="top" class="required">
- <td align="right">auth_fccreators:</td>
+ <td align="right">auth_fccreators:</td>
- <td>
+ <td>
<input name="auth_fccreators" type="text" size="30" value="<?php echo $config->auth_fccreators?>" />
- <?php if (isset($err["auth_fccreators"])) formerr($err["auth_fccreators"]); ?>
+ <?php if (isset($err["auth_fccreators"])) formerr($err["auth_fccreators"]); ?>
- </td>
+ </td>
<td>
<tr valign="top">
- <td align="right"><?php print_string("instructions", "auth") ?>:</td>
+ <td align="right"><?php print_string("instructions", "auth") ?>:</td>
- <td>
+ <td>
<textarea name="auth_instructions" cols="30" rows="10" wrap="virtual"><?php p($config->auth_instructions) ?></textarea>
// class constructor
function fcFPP($host="localhost", $port="3333")
{
- $this->_hostname = $host;
- $this->_port = $port;
- $this->_user = "";
- $this->_pwd = "";
+ $this->_hostname = $host;
+ $this->_port = $port;
+ $this->_user = "";
+ $this->_pwd = "";
}
// open a connection to the FirstClass server
function open()
{
- if($this->_debug) echo "Connecting to host ";
- $host = $this->_hostname;
- $port = $this->_port;
-
- if($this->_debug) echo "[$host:$port]..";
-
- // open the connection to the FirstClass server
- $conn = fsockopen($host, $port, $errno, $errstr, 5);
- if(!$conn)
- {
- echo "connection failed!".$errno. $errstr;
- return false;
- }
-
- // We are connected
- if($this->_debug) echo "connected!";
-
- // Read connection message.
- $line = fgets ($conn); //+0
- $line = fgets ($conn); //new line
-
- // store the connection in this class, so we can use it later
- $this->_conn = & $conn;
-
- return true;
+ if($this->_debug) echo "Connecting to host ";
+ $host = $this->_hostname;
+ $port = $this->_port;
+
+ if($this->_debug) echo "[$host:$port]..";
+
+ // open the connection to the FirstClass server
+ $conn = fsockopen($host, $port, $errno, $errstr, 5);
+ if(!$conn)
+ {
+ echo "connection failed!".$errno. $errstr;
+ return false;
+ }
+
+ // We are connected
+ if($this->_debug) echo "connected!";
+
+ // Read connection message.
+ $line = fgets ($conn); //+0
+ $line = fgets ($conn); //new line
+
+ // store the connection in this class, so we can use it later
+ $this->_conn = & $conn;
+
+ return true;
}
// close any open connections
function close()
{
- // get the current connection
- $conn = &$this->_conn;
-
- // close it if it's open
- if($conn)
- {
- fclose($conn);
-
- // cleanup the variable
- unset($this->_conn);
- return true;
- }
- return;
+ // get the current connection
+ $conn = &$this->_conn;
+
+ // close it if it's open
+ if($conn)
+ {
+ fclose($conn);
+
+ // cleanup the variable
+ unset($this->_conn);
+ return true;
+ }
+ return;
}
// Authenticate to the FirstClass server
function login($userid, $passwd)
{
- // we did have a connection right?!
+ // we did have a connection right?!
if($this->_conn)
- {
- # Send username
- fputs($this->_conn,"$userid\r\n");
-
- $line = fgets ($this->_conn); //new line
- $line = fgets ($this->_conn); //+0
- $line = fgets ($this->_conn); //new line
-
- # Send password
- fputs($this->_conn,"$passwd\r\n");
- $line = fgets ($this->_conn); //new line
- $line = fgets ($this->_conn); //+0
- $line = fgets ($this->_conn); //+0 or message
-
- if($this->_debug) echo $line;
-
- if (preg_match ("/^\+0/", $line)) { //+0, user with subadmin privileges
- $this->_user = $userid;
- $this->_pwd = $passwd;
- return TRUE;
- } elseif (preg_match ("/^\Sorry/",$line)){ //Denied access but a valid user and password
- return TRUE;
- } else { //Invalid user or password
- return FALSE;
- }
-
-
- }
- return FALSE;
+ {
+ # Send username
+ fputs($this->_conn,"$userid\r\n");
+
+ $line = fgets ($this->_conn); //new line
+ $line = fgets ($this->_conn); //+0
+ $line = fgets ($this->_conn); //new line
+
+ # Send password
+ fputs($this->_conn,"$passwd\r\n");
+ $line = fgets ($this->_conn); //new line
+ $line = fgets ($this->_conn); //+0
+ $line = fgets ($this->_conn); //+0 or message
+
+ if($this->_debug) echo $line;
+
+ if (preg_match ("/^\+0/", $line)) { //+0, user with subadmin privileges
+ $this->_user = $userid;
+ $this->_pwd = $passwd;
+ return TRUE;
+ } elseif (preg_match ("/^\Sorry/",$line)){ //Denied access but a valid user and password
+ return TRUE;
+ } else { //Invalid user or password
+ return FALSE;
+ }
+
+
+ }
+ return FALSE;
}
// Get the list of groups the user is a member of
function getGroups($userid){
-
- $groups = array();
-
- // we must be logged in as a user with subadmin privileges
- if($this->_conn AND $this->_user) {
- # Send BA-command to get groups
- fputs($this->_conn,"GET USER '" . $userid . "' 4 -1\r");
- $line = "";
- while (!$line) {
- $line = trim(fgets ($this->_conn));
- }
- $n = 0;
- while ($line AND !preg_match("/^\+0/", $line) AND $line != "-1003") {
- list( , , $groups[$n++]) = explode(" ",$line,3);
- $line = trim(fgets ($this->_conn));
- }
+
+ $groups = array();
+
+ // we must be logged in as a user with subadmin privileges
+ if($this->_conn AND $this->_user) {
+ # Send BA-command to get groups
+ fputs($this->_conn,"GET USER '" . $userid . "' 4 -1\r");
+ $line = "";
+ while (!$line) {
+ $line = trim(fgets ($this->_conn));
+ }
+ $n = 0;
+ while ($line AND !preg_match("/^\+0/", $line) AND $line != "-1003") {
+ list( , , $groups[$n++]) = explode(" ",$line,3);
+ $line = trim(fgets ($this->_conn));
+ }
if($this->_debug) echo "getGroups:" . implode(",",$groups);
- }
-
- return $groups;
+ }
+
+ return $groups;
}
// Check if the user is member of any of the groups.
// Return the list of groups the user is member of.
function isMemberOf($userid, $groups){
-
- $usergroups = array_map("strtolower",$this->getGroups($userid));
- $groups = array_map("strtolower",$groups);
-
- $result = array_intersect($groups,$usergroups);
-
+
+ $usergroups = array_map("strtolower",$this->getGroups($userid));
+ $groups = array_map("strtolower",$groups);
+
+ $result = array_intersect($groups,$usergroups);
+
if($this->_debug) echo "isMemberOf:" . implode(",",$result);
-
- return $result;
+
+ return $result;
}
function getUserInfo($userid, $field){
-
- $userinfo = "";
-
- if($this->_conn AND $this->_user) {
- # Send BA-command to get data
- fputs($this->_conn,"GET USER '" . $userid . "' " . $field . "\r");
- $line = "";
- while (!$line) {
- $line = trim(fgets ($this->_conn));
- }
- $n = 0;
- while ($line AND !preg_match("/^\+0/", $line)) {
- list( , , $userinfo) = explode(" ",$line,3);
- $line = trim(fgets ($this->_conn));
- }
- if($this->_debug) echo "getUserInfo:" . $userinfo;
- }
-
- return str_replace('\r',' ',trim($userinfo,'"'));
+
+ $userinfo = "";
+
+ if($this->_conn AND $this->_user) {
+ # Send BA-command to get data
+ fputs($this->_conn,"GET USER '" . $userid . "' " . $field . "\r");
+ $line = "";
+ while (!$line) {
+ $line = trim(fgets ($this->_conn));
+ }
+ $n = 0;
+ while ($line AND !preg_match("/^\+0/", $line)) {
+ list( , , $userinfo) = explode(" ",$line,3);
+ $line = trim(fgets ($this->_conn));
+ }
+ if($this->_debug) echo "getUserInfo:" . $userinfo;
+ }
+
+ return str_replace('\r',' ',trim($userinfo,'"'));
}
function getResume($userid){
-
- $resume = "";
-
- $pattern = "/\[.+:.+\..+\]/"; // Remove references to pictures in resumes
-
- if($this->_conn AND $this->_user) {
- # Send BA-command to get data
- fputs($this->_conn,"GET RESUME '" . $userid . "' 6\r");
- $line = "";
- while (!$line) {
+
+ $resume = "";
+
+ $pattern = "/\[.+:.+\..+\]/"; // Remove references to pictures in resumes
+
+ if($this->_conn AND $this->_user) {
+ # Send BA-command to get data
+ fputs($this->_conn,"GET RESUME '" . $userid . "' 6\r");
+ $line = "";
+ while (!$line) {
$line = trim(fgets ($this->_conn));
- }
- $n = 0;
- while ($line AND !preg_match("/^\+0/", $line)) {
- $resume .= preg_replace($pattern,"",str_replace('\r',"\n",trim($line,'6 ')));
- $line = trim(fgets ($this->_conn));
- //print $line;
-
- }
- if($this->_debug) echo "getResume:" . $resume;
- }
-
- return $resume;
+ }
+ $n = 0;
+ while ($line AND !preg_match("/^\+0/", $line)) {
+ $resume .= preg_replace($pattern,"",str_replace('\r',"\n",trim($line,'6 ')));
+ $line = trim(fgets ($this->_conn));
+ //print $line;
+
+ }
+ if($this->_debug) echo "getResume:" . $resume;
+ }
+
+ return $resume;
}
//If the module is being restored
if ($info->restore == 1) {
//Check if the xxxx_decode_content_links_caller exists
- include_once("$CFG->dirroot/mod/$name/restorelib.php");
+ include_once("$CFG->dirroot/mod/$name/restorelib.php");
$function_name = $name."_decode_content_links_caller";
if (function_exists($function_name)) {
if (!defined('RESTORE_SILENTLY')) {
$course_module->instance = 0;
//NOTE: The instance (new) is calculated and updated in db in the
// final step of the restore. We don't know it yet.
- //print_object($course_module); //Debug
+ //print_object($course_module); //Debug
//Save it to db
$newidmod = insert_record("course_modules",$course_module);
if ($newidmod) {
if ($instance) {
//We have the new instance, so update the record in course_modules
$module->instance = $instance->new_id;
- //print_object ($module); //Debug
+ //print_object ($module); //Debug
$status = update_record("course_modules",$module);
} else {
$status = false;
function get_content() {
global $CFG, $USER, $PAGE;
-
+
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
-
+
if ($this->content !== NULL) {
return $this->content;
}
$this->content = new stdClass;
$this->content->text = '';
- if (isset($USER->preference['admin_bookmarks'])) {
+ if (isset($USER->preference['admin_bookmarks'])) {
$bookmarks = explode(',',$USER->preference['admin_bookmarks']);
- // hmm... just a liiitle (potentially) processor-intensive
- // (recall that $adminroot->locate is a huge recursive call... and we're calling it repeatedly here
+ // hmm... just a liiitle (potentially) processor-intensive
+ // (recall that $adminroot->locate is a huge recursive call... and we're calling it repeatedly here
foreach($bookmarks as $bookmark) {
- $temp = $adminroot->locate($bookmark);
- if (is_a($temp, 'admin_settingpage')) {
+ $temp = $adminroot->locate($bookmark);
+ if (is_a($temp, 'admin_settingpage')) {
$this->content->text .= '<a href="' . $CFG->wwwroot . '/' . $CFG->admin . '/settings.php?section=' . $bookmark . '">' . $temp->visiblename . '</a>' . '<br />';
} elseif (is_a($temp, 'admin_externalpage')) {
$this->content->text .= '<a href="' . $temp->url . '">' . $temp->visiblename . '</a>' . '<br />';
}
- }
- } else {
- $bookmarks = array();
- }
-
+ }
+ } else {
+ $bookmarks = array();
+ }
+
if (($section = (isset($PAGE->section) ? $PAGE->section : '')) && (in_array($section, $bookmarks))) {
- $this->content->footer = '<a href="' . $CFG->wwwroot . '/blocks/admin_bookmarks/delete.php?section=' . $section . '&returnurl=' . $CFG->wwwroot . '">' . get_string('unbookmarkthispage','admin') . '</a>';
- } elseif ($section = (isset($PAGE->section) ? $PAGE->section : '')) {
- $this->content->footer = '<a href="' . $CFG->wwwroot . '/blocks/admin_bookmarks/create.php?section=' . $section . '">' . get_string('bookmarkthispage','admin') . '</a>';
- } else {
- $this->content->footer = '';
- }
-
- return $this->content;
+ $this->content->footer = '<a href="' . $CFG->wwwroot . '/blocks/admin_bookmarks/delete.php?section=' . $section . '&returnurl=' . $CFG->wwwroot . '">' . get_string('unbookmarkthispage','admin') . '</a>';
+ } elseif ($section = (isset($PAGE->section) ? $PAGE->section : '')) {
+ $this->content->footer = '<a href="' . $CFG->wwwroot . '/blocks/admin_bookmarks/create.php?section=' . $section . '">' . get_string('bookmarkthispage','admin') . '</a>';
+ } else {
+ $this->content->footer = '';
+ }
+
+ return $this->content;
}
}
if (isset($USER->preference['admin_bookmarks'])) {
$bookmarks = explode(',',$USER->preference['admin_bookmarks']);
-
+
if (in_array($section, $bookmarks)) {
error(get_string('bookmarkalreadyexists','admin'));
- die;
- }
-
- } else {
- $bookmarks = array();
- }
+ die;
+ }
+
+ } else {
+ $bookmarks = array();
+ }
$temp = $adminroot->locate($section);
if (is_a($temp, 'admin_settingpage') || is_a($temp, 'admin_externalpage')) {
-
+
$bookmarks[] = $section;
-
- $bookmarks = implode(',',$bookmarks);
-
- set_user_preference('admin_bookmarks', $bookmarks);
+
+ $bookmarks = implode(',',$bookmarks);
+
+ set_user_preference('admin_bookmarks', $bookmarks);
} else {
die;
}
-
- if (is_a($temp, 'admin_settingpage')) {
-
- redirect($CFG->wwwroot . '/' . $CFG->admin . '/settings.php?section=' . $section, 'Bookmark added.',1);
+
+ if (is_a($temp, 'admin_settingpage')) {
+
+ redirect($CFG->wwwroot . '/' . $CFG->admin . '/settings.php?section=' . $section, 'Bookmark added.',1);
} elseif (is_a($temp, 'admin_externalpage')) {
if ($key === false) {
error(get_string('nonexistentbookmark','admin'));
- die;
- }
+ die;
+ }
- unset($bookmarks[$key]);
- $bookmarks = implode(',',$bookmarks);
+ unset($bookmarks[$key]);
+ $bookmarks = implode(',',$bookmarks);
set_user_preference('admin_bookmarks', $bookmarks);
$temp = $adminroot->locate($section);
} else {
redirect($CFG->wwwroot, get_string('bookmarkdeleted', 'admin'),1);
}
- die;
+ die;
- }
-
+ }
+
error(get_string('nobookmarksforuser','admin'));
- die;
+ die;
} else {
error(get_string('invalidsection', 'admin'));
- die;
+ die;
}
?>
\ No newline at end of file
var $tempcontent;
var $pathtosection;
var $expandjavascript;
- var $destination;
+ var $destination;
function init() {
global $PAGE;
$this->currentdepth = 0;
$this->spancounter = 1;
$this->tempcontent = '';
- $this->section = (isset($PAGE->section) ? $PAGE->section : '');
+ $this->section = (isset($PAGE->section) ? $PAGE->section : '');
$this->pathtosection = array();
$this->expandjavascript = '';
}
}
function build_tree (&$content) {
- global $CFG;
- if (is_a($content, 'admin_settingpage')) {
- if ($content->check_access()) {
- $this->create_item($content->visiblename,$CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=' . $content->name,$CFG->wwwroot .'/blocks/admin_tree/item.gif');
- }
- } else if (is_a($content, 'admin_externalpage')) {
- if ($content->check_access()) {
- $this->create_item($content->visiblename, $content->url, $CFG->wwwroot . '/blocks/admin_tree/item.gif');
- }
- } else if (is_a($content, 'admin_category')) {
- if ($content->check_access()) {
-
+ global $CFG;
+ if (is_a($content, 'admin_settingpage')) {
+ if ($content->check_access()) {
+ $this->create_item($content->visiblename,$CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=' . $content->name,$CFG->wwwroot .'/blocks/admin_tree/item.gif');
+ }
+ } else if (is_a($content, 'admin_externalpage')) {
+ if ($content->check_access()) {
+ $this->create_item($content->visiblename, $content->url, $CFG->wwwroot . '/blocks/admin_tree/item.gif');
+ }
+ } else if (is_a($content, 'admin_category')) {
+ if ($content->check_access()) {
+
// check if the category we're currently printing is a parent category for the current page; if it is, we
- // make a note (in the javascript) that it has to be expanded after the page has loaded
- if ($this->pathtosection[count($this->pathtosection) - 1] == $content->name) {
- $this->expandjavascript .= 'expand("vh_span' . ($this->spancounter) . '");' . "\n";
- array_pop($this->pathtosection);
- }
+ // make a note (in the javascript) that it has to be expanded after the page has loaded
+ if ($this->pathtosection[count($this->pathtosection) - 1] == $content->name) {
+ $this->expandjavascript .= 'expand("vh_span' . ($this->spancounter) . '");' . "\n";
+ array_pop($this->pathtosection);
+ }
- $this->open_folder($content->visiblename);
+ $this->open_folder($content->visiblename);
unset($entries);
$entries = array_keys($content->children);
- foreach ($entries as $entry) {
- $this->build_tree($content->children[$entry]);
- }
+ foreach ($entries as $entry) {
+ $this->build_tree($content->children[$entry]);
+ }
- $this->close_folder();
- }
- }
+ $this->close_folder();
+ }
+ }
}
function get_content() {
global $CFG, $ADMIN;
-
- require_once($CFG->libdir.'/adminlib.php');
+
+ require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
if ($this->content !== NULL) {
if ($this->pathtosection = $adminroot->path($this->section)) {
$this->pathtosection = array_reverse($this->pathtosection);
- array_pop($this->pathtosection);
- }
+ array_pop($this->pathtosection);
+ }
// we need to do this instead of $this->build_tree($adminroot) because the top-level folder
- // is redundant (and ideally ignored). (the top-level folder is "administration".)
-
- unset($entries);
-
- $entries = array_keys($adminroot->children);
+ // is redundant (and ideally ignored). (the top-level folder is "administration".)
- asort($entries);
+ unset($entries);
- foreach ($entries as $entry) {
+ $entries = array_keys($adminroot->children);
+
+ asort($entries);
+
+ foreach ($entries as $entry) {
$this->build_tree($adminroot->children[$entry]);
}
-
+
if ($this->tempcontent !== '') {
$this->content = new stdClass;
$this->content->text = '<script type="text/javascript">' . "\n\n";
$this->content->text .= ' expand("vh_span" + String(i));' . "\n";
$this->content->text .= ' }' . "\n";
$this->content->text .= '}' . "\n";
-
+
$this->content->text .= 'function collapseall() {' . "\n";
$this->content->text .= ' for (i = vh_numspans; i > 0; i--) {' . "\n";
$this->content->text .= ' collapse("vh_span" + String(i));' . "\n";
$result = execute_sql("
CREATE TABLE {$CFG->prefix}blocks
(
- id SERIAL8 PRIMARY KEY,
- name varchar(40) NOT NULL default '',
- version INT8 NOT NULL default '0',
- cron INT8 NOT NULL default '0',
- lastcron INT8 NOT NULL default '0',
- visible int NOT NULL default '1'
+ id SERIAL8 PRIMARY KEY,
+ name varchar(40) NOT NULL default '',
+ version INT8 NOT NULL default '0',
+ cron INT8 NOT NULL default '0',
+ lastcron INT8 NOT NULL default '0',
+ visible int NOT NULL default '1'
)
") ;
$this->content->text = '
<script language="JavaScript">
<!--
- function Next()
- {
- submitScreen("Next");
- document.vbankform.submit();
- }
- function Back()
- {
- submitScreen("Back");
- document.vbankform.submit();
- }
+ function Next()
+ {
+ submitScreen("Next");
+ document.vbankform.submit();
+ }
+ function Back()
+ {
+ submitScreen("Back");
+ document.vbankform.submit();
+ }
- function num_format(x) { // format numbers with two digits
- sgn = (x < 0);
- x = Math.abs(x);
- x = Math.floor((x * 100) + .5);
- i = 3;
- y = "";
- while(((i--) > 0) || (x > 0)) {
- y = (x % 10) + y;
- x = Math.floor(x / 10);
- if(i == 1) {
- y = "." + y;
- }
- }
- if(sgn) {
- y = "-" + y;
- }
- return(y);
+ function num_format(x) { // format numbers with two digits
+ sgn = (x < 0);
+ x = Math.abs(x);
+ x = Math.floor((x * 100) + .5);
+ i = 3;
+ y = "";
+ while(((i--) > 0) || (x > 0)) {
+ y = (x % 10) + y;
+ x = Math.floor(x / 10);
+ if(i == 1) {
+ y = "." + y;
+ }
+ }
+ if(sgn) {
+ y = "-" + y;
+ }
+ return(y);
}
function comp(v) { // general entry point for all cases
- // convert all entry fields into variables
- x = document.vbankform;
- pv = parseFloat(x.LOANAMOUNT.value);
- lpp = parseFloat(x.LOANPAYPERIOD[x.LOANPAYPERIOD.selectedIndex].value);
- if (isNaN(pv) && (v != "pv"))
- {
- x.LOANAMOUNT.select();
- x.LOANAMOUNT.focus();
- alert("Numbers only to be entered");
- return;
- }
- fv = parseFloat("0");
- yr = parseFloat(x.LOANTERM.value);
- if (isNaN(yr) && (v != "np"))
- {
- x.LOANTERM.select();
- x.LOANTERM.focus();
- alert("Numbers only to be entered");
- return;
- }
- np = lpp * yr;
- pmt = -parseFloat(x.LOANREPAYMENT.value);
- if (isNaN(pmt) && (v != "pmt"))
- {
- x.LOANREPAYMENT.select();
- x.LOANREPAYMENT.focus();
- alert("Numbers only to be entered");
- return;
- }
- if(x.LOANINTRATE.value == "") {
- alert("You must enter an interest rate (ir).");
- }
- else {
- ir = parseFloat(x.LOANINTRATE.value);
- if (isNaN(ir))
- {
- x.LOANINTRATE.select();
- x.LOANINTRATE.focus();
- alert("Numbers only to be entered");
- return;
- }
- ir = ((ir / lpp) / 100);
+ // convert all entry fields into variables
+ x = document.vbankform;
+ pv = parseFloat(x.LOANAMOUNT.value);
+ lpp = parseFloat(x.LOANPAYPERIOD[x.LOANPAYPERIOD.selectedIndex].value);
+ if (isNaN(pv) && (v != "pv"))
+ {
+ x.LOANAMOUNT.select();
+ x.LOANAMOUNT.focus();
+ alert("Numbers only to be entered");
+ return;
+ }
+ fv = parseFloat("0");
+ yr = parseFloat(x.LOANTERM.value);
+ if (isNaN(yr) && (v != "np"))
+ {
+ x.LOANTERM.select();
+ x.LOANTERM.focus();
+ alert("Numbers only to be entered");
+ return;
+ }
+ np = lpp * yr;
+ pmt = -parseFloat(x.LOANREPAYMENT.value);
+ if (isNaN(pmt) && (v != "pmt"))
+ {
+ x.LOANREPAYMENT.select();
+ x.LOANREPAYMENT.focus();
+ alert("Numbers only to be entered");
+ return;
+ }
+ if(x.LOANINTRATE.value == "") {
+ alert("You must enter an interest rate (ir).");
+ }
+ else {
+ ir = parseFloat(x.LOANINTRATE.value);
+ if (isNaN(ir))
+ {
+ x.LOANINTRATE.select();
+ x.LOANINTRATE.focus();
+ alert("Numbers only to be entered");
+ return;
+ }
+ ir = ((ir / lpp) / 100);
- // test and compute all cases
+ // test and compute all cases
- if (v == "pv") {
- if(ir == 0) {
- pv = -(fv + (pmt * np));
- }
- else {
- q1 = Math.pow(1 + ir,-np);
- q2 = Math.pow(1 + ir,np);
- pv = -(q1 * (fv * ir - pmt + q2 * pmt))/ir;
- }
- x.LOANAMOUNT.value = num_format(pv);
- }
+ if (v == "pv") {
+ if(ir == 0) {
+ pv = -(fv + (pmt * np));
+ }
+ else {
+ q1 = Math.pow(1 + ir,-np);
+ q2 = Math.pow(1 + ir,np);
+ pv = -(q1 * (fv * ir - pmt + q2 * pmt))/ir;
+ }
+ x.LOANAMOUNT.value = num_format(pv);
+ }
- if (v == "np") {
- if(ir == 0) {
- if(pmt != 0) {
- np = - (fv + pv)/pmt;
- }
- else {
- alert("Divide by zero error.");
- }
- }
- else {
- np = Math.log((-fv * ir + pmt)/(pmt + ir * pv))/ Math.log(1 + ir);
- }
- if(np == 0) {
- alert("Can\'t compute Number of Periods for the present values.");
- }
- else {
- np = (np / lpp)
- if (isNaN(np)) {
- alert("The repayment amount is less than the interest. You must increase your repayments to pay off this loan!");
- } else {
- x.LOANTERM.value = num_format(np);
- }
- }
- }
+ if (v == "np") {
+ if(ir == 0) {
+ if(pmt != 0) {
+ np = - (fv + pv)/pmt;
+ }
+ else {
+ alert("Divide by zero error.");
+ }
+ }
+ else {
+ np = Math.log((-fv * ir + pmt)/(pmt + ir * pv))/ Math.log(1 + ir);
+ }
+ if(np == 0) {
+ alert("Can\'t compute Number of Periods for the present values.");
+ }
+ else {
+ np = (np / lpp)
+ if (isNaN(np)) {
+ alert("The repayment amount is less than the interest. You must increase your repayments to pay off this loan!");
+ } else {
+ x.LOANTERM.value = num_format(np);
+ }
+ }
+ }
- if (v == "pmt") {
- if(ir == 0.0) {
- if(np != 0) {
- pmt = (fv + pv)/np;
- }
- else {
- alert("Divide by zero error.");
- }
- }
- else {
- q = Math.pow(1 + ir,np);
- pmt = ((ir * (fv + q * pv))/(-1 + q));
- }
- x.LOANREPAYMENT.value = num_format(pmt);
- }
+ if (v == "pmt") {
+ if(ir == 0.0) {
+ if(np != 0) {
+ pmt = (fv + pv)/np;
+ }
+ else {
+ alert("Divide by zero error.");
+ }
+ }
+ else {
+ q = Math.pow(1 + ir,np);
+ pmt = ((ir * (fv + q * pv))/(-1 + q));
+ }
+ x.LOANREPAYMENT.value = num_format(pmt);
+ }
- }
+ }
} // function comp
//-->
- </script>
+ </script>
<title></title>
</head>
<body>
<h1></h1>
<form method="post" id="vbankform" name="vbankform">
- <table>
+ <table>
<tr>
- <td colspan="2">'.get_string('amountofloan','block_loancalc').'</td>
+ <td colspan="2">'.get_string('amountofloan','block_loancalc').'</td>
</tr>
- <tr>
- <td><input name="LOANAMOUNT" id="LOANAMOUNT" size="17"></td>
- <td><a href="JavaScript:comp(\'pv\');"><img src="'.$calc.'" alt="calculate" border="0"></a></td>
- </tr>
- <tr>
- <td colspan="2">'.get_string('repaymentamount','block_loancalc').'</td>
- </tr>
- <tr>
- <td><input name="LOANREPAYMENT" id="LOANREPAYMENT" size="17"></td>
- <td><a href="JavaScript:comp(\'pmt\');"><img src="'.$calc.'" alt="calculate" border="0"></a></td>
- </tr>
- <tr>
- <td colspan="2">'.get_string('loanterm','block_loancalc').'</td>
- </tr>
- <tr>
- <td><input name="LOANTERM" id="LOANTERM" size="17"></td>
- <td><a href="JavaScript:comp(\'np\');"><img src="'.$calc.'" alt="calculate" border="0"></a></td>
- </tr>
- <tr>
- <td colspan="2">'.get_string('interestrate','block_loancalc').'</td>
- </tr>
- <tr>
- <td><input name="LOANINTRATE" id="LOANINTRATE" size="17"></td>
- <td></td>
- </tr>
- <tr>
- <td colspan="2">'.get_string('repaymentfreq','block_loancalc').'</td>
+ <tr>
+ <td><input name="LOANAMOUNT" id="LOANAMOUNT" size="17"></td>
+ <td><a href="JavaScript:comp(\'pv\');"><img src="'.$calc.'" alt="calculate" border="0"></a></td>
+ </tr>
+ <tr>
+ <td colspan="2">'.get_string('repaymentamount','block_loancalc').'</td>
</tr>
- <td>';
+ <tr>
+ <td><input name="LOANREPAYMENT" id="LOANREPAYMENT" size="17"></td>
+ <td><a href="JavaScript:comp(\'pmt\');"><img src="'.$calc.'" alt="calculate" border="0"></a></td>
+ </tr>
+ <tr>
+ <td colspan="2">'.get_string('loanterm','block_loancalc').'</td>
+ </tr>
+ <tr>
+ <td><input name="LOANTERM" id="LOANTERM" size="17"></td>
+ <td><a href="JavaScript:comp(\'np\');"><img src="'.$calc.'" alt="calculate" border="0"></a></td>
+ </tr>
+ <tr>
+ <td colspan="2">'.get_string('interestrate','block_loancalc').'</td>
+ </tr>
+ <tr>
+ <td><input name="LOANINTRATE" id="LOANINTRATE" size="17"></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td colspan="2">'.get_string('repaymentfreq','block_loancalc').'</td>
+ </tr>
+ <td>';
$options[52] = get_string('weekly','block_loancalc');
$options[26] = get_string('fortnightly','block_loancalc');
$options[12] = get_string('monthly','block_loancalc');
$this->content->text .= choose_from_menu($options,'LOANPAYPERIOD','12',NULL,NULL,NULL,true);
$this->content->text .= '</td>
- <td></td>
- </tr>
- </table>
- </form>';
+ <td></td>
+ </tr>
+ </table>
+ </form>';
$this->content->footer = '';
return $this->content;
* Display the block!
*/
function _print_block() {
- global $COURSE;
+ global $COURSE;
// is_empty() includes a call to get_content()
if ($this->is_empty() && empty($COURSE->javascriptportal)) {
//make a record of the block for the ajax course format to use
if (!empty($COURSE->javascriptportal)) {
- $COURSE->javascriptportal->block_add('inst'.$this->instance->id,!$this->instance->visible);
+ $COURSE->javascriptportal->block_add('inst'.$this->instance->id,!$this->instance->visible);
}
}
}
function _add_edit_controls($options) {
global $CFG, $USER, $PAGE;
-
- // this is the context relevant to this particular block instance
- $blockcontext = get_context_instance(CONTEXT_BLOCK, $this->instance->id);
-
- // context for site or course, i.e. participant list etc
- // check to see if user can edit site or course blocks.
- // blocks can appear on other pages such as mod and blog pages...
-
- switch ($this->instance->pagetype) {
- case 'course-view':
- if ($this->instance->pageid == SITEID) {
- $context = get_context_instance(CONTEXT_SYSTEM, $this->instance->pageid);
- } else {
- $context = get_context_instance(CONTEXT_COURSE, $this->instance->pageid);
- }
-
- if (!has_capability('moodle/site:manageblocks', $context)) {
- return null;
- }
- break;
- default:
-
- break;
- }
-
-
+
+ // this is the context relevant to this particular block instance
+ $blockcontext = get_context_instance(CONTEXT_BLOCK, $this->instance->id);
+
+ // context for site or course, i.e. participant list etc
+ // check to see if user can edit site or course blocks.
+ // blocks can appear on other pages such as mod and blog pages...
+
+ switch ($this->instance->pagetype) {
+ case 'course-view':
+ if ($this->instance->pageid == SITEID) {
+ $context = get_context_instance(CONTEXT_SYSTEM, $this->instance->pageid);
+ } else {
+ $context = get_context_instance(CONTEXT_COURSE, $this->instance->pageid);
+ }
+
+ if (!has_capability('moodle/site:manageblocks', $context)) {
+ return null;
+ }
+ break;
+ default:
+
+ break;
+ }
+
+
if (!isset($this->str)) {
$this->str->delete = get_string('delete');
$this->str->moveup = get_string('moveup');
}
$script = $page->url_get_full(array('instanceid' => $this->instance->id, 'sesskey' => $USER->sesskey));
- // place holder for roles button
- $movebuttons .= '<a class="icon roles" title="'. $this->str->assignroles .'" href="'.$CFG->wwwroot.'/admin/roles/assign.php?contextid='.$blockcontext->id.'">' .
+ // place holder for roles button
+ $movebuttons .= '<a class="icon roles" title="'. $this->str->assignroles .'" href="'.$CFG->wwwroot.'/admin/roles/assign.php?contextid='.$blockcontext->id.'">' .
'<img src="'.$CFG->pixpath.'/i/roles.gif" alt="'.$this->str->assignroles.'" /></a>';
$movebuttons .= '<a class="icon hide" title="'. $title .'" href="'.$script.'&blockaction=toggle">' .
}
function _print_block() {
- global $COURSE;
+ global $COURSE;
// is_empty() includes a call to get_content()
if ($this->is_empty() && empty($COURSE->javascriptportal)) {
//make a record of the block for the ajax course format to use
if (!empty($COURSE->javascriptportal)) {
- $COURSE->javascriptportal->block_add('inst'.$this->instance->id,!$this->instance->visible);
+ $COURSE->javascriptportal->block_add('inst'.$this->instance->id,!$this->instance->visible);
}
}
}
}
function get_content() {
-
+
global $USER, $CFG;
-
- // the following 3 lines is need to pass _self_test();
- if (empty($this->instance->pageid)) {
- return '';
- }
-
-
- // only 2 possible contexts, site or course
- if ($this->instance->pageid == SITEID) { // site context
- $currentcontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
- $canviewparticipants = has_capability('moodle/site:viewparticipants', $currentcontext);
- } else { // course context
- $currentcontext = get_context_instance(CONTEXT_COURSE, $this->instance->pageid);
- $canviewparticipants = has_capability('moodle/course:viewparticipants', $currentcontext);
- }
-
- if (!$canviewparticipants) {
- $this->context = '';
- return $this->content;
- }
+
+ // the following 3 lines is need to pass _self_test();
+ if (empty($this->instance->pageid)) {
+ return '';
+ }
+
+
+ // only 2 possible contexts, site or course
+ if ($this->instance->pageid == SITEID) { // site context
+ $currentcontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
+ $canviewparticipants = has_capability('moodle/site:viewparticipants', $currentcontext);
+ } else { // course context
+ $currentcontext = get_context_instance(CONTEXT_COURSE, $this->instance->pageid);
+ $canviewparticipants = has_capability('moodle/course:viewparticipants', $currentcontext);
+ }
+
+ if (!$canviewparticipants) {
+ $this->context = '';
+ return $this->content;
+ }
if ($this->content !== NULL) {
return $this->content;
"There are 3 things I have set differently (as far as I can remember!)
in the Moodle install process I set the debuging to be "on"
- in php.ini file,Ê
+ in php.ini file,�
error_reporting = E_ALL
and in my browser [Ed. I assume he is on a windows machine likely using some form of IE],
internet options > advanced
under the browsing section
display a notification about every script error selected
disable Script debugging unselected."
- --Dan Marsden, 2004
+ --Dan Marsden, 2004
=================================================
__________
REGULAR TODO:
- MOODLE BLOG TODO
+ MOODLE BLOG TODO
=================================================
NEEDS TESTING
(NOTE: If you decide to test these items please
(bug fixes and other things targeted for first release)
=================================================
-¥rss_client - during upgrade check for fopen() (or whatever is required) and disable the block if it cannot function on the server? How to properly introspect this functionality?
+�rss_client - during upgrade check for fopen() (or whatever is required) and disable the block if it cannot function on the server? How to properly introspect this functionality?
-¥ Elimiate admin.php file - move one remaining function into category block
+� Elimiate admin.php file - move one remaining function into category block
-¥ Calendar Block Bug: Cal is showing link to dates with blog entries which are not found in the current blog! It should only show links to dates that have entries which the user can see given their blogFilter constraints. (Odd - in testing on my local site I cannot reproduce this error).
+� Calendar Block Bug: Cal is showing link to dates with blog entries which are not found in the current blog! It should only show links to dates that have entries which the user can see given their blogFilter constraints. (Odd - in testing on my local site I cannot reproduce this error).
-¥ Martin suggested that the "Enable blog" step should occur on first attempt at new entry - eliminating one step. I'm not thoroughly convinced that this is the best, it needs more discussion. If you enable the blog just because they click "post new entry" then you are adding extra blogs for the curious who may not use it after first investigation. The best compromise is to show the'learning text' on the edit form itself and enable the blog when they submit their first entry, but the edit form doesn't lend itself well to this approach and the edit form would be pretty far down the page.
+� Martin suggested that the "Enable blog" step should occur on first attempt at new entry - eliminating one step. I'm not thoroughly convinced that this is the best, it needs more discussion. If you enable the blog just because they click "post new entry" then you are adding extra blogs for the curious who may not use it after first investigation. The best compromise is to show the'learning text' on the edit form itself and enable the blog when they submit their first entry, but the edit form doesn't lend itself well to this approach and the edit form would be pretty far down the page.
(One possible solution is to add a bool column to the blog_list table enabled/disabled. If the user hits the edit page and they have no blog then create one in the db for them and use that blogid for the remainder of the page. If their blog is disabled (default) then add a link to the top of the page suggesting that they read the help file on "About Blogs" before posting.)
-¥ Martin makes a good point about eliminating jargon for the end user experience. Look through blocks and links and comb out overly cryptic wording.
+� Martin makes a good point about eliminating jargon for the end user experience. Look through blocks and links and comb out overly cryptic wording.
-¥ Continue work on help pages for trackback and pingback. Explain what they are and why you would want to send or not send them from a post. (posted discussion topic requesting assistance with this text on using moodle blog forum)
+� Continue work on help pages for trackback and pingback. Explain what they are and why you would want to send or not send them from a post. (posted discussion topic requesting assistance with this text on using moodle blog forum)
-¥ phase out the use of BlogEntry->entryCategoryIds since BlogEntry->entryCategories now contains both the id and name in a single associative array.
+� phase out the use of BlogEntry->entryCategoryIds since BlogEntry->entryCategories now contains both the id and name in a single associative array.
RSS (server): feeds NOW support args of blogid=# or catid=#. As we integrate further with moodle we may want a courseid=# option. This applies to rss, rss2 and atom.php. Courseid may not be useful except on courses which allow guest access.
I do not know for sure that rss feeds can be authenticated. The current rss feeds do not do any form of authentication. How would a news reader client handle authentication of the feed? Page re: authenticated feeds: http://labs.silverorange.com/archives/2003/july/privaterss
-¥ On edit.php indent the send trackback option and make it dependent on pingback being enabled
+� On edit.php indent the send trackback option and make it dependent on pingback being enabled
for reference on how to do this see code for "when adding a Resource" (I'm not positive that tb/pb are quite this neatly related with tb dependant on pb being enabled. I believe that tb could be enabled without pb and it will work. This requires more research and better help file explanations of feature functionality. It might seem appropriate to simply allow trackback as it seems to be built on top of pb, but I believe pb is supported because some remote servers do not support tb.)
-¥ SECURITY - ADMIN CONFIG OPTION - I'm thinking lately that it might be nice during install time (and as an admin blog config option) to present the user with a choice - "use blogs" <yes/no> - that way any "security" concerns are negated since it can be completely disabled.
+� SECURITY - ADMIN CONFIG OPTION - I'm thinking lately that it might be nice during install time (and as an admin blog config option) to present the user with a choice - "use blogs" <yes/no> - that way any "security" concerns are negated since it can be completely disabled.
-¥ Check to see if guest users who have joined the course with an enrollment key can post comments when anon comments disabled/enabled - maybe extra setting in config - "allow guests who enter with enrolment key to post comments"
+� Check to see if guest users who have joined the course with an enrollment key can post comments when anon comments disabled/enabled - maybe extra setting in config - "allow guests who enter with enrolment key to post comments"
-¥ Convert archive.php into view.php which will be a permalink page for viewing single entries only.
+� Convert archive.php into view.php which will be a permalink page for viewing single entries only.
=================================================
ONGOING / STYLE
=================================================
-¥ Examine database usage and attempt to optimize: (note from Jon: you can say "EXPLAIN (your query here)" and MySQL will tell you what it's doing to execute the query for example, how many rows it will have to consider, what indexes it will be using and stuff)
+� Examine database usage and attempt to optimize: (note from Jon: you can say "EXPLAIN (your query here)" and MySQL will tell you what it's doing to execute the query for example, how many rows it will have to consider, what indexes it will be using and stuff)
-¥ if you're worried about memory bloat - just don't keep the objects around any longer than you need to - e.g. after done with it call "unset($page)"
+� if you're worried about memory bloat - just don't keep the objects around any longer than you need to - e.g. after done with it call "unset($page)"
-¥ Add phpdoc comments to files, classes and functions.
+� Add phpdoc comments to files, classes and functions.
-¥ SQL: Convert more sql calls to moodle functions rather than raw sql.
+� SQL: Convert more sql calls to moodle functions rather than raw sql.
-¥ LOCALIZATION: Review code occasionally to localize any hard coded text
+� LOCALIZATION: Review code occasionally to localize any hard coded text
-¥ MOODLE INTEGRATION/CLEANUP: enforce integer values before using them in db calls:
+� MOODLE INTEGRATION/CLEANUP: enforce integer values before using them in db calls:
// Make sure that the GET variables are correct
$day = intval($_GET['cal_d']);
-¥ MOODLE INTEGRATION/CLEANUP: Use p() when showing vars in html forms
+� MOODLE INTEGRATION/CLEANUP: Use p() when showing vars in html forms
<input name="block_online_users_timetosee" type="text" size="5" value="<?php if(isset($CFG->block_online_users_timetosee)) {p($CFG->block_online_users_timetosee);} else {p(5);} ?>"
actually p(0 and s() just pass the argument though strip_chars and htmlspecialchars to remove < > special characters - making sure it's just text.
-¥ from Jon: $motto = "always use empty() UNLESS there is a specific reason not to"
+� from Jon: $motto = "always use empty() UNLESS there is a specific reason not to"
and the specific reasons may be two:
1) you care to differentiate between NULL and ''
2) you want to see if an object exists before starting to pull out its properties
=======================================================================
FEATURE REQUESTS (not targeted for first release, order means nothing)
=======================================================================
-¥ http://wordpress.org/about/shots/1.5/moderation.png - comment moderation for the blog owner themselves
+� http://wordpress.org/about/shots/1.5/moderation.png - comment moderation for the blog owner themselves
-¥ RSS 2.0's enclosure capabilities would be a nice addition for podcasting.
+� RSS 2.0's enclosure capabilities would be a nice addition for podcasting.
-¥ From Martin's bug regarding blogging:
+� From Martin's bug regarding blogging:
"3) Blog entries appear as usual, and can have a discussion attached to them for feedback and comments. Each entry can also have a "grade", which is the average of a number of ratings. Normally this might just be the teacher, but it could be the whole class rating each other's entries."
-¥ find a way to moderate based on the category and course rather than the site. Would allow one teacher to moderate their own course entries while another chooses not to
+� find a way to moderate based on the category and course rather than the site. Would allow one teacher to moderate their own course entries while another chooses not to
-¥ RSS_CLIENT:
+� RSS_CLIENT:
define('MAGPIE_CACHE_FRESH_ONLY', false); //should be exposed as an admin config option - if true then it will not display stale cache contents when remote feed cannot be refreshed.
-¥ PINGBACK/TRACKBACK: PingBacks and TrackBacks should be logged in moodle logs as they are saved/executed.
+� PINGBACK/TRACKBACK: PingBacks and TrackBacks should be logged in moodle logs as they are saved/executed.
-¥ Handle deletion of user
+� Handle deletion of user
BlogServer class has function deleteBlogById($blogid). This is not currently called by any blog code. It might be a good function to be used by moodle. However, moodle's delete user simply marks the user as deleted - allowing the user to be easily reactivated. Should we be checking for ($user->deleted != 1) before displaying blog information?
-¥ Possibly re-enable weblogs.com RPC option
+� Possibly re-enable weblogs.com RPC option
//below is a section removed from edit.php.
<?php
if($CFG->blog_useweblog_rpc) {
echo "<input type=checkbox name=weblogrpc value=\"1\">Send update notice to weblogs.com<br>(may cause longer load time) ";
}?>
-¥ DH - RSS - All rss/atom scripts should use a blogFilter with arguments passed in to be used in loading correct blogEntries. Either the news page or a new function in BlogFilter should build the cache filename. Create a new page that has full drop down menu options to select a specific feed type (filter news feeds by category, user, date to start with)
+� DH - RSS - All rss/atom scripts should use a blogFilter with arguments passed in to be used in loading correct blogEntries. Either the news page or a new function in BlogFilter should build the cache filename. Create a new page that has full drop down menu options to select a specific feed type (filter news feeds by category, user, date to start with)
-¥ RSS: Single page where users can go to access rss links (xml image and link) which are available to them on the moodle server - instead of only being available in blocks. When working with our own published feeds add links for administrator to "Validate" remote feed. Should integrate with new news page that lists all available local feeds. ( http://feeds.archive.org/validator/check?url=<BLOGRSSURL>) (NEWS/RSS: add new index_news.php file. should list all possible feeds for the site. including blogids, catids and moodle links. At the top should be "My RSS Feeds" for logged in users to quickly find their own links. RSS Feeds side block and the user admin section should have links to this new page.)
+� RSS: Single page where users can go to access rss links (xml image and link) which are available to them on the moodle server - instead of only being available in blocks. When working with our own published feeds add links for administrator to "Validate" remote feed. Should integrate with new news page that lists all available local feeds. ( http://feeds.archive.org/validator/check?url=<BLOGRSSURL>) (NEWS/RSS: add new index_news.php file. should list all possible feeds for the site. including blogids, catids and moodle links. At the top should be "My RSS Feeds" for logged in users to quickly find their own links. RSS Feeds side block and the user admin section should have links to this new page.)
-¥ API.PHP: Add support for media upload api metaweblog call. Would allow a user to post a blog entry complete with pictures. "Finally, the ability of students to include pictures and other media is very useful." Should target this ASAP. Right now I'm waiting for moodle to have a comprehensive file management system that would allow a student to upload their own files to the server.
+� API.PHP: Add support for media upload api metaweblog call. Would allow a user to post a blog entry complete with pictures. "Finally, the ability of students to include pictures and other media is very useful." Should target this ASAP. Right now I'm waiting for moodle to have a comprehensive file management system that would allow a student to upload their own files to the server.
-¥ Add entry/comment view counters
+� Add entry/comment view counters
COUNTERS: Add view counters to simplog tables (or create blog_log table). How many times has the full body of an entry been viewed, how many times have comments on an entry been viewed? (member vs. guest views should be counted) Should be a new template markup option --showguestviews-- --showmemberviews-- --showtotalviews--.
From email with Jon P. :
Is it possible to create an event in the calendar programmatically
that
- 1) is NOT tied to a courseid, an event for the user, not for a course
+ 1) is NOT tied to a courseid, an event for the user, not for a course
they are in
- 2) is not editable by the user
+ 2) is not editable by the user
"OK, your question has two parts and a two-sided answer. First of all, you
could add fields to mdl_event that make the recognition of a fifth type of
RSS:
Notes from: http://www.learningcircuits.org/2004/may2004/0405_trends.htm
-And what about other technologies? Could RSS be integrated with other new tools, such as the ones described in ÒWe LearningÓ, parts I and II? Consider
-¥ a social networking tool that sends you a feed informing you of the new people who just joined the network
-¥ an expert management system that uses feeds to tell you when a new expert is added to the system in your area of interest, or when an expert has created a new document you might be interested in
-¥ collaborative workspaces that use feeds to bring in information people in the group need to complete a project
-¥ a problem-based RSS feed integrated with a social networking or expert management tool in which you could subscribe to a problem, for example Òreluctant learners,Ó and then receive updates whenever someone writes on that topic.
+And what about other technologies? Could RSS be integrated with other new tools, such as the ones described in �We Learning�, parts I and II? Consider
+� a social networking tool that sends you a feed informing you of the new people who just joined the network
+� an expert management system that uses feeds to tell you when a new expert is added to the system in your area of interest, or when an expert has created a new document you might be interested in
+� collaborative workspaces that use feeds to bring in information people in the group need to complete a project
+� a problem-based RSS feed integrated with a social networking or expert management tool in which you could subscribe to a problem, for example �reluctant learners,� and then receive updates whenever someone writes on that topic.
- ¥ RSS Server: Create RSS feed of member joins for each course.
\ No newline at end of file
+ � RSS Server: Create RSS feed of member joins for each course.
\ No newline at end of file
case 'site':
if (isloggedin()) {
-
+
$SQL = 'SELECT '.$requiredfields.' FROM '.$CFG->prefix.'post p, '.$tagtablesql
.$CFG->prefix.'user u
WHERE p.userid = u.id '.$tagquerysql.'
case 'group':
- $SQL = 'SELECT '.$requiredfields.' FROM '.$CFG->prefix.'post p, '.$tagtablesql
- .$CFG->prefix.'groups_members m, '.$CFG->prefix.'user u
- WHERE p.userid = m.userid '.$tagquerysql.'
- AND u.id = p.userid
- AND m.groupid = '.$filterselect.'
- AND (p.publishstate = \'site\' OR p.publishstate = \'public\' OR p.userid = '.$USER->id.')';
+ $SQL = 'SELECT '.$requiredfields.' FROM '.$CFG->prefix.'post p, '.$tagtablesql
+ .$CFG->prefix.'groups_members m, '.$CFG->prefix.'user u
+ WHERE p.userid = m.userid '.$tagquerysql.'
+ AND u.id = p.userid
+ AND m.groupid = '.$filterselect.'
+ AND (p.publishstate = \'site\' OR p.publishstate = \'public\' OR p.userid = '.$USER->id.')';
break;
case 'user':
-
- if (isloggedin()) {
-
- $SQL = 'SELECT '.$requiredfields.' FROM '.$CFG->prefix.'post p, '.$tagtablesql
- .$CFG->prefix.'user u
- WHERE p.userid = u.id '.$tagquerysql.'
- AND u.id = '.$filterselect.'
- AND (p.publishstate = \'site\' OR p.publishstate = \'public\' OR p.userid = '.$USER->id.')';
- } else {
-
- $SQL = 'SELECT '.$requiredfields.' FROM '.$CFG->prefix.'post p, '.$tagtablesql
- .$CFG->prefix.'user u
- WHERE p.userid = u.id '.$tagquerysql.'
- AND u.id = '.$filterselect.'
- AND p.publishstate = \'public\'';
-
- }
+
+ if (isloggedin()) {
+
+ $SQL = 'SELECT '.$requiredfields.' FROM '.$CFG->prefix.'post p, '.$tagtablesql
+ .$CFG->prefix.'user u
+ WHERE p.userid = u.id '.$tagquerysql.'
+ AND u.id = '.$filterselect.'
+ AND (p.publishstate = \'site\' OR p.publishstate = \'public\' OR p.userid = '.$USER->id.')';
+ } else {
+
+ $SQL = 'SELECT '.$requiredfields.' FROM '.$CFG->prefix.'post p, '.$tagtablesql
+ .$CFG->prefix.'user u
+ WHERE p.userid = u.id '.$tagquerysql.'
+ AND u.id = '.$filterselect.'
+ AND p.publishstate = \'public\'';
+
+ }
break;
if (get_user_timezone_offset() < 99) {
// We 'll keep these values as GMT here, and offset them when the time comes to query the db
- $display->tstart = gmmktime(0, 0, 0, $m, 1, $y); // This is GMT
- $display->tend = gmmktime(23, 59, 59, $m, $display->maxdays, $y); // GMT
+ $display->tstart = gmmktime(0, 0, 0, $m, 1, $y); // This is GMT
+ $display->tend = gmmktime(23, 59, 59, $m, $display->maxdays, $y); // GMT
} else {
// no timezone info specified
- $display->tstart = mktime(0, 0, 0, $m, 1, $y);
- $display->tend = mktime(23, 59, 59, $m, $display->maxdays, $y);
+ $display->tstart = mktime(0, 0, 0, $m, 1, $y);
+ $display->tend = mktime(23, 59, 59, $m, $display->maxdays, $y);
}
$startwday = dayofweek(1, $m, $y);
foreach ($courses as $acourse) {
- $context = get_context_instance(CONTEXT_COURSE, $acourse->id);
+ $context = get_context_instance(CONTEXT_COURSE, $acourse->id);
$count++;
$up = ($count > 1 || !$atfirstpage);
echo '<a title="'.$strassignteachers.'" href="'.$CFG->wwwroot.'/course/teacher.php?id='.
$acourse->id.'">'.
'<img src="'.$CFG->pixpath.'/t/user.gif" height="11" width="11" border="0" alt="'.$strassignteachers.'" /></a> ';
- if (has_capability('moodle/course:delete', $context)) {
+ if (has_capability('moodle/course:delete', $context)) {
echo '<a title="'.$strdelete.'" href="delete.php?id='.$acourse->id.'">'.
'<img src="'.$CFG->pixpath.'/t/delete.gif" height="11" width="11" border="0" alt="'.$strdelete.'" /></a> ';
}
- if (has_capability('moodle/course:visibility', $context)) {
+ if (has_capability('moodle/course:visibility', $context)) {
if (!empty($acourse->visible)) {
echo '<a title="'.$strhide.'" href="category.php?id='.$category->id.'&page='.$page.
'&perpage='.$perpage.'&hide='.$acourse->id.'&sesskey='.$USER->sesskey.'">'.
}
}
- if (has_capability('moodle/site:backup', $context)) {
- echo '<a title="'.$strbackup.'" href="../backup/backup.php?id='.$acourse->id.'">'.
- '<img src="'.$CFG->pixpath.'/t/backup.gif" height="11" width="11" border="0" alt="" /></a> ';
- }
-
- if (has_capability('moodle/site:restore', $context)) {
- echo '<a title="'.$strrestore.'" href="../files/index.php?id='.$acourse->id.
- '&wdir=/backupdata">'.
- '<img src="'.$CFG->pixpath.'/t/restore.gif" height="11" width="11" border="0" alt="" /></a> ';
+ if (has_capability('moodle/site:backup', $context)) {
+ echo '<a title="'.$strbackup.'" href="../backup/backup.php?id='.$acourse->id.'">'.
+ '<img src="'.$CFG->pixpath.'/t/backup.gif" height="11" width="11" border="0" alt="" /></a> ';
+ }
+
+ if (has_capability('moodle/site:restore', $context)) {
+ echo '<a title="'.$strrestore.'" href="../files/index.php?id='.$acourse->id.
+ '&wdir=/backupdata">'.
+ '<img src="'.$CFG->pixpath.'/t/restore.gif" height="11" width="11" border="0" alt="" /></a> ';
}
echo '<a title="'.$strbackup.'" href="../backup/backup.php?id='.$acourse->id.'">'.
print_single_button('category.php', $options, get_string('resortcoursesbyname'), 'get');
}
- $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
+ $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
if (has_capability('moodle/course:create', $context)) { /// Print button to create a new course
unset($options);
$options['category'] = $category->id;
echo '<br />';
}
- $context = get_context_instance(CONTEXT_COURSECAT, $id);
+ $context = get_context_instance(CONTEXT_COURSECAT, $id);
if (has_capability('moodle/category:update', $context)) { /// Print form to rename the category
$strrename= get_string('rename');
echo '<form name="renameform" action="category.php" method="post">';
echo '<input type="submit" value="'.$strrename.'" />';
echo "</form>";
echo "<br />";
- }
+ }
- print_course_search();
+ print_course_search();
echo "</center>";
error('Course ID was incorrect');
}
- $context = get_context_instance(CONTEXT_COURSE, $course->id);
-
+ $context = get_context_instance(CONTEXT_COURSE, $course->id);
+
if (!has_capability('moodle/course:update', $context)) {
error("You do not currently have editing privileges!");
}
}
} else { // Admin is creating a new course
- $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
- if (!has_capability('moodle/course:create',$context)) {
+ $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
+ if (!has_capability('moodle/course:create',$context)) {
error("You do not currently have course creation privileges!");
}
require_login($course->id);
- if (! $group = get_record("groups", "id", $group, "courseid", $course->id)) {
+ if (! $group = get_record("groups", "id", $group, "courseid", $course->id)) {
notice('Specified group could not be found!', "#");
close_window_button();
}
- // this is fine since group inherits course settings, this allows 1) teacher to edit all groups
- // 2 someone with a role with a cap to modify a specific group
- $context = get_context_instance(CONTEXT_GROUP, $group->id);
+ // this is fine since group inherits course settings, this allows 1) teacher to edit all groups
+ // 2 someone with a role with a cap to modify a specific group
+ $context = get_context_instance(CONTEXT_GROUP, $group->id);
- // this is really weird
+ // this is really weird
if (!has_capability('moodle/course:managegroups', $context)) {
close_window();
}
}
require_login($course->id);
- $context = get_context_instance(CONTEXT_COURSE, $course->id);
+ $context = get_context_instance(CONTEXT_COURSE, $course->id);
if (!has_capability('moodle/course:managegroups', $context)) {
redirect("group.php?id=$course->id"); // Not allowed to see all groups
/// Bulk group creation registration script from a comma separated file
- require_once('../../../config.php');
+ require_once('../../../config.php');
require_once('../../lib.php');
-
- $mycourseid = required_param('id', PARAM_INT); // Course id
- if (! $course = get_record('course', 'id', $mycourseid) ) {
+ $mycourseid = required_param('id', PARAM_INT); // Course id
+
+ if (! $course = get_record('course', 'id', $mycourseid) ) {
error("That's an invalid course id");
}
-
- require_login($course->id);
- $context = get_context_instance(CONTEXT_COURSE, $mycourseid);
-
-
+
+ require_login($course->id);
+ $context = get_context_instance(CONTEXT_COURSE, $mycourseid);
+
+
if (!has_capability('moodle/course:managegroups', $context)) {
error("You do not have the required permissions to manage groups.");
}
// error(get_string('confirmsesskeybad', 'error'));
//}
- $strimportgroups = get_string("importgroups");
+ $strimportgroups = get_string("importgroups");
$csv_encode = '/\&\#44/';
if (isset($CFG->CSV_DELIMITER)) {
print_header("$course->shortname: $strimportgroups", "$course->fullname",
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ".
"-> <a href=\"$CFG->wwwroot/course/import.php?id=$course->id\">".get_string('import')."</a> ".
- "-> $strimportgroups");
+ "-> $strimportgroups");
/// If a file has been uploaded, then process it
$required = array("groupname" => 1, );
$optionalDefaults = array("lang" => 1, );
$optional = array("coursename" => 1,
- "idnumber" =>1,
- "description" => 1,
- "password" => 1,
- "theme" => 1,
- "picture" => 1,
+ "idnumber" =>1,
+ "description" => 1,
+ "password" => 1,
+ "theme" => 1,
+ "picture" => 1,
"hidepicture" => 1, );
// --- get header (field names) ---
$linenum = 2; // since header is line 1
while (!feof ($fp)) {
-
- $newgroup = new object();//to make Martin happy
+
+ $newgroup = new object();//to make Martin happy
foreach ($optionalDefaults as $key => $value) {
$newgroup->$key = current_language(); //defaults to current language
}
$newgroup->{$name} = addslashes($value);
}
}
- ///Find the courseid of the course with the given shortname
-
- //if idnumber is set, we use that.
- //unset invalid courseid
- if ($newgroup->idnumber){
- if (!$mycourse = get_record('course', 'idnumber',$newgroup->idnumber)){
- notify(get_string('unknowncourseidnumber', 'error', $newgroup->idnumber));
- unset($newgroup->courseid);//unset so 0 doesnt' get written to database
- }
- $newgroup->courseid = $mycourse->id;
- }
- //else use course short name to look up
- //unset invalid coursename (if no id)
-
- else if ($newgroup->coursename){
- if (!$mycourse = get_record('course', 'shortname',$newgroup->coursename)){
- notify(get_string('unknowncourse', 'error', $newgroup->coursename));
- unset($newgroup->courseid);//unset so 0 doesnt' get written to database
- }
- $newgroup->courseid = $mycourse->id;
- }
- //else juse use current id
- else{
- $newgroup->courseid = $mycourseid;
- }
-
- //if courseid is set
- if (isset($newgroup->courseid)){
-
- $newgroup->timecreated = time();
- $linenum++;
- $groupname = $newgroup->name;
- $newgrpcoursecontext = get_context_instance(CONTEXT_COURSE, $newgroup->courseid);
-
- ///Users cannot upload groups in courses they cannot update.
- if (has_capability('moodle/course:update', $newgrpcoursecontext)){
- notify("$newgroup->name ".get_string('notaddedto').$newgroup->coursename.get_string('notinyourcapacity'));
- }
-
- else {
- if (get_record("groups","name",$groupname,"courseid",$newgroup->courseid) || !($newgroup->id = insert_record("groups", $newgroup))) {
-
- //Record not added - probably because group is already registered
- //In this case, output groupname from previous registration
- if ($group = get_record("groups","name",$groupname)) {
- notify("$newgroup->name ".get_string('groupexistforcourse', 'error', $groupname));
- } else {
- notify(get_string('groupnotaddederror', 'error', $groupname));
- }
- }
- else {
- notify(get_string('group')." $newgroup->name ".get_string('addedsuccessfully'));
- }
- }
- } //close courseid validity check
+ ///Find the courseid of the course with the given shortname
+
+ //if idnumber is set, we use that.
+ //unset invalid courseid
+ if ($newgroup->idnumber){
+ if (!$mycourse = get_record('course', 'idnumber',$newgroup->idnumber)){
+ notify(get_string('unknowncourseidnumber', 'error', $newgroup->idnumber));
+ unset($newgroup->courseid);//unset so 0 doesnt' get written to database
+ }
+ $newgroup->courseid = $mycourse->id;
+ }
+ //else use course short name to look up
+ //unset invalid coursename (if no id)
+
+ else if ($newgroup->coursename){
+ if (!$mycourse = get_record('course', 'shortname',$newgroup->coursename)){
+ notify(get_string('unknowncourse', 'error', $newgroup->coursename));
+ unset($newgroup->courseid);//unset so 0 doesnt' get written to database
+ }
+ $newgroup->courseid = $mycourse->id;
+ }
+ //else juse use current id
+ else{
+ $newgroup->courseid = $mycourseid;
+ }
+
+ //if courseid is set
+ if (isset($newgroup->courseid)){
+
+ $newgroup->timecreated = time();
+ $linenum++;
+ $groupname = $newgroup->name;
+ $newgrpcoursecontext = get_context_instance(CONTEXT_COURSE, $newgroup->courseid);
+
+ ///Users cannot upload groups in courses they cannot update.
+ if (has_capability('moodle/course:update', $newgrpcoursecontext)){
+ notify("$newgroup->name ".get_string('notaddedto').$newgroup->coursename.get_string('notinyourcapacity'));
+ }
+
+ else {
+ if (get_record("groups","name",$groupname,"courseid",$newgroup->courseid) || !($newgroup->id = insert_record("groups", $newgroup))) {
+
+ //Record not added - probably because group is already registered
+ //In this case, output groupname from previous registration
+ if ($group = get_record("groups","name",$groupname)) {
+ notify("$newgroup->name ".get_string('groupexistforcourse', 'error', $groupname));
+ } else {
+ notify(get_string('groupnotaddederror', 'error', $groupname));
+ }
+ }
+ else {
+ notify(get_string('group')." $newgroup->name ".get_string('addedsuccessfully'));
+ }
+ }
+ } //close courseid validity check
unset ($newgroup);
}//close if ($record[$header[0]])
}//close while($fp)
}
/// Print the form
- require('mod.php');
+ require('mod.php');
print_footer($course);
/// Delete a category if necessary
if (!empty($delete) and confirm_sesskey()) {
-
- // context is coursecat, if not present admins should have it set in site level
- $context = get_context_instance(CONTEXT_COURSECAT, $delete);
- if ($deletecat = get_record("course_categories", "id", $delete) and has_capability('moodle/category:delete', $context)) {
+
+ // context is coursecat, if not present admins should have it set in site level
+ $context = get_context_instance(CONTEXT_COURSECAT, $delete);
+ if ($deletecat = get_record("course_categories", "id", $delete) and has_capability('moodle/category:delete', $context)) {
if (!empty($sure) && $sure == md5($deletecat->timemodified)) {
/// Send the children categories to live with their grandparent
if ($childcats = get_records("course_categories", "parent", $deletecat->id)) {
fix_course_sortorder();
/// Print form for creating new categories
- if (has_capability('moodle/category:create', $context)) {
- echo "<center>";
- echo "<form name=\"addform\" action=\"index.php\" method=\"post\">";
- echo "<input type=\"text\" size=\"30\" alt=\"$straddnewcategory\" name=\"addcategory\" />";
- echo "<input type=\"submit\" value=\"$straddnewcategory\" />";
- echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />";
- echo "</form>";
- echo "</center>";
-
- echo "<br />";
- }
+ if (has_capability('moodle/category:create', $context)) {
+ echo "<center>";
+ echo "<form name=\"addform\" action=\"index.php\" method=\"post\">";
+ echo "<input type=\"text\" size=\"30\" alt=\"$straddnewcategory\" name=\"addcategory\" />";
+ echo "<input type=\"submit\" value=\"$straddnewcategory\" />";
+ echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />";
+ echo "</form>";
+ echo "</center>";
+
+ echo "<br />";
+ }
/// Print out the categories with all the knobs
if (has_capability('moodle/course:create', $context)) {
- print_single_button("edit.php", $options, get_string("addnewcourse"), "get");
+ print_single_button("edit.php", $options, get_string("addnewcourse"), "get");
}
print_single_button('pending.php',NULL, get_string('coursespending'),"get");
echo "<br />";
}
if ($category) {
- $context = get_context_instance(CONTEXT_COURSECAT, $category->id);
-
+ $context = get_context_instance(CONTEXT_COURSECAT, $category->id);
+
echo "<tr><td align=\"left\" nowrap=\"nowrap\">";
for ($i=0; $i<$depth;$i++) {
echo " ";
echo "<td nowrap=\"nowrap\">"; /// Print little icons
- if (has_capability('moodle/category:delete', $context)) {
- echo "<a title=\"$str->delete\" href=\"index.php?delete=$category->id&sesskey=$USER->sesskey\"><img".
- " src=\"$CFG->pixpath/t/delete.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" /></a> ";
- }
-
- if (has_capability('moodle/category:visibility', $context)) {
- if (!empty($category->visible)) {
- echo "<a title=\"$str->hide\" href=\"index.php?hide=$category->id&sesskey=$USER->sesskey\"><img".
- " src=\"$CFG->pixpath/t/hide.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" /></a> ";
- } else {
- echo "<a title=\"$str->show\" href=\"index.php?show=$category->id&sesskey=$USER->sesskey\"><img".
- " src=\"$CFG->pixpath/t/show.gif\" height=\"11\" width=\"11\" border=\"0\"alt=\"\" /></a> ";
- }
- }
+ if (has_capability('moodle/category:delete', $context)) {
+ echo "<a title=\"$str->delete\" href=\"index.php?delete=$category->id&sesskey=$USER->sesskey\"><img".
+ " src=\"$CFG->pixpath/t/delete.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" /></a> ";
+ }
+
+ if (has_capability('moodle/category:visibility', $context)) {
+ if (!empty($category->visible)) {
+ echo "<a title=\"$str->hide\" href=\"index.php?hide=$category->id&sesskey=$USER->sesskey\"><img".
+ " src=\"$CFG->pixpath/t/hide.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" /></a> ";
+ } else {
+ echo "<a title=\"$str->show\" href=\"index.php?show=$category->id&sesskey=$USER->sesskey\"><img".
+ " src=\"$CFG->pixpath/t/show.gif\" height=\"11\" width=\"11\" border=\"0\"alt=\"\" /></a> ";
+ }
+ }
if ($up) {
echo "<a title=\"$str->moveup\" href=\"index.php?moveup=$category->id&sesskey=$USER->sesskey\"><img".
$mod->coursemodule = $cm->id;
}
- $context = get_context_instance(CONTEXT_COURSE, $course->id);
- require_capability('moodle/course:update', $context);
+ $context = get_context_instance(CONTEXT_COURSE, $course->id);
+ require_capability('moodle/course:update', $context);
$mod->course = $course->id;
$mod->modulename = clean_param($mod->modulename, PARAM_SAFEDIR); // For safety
}
}
- $context = get_context_instance(CONTEXT_COURSE, $section->course);
- require_capability('moodle/course:update', $context);
+ $context = get_context_instance(CONTEXT_COURSE, $section->course);
+ require_capability('moodle/course:update', $context);
if (!ismoving($section->course)) {
error("You need to copy something first!");
error("This course module doesn't exist");
}
- $context = get_context_instance(CONTEXT_COURSE, $cm->course);
- require_capability('moodle/course:update', $context);
+ $context = get_context_instance(CONTEXT_COURSE, $cm->course);
+ require_capability('moodle/course:update', $context);
$cm->indent += $indent;
error("This course module doesn't exist");
}
- $context = get_context_instance(CONTEXT_COURSE, $cm->course);
- require_capability('moodle/course:update', $context);
+ $context = get_context_instance(CONTEXT_COURSE, $cm->course);
+ require_capability('moodle/course:update', $context);
set_coursemodule_visible($cm->id, 0);
error("This course module doesn't exist");
}
- $context = get_context_instance(CONTEXT_COURSE, $cm->course);
- require_capability('moodle/course:update', $context);
+ $context = get_context_instance(CONTEXT_COURSE, $cm->course);
+ require_capability('moodle/course:update', $context);
if (! $section = get_record("course_sections", "id", $cm->section)) {
error("This module doesn't exist");
error("This course module doesn't exist");
}
- $context = get_context_instance(CONTEXT_COURSE, $cm->course);
- require_capability('moodle/course:update', $context);
+ $context = get_context_instance(CONTEXT_COURSE, $cm->course);
+ require_capability('moodle/course:update', $context);
set_coursemodule_groupmode($cm->id, $groupmode);
error("This course module doesn't exist");
}
- $context = get_context_instance(CONTEXT_COURSE, $cm->course);
- require_capability('moodle/course:update', $context);
+ $context = get_context_instance(CONTEXT_COURSE, $cm->course);
+ require_capability('moodle/course:update', $context);
if (! $section = get_record("course_sections", "id", $cm->section)) {
error("This module doesn't exist");
error("This course doesn't exist");
}
- $context = get_context_instance(CONTEXT_COURSE, $cm->course);
- require_capability('moodle/course:update', $context);
-
+ $context = get_context_instance(CONTEXT_COURSE, $cm->course);
+ require_capability('moodle/course:update', $context);
+
if (! $module = get_record("modules", "id", $cm->module)) {
error("This module doesn't exist");
}
error("This course doesn't exist");
}
- $context = get_context_instance(CONTEXT_COURSE, $course->id);
- require_capability('moodle/course:update', $context);
+ $context = get_context_instance(CONTEXT_COURSE, $course->id);
+ require_capability('moodle/course:update', $context);
if (! $module = get_record("modules", "id", $cm->module)) {
error("This module doesn't exist");
error("This course doesn't exist");
}
- $context = get_context_instance(CONTEXT_COURSE, $course->id);
- require_capability('moodle/course:update', $context);
-
+ $context = get_context_instance(CONTEXT_COURSE, $course->id);
+ require_capability('moodle/course:update', $context);
+
if (! $module = get_record("modules", "id", $cm->module)) {
error("This module doesn't exist");
}
error("No action was specfied");
}
- $context = get_context_instance(CONTEXT_COURSE, $course->id);
- require_capability('moodle/course:update', $context);
+ $context = get_context_instance(CONTEXT_COURSE, $course->id);
+ require_capability('moodle/course:update', $context);
$streditinga = get_string("editinga", "moodle", $fullmodulename);
$strmodulenameplural = get_string("modulenameplural", $module->name);
$strnav $streditinga", $focuscursor, "", false);
if (!empty($cm->id)) {
- $context = get_context_instance(CONTEXT_MODULE, $cm->id);
- $currenttab = 'update';
- include_once($CFG->dirroot.'/admin/roles/tabs.php');
+ $context = get_context_instance(CONTEXT_MODULE, $cm->id);
+ $currenttab = 'update';
+ include_once($CFG->dirroot.'/admin/roles/tabs.php');
}
unset($SESSION->modform); // Clear any old ones that may be hanging around.
}
require_login($course->id);
- $context = get_context_instance(CONTEXT_COURSE, $course->id);
+ $context = get_context_instance(CONTEXT_COURSE, $course->id);
$strscale = get_string("scale");
$strscales = get_string("scales");
//If action is details, show the popup info
if ($action == "details") {
//Check for teacher edit
- require_capability('moodle/course:managescales', $context);
-
+ require_capability('moodle/course:managescales', $context);
+
//Check for scale
if (! $scale = get_record("scale", "id", $scaleid)) {
error("Scale ID was incorrect");
$sesskey = !empty($USER->id) ? $USER->sesskey : '';
- require_capability('moodle/course:managescales', $context);
-
+ require_capability('moodle/course:managescales', $context);
+
//Check for scale if action = edit
if ($action == "edit") {
if (! $scale = get_record("scale", "id", $scaleid)) {
//If action is delete, do it
if ($action == "delete" and confirm_sesskey()) {
//Check for teacher edit
- require_capability('moodle/course:managescales', $context);
+ require_capability('moodle/course:managescales', $context);
//Check for scale if action = edit
if (! $scale = get_record("scale", "id", $scaleid)) {
error("Scale ID was incorrect");
//If action is down or up, do it
if (($action == "down" || $action == "up") and confirm_sesskey()) {
//Check for teacher edit
- require_capability('moodle/course:managescales', $context);
+ require_capability('moodle/course:managescales', $context);
//Check for scale if action = edit
if (! $scale = get_record("scale", "id", $scaleid)) {
error("Scale ID was incorrect");
}
if ($list) { /// Just list the scales (in a helpwindow)
- require_capability('moodle/course:viewscales', $context);
+ require_capability('moodle/course:viewscales', $context);
print_header($strscales);
if (!empty($scaleid)) {
switch ($paymentmethod)
{
- case AN_METHOD_CC:
- {
- print_cc_form($this);
- break;
- }
-
- case AN_METHOD_ECHECK:
- {
- print_echeck_form($this);
- break;
- }
+ case AN_METHOD_CC:
+ {
+ print_cc_form($this);
+ break;
+ }
+
+ case AN_METHOD_ECHECK:
+ {
+ print_echeck_form($this);
+ break;
+ }
}
function print_cc_form($classreference)
function tex_defaultsettings( $force=false ) {
- global $CFG;
+ global $CFG;
if (!isset($CFG->filter_tex_latexpreamble) or $force) {
set_config( 'filter_tex_latexpreamble', " \\usepackage[latin1]{inputenc}\n \\usepackage{amsmath}\n \\usepackage{amsfonts}\n \\RequirePackage{amsmath,amssymb,latexsym}\n");
set_config( 'filter_tex_pathconvert',"{$binpath}convert" );
}
elseif (PHP_OS=='WINNT' or PHP_OS=='WIN32' or PHP_OS=='Windows') {
- // note: you need Ghostscript installed (standard), miktex (standard)
- // and ImageMagick (install at c:\ImageMagick)
- set_config( 'filter_tex_pathlatex',"\"c:\\texmf\\miktex\\bin\\latex.exe\" " );
+ // note: you need Ghostscript installed (standard), miktex (standard)
+ // and ImageMagick (install at c:\ImageMagick)
+ set_config( 'filter_tex_pathlatex',"\"c:\\texmf\\miktex\\bin\\latex.exe\" " );
set_config( 'filter_tex_pathdvips',"\"c:\\texmf\\miktex\\bin\\dvips.exe\" " );
set_config( 'filter_tex_pathconvert',"\"c:\\imagemagick\\convert.exe\" " );
}
{$CFG->prefix}course_modules cm,
{$CFG->prefix}modules mm
WHERE e.courseid=$course
- AND e.userid=$userid
+ AND e.userid=$userid
AND gi.id = e.grade_itemid
AND c.id = gi.category
AND cm.course=c.courseid
}
}
-
+
// set up a list of all categories and assignments (adjusting things for extra credit where necessary)
$all_categories["$cur_category"]["$instance->name"]['hidden'] = $students_grade->hidden;
}
}
}
-
+
if (isset($_REQUEST['group'])) {
$group = clean_param($_REQUEST['group'], PARAM_INT);
if (isset($grades_by_student)) {
foreach($grades_by_student as $student=>$categories) {
if ( (isset($groupmembers) && isset($groupmembers[$student])) || !isset($groupmembers)) {
-
+
$grades_by_student["$student"]["$category"]['stats']['totalpoints'] = $main_category['stats']['totalpoints'];
$grades_by_student["$student"]["$category"]['stats']['weight'] = $main_category['stats']['weight'];
$grades_by_student["$student"]["$category"]['stats']['grade_items'] = $main_category['stats']['grade_items'];
}
}
}
-
+
if (!isset($grades_by_student["$student"]["$category"]['stats']['points'])) {
$grades_by_student["$student"]["$category"]['stats']['points'] = '-';
-
+
}
-
+
else {
// points are set... see if the current category is using drop the x lowest and do so
// also drop exceptions first, so then this grades(s) won't be recoqnized as the x lowest
- // Get exception scores and assign them in the array
+ // Get exception scores and assign them in the array
if ($main_category['stats']['drop'] != 0) {
$exceptions = grade_get_exceptions_user($course->id, $student);
if (isset($exceptions) && $exceptions) {
if ($grades_by_student["$exception->userid"]["$exception->catname"]) {
$assgn = get_record($exception->modname, 'id', $exception->cminstance, 'course', $course->id);
$grade = $grades_by_student["$exception->userid"]["$exception->catname"]["$assgn->name"]['grade'];
- if (isset($grade)) {
- if (!isset($grades_by_student["$exception->userid"]["$exception->catname"]['stats']['exceptions'])) {
+ if (isset($grade)) {
+ if (!isset($grades_by_student["$exception->userid"]["$exception->catname"]['stats']['exceptions'])) {
$grades_by_student["$exception->userid"]["$exception->catname"]['stats']['exceptions'] = $grade;
}
elseif (isset($grades_by_student["$exception->userid"]["$exception->catname"]['stats']['exceptions'])) {
$grades_by_student["$exception->userid"]["$exception->catname"]['stats']['exceptions'] .= ','. $grade;
- }
- }
+ }
+ }
}
}
}
- }
+ }
if (isset($grades_by_student["$student"]["$category"]['stats']['exceptions'])) {
$grades_by_student["$student"]["$category"]['stats']['allgrades'] = grade_drop_exceptions($grades_by_student["$student"]["$category"]['stats']['allgrades'], $grades_by_student["$student"]["$category"]['stats']['exceptions']);
}
-
+
$grades_by_student["$student"]["$category"]['stats']['allgrades'] = grade_drop_lowest($grades_by_student["$student"]["$category"]['stats']['allgrades'], $main_category['stats']['drop'], $main_category['stats']['grade_items']);
if ($grades_by_student["$student"]["$category"]['stats']['points'] != '-') {
$cat_points = 0;
if ($grades_by_student["$exception->userid"]["$exception->catname"]) {
$assgn = get_record($exception->modname, 'id', $exception->cminstance, 'course', $course->id);
$grades_by_student["$exception->userid"]['student_data']['totalpoints'] = $grades_by_student["$exception->userid"]['student_data']['totalpoints'] - $all_categories["$exception->catname"]["$assgn->name"]['maxgrade'];
- //total point should not be smaller than grade against
- if ($grades_by_student["$exception->userid"]["$exception->catname"]['stats']['totalpoints'] - $all_categories["$exception->catname"]["$assgn->name"]['grade_against'] != 0 ) {
+ //total point should not be smaller than grade against
+ if ($grades_by_student["$exception->userid"]["$exception->catname"]['stats']['totalpoints'] - $all_categories["$exception->catname"]["$assgn->name"]['grade_against'] != 0 ) {
$grades_by_student["$exception->userid"]["$exception->catname"]['stats']['totalpoints'] = $grades_by_student["$exception->userid"]["$exception->catname"]['stats']['totalpoints'] - $all_categories["$exception->catname"]["$assgn->name"]['grade_against'];
- }
+ }
$grades_by_student["$exception->userid"]["$exception->catname"]['stats']['grade_items'] = $grades_by_student["$exception->userid"]["$exception->catname"]['stats']['grade_items'] - 1;
if ($grades_by_student["$exception->userid"]["$exception->catname"]['stats']['grade_items'] < 0) {
$grades_by_student["$exception->userid"]["$exception->catname"]['stats']['grade_items'] = 0;
- }
+ }
if ($all_categories["$exception->catname"]['stats']['drop'] == 0) {
$grades_by_student["$exception->userid"]["$exception->catname"]['stats']['points'] = $grades_by_student["$exception->userid"]["$exception->catname"]['stats']['points'] - $grades_by_student["$exception->userid"]["$exception->catname"]["$assgn->name"]['grade'];
}
$grades_by_student["$student"]["$category"]['stats']['weighted'] = 0.00;
}
}
-
+
// set students overall weight (this is what percent they will be graded against)
if ($grades_by_student["$student"]["$category"]['stats']['weight'] != $strexcluded) {
$grades_by_student["$student"]['student_data']['weight'] = $grades_by_student["$student"]['student_data']['weight'] + $grades_by_student["$student"]["$category"]['stats']['weight'];
// fewer items than $total that we don't drop too many
$grade_array = explode(',',$grades);
if (count($grade_array) == 1) {
- $grades = implode('', $grade_array);
+ $grades = implode('', $grade_array);
}
else if ($drop > 0 AND (count($grade_array) > $drop)) {
rsort($grade_array);
$cur_extra_credit = false;
}
if ($cur_extra_credit) {
- $cur_extra_credit = 1;
+ $cur_extra_credit = 1;
} else {
$cur_extra_credit = 0;
}
$string['databasecreationsettings'] = '<p>Now you need to configure the database settings where most Moodle data
will be stored. The database will be created automatically by the installer
with the default settings below or others that you specify in the editable
- fields below. If security is an issue you may want to specify a password in the \"Password\" field.</p>
+ fields below. If security is an issue you may want to specify a password in the \"Password\" field.</p>
<p><b>Type:</b> fixed to \"mysql\" by the installer<br />
<b>Host:</b> fixed to \"localhost\" by the installer<br />
<b>Name:</b> database name, eg moodle<br />
$string['welcomep40'] = 'The package also includes <strong>Moodle $a->moodlerelease ($a->moodleversion)</strong>.';
$string['welcomep50'] = 'The use of all the applications in this package is governed by their respective
licences. The complete <strong>$a->installername</strong> package is
- <a href=\"http://www.opensource.org/docs/definition_plain.html\">open source</a> and is distributed
- under the <a href=\"http://www.gnu.org/copyleft/gpl.html\">GPL</a> license.';
+ <a href=\"http://www.opensource.org/docs/definition_plain.html\">open source</a> and is distributed
+ under the <a href=\"http://www.gnu.org/copyleft/gpl.html\">GPL</a> license.';
$string['welcomep60'] = 'The following pages will lead you through some easy to follow steps to
configure and set up <strong>Moodle</strong> on your computer. You may accept the default
- settings or, optionally, amend them to suit your own needs.';
+ settings or, optionally, amend them to suit your own needs.';
$string['welcomep70'] = 'Click the \"Next\" button below to continue with the set up of <strong>Moodle</strong>.';
?>
$string['admindirerror'] = 'El directorio especificado para admin es incorrecto';
$string['admindirname'] = 'Directorio Admin';
-$string['admindirsetting'] = '<p>Muy pocos servidores web usan /admin como URL especial para permitirle acceder a un panel de control o similar. Desgraciadamente, esto entra en conflicto con la ubicación estándar de las páginas de administración de Moodle Usted puede corregir esto renombrando el directorio admin en su instalación, y poniendo aquí ese nuevo nombre. Por ejemplo: <blockquote> moodleadmin</blockquote>.
-Así se corregirán los enlaces admin en Moodle.</p>';
-$string['caution'] = 'Precaución';
+$string['admindirsetting'] = '<p>Muy pocos servidores web usan /admin como URL especial para permitirle acceder a un panel de control o similar. Desgraciadamente, esto entra en conflicto con la ubicaci�n est�ndar de las p�ginas de administraci�n de Moodle Usted puede corregir esto renombrando el directorio admin en su instalaci�n, y poniendo aqu� ese nuevo nombre. Por ejemplo: <blockquote> moodleadmin</blockquote>.
+As� se corregir�n los enlaces admin en Moodle.</p>';
+$string['caution'] = 'Precauci�n';
$string['chooselanguage'] = 'Seleccionar idioma';
$string['compatibilitysettings'] = 'Comprobando sus ajustes PHP...';
-$string['configfilenotwritten'] = 'El script instalador no ha podido crear automáticamente un archivo config.php con las especificaciones elegidas. Por favor, copie el siguiente código en un archivo llamado config.php y coloque ese archivo en el directorio raíz de Moodle.';
-$string['configfilewritten'] = 'config.php se ha creado con éxito';
-$string['configurationcomplete'] = 'Configuración completa';
+$string['configfilenotwritten'] = 'El script instalador no ha podido crear autom�ticamente un archivo config.php con las especificaciones elegidas. Por favor, copie el siguiente c�digo en un archivo llamado config.php y coloque ese archivo en el directorio ra�z de Moodle.';
+$string['configfilewritten'] = 'config.php se ha creado con �xito';
+$string['configurationcomplete'] = 'Configuraci�n completa';
$string['database'] = 'Base de datos';
$string['databasecreationsettings'] = '<p>Ahora necesita configurar los ajustes de la base de datos
- donde se almacenarán la mayoría de los datos de Moodle. La base de datos será creada automáticamente
- por el instalador con los valores por defecto o los que especifique en los campos editables más abajo. Si
- la seguridad de su ordenador es importante debería definir una contraseña en el campo \"Contraseña\".</p>
+ donde se almacenar�n la mayor�a de los datos de Moodle. La base de datos ser� creada autom�ticamente
+ por el instalador con los valores por defecto o los que especifique en los campos editables m�s abajo. Si
+ la seguridad de su ordenador es importante deber�a definir una contrase�a en el campo \"Contrase�a\".</p>
<p><b>Tipo:</b> el valor por defecto es \"mysql\"<br />
<b>Servidor:</b> el valor por defecto es \"localhost\"<br />
<b>Nombre:</b> nombre de la base de datos, e.g., moodle<br />
<b>Usuario:</b> el valor por defecto es \"root\"<br />
- <b>Contraseña:</b> contraseña de la base de datos<br />
+ <b>Contrase�a:</b> contrase�a de la base de datos<br />
<b>Prefijo de tablas:</b> prefijo opcional para todas las tablas</p>';
-$string['databasesettings'] = 'Ahora necesita configurar la base de datos en la que se almacenará la mayor parte de datos de Moodle. Esta base de datos debe haber sido ya creada, y disponer de un nombre de usuario y de una contraseña de acceso.<br />
+$string['databasesettings'] = 'Ahora necesita configurar la base de datos en la que se almacenar� la mayor parte de datos de Moodle. Esta base de datos debe haber sido ya creada, y disponer de un nombre de usuario y de una contrase�a de acceso.<br />
<br /> <br />
<b>Tipo:</b> mysql o postgres7<br />
<b>Servidor:</b> e.g., localhost or db.isp.com<br />
<b>Nombre:</b> Nombre de la base de datos, e.g., moodle<br />
<b>Usuario:</b> nombre de usuario de la base de datos<br />
-<b>Contraseña:</b> contraseña de la base de datos<br />
+<b>Contrase�a:</b> contrase�a de la base de datos<br />
<b>Prefijo de tablas:</b> prefijo a utilizar en todos los nombres de tabla';
$string['dataroot'] = 'Datos';
$string['datarooterror'] = 'El ajuste \'Data\' es incorrecto';
-$string['dbconnectionerror'] = 'Error de conexión con la base de datos. Por favor, compruebe los ajustes de la base de datos';
+$string['dbconnectionerror'] = 'Error de conexi�n con la base de datos. Por favor, compruebe los ajustes de la base de datos';
$string['dbcreationerror'] = 'Error al crear la base de datos. No se ha podido crear la base de datos con el nombre y ajustes suministrados';
$string['dbhost'] = 'Servidor';
-$string['dbpass'] = 'Contraseña';
+$string['dbpass'] = 'Contrase�a';
$string['dbprefix'] = 'Prefijo de tablas';
$string['dbtype'] = 'Tipo';
$string['directorysettings'] = ' <p><b>WWW:</b>
-Necesita decir a Moodle dónde está localizado. Especifique la dirección web completa en la que se ha instalado Moodle. Si su sitio web es accesible a través de varias URLs, seleccione la que resulte de acceso más natural a sus estudiantes. No incluya la última barra</p>
+Necesita decir a Moodle d�nde est� localizado. Especifique la direcci�n web completa en la que se ha instalado Moodle. Si su sitio web es accesible a trav�s de varias URLs, seleccione la que resulte de acceso m�s natural a sus estudiantes. No incluya la �ltima barra</p>
<p><b>Directorio:</b>
-Especifique la ruta OS completa a esta misma ubicación
-Asegúrese de que escribe correctamente mayúsculas y minúsculas</p>
+Especifique la ruta OS completa a esta misma ubicaci�n
+Aseg�rese de que escribe correctamente may�sculas y min�sculas</p>
<p><b>Datos:</b>
-Usted necesita un lugar en el que Moodle pueda guardar los archivos subidos. Este directorio debe ser legible Y ESCRIBIBLE por el usuario del servidor web (normalmente \'nobody\' o \'apache\'), pero no debería ser directamente accesible desde la web.</p>';
+Usted necesita un lugar en el que Moodle pueda guardar los archivos subidos. Este directorio debe ser legible Y ESCRIBIBLE por el usuario del servidor web (normalmente \'nobody\' o \'apache\'), pero no deber�a ser directamente accesible desde la web.</p>';
$string['dirroot'] = 'Directorio';
-$string['dirrooterror'] = 'El ajuste de \'Directorio\' es incorrecto. Inténtelo con el siguiente';
+$string['dirrooterror'] = 'El ajuste de \'Directorio\' es incorrecto. Int�ntelo con el siguiente';
$string['download'] = 'Descargar';
$string['fail'] = 'Fallo';
$string['fileuploads'] = 'Subidas de archivos';
$string['fileuploadserror'] = 'Debe estar activado';
$string['fileuploadshelp'] = '<p>La subida de archivos parece estar desactivada en su servidor.</p>
-<p>Moodle aún puede ser instalado, pero usted no podrá subir archivos a un curso ni imágenes de los usuarios.</p>
+<p>Moodle a�n puede ser instalado, pero usted no podr� subir archivos a un curso ni im�genes de los usuarios.</p>
<p>Para posibilitar la subida de archivos, usted (o el administrador del sistema) necesita editar el archivo php.ini principal y cambiar el ajuste de <b>file_uploads</b> a \'1\'.</p>';
-$string['gdversion'] = 'Versión GD';
-$string['gdversionerror'] = 'La librería GD debería estar presente para procesar y crear imágenes';
+$string['gdversion'] = 'Versi�n GD';
+$string['gdversionerror'] = 'La librer�a GD deber�a estar presente para procesar y crear im�genes';
$string['gdversionhelp'] = '<p>Su servidor parece no tener el GD instalado.</p>
-<p>GD es una librería que PHP necesita para que Moodle procese imágenes (tales como los iconos de los usuarios) y para crear imágenes nuevas (e.g., logos). Moodle puede trabajar sin GD, pero usted no dispondrá de las características mencionadas.</p>
+<p>GD es una librer�a que PHP necesita para que Moodle procese im�genes (tales como los iconos de los usuarios) y para crear im�genes nuevas (e.g., logos). Moodle puede trabajar sin GD, pero usted no dispondr� de las caracter�sticas mencionadas.</p>
-<p>Para agregar GD a PHP en entorno Unix, compile PHP usando el parámetro --with-gd.</p>
+<p>Para agregar GD a PHP en entorno Unix, compile PHP usando el par�metro --with-gd.</p>
-<p>En un entorno Windows, puede editar php.ini y quitar los comentarios de la línea referida a libgd.dll.</p>';
-$string['installation'] = 'Instalación';
+<p>En un entorno Windows, puede editar php.ini y quitar los comentarios de la l�nea referida a libgd.dll.</p>';
+$string['installation'] = 'Instalaci�n';
$string['magicquotesruntime'] = 'Magic Quotes Run Time';
$string['magicquotesruntimeerror'] = 'Debe estar desactivado';
$string['magicquotesruntimehelp'] = '<p>Magic quotes runtime debe estar desactivado para que Moodle funcione adecuadamente.</p>
-<p>Normalmente está desactivado por defecto... Vea el ajuste <b>magic_quotes_runtime</b> en su archivo php.ini.</p>
+<p>Normalmente est� desactivado por defecto... Vea el ajuste <b>magic_quotes_runtime</b> en su archivo php.ini.</p>
-<p>Si usted no tiene acceso a php.ini, debería poder escribir la siguiente línea en un archivo denominado .htaccess dentro del directorio Moodle:
+<p>Si usted no tiene acceso a php.ini, deber�a poder escribir la siguiente l�nea en un archivo denominado .htaccess dentro del directorio Moodle:
<blockquote>php_value magic_quotes_runtime Off</blockquote>
</p>';
-$string['memorylimit'] = 'Límite de memoria';
-$string['memorylimiterror'] = 'El límite de memoria PHP es demasiado bajo... Puede tener problemas más tarde.';
-$string['memorylimithelp'] = '<p>El límite de memoria PHP en su servidor es actualmente $a.</p>
+$string['memorylimit'] = 'L�mite de memoria';
+$string['memorylimiterror'] = 'El l�mite de memoria PHP es demasiado bajo... Puede tener problemas m�s tarde.';
+$string['memorylimithelp'] = '<p>El l�mite de memoria PHP en su servidor es actualmente $a.</p>
-<p>Esto puede ocasionar que Moodle tenga problemas de memoria más adelante, especialmente si usted tiene activados muchos módulos y/o muchos usuarios.</p>
+<p>Esto puede ocasionar que Moodle tenga problemas de memoria m�s adelante, especialmente si usted tiene activados muchos m�dulos y/o muchos usuarios.</p>
-<p>Recomendamos que configure PHP con el límite más alto posible, e.g. 16M.
+<p>Recomendamos que configure PHP con el l�mite m�s alto posible, e.g. 16M.
Hay varias formas de hacer esto:</p>
<ol>
<li>Si puede hacerlo, recompile PHP con <i>--enable-memory-limit</i>.
-Esto hace que Moodle fije por sí mismo el límite de memoria.</li>
+Esto hace que Moodle fije por s� mismo el l�mite de memoria.</li>
<li>Si usted tiene acceso al archivo php.ini, puede cambiar el ajuste <b>memory_limit</b>
a, digamos, 16M. Si no lo tiene, pida a su administrador que lo haga por usted.</li>
-<li>En algunos servidores PHP usted puede crear en el directorio Moodle un archivo .htaccess que contenga esta línea:
+<li>En algunos servidores PHP usted puede crear en el directorio Moodle un archivo .htaccess que contenga esta l�nea:
<p><blockquote>php_value memory_limit 16M</blockquote></p>
-<p>Sin embargo, en algunos servidores esto hace que <b>todas</b> las páginas PHP dejen de funcionar
-(podrá ver los errores cuando mire las páginas) de modo que tendrá que eliminar el archivo .htaccess.</p></li>
+<p>Sin embargo, en algunos servidores esto hace que <b>todas</b> las p�ginas PHP dejen de funcionar
+(podr� ver los errores cuando mire las p�ginas) de modo que tendr� que eliminar el archivo .htaccess.</p></li>
</ol>';
-$string['mysqlextensionisnotpresentinphp'] = 'PHP no ha sido adecuadamente configurado con la extensión MySQL de modo que pueda comunicarse con MySQL. Por favor, compruebe el archivo php.ini o recompile PHP.';
+$string['mysqlextensionisnotpresentinphp'] = 'PHP no ha sido adecuadamente configurado con la extensi�n MySQL de modo que pueda comunicarse con MySQL. Por favor, compruebe el archivo php.ini o recompile PHP.';
$string['pass'] = 'Pass';
-$string['phpversion'] = 'Versión PHP';
-$string['phpversionerror'] = 'La versión PHP debe ser 4.1.0 o superior';
-$string['phpversionhelp'] = '<p>Moodle requiere una versión de PHP 4.1.0 o superior.</p>
-<p>Su versión es $a</p>
-<p>Debe actualizar PHP o acudir a otro servidor con una versión más reciente de PHP</p>';
+$string['phpversion'] = 'Versi�n PHP';
+$string['phpversionerror'] = 'La versi�n PHP debe ser 4.1.0 o superior';
+$string['phpversionhelp'] = '<p>Moodle requiere una versi�n de PHP 4.1.0 o superior.</p>
+<p>Su versi�n es $a</p>
+<p>Debe actualizar PHP o acudir a otro servidor con una versi�n m�s reciente de PHP</p>';
$string['safemode'] = 'Safe Mode';
$string['safemodeerror'] = 'Moodle puede tener problemas con \'safe mode\' activado';
$string['safemodehelp'] = '<p>Moodle puede tener varios problemas con \'safe mode\' activado, y probablemente no pueda crear nuevos archivos.</p>
-<p>Normalmente el \'safe mode\' sólo es activado por servidores web públicos paranoides, así que lo que usted debe hacer es encontrar otra compañía para su sitio Moodle.</p>
+<p>Normalmente el \'safe mode\' s�lo es activado por servidores web p�blicos paranoides, as� que lo que usted debe hacer es encontrar otra compa��a para su sitio Moodle.</p>
-<p>Si lo desea, puede seguir con la instalación, pero experimentará problemas más adelante.</p>';
-$string['sessionautostart'] = 'Autocomienzo de sesión';
+<p>Si lo desea, puede seguir con la instalaci�n, pero experimentar� problemas m�s adelante.</p>';
+$string['sessionautostart'] = 'Autocomienzo de sesi�n';
$string['sessionautostarterror'] = 'Deb e estar desactivado';
-$string['sessionautostarthelp'] = '<p>Moodle requiere apoyo de sesión y no funcionará sin él.</p>
+$string['sessionautostarthelp'] = '<p>Moodle requiere apoyo de sesi�n y no funcionar� sin �l.</p>
-<p>Las sesiones deben estar activadas en el archhivo php.ini para el parámetro session.auto_start.</p>';
+<p>Las sesiones deben estar activadas en el archhivo php.ini para el par�metro session.auto_start.</p>';
$string['wwwroot'] = 'WWW';
$string['wwwrooterror'] = 'El ajuste \'WWW\' es incorrecto';
$string['welcomep10'] = '$a->installername ($a->installerversion)';
-$string['welcomep20'] = 'Si está viendo esta página es porque ha podido ejecutar el paquete
+$string['welcomep20'] = 'Si est� viendo esta p�gina es porque ha podido ejecutar el paquete
<strong>$a->packname $a->packversion</strong> en su ordenador. !Enhorabuena!';
-$string['welcomep30'] = 'Esta versión de <strong>$a->installername</strong> incluye las
+$string['welcomep30'] = 'Esta versi�n de <strong>$a->installername</strong> incluye las
aplicaciones necesarias para que <strong>Moodle</strong> funcione en su ordenador,
- principalmente:';
-$string['welcomep40'] = 'El paquete también incluye <strong>Moodle $a->moodlerelease ($a->moodleversion)</strong>.';
-$string['welcomep50'] = 'El uso de todas las aplicaciones del paquete está gobernado por sus respectivas
+ principalmente:';
+$string['welcomep40'] = 'El paquete tambi�n incluye <strong>Moodle $a->moodlerelease ($a->moodleversion)</strong>.';
+$string['welcomep50'] = 'El uso de todas las aplicaciones del paquete est� gobernado por sus respectivas
licencias. El programa <strong>$a->installername</strong> es
- <a href=\"http://www.opensource.org/docs/definition_plain.html\">código abierto</a> y se distribuye
- bajo licencia <a href=\"http://www.gnu.org/copyleft/gpl.html\">GPL</a>.';
-$string['welcomep60'] = 'Las siguientes páginas le guiarán a traves de algunos sencillos pasos para configurar
+ <a href=\"http://www.opensource.org/docs/definition_plain.html\">c�digo abierto</a> y se distribuye
+ bajo licencia <a href=\"http://www.gnu.org/copyleft/gpl.html\">GPL</a>.';
+$string['welcomep60'] = 'Las siguientes p�ginas le guiar�n a traves de algunos sencillos pasos para configurar
y ajustar <strong>Moodle</strong> en su ordenador. Puede utilizar los valores por defecto sugeridos o,
- de forma opcional, modificarlos para que se ajusten a sus necesidades.';
-$string['welcomep70'] = 'Pulse en el botón \"Siguiente\" para continuar con la configuración de <strong>Moodle</strong>.';
+ de forma opcional, modificarlos para que se ajusten a sus necesidades.';
+$string['welcomep70'] = 'Pulse en el bot�n \"Siguiente\" para continuar con la configuraci�n de <strong>Moodle</strong>.';
?>
$string['thislanguage'] = 'Nederlands';
$string['user'] = 'Gebruiker';
$string['welcomep10'] = '$a->installername ($a->installerversion)';
-$string['welcomep20'] = 'Je krijgt deze pagina te zien omdat je met succes het <strong>$a->packname $a->packversion</strong> packet op je computer gezet en gestart hebt. Proficiat! ';
+$string['welcomep20'] = 'Je krijgt deze pagina te zien omdat je met succes het <strong>$a->packname $a->packversion</strong> packet op je computer gezet en gestart hebt. Proficiat! ';
$string['welcomep30'] = 'Deze uitgave van <strong>$a->installername</strong> bevat de software die nodig is om een omgeving te creëren waarin <strong>Moodle</strong> zal werken, namelijk:';
$string['welcomep40'] = 'Dit pakket bevat ook <strong>Moodle $a->moodlerelease ($a->moodleversion)</strong>.';
$string['welcomep50'] = 'Het gebruik van alle programma\'s in dit pakket wordt geregeld door hun respectievelijke licenties. Het complete <strong>$a->installername</strong> pakket is
<li>Ak máte prístup k Vášmu php.ini súboru, môžete zmeniť <b>memory_limit</b> nastavenie, napr. na 16M. Ak nemáte prístup k súboru, môžete sa na to spýtať Vášho administrátora.</li>
Na niektorých PHP serveroch, si môžete vytvoriť súbor .htaccess v Adresári Moodle, ktorý bude obsahovať tento riadok: <p><blockquote>php_value memory_limit 16M</blockquote></p>
<p>Avšak, na niektorých serveroch bude toto brániť <b>všetkým</b> PHP stránkam v práci (budete vidieť chyby, keď sa pozriete na stránky), takže budete musieť odstrániť súbor .htaccess.</p></li>
-</ol> ';
+</ol> ';
$string['mysqlextensionisnotpresentinphp'] = 'PHP nebolo správne nakonfigurované s MySQL rozšírením a tak nemôže komunikovať s MySQL. Prosím, skontrolujte si Váš php.ini súbor alebo znovu vytvorte PHP.';
$string['name'] = 'Meno';
$string['next'] = 'Ďalší';
allow us to do so. My thanks go out to the authors of all these excellent
products - without them Moodle would be missing important functionality. Copyright
information for each package is included below:</p>
-
+
<p><b>ADOdb </b>- lib/adodb</p>
<blockquote>
<p>Database abstraction library for MySQL, PostgreSQL, MSSQL, Oracle, Interbase,
License: Freeware
</p>
</blockquote>
-
+
<p><b>Graph Class</b> - lib/graphlib.php </p>
<blockquote>
<p>Class to draw line, point, bar, and area graphs, including numeric x-axis
Copyright © 2002 Ivan Kozik<br />
License: GNU GPL<br />
URL: <a href="http://www.xpenguin.com/ip-atlas.php" target="newpage">http://www.xpenguin.com/ip-atlas.php</a>
- </p>
+ </p>
</blockquote>
<p><b>kses</b> - lib/kses.php</p>
License: GNU GPL<br />
URL: <a href="http://www.forkosh.com/mimetex.html">http://www.forkosh.com/mimetex.html</a><br />
URL: <a href="http://moodle.org/download/mimetex">http://moodle.org/download/mimetex</a>
- </p>
+ </p>
</blockquote>
<p><b>mp3player</b> - lib/mp3player</p>
Copyright © 1998-2004 Erik Bosrup<br />
License: Artistic Open Source License<br />
URL: <a href="http://www.macridesweb.com/oltest/">http://www.macridesweb.com/oltest/</a>
- </p>
+ </p>
</blockquote>
<p><b>PclZip</b> - lib/pclzip</p>
URL: <a href="http://www.phpconcept.net" target="newpage">http://www.phpconcept.net</a><br />
</p>
</blockquote>
-
+
<p><b>PHP mailer</b> - lib/class.phpmailer.php</p>
<blockquote>
<p>Class for sending email using either sendmail, PHP mail(), or SMTP.
URL: <a href="http://phpmailer.sourceforge.net" target="newpage">http://phpmailer.sourceforge.net</a><br />
</p>
</blockquote>
-
+
<p><b>PHP Markdown</b> - lib/markdown.php </p>
<blockquote>
<p>Functions to convert from the Markdown text format into clean XHTML.</p>
URL: <a href="http://www.michelf.com/projects/php-markdown/" target="newpage">http://www.michelf.com/projects/php-markdown/</a><br />
</p>
</blockquote>
-
+
<p><b>Snoopy</b> - lib/snoopy</p>
<blockquote>
<p>A PHP net client<br />
URL: <a href="http://snoopy.sourceforge.com">http://snoopy.sourceforge.net/</a><br />
</p>
</blockquote>
-
+
<p><b>Spreadsheet::WriteExcel</b> - lib/excel</p>
<blockquote>
<p>A library for generating Excel Spreadsheets.<br />
URL: <a href="http://jeffn.users.phpclasses.org/browse.html/package/767.html" target="newpage">http://jeffn.users.phpclasses.org/browse.html/package/767.html</a><br />
</p>
</blockquote>
-
+
<p><b>SMTP class </b>- lib/class.smtp.php</p>
<blockquote>
<p>Class that can be used to connect and communicate with any SMTP
Copyright © 2001 Chris Ryan <chris@greatbridge.com><br />
</p>
</blockquote>
-
- <p><b>Typo3 Character Set Class</b> - lib/typo3</p>
+
+ <p><b>Typo3 Character Set Class</b> - lib/typo3</p>
<blockquote>
<p>Class for conversion between charsets and multibyte-savy operations
with strings.<br />
URL: <a href="http://typo3.org/">http://typo3.org/</a><br />
</p>
</blockquote>
-
+
</blockquote>
<p align="center"><font size="1"><a href="." target="_top">Moodle Documentation</a></font></p>
<p align="center"><font size="1">Version: $Id$</font></p>
.style1 {color: #990000}
.style3 {color: #990000; font-weight: bold; }
.style4 {
- color: #0000CC;
- font-weight: bold;
+ color: #0000CC;
+ font-weight: bold;
}
-->
</style>
<blockquote>
<p>Sourceforge CVS uses ssh as a transport layer for security, so you will have to set a CVS_RSH environment variable in your Unix shell. It's best to put these commands in your .bashrc or .cshrc so you don't have to type it all the time<strong>:</strong></p>
<div class="commandline">setenv CVS_RSH ssh <em>(for csh, tcsh etc)</em><br />
- export CVS_RSH=ssh <em>(for sh, bash etc)</em></div>
+ export CVS_RSH=ssh <em>(for sh, bash etc)</em></div>
<p>Next, you can check out the latest development version of Moodle using this (all one line): </p>
<div class="commandline">cvs -z3 -d:ext:<span class="style1">myusername</span>@cvs.sourceforge.net:/cvsroot/moodle co moodle</div>
<p>The command is similar for other CVS modules:</p>
</li>
<li>Merge everything on the branch since the last merge, into your trunk version<br /><br />
<div class="commandline">cvs update -kk -j MOODLE_13_MERGED -j MOODLE_13_STABLE</div>
- </li>
+ </li>
<li>Carefully watch the update logs for conflicts, and fix every file that you see with a conflict</li>
<li>Check the merged copy back into CVS trunk version<br />
<br />
</li>
<li>Go back to the branch version<br /><br />
<div class="commandline">cvs update -dPr MOODLE_13_STABLE</div>
- </li>
+ </li>
<li>Update the floating merge tag so that this process can be repeated next time<br /><br />
<div class="commandline">cvs tag -RF MOODLE_13_MERGED</div>
</li>
<ol>
<li>Discuss with other developers to make sure it's necessary!</li>
<li>Make a new tag on the <strong>trunk</strong> (for all of moodle) called <strong>MOODLE_XX_WIDGET_PRE</strong>
- <br /><br />
+ <br /><br />
<div class="commandline">cvs tag -R MOODLE_XX_WIDGET_PRE</div></li>
<li>Create your branch called <span class="style1"><strong>MOODLE_XX_WIDGET</strong></span>
- <br /><br />
+ <br /><br />
<div class="commandline">cvs tag -Rb <span class="style1">MOODLE_XX_WIDGET</span></div></li>
<li>Work in that branch until the feature is reasonably stable. Commit as necessary.
- <br /><br />
+ <br /><br />
<div class="commandline">cvs commit</div></li>
<li>When ready, merge the whole branch into the trunk, fix conflicts, commit it to the trunk and then abandon the branch.
- <br />
- <br />
+ <br />
+ <br />
<div class="commandline">
<strong>cvs update -dPA</strong><br />
<strong>cvs update -kk -j <span class="style1">MOODLE_XX_WIDGET</span></strong><br />
li {
- margin-bottom: 10px;
+ margin-bottom: 10px;
}
}
.normaltext {
- font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
- font-size: medium;
- border: none;
- margin-left: 30px;
+ font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
+ font-size: medium;
+ border: none;
+ margin-left: 30px;
}
}
.examplecode {
- font-family: "Courier New", Courier, mono;
- font-size: small;
- border: thin dashed #999999;
- background-color: #FBFBFB;
- margin: auto;
- padding: 30px;
- height: auto;
- width: auto;
+ font-family: "Courier New", Courier, mono;
+ font-size: small;
+ border: thin dashed #999999;
+ background-color: #FBFBFB;
+ margin: auto;
+ padding: 30px;
+ height: auto;
+ width: auto;
}
h1 {
- font-weight: bold;
- color: #000000;
- background-color: #CCCCCC;
- padding: 5px;
- font-size: large;
+ font-weight: bold;
+ color: #000000;
+ background-color: #CCCCCC;
+ padding: 5px;
+ font-size: large;
border-width: 1px;
border-color: #CCCCCC;
-moz-border-radius: 10px;
}
h2 {
- font-weight: bold;
- color: #FFFFFF;
- background-color: #666666;
- padding: 5px;
- font-size: medium;
+ font-weight: bold;
+ color: #FFFFFF;
+ background-color: #666666;
+ padding: 5px;
+ font-size: medium;
border-width: 1px;
border-color: #666666;
-moz-border-radius: 10px;
}
h3 {
- font-weight: normal;
- color: #FFFFFF;
- background-color: #666666;
- padding: 5px;
- font-size: medium;
+ font-weight: normal;
+ color: #FFFFFF;
+ background-color: #666666;
+ padding: 5px;
+ font-size: medium;
-moz-border-radius: 10px;
}
.spaced {
- margin-bottom: 30px;
+ margin-bottom: 30px;
}
ul {
- margin-top: 10px;
+ margin-top: 10px;
}
.commandline {
- font-family: "Courier New", Courier, mono;
- font-size: x-small;
- background-color: #FBFBFB;
- margin: auto auto 20px 30px;
- padding: 5px;
- height: auto;
- width: auto;
- font-weight: bold;
- border: 1px solid #999999;
- white-space: nowrap;
- display: compact;
- clear: both;
- float: none;
+ font-family: "Courier New", Courier, mono;
+ font-size: x-small;
+ background-color: #FBFBFB;
+ margin: auto auto 20px 30px;
+ padding: 5px;
+ height: auto;
+ width: auto;
+ font-weight: bold;
+ border: 1px solid #999999;
+ white-space: nowrap;
+ display: compact;
+ clear: both;
+ float: none;
}
<head>
<title>Moodle Docs: Future</title>
-
+
<link rel="stylesheet" href="docstyles.css" type="TEXT/CSS" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Moodle Docs: Installing PHP and MySQL</title>
- <link rel="stylesheet" href="docstyles.css" type="TEXT/CSS" />
+ <link rel="stylesheet" href="docstyles.css" type="TEXT/CSS" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<hr width="100%" size="2" />
<br />
- <pre> GNU GENERAL PUBLIC LICENSE<br /> Version 2, June 1991<br /><br /> Copyright (C) 1989, 1991 Free Software Foundation, Inc.<br /> 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA<br /> Everyone is permitted to copy and distribute verbatim copies<br /> of this license document, but changing it is not allowed.<br /><br /> Preamble<br /><br /> The licenses for most software are designed to take away your<br />freedom to share and change it. By contrast, the GNU General Public<br />License is intended to guarantee your freedom to share and change free<br />software--to make sure the software is free for all its users. This<br />General Public License applies to most of the Free Software<br />Foundation's software and to any other program whose authors commit to<br />using it. (Some other Free Software Foundation software is covered by<br />the GNU Library General Public License instead.) You can apply it to<br />your programs, too.<br /><br /> When we speak of free software, we are referring to freedom, not<br />price. Our General Public Licenses are designed to make sure that you<br />have the freedom to distribute copies of free software (and charge for<br />this service if you wish), that you receive source code or can get it<br />if you want it, that you can change the software or use pieces of it<br />in new free programs; and that you know you can do these things.<br /><br /> To protect your rights, we need to make restrictions that forbid<br />anyone to deny you these rights or to ask you to surrender the rights.<br />These restrictions translate to certain responsibilities for you if you<br />distribute copies of the software, or if you modify it.<br /><br /> For example, if you distribute copies of such a program, whether<br />gratis or for a fee, you must give the recipients all the rights that<br />you have. You must make sure that they, too, receive or can get the<br />source code. And you must show them these terms so they know their<br />rights.<br /><br /> We protect your rights with two steps: (1) copyright the software, and<br />(2) offer you this license which gives you legal permission to copy,<br />distribute and/or modify the software.<br /><br /> Also, for each author's protection and ours, we want to make certain<br />that everyone understands that there is no warranty for this free<br />software. If the software is modified by someone else and passed on, we<br />want its recipients to know that what they have is not the original, so<br />that any problems introduced by others will not reflect on the original<br />authors' reputations.<br /><br /> Finally, any free program is threatened constantly by software<br />patents. We wish to avoid the danger that redistributors of a free<br />program will individually obtain patent licenses, in effect making the<br />program proprietary. To prevent this, we have made it clear that any<br />patent must be licensed for everyone's free use or not licensed at all.<br /><br /> The precise terms and conditions for copying, distribution and<br />modification follow.<br />\f<br /> GNU GENERAL PUBLIC LICENSE<br /> TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION<br /><br /> 0. This License applies to any program or other work which contains<br />a notice placed by the copyright holder saying it may be distributed<br />under the terms of this General Public License. The "Program", below,<br />refers to any such program or work, and a "work based on the Program"<br />means either the Program or any derivative work under copyright law:<br />that is to say, a work containing the Program or a portion of it,<br />either verbatim or with modifications and/or translated into another<br />language. (Hereinafter, translation is included without limitation in<br />the term "modification".) Each licensee is addressed as "you".<br /><br />Activities other than copying, distribution and modification are not<br />covered by this License; they are outside its scope. The act of<br />running the Program is not restricted, and the output from the Program<br />is covered only if its contents constitute a work based on the<br />Program (independent of having been made by running the Program).<br />Whether that is true depends on what the Program does.<br /><br /> 1. You may copy and distribute verbatim copies of the Program's<br />source code as you receive it, in any medium, provided that you<br />conspicuously and appropriately publish on each copy an appropriate<br />copyright notice and disclaimer of warranty; keep intact all the<br />notices that refer to this License and to the absence of any warranty;<br />and give any other recipients of the Program a copy of this License<br />along with the Program.<br /><br />You may charge a fee for the physical act of transferring a copy, and<br />you may at your option offer warranty protection in exchange for a fee.<br /><br /> 2. You may modify your copy or copies of the Program or any portion<br />of it, thus forming a work based on the Program, and copy and<br />distribute such modifications or work under the terms of Section 1<br />above, provided that you also meet all of these conditions:<br /><br /> a) You must cause the modified files to carry prominent notices<br /> stating that you changed the files and the date of any change.<br /><br /> b) You must cause any work that you distribute or publish, that in<br /> whole or in part contains or is derived from the Program or any<br /> part thereof, to be licensed as a whole at no charge to all third<br /> parties under the terms of this License.<br /><br /> c) If the modified program normally reads commands interactively<br /> when run, you must cause it, when started running for such<br /> interactive use in the most ordinary way, to print or display an<br /> announcement including an appropriate copyright notice and a<br /> notice that there is no warranty (or else, saying that you provide<br /> a warranty) and that users may redistribute the program under<br /> these conditions, and telling the user how to view a copy of this<br /> License. (Exception: if the Program itself is interactive but<br /> does not normally print such an announcement, your work based on<br /> the Program is not required to print an announcement.)<br />\f<br />These requirements apply to the modified work as a whole. If<br />identifiable sections of that work are not derived from the Program,<br />and can be reasonably considered independent and separate works in<br />themselves, then this License, and its terms, do not apply to those<br />sections when you distribute them as separate works. But when you<br />distribute the same sections as part of a whole which is a work based<br />on the Program, the distribution of the whole must be on the terms of<br />this License, whose permissions for other licensees extend to the<br />entire whole, and thus to each and every part regardless of who wrote it.<br /><br />Thus, it is not the intent of this section to claim rights or contest<br />your rights to work written entirely by you; rather, the intent is to<br />exercise the right to control the distribution of derivative or<br />collective works based on the Program.<br /><br />In addition, mere aggregation of another work not based on the Program<br />with the Program (or with a work based on the Program) on a volume of<br />a storage or distribution medium does not bring the other work under<br />the scope of this License.<br /><br /> 3. You may copy and distribute the Program (or a work based on it,<br />under Section 2) in object code or executable form under the terms of<br />Sections 1 and 2 above provided that you also do one of the following:<br /><br /> a) Accompany it with the complete corresponding machine-readable<br /> source code, which must be distributed under the terms of Sections<br /> 1 and 2 above on a medium customarily used for software interchange; or,<br /><br /> b) Accompany it with a written offer, valid for at least three<br /> years, to give any third party, for a charge no more than your<br /> cost of physically performing source distribution, a complete<br /> machine-readable copy of the corresponding source code, to be<br /> distributed under the terms of Sections 1 and 2 above on a medium<br /> customarily used for software interchange; or,<br /><br /> c) Accompany it with the information you received as to the offer<br /> to distribute corresponding source code. (This alternative is<br /> allowed only for noncommercial distribution and only if you<br /> received the program in object code or executable form with such<br /> an offer, in accord with Subsection b above.)<br /><br />The source code for a work means the preferred form of the work for<br />making modifications to it. For an executable work, complete source<br />code means all the source code for all modules it contains, plus any<br />associated interface definition files, plus the scripts used to<br />control compilation and installation of the executable. However, as a<br />special exception, the source code distributed need not include<br />anything that is normally distributed (in either source or binary<br />form) with the major components (compiler, kernel, and so on) of the<br />operating system on which the executable runs, unless that component<br />itself accompanies the executable.<br /><br />If distribution of executable or object code is made by offering<br />access to copy from a designated place, then offering equivalent<br />access to copy the source code from the same place counts as<br />distribution of the source code, even though third parties are not<br />compelled to copy the source along with the object code.<br />\f<br /> 4. You may not copy, modify, sublicense, or distribute the Program<br />except as expressly provided under this License. Any attempt<br />otherwise to copy, modify, sublicense or distribute the Program is<br />void, and will automatically terminate your rights under this License.<br />However, parties who have received copies, or rights, from you under<br />this License will not have their licenses terminated so long as such<br />parties remain in full compliance.<br /><br /> 5. You are not required to accept this License, since you have not<br />signed it. However, nothing else grants you permission to modify or<br />distribute the Program or its derivative works. These actions are<br />prohibited by law if you do not accept this License. Therefore, by<br />modifying or distributing the Program (or any work based on the<br />Program), you indicate your acceptance of this License to do so, and<br />all its terms and conditions for copying, distributing or modifying<br />the Program or works based on it.<br /><br /> 6. Each time you redistribute the Program (or any work based on the<br />Program), the recipient automatically receives a license from the<br />original licensor to copy, distribute or modify the Program subject to<br />these terms and conditions. You may not impose any further<br />restrictions on the recipients' exercise of the rights granted herein.<br />You are not responsible for enforcing compliance by third parties to<br />this License.<br /><br /> 7. If, as a consequence of a court judgment or allegation of patent<br />infringement or for any other reason (not limited to patent issues),<br />conditions are imposed on you (whether by court order, agreement or<br />otherwise) that contradict the conditions of this License, they do not<br />excuse you from the conditions of this License. If you cannot<br />distribute so as to satisfy simultaneously your obligations under this<br />License and any other pertinent obligations, then as a consequence you<br />may not distribute the Program at all. For example, if a patent<br />license would not permit royalty-free redistribution of the Program by<br />all those who receive copies directly or indirectly through you, then<br />the only way you could satisfy both it and this License would be to<br />refrain entirely from distribution of the Program.<br /><br />If any portion of this section is held invalid or unenforceable under<br />any particular circumstance, the balance of the section is intended to<br />apply and the section as a whole is intended to apply in other<br />circumstances.<br /><br />It is not the purpose of this section to induce you to infringe any<br />patents or other property right claims or to contest validity of any<br />such claims; this section has the sole purpose of protecting the<br />integrity of the free software distribution system, which is<br />implemented by public license practices. Many people have made<br />generous contributions to the wide range of software distributed<br />through that system in reliance on consistent application of that<br />system; it is up to the author/donor to decide if he or she is willing<br />to distribute software through any other system and a licensee cannot<br />impose that choice.<br /><br />This section is intended to make thoroughly clear what is believed to<br />be a consequence of the rest of this License.<br />\f<br /> 8. If the distribution and/or use of the Program is restricted in<br />certain countries either by patents or by copyrighted interfaces, the<br />original copyright holder who places the Program under this License<br />may add an explicit geographical distribution limitation excluding<br />those countries, so that distribution is permitted only in or among<br />countries not thus excluded. In such case, this License incorporates<br />the limitation as if written in the body of this License.<br /><br /> 9. The Free Software Foundation may publish revised and/or new versions<br />of the General Public License from time to time. Such new versions will<br />be similar in spirit to the present version, but may differ in detail to<br />address new problems or concerns.<br /><br />Each version is given a distinguishing version number. If the Program<br />specifies a version number of this License which applies to it and "any<br />later version", you have the option of following the terms and conditions<br />either of that version or of any later version published by the Free<br />Software Foundation. If the Program does not specify a version number of<br />this License, you may choose any version ever published by the Free Software<br />Foundation.<br /><br /> 10. If you wish to incorporate parts of the Program into other free<br />programs whose distribution conditions are different, write to the author<br />to ask for permission. For software which is copyrighted by the Free<br />Software Foundation, write to the Free Software Foundation; we sometimes<br />make exceptions for this. Our decision will be guided by the two goals<br />of preserving the free status of all derivatives of our free software and<br />of promoting the sharing and reuse of software generally.<br /><br /> NO WARRANTY<br /><br /> 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY<br />FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN<br />OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES<br />PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED<br />OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF<br />MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS<br />TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE<br />PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,<br />REPAIR OR CORRECTION.<br /><br /> 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING<br />WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR<br />REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,<br />INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING<br />OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED<br />TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY<br />YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER<br />PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE<br />POSSIBILITY OF SUCH DAMAGES.<br /><br /> END OF TERMS AND CONDITIONS<br /></pre>
+ <pre> GNU GENERAL PUBLIC LICENSE<br /> Version 2, June 1991<br /><br /> Copyright (C) 1989, 1991 Free Software Foundation, Inc.<br /> 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA<br /> Everyone is permitted to copy and distribute verbatim copies<br /> of this license document, but changing it is not allowed.<br /><br /> Preamble<br /><br /> The licenses for most software are designed to take away your<br />freedom to share and change it. By contrast, the GNU General Public<br />License is intended to guarantee your freedom to share and change free<br />software--to make sure the software is free for all its users. This<br />General Public License applies to most of the Free Software<br />Foundation's software and to any other program whose authors commit to<br />using it. (Some other Free Software Foundation software is covered by<br />the GNU Library General Public License instead.) You can apply it to<br />your programs, too.<br /><br /> When we speak of free software, we are referring to freedom, not<br />price. Our General Public Licenses are designed to make sure that you<br />have the freedom to distribute copies of free software (and charge for<br />this service if you wish), that you receive source code or can get it<br />if you want it, that you can change the software or use pieces of it<br />in new free programs; and that you know you can do these things.<br /><br /> To protect your rights, we need to make restrictions that forbid<br />anyone to deny you these rights or to ask you to surrender the rights.<br />These restrictions translate to certain responsibilities for you if you<br />distribute copies of the software, or if you modify it.<br /><br /> For example, if you distribute copies of such a program, whether<br />gratis or for a fee, you must give the recipients all the rights that<br />you have. You must make sure that they, too, receive or can get the<br />source code. And you must show them these terms so they know their<br />rights.<br /><br /> We protect your rights with two steps: (1) copyright the software, and<br />(2) offer you this license which gives you legal permission to copy,<br />distribute and/or modify the software.<br /><br /> Also, for each author's protection and ours, we want to make certain<br />that everyone understands that there is no warranty for this free<br />software. If the software is modified by someone else and passed on, we<br />want its recipients to know that what they have is not the original, so<br />that any problems introduced by others will not reflect on the original<br />authors' reputations.<br /><br /> Finally, any free program is threatened constantly by software<br />patents. We wish to avoid the danger that redistributors of a free<br />program will individually obtain patent licenses, in effect making the<br />program proprietary. To prevent this, we have made it clear that any<br />patent must be licensed for everyone's free use or not licensed at all.<br /><br /> The precise terms and conditions for copying, distribution and<br />modification follow.<br />\f<br /> GNU GENERAL PUBLIC LICENSE<br /> TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION<br /><br /> 0. This License applies to any program or other work which contains<br />a notice placed by the copyright holder saying it may be distributed<br />under the terms of this General Public License. The "Program", below,<br />refers to any such program or work, and a "work based on the Program"<br />means either the Program or any derivative work under copyright law:<br />that is to say, a work containing the Program or a portion of it,<br />either verbatim or with modifications and/or translated into another<br />language. (Hereinafter, translation is included without limitation in<br />the term "modification".) Each licensee is addressed as "you".<br /><br />Activities other than copying, distribution and modification are not<br />covered by this License; they are outside its scope. The act of<br />running the Program is not restricted, and the output from the Program<br />is covered only if its contents constitute a work based on the<br />Program (independent of having been made by running the Program).<br />Whether that is true depends on what the Program does.<br /><br /> 1. You may copy and distribute verbatim copies of the Program's<br />source code as you receive it, in any medium, provided that you<br />conspicuously and appropriately publish on each copy an appropriate<br />copyright notice and disclaimer of warranty; keep intact all the<br />notices that refer to this License and to the absence of any warranty;<br />and give any other recipients of the Program a copy of this License<br />along with the Program.<br /><br />You may charge a fee for the physical act of transferring a copy, and<br />you may at your option offer warranty protection in exchange for a fee.<br /><br /> 2. You may modify your copy or copies of the Program or any portion<br />of it, thus forming a work based on the Program, and copy and<br />distribute such modifications or work under the terms of Section 1<br />above, provided that you also meet all of these conditions:<br /><br /> a) You must cause the modified files to carry prominent notices<br /> stating that you changed the files and the date of any change.<br /><br /> b) You must cause any work that you distribute or publish, that in<br /> whole or in part contains or is derived from the Program or any<br /> part thereof, to be licensed as a whole at no charge to all third<br /> parties under the terms of this License.<br /><br /> c) If the modified program normally reads commands interactively<br /> when run, you must cause it, when started running for such<br /> interactive use in the most ordinary way, to print or display an<br /> announcement including an appropriate copyright notice and a<br /> notice that there is no warranty (or else, saying that you provide<br /> a warranty) and that users may redistribute the program under<br /> these conditions, and telling the user how to view a copy of this<br /> License. (Exception: if the Program itself is interactive but<br /> does not normally print such an announcement, your work based on<br /> the Program is not required to print an announcement.)<br />\f<br />These requirements apply to the modified work as a whole. If<br />identifiable sections of that work are not derived from the Program,<br />and can be reasonably considered independent and separate works in<br />themselves, then this License, and its terms, do not apply to those<br />sections when you distribute them as separate works. But when you<br />distribute the same sections as part of a whole which is a work based<br />on the Program, the distribution of the whole must be on the terms of<br />this License, whose permissions for other licensees extend to the<br />entire whole, and thus to each and every part regardless of who wrote it.<br /><br />Thus, it is not the intent of this section to claim rights or contest<br />your rights to work written entirely by you; rather, the intent is to<br />exercise the right to control the distribution of derivative or<br />collective works based on the Program.<br /><br />In addition, mere aggregation of another work not based on the Program<br />with the Program (or with a work based on the Program) on a volume of<br />a storage or distribution medium does not bring the other work under<br />the scope of this License.<br /><br /> 3. You may copy and distribute the Program (or a work based on it,<br />under Section 2) in object code or executable form under the terms of<br />Sections 1 and 2 above provided that you also do one of the following:<br /><br /> a) Accompany it with the complete corresponding machine-readable<br /> source code, which must be distributed under the terms of Sections<br /> 1 and 2 above on a medium customarily used for software interchange; or,<br /><br /> b) Accompany it with a written offer, valid for at least three<br /> years, to give any third party, for a charge no more than your<br /> cost of physically performing source distribution, a complete<br /> machine-readable copy of the corresponding source code, to be<br /> distributed under the terms of Sections 1 and 2 above on a medium<br /> customarily used for software interchange; or,<br /><br /> c) Accompany it with the information you received as to the offer<br /> to distribute corresponding source code. (This alternative is<br /> allowed only for noncommercial distribution and only if you<br /> received the program in object code or executable form with such<br /> an offer, in accord with Subsection b above.)<br /><br />The source code for a work means the preferred form of the work for<br />making modifications to it. For an executable work, complete source<br />code means all the source code for all modules it contains, plus any<br />associated interface definition files, plus the scripts used to<br />control compilation and installation of the executable. However, as a<br />special exception, the source code distributed need not include<br />anything that is normally distributed (in either source or binary<br />form) with the major components (compiler, kernel, and so on) of the<br />operating system on which the executable runs, unless that component<br />itself accompanies the executable.<br /><br />If distribution of executable or object code is made by offering<br />access to copy from a designated place, then offering equivalent<br />access to copy the source code from the same place counts as<br />distribution of the source code, even though third parties are not<br />compelled to copy the source along with the object code.<br />\f<br /> 4. You may not copy, modify, sublicense, or distribute the Program<br />except as expressly provided under this License. Any attempt<br />otherwise to copy, modify, sublicense or distribute the Program is<br />void, and will automatically terminate your rights under this License.<br />However, parties who have received copies, or rights, from you under<br />this License will not have their licenses terminated so long as such<br />parties remain in full compliance.<br /><br /> 5. You are not required to accept this License, since you have not<br />signed it. However, nothing else grants you permission to modify or<br />distribute the Program or its derivative works. These actions are<br />prohibited by law if you do not accept this License. Therefore, by<br />modifying or distributing the Program (or any work based on the<br />Program), you indicate your acceptance of this License to do so, and<br />all its terms and conditions for copying, distributing or modifying<br />the Program or works based on it.<br /><br /> 6. Each time you redistribute the Program (or any work based on the<br />Program), the recipient automatically receives a license from the<br />original licensor to copy, distribute or modify the Program subject to<br />these terms and conditions. You may not impose any further<br />restrictions on the recipients' exercise of the rights granted herein.<br />You are not responsible for enforcing compliance by third parties to<br />this License.<br /><br /> 7. If, as a consequence of a court judgment or allegation of patent<br />infringement or for any other reason (not limited to patent issues),<br />conditions are imposed on you (whether by court order, agreement or<br />otherwise) that contradict the conditions of this License, they do not<br />excuse you from the conditions of this License. If you cannot<br />distribute so as to satisfy simultaneously your obligations under this<br />License and any other pertinent obligations, then as a consequence you<br />may not distribute the Program at all. For example, if a patent<br />license would not permit royalty-free redistribution of the Program by<br />all those who receive copies directly or indirectly through you, then<br />the only way you could satisfy both it and this License would be to<br />refrain entirely from distribution of the Program.<br /><br />If any portion of this section is held invalid or unenforceable under<br />any particular circumstance, the balance of the section is intended to<br />apply and the section as a whole is intended to apply in other<br />circumstances.<br /><br />It is not the purpose of this section to induce you to infringe any<br />patents or other property right claims or to contest validity of any<br />such claims; this section has the sole purpose of protecting the<br />integrity of the free software distribution system, which is<br />implemented by public license practices. Many people have made<br />generous contributions to the wide range of software distributed<br />through that system in reliance on consistent application of that<br />system; it is up to the author/donor to decide if he or she is willing<br />to distribute software through any other system and a licensee cannot<br />impose that choice.<br /><br />This section is intended to make thoroughly clear what is believed to<br />be a consequence of the rest of this License.<br />\f<br /> 8. If the distribution and/or use of the Program is restricted in<br />certain countries either by patents or by copyrighted interfaces, the<br />original copyright holder who places the Program under this License<br />may add an explicit geographical distribution limitation excluding<br />those countries, so that distribution is permitted only in or among<br />countries not thus excluded. In such case, this License incorporates<br />the limitation as if written in the body of this License.<br /><br /> 9. The Free Software Foundation may publish revised and/or new versions<br />of the General Public License from time to time. Such new versions will<br />be similar in spirit to the present version, but may differ in detail to<br />address new problems or concerns.<br /><br />Each version is given a distinguishing version number. If the Program<br />specifies a version number of this License which applies to it and "any<br />later version", you have the option of following the terms and conditions<br />either of that version or of any later version published by the Free<br />Software Foundation. If the Program does not specify a version number of<br />this License, you may choose any version ever published by the Free Software<br />Foundation.<br /><br /> 10. If you wish to incorporate parts of the Program into other free<br />programs whose distribution conditions are different, write to the author<br />to ask for permission. For software which is copyrighted by the Free<br />Software Foundation, write to the Free Software Foundation; we sometimes<br />make exceptions for this. Our decision will be guided by the two goals<br />of preserving the free status of all derivatives of our free software and<br />of promoting the sharing and reuse of software generally.<br /><br /> NO WARRANTY<br /><br /> 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY<br />FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN<br />OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES<br />PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED<br />OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF<br />MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS<br />TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE<br />PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,<br />REPAIR OR CORRECTION.<br /><br /> 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING<br />WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR<br />REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,<br />INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING<br />OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED<br />TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY<br />YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER<br />PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE<br />POSSIBILITY OF SUCH DAMAGES.<br /><br /> END OF TERMS AND CONDITIONS<br /></pre>
</blockquote>
<head>
<title>Moodle Docs: Current Release notes</title>
-
+
<link rel="stylesheet" href="docstyles.css" type="TEXT/CSS" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<head>
<title>Moodle Docs: Old Release notes</title>
-
+
<link rel="stylesheet" href="docstyles.css" type="TEXT/CSS" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<dd>
<ul>
<li>Preventative measures against attacks to admin functions.</li>
- <li>Lesson: Safer hiding of lessons (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2733" target="_blank">#2733</a>)</li>
+ <li>Lesson: Safer hiding of lessons (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2733" target="_blank">#2733</a>)</li>
</ul>
</dd>
<ul>
<li>Flash Media Player: Now playing can start before the download is complete.</li>
<li>Added/updated language support for German (DE) and Turkish (TR).</li>
- <li>Release notes now link to the relevant bugs.</li>
+ <li>Release notes now link to the relevant bugs.</li>
<li>Prefetching requests from Google Web Accelerator, Mozilla etc are denied.</li>
</ul>
- </dd>
+ </dd>
<dt>Performance improvements</dt>
<dd>
<ul>
- <li>Added option to cache the languages list. Saves around 10MB of memory and 40 includes. See config-dist.php for details on how to enable.</li>
+ <li>Added option to cache the languages list. Saves around 10MB of memory and 40 includes. See config-dist.php for details on how to enable.</li>
<li>Major efficiency improvements for Postgres databases on insert. Also fixed many calls to insert_record() which discard the returned record id to not ask for the record id.</li>
</ul>
</dd>
<dt>Other bug fixes</dt>
<dd>
<ul>
- <li>HTML Editor: Fixes to some character encoding problems.</li>
- <li>Quiz: fixes to export/import dropdown (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2963" target="_blank">#2963</a>)</li>
- <li>Quiz: Don't throw a fatal error on unknown question, try to continue.</li>
- <li>Course Social Forum: Removed misleading link to unsubscribe (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2945" target="_blank">#2945</a>).</li>
- <li>Additional/updated translations.</li>
- <li>Forums and Groups: Allow students not in a group to post into a discussion which is also not in a group, even if the course is using groups.</li>
- <li>Sitewide HTML Editor settings: Fixed <a href="http://moodle.org/mod/forum/discuss.php?d=21359" target="_blank">Can't save changes in editor configuration</a> form bug.</li>
- <li>Cron: Removed some warnings.</li>
- <li>Choice: Choice shows a bad number of answers (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2452" target="_blank">#2452</a>).</li>
- <li>Better support for PHP5: Files uploads now use $_FILES rather than deprecated $HTTP_POST_FILES (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2828" target="_blank">#2828</a>)</li>
- <li>Backup/Restore: Manual links from lesson pages to resources are now preserved between backup/restore anywhere. (see <a href="http://moodle.org/mod/forum/discuss.php?d=21044" target="_blank">this discussion</a>)</li>
- <li>Some fixes for Postgres constraint naming.</li>
- <li>I18N support: Reset proper encoding upon login (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2770" target="_blank">#2770</a>).</li>
- <li>I18N support: Fixed some instances of garbled characters when using utf-8 in HTML Editor (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2763" target="_blank">#2763</a>)</li>
- <li>Flash Media Player: Turn off the autoloading of sound files.</li>
- <li>Flash Media Player: Better handling of filenames files.</li>
- <li>Postgres: Fixed sequences out of sequence (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2742" target="_blank">#2742</a>).</li>
- <li>Backup: Fixed memory limit overrun in backup config page.</li>
- <li>Forums: Fixed error warnings when a teacher posts to a forum (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2723" target="_blank">#2723</a>).</li>
+ <li>HTML Editor: Fixes to some character encoding problems.</li>
+ <li>Quiz: fixes to export/import dropdown (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2963" target="_blank">#2963</a>)</li>
+ <li>Quiz: Don't throw a fatal error on unknown question, try to continue.</li>
+ <li>Course Social Forum: Removed misleading link to unsubscribe (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2945" target="_blank">#2945</a>).</li>
+ <li>Additional/updated translations.</li>
+ <li>Forums and Groups: Allow students not in a group to post into a discussion which is also not in a group, even if the course is using groups.</li>
+ <li>Sitewide HTML Editor settings: Fixed <a href="http://moodle.org/mod/forum/discuss.php?d=21359" target="_blank">Can't save changes in editor configuration</a> form bug.</li>
+ <li>Cron: Removed some warnings.</li>
+ <li>Choice: Choice shows a bad number of answers (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2452" target="_blank">#2452</a>).</li>
+ <li>Better support for PHP5: Files uploads now use $_FILES rather than deprecated $HTTP_POST_FILES (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2828" target="_blank">#2828</a>)</li>
+ <li>Backup/Restore: Manual links from lesson pages to resources are now preserved between backup/restore anywhere. (see <a href="http://moodle.org/mod/forum/discuss.php?d=21044" target="_blank">this discussion</a>)</li>
+ <li>Some fixes for Postgres constraint naming.</li>
+ <li>I18N support: Reset proper encoding upon login (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2770" target="_blank">#2770</a>).</li>
+ <li>I18N support: Fixed some instances of garbled characters when using utf-8 in HTML Editor (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2763" target="_blank">#2763</a>)</li>
+ <li>Flash Media Player: Turn off the autoloading of sound files.</li>
+ <li>Flash Media Player: Better handling of filenames files.</li>
+ <li>Postgres: Fixed sequences out of sequence (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2742" target="_blank">#2742</a>).</li>
+ <li>Backup: Fixed memory limit overrun in backup config page.</li>
+ <li>Forums: Fixed error warnings when a teacher posts to a forum (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2723" target="_blank">#2723</a>).</li>
</ul>
</dd>
<dd>
<ul>
<li>Added strong URL validation functions.</li>
- <li>Preventative measures against tampering of config settings.</li>
- <li>Tighter input validation in Quiz, HTML editor and course edit.</li>
- <li>More control over user's language settings.</li>
- <li>Safer cleaning of HTML-formatted input.</li>
+ <li>Preventative measures against tampering of config settings.</li>
+ <li>Tighter input validation in Quiz, HTML editor and course edit.</li>
+ <li>More control over user's language settings.</li>
+ <li>Safer cleaning of HTML-formatted input.</li>
</ul>
</dd>
<dd>
<ul>
<li>New MP3 content filter with Flash-based mp3 player.</li>
- <li>Better display of options in the Choice module.</li>
- <li>UI enhancements in HTML Editor's table editor.</li>
- <li>$CFG settings in config.php now override database settings.</li>
+ <li>Better display of options in the Choice module.</li>
+ <li>UI enhancements in HTML Editor's table editor.</li>
+ <li>$CFG settings in config.php now override database settings.</li>
<li>Enabled garbage collection for Debian systems, with the option to disable it. Fixes stale session problems.</li>
</ul>
</dd>
-
+
<dt>Performance improvements</dt>
<dd>
<ul>
<li>Serious performance optimizations in forums code.</li>
<li>Various optimizations by removing unnecessary database retrievals and sorting.</li>
- <li>Major improvements in handling session locking. Downloading large files or monitoring the live logs will no longer slow down navigation in other windows.</li>
+ <li>Major improvements in handling session locking. Downloading large files or monitoring the live logs will no longer slow down navigation in other windows.</li>
</ul>
</dd>
<dt>Other bug fixes</dt>
<dd>
<ul>
- <li>Installer: Many fixes and updates from HEAD (including <a href="http://moodle.org/bugs/bug.php?op=show&bugid=2625" target="_blank">#2625</a>) .</li>
- <li>Installer: We now check for allow_url_fopen() before trying to validate our own URL.</li>
+ <li>Installer: Many fixes and updates from HEAD (including <a href="http://moodle.org/bugs/bug.php?op=show&bugid=2625" target="_blank">#2625</a>) .</li>
+ <li>Installer: We now check for allow_url_fopen() before trying to validate our own URL.</li>
<li>Fixed some forum search problems.</li>
- <li>Fixed sorting bug on forums (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2613" target="_blank">#2613</a>).</li>
+ <li>Fixed sorting bug on forums (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2613" target="_blank">#2613</a>).</li>
<li>Fixed problems in user searches with trailing spaces.</li>
<li>Fixed some instances of hardcoded /admin path.</li>
- <li>Fixed some groups-related bugs (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2133" target="_blank">#2133</a>, <a href="http://moodle.org/bugs/bug.php?op=show&bugid=2550" target="_blank">#2550</a>, <a href="http://moodle.org/bugs/bug.php?op=show&bugid=2363" target="_blank">#2363</a>)</li>
- <li>Don't send HTML digests to people who want plain text email.</li>
+ <li>Fixed some groups-related bugs (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2133" target="_blank">#2133</a>, <a href="http://moodle.org/bugs/bug.php?op=show&bugid=2550" target="_blank">#2550</a>, <a href="http://moodle.org/bugs/bug.php?op=show&bugid=2363" target="_blank">#2363</a>)</li>
+ <li>Don't send HTML digests to people who want plain text email.</li>
- <li>SCORM module — fixed navbar error.</li>
+ <li>SCORM module — fixed navbar error.</li>
<li>Chat: Increased maximum socket read size to prevent empty pages and repeated messages</li>
- <li>Files: added a "Parent Folder" icon, (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2491" target="_blank">#2491</a>).</li>
+ <li>Files: added a "Parent Folder" icon, (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2491" target="_blank">#2491</a>).</li>
- <li>Postgres support: consistency fix in mdl_log table.</li>
+ <li>Postgres support: consistency fix in mdl_log table.</li>
- <li>Auth plugins: Better cleanup and truncation of data.</li>
- <li>Auth plugins: Fixed external authentication problem — if logged in as guest, logging in as external auth user fails if it is the first login ever for the account. </li>
- <li>Auth LDAP: Fixed a regression from 1.4.2 where a trailing semicolon in some config fields would break authentication.</li>
+ <li>Auth plugins: Better cleanup and truncation of data.</li>
+ <li>Auth plugins: Fixed external authentication problem — if logged in as guest, logging in as external auth user fails if it is the first login ever for the account. </li>
+ <li>Auth LDAP: Fixed a regression from 1.4.2 where a trailing semicolon in some config fields would break authentication.</li>
<li>Auth DB: Database Authentication not fetching user data fields correctly (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2319" target="_blank">#2319</a>).</li>
<li>Paypal Enrolment plugin: Now text sent to PayPal can
- be 'sanitised' to avoid some diacritics (Spanish for now) which break the
- enrol process. Only German and French diacritics are supported for
- now by PayPal. This functionality can be easily expanded to other
- characters. </li>
+ be 'sanitised' to avoid some diacritics (Spanish for now) which break the
+ enrol process. Only German and French diacritics are supported for
+ now by PayPal. This functionality can be easily expanded to other
+ characters. </li>
- <li>Backup/restore: If the user isn't admin and the restored course hasn't teachers, add teacher (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2381" target="_blank">#2381</a>)</li>
- <li>Backup/restore: Fixed errors with courses with apostrophes in the fullname.</li>
- <li>Backup/restore: Now group members are
- only included (backup and restore) if we have selected to have
- users (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2486" target="_blank">#2486</a>).</li>
- <li>Backup/Restore: General tidyup.</li>
+ <li>Backup/restore: If the user isn't admin and the restored course hasn't teachers, add teacher (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2381" target="_blank">#2381</a>)</li>
+ <li>Backup/restore: Fixed errors with courses with apostrophes in the fullname.</li>
+ <li>Backup/restore: Now group members are
+ only included (backup and restore) if we have selected to have
+ users (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2486" target="_blank">#2486</a>).</li>
+ <li>Backup/Restore: General tidyup.</li>
- <li>Glossary: Now 0 rates are supported in glossary (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2582" target="_blank">#2582</a>) and better PHP5 support (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2581" target="_blank">#2581</a>).</li>
- <li>Glossary & Blackboard: import fixes (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2310" target="_blank">#2310</a>).</li>
+ <li>Glossary: Now 0 rates are supported in glossary (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2582" target="_blank">#2582</a>) and better PHP5 support (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2581" target="_blank">#2581</a>).</li>
+ <li>Glossary & Blackboard: import fixes (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2310" target="_blank">#2310</a>).</li>
- <li>Calendar: more robust handling of bad data.</li>
- <li>Calendar: HTML fixes in calendar (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2350" target="_blank">#2350</a>).</li>
+ <li>Calendar: more robust handling of bad data.</li>
+ <li>Calendar: HTML fixes in calendar (<a href="http://moodle.org/bugs/bug.php?op=show&bugid=2350" target="_blank">#2350</a>).</li>
- <li>Course sortorder was broken in 1.4.3 and would sometimes prevent course creation — all the known problems with sortorder are now fixed. Includes some related fixes in get_categories() calls that would sometimes show up in "My Courses" listings.</li>
+ <li>Course sortorder was broken in 1.4.3 and would sometimes prevent course creation — all the known problems with sortorder are now fixed. Includes some related fixes in get_categories() calls that would sometimes show up in "My Courses" listings.</li>
- <li>Wiki: Several fixes.</li>
- <li>Loglive now has an appropriate page footer.</li>
+ <li>Wiki: Several fixes.</li>
+ <li>Loglive now has an appropriate page footer.</li>
- <li>Plus general cleanup and tidyups of the code.</li>
+ <li>Plus general cleanup and tidyups of the code.</li>
</ul>
</dd>
<dd>
<ul>
<li>Better checking/cleaning of cookie data</li>
- <li>Preventative measures for session fixation</li>
+ <li>Preventative measures for session fixation</li>
<li>Better checking/cleaning of parameters for RSS feeds, ip atlas parameters, glossary, forum, theme selection, SCORM module, document viewer</li>
<li>Added protection in viewing of uploaded files</li>
<li>Added protection against directory traversal</li>
<li>Vastly improved multilang filter with more forgiving syntax </li>
</ul>
</dd>
-
+
<dt>Performance improvements</dt>
<dd>
<ul>
<li>Added daylight savings time fixes for the calendar</li>
<li>First quiz edit in a new course has a default category assigned</li>
<li>Fixed bug in paypal module when accepting payment amount</li>
- <li>Fixed bug in course files with loss of choose mode </li>
+ <li>Fixed bug in course files with loss of choose mode </li>
</ul>
</dd>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Moodle Docs: Upgrading</title>
- <link rel="stylesheet" href="docstyles.css" type="TEXT/CSS" />
+ <link rel="stylesheet" href="docstyles.css" type="TEXT/CSS" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
$string['notassessedyet'] = 'Not Assessed Yet';
$string['notavailable'] = 'Not Available';
$string['noteonassessmentelements'] = 'Note that grading is broken down into a number of \'Assessment Elements\'.<br />
- This makes the grading easier and more consistent. As teacher you must add these <br />
- Elements before making the assignment available to students. This is done by<br />
- clicking on the assignment in the course, if no elements are present you will be asked<br />
- to add them. You can change the number of elements using the Edit Assignment screen,<br />
- the elements themselves can be amended from the \"Managing Assignment\" screen. ';
+ This makes the grading easier and more consistent. As teacher you must add these <br />
+ Elements before making the assignment available to students. This is done by<br />
+ clicking on the assignment in the course, if no elements are present you will be asked<br />
+ to add them. You can change the number of elements using the Edit Assignment screen,<br />
+ the elements themselves can be amended from the \"Managing Assignment\" screen. ';
$string['noteongradinggrade'] = 'This grade is a measure of how well your assessment agrees with the assessment of <br />
your work by the $a. The higher the grade the closer the agreement.';
$string['noteonstudentassessments'] = '{Grade from student / Grading Grade for assessment}';
<p align="center"><b>Closing Dialogues</b></p>
<p>You can close a dialogue at any time. Closing a dialogue
- stops the dialogue and removes it from your current list of dialogues. That is,
- closed dialogues do not appear on this page. </p>
+ stops the dialogue and removes it from your current list of dialogues. That is,
+ closed dialogues do not appear on this page. </p>
<p>You will be able to view closed dialogues but you can not add to them.
- However, closed dialogues are eventually deleted and after that point they
- obviously will not be available even for viewing.</p>
-
+ However, closed dialogues are eventually deleted and after that point they
+ obviously will not be available even for viewing.</p>
+
<p>If you do close this dialogue, then you will have to start a new dialogue
- if you want to continue to "talk" with this person. That person
- will re-appear in the list of people you can start dialogues with.</p>
+ if you want to continue to "talk" with this person. That person
+ will re-appear in the list of people you can start dialogues with.</p>
<p align="center"><b>Deletion of Dialogues</b></p>
<p>This option sets the time interval in days for the deletion of
- dialogues. It only applies to CLOSED dialogues. </p>
-
+ dialogues. It only applies to CLOSED dialogues. </p>
+
<p>If the time period is set to zero then dialogues are never
deleted.</p>
<img alt="" src="<?php echo $CFG->wwwroot?>/mod/dialogue/icon.gif" /> <b>Dialogues</b></p>
<p>This module provides a simple communication method between pairs of users.
- A teacher can open an dialogue with a student, a student can open
- a dialogue with a teacher, and (optionally) a student can open a
- dialogue with another student. A teacher or student can be involved
- in many on-going dialogues at any time.</p>
+ A teacher can open an dialogue with a student, a student can open
+ a dialogue with a teacher, and (optionally) a student can open a
+ dialogue with another student. A teacher or student can be involved
+ in many on-going dialogues at any time.</p>
<p>A dialogue can have an unlimited number of entries, normally the
- "conversation" takes place as a set of interleaved
- replies. This format is not enforced and either party can add to the
- dialogue at any time.</p>
+ "conversation" takes place as a set of interleaved
+ replies. This format is not enforced and either party can add to the
+ dialogue at any time.</p>
<p>A dialogue can be closed by either party at any time. Closed dialogues
- cannot be reopened. However, a closed
- dialogue can be viewed by either party provided it is still in existence... </p>
-
+ cannot be reopened. However, a closed
+ dialogue can be viewed by either party provided it is still in existence... </p>
+
<p>...The module deletes closed dialogues and all their entries after a
- certain time. That time is set here when the Dialogue is created.</p>
+ certain time. That time is set here when the Dialogue is created.</p>
<p>If the course has groups the following points apply.
<ul><li>When opening a new dialogue the teacher is shown the group mode of the
<p>This value can be changed at any time and the effect on the grades seen by
the students (and the teacher) is immediate.</p>
-
+
<p>This value can be changed at any time and the effect on the grades seen by
the students (and the teacher) is immediate.</p>
-
+
exercise. If displayed, the league table displays a list of the best pieces
of work submitted in the exercise. If the number of entries is set to zero
then a League Table is not displayed in the last phase of the exercise.</p>
-
+
<p>This option controls whether the student's names are displayed in the League
Table shown at the end of the exercise. By default names are not shown,
that is, the table is anonymous.</p>
-
+
<p align="center"><b>Submission of Exercise Descriptions</b></p>
<p>The teacher must submit at least one description of the exercise or task.
- The description can be held in a Word document or HTML file (or
- any other file type that will display satisfactorily in a browser). This file
- will be displayed to the students and should contain instructions for them
- to successfully complete the exercise.</p>
-
+ The description can be held in a Word document or HTML file (or
+ any other file type that will display satisfactorily in a browser). This file
+ will be displayed to the students and should contain instructions for them
+ to successfully complete the exercise.</p>
+
<p>It is permissible for the teacher to submit more than one description of
- the exercise. These will be used at random and different students will see
- different versions of the exercise. These variants should be similar as the
- same Assessment Form is used to assess the work from these instructions.</p>
+ the exercise. These will be used at random and different students will see
+ different versions of the exercise. These variants should be similar as the
+ same Assessment Form is used to assess the work from these instructions.</p>
<p align="center"><b>Handling of Multiple Submissions</b></p>
<p>This option determines how the exercise should calculate the
- final grades of the students. When there are multiple submissions
- the teacher can chose between either using the best grade or the
- mean grade from each students' set of submissions. This option
- can be changed at any time during the exercise. Any change has an
- immediate effect in the Grades page (provided, of course, multiple
- submissions are present).</p>
+ final grades of the students. When there are multiple submissions
+ the teacher can chose between either using the best grade or the
+ mean grade from each students' set of submissions. This option
+ can be changed at any time during the exercise. Any change has an
+ immediate effect in the Grades page (provided, of course, multiple
+ submissions are present).</p>
<p>This is where graded items can be placed into categories, curved and set
as extra credit items. New categories can also be added and existing ones deleted.</p>
<ul>
- <li>Category: Adjusts which category a graded item belongs to. Just select the appropriate
- category from the drop down list. Items that have not been assigned a category or were in
- a category that was deleted will be automatically placed in "Uncategorized"
- </li>
-
- <li>Curve To: Allows you to curve grades. Set this item to what you would like the
- particular graded item graded out of. So if the max grade was 30 and curve to was
- set at 28 students grades and percents would be calculated against a possible 28 points
- rather than 30.</li>
-
- <li>Extra Credit: Check this box if you would like a particular category to be calculated
- as extra credit. Please note that setting all items to extra credit for a particular category
- will have unexpected results, and will most likely not count the category or extra credit at all.</li>
+ <li>Category: Adjusts which category a graded item belongs to. Just select the appropriate
+ category from the drop down list. Items that have not been assigned a category or were in
+ a category that was deleted will be automatically placed in "Uncategorized"
+ </li>
+
+ <li>Curve To: Allows you to curve grades. Set this item to what you would like the
+ particular graded item graded out of. So if the max grade was 30 and curve to was
+ set at 28 students grades and percents would be calculated against a possible 28 points
+ rather than 30.</li>
+
+ <li>Extra Credit: Check this box if you would like a particular category to be calculated
+ as extra credit. Please note that setting all items to extra credit for a particular category
+ will have unexpected results, and will most likely not count the category or extra credit at all.</li>
</ul>
\ No newline at end of file
<br />
There are three columns:</p>
<ul>
- <li>Left: Is students for the course that are "Included in Grading" for an particular graded
- item.</li>
- <li>Middle: A listing of all graded items followed by a total number of students excluded
- from grading in parenthesis.</li>
- <li>Right: A list of students that are excluded from a particular assignment</li>
+ <li>Left: Is students for the course that are "Included in Grading" for an particular graded
+ item.</li>
+ <li>Middle: A listing of all graded items followed by a total number of students excluded
+ from grading in parenthesis.</li>
+ <li>Right: A list of students that are excluded from a particular assignment</li>
<ul>
<p>To exclude students click the assignment in the middle and then click the students name in the left
</li>
<li>Under the total heading is a 'stats' link that will display a popup of statistics based on all assignments and/or quizzes of the participants of this course.
You will get information on:
- <ul>
- <li>Highest total score: the highest sum of all scores of a participant of this course</li>
- <li>Lowest total score: the lowest sum of all scores of a participant of this course</li>
- <li>Average total score: the sum of all total scores in this course, divided by the number of participants</li>
- <li>Median: The score in the middle of all ranked total scores</li>
- <li>Mode: the score achieved by the highest number of participants</li>
- <li>Standard deviation: a measure of the spread of the results</li>
- </ul>
+ <ul>
+ <li>Highest total score: the highest sum of all scores of a participant of this course</li>
+ <li>Lowest total score: the lowest sum of all scores of a participant of this course</li>
+ <li>Average total score: the sum of all total scores in this course, divided by the number of participants</li>
+ <li>Median: The score in the middle of all ranked total scores</li>
+ <li>Mode: the score achieved by the highest number of participants</li>
+ <li>Standard deviation: a measure of the spread of the results</li>
+ </ul>
</li>
</ul>
You will see all students, their grades for each graded item, and a total for each student. </p>
<ul>
<li>You can sort by student last name or first name by clicking the respective links
- under the student column on either the left or right side. The gradebook initially sorts
- by lastname.
+ under the student column on either the left or right side. The gradebook initially sorts
+ by lastname.
</li>
<li>The student names are links that will display just that student and their grades. This is
- useful when a student is looking at the gradebook with you and you need to protect the privacy of
- other student grades.
+ useful when a student is looking at the gradebook with you and you need to protect the privacy of
+ other student grades.
</li>
<li>The button at the top will create an excel spreadsheet or a tab separated text file for the course grades which you can download to
- your local machine.
+ your local machine.
</li>
<li>The main heading will display 'Grades' if you are using the normal mode (default). Otherwise it will
- show the category name which you are currently viewing if you have turned advanced settings on.
+ show the category name which you are currently viewing if you have turned advanced settings on.
</li>
<li>In the middle you will see all graded items for a course (or just a particular category in advanced mode).
The names for each graded item are links that take you to the settings for that particular item.
to the right of the Total heading that sort student totals in descending and ascending order respectively.
</li>
<li>To the right of the total heading (or for each individual category in advanced mode) is a 'stats' link
- that will display a popup of statistics based on total for the class.
+ that will display a popup of statistics based on total for the class.
</li>
</ul>
<p>How to adjust specific gradebook settings. The link that you need to click to adjust a setting will be in double quotes. More
information and help will be available on each respective screen.</p>
<ul>
- <li><h3>Basic:</h3>
+ <li><h3>Basic:</h3>
<ul>
- <li>Turning on advanced mode: "Set Preferences" </li>
- <li>Changing how often column headings repeat: "Set Preferences"</li>
- </ul>
+ <li>Turning on advanced mode: "Set Preferences" </li>
+ <li>Changing how often column headings repeat: "Set Preferences"</li>
+ </ul>
</li>
- <li><h3>Advanced:</h3>
- <ul>
- <li>Adjusting what columns are displayed: "Set Preferences"</li>
- <li>Setting how the total grade is calculated: "Set Preferences"</li>
- <li>Adjusting what categories a graded item belongs to: "Set Categories"</li>
- <li>Curving grades for assignments: "Set Categories"</li>
- <li>Setting a graded item as extra credit: "Set Categories"</li>
- <li>Adding a category: "Set Categories"</li>
- <li>Deleting a category: "Set Categories"</li>
- <li>Setting grade weights: "Set Weights"</li>
- <li>Dropping the X lowest grades from a category: "Set Weights"</li>
- <li>Adding bonus points to a category: "Set Weights"</li>
- <li>Hiding Categories from gradebook display and calculation: "Set Weights"</li>
- <li>Setting the grade scale and grade letters: "Set Grade Letters"</li>
- <li>Excluding students from assignments: "Grade Exceptions"</li>
- </ul></li>
+ <li><h3>Advanced:</h3>
+ <ul>
+ <li>Adjusting what columns are displayed: "Set Preferences"</li>
+ <li>Setting how the total grade is calculated: "Set Preferences"</li>
+ <li>Adjusting what categories a graded item belongs to: "Set Categories"</li>
+ <li>Curving grades for assignments: "Set Categories"</li>
+ <li>Setting a graded item as extra credit: "Set Categories"</li>
+ <li>Adding a category: "Set Categories"</li>
+ <li>Deleting a category: "Set Categories"</li>
+ <li>Setting grade weights: "Set Weights"</li>
+ <li>Dropping the X lowest grades from a category: "Set Weights"</li>
+ <li>Adding bonus points to a category: "Set Weights"</li>
+ <li>Hiding Categories from gradebook display and calculation: "Set Weights"</li>
+ <li>Setting the grade scale and grade letters: "Set Grade Letters"</li>
+ <li>Excluding students from assignments: "Grade Exceptions"</li>
+ </ul></li>
</ul>
\ No newline at end of file
<p align="center"><b>Add quiz chain</b></p>
<div class="indent">
- <p>
- <b>No</b><br />
- Only one quiz will be added to the course
- </p>
- <p>
- <b>Yes</b><br />
- If the "File name" is a file, it is treated as the start of a chain
- of Hot Potatoes quizzes and all quizzes in the chain will be added to the course
- with identical settings.<br />
- <br />
- If the "File name" is a folder, all Hot Potatoes quizzes in the folder
- will be added to the course as a chain of quizzes with identical settings.
- </p>
+ <p>
+ <b>No</b><br />
+ Only one quiz will be added to the course
+ </p>
+ <p>
+ <b>Yes</b><br />
+ If the "File name" is a file, it is treated as the start of a chain
+ of Hot Potatoes quizzes and all quizzes in the chain will be added to the course
+ with identical settings.<br />
+ <br />
+ If the "File name" is a folder, all Hot Potatoes quizzes in the folder
+ will be added to the course as a chain of quizzes with identical settings.
+ </p>
</div>
<p align="center"><b>Item Response Analysis</b></p>
<p>This table lists the responses to each question and the frequency of each response.</p>
<ul>
- <li>The frequencies of <b>correct answers</b> are shown in <font color="red"><b>red text</b></font>.</li>
- <li>The frequencies of <b>wrong answers</b> are shown in <font color="blue"><b>blue text</b></font>.</li>
- <li>The frequencies of <b>ignored answers</b> are shown in <font color="brown"><b>brown text</b></font>.</li>
- <li>The frequencies of <b>numeric data</b> are shown in <font color="green"><b>green text</b></font>.</li>
+ <li>The frequencies of <b>correct answers</b> are shown in <font color="red"><b>red text</b></font>.</li>
+ <li>The frequencies of <b>wrong answers</b> are shown in <font color="blue"><b>blue text</b></font>.</li>
+ <li>The frequencies of <b>ignored answers</b> are shown in <font color="brown"><b>brown text</b></font>.</li>
+ <li>The frequencies of <b>numeric data</b> are shown in <font color="green"><b>green text</b></font>.</li>
</ul>
<p align="center"><b>Enable click reporting</b></p>
<div class="indent">
- <p>
- <b>Yes</b><br />
- A separate record is stored in the database each time a
- "hint", "clue" or "check"
- button is clicked. This allows the teacher to see a very
- detailed report showing the state of the quiz at each click.
- However, it may also mean that the size of the database grows
- very quickly, because several "click" records may
- be stored for each attempt at a quiz.
- </p>
- <p>
- <b>No</b><br />
- Only one record per attempt at a quiz is stored in the Moodle database.
- </p>
+ <p>
+ <b>Yes</b><br />
+ A separate record is stored in the database each time a
+ "hint", "clue" or "check"
+ button is clicked. This allows the teacher to see a very
+ detailed report showing the state of the quiz at each click.
+ However, it may also mean that the size of the database grows
+ very quickly, because several "click" records may
+ be stored for each attempt at a quiz.
+ </p>
+ <p>
+ <b>No</b><br />
+ Only one record per attempt at a quiz is stored in the Moodle database.
+ </p>
</div>
<p>By the default this option is disabled.</p>
<p align="center"><b>Force Moodle to use Moodle-compatible media players</b></p>
<div class="indent">
- <p>
- <b>No</b><br />
- Moodle will not change the settings of any media players in the quiz
- </p>
- <p>
- <b>Yes</b><br />
- Moodle will force the quiz to use Moodle-compatible media players to play files like:
- <ul><li>avi</li><li>mpeg</li><li>mpg</li><li>mp3</li><li>mov</li><li>wmv</li></ul>
- </p>
+ <p>
+ <b>No</b><br />
+ Moodle will not change the settings of any media players in the quiz
+ </p>
+ <p>
+ <b>Yes</b><br />
+ Moodle will force the quiz to use Moodle-compatible media players to play files like:
+ <ul><li>avi</li><li>mpeg</li><li>mpg</li><li>mp3</li><li>mov</li><li>wmv</li></ul>
+ </p>
</div>
<p>
- More information:
- <a href="help.php?module=hotpot&file=mediaplayers.html">Relative URLs, media players and Hot Potatoes</a>
+ More information:
+ <a href="help.php?module=hotpot&file=mediaplayers.html">Relative URLs, media players and Hot Potatoes</a>
</p>
<p>Hot Potatoes</p>
<ul>
- <li><a href="help.php?module=hotpot&file=addquizchain.html">Add quiz chain</a></li>
- <li><a href="help.php?module=hotpot&file=analysistable.html">Analysis table</a></li>
- <li><a href="help.php?module=hotpot&file=clickreporting.html">Click trail report</a></li>
- <li><a href="help.php?module=hotpot&file=forceplugins.html">Force media plugins</a></li>
- <li><a href="help.php?module=hotpot&file=mediaplayers.html">Media players, relative URLs and Hot Potatoes</a></li>
- <li><a href="help.php?module=hotpot&file=navigation.html">Navigation</a></li>
- <li><a href="help.php?module=hotpot&file=outputformat.html">Output format</a></li>
- <li><a href="help.php?module=hotpot&file=reportcontent.html">Report content</a></li>
- <li><a href="help.php?module=hotpot&file=reportformat.html">Report format</a></li>
- <li><a href="help.php?module=hotpot&file=responsestable.html">Responses table</a></li>
- <li><a href="help.php?module=hotpot&file=reportselector.html">Selecting a report</a></li>
- <li><a href="help.php?module=hotpot&file=shownextquiz.html">Show next quiz</a></li>
- <li><a href="help.php?module=hotpot&file=studentfeedback.html">Student feedback</a></li>
- <li><a href="help.php?module=hotpot&file=updatequizchain.html">Update quiz chain</a></li>
+ <li><a href="help.php?module=hotpot&file=addquizchain.html">Add quiz chain</a></li>
+ <li><a href="help.php?module=hotpot&file=analysistable.html">Analysis table</a></li>
+ <li><a href="help.php?module=hotpot&file=clickreporting.html">Click trail report</a></li>
+ <li><a href="help.php?module=hotpot&file=forceplugins.html">Force media plugins</a></li>
+ <li><a href="help.php?module=hotpot&file=mediaplayers.html">Media players, relative URLs and Hot Potatoes</a></li>
+ <li><a href="help.php?module=hotpot&file=navigation.html">Navigation</a></li>
+ <li><a href="help.php?module=hotpot&file=outputformat.html">Output format</a></li>
+ <li><a href="help.php?module=hotpot&file=reportcontent.html">Report content</a></li>
+ <li><a href="help.php?module=hotpot&file=reportformat.html">Report format</a></li>
+ <li><a href="help.php?module=hotpot&file=responsestable.html">Responses table</a></li>
+ <li><a href="help.php?module=hotpot&file=reportselector.html">Selecting a report</a></li>
+ <li><a href="help.php?module=hotpot&file=shownextquiz.html">Show next quiz</a></li>
+ <li><a href="help.php?module=hotpot&file=studentfeedback.html">Student feedback</a></li>
+ <li><a href="help.php?module=hotpot&file=updatequizchain.html">Update quiz chain</a></li>
</ul>
<p><b>Definitions</b></p>
<div class="indent">
- <p><i>URL</i><br />
- the address of an internet resource, such as a webpage, image or sound file.
- </p>
- <p>
- <i>absolute URL</i><br />
- a URL that begins with "http://" is called an absolute URL.
- Wherever it is used, it always refers to the same target resource.
- </p>
- <p>
- <i>relative URL</i><br />
- a URL that does not begin with "http://" is called a relative URL.
- It can be combined with the absolute URL of a "base" page, to get
- the absolute URL of the target resource.
- </p>
+ <p><i>URL</i><br />
+ the address of an internet resource, such as a webpage, image or sound file.
+ </p>
+ <p>
+ <i>absolute URL</i><br />
+ a URL that begins with "http://" is called an absolute URL.
+ Wherever it is used, it always refers to the same target resource.
+ </p>
+ <p>
+ <i>relative URL</i><br />
+ a URL that does not begin with "http://" is called a relative URL.
+ It can be combined with the absolute URL of a "base" page, to get
+ the absolute URL of the target resource.
+ </p>
</div>
<p><b>Relative URLs in Hot Potatoes quizzes</b></p>
<p><img src="<?php echo $CFG->wwwroot?>/mod/hotpot/icon.gif" alt="" /> <b>Hot Potatoes</b></p>
<div class="indent">
- This module, the "HotPot" module, allows teachers to administer
- <a href="http://web.uvic.ca/hrd/halfbaked/" target="_blank">Hot Potatoes</a> quizzes via Moodle.
- The quizzes are created on the teacher's computer and then uploaded to the Moodle course.<br />
- After students have attempted the quizzes, a number of reports are available which show how
- individual questions were answered and some statistical trends in the scores.
+ This module, the "HotPot" module, allows teachers to administer
+ <a href="http://web.uvic.ca/hrd/halfbaked/" target="_blank">Hot Potatoes</a> quizzes via Moodle.
+ The quizzes are created on the teacher's computer and then uploaded to the Moodle course.<br />
+ After students have attempted the quizzes, a number of reports are available which show how
+ individual questions were answered and some statistical trends in the scores.
</div>
<p align="center"><b>Navigation</b></p>
<p>
- You can specify different navigation aids for a Hot Potatoes Quiz.
+ You can specify different navigation aids for a Hot Potatoes Quiz.
</p>
<div class="indent">
- <p>
- <b>Moodle navigation bar</b><br />
- The standard Moodle navigation bar will be displayed in the same
- window as the quiz at the top of the page.
- </p>
- <p>
- <b>Moodle navigation frame</b><br />
- The standard Moodle navigation bar will be displayed in a separate
- frame at the top of the quiz.
- </p>
- <p>
- <b>Embedded <IFRAME></b><br />
- The standard Moodle navigation bar will be displayed in the same
- window as the quiz and the quiz will be embedded in an <IFRAME>.
- </p>
- <p>
- <b>Hot Potatoes quiz buttons </b><br />
- The quiz will be displayed with the navigation buttons, if any,
- defined in the quiz.
- </p>
- <p>
- <b>A single "Give Up" button</b><br />
- The quiz will be displayed with a single "Give Up" button
- at the top of the page.
- </p>
- <p>
- <b>None</b><br />
- The quiz will be displayed with no navigation aids. i.e. neither
- a Moodle navigation bar nor any Hot Potatoes navigation buttons.
- When all questions on the current quiz have been answered correctly,
- Moodle will either return to the course page or display the next quiz,
- depending on the setting of the "Show next quiz?" field
- for the current quiz.
- </p>
+ <p>
+ <b>Moodle navigation bar</b><br />
+ The standard Moodle navigation bar will be displayed in the same
+ window as the quiz at the top of the page.
+ </p>
+ <p>
+ <b>Moodle navigation frame</b><br />
+ The standard Moodle navigation bar will be displayed in a separate
+ frame at the top of the quiz.
+ </p>
+ <p>
+ <b>Embedded <IFRAME></b><br />
+ The standard Moodle navigation bar will be displayed in the same
+ window as the quiz and the quiz will be embedded in an <IFRAME>.
+ </p>
+ <p>
+ <b>Hot Potatoes quiz buttons </b><br />
+ The quiz will be displayed with the navigation buttons, if any,
+ defined in the quiz.
+ </p>
+ <p>
+ <b>A single "Give Up" button</b><br />
+ The quiz will be displayed with a single "Give Up" button
+ at the top of the page.
+ </p>
+ <p>
+ <b>None</b><br />
+ The quiz will be displayed with no navigation aids. i.e. neither
+ a Moodle navigation bar nor any Hot Potatoes navigation buttons.
+ When all questions on the current quiz have been answered correctly,
+ Moodle will either return to the course page or display the next quiz,
+ depending on the setting of the "Show next quiz?" field
+ for the current quiz.
+ </p>
</div>
<p align="center"><b>Output Format</b></p>
<p>
- You can specify different formats to display the quiz
+ You can specify different formats to display the quiz
</p>
<div class="indent">
- <p>
- <b>best</b><br />
- The quiz will be displayed in the best format for the browser.
- </p>
- <p>
- <b>v6+</b><br />
- The quiz will be displayed in a drag and drop format for v6+ browsers
- </p>
- <p>
- <b>v6</b><br />
- The quiz will be displayed in format for v6 browsers
- </p>
- <p>
- <b>v5</b></b><br />
- The quiz will be displayed in a format for v5 browsers
- </p>
- <p>
- <b>v4</b><br />
- The quiz will be displayed in a format for v4 browsers
- </p>
- <p>
- <b>v3</b><br />
- The quiz will be displayed in a format for v3 browsers
- </p>
- <p>
- <b>Flash</b><br />
- The quiz will be displayed in using Flash
- </p>
- <p>
- <b>mobile</b><br />
- The quiz will be displayed in a format suitable for viewing on
- small mobile devices such as cell phones
- </p>
+ <p>
+ <b>best</b><br />
+ The quiz will be displayed in the best format for the browser.
+ </p>
+ <p>
+ <b>v6+</b><br />
+ The quiz will be displayed in a drag and drop format for v6+ browsers
+ </p>
+ <p>
+ <b>v6</b><br />
+ The quiz will be displayed in format for v6 browsers
+ </p>
+ <p>
+ <b>v5</b></b><br />
+ The quiz will be displayed in a format for v5 browsers
+ </p>
+ <p>
+ <b>v4</b><br />
+ The quiz will be displayed in a format for v4 browsers
+ </p>
+ <p>
+ <b>v3</b><br />
+ The quiz will be displayed in a format for v3 browsers
+ </p>
+ <p>
+ <b>Flash</b><br />
+ The quiz will be displayed in using Flash
+ </p>
+ <p>
+ <b>mobile</b><br />
+ The quiz will be displayed in a format suitable for viewing on
+ small mobile devices such as cell phones
+ </p>
</div>
<p><b>Selecting the type of report</b></p>
<div class="indent">
- <p>
- <b>Overview</b><br />
- This report is a list of attempts at this quiz.
- "abandoned" attempts are included,
- but "in progress" attempts are not shown.
-
- It shows the picture and name of each user, along with their
- grade for the quiz and the score, time and duration of each attempt.
-
- Attempts may be selected and then deleted if required.
- </p>
- <p>
- <b>Simple statistics</b></br />
- This report is a list of all completed attempts at this quiz.
-
- Attempts marked as "abandoned" or
- "in progress" are not included.
-
- It shows the picture and name of each user, along with their
- grade for the quiz, and the score of each question in each attempt.
-
- It also gives the average scores of the individual
- questions and the quiz as a whole.
- </p>
- <p>
- <b>Detailed statistics</b><br />
- This report shows full details of all completed attempts at this quiz,
-
- Attempts marked as "abandoned" or
- "in progress" are not included.
-
- The report contains the following tables:
- </p>
- <ul>
- <li>the <a href="help.php?module=hotpot&file=responsestable.html">responses table</a>,
- which shows how each user responded to each question in each of their attempts at the quiz.</li>
-
- <li>the <a href="help.php?module=hotpot&file=analysistable.html">item analysis table</a>,
- which lists the responses to each question and the frequency of each response.</li>
- </ul>
- <p>
- <b>Click trail report</b><br />
- This report shows details of every click by every student during completed attempts
- at the Hot Potatoes quiz.
-
- The report can be very large and is intended to be downloaded and viewed in a spreadsheet
- program, such as Microsoft Excel.
-
- Details of the columns in this report are available in the
- <a href="help.php?module=hotpot&file=clickreporttable.html">click trail table</a>
- help file.
- </p>
+ <p>
+ <b>Overview</b><br />
+ This report is a list of attempts at this quiz.
+ "abandoned" attempts are included,
+ but "in progress" attempts are not shown.
+
+ It shows the picture and name of each user, along with their
+ grade for the quiz and the score, time and duration of each attempt.
+
+ Attempts may be selected and then deleted if required.
+ </p>
+ <p>
+ <b>Simple statistics</b></br />
+ This report is a list of all completed attempts at this quiz.
+
+ Attempts marked as "abandoned" or
+ "in progress" are not included.
+
+ It shows the picture and name of each user, along with their
+ grade for the quiz, and the score of each question in each attempt.
+
+ It also gives the average scores of the individual
+ questions and the quiz as a whole.
+ </p>
+ <p>
+ <b>Detailed statistics</b><br />
+ This report shows full details of all completed attempts at this quiz,
+
+ Attempts marked as "abandoned" or
+ "in progress" are not included.
+
+ The report contains the following tables:
+ </p>
+ <ul>
+ <li>the <a href="help.php?module=hotpot&file=responsestable.html">responses table</a>,
+ which shows how each user responded to each question in each of their attempts at the quiz.</li>
+
+ <li>the <a href="help.php?module=hotpot&file=analysistable.html">item analysis table</a>,
+ which lists the responses to each question and the frequency of each response.</li>
+ </ul>
+ <p>
+ <b>Click trail report</b><br />
+ This report shows details of every click by every student during completed attempts
+ at the Hot Potatoes quiz.
+
+ The report can be very large and is intended to be downloaded and viewed in a spreadsheet
+ program, such as Microsoft Excel.
+
+ Details of the columns in this report are available in the
+ <a href="help.php?module=hotpot&file=clickreporttable.html">click trail table</a>
+ help file.
+ </p>
</div>
<p><b>Selecting a course</b></p>
<div class="indent">
- <p>
- <b>This course</b><br />
- The report will show responses by participants in the current course
- </p>
- <p>
- <b>All my courses</b><br />
- The report will show responses by participants for all courses which
- use this quiz and in which you are a teacher.
-
- To be used in several courses, the quiz must be located in the Site
- files directory.
-
- <b><i>This option is only available to site administrators.</i></b>
- </p>
+ <p>
+ <b>This course</b><br />
+ The report will show responses by participants in the current course
+ </p>
+ <p>
+ <b>All my courses</b><br />
+ The report will show responses by participants for all courses which
+ use this quiz and in which you are a teacher.
+
+ To be used in several courses, the quiz must be located in the Site
+ files directory.
+
+ <b><i>This option is only available to site administrators.</i></b>
+ </p>
</div>
<p><b>Selecting users</b></p>
<div class="indent">
- <p>
- <b>All participants</b><br />
- The report will show responses by students, teachers, course creators and administrators.
- Responses by the "guest" user, if any, will also be included.
- </p>
- <p>
- <b>Students</b><br />
- The report will show responses by students taking this course.
- Teacher's responses will not be included in the report
- </p>
- <p>
- <b>Single student</b><br />
- The report will show responses by a single student selected from a drop-down list
- of students' names
- </p>
+ <p>
+ <b>All participants</b><br />
+ The report will show responses by students, teachers, course creators and administrators.
+ Responses by the "guest" user, if any, will also be included.
+ </p>
+ <p>
+ <b>Students</b><br />
+ The report will show responses by students taking this course.
+ Teacher's responses will not be included in the report
+ </p>
+ <p>
+ <b>Single student</b><br />
+ The report will show responses by a single student selected from a drop-down list
+ of students' names
+ </p>
</div>
<p><b>Selecting grades</b></p>
<div class="indent">
- <p>
- <b>All attempts</b><br />
- The report will include the responses from all the attempts by each user
- </p>
- <p>
- <b>Best attempt</b><br />
- The report will only include the responses from the highest scoring attempt by each user
- </p>
- <p>
- <b>First attempt</b><br />
- The report will only include the responses from the first attempt by each user
- </p>
- <p>
- <b>Last attempt</b><br />
- The report will only include the responses from the most recent attempt by each user
- </p>
+ <p>
+ <b>All attempts</b><br />
+ The report will include the responses from all the attempts by each user
+ </p>
+ <p>
+ <b>Best attempt</b><br />
+ The report will only include the responses from the highest scoring attempt by each user
+ </p>
+ <p>
+ <b>First attempt</b><br />
+ The report will only include the responses from the first attempt by each user
+ </p>
+ <p>
+ <b>Last attempt</b><br />
+ The report will only include the responses from the most recent attempt by each user
+ </p>
</div>
<p align="center"><b>Report Format</b></p>
<p>
- You can specify different output formats for the Hot Potatoes reports.
+ You can specify different output formats for the Hot Potatoes reports.
</p>
<p><b>Report Format</b></p>
<div class="indent">
- <p>
- <b>HTML</b><br />
- the report will be generated in HTML format suitable for displaying in a web browser
- </p>
- <p>
- <b>Excel</b><br />
- the report will be generated as an ".xls" file which can be opened by
- a spreadsheet program, such as Microsoft Excel
- </p>
- <p>
- <b>Text</b><br />
- the report will be generated a text file which can be opened by a text editor
- </p>
+ <p>
+ <b>HTML</b><br />
+ the report will be generated in HTML format suitable for displaying in a web browser
+ </p>
+ <p>
+ <b>Excel</b><br />
+ the report will be generated as an ".xls" file which can be opened by
+ a spreadsheet program, such as Microsoft Excel
+ </p>
+ <p>
+ <b>Text</b><br />
+ the report will be generated a text file which can be opened by a text editor
+ </p>
</div>
<p><b>Encoding</b></p>
<div class="indent">
- <p>
- A list of encodings may be offered which allows you to force the report values
- into a specific encoding if your spreadsheet program requires it.
+ <p>
+ A list of encodings may be offered which allows you to force the report values
+ into a specific encoding if your spreadsheet program requires it.
- For example, Microsoft Excel requires the "SJIS" encoding for Japanese.
+ For example, Microsoft Excel requires the "SJIS" encoding for Japanese.
- The list of possible encodings can be adjusted by the site administrator on the
- "Settings" page for the HotPot module
- </p>
+ The list of possible encodings can be adjusted by the site administrator on the
+ "Settings" page for the HotPot module
+ </p>
</div>
<p><b>Wrap data</b></p>
<div class="indent">
- <p>
- <b>Yes</b><br />
- long data values will be wrapped to fit into table cells.
- This may make some rows very tall
- </p>
- <p>
- <b>No</b><br />
- data values will not be wrapped
- </p>
+ <p>
+ <b>Yes</b><br />
+ long data values will be wrapped to fit into table cells.
+ This may make some rows very tall
+ </p>
+ <p>
+ <b>No</b><br />
+ data values will not be wrapped
+ </p>
</div>
<p><b>Show legend</b></p>
<div class="indent">
- <p>
- <b>Yes</b><br />
- in the main report, questions and answers will be represented by letters.
- A legend will be generated which shows which letters represent which questions or answers
- </p>
- <p>
- <b>No</b><br />
- questions and answers will appear in full in the report and no legend will be generated
- </p>
+ <p>
+ <b>Yes</b><br />
+ in the main report, questions and answers will be represented by letters.
+ A legend will be generated which shows which letters represent which questions or answers
+ </p>
+ <p>
+ <b>No</b><br />
+ questions and answers will appear in full in the report and no legend will be generated
+ </p>
</div>
<p align="center"><b>Individual Responses</b></p>
<p>
- This table shows how each user responded to each
- question in each of their attempts at the quiz.
+ This table shows how each user responded to each
+ question in each of their attempts at the quiz.
</p>
<p>
- The responses are color-coded as follows:
- <ul>
- <li><font color="red"><b>Correct answers</b></font></li>
- <li><font color="brown"><b>Ignored answers</b></font> (if any)</li>
- <li><font color="blue"><b>Wrong answers</b></font> (if any)</li>
- <li><font color="green"><b>score% (hints,clues,checks)</b></font>
- <ul>
- <li><b>score</b> is the percentage score for this question</li>
- <li><b>hints</b> is the number hints requested</li>
- <li><b>clues</b> indicates whether the clue was shown (=1) or not (=0)</li>
- <li><b>checks</b> is the number checks performed on this question.
- A value of "-1" means that the student clicked the "Show answer" button</li>
- </ul>
- </li>
- </ul>
+ The responses are color-coded as follows:
+ <ul>
+ <li><font color="red"><b>Correct answers</b></font></li>
+ <li><font color="brown"><b>Ignored answers</b></font> (if any)</li>
+ <li><font color="blue"><b>Wrong answers</b></font> (if any)</li>
+ <li><font color="green"><b>score% (hints,clues,checks)</b></font>
+ <ul>
+ <li><b>score</b> is the percentage score for this question</li>
+ <li><b>hints</b> is the number hints requested</li>
+ <li><b>clues</b> indicates whether the clue was shown (=1) or not (=0)</li>
+ <li><b>checks</b> is the number checks performed on this question.
+ A value of "-1" means that the student clicked the "Show answer" button</li>
+ </ul>
+ </li>
+ </ul>
</p>
<p align="center"><b>Show next quiz</b></p>
<div class="indent">
- <p>
- <b>No</b><br />
- When the Hot Potatoes quiz is finished, Moodle will
- record the results and return to the main page for the
- current course
- </p>
- <p>
- <b>Yes</b><br />
- When the Hot Potatoes quiz is finished, Moodle will
- record the results and then display the next Hot Potatoes
- quiz in the current section. If there is no such quiz,
- Moodle will return to the main page for the current course
- </p>
+ <p>
+ <b>No</b><br />
+ When the Hot Potatoes quiz is finished, Moodle will
+ record the results and return to the main page for the
+ current course
+ </p>
+ <p>
+ <b>Yes</b><br />
+ When the Hot Potatoes quiz is finished, Moodle will
+ record the results and then display the next Hot Potatoes
+ quiz in the current section. If there is no such quiz,
+ Moodle will return to the main page for the current course
+ </p>
</div>
<p align="center"><b>Student feedback</b></p>
<p>
- If this option is enabled, a link to a popup feedback window will be displayed
- whenever the student clicks on the "Check" button. The feedback window
- allows students to send feedback to the teacher regarding the quiz.
+ If this option is enabled, a link to a popup feedback window will be displayed
+ whenever the student clicks on the "Check" button. The feedback window
+ allows students to send feedback to the teacher regarding the quiz.
<p>
</p>
- This option can have the following settings:
+ This option can have the following settings:
</p>
<div class="indent">
- <p>
- <b>None</b><br />
- no feedback window will be displayed
- </p>
- <p>
- <b>Web page</b><br />
- a web page will be displayed in the feedback window.
- You will need to enter the URL of the web page, for example:
- <tt>http://myserver.com/feedbackform.html</tt>
- </p>
- <p>
- <b>Feedback form</b><br />
- a form suitable for sending to a standard form-to-email script,
- such as formmail.pl, will be displayed in the feedback window.
- You should also enter the URL of the form script, for example:
- <tt>http://myserver.com/cgi-bin/formmail.pl</tt>
- </p>
- <p>
- <b>Moodle forum</b><br />
- the forum index for this Moodle course will be displayed
- </p>
- <p>
- <b>Moodle messaging</b><br />
- the Moodle instant messaging window will be displayed.
- If the course has several teachers, the student will be
- prompted to select a teacher before the messaging page appears.
- </p>
+ <p>
+ <b>None</b><br />
+ no feedback window will be displayed
+ </p>
+ <p>
+ <b>Web page</b><br />
+ a web page will be displayed in the feedback window.
+ You will need to enter the URL of the web page, for example:
+ <tt>http://myserver.com/feedbackform.html</tt>
+ </p>
+ <p>
+ <b>Feedback form</b><br />
+ a form suitable for sending to a standard form-to-email script,
+ such as formmail.pl, will be displayed in the feedback window.
+ You should also enter the URL of the form script, for example:
+ <tt>http://myserver.com/cgi-bin/formmail.pl</tt>
+ </p>
+ <p>
+ <b>Moodle forum</b><br />
+ the forum index for this Moodle course will be displayed
+ </p>
+ <p>
+ <b>Moodle messaging</b><br />
+ the Moodle instant messaging window will be displayed.
+ If the course has several teachers, the student will be
+ prompted to select a teacher before the messaging page appears.
+ </p>
</div>
<p align="center"><b>Update next quiz</b></p>
<div class="indent">
- <p>
- <b>No</b><br />
- Only the current quiz will be updated
- </p>
- <p>
- <b>Yes</b><br />
- If this quiz is part of a chain of Hot Potatoes quizzes, then all quizzes
- in the chain will be assigned identical settings to the current quiz.
- </p>
+ <p>
+ <b>No</b><br />
+ Only the current quiz will be updated
+ </p>
+ <p>
+ <b>Yes</b><br />
+ If this quiz is part of a chain of Hot Potatoes quizzes, then all quizzes
+ in the chain will be assigned identical settings to the current quiz.
+ </p>
</div>
<p align="center"><b>The Grade of the Lesson</b></p>
-<p>This value determines the maximum grade which can be awarded in the lesson.
+<p>This value determines the maximum grade which can be awarded in the lesson.
The range is 0 to 100%. This value can be changed at any time during the
lesson. Any change has an immediate effect in the Grades page and on the
grades shown to the students in various lists. If the grade is set to 0
<p align="center"><b>The Jump-to Link</b></p>
<p>Each Answer (for questions) or Description (for Branch pages) has a Jump-to link.
- When this answer is chosen, the answer's response
+ When this answer is chosen, the answer's response
is shown to the student. After that the student sees the page given in the Jump-to
link. This link can be either relative or absolute. Relative links are <b>This
page</b> and <b>Next page</b>. <b>This page</b> means that the student sees the
<p>Special Jumps</p>
<p>Unseen Question within a Branch</p>
<p>This will link to a randomly chosen unseen (by the student in this attempt) question
- between this branch table and the End of the Lesson or the next End of Branch.</p>
+ between this branch table and the End of the Lesson or the next End of Branch.</p>
<p>Random Question within a Branch</p>
<p>This will link to a randomly chosen question between the current branch table and
- the End of Lesson or the next End of Branch. If the student has already seen the
- question and attempts are greater than 1, they will get another chance to earn the
- point(s) for that question. If attempts are set to 1, the question will be skipped
- and another random question shown.</p>
+ the End of Lesson or the next End of Branch. If the student has already seen the
+ question and attempts are greater than 1, they will get another chance to earn the
+ point(s) for that question. If attempts are set to 1, the question will be skipped
+ and another random question shown.</p>
<p>Random Branch Table</p>
<p>This will jump to a random Branch Table between the current Branch Table and the End
- of Lesson or the next End of Branch.</p>
+ of Lesson or the next End of Branch.</p>
this page, next page - or absolute - specifying any one of the pages in the
lesson or the end of the lesson.</li>
<li>By default, the first answer jumps to the <b>next page</b> in the lesson. The subsequent
- answers jump to the same page. That is, the student is shown the same page of the
- lesson again if they do not chose the first answer. If you have already created a
- cluster with an end of cluster, and the question is within it, you can also choose
- to jump to an Unseen Question within the cluster. This option will not be shown if
- you are not in a cluster. You can surround a set of questions with cluster and end
- of cluster at any time.</li>
+ answers jump to the same page. That is, the student is shown the same page of the
+ lesson again if they do not chose the first answer. If you have already created a
+ cluster with an end of cluster, and the question is within it, you can also choose
+ to jump to an Unseen Question within the cluster. This option will not be shown if
+ you are not in a cluster. You can surround a set of questions with cluster and end
+ of cluster at any time.</li>
<li>The next page is determined by the lesson's <b>logical order</b>. This is
the order of the pages as seen by the teacher. This order can be altered
by moving pages within the lesson.</li>
further <i>up</i> the logical order than the current page. Thus, if the jumps are
<i>not</i> changed, the first answer is a correct answer and the other answers are
wrong answers.
- <br /><br />
- If custom scoring is on: grading of an answer is determined by the point value
- of the answer, the total points earned serves as a fraction of the total point value
- of the lesson, up to 100%.</li>
+ <br /><br />
+ If custom scoring is on: grading of an answer is determined by the point value
+ of the answer, the total points earned serves as a fraction of the total point value
+ of the lesson, up to 100%.</li>
<li>Questions can have more than one correct answer. For example, if two of the answers
jump to the next page then either answer is taken as a correct answer. (Although
the same destination page is shown to the students, the responses shown on the way
in the logical ordering sense) to simply continue to the end of the lesson,
that is, it is <i>not</i> terminated by an End of Branch page.</li>
<li>With custom scoring off, when a lesson includes one or more branch tables it is
- advisable to set the "Minimum number of Questions" parameter to some reasonable
- value. This sets a lower limit on the number of pages seen when the grade is
- calculated. Without this parameter a student might visit a single branch in the
- lesson, answer all its questions correctly and leave the lesson with the maximum
- grade.
- <br /><br />
- With custom scoring on, a student is graded based on the number of points they have
- earned as a percentage of the total points for the lesson.</li>
+ advisable to set the "Minimum number of Questions" parameter to some reasonable
+ value. This sets a lower limit on the number of pages seen when the grade is
+ calculated. Without this parameter a student might visit a single branch in the
+ lesson, answer all its questions correctly and leave the lesson with the maximum
+ grade.
+ <br /><br />
+ With custom scoring on, a student is graded based on the number of points they have
+ earned as a percentage of the total points for the lesson.</li>
<li>Further, with custom scoring off, when a branch table is present a student has
- the opportunity of re-visiting the same branch more than once. However, the grade is
- calculated using the number of <i>unique</i> questions answered. So repeatedly answering
- the same set of questions does <i>not</i> increase the grade. (In fact, the reverse is
- true, it lowers the grade as the count of the number of pages seen is used in the
- denominator when calculating grades does include repeats.) In order to give students
- a fair idea of their progress in the lesson, they are shown details of how many
- questions they are answered correctly, number of pages seen, and their current grade
- on every branch table page.
- <br /> <br />
- With custom scoring on, a student may revisit a question if the navigation path
- allows it, and re-earn the point(s) for that question, if attempts is greater than
- 1. To prevent this, set attempts to 1.</li>
+ the opportunity of re-visiting the same branch more than once. However, the grade is
+ calculated using the number of <i>unique</i> questions answered. So repeatedly answering
+ the same set of questions does <i>not</i> increase the grade. (In fact, the reverse is
+ true, it lowers the grade as the count of the number of pages seen is used in the
+ denominator when calculating grades does include repeats.) In order to give students
+ a fair idea of their progress in the lesson, they are shown details of how many
+ questions they are answered correctly, number of pages seen, and their current grade
+ on every branch table page.
+ <br /> <br />
+ With custom scoring on, a student may revisit a question if the navigation path
+ allows it, and re-earn the point(s) for that question, if attempts is greater than
+ 1. To prevent this, set attempts to 1.</li>
<li>The <b>end of the lesson</b> is reached by either jumping to that location explicitly
- or by jumping to the next page from the last (logical) page of the lesson. With
- custom scoring off, when the end of the lesson is reached, the student receives a
- congratulations message and is shown their grade. The grade is (the number of
- questions correctly answered / number of pages seen) * the grade of the lesson.
- With custom scoring on, the grade is the points earned as a % of the total points
- (e.g. 3 points earned for a 3 point lesson = 100% of 3 points).</li>
+ or by jumping to the next page from the last (logical) page of the lesson. With
+ custom scoring off, when the end of the lesson is reached, the student receives a
+ congratulations message and is shown their grade. The grade is (the number of
+ questions correctly answered / number of pages seen) * the grade of the lesson.
+ With custom scoring on, the grade is the points earned as a % of the total points
+ (e.g. 3 points earned for a 3 point lesson = 100% of 3 points).</li>
<li>If the end of the lesson is <i>not</i> reached and the student just leaves,
when the student goes into the lesson again they are given the choice of
starting at the beginning or picking up the lesson where they answered their
<p>The results of a SCORM/AICC Package activity shown in Grades pages can be rated in several modes:
<ul>
- <li><b>Learning Objects</b><br />This mode shows the number of completed/passed Learning Objects for the activity. The max value is the number of Package's Learning Objects .</li>
- <li><b>Highest grade</b><br />The grade page will display the highest score obtained by users in all passed Learning Objects.</li>
- <li><b>Average grade</b><br />If you choose this mode Moodle will calculate the average of all scores.</li>
- <li><b>Sum grade</b><br />With this mode all the scores will be added.</li>
+ <li><b>Learning Objects</b><br />This mode shows the number of completed/passed Learning Objects for the activity. The max value is the number of Package's Learning Objects .</li>
+ <li><b>Highest grade</b><br />The grade page will display the highest score obtained by users in all passed Learning Objects.</li>
+ <li><b>Average grade</b><br />If you choose this mode Moodle will calculate the average of all scores.</li>
+ <li><b>Sum grade</b><br />With this mode all the scores will be added.</li>
</p>
<p>An <b>AICC</b> package is defined by several files (from 4 to 7) with defined extensions.
Here you find the extensions meaning:</p>
<ul>
- <li>CRS - Course Description file (mandatory)</li>
- <li>AU - Assignable Unit file (mandatory)</li>
- <li>DES - Descriptor file (mandatory)</li>
- <li>CST - Course Structure file (mandatory)</li>
- <li>ORE - Objective Relationship file (optional)</li>
- <li>PRE - Prerequisites file (optional)</li>
- <li>CMP - Completition Requirements file (optional)</li>
+ <li>CRS - Course Description file (mandatory)</li>
+ <li>AU - Assignable Unit file (mandatory)</li>
+ <li>DES - Descriptor file (mandatory)</li>
+ <li>CST - Course Structure file (mandatory)</li>
+ <li>ORE - Objective Relationship file (optional)</li>
+ <li>PRE - Prerequisites file (optional)</li>
+ <li>CMP - Completition Requirements file (optional)</li>
</ul>
<ol>
<li>In the submission and assessment phase the students see the
- assessments made by other students. There is no feedback
- from the students who submitted the work to the students who made
- the assessment. That is, there is only one way feedback between
+ assessments made by other students. There is no feedback
+ from the students who submitted the work to the students who made
+ the assessment. That is, there is only one way feedback between
peers on any one piece of work.</li>
-
+
<li>In the submission and assessment phase the students see the
- assessments made by other students and they are allowed to comment
- on these assessments. They may agree or disagree with the (peer) assessment.
- If they agree with the assessment then the assessment stands and is
- used in the final calculations when determining the peer grade given to
- the particular piece of work. If, however, they do not agree with an
- assessment the student who made the assessment is given an
- opportunity to revise it. The revise/disagree loop can continue until
- either agreement is reached or the deadline is reached. An assessment
- which is still in "dispute" when the deadline is reached
- is not used in the final grades. This gives two way feedback
- between peers on each piece of work.</li>
+ assessments made by other students and they are allowed to comment
+ on these assessments. They may agree or disagree with the (peer) assessment.
+ If they agree with the assessment then the assessment stands and is
+ used in the final calculations when determining the peer grade given to
+ the particular piece of work. If, however, they do not agree with an
+ assessment the student who made the assessment is given an
+ opportunity to revise it. The revise/disagree loop can continue until
+ either agreement is reached or the deadline is reached. An assessment
+ which is still in "dispute" when the deadline is reached
+ is not used in the final grades. This gives two way feedback
+ between peers on each piece of work.</li>
</ol>
<p>If the second method of working is chosen there is the option of switching off the display
- of grades. That is, if this "hide grades" option is exercised, only the comments
- in the assessment are shown to the student who work is being assessed.
- The grades are shown only after agreement has been reached (on the
- comments alone). Note that this option only effective when agreement on
- assessments is required.
+ of grades. That is, if this "hide grades" option is exercised, only the comments
+ in the assessment are shown to the student who work is being assessed.
+ The grades are shown only after agreement has been reached (on the
+ comments alone). Note that this option only effective when agreement on
+ assessments is required.
</p>
<p align="center"><b>Hide Names from Students</b></p>
<p>A peer graded assignment can be graded anonymously. In this
- case the names (and any photos) of the students doing the grading
- are not shown. Only the (file) names of the submissions are used to identify
- the pieces of work being graded. </p>
+ case the names (and any photos) of the students doing the grading
+ are not shown. Only the (file) names of the submissions are used to identify
+ the pieces of work being graded. </p>
<p>When the peer graded assignment is not graded anonymously, the
- pieces of work are shown with the names (and any photos) of the
- students who submitted the work. This may lead to bias in the gradings.</p>
+ pieces of work are shown with the names (and any photos) of the
+ students who submitted the work. This may lead to bias in the gradings.</p>
<p>Note that if the teacher's grades are shown to the students these are
- never shown anonymously.
+ never shown anonymously.
</p>
<p align="center"><b>Assessment of Teacher's Examples</b></p>
<p>After the teacher has submitted the examples it is important that the
- teacher assess these examples.</p>
+ teacher assess these examples.</p>
<p>These assessments are private to the teacher, they are NOT shown
- to the students at any stage during the assignment. However, they are,
- used internally as reference assessments against which the student assessments
- are compared. The closer a student's assessment matches the teacher assessment
+ to the students at any stage during the assignment. However, they are,
+ used internally as reference assessments against which the student assessments
+ are compared. The closer a student's assessment matches the teacher assessment
the higher is their "Grading grade". The teacher has a degree of
control on how the agreement is translated into grades. This the
"Comparison of Assessments" option in the workshop. This option
<p align="center"><b>The Breakdown of the Final Grade</b></p>
<p>The table on this screen shows your final grade and how it was calculated.
- The final grade is made up from three possible components.</p>
-
+ The final grade is made up from three possible components.</p>
+
<ol>
<li>The teacher's grade for your submitted work.</li>
<li>The average of the peer grades for your submitted work. </li>
<li>A grade for your performance in the peer grading phase. This
- performance was based by (a) whether your grades were too high or too low
- when compared with the average grade of the other students (this is called bias),
- (b) whether your grades follow, again on average, the grades given by
- the other students (this is called reliability)
- and (c) on the quality of your comments on the other pieces of work you graded.
- This was graded by the teacher. These three performance grades were weighted
- by the factors 1:2:3 respectively to give an overall "grading"
- grade. In other words the teacher's grading of the comments is given the
- same weight as the Bias and Reliability factors combined.</li>
+ performance was based by (a) whether your grades were too high or too low
+ when compared with the average grade of the other students (this is called bias),
+ (b) whether your grades follow, again on average, the grades given by
+ the other students (this is called reliability)
+ and (c) on the quality of your comments on the other pieces of work you graded.
+ This was graded by the teacher. These three performance grades were weighted
+ by the factors 1:2:3 respectively to give an overall "grading"
+ grade. In other words the teacher's grading of the comments is given the
+ same weight as the Bias and Reliability factors combined.</li>
</ol>
<p>These three components can be weighted as deemed appropriate for the
- assignment. These weights are shown in the smaller table.
+ assignment. These weights are shown in the smaller table.
</p>
<p align="center"><b>Editing a Comment</b></p>
<p>As with other items there is a short period of time allowed when
- the text of comments can be amended. The comment is not shown
- on the assessment until this period has elapsed.
+ the text of comments can be amended. The comment is not shown
+ on the assessment until this period has elapsed.
</p>
<p>This value can be changed at any time and the effect on the grades seen by
the students (and the teacher) is immediate.</p>
-
+
<p align="center"><b>Including Self in the Assignment</b></p>
<p>A peer graded assignment can optionally include the student's own work
- in the set of pieces each student is asked to grade. This will mean that if, say, the
- number of peer assessors is 5, then each student will be asked to grade 6
- pieces of work, one of them being their own work.</p>
-
+ in the set of pieces each student is asked to grade. This will mean that if, say, the
+ number of peer assessors is 5, then each student will be asked to grade 6
+ pieces of work, one of them being their own work.</p>
+
<p>If the number of peer assessors is set to zero and the include self option
- is turned on then the assignment becomes a self-graded assignment. This
- may or may not include the teacher's grading depending on whether that
- option is set or not.
-
+ is turned on then the assignment becomes a self-graded assignment. This
+ may or may not include the teacher's grading depending on whether that
+ option is set or not.
+
</p>
<p align="center"><b>The League Table of Submissions</b></p>
<p>The League Table lists the best submissions produced in the assignment. The number
- of entries can set to zero, a number between 1 and 20, 50 or 100. If set to
- zero then the League Table is <b>not</b> displayed. If it is set to a number between
- 1 and 20, 50 or 100 then that number of submissions are shown, for example, setting
- the number to 10 shows the top ten submissions. </p>
-
+ of entries can set to zero, a number between 1 and 20, 50 or 100. If set to
+ zero then the League Table is <b>not</b> displayed. If it is set to a number between
+ 1 and 20, 50 or 100 then that number of submissions are shown, for example, setting
+ the number to 10 shows the top ten submissions. </p>
+
<p align="center"><b>Number of Assessments of Student submissions</b></p>
-<p>This number determines whether the students are asked to peer assess other
+<p>This number determines whether the students are asked to peer assess other
students' work. If it is not zero then each student is offered that number
of pieces of work from other students. After assessment the originator of
the work can view the comments and possibly the grade given by their peer.
- (The peer assessment process may be iterative depending on the setting of
- "Agree Assessments" option.)
+ (The peer assessment process may be iterative depending on the setting of
+ "Agree Assessments" option.)
</p>
<p align="center"><b>Number of Assessments of Teacher's Examples</b></p>
<p>This number determines whether the students are asked to assess
- any example pieces of work before submitting their own work. If it is
- non-zero then each student must assess that number of example pieces
- of work. They cannot submit their own work until these assessments
- have been made.
+ any example pieces of work before submitting their own work. If it is
+ non-zero then each student must assess that number of example pieces
+ of work. They cannot submit their own work until these assessments
+ have been made.
</p>
<p align="center"><b>Number of Comments, Elements, Bands, Criteria or Rubrics</b></p>
<p>The number entered here determines how many items will be used in
- the assessments. Depending on the type of grading strategy, this number
- gives the number of comments, assessments elements, bands, criteria or
- categories (sets) of criteria in a rubric. Typically an assignment will have
- something between 5 to 15 assessment items, the
- actual number depending on the size and complexity of the assignment. </p>
-
+ the assessments. Depending on the type of grading strategy, this number
+ gives the number of comments, assessments elements, bands, criteria or
+ categories (sets) of criteria in a rubric. Typically an assignment will have
+ something between 5 to 15 assessment items, the
+ actual number depending on the size and complexity of the assignment. </p>
+
<p>All assessments have a General Comments field. For a "No
- Grading" assignment the value given here determines the
- number of additional comment areas. It can be specified as zero and results
- in the assessment having only a single General Comments area.
-
+ Grading" assignment the value given here determines the
+ number of additional comment areas. It can be specified as zero and results
+ in the assessment having only a single General Comments area.
+
</p>
<p>By default, students cannot resubmit assignments, they are allowed only one submission.</p>
<p>If you turn this option on, then students will be allowed to submit more than one piece of work
- to this assignment. This may be useful if the teacher wants to encourage students to do better
- work by an iterative process.</p>
+ to this assignment. This may be useful if the teacher wants to encourage students to do better
+ work by an iterative process.</p>
<p>The assessment of submissions is allocated on the basis of the number of assessments a piece
- of work has had. Thus new submissions from a student are likely to be candidates for peer
- assessment. However, if a student resubmits a number of pieces of work in quick succession then
- they are all equally likely to be assessed. The assignment does NOT give priority to the newest
- submission.</p>
-
+ of work has had. Thus new submissions from a student are likely to be candidates for peer
+ assessment. However, if a student resubmits a number of pieces of work in quick succession then
+ they are all equally likely to be assessed. The assignment does NOT give priority to the newest
+ submission.</p>
+
<p>The student's final grade is based on their overall "grading grade"
- and the submission with the highest grade.
+ and the submission with the highest grade.
</p>
<p align="center"><b>Self Assessment</b></p>
<p>A workshop assignment can optionally include the student's own work
- in the set of pieces each student is asked to assess. This will mean that if, say, the
- number of student pieces of work each student has to assess is set at 5, then
- each student will be asked to assess 6 pieces of work, one of them being their own work.</p>
-
+ in the set of pieces each student is asked to assess. This will mean that if, say, the
+ number of student pieces of work each student has to assess is set at 5, then
+ each student will be asked to assess 6 pieces of work, one of them being their own work.</p>
+
<p>If the number of student pieces of work is set to zero and the self assessment option
- is turned on then the assignment becomes a self-graded assignment. </p>
\ No newline at end of file
+ is turned on then the assignment becomes a self-graded assignment. </p>
\ No newline at end of file
<p align="center"><b>Hide Grades before Agreement</b></p>
<p>This option can be used in a workshop assignment where there
- must be agreement between the students on each assessment.
- The default value is to show the student whose work is being
- assessed both the comments and the grades in the peer assessments. This
- may lead to more disputes than when the option is turned on and the
- assessments are shown without the grades. </p>
+ must be agreement between the students on each assessment.
+ The default value is to show the student whose work is being
+ assessed both the comments and the grades in the peer assessments. This
+ may lead to more disputes than when the option is turned on and the
+ assessments are shown without the grades. </p>
<p>If the option is taken to hide grades in the peer assessments the
- grades are revealed once agreement has been reached. This agreement
- will, of course, have been made only on the comments. If these comments
- do not reasonably match the grades then the student whose work is being
- assessed may well appeal to the teacher.
+ grades are revealed once agreement has been reached. This agreement
+ will, of course, have been made only on the comments. If these comments
+ do not reasonably match the grades then the student whose work is being
+ assessed may well appeal to the teacher.
</p>
<p align="center"><b>UnGraded Assessments (Teacher Submissions)</b></p>
<p><b>Assessments of Teacher Submissions</b> These are assessments of
- the example pieces of work which the assignment may require the students
- to make before they can submit their own work. These assessments should,
- in general, be graded by the teacher. The assessments will show whether the
- student understand the assignment and will provide possibly useful feedback
- to the teacher on whether any remedial action or fine tuning of the
- assignment is necessary. Further, if an assessment is graded the teacher's
- comments are made available to the student. These may provide valuable
- guidance to the student in the preparation of their own piece of work for
- the assignment. </p>
-
- <p>These assessments do not have to be graded. Leaving a student's
- assessment of the examples ungraded when NOT stop that student from
- submitting their own work. It is recommended, however, that all least a
- sample of the assessments are graded for the reasons mentioned above.</p>
-
+ the example pieces of work which the assignment may require the students
+ to make before they can submit their own work. These assessments should,
+ in general, be graded by the teacher. The assessments will show whether the
+ student understand the assignment and will provide possibly useful feedback
+ to the teacher on whether any remedial action or fine tuning of the
+ assignment is necessary. Further, if an assessment is graded the teacher's
+ comments are made available to the student. These may provide valuable
+ guidance to the student in the preparation of their own piece of work for
+ the assignment. </p>
+
+ <p>These assessments do not have to be graded. Leaving a student's
+ assessment of the examples ungraded when NOT stop that student from
+ submitting their own work. It is recommended, however, that all least a
+ sample of the assessments are graded for the reasons mentioned above.</p>
+
$string['questionnaireid'] = "Survey";
$string['notavail'] = "That questionnaire is not available yet. Try again later.";
$string['mustcomplete'] = "<b>You must complete this questionnaire <i>now</i> to record your results. "
- ."You will not be allowed to complete it at another time</b><br /><br />\n";
+ ."You will not be allowed to complete it at another time</b><br /><br />\n";
$string['alreadyfilled'] = "You have already filled out this questionnaire for us. Thank you.";
?>
\ No newline at end of file
function view() {
global $USER;
-
- $context = get_context_instance(CONTEXT_MODULE,$this->cm->id);
+
+ $context = get_context_instance(CONTEXT_MODULE,$this->cm->id);
require_capability('mod/assignment:view', $context);
- $submission = $this->get_submission();
+ $submission = $this->get_submission();
//Guest can not submit nor edit an assignment (bug: 4604)
if (!has_capability('mod/assignment:submit', $context)) {
notify(get_string('submissionsaved', 'assignment'));
}
- if (has_capability('mod/assignment:submit', $context)) {
- print_simple_box_start('center', '70%', '', '', 'generalbox', 'online');
- if ($editmode) {
- $this->view_edit_form($submission);
- } else {
- if ($submission) {
- echo format_text($submission->data1, $submission->data2);
- } else if (!has_capability('mod/assignment:submit', $context)) { //fix for #4604
- echo '<center>'. get_string('guestnosubmit', 'assignment').'</center>';
- } else if ($this->isopen()){ //fix for #4206
- echo '<center>'.get_string('emptysubmission', 'assignment').'</center>';
- }
- if ($editable) {
- print_single_button('view.php', array('id'=>$this->cm->id,'edit'=>'1'),
- get_string('editmysubmission', 'assignment'));
- }
- }
- print_simple_box_end();
-
- if ($editmode and $this->usehtmleditor) {
- use_html_editor(); // MUst be at the end of the page
- }
- }
+ if (has_capability('mod/assignment:submit', $context)) {
+ print_simple_box_start('center', '70%', '', '', 'generalbox', 'online');
+ if ($editmode) {
+ $this->view_edit_form($submission);
+ } else {
+ if ($submission) {
+ echo format_text($submission->data1, $submission->data2);
+ } else if (!has_capability('mod/assignment:submit', $context)) { //fix for #4604
+ echo '<center>'. get_string('guestnosubmit', 'assignment').'</center>';
+ } else if ($this->isopen()){ //fix for #4206
+ echo '<center>'.get_string('emptysubmission', 'assignment').'</center>';
+ }
+ if ($editable) {
+ print_single_button('view.php', array('id'=>$this->cm->id,'edit'=>'1'),
+ get_string('editmysubmission', 'assignment'));
+ }
+ }
+ print_simple_box_end();
+
+ if ($editmode and $this->usehtmleditor) {
+ use_html_editor(); // MUst be at the end of the page
+ }
+ }
$this->view_feedback();
print_simple_box($this->print_user_files($USER->id, true), 'center');
}
//from upload&review. check if there are responses from teacher
- if ($submission->data2 != NULL) {
+ if ($submission->data2 != NULL) {
print_heading(get_string('responsesfromteacher', 'assignment'));
$this->print_response_students(true);
}
upload_print_form_fragment(1,array('newfile'),false,null,0,$this->assignment->maxbytes,false);
//upload files
echo '<input type="submit" name="save" value="'.get_string('attachfile','assignment').'" />';
- echo "<p><b>".get_string('step2','assignment')."</b>".get_string('submitformarking','assignment')."</p>";
+ echo "<p><b>".get_string('step2','assignment')."</b>".get_string('submitformarking','assignment')."</p>";
//final submit
echo '<input type="submit" name="save" value="'.get_string('sendformarking','assignment').'" />';
echo "<p>".get_string('onceassignmentsent','assignment')."</p>";
$userid = required_param('userid');
echo '<center>';
- echo get_string('choosereviewfile','assignment').'<br>';
+ echo get_string('choosereviewfile','assignment').'<br>';
echo '<form enctype="multipart/form-data" method="post" '.
"action=\"$CFG->wwwroot/mod/assignment/upload.php\">";
}
$newsubmission = $this->get_submission($feedback->userid, true); // Get or make one
- $newsubmission->grade = $feedback->grade;
+ $newsubmission->grade = $feedback->grade;
$newsubmission->comment = $feedback->comment;
$newsubmission->format = $feedback->format;
$newsubmission->teacher = $USER->id;
$ffurl = "$CFG->wwwroot/file.php?file=/$filearea/$file";
}
if (has_capability('mod/assignment:grade', get_context_instance(CONTEXT_MODULE, $this->course->id))) {
- $output .= '<img align="middle" src="'.$CFG->pixpath.'/f/'.$icon.'" height="16" width="16" alt="'.$icon.'" />'.
- '<a href="'.$ffurl.'" >'.$file.'</a> ['.$filesize.'] <br />';
- } else {
- if (!empty($USER->id)) {
- if ($submission = $this->get_submission($USER->id)) {
+ $output .= '<img align="middle" src="'.$CFG->pixpath.'/f/'.$icon.'" height="16" width="16" alt="'.$icon.'" />'.
+ '<a href="'.$ffurl.'" >'.$file.'</a> ['.$filesize.'] <br />';
+ } else {
+ if (!empty($USER->id)) {
+ if ($submission = $this->get_submission($USER->id)) {
//i have changed timemodified=0 for Draft assignments, thats' why we remove this condition
//otherwise student's dont' se etheir own submissions
-// if ($submission->timemodified) {
- if ($submission->timemodified <= $this->assignment->timedue || empty($this->assignment->timedue)) {
+// if ($submission->timemodified) {
+ if ($submission->timemodified <= $this->assignment->timedue || empty($this->assignment->timedue)) {
//remove link shouldn't be displayed if file was marked or submited for marking
$remove_link = '';
- if ($submission->data1 == get_string("submissionstatusdraft", "assignment") || $submission->data1 == get_string("submissionstatusreturned", "assignment")) {
+ if ($submission->data1 == get_string("submissionstatusdraft", "assignment") || $submission->data1 == get_string("submissionstatusreturned", "assignment")) {
$course_mod_id=$this->cm->id;
$deleteurl="$CFG->wwwroot/mod/assignment/type/upload/deleteonesubmission.php?confirm=0&view=student&userid=$userid&id=$course_mod_id&name=$file&file=".$basedir."/".$file;
$remove_link= '[<a href="'.$deleteurl.'">'.get_string("removelink", "assignment").'</a>]'; //students of the course
}
- $output .= '<img align="middle" src="'.$CFG->pixpath.'/f/'.$icon.'" height="16" width="16" alt="'.$icon.'" />'.$file.' ['.$filesize.']'.$remove_link.'<br />';
- } else {
- $output .= '';
+ $output .= '<img align="middle" src="'.$CFG->pixpath.'/f/'.$icon.'" height="16" width="16" alt="'.$icon.'" />'.$file.' ['.$filesize.']'.$remove_link.'<br />';
+ } else {
+ $output .= '';
}
- }
+ }
}
- }
+ }
}
}
}
if ($currentgroup) {
$users = get_group_users($currentgroup);
} else {
- $users = get_course_users($course->id);
+ $users = get_course_users($course->id);
}
if (!$teacherattempts) {
- $teachers = get_course_teachers($course->id);
+ $teachers = get_course_teachers($course->id);
if (!empty($teachers)) {
$keys = array_keys($teachers);
}
}
} else if ($CFG->fullnamedisplay == 'textuid') {
if ( $override ) {
- return get_string('fullnamedisplay', '', $user) . $user_id;
+ return get_string('fullnamedisplay', '', $user) . $user_id;
} else if (isset($user->username)) {
- return $user->username . $user_id;
+ return $user->username . $user_id;
} else {
- return $user->firstname . $user_id;
+ return $user->firstname . $user_id;
}
}
}
function view() {
-
+
global $USER;
-
- $context = get_context_instance(CONTEXT_MODULE,$this->cm->id);
+
+ $context = get_context_instance(CONTEXT_MODULE,$this->cm->id);
require_capability('mod/assignment:view', $context);
add_to_log($this->course->id, "assignment", "view", "view.php?id={$this->cm->id}", $this->assignment->id, $this->cm->id);
}
$str = '<div title="'.$this->field->description.'">';
- $str .= '<table><tr><td align="right">';
- $str .= '<label for="field_'.$this->field->id.'_0">' . get_string('latitude', 'data') . '</label>:</td><td><input type="text" name="field_'.$this->field->id.'_0" id="field_'.$this->field->id.'_0" value="'.$lat.'" size="10" />°N</td></tr>';
- $str .= '<tr><td align="right"><label for="field_'.$this->field->id.'_1">' . get_string('longitude', 'data') . '</label>:</td><td><input type="text" name="field_'.$this->field->id.'_1" id="field_'.$this->field->id.'_1" value="'.$long.'" size="10" />°E</td></tr>';
- $str .= '</table>';
+ $str .= '<table><tr><td align="right">';
+ $str .= '<label for="field_'.$this->field->id.'_0">' . get_string('latitude', 'data') . '</label>:</td><td><input type="text" name="field_'.$this->field->id.'_0" id="field_'.$this->field->id.'_0" value="'.$lat.'" size="10" />°N</td></tr>';
+ $str .= '<tr><td align="right"><label for="field_'.$this->field->id.'_1">' . get_string('longitude', 'data') . '</label>:</td><td><input type="text" name="field_'.$this->field->id.'_1" id="field_'.$this->field->id.'_1" value="'.$long.'" size="10" />°E</td></tr>';
+ $str .= '</table>';
$str .= '</div>';
return $str;
return '';
}
- if($lat < 0) {
- $compasslat = "" . sprintf('%01.4f', 0 - $lat) . '°S';
- } else {
- $compasslat = "" . sprintf('%01.4f', $lat) . "°N";
- }
- if($long < 0) {
- $compasslong = "" . sprintf('%01.4f', 0 - $long) . '°W';
- } else {
- $compasslong = "" . sprintf('%01.4f', $long) . "°E";
- }
-
+ if($lat < 0) {
+ $compasslat = "" . sprintf('%01.4f', 0 - $lat) . '°S';
+ } else {
+ $compasslat = "" . sprintf('%01.4f', $lat) . "°N";
+ }
+ if($long < 0) {
+ $compasslong = "" . sprintf('%01.4f', 0 - $long) . '°W';
+ } else {
+ $compasslong = "" . sprintf('%01.4f', $long) . "°E";
+ }
+
$str = '<form style="display:inline;">';
$str.= "$compasslat, $compasslong";
. str_replace(array_keys($urlreplacements), array_values($urlreplacements), $this->linkoutservices[$servicesshown[0]])
."'>$servicesshown[0]</a> ";
} elseif (sizeof($servicesshown)>1) {
- $str .= "\n<select name='jumpto'>";
-
- foreach($servicesshown as $servicename){
- // Add a link to a service
- $str .= "\n <option value='"
- . str_replace(array_keys($urlreplacements), array_values($urlreplacements), $this->linkoutservices[$servicename])
- . "'>".htmlspecialchars($servicename)."</option>";
- }
- // NB! If you are editing this, make sure you don't break the javascript reference "previousSibling"
- // which allows the "Go" button to refer to the drop-down selector.
- $str .= "\n</select><input type='button' value='" . get_string('go') . "' onclick='if(previousSibling.value){self.location=previousSibling.value}'/>";
+ $str .= "\n<select name='jumpto'>";
+
+ foreach($servicesshown as $servicename){
+ // Add a link to a service
+ $str .= "\n <option value='"
+ . str_replace(array_keys($urlreplacements), array_values($urlreplacements), $this->linkoutservices[$servicename])
+ . "'>".htmlspecialchars($servicename)."</option>";
+ }
+ // NB! If you are editing this, make sure you don't break the javascript reference "previousSibling"
+ // which allows the "Go" button to refer to the drop-down selector.
+ $str .= "\n</select><input type='button' value='" . get_string('go') . "' onclick='if(previousSibling.value){self.location=previousSibling.value}'/>";
}
$str.= '</form>';
if ($rid) {
- if (! $record = get_record('data_records', 'id', $rid)) {
- error('Record ID is incorrect');
- }
- if (! $data = get_record('data', 'id', $record->dataid)) {
- error('Data ID is incorrect');
- }
- if (! $course = get_record('course', 'id', $data->course)) {
- error('Course is misconfigured');
- }
- if (! $cm = get_coursemodule_from_instance('data', $data->id, $course->id)) {
- error('Course Module ID was incorrect');
- }
- if (! $field = get_record('data_fields', 'id', $fieldid)) {
- error('Field ID is incorrect');
- }
- if (! $field->type == 'latlong') { // Make sure we're looking at a latlong data type!
- error('Field ID is incorrect');
- }
- if (! $content = get_record('data_content', 'fieldid', $fieldid, 'recordid', $rid)) {
- error('Field content not found');
- }
+ if (! $record = get_record('data_records', 'id', $rid)) {
+ error('Record ID is incorrect');
+ }
+ if (! $data = get_record('data', 'id', $record->dataid)) {
+ error('Data ID is incorrect');
+ }
+ if (! $course = get_record('course', 'id', $data->course)) {
+ error('Course is misconfigured');
+ }
+ if (! $cm = get_coursemodule_from_instance('data', $data->id, $course->id)) {
+ error('Course Module ID was incorrect');
+ }
+ if (! $field = get_record('data_fields', 'id', $fieldid)) {
+ error('Field ID is incorrect');
+ }
+ if (! $field->type == 'latlong') { // Make sure we're looking at a latlong data type!
+ error('Field ID is incorrect');
+ }
+ if (! $content = get_record('data_content', 'fieldid', $fieldid, 'recordid', $rid)) {
+ error('Field content not found');
+ }
} else { // We must have $d
- if (! $data = get_record('data', 'id', $d)) {
- error('Data ID is incorrect');
- }
- if (! $course = get_record('course', 'id', $data->course)) {
- error('Course is misconfigured');
- }
- if (! $cm = get_coursemodule_from_instance('data', $data->id, $course->id)) {
- error('Course Module ID was incorrect');
- }
- if (! $field = get_record('data_fields', 'id', $fieldid)) {
- error('Field ID is incorrect');
- }
- if (! $field->type == 'latlong') { // Make sure we're looking at a latlong data type!
- error('Field ID is incorrect');
- }
- $record = NULL;
+ if (! $data = get_record('data', 'id', $d)) {
+ error('Data ID is incorrect');
+ }
+ if (! $course = get_record('course', 'id', $data->course)) {
+ error('Course is misconfigured');
+ }
+ if (! $cm = get_coursemodule_from_instance('data', $data->id, $course->id)) {
+ error('Course Module ID was incorrect');
+ }
+ if (! $field = get_record('data_fields', 'id', $fieldid)) {
+ error('Field ID is incorrect');
+ }
+ if (! $field->type == 'latlong') { // Make sure we're looking at a latlong data type!
+ error('Field ID is incorrect');
+ }
+ $record = NULL;
}
require_course_login($course, true, $cm);
/// If it's hidden then it's don't show anything. :)
if (empty($cm->visible) and !has_capability('moodle/course:viewhiddenactivities',get_context_instance(CONTEXT_MODULE, $cm->id))) {
- $strdatabases = get_string("modulenameplural", "data");
- $navigation = "<a href=\"index.php?id=$course->id\">$strdatabases</a> ->";
- print_header_simple(format_string($data->name), "",
- "$navigation ".format_string($data->name), "", "", true, '', navmenu($course, $cm));
- notice(get_string("activityiscurrentlyhidden"));
+ $strdatabases = get_string("modulenameplural", "data");
+ $navigation = "<a href=\"index.php?id=$course->id\">$strdatabases</a> ->";
+ print_header_simple(format_string($data->name), "",
+ "$navigation ".format_string($data->name), "", "", true, '', navmenu($course, $cm));
+ notice(get_string("activityiscurrentlyhidden"));
}
/// If we have an empty Database then redirect because this page is useless without data
if (has_capability('mod/data:managetemplates', $context)) {
- if (!record_exists('data_fields','dataid',$data->id)) { // Brand new database!
- redirect($CFG->wwwroot.'/mod/data/field.php?d='.$data->id); // Redirect to field entry
- }
+ if (!record_exists('data_fields','dataid',$data->id)) { // Brand new database!
+ redirect($CFG->wwwroot.'/mod/data/field.php?d='.$data->id); // Redirect to field entry
+ }
}
foreach($contents as $content) {
$pm->name = data_latlong_kml_get_item_name($content, $field);
- $pm->description = "<a href='$CFG->wwwroot/mod/data/view.php?d=$d&rid=$content->recordid'>Item #$content->recordid</a> in Moodle data activity";
- $pm->long = $content->content1;
- $pm->lat = $content->content;
- echo data_latlong_kml_placemark($pm);
+ $pm->description = "<a href='$CFG->wwwroot/mod/data/view.php?d=$d&rid=$content->recordid'>Item #$content->recordid</a> in Moodle data activity";
+ $pm->long = $content->content1;
+ $pm->lat = $content->content;
+ echo data_latlong_kml_placemark($pm);
}
echo '</Document>';
}
function data_latlong_kml_get_item_name($content, $field) {
- // $field->param2 contains the user-specified labelling method
-
- $name = '';
-
- if($field->param2 > 0) {
- $name = htmlspecialchars(get_field('data_content', 'content', 'fieldid', $field->param2, 'recordid', $content->recordid));
- }elseif($field->param2 == -2) {
- $name = $content->content . ', ' . $content->content1;
- }
- if($name=='') { // Done this way so that "item #" is the default that catches any problems
- $name = get_string('entry', 'data') . " #$content->recordid";
- }
-
-
- return $name;
+ // $field->param2 contains the user-specified labelling method
+
+ $name = '';
+
+ if($field->param2 > 0) {
+ $name = htmlspecialchars(get_field('data_content', 'content', 'fieldid', $field->param2, 'recordid', $content->recordid));
+ }elseif($field->param2 == -2) {
+ $name = $content->content . ', ' . $content->content1;
+ }
+ if($name=='') { // Done this way so that "item #" is the default that catches any problems
+ $name = get_string('entry', 'data') . " #$content->recordid";
+ }
+
+
+ return $name;
}
echo " $strusestandard: </td><td>";
echo "<table width=100%>";
foreach ($presets as $id => $preset) {
- echo "<tr><form action='' method='POST'>";
- echo "<input type='hidden' name='file' value=\"$preset->path\">";
- echo "<input type='hidden' name='action' value='importpreset'>";
- echo "<input type='hidden' name='d' value='$data->id'>";
- echo "<input type='hidden' name='sesskey' value='$sesskey'>";
- echo "<td>";
- if ($preset->screenshot) {
- echo "<img src='$preset->screenshot' alt='$preset->screenshot' />";
- }
- echo "</td><td>$preset->name";
- if ($preset->user) {
- $user = get_record('user', 'id', $preset->user);
- echo " by $user->firstname $user->lastname";
- }
- echo "</td><td><input type='submit' value='$strchoose'></td></form>";
- echo "<td>";
- if ($preset->user == $USER->id || has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
- echo "<form action='' method='POST'>";
- echo "<input type='hidden' name='d' value='$data->id' />";
- echo "<input type='hidden' name='action' value='confirmdelete' />";
- echo "<input type='hidden' name='sesskey' value='$sesskey' />";
- echo "<input type='hidden' name='deleteid' value='$id' />";
- echo "<input type='hidden' name='deletename' value=\"$preset->name\" />";
- echo "<input type='submit' value='$strdelete' /></form>";
- }
- echo "</td></tr>";
+ echo "<tr><form action='' method='POST'>";
+ echo "<input type='hidden' name='file' value=\"$preset->path\">";
+ echo "<input type='hidden' name='action' value='importpreset'>";
+ echo "<input type='hidden' name='d' value='$data->id'>";
+ echo "<input type='hidden' name='sesskey' value='$sesskey'>";
+ echo "<td>";
+ if ($preset->screenshot) {
+ echo "<img src='$preset->screenshot' alt='$preset->screenshot' />";
+ }
+ echo "</td><td>$preset->name";
+ if ($preset->user) {
+ $user = get_record('user', 'id', $preset->user);
+ echo " by $user->firstname $user->lastname";
+ }
+ echo "</td><td><input type='submit' value='$strchoose'></td></form>";
+ echo "<td>";
+ if ($preset->user == $USER->id || has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
+ echo "<form action='' method='POST'>";
+ echo "<input type='hidden' name='d' value='$data->id' />";
+ echo "<input type='hidden' name='action' value='confirmdelete' />";
+ echo "<input type='hidden' name='sesskey' value='$sesskey' />";
+ echo "<input type='hidden' name='deleteid' value='$id' />";
+ echo "<input type='hidden' name='deletename' value=\"$preset->name\" />";
+ echo "<input type='submit' value='$strdelete' /></form>";
+ }
+ echo "</td></tr>";
}
echo "</table></td></tr>";
/***************** Deleting *****************/
case 'confirmdelete' :
if (!confirm_sesskey()) {
- error("Sesskey Invalid");
+ error("Sesskey Invalid");
}
$deletename = required_param('deletename', PARAM_RAW);
case 'delete' :
if (!confirm_sesskey()) {
- error('Sesskey Invalid');
+ error('Sesskey Invalid');
}
$deletename = required_param('deletename', PARAM_RAW);
$deleteid = required_param('deleteid', PARAM_INT);
if (!empty($presets[$deleteid])) {
- if ($presets[$deleteid]->name == $deletename) {
- if (!clean_preset($CFG->dirroot.$presets[$deleteid]->path)) error("Error deleting");
- }
- rmdir($CFG->dirroot.$presets[$deleteid]->path);
+ if ($presets[$deleteid]->name == $deletename) {
+ if (!clean_preset($CFG->dirroot.$presets[$deleteid]->path)) error("Error deleting");
+ }
+ rmdir($CFG->dirroot.$presets[$deleteid]->path);
}
else {
- error('Invalid delete');
+ error('Invalid delete');
}
$strdelete = get_string('deleted', 'data');
/***************** Importing *****************/
case 'importpreset' :
if (!confirm_sesskey()) {
- error("Sesskey Invalid");
+ error("Sesskey Invalid");
}
$pimporter = new PresetImporter($course, $cm, $data, $CFG->dirroot.$file);
/* Imports a zip file. */
case 'importzip' :
if (!confirm_sesskey()) {
- error("Sesskey Invalid");
+ error("Sesskey Invalid");
}
if (!make_upload_directory('temp/data/'.$USER->id)) {
- error("Can't Create Directory");
+ error("Can't Create Directory");
}
$presetfile = $CFG->dataroot."/temp/data/".$USER->id;
clean_preset($presetfile);
if (!unzip_file($CFG->dataroot."/$course->id/$file",
- $presetfile, false))
- error("Can't unzip file");
+ $presetfile, false))
+ error("Can't unzip file");
$pimporter = new PresetImporter($course, $cm, $data, $presetfile);
$pimporter->import_options();
case 'finishimport':
if (!confirm_sesskey()) {
- error('Sesskey Invalid');
+ error('Sesskey Invalid');
}
$pimporter = new PresetImporter($course, $cm, $data, $file);
$straddentries = get_string('addentries', 'data');
$strtodatabase = get_string('todatabase', 'data');
if (!get_records('data_records', 'dataid', $data->id)) {
- notify("$strimportsuccess <a href='edit.php?d=$data->id'>$straddentries</a> $strtodatabase", 'notifysuccess');
+ notify("$strimportsuccess <a href='edit.php?d=$data->id'>$straddentries</a> $strtodatabase", 'notifysuccess');
}
else {
- notify("$strimportsuccess", 'notifysuccess');
+ notify("$strimportsuccess", 'notifysuccess');
}
break;
/***************** Exporting *****************/
case 'save1':
if (!confirm_sesskey()) {
- error("Sesskey Invalid");
+ error("Sesskey Invalid");
}
$strcontinue = get_string('continue');
case 'save2':
if (!confirm_sesskey()) {
- error("Sesskey Invalid");
+ error("Sesskey Invalid");
}
$strcontinue = get_string('continue');
$name = optional_param('name', $data->name, PARAM_FILE);
if (is_directory_a_preset("$CFG->dirroot/mod/data/preset/$USER->id/$name")) {
- notify("Preset already exists: Pick another name or overwrite");
-
- echo "<div align=center>";
- echo "<form action='' method='POST'>";
- echo "New name: <input type='textbox' name='name' value=\"$name\" />";
- echo "<input type='hidden' name='action' value='save2' />";
- echo "<input type='hidden' name='d' value='$data->id' />";
- echo "<input type='hidden' name='sesskey' value='$sesskey' />";
- echo "<input type='submit' value='$strcontinue' /></form>";
-
- echo "<form action='' method='POST'>";
- echo "<input type='hidden' name='name' value=\"$name\" />";
- echo "<input type='hidden' name='action' value='save3' />";
- echo "<input type='hidden' name='d' value='$data->id' />";
- echo "<input type='hidden' name='sesskey' value='$sesskey' />";
- echo "<input type='submit' value='$stroverwrite' /></form>";
- echo "</div>";
- break;
+ notify("Preset already exists: Pick another name or overwrite");
+
+ echo "<div align=center>";
+ echo "<form action='' method='POST'>";
+ echo "New name: <input type='textbox' name='name' value=\"$name\" />";
+ echo "<input type='hidden' name='action' value='save2' />";
+ echo "<input type='hidden' name='d' value='$data->id' />";
+ echo "<input type='hidden' name='sesskey' value='$sesskey' />";
+ echo "<input type='submit' value='$strcontinue' /></form>";
+
+ echo "<form action='' method='POST'>";
+ echo "<input type='hidden' name='name' value=\"$name\" />";
+ echo "<input type='hidden' name='action' value='save3' />";
+ echo "<input type='hidden' name='d' value='$data->id' />";
+ echo "<input type='hidden' name='sesskey' value='$sesskey' />";
+ echo "<input type='submit' value='$stroverwrite' /></form>";
+ echo "</div>";
+ break;
}
case 'save3':
if (!confirm_sesskey()) {
- error("Sesskey Invalid");
+ error("Sesskey Invalid");
}
$name = optional_param('name', $data->name, PARAM_FILE);
$presetdirectory = "$CFG->dirroot/mod/data/preset/$USER->id/$name";
if (!is_dir($presetdirectory)) {
- @mkdir("$CFG->dirroot/mod/data/preset/$USER->id");
- mkdir($presetdirectory);
+ @mkdir("$CFG->dirroot/mod/data/preset/$USER->id");
+ mkdir($presetdirectory);
}
else {
- clean_preset($presetdirectory);
+ clean_preset($presetdirectory);
}
$file = data_presets_export($course, $cm, $data);
function is_directory_a_preset($directory) {
$directory = rtrim($directory, '/\\') . '/';
if (file_exists($directory.'singletemplate.html') &&
- file_exists($directory.'listtemplate.html') &&
- file_exists($directory.'listtemplateheader.html') &&
- file_exists($directory.'listtemplatefooter.html') &&
- file_exists($directory.'addtemplate.html') &&
- file_exists($directory.'rsstemplate.html') &&
- file_exists($directory.'rsstitletemplate.html') &&
- file_exists($directory.'csstemplate.css') &&
- file_exists($directory.'jstemplate.js') &&
- file_exists($directory.'preset.xml')) return true;
+ file_exists($directory.'listtemplate.html') &&
+ file_exists($directory.'listtemplateheader.html') &&
+ file_exists($directory.'listtemplatefooter.html') &&
+ file_exists($directory.'addtemplate.html') &&
+ file_exists($directory.'rsstemplate.html') &&
+ file_exists($directory.'rsstitletemplate.html') &&
+ file_exists($directory.'csstemplate.css') &&
+ file_exists($directory.'jstemplate.js') &&
+ file_exists($directory.'preset.xml')) return true;
else return false;
}
$strdata = get_string('modulenameplural','data');
print_header_simple($data->name, '', "<a href='index.php?id=$course->id'>$strdata</a> -> $data->name",
- '', '', true, '', navmenu($course, $cm));
+ '', '', true, '', navmenu($course, $cm));
print_heading(format_string($data->name));
function clean_preset($folder) {
if (unlink($folder.'/singletemplate.html') &&
- unlink($folder.'/listtemplate.html') &&
- unlink($folder.'/listtemplateheader.html') &&
- unlink($folder.'/listtemplatefooter.html') &&
- unlink($folder.'/addtemplate.html') &&
- unlink($folder.'/rsstemplate.html') &&
- unlink($folder.'/rsstitletemplate.html') &&
- unlink($folder.'/csstemplate.css') &&
- unlink($folder.'/jstemplate.js') &&
- unlink($folder.'/preset.xml')) return true;
+ unlink($folder.'/listtemplate.html') &&
+ unlink($folder.'/listtemplateheader.html') &&
+ unlink($folder.'/listtemplatefooter.html') &&
+ unlink($folder.'/addtemplate.html') &&
+ unlink($folder.'/rsstemplate.html') &&
+ unlink($folder.'/rsstitletemplate.html') &&
+ unlink($folder.'/csstemplate.css') &&
+ unlink($folder.'/jstemplate.js') &&
+ unlink($folder.'/preset.xml')) return true;
else return false;
}
/* Database settings first. Name not included? */
$settingssaved = array('intro', 'comments', 'ratings', 'participants',
- 'requiredentries', 'requiredentriestoview', 'maxentries',
- 'rssarticles', 'approval', 'scale', 'assessed', 'assessedpublic',
- 'defaultsort', 'defaultsortdir', 'editany');
+ 'requiredentries', 'requiredentriestoview', 'maxentries',
+ 'rssarticles', 'approval', 'scale', 'assessed', 'assessedpublic',
+ 'defaultsort', 'defaultsortdir', 'editany');
$presetxml .= "<settings>\n";
foreach ($settingssaved as $setting) {
- $presetxml .= "<$setting>{$data->$setting}</$setting>\n";
+ $presetxml .= "<$setting>{$data->$setting}</$setting>\n";
}
$presetxml .= "</settings>\n\n";
/* Now for the fields. Grabs all settings that are non-empty */
if (!empty($fields)) {
- foreach ($fields as $field) {
- $presetxml .= "<field>\n";
- foreach ($field as $key => $value) {
- if ($value != '' && $key != 'id' && $key != 'dataid') {
- $presetxml .= "<$key>$value</$key>\n";
- }
- }
- $presetxml .= "</field>\n\n";
- }
+ foreach ($fields as $field) {
+ $presetxml .= "<field>\n";
+ foreach ($field as $key => $value) {
+ if ($value != '' && $key != 'id' && $key != 'dataid') {
+ $presetxml .= "<$key>$value</$key>\n";
+ }
+ }
+ $presetxml .= "</field>\n\n";
+ }
}
$presetxml .= "</preset>";
"rsstemplate.html",
"rsstitletemplate.html",
"csstemplate.css",
- "jstemplate.js",
+ "jstemplate.js",
"preset.xml");
foreach ($filelist as $key => $file) {
$selected=true;
}
else {
- echo "<option value='$cid'>$currentfield->name</option>";
- }
- }
+ echo "<option value='$cid'>$currentfield->name</option>";
+ }
+ }
}
if ($selected)
var maxListHeight = 120;
function init() {
- if (document.getElementById("singleimage")) single();
- /*else if (document.getElementById("pictures")) list();*/
+ if (document.getElementById("singleimage")) single();
+ /*else if (document.getElementById("pictures")) list();*/
}
function list() {
- imageDivs = document.getElementsByName("listimage");
- for (i=0; i < imageDivs.length; i++) {
- currentHeight = imageDivs[i].offsetHeight;
- currentWidth = imageDivs[i].offsetWidth;
-
- if (currentHeight > maxListHeight) {
- ratio = maxListHeight / currentHeight;
- imageDivs[i].style.width = (currentWidth*ratio) + 'px';
- imageDivs[i].style.height = (currentHeight*ratio) + 'px';
- imageDivs[i].firstChild.style.height = '100%';
- imageDivs[i].firstChild.style.width = '100%';
- }
- }
+ imageDivs = document.getElementsByName("listimage");
+ for (i=0; i < imageDivs.length; i++) {
+ currentHeight = imageDivs[i].offsetHeight;
+ currentWidth = imageDivs[i].offsetWidth;
+
+ if (currentHeight > maxListHeight) {
+ ratio = maxListHeight / currentHeight;
+ imageDivs[i].style.width = (currentWidth*ratio) + 'px';
+ imageDivs[i].style.height = (currentHeight*ratio) + 'px';
+ imageDivs[i].firstChild.style.height = '100%';
+ imageDivs[i].firstChild.style.width = '100%';
+ }
+ }
}
function single() {
- var imageDiv = document.getElementById("singleimage");
+ var imageDiv = document.getElementById("singleimage");
- if (imageDiv) {
- currentHeight = imageDiv.offsetHeight;
- currentWidth = imageDiv.offsetWidth;
-
- if (currentHeight > maxHeight) {
- ratio = maxHeight / currentHeight;
- imageDiv.style.width = (currentWidth*ratio) + 'px';
- imageDiv.style.height = (currentHeight*ratio) + 'px';
-
- }
- }
+ if (imageDiv) {
+ currentHeight = imageDiv.offsetHeight;
+ currentWidth = imageDiv.offsetWidth;
+
+ if (currentHeight > maxHeight) {
+ ratio = maxHeight / currentHeight;
+ imageDiv.style.width = (currentWidth*ratio) + 'px';
+ imageDiv.style.height = (currentHeight*ratio) + 'px';
+
+ }
+ }
}
window.onload = init;
\ No newline at end of file
<td align="left">
<?php
$options = array(
- 0 => '0',
- 1 => '1',
- 2 => '2',
- 3 => '3'
- );
+ 0 => '0',
+ 1 => '1',
+ 2 => '2',
+ 3 => '3'
+ );
choose_from_menu($options, "decimalpoints", "$form->decimalpoints", "");
helpbutton("decimalpoints", get_string("decimaldigits","quiz"), "quiz");
?>
function countdown_clock(theTimer) {
var timeout_id = null;
- // @EC PF : current client time
- var ec_now_epoch = new Date().getTime();
+ // @EC PF : current client time
+ var ec_now_epoch = new Date().getTime();
- // @EC PF : time left according to client
- quizTimerValue = Math.floor( (ec_quiz_finish - ec_now_epoch) /1000 );
+ // @EC PF : time left according to client
+ quizTimerValue = Math.floor( (ec_quiz_finish - ec_now_epoch) /1000 );
if(quizTimerValue <= 0) {
clearTimeout(timeout_id);
var ourForm = document.forms['responseform'];
ourForm.timeup.value = 1;
if (ourForm.onsubmit) {
- ourForm.onsubmit();
- }
+ ourForm.onsubmit();
+ }
ourForm.submit();
return;
}
/// Some packages are poorly done and use \ in roots. This makes them
/// not display since the URLs are not valid.
if (!empty($obj_resource->href)) {
- $obj_resource->href = strtr($obj_resource->href, "\\", '/');
+ $obj_resource->href = strtr($obj_resource->href, "\\", '/');
}
/// Only if the resource has everything
/// Add item
$contents .= '<li>';
if (!empty($item->href)) {
- if ($item->id == $selected_page) $contents .= '<div id="ims-toc-selected">';
+ if ($item->id == $selected_page) $contents .= '<div id="ims-toc-selected">';
$contents .= '<a href="'.$fullurl.$item->id.'" target="_parent">'.$item->title.'</a>';
if ($item->id == $selected_page) $contents .= '</div>';
} else {
A popup window display mode. DONE
New Moodle course format: SCORM. DONE
Add prerequisites support to SCORM 1.2. DONE
-Customizable player page. DONE
+Customizable player page. DONE
Multiple attempt management.
Complete AICC conformance.
ToDo
Mike:
- Group Handling (Mike)
- > deal with changing group mode on active wikis
- > handle group mode for teacher wikis
+ > deal with changing group mode on active wikis
+ > handle group mode for teacher wikis
- Rating
- Commenting
- Grading
*/
- table.caltable{
- background-color: #CDBDAD;
- }
- td.calhead {
- font-family: Verdana, Arial, sans-serif;
- font-size: 8pt;
- text-align:center;
- }
- th.caldays{
- color:#BA997A;
- font-family: Verdana, Arial, sans-serif;
- font-size: 8pt;
- text-align:center;
- }
- td.calday{
- font-family: Verdana, Arial, sans-serif;
- font-size: 8pt;
- text-align:right;
- }
- td.caltoday{
- background-color:#D7CFC7;
- font-family: Verdana, Arial, sans-serif;
- font-size: 8pt;
- text-align:right;
- }
- a.calpg{
- text-decoration: none;
- font-weight:600;
- }
- a.calhide{
- text-decoration: none;
- }
+ table.caltable{
+ background-color: #CDBDAD;
+ }
+ td.calhead {
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 8pt;
+ text-align:center;
+ }
+ th.caldays{
+ color:#BA997A;
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 8pt;
+ text-align:center;
+ }
+ td.calday{
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 8pt;
+ text-align:right;
+ }
+ td.caltoday{
+ background-color:#D7CFC7;
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 8pt;
+ text-align:right;
+ }
+ a.calpg{
+ text-decoration: none;
+ font-weight:600;
+ }
+ a.calhide{
+ text-decoration: none;
+ }
*/
- body, td {
- line-height:140%;
- }
-
- a {
- text-decoration:none;
- }
-
- a:hover {
- text-decoration:underline;
- }
-
- p {
- line-height:110%;
- }
-
- em {
- text-decoration:none;
- font-style:normal;
- background-color:#cccc22;
- }
-
- strong {
- font-weight:700;
- }
-
- .box {
- background-color:#222266;
- border:1px #111133 solid;
- }
-
- .box hr {
- display:none;
- }
-
- hr {
- visibility:hidden;
- }
-
- form[name=ewiki] {
- border:2px #ffffff dashed;
- padding:5px;
- background-color:#444444;
- }
-
- textarea[name=content] {
- border:2px #000000 dotted;
- background-color:#B4D3D7;
- }
-
- input[name=save], input[name=preview] {
- border:1px #000000 solid;
- background-color:#B4D3D7;
- -moz-border-redius:10px;
- }
+ body, td {
+ line-height:140%;
+ }
+
+ a {
+ text-decoration:none;
+ }
+
+ a:hover {
+ text-decoration:underline;
+ }
+
+ p {
+ line-height:110%;
+ }
+
+ em {
+ text-decoration:none;
+ font-style:normal;
+ background-color:#cccc22;
+ }
+
+ strong {
+ font-weight:700;
+ }
+
+ .box {
+ background-color:#222266;
+ border:1px #111133 solid;
+ }
+
+ .box hr {
+ display:none;
+ }
+
+ hr {
+ visibility:hidden;
+ }
+
+ form[name=ewiki] {
+ border:2px #ffffff dashed;
+ padding:5px;
+ background-color:#444444;
+ }
+
+ textarea[name=content] {
+ border:2px #000000 dotted;
+ background-color:#B4D3D7;
+ }
+
+ input[name=save], input[name=preview] {
+ border:1px #000000 solid;
+ background-color:#B4D3D7;
+ -moz-border-redius:10px;
+ }
#-- icons (best given absolute to www root)
/*$ewiki_binary_icons = array(
- ".bin" => "/icons/exec.gif",
+ ".bin" => "/icons/exec.gif",
"application/" => "/icons/exec.gif",
"application/octet-stream" => "/icons/exec.gif",
- ".ogg" => "/icons/son.gif",
- ".jpeg" => "/icons/pic.gif",
- "text/" => "/icons/txt.gif",
- ".pdf" => "/icons/txt.gif",
+ ".ogg" => "/icons/son.gif",
+ ".jpeg" => "/icons/pic.gif",
+ "text/" => "/icons/txt.gif",
+ ".pdf" => "/icons/txt.gif",
);*/
$ewiki_t["en"]["comment"] = "Comment";
$ewiki_t["en"]["dwnl_section"] = "download section";
$ewiki_t["en"]["DWNL_ENTRY_FORMAT"] =
- '<div class="download"><a href="$url">$icon$title</a><small>$size<br />'.
+ '<div class="download"><a href="$url">$icon$title</a><small>$size<br />'.
'uploaded on <b>$time</b>, downloaded <tt>$hits</tt> times<br />'.
'(<a href="$url">$id</a>)<br />'.
'$section'.'file is of type <tt>$type</tt>'.
$ewiki_t["de"]["UPLOAD0"] = "Mit diesem Formular kannst du beliebige Dateien in das Wiki abspeichern:<br />";
$ewiki_t["de"]["UPL_NEWNAM"] = "Mit unterschiedlichem Dateinamen speichern";
$ewiki_t["de"]["UPL_INSECT"] = "Hochladen in Bereich:";
-$ewiki_t["de"]["UPL_TOOLARGE"] = "Deine Datei wurde nicht aufgenommen, weil sie zu groß war!";
-$ewiki_t["de"]["UPL_REJSECT"] = 'Der angegebene Download-Bereich "$sect" wird nicht verwendet. Bitte verwende einen von den voreingestellten Bereichen, damit Andere die Datei später auch finden können, oder frag den Administrator das Hochladen für beliebige Seiten zu aktivieren.<br /><br />';
+$ewiki_t["de"]["UPL_TOOLARGE"] = "Deine Datei wurde nicht aufgenommen, weil sie zu gro� war!";
+$ewiki_t["de"]["UPL_REJSECT"] = 'Der angegebene Download-Bereich "$sect" wird nicht verwendet. Bitte verwende einen von den voreingestellten Bereichen, damit Andere die Datei sp�ter auch finden k�nnen, oder frag den Administrator das Hochladen f�r beliebige Seiten zu aktivieren.<br /><br />';
$ewiki_t["de"]["UPL_OK"] = "Deine Datei wurde korrekt hochgeladen, sehe einfach auf der <a href=\"\$script".EWIKI_PAGE_DOWNLOAD."\">".EWIKI_PAGE_DOWNLOAD."</a> nach.<br /><br />";
-$ewiki_t["de"]["UPL_ERROR"] = "'Tschuldige, aber irgend etwas ist während des Hochladens gründlich schief gelaufen.<br /><br />";
+$ewiki_t["de"]["UPL_ERROR"] = "'Tschuldige, aber irgend etwas ist w�hrend des Hochladens gr�ndlich schief gelaufen.<br /><br />";
$ewiki_t["de"]["DWNL_SEEUPL"] = 'Siehe auch <a href="$script'.EWIKI_PAGE_UPLOAD.'">DateiHochladen</a>, auf dieser Seite stehen nur die Downloads.<br /><br />';
$ewiki_t["de"]["DWNL_NOFILES"] = "Noch keine Dateien hochgeladen.<br />\n";
$ewiki_t["de"]["file"] = "Datei";
$ewiki_t["de"]["comment"] = "Kommentar";
$ewiki_t["de"]["dwnl_section"] = "Download Bereich";
$ewiki_t["de"]["DWNL_ENTRY_FORMAT"] =
- '<div class="download"><a href="$url">$icon$title</a><small>$size<br />'.
+ '<div class="download"><a href="$url">$icon$title</a><small>$size<br />'.
'am <b>$time</b> hochgeladen, <tt>$hits</tt> mal abgerufen<br />'.
'(<a href="$url">$id</a>)<br />'.
'$section'.'Datei ist vom Typ <tt>$type</tt>'.
#-- config
-define("EWIKI_DB_STORE_DIRECTORY", "/tmp"); // where to save binary files
-define("EWIKI_DB_STORE_MINSIZE", 0); // send smaller files into db
-define("EWIKI_DB_STORE_MAXSIZE", 32 <<20); // 32MB max per file (but
+define("EWIKI_DB_STORE_DIRECTORY", "/tmp"); // where to save binary files
+define("EWIKI_DB_STORE_MINSIZE", 0); // send smaller files into db
+define("EWIKI_DB_STORE_MAXSIZE", 32 <<20); // 32MB max per file (but
// there is actually no way to upload such large files via HTTP)
# define("EWIKI_DB_STORE_URL", "http://example.com/wiki/files/store/");
body {
background-color:#eeeeff;
padding:2px;
- }
+ }
H2 {
background:#000000;
/*
dynamic plugin loading
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
+ ����������������������
Will load plugins on demand, so they must not be included() one by one
together with the core script. This is what commonly the "plugin idea"
suggests, and only has minimal disadvantages.
$ewiki_plugins["dl"]["action"] = array(
- "view" => array("", "", 0),
- "links" => array("", "", 0),
- "info" => array("", "", 0),
-# "edit" => array("spellcheck.php", "", 0),
-# "calendar" => array("calendar.php", "ewiki_page_calendar", 0),
-# "addpost" => array("contrib/aview_posts.php", "ewiki_add_post", 0),
-# "imageappend" => array("contrib/aview_imgappend.php", "ewiki_action_image_append", 0),
-# "extodo" => array("contrib/action_extracttodo.php", "ewiki_extract_todo", 0),
-# "addthread" => array("contrib/aview_threads.php", "ewiki_add_thread", 0),
-# "control" => array("admin/control.php", "ewiki_action_control_page", 0),
-# "pdf" => array("pdf.php", "ewiki_send_page_as_pdf", 0),
- "diff" => array("diff.php", "ewiki_page_stupid_diff", 0),
-# "diff" => array("diff_gnu.php", "ewiki_page_gnu_diff", 0),
-# "binary" => array("downloads.php", "ewiki_binary", 0),
-# "attachments" => array("downloads.php", "ewiki_action_attachments", 0),
- "like" => array("like_pages.php", "ewiki_page_like", 0),
-# "verdiff" => array("action_verdiff.php", "ewiki_action_verdiff", 0),
+ "view" => array("", "", 0),
+ "links" => array("", "", 0),
+ "info" => array("", "", 0),
+# "edit" => array("spellcheck.php", "", 0),
+# "calendar" => array("calendar.php", "ewiki_page_calendar", 0),
+# "addpost" => array("contrib/aview_posts.php", "ewiki_add_post", 0),
+# "imageappend" => array("contrib/aview_imgappend.php", "ewiki_action_image_append", 0),
+# "extodo" => array("contrib/action_extracttodo.php", "ewiki_extract_todo", 0),
+# "addthread" => array("contrib/aview_threads.php", "ewiki_add_thread", 0),
+# "control" => array("admin/control.php", "ewiki_action_control_page", 0),
+# "pdf" => array("pdf.php", "ewiki_send_page_as_pdf", 0),
+ "diff" => array("diff.php", "ewiki_page_stupid_diff", 0),
+# "diff" => array("diff_gnu.php", "ewiki_page_gnu_diff", 0),
+# "binary" => array("downloads.php", "ewiki_binary", 0),
+# "attachments" => array("downloads.php", "ewiki_action_attachments", 0),
+ "like" => array("like_pages.php", "ewiki_page_like", 0),
+# "verdiff" => array("action_verdiff.php", "ewiki_action_verdiff", 0),
);
$ewiki_plugins["dl"]["page"] = array(
-# "PageCalendar" => array("calendar.php", "ewiki_page_calendar", 0),
-# "PageYearCalendar" => array("calendar.php", "ewiki_page_year_calendar", 0),
-# "WikiNews" => array("contrib/page_wikinews.php", "ewiki_page_wikinews", 0),
-# "WikiDump" => array("contrib/page_wikidump.php", "ewiki_page_wiki_dump_tarball", 0),
-# "README" => array("contrib/page_README.php", "ewiki_page_README", 0),
-# "README.de" => array("contrib/page_README.php", "ewiki_page_README", 0),
-# "plugins/auth/README.auth" => array("contrib/page_README.php", "ewiki_page_README", 0),
-# "Fortune" => array("contrib/page_fortune.php", "ewiki_page_fortune", 0),
-# "ScanDisk" => array("contrib/page_scandisk.php", "ewiki_page_scandisk", 0),
- "InterWikiMap" => array("contrib/page_interwikimap.php", "ewiki_page_interwikimap", 0),
-# "WikiUserLogin" => array("contrib/page_wikiuserlogin.php", "ewiki_page_wikiuserlogin", 0),
-# "PhpInfo" => array("contrib/page_phpinfo.php", "ewiki_page_phpinfo", 0),
-# "ImageGallery" => array("contrib/page_imagegallery.php", "ewiki_page_image_gallery", 0),
-# "SinceUpdatedPages" => array("contrib/page_since_updates.php", "ewiki_page_since_updates", 0),
-# "TextUpload" => array("contrib/page_textupload.php", "ewiki_page_textupload", 0),
- "HitCounter" => array("contrib/page_hitcounter.php", "ewiki_page_hitcounter", 0),
-# "SearchCache" => array("admin/page_searchcache.php", "ewiki_cache_generated_pages", 0),
-# "SearchAndReplace" => array("admin/page_searchandreplace.php", "ewiki_page_searchandreplace", 0),
-# "FileUpload" => array("downloads.php", "ewiki_page_fileupload", 0),
-# "FileDownload" => array("downloads.php", "ewiki_page_filedownload", 0),
- "PowerSearch" => array("page_powersearch.php", "ewiki_page_powersearch", 0),
-# "AboutPlugins" => array("page_aboutplugins.php", "ewiki_page_aboutplugins", 0),
- "OrphanedPages" => array("page_orphanedpages.php", "ewiki_page_orphanedpages", 0),
- "PageIndex" => array("page_pageindex.php", "ewiki_page_index", 0),
- "RandomPage" => array("page_randompage.php", "ewiki_page_random", 0),
- "WantedPages" => array("page_wantedpages.php", "ewiki_page_wantedpages", 0),
- "WordIndex" => array("page_wordindex.php", "ewiki_page_wordindex", 0),
+# "PageCalendar" => array("calendar.php", "ewiki_page_calendar", 0),
+# "PageYearCalendar" => array("calendar.php", "ewiki_page_year_calendar", 0),
+# "WikiNews" => array("contrib/page_wikinews.php", "ewiki_page_wikinews", 0),
+# "WikiDump" => array("contrib/page_wikidump.php", "ewiki_page_wiki_dump_tarball", 0),
+# "README" => array("contrib/page_README.php", "ewiki_page_README", 0),
+# "README.de" => array("contrib/page_README.php", "ewiki_page_README", 0),
+# "plugins/auth/README.auth" => array("contrib/page_README.php", "ewiki_page_README", 0),
+# "Fortune" => array("contrib/page_fortune.php", "ewiki_page_fortune", 0),
+# "ScanDisk" => array("contrib/page_scandisk.php", "ewiki_page_scandisk", 0),
+ "InterWikiMap" => array("contrib/page_interwikimap.php", "ewiki_page_interwikimap", 0),
+# "WikiUserLogin" => array("contrib/page_wikiuserlogin.php", "ewiki_page_wikiuserlogin", 0),
+# "PhpInfo" => array("contrib/page_phpinfo.php", "ewiki_page_phpinfo", 0),
+# "ImageGallery" => array("contrib/page_imagegallery.php", "ewiki_page_image_gallery", 0),
+# "SinceUpdatedPages" => array("contrib/page_since_updates.php", "ewiki_page_since_updates", 0),
+# "TextUpload" => array("contrib/page_textupload.php", "ewiki_page_textupload", 0),
+ "HitCounter" => array("contrib/page_hitcounter.php", "ewiki_page_hitcounter", 0),
+# "SearchCache" => array("admin/page_searchcache.php", "ewiki_cache_generated_pages", 0),
+# "SearchAndReplace" => array("admin/page_searchandreplace.php", "ewiki_page_searchandreplace", 0),
+# "FileUpload" => array("downloads.php", "ewiki_page_fileupload", 0),
+# "FileDownload" => array("downloads.php", "ewiki_page_filedownload", 0),
+ "PowerSearch" => array("page_powersearch.php", "ewiki_page_powersearch", 0),
+# "AboutPlugins" => array("page_aboutplugins.php", "ewiki_page_aboutplugins", 0),
+ "OrphanedPages" => array("page_orphanedpages.php", "ewiki_page_orphanedpages", 0),
+ "PageIndex" => array("page_pageindex.php", "ewiki_page_index", 0),
+ "RandomPage" => array("page_randompage.php", "ewiki_page_random", 0),
+ "WantedPages" => array("page_wantedpages.php", "ewiki_page_wantedpages", 0),
+ "WordIndex" => array("page_wordindex.php", "ewiki_page_wordindex", 0),
);
<?xml version="1.0" ?>
<activityset setno="2">
- <title>Maths</title>
- <questions>
- <question type="multiChoice">
- <text>The ages, in years, of 10 horses in a field were 3, 3, 4, 5, 7, 7, 7, 8, 8, 8,<p>
+ <title>Maths</title>
+ <questions>
+ <question type="multiChoice">
+ <text>The ages, in years, of 10 horses in a field were 3, 3, 4, 5, 7, 7, 7, 8, 8, 8,<p>
Which one of the following is true?</text>
- <award>1</award>
- <hint>mean = (3+3+4+5+7+7+7+8+8+8)/10 = 6<p>
+ <award>1</award>
+ <hint>mean = (3+3+4+5+7+7+7+8+8+8)/10 = 6<p>
median = 7 i.e the middle number<p>
range = 8-3 = 5</hint>
- <answer>
- <option correct="yes">median > mean > range</option>
- <option correct="no">mean = median</option>
- <option correct="no">mean > median > range</option>
- <option correct="no">median > range > mean</option>
- </answer>
- </question>
- <question type="multiChoice">
- <text>At a college, students are given a points score calculated from their GCSE grades.<p>
+ <answer>
+ <option correct="yes">median > mean > range</option>
+ <option correct="no">mean = median</option>
+ <option correct="no">mean > median > range</option>
+ <option correct="no">median > range > mean</option>
+ </answer>
+ </question>
+ <question type="multiChoice">
+ <text>At a college, students are given a points score calculated from their GCSE grades.<p>
Someone with 4 A grades and 4 B grades gains a score of 36 points.<br>Someone with 2 A grades and 4 B grades gains a score of 26 points.<br>Someone with 3 A grades and 3 B grades would have a score of</text>
- <award>1</award>
- <hint>4A + 4B = 36 and 2A + 4B = 26<p>solving simultaneously gives A = 5 and B = 4</hint>
- <answer>
- <option correct="yes">27 points</option>
- <option correct="no">21 points</option>
- <option correct="no">30 points</option>
- <option correct="no">31 points</option>
- </answer>
- </question>
- <question type="multiChoice">
- <text>A sequence consists of adding the previous three terms together to form the next term. The first three terms of the sequence are 1, 2, 3.<p>
+ <award>1</award>
+ <hint>4A + 4B = 36 and 2A + 4B = 26<p>solving simultaneously gives A = 5 and B = 4</hint>
+ <answer>
+ <option correct="yes">27 points</option>
+ <option correct="no">21 points</option>
+ <option correct="no">30 points</option>
+ <option correct="no">31 points</option>
+ </answer>
+ </question>
+ <question type="multiChoice">
+ <text>A sequence consists of adding the previous three terms together to form the next term. The first three terms of the sequence are 1, 2, 3.<p>
What is the sixth term in the sequence?</text>
- <award>1</award>
- <hint>1, 2, 3, 6, 11, ...</hint>
- <answer>
- <option correct="yes">20</option>
- <option correct="no">6</option>
- <option correct="no">11</option>
- <option correct="no">13</option>
- </answer>
- </question>
- <question type="multiChoice">
- <text>The value of an item is described as decreasing exponentially. Which description below best matches this statement?</text>
- <award>1</award>
- <hint>No hint - you either know this or you don't!</hint>
- <answer>
- <option correct="yes">The value falls by a smaller amount each year.</option>
- <option correct="no">The value falls by the same amount each year.</option>
- <option correct="no">The value falls by the same amount each year for a while, and then remains constant.</option>
- <option correct="no">The value falls by a larger amount each year.</option>
- </answer>
- </question>
- <question type="multiChoice">
- <text>Consider the statement<p>
+ <award>1</award>
+ <hint>1, 2, 3, 6, 11, ...</hint>
+ <answer>
+ <option correct="yes">20</option>
+ <option correct="no">6</option>
+ <option correct="no">11</option>
+ <option correct="no">13</option>
+ </answer>
+ </question>
+ <question type="multiChoice">
+ <text>The value of an item is described as decreasing exponentially. Which description below best matches this statement?</text>
+ <award>1</award>
+ <hint>No hint - you either know this or you don't!</hint>
+ <answer>
+ <option correct="yes">The value falls by a smaller amount each year.</option>
+ <option correct="no">The value falls by the same amount each year.</option>
+ <option correct="no">The value falls by the same amount each year for a while, and then remains constant.</option>
+ <option correct="no">The value falls by a larger amount each year.</option>
+ </answer>
+ </question>
+ <question type="multiChoice">
+ <text>Consider the statement<p>
"Schools with high numbers of pupils on free school meals do not do well in league tables."<p>
Which of the following statements follows logically from the one above?</text>
- <award>1</award>
- <hint>Factors other than the number of pupils on free school meals affect how well a school does in league tables.</hint>
- <answer>
- <option correct="yes">Schools which do well in league tables do not have high numbers of pupils on free school meals.</option>
- <option correct="no">Schools with low numbers of pupils on free school meals do well in league tables.</option>
- <option correct="no">Making all pupils pay for school meals will improve league table results.</option>
- <option correct="no">Schools which do not do well in league tables have high numbers of pupils on free school meals.</option>
- </answer>
- </question>
- <question type="multiChoice">
- <text>The force between two point electric charges is inversely proportional to the square of their distance apart. What effect does doubling this distance have on the force?</text>
- <award>1</award>
- <hint>Inversely proportional means that increasing the distance decreases the force.<br>2 squared gives 4.</hint>
- <answer>
- <option correct="yes">The force decreases by a factor of four.</option>
- <option correct="no">The force is halved.</option>
- <option correct="no">The force is doubled.</option>
- <option correct="no">The force increases by a factor of four.</option>
- </answer>
- </question>
- <question type="multiChoice">
- <text>Two of the five playing cards that Colin has are aces. He shuffles the five cards, then puts them face down on the table. Madge takes a card and then another. The probability that she now has <b>both</b> of the aces is</text>
- <award>1</award>
- <hint>2/5 x 1/4</hint>
- <answer>
- <option correct="yes">1/10</option>
- <option correct="no">4/25</option>
- <option correct="no">1/5</option>
- <option correct="no">2/5</option>
- </answer>
- </question>
- <question type="multiChoice">
- <text>A college's guidelines say that classes must have a minimum of 12 students and a maximum of 20 students. For what numbers of students studying a particular subject is it impossible to run classes without breaking the guidelines?</text>
- <award>1</award>
- <hint>between 12 and 20 students - one class<br>
+ <award>1</award>
+ <hint>Factors other than the number of pupils on free school meals affect how well a school does in league tables.</hint>
+ <answer>
+ <option correct="yes">Schools which do well in league tables do not have high numbers of pupils on free school meals.</option>
+ <option correct="no">Schools with low numbers of pupils on free school meals do well in league tables.</option>
+ <option correct="no">Making all pupils pay for school meals will improve league table results.</option>
+ <option correct="no">Schools which do not do well in league tables have high numbers of pupils on free school meals.</option>
+ </answer>
+ </question>
+ <question type="multiChoice">
+ <text>The force between two point electric charges is inversely proportional to the square of their distance apart. What effect does doubling this distance have on the force?</text>
+ <award>1</award>
+ <hint>Inversely proportional means that increasing the distance decreases the force.<br>2 squared gives 4.</hint>
+ <answer>
+ <option correct="yes">The force decreases by a factor of four.</option>
+ <option correct="no">The force is halved.</option>
+ <option correct="no">The force is doubled.</option>
+ <option correct="no">The force increases by a factor of four.</option>
+ </answer>
+ </question>
+ <question type="multiChoice">
+ <text>Two of the five playing cards that Colin has are aces. He shuffles the five cards, then puts them face down on the table. Madge takes a card and then another. The probability that she now has <b>both</b> of the aces is</text>
+ <award>1</award>
+ <hint>2/5 x 1/4</hint>
+ <answer>
+ <option correct="yes">1/10</option>
+ <option correct="no">4/25</option>
+ <option correct="no">1/5</option>
+ <option correct="no">2/5</option>
+ </answer>
+ </question>
+ <question type="multiChoice">
+ <text>A college's guidelines say that classes must have a minimum of 12 students and a maximum of 20 students. For what numbers of students studying a particular subject is it impossible to run classes without breaking the guidelines?</text>
+ <award>1</award>
+ <hint>between 12 and 20 students - one class<br>
between 24 and 36 students - two classes<br>
between 36 and 40 students - two classes</hint>
- <answer>
- <option correct="yes">between 20 and 24 students</option>
- <option correct="no">between 12 and 20 students</option>
- <option correct="no">between 24 and 36 students</option>
- <option correct="no">between 36 and 40 students</option>
- </answer>
- </question>
- <question type="multiChoice">
- <text>The ages of two friends are in the ratio 3:4. In 8 years time their ages will be in the ratio 5:6. How old are they now?</text>
- <award>1</award>
- <hint>(12+8):(16+8) = 20:24 = 5:6</hint>
- <answer>
- <option correct="yes">12, 16</option>
- <option correct="no">3, 4</option>
- <option correct="no">6, 8</option>
- <option correct="no">9, 12</option>
- </answer>
- </question>
- <question type="multiChoice">
- <text>A heavy construction vehicle travels for 40 minutes between sites, at an average speed of 16 km per second. The distance between sites is</text>
- <award>1</award>
- <hint>16/60 x 40</hint>
- <answer>
- <option correct="yes">10.7 km</option>
- <option correct="no">2.5 km</option>
- <option correct="no">6.4 km</option>
- <option correct="no">38.4 km</option>
- </answer>
- </question>
- <question type="multianswerchoice">
- <text>Which of the following are features of a Virtual Learning Environment? (Select all that apply)</text>
- <hint />
- <answer>
- <option correct="yes" award="1" deduct="0">course resources are available from home and from college</option>
- <option correct="yes" award="1" deduct="0">forums enable collaborative work</option>
- <option correct="yes" award="1" deduct="0">assessments can give instant feedback</option>
- <option correct="yes" award="1" deduct="0">course progress is recorded</option>
- <option correct="no" award="1" deduct="0">kettle is put on automatically for tea/coffee</option>
- </answer>
- </question>
- <question type="multianswerchoice">
- <text>Which of the following may a Virtual Learning Environment be used for? (Select all that apply)</text>
- <hint />
- <answer>
- <option correct="yes" award="1" deduct="1">delivering a course online</option>
- <option correct="yes" award="1" deduct="1">supporting face-to-face teaching</option>
- <option correct="no" award="1" deduct="0">as a complete replacement for teachers</option>
- </answer>
- </question>
- </questions>
+ <answer>
+ <option correct="yes">between 20 and 24 students</option>
+ <option correct="no">between 12 and 20 students</option>
+ <option correct="no">between 24 and 36 students</option>
+ <option correct="no">between 36 and 40 students</option>
+ </answer>
+ </question>
+ <question type="multiChoice">
+ <text>The ages of two friends are in the ratio 3:4. In 8 years time their ages will be in the ratio 5:6. How old are they now?</text>
+ <award>1</award>
+ <hint>(12+8):(16+8) = 20:24 = 5:6</hint>
+ <answer>
+ <option correct="yes">12, 16</option>
+ <option correct="no">3, 4</option>
+ <option correct="no">6, 8</option>
+ <option correct="no">9, 12</option>
+ </answer>
+ </question>
+ <question type="multiChoice">
+ <text>A heavy construction vehicle travels for 40 minutes between sites, at an average speed of 16 km per second. The distance between sites is</text>
+ <award>1</award>
+ <hint>16/60 x 40</hint>
+ <answer>
+ <option correct="yes">10.7 km</option>
+ <option correct="no">2.5 km</option>
+ <option correct="no">6.4 km</option>
+ <option correct="no">38.4 km</option>
+ </answer>
+ </question>
+ <question type="multianswerchoice">
+ <text>Which of the following are features of a Virtual Learning Environment? (Select all that apply)</text>
+ <hint />
+ <answer>
+ <option correct="yes" award="1" deduct="0">course resources are available from home and from college</option>
+ <option correct="yes" award="1" deduct="0">forums enable collaborative work</option>
+ <option correct="yes" award="1" deduct="0">assessments can give instant feedback</option>
+ <option correct="yes" award="1" deduct="0">course progress is recorded</option>
+ <option correct="no" award="1" deduct="0">kettle is put on automatically for tea/coffee</option>
+ </answer>
+ </question>
+ <question type="multianswerchoice">
+ <text>Which of the following may a Virtual Learning Environment be used for? (Select all that apply)</text>
+ <hint />
+ <answer>
+ <option correct="yes" award="1" deduct="1">delivering a course online</option>
+ <option correct="yes" award="1" deduct="1">supporting face-to-face teaching</option>
+ <option correct="no" award="1" deduct="0">as a complete replacement for teachers</option>
+ </answer>
+ </question>
+ </questions>
</activityset>
<?php
echo '<p class="helplink">';
echo page_doc_link(get_string('moodledocslink'));
- echo '</p>';
+ echo '</p>';
?>
<?php if ($navigation) { ?>
<attach event="ondocumentready" handler="parseStylesheets" />
<script language="JScript">
/**
- * PSUEDOS - V1.21.041022 - hover & active
- * ---------------------------------------------
- * Peterned - http://www.xs4all.nl/~peterned/
- * (c) 2004 - Peter Nederlof
+ * PSUEDOS - V1.21.041022 - hover & active
+ * ---------------------------------------------
+ * Peterned - http://www.xs4all.nl/~peterned/
+ * (c) 2004 - Peter Nederlof
*
- * Credits - Arnoud Berendsen
- * - Martin Reurings
- * for inspiring me and finding really sick bugs
+ * Credits - Arnoud Berendsen
+ * - Martin Reurings
+ * for inspiring me and finding really sick bugs
*
- * howto: body { behavior:url("csshover.htc"); }
- * ---------------------------------------------
+ * howto: body { behavior:url("csshover.htc"); }
+ * ---------------------------------------------
*/
var currentSheet, doc = window.document;
var activators = {
- onhover:{on:'onmouseover', off:'onmouseout'},
- onactive:{on:'onmousedown', off:'onmouseup'}
+ onhover:{on:'onmouseover', off:'onmouseout'},
+ onactive:{on:'onmousedown', off:'onmouseup'}
}
function parseStylesheets() {
- var sheets = doc.styleSheets, l = sheets.length;
- for(var i=0; i<l; i++)
- parseStylesheet(sheets[i]);
+ var sheets = doc.styleSheets, l = sheets.length;
+ for(var i=0; i<l; i++)
+ parseStylesheet(sheets[i]);
}
- function parseStylesheet(sheet) {
- var l, rules, imports;
- if(sheet.imports) {
- imports = sheet.imports, l = imports.length;
- for(var i=0; i<l; i++)
- parseStylesheet(sheet.imports[i]);
- }
+ function parseStylesheet(sheet) {
+ var l, rules, imports;
+ if(sheet.imports) {
+ imports = sheet.imports, l = imports.length;
+ for(var i=0; i<l; i++)
+ parseStylesheet(sheet.imports[i]);
+ }
- rules = (currentSheet = sheet).rules, l = rules.length;
- for(var j=0; j<l; j++) parseCSSRule(rules[j]);
- }
+ rules = (currentSheet = sheet).rules, l = rules.length;
+ for(var j=0; j<l; j++) parseCSSRule(rules[j]);
+ }
- function parseCSSRule(rule) {
- var select = rule.selectorText, style = rule.style.cssText;
- if(!(/(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i).test(select) || !style) return;
-
- var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, 'on$1');
- var newSelect = select.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi, '.$2' + pseudo);
- var className = (/\.([a-z0-9_-]*on(hover|active))/i).exec(newSelect)[1];
- var affected = select.replace(/:hover.*$/, '');
- var elements = getElementsBySelect(affected);
+ function parseCSSRule(rule) {
+ var select = rule.selectorText, style = rule.style.cssText;
+ if(!(/(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i).test(select) || !style) return;
+
+ var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, 'on$1');
+ var newSelect = select.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi, '.$2' + pseudo);
+ var className = (/\.([a-z0-9_-]*on(hover|active))/i).exec(newSelect)[1];
+ var affected = select.replace(/:hover.*$/, '');
+ var elements = getElementsBySelect(affected);
- currentSheet.addRule(newSelect, style);
- for(var i=0; i<elements.length; i++)
- new HoverElement(elements[i], className, activators[pseudo]);
- }
+ currentSheet.addRule(newSelect, style);
+ for(var i=0; i<elements.length; i++)
+ new HoverElement(elements[i], className, activators[pseudo]);
+ }
function HoverElement(node, className, events) {
- if(!node.hovers) node.hovers = {};
- if(node.hovers[className]) return;
- node.hovers[className] = true;
- node.attachEvent(events.on,
- function() { node.className += ' ' + className; });
- node.attachEvent(events.off,
- function() { node.className =
- node.className.replace(new RegExp('\\s+'+className, 'g'),''); });
+ if(!node.hovers) node.hovers = {};
+ if(node.hovers[className]) return;
+ node.hovers[className] = true;
+ node.attachEvent(events.on,
+ function() { node.className += ' ' + className; });
+ node.attachEvent(events.off,
+ function() { node.className =
+ node.className.replace(new RegExp('\\s+'+className, 'g'),''); });
}
function getElementsBySelect(rule) {
- var parts, nodes = [doc];
- parts = rule.split(' ');
- for(var i=0; i<parts.length; i++) {
- nodes = getSelectedNodes(parts[i], nodes);
- } return nodes;
+ var parts, nodes = [doc];
+ parts = rule.split(' ');
+ for(var i=0; i<parts.length; i++) {
+ nodes = getSelectedNodes(parts[i], nodes);
+ } return nodes;
}
- function getSelectedNodes(select, elements) {
- var result, node, nodes = [];
- var classname = (/\.([a-z0-9_-]+)/i).exec(select);
- var identify = (/\#([a-z0-9_-]+)/i).exec(select);
- var tagName = (/^[a-z0-9]+/i).exec(select.toUpperCase()) || '*';
- for(var i=0; i<elements.length; i++) {
- result = elements[i].getElementsByTagName(tagName);
- for(var j=0; j<result.length; j++) {
- node = result[j];
- if((identify && node.id != identify[1]) || (classname && !(new RegExp('\\b' +
- classname[1] + '\\b').exec(node.className)))) continue;
- nodes[nodes.length] = node;
- }
- } return nodes;
- }
+ function getSelectedNodes(select, elements) {
+ var result, node, nodes = [];
+ var classname = (/\.([a-z0-9_-]+)/i).exec(select);
+ var identify = (/\#([a-z0-9_-]+)/i).exec(select);
+ var tagName = (/^[a-z0-9]+/i).exec(select.toUpperCase()) || '*';
+ for(var i=0; i<elements.length; i++) {
+ result = elements[i].getElementsByTagName(tagName);
+ for(var j=0; j<result.length; j++) {
+ node = result[j];
+ if((identify && node.id != identify[1]) || (classname && !(new RegExp('\\b' +
+ classname[1] + '\\b').exec(node.className)))) continue;
+ nodes[nodes.length] = node;
+ }
+ } return nodes;
+ }
</script>
***/
.que {
- border-color: #DDD;
+ border-color: #DDD;
}
.que .r0 {
- background-color: #F5F5F5;
+ background-color: #F5F5F5;
}
.que .r1 {
- background-color: #EEE;
+ background-color: #EEE;
}
.calculated .answer,
.numerical .answer,
.shortanswer .answer,
.truefalse .answer {
- background-color: #EEE;
+ background-color: #EEE;
}
.que .feedback {
border-color: #DDD;
-}
+}
.que.multianswer .incorrect {
background-color: #faa;
}
#mod-quiz-attempt #page {
- text-align: center;
+ text-align: center;
}
body#mod-quiz-report table#attempts,