Skip to content
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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Campus logic update #18

wants to merge 10 commits into from

Conversation

wopsononock
Copy link
Collaborator

No description provided.

Copy link
Member

@ctgraham ctgraham left a 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';
Copy link
Member

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 Show resolved Hide resolved
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":
Copy link
Member

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') {
Copy link
Member

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?

Copy link
Collaborator Author

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants