Merging from STABLE:

Fixed the annoying "...and the 1 Journals you had..." message when you have
no Journals at all, because I was tired of seeing it.

count(false) is 1 and not 0.
This commit is contained in:
defacer
2005-07-06 00:47:08 +00:00
parent e623c7f740
commit fdc36b2f98
2 changed files with 22 additions and 8 deletions
+11 -4
View File
@@ -96,10 +96,17 @@ function assignment_online_upgrade($oldversion) {
/// Hide the whole Journal module (but not individual items, just to make undo easier)
set_field('modules', 'visible', 0, 'name', 'journal');
notify('The Journal module is becoming obsolete and being replaced by the superior Online Assignments.
It has been disabled on your site, and the '.count($journals).' Journal activites you had have been
converted into Online Assignments. If you really want Journal back, you can enable it using the
"eye" icon here: Admin >> Modules >> Journal.');
if($journals === false) {
notify('The Journal module is becoming obsolete and being replaced by the superior Online Assignments, and
it has been disabled on your site. If you really want Journal back, you can enable it using the
"eye" icon here: Admin >> Modules >> Journal.');
}
else {
notify('The Journal module is becoming obsolete and being replaced by the superior Online Assignments.
It has been disabled on your site, and the '.count($journals).' Journal activites you had have been
converted into Online Assignments. If you really want Journal back, you can enable it using the
"eye" icon here: Admin >> Modules >> Journal.');
}
}
}
+11 -4
View File
@@ -96,10 +96,17 @@ function assignment_online_upgrade($oldversion) {
/// Hide the whole Journal module (but not individual items, just to make undo easier)
set_field('modules', 'visible', 0, 'name', 'journal');
notify('The Journal module is becoming obsolete and being replaced by the superior Online Assignments.
It has been disabled on your site, and the '.count($journals).' Journal activites you had have been
converted into Online Assignments. If you really want Journal back, you can enable it using the
"eye" icon here: Admin >> Modules >> Journal.');
if($journals === false) {
notify('The Journal module is becoming obsolete and being replaced by the superior Online Assignments, and
it has been disabled on your site. If you really want Journal back, you can enable it using the
"eye" icon here: Admin >> Modules >> Journal.');
}
else {
notify('The Journal module is becoming obsolete and being replaced by the superior Online Assignments.
It has been disabled on your site, and the '.count($journals).' Journal activites you had have been
converted into Online Assignments. If you really want Journal back, you can enable it using the
"eye" icon here: Admin >> Modules >> Journal.');
}
}
}