Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed the annoying "...and the 1 Journals you had..." message when yo…

…u have

no Journals at all, because I was tired of seeing it.

count(false) is 1 and not 0.
  • Loading branch information...
commit 4830bb4c53adf6f4f2e2efd0e989cef9df1a4a68 1 parent dca2e99
defacer authored
View
15 mod/assignment/type/online/db/mysql.php
@@ -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.');
+ }
}
}
View
15 mod/assignment/type/online/db/postgres7.php
@@ -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.');
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.