-
Notifications
You must be signed in to change notification settings - Fork 189
Add Project Affiliations Menu to Main Interface #9417
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
Conversation
php/libraries/User.class.inc
Outdated
| Store examiner's centerID with active status and radiologist flag, | ||
| ensuring centerID is a string | ||
| */ | ||
| $examiner_info[(string)$val['centerID']] = [ |
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.
Do we need that change? Does it solve an error?
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.
it was to stay consistent with my changes when I used to cast the projects and sites into strings but it doesn't affect functionality so it can removed.
php/libraries/User.class.inc
Outdated
| if (!empty($examiner_check) && !is_null($examiner_check)) { | ||
| $examiner_info = []; | ||
|
|
||
| if (!empty($examiner_check)&& !is_null($examiner_check)) { |
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.
Add back the space before &&
|
Notes from Oct. 25 EEG meeting discussion :
|
php/libraries/User.class.inc
Outdated
| ); | ||
| } else { | ||
| return $this->userInfo[$var]; | ||
| return $this->userInfo[$var] ?? null; |
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.
Can you explain the reasoning behind this change?
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.
it's to prevent an error if the key doesn't exist in the userinfo.
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.
a change like this impacts many more modules -- it was designed to return the empty string for other modules.
this change isn't needed -- please error-check returns where needed.
jeffersoncasimir
left a comment
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! I will pull and test after code changes are made
| $tpl_data['user'] = []; | ||
| $tpl_data['user']['Real_name'] = $this->user->getFullName(); | ||
| $tpl_data['user']['permissions'] = $this->user->getPermissions(); | ||
| $tpl_data['user']['user_from_study_site'] = $oneIsStudySite; |
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.
| $tpl_data['user']['user_from_study_site'] = $oneIsStudySite; | |
| $tpl_data['user']['user_from_study_site'] = $this->user->hasStudySite(); |
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 can and should be inlined (includes deleting a line above)
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 a quick 2 line change
christinerogers
left a comment
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.
still to do:
- revert comment changes where it's not for code you change
- minimize changes to User class per others' review comments
|
HI @NadaElmasry 2 things to tidy up this thread as we prepare to merge:
Notes from Oct. 25 EEG meeting discussion :
|
|
@NadaElmasry Can you fix the tests and then @jeffersoncasimir can you re-review? |
|
@jeffersoncasimir is this ready for re-review ? |
|
@jeffersoncasimir per testing meeting feb. 21 |
Co-authored-by: jeffersoncasimir <[email protected]>
510adc3 to
8ec7436
Compare
Addressed
jeffersoncasimir
left a comment
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 feature works as expected!
I made some minor css tweaks and minimized the diff by reverting some comment changes and other differences that did not directly contribute to the feature
Thanks @NadaElmasry - Jefferson has completed the touch-ups and we've merged your feature contribution for the 27 LORIS release. |
Description
This PR introduces a Project Affiliations menu to the application's main interface, mirroring the existing Site Affiliations menu.
Changes Implemented
User Class Enhancements
Userclass to retrieve associated projects using the user's ID using user_projects_query.Template Modifications
Middleware Adjustments
Userclass.using getProjectIDs() and >getProjectNames()).GUI
Affiliations Menus with single project or site
Affiliations Menus with multiple projects or sites
Suggested Changes
Affiliations drop-down menu with fixed hieight and scrollable option
Removed separate Project and Sites Menus
Related Issue