From eedca4cd8d5ea30b44485b0bc4efd53dcd99d7ce Mon Sep 17 00:00:00 2001 From: Nicolas Hunstein Date: Fri, 24 Jan 2025 13:47:22 +0000 Subject: [PATCH] Bug 31270: Terminology - use "self-registration" Content-Type: text/plain; charset=utf-8 Standardize on the use of "self-registration" (and variations) for consistency in the OPAC and staff interface, instead of "self registration". Test plan: 1. Check the codebase for occurences of "self reg": . git grep "self reg" . git grep "selfreg" . git grep "Self reg" . git grep "Selfreg" 2. Note the occurences, excluding code comments, previous database updates, and previous release notes. 3. Search the system preferences for "self reg" and "selfreg". 4. Note the occurences in the results for the system preference descriptions (excluding system preference names) for: - PatronSelfRegistrationDefaultCategory - PatronSelfRegistrationEmailMustBeUnique - PatronSelfRegistrationLibraryList - PatronSelfRegistrationPrefillForm 5. Note the system preferences category heading for the OPAC - "Self registration and modification". 6. Apply the patch. 7. Repeat steps 1 to 5. There should now be no occurences (excluding code comments, previous database updates, and previous release notes). Signed-off-by: David Nind Signed-off-by: Marcel de Rooy --- installer/data/mysql/mandatory/sysprefs.sql | 4 ++-- .../prog/en/modules/admin/preferences/opac.pref | 12 ++++++------ misc/cronjobs/cleanup_database.pl | 4 ++-- t/db_dependent/Koha/Patron.t | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 336f05bd29..fb968a638c 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -616,10 +616,10 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('PatronSelfRegistrationBorrowerUnwantedField','',NULL,'Name the fields you don\'t want to display when registering a new patron via the OPAC.','free'), ('PatronSelfRegistrationConfirmEmail', '0', NULL, 'Require users to confirm their email address by entering it twice.', 'YesNo'), ('PatronSelfRegistrationDefaultCategory','','','A patron registered via the OPAC will receive a borrower category code set in this system preference.','free'), -('PatronSelfRegistrationEmailMustBeUnique', '0', 'If set, the field borrowers.email will be considered as a unique field on self registering', NULL, 'YesNo'), +('PatronSelfRegistrationEmailMustBeUnique', '0', 'If set, the field borrowers.email will be considered as a unique field on self-registering', NULL, 'YesNo'), ('PatronSelfRegistrationExpireTemporaryAccountsDelay','0',NULL,'If PatronSelfRegistrationDefaultCategory is enabled, this system preference controls how long a patron can have a temporary status before the account is deleted automatically. It is an integer value representing a number of days to wait before deleting a temporary patron account. Setting it to 0 disables the deleting of temporary accounts.','Integer'), ('PatronSelfRegistrationLibraryList','',NULL,'Only display libraries listed. If empty, all libraries are displayed.','Free'), -('PatronSelfRegistrationPrefillForm','1',NULL,'Display password and prefill login form after a patron has self registered','YesNo'), +('PatronSelfRegistrationPrefillForm','1',NULL,'Display password and prefill login form after a patron has self-registered','YesNo'), ('PatronSelfRegistrationVerifyByEmail','0',NULL,'If enabled, any patron attempting to register themselves via the OPAC will be required to verify themselves via email to activate their account.','YesNo'), ('PatronsPerPage','20','20','Number of Patrons Per Page displayed by default','Integer'), ('PhoneNotification','0',NULL,'If ON, enables generation of phone notifications to be sent by plugins','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index 24411cd343..c11f0dd09d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -792,7 +792,7 @@ OPAC: 0: "Don't use" - "the item collection code when finding items for the shelf browser." - Self registration and modification: + Self-registration and modification: - - pref: PatronSelfRegistration choices: @@ -812,8 +812,8 @@ OPAC: - pref: PatronSelfRegistrationDefaultCategory choices: patron-categories - "as the default patron category for patrons registered via the OPAC." - - "
WARNING: Do not use a regular patron category for self registration." - - "
If the misc/cronjobs/cleanup_database.pl cronjob is setup to delete unverified and unfinished OPAC self registrations, it will permanently and unrecoverably delete all patrons that have registered more than PatronSelfRegistrationExpireTemporaryAccountsDelay days ago (unless that delay is empty or zero)." + - "
WARNING: Do not use a regular patron category for self-registration." + - "
If the misc/cronjobs/cleanup_database.pl cronjob is setup to delete unverified and unfinished OPAC self-registrations, it will permanently and unrecoverably delete all patrons that have registered more than PatronSelfRegistrationExpireTemporaryAccountsDelay days ago (unless that delay is empty or zero)." - - Delete patrons still in the category indicated by PatronSelfRegistrationDefaultCategory - pref: PatronSelfRegistrationExpireTemporaryAccountsDelay @@ -852,9 +852,9 @@ OPAC: choices: 1: "Consider" 0: "Don't consider" - - "patron's email (borrowers.email) as unique on self registering. An email won't be accepted if it already exists in the database." + - "patron's email (borrowers.email) as unique on self-registering. An email won't be accepted if it already exists in the database." - - - "Enable the self registration for the following libraries:" + - "Enable the self-registration for the following libraries:" - pref: PatronSelfRegistrationLibraryList - (separate branchcode with |). - If empty, all libraries will be listed. @@ -863,7 +863,7 @@ OPAC: choices: 1: "Show and prefill" 0: "Don't show and prefill" - - "password and login form after a patron has self registered." + - "password and login form after a patron has self-registered." - - pref: PatronSelfRegistrationConfirmEmail choices: diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl index 306628472b..8784f366f5 100755 --- a/misc/cronjobs/cleanup_database.pl +++ b/misc/cronjobs/cleanup_database.pl @@ -98,8 +98,8 @@ Usage: $0 [-h|--help] [--confirm] [--sessions] [--sessdays DAYS] [-v|--verbose] --restrictions DAYS purge patrons restrictions expired since more than DAYS days. Defaults to 30 days if no days specified. --all-restrictions purge all expired patrons restrictions. - --del-exp-selfreg Delete expired self registration accounts - --del-unv-selfreg DAYS Delete unverified self registrations older than DAYS + --del-exp-selfreg Delete expired self-registration accounts + --del-unv-selfreg DAYS Delete unverified self-registrations older than DAYS --unique-holidays DAYS Delete all unique holidays older than DAYS --temp-uploads Delete temporary uploads. --temp-uploads-days DAYS Override the corresponding preference value. diff --git a/t/db_dependent/Koha/Patron.t b/t/db_dependent/Koha/Patron.t index 23acb9aa80..32189c6c95 100755 --- a/t/db_dependent/Koha/Patron.t +++ b/t/db_dependent/Koha/Patron.t @@ -1593,7 +1593,7 @@ subtest 'force_password_reset_when_set_by_staff tests' => sub { $patron->delete()->store()->discard_changes(); is( $patron->password_expired, 0, - "Patron forced into changing password but patron is self registered, password not expired." + "Patron forced into changing password but patron is self-registered, password not expired." ); $schema->storage->txn_rollback; -- 2.39.5