One thing I need to do soon is release Moodle 1.5.1 and also formally announce Moodle 1.5.x (which is something I never got around to doing with the original release in all the rush at the time ).
I would like to do this within 12 hours, unless anyone knows any reason why I shouldn't. Please let me know if you have any showstoppers.
Only one bug I'm aware of affecting some of my code, and has a valid workaround. I'm getting on the plane in less than 24hs, and won't be able to fix it before I get to Europe. The problem has been reported here http://moodle.org/mod/forum/discuss.php?d=25828 but I'm not sure that the fix offered is good for the general situation.
I don't think it's a major issue -- it's a UI config issue affecting just CAS users, and people have found a workaround setting the values in the LDAP page. I'll try to take a look at it, but can't promise much. It's all a rush before the flight.
Haven't been tracking bugzilla much, just some key forums.
1/ I would like to add some tweaks for relinking during restore, Eloy is reviewing a patch.
2/ There is a typo in auth/ldap/lib.php auth_user_activate(), semicolon after default and maybe missing break in the same switch statement.
3/ I need help with testing of security related patches.
skodak
Petr's code to improve backup/restore relinking seems to be working pretty well but I've performed initial tests only. (http://moodle.org/mod/forum/discuss.php?d=26530).
I would like to check it a bit more intensively (with one custom heavy-linked course I'm building) before submitting it to CVS (1-2 days, depending of my "legal" work! ).
Anyway, my vote goes to release 1.5.1 with or without such patch applied. The number of improvements since 1.5 are really huge and significant. So, from *my* list, no problem to go ahead.
Ciao
PD: I want to seized the opportunity to point developers to the list of 1.4 and 1.5 unmerged files. I think we should review and close 1.4 ASAP.
Edited: Uhm, curiously, the wiki page stops to show 1.5 unmerged files before ending. Perhaps a wiki-bug?
bug 3515
bug 3528
bug 3564
http://moodle.org/mod/forum/discuss.php?d=25918#122730
That I wanted to fix, but it's been difficult finding time in London.
Affects postgres users.
I just got my coding mood back, I could fix quite a lot tonight + tomorrow...
Anyway I need a tester for auth/CAS really badly, I think the current code may not work. Please!!
Critical:
- fixing CAS - need testers !!!!
Minor:
- lesson - check the use of format_text(), there should be no cleaning
- alternate login url and new sessions - check if it works
There will be no more security fixes in this release.
And we should also bump up version numbers of modules and its dependency on Moodle 1.5.1, because most of them would not work anyway and it also helps to detect incomplete==mixed installs.
I will commit it in about 2 hours if nobody protest...
The bug is related to the Journal upgrade to Assignment (my code) ... in the three cases of this bug that I've seen now:
- The Journals are hidden (as expected)
- The new Online Assignment activities are created and can be seen on the Assignment index page (as expected)
- The new Online Assignment activities are not showing up in the main course page (big problem).
Help wanted!
- If others could test this journal->assignment upgrade thoroughly during the next 6 or 7 hours that would be terrific and really save me some time tomorrow!
- We also need to generate release notes for 1.5.1 ... Martin Langhoff and Penny have been helping with point release notes recently but they're away in Helsinki currently ... any volunteers for this too? The best way is to look through the CHANGES, and summarize stuff here on this Wiki page.
MySQL logical operator '&&' is not allowed in Postgresql
have to install postresql first in my Suse box though...
Do you have any sample 1.4x db dump with those problems? Could you send it to me?
Forgive me for butting in here - but I'm the PostgreSQL user whose plea for help Petr linked to above. Stumbled into this forum purely by accident...
I have a development box running PostgreSQL 7.4.5 as well as my production box running 7.4. Can I be of any help in testing?
Thanks,
Worth
Index: lib.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/assignment/lib.php,v retrieving revision 1.118.2.5 diff -u -r1.118.2.5 lib.php --- lib.php 5 Jul 2005 06:28:53 -0000 1.118.2.5 +++ lib.php 7 Jul 2005 21:43:14 -0000 @@ -757,7 +757,7 @@ } - $select = 'SELECT u.id, u.id, u.firstname, u.lastname, u.picture, s.id AS submissionid, s.grade, s.comment, s.timemodified, s.timemarked, ((s.timemarked > 0) && (s.timemarked >= s.timemodified)) AS status '; + $select = 'SELECT u.id, u.id, u.firstname, u.lastname, u.picture, s.id AS submissionid, s.grade, s.comment, s.timemodified, s.timemarked, ((s.timemarked > 0) AND (s.timemarked >= s.timemodified)) AS status '; $sql = 'FROM '.$CFG->prefix.'user u '. 'LEFT JOIN '.$CFG->prefix.'assignment_submissions s ON u.id = s.userid AND s.assignment = '.$this->assignment->id.' '. 'WHERE '.$where.'u.id IN ('.implode(',', array_keys($users)).') ';
To Martín: could you please test/commit it?
This change allowed me to view submitted assignments without throwing the error. Success.
However - while working through this process and testing, I tried to modify some of the existing assignments. Each attempt yielded the following error:
ERROR: invalid input syntax for integer: ""
UPDATE mdl_assignment SET course = '9', name = 'Assignment One', description = 'Assignment decription', format = '1', assignmenttype = 'offline', resubmit = '', preventlate = '0', emailteachers = '', var1 = '', var2 = '', var3 = '', var4 = '', var5 = '', maxbytes = '5242880', timedue = '1286979300', timeavailable = '0', grade = '', timemodified = '1120780256' WHERE id = '4'
Could not update the assignment |
This error was the same regardless of whether the code above was "&&" or "AND" so it looks to be unrelated.
I could create a new assignment, but got the same error if I tried to modify it after submitting it.
I'm bailing now, but will have a few hours in the morning (~12 hours from now - I'm in US Eastern time zone) and would like to help. After about 14:00 EDT tomorrow, I'll be out-of-pocket for much of the following week.
Thanks, Petr, and I hope this helps.
I will work on it today.
Thanks for testing & reporting...
Working on it - it will take me some time, I am sure the NZ team would fix it in seconds
function s($var) {
if (empty($var)) {
return '';
}
return htmlSpecialChars(stripslashes_safe($var));
}
If you send number 0, it prints it as '', it causes a major trouble if you use it in forms - see the discussion here.
dirty quick fix:
if ($var === 0 || $var === '0') {
return '0';
} else if ($var == '')) {
return '';
}
any better ideas?
The use of empty here is encouraging bad coding style, would it break anything, maybe keep it here for 1.5.1 and remove in 1.6?
Index: weblib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/weblib.php,v
retrieving revision 1.469.2.13
diff -u -r1.469.2.13 weblib.php --- weblib.php 6 Jul 2005 06:54:58 -0000 1.469.2.13 +++ weblib.php 8 Jul 2005 12:48:36 -0000 @@ -98,9 +98,11 @@ * @return string */ function s($var) { - - if (empty($var)) { - return ''; + if (!isset($var)) { // TODO: temporary hack to make it more + return ''; // compatible with 1.5, removed in 1.6 + } + if ($var == '0') { // for integer 0, boolean false, string '0' + return '0'; } return htmlSpecialChars(stripslashes_safe($var)); } @@ -115,9 +117,11 @@ * @return string */ function p($var) { - - if (empty($var)) { - echo ''; + if (!isset($var)) { // TODO: temporary hack to make it more + echo ''; // compatible with 1.5, removed in 1.6 + } + if ($var == '0') { // for integer 0, boolean false, string '0' + echo '0'; } echo htmlSpecialChars(stripslashes_safe($var)); }
edit: I did not think much about p() - I just copied the bug from the old code to my new one :-\
Index: weblib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/weblib.php,v
retrieving revision 1.469.2.13
diff -u -r1.469.2.13 weblib.php --- weblib.php 6 Jul 2005 06:54:58 -0000 1.469.2.13 +++ weblib.php 8 Jul 2005 13:40:11 -0000 @@ -98,9 +98,11 @@ * @return string */ function s($var) { - - if (empty($var)) { - return ''; + if (!isset($var)) { // TODO: temporary hack to make it more + return ''; // compatible with 1.5, removed in 1.6 + } + if ($var == '0') { // for integer 0, boolean false, string '0' + return '0'; } return htmlSpecialChars(stripslashes_safe($var)); } @@ -115,11 +117,11 @@ * @return string */ function p($var) { - - if (empty($var)) { - echo ''; + if ($var == '0') { // for integer 0, boolean false, string '0' + echo '0'; + } else { + echo htmlSpecialChars(stripslashes_safe($var)); } - echo htmlSpecialChars(stripslashes_safe($var)); }
Ok, Petr, I have this in weblib.php:
function s($var){
if (!isset ($var)) { // TODO: temporary hack to make it more
return ''; // compatible with 1.5, removed in 1.6
}
if ($var == '0') { // for interger 0, boolean false, string '0'
return '0';
}
return htmlSpecialChars(stripslashes_safe($var));
}
/**
* Add quotes to HTML characters...
* ...@return string
*/
function p($var) {
if ($var == '0') { // for integer 0, boolean false, string '0'
echo '0';
} else {
echo htmlSpecialChars(stripslashes_safe($var));
}
}
I try an update to a course and again get: ERROR: invalid input syntax for integer: ""
Have I flubbed it?
Thanks,
Worth
Wait a minute...
edit: logical bug with resubmit, need more time to think about it...
Index: mod.html =================================================================== RCS file: /cvsroot/moodle/moodle/mod/assignment/mod.html,v retrieving revision 1.36 diff -u -r1.36 mod.html --- mod.html 19 May 2005 14:13:21 -0000 1.36 +++ mod.html 8 Jul 2005 14:29:06 -0000 @@ -13,9 +13,6 @@ if (empty($form->assignmenttype)) { $form->assignmenttype = "uploadsingle"; } - if (empty($form->resubmit)) { - $form->resubmit = ""; - } if (!isset($form->grade)) { $form->grade = 100; }
$value = clean_text($value);
If there is any place that would be compromised by this, please report it - but the correct solution is to clean the text before feeding to editor, not here. There was one such place, but I have fixed it at the same time. Anyway it was added quite recently, so I assume that it did not create any problems...
Just confirming:
With 3 changes above re: weblib.php (2) and mod.html, the assignments are updating cheerfully...
Thanks!
Worth
I did not commit them, waiting for Martin's decision...
How did this escape testing for two months? Was no-one using PostgreSQL using assignments?
(files lib/weblib.php and mod/assignment/mod.html)
In any case, I am continuing my work on 1.5.x branch for several days. Because IMO there are still some serious bugs left in 1.5.1 if we do not intend to make 1.6 stable before the start of semester in September.
Damn blind spot...
Hey, Martin!
I have use Moodle (Moodle 1.5.1 (2005060210)) with PG and I can report some bugs. For example:
(...)I have also a problem with the Assignment module after this installation. Some strange... see http://moodle.org/mod/forum/discuss.php?d=27513 (...)
But nobody give me a response...
Bug 3637 (really bad, though not many people experience it) is under investigation, we 're waiting for feedback from the reporter. May be solved really really soon.
Error Message: 1071: Specified key was too long. Max key length is 1000
The error occurs when creating the mdl_config_plugins table.
I apologize if this has been dealt with but searches turned up nothing other then recreating the database under a different character set.
As stronk7 noted, each varchar when using the UTF character set takes up three characters so you have to take that 1000 and divide it by 3 for the actual limit. So any index over 333 well cause the index error. Since the index is composed of 2 varchar (250) fields if you shorten those to varchar (150) it should work fine.
Peace - Anthony