-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Campus logic update #18
base: main
Are you sure you want to change the base?
Conversation
… in their Alma record. Corrected a comment typo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. We identified a number of potential enhancements during the code review for future implementation. These could be implemented when we determine whether to send unknown or blank campuses to ULS ILLiad.
@@ -38,7 +38,7 @@ | |||
*returns ExLibris API function | |||
*/ | |||
public function __construct(){ | |||
include_once 'vendor/tcdent/php-restclient/restclient.php'; | |||
include_once 'php-restclient/restclient.php'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is sourced here: https://github.com/tcdent/php-restclient , and is maintained, so we probably should be using composer for dependency management (or a git submodule).
workflow.php
Outdated
<p>Law School users, please see <a href="https://www.library.law.pitt.edu/research/interlibrary-loan-delivery">https://www.library.law.pitt.edu/research/interlibrary-loan-delivery</a> for interlibrary loan inforrmation.</p> | ||
LAW_PATRON; | ||
break; | ||
case "unknownCampus": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message for "unknownCampus" and "blankCampus" is nearly identical, and the action of the patron (askUs) and of the staff (lookup the record) is identical. This could potentially be simplified.
…vely. This eliminates the need to individually map query string parameters to form field names. Add other special borrower types for exclusion from external borrowing requests
…th remote borrowing privs to ULS Illiad. Will apply by default for any new campuses added to Alma
…o reduce number of API calls, refactor to continue to treat law campus patrons separately while using simplified logic overall
workflow.php
Outdated
$campus = $userRecord->campus_code->value; | ||
} | ||
//Barco Law Library users do not participate in Illiad, so we'll handle them separately later | ||
if ($user->getUserRecord($userId)->campus_code->value==='LAW' && $requestStatus !== 'specialBorrower') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why doesn't this also use $userRecord
, and will it not throw warning if ->campus_code
does not have a ->value
property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved by moving this inside the conditional that checks for the value property. No reason not to use $userRecord here. Switched. Thank you!
… use the cached user record instead of a separate API call
No description provided.