Backporting small changes from Head
This commit is contained in:
@@ -755,8 +755,8 @@ class grade_item extends grade_object {
|
||||
return null;
|
||||
|
||||
} else {
|
||||
dubugging("Unkown grade type");
|
||||
return null;;
|
||||
debugging("Unknown grade type");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -104,6 +104,7 @@ class grade_scale extends grade_object {
|
||||
* @return int PK ID if successful, false otherwise
|
||||
*/
|
||||
function insert($source=null) {
|
||||
$this->timecreated = time();
|
||||
$this->timemodified = time();
|
||||
return parent::insert($source);
|
||||
}
|
||||
|
||||
@@ -50,6 +50,11 @@ In detail, the libraries added here are:
|
||||
Greg Beaver and Martin Jansen
|
||||
- License: PHP
|
||||
- http://pear.php.net/package/PEAR
|
||||
- PEAR Console_Getopt
|
||||
- Current version: 1.2.3
|
||||
- by Andrei Zmievski, Greg Beaver, Stig Bakken
|
||||
- License: PHP (Permission given to Moodle to redistribute under GPL)
|
||||
- http://pear.php.net/package/Console_Getopt
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -102,14 +102,16 @@ class backuplib_test extends UnitTestCase {
|
||||
backup_copy_user_files($preferences);
|
||||
|
||||
// Check for the existence of the backup file
|
||||
$this->assertTrue(file_exists("$CFG->dataroot/temp/backup/$preferences->backup_unique_code/user_files"));
|
||||
$backupfile = "$CFG->dataroot/temp/backup/$preferences->backup_unique_code/user_files";
|
||||
$this->assertTrue(file_exists($backupfile));
|
||||
|
||||
// Check for the existence of the user files in the backup file
|
||||
foreach ($this->testfiles as $file) {
|
||||
$parts = explode('/', $file);
|
||||
$section = $parts[0];
|
||||
$userid = $parts[1];
|
||||
$this->assertTrue(file_exists("$CFG->dataroot/temp/backup/$preferences->backup_unique_code/user_files/$section/$userid/f1.gif"));
|
||||
$userimage = "$CFG->dataroot/temp/backup/$preferences->backup_unique_code/user_files/$section/$userid/f1.gif";
|
||||
$this->assertTrue(file_exists($userimage));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -204,7 +204,7 @@ function chat_cron () {
|
||||
|
||||
chat_delete_old_users();
|
||||
|
||||
/// Delete old messages
|
||||
/// Delete old messages with a
|
||||
/// single SQL query.
|
||||
$subselect = "SELECT c.keepdays
|
||||
FROM {$CFG->prefix}chat c
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
$olduserid = backup_todb($mes_info['#']['USERID']['0']['#']);
|
||||
|
||||
//Now, build the CHAT_MESSAGES record structure
|
||||
$message = new object();
|
||||
$message->chatid = $new_chat_id;
|
||||
$message->userid = backup_todb($mes_info['#']['USERID']['0']['#']);
|
||||
$message->groupid = backup_todb($mes_info['#']['GROUPID']['0']['#']);
|
||||
|
||||
@@ -272,6 +272,7 @@
|
||||
$olduserid = backup_todb($dis_info['#']['USERID']['0']['#']);
|
||||
|
||||
//Now, build the FORUM_DISCUSSIONS record structure
|
||||
$discussion = new object();
|
||||
$discussion->forum = $forum_id;
|
||||
$discussion->course = $restore->course_id;
|
||||
$discussion->name = backup_todb($dis_info['#']['NAME']['0']['#']);
|
||||
|
||||
@@ -359,7 +359,13 @@ function forum_print_big_search_form($course) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo Document this function
|
||||
* This function takes each word out of the search string, makes sure they are at least
|
||||
* two characters long and returns an array containing every good word.
|
||||
*
|
||||
* @param string $words String containing space-separated strings to search for
|
||||
* @param string $prefix String to prepend to the each token taken out of $words
|
||||
* @returns array
|
||||
* @todo Take the hardcoded limit out of this function and put it into a user-specified parameter
|
||||
*/
|
||||
function forum_clean_search_terms($words, $prefix='') {
|
||||
$searchterms = explode(' ', $words);
|
||||
|
||||
Reference in New Issue
Block a user