Search AG_Handout_kits for kit_id and barcode #651
Conversation
@@ -260,6 +268,28 @@ if 'search_term' in form: | |||
# Close the div for this login | |||
req.write('</div>') | |||
|
|||
elif len(kit_list) > 0: |
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 block only executes if len(login_list)
is greater than 0; is that the intent? It seems to me that you would want to display this information regardless.
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.
actually it only executes if len(login_list) is <= 0. The information is
already displayed if the barcode has a log in associated with it. Its the
case where it doesn't that we need to get the info from ag_handout_kits.
Emily
On Wed, Mar 26, 2014 at 11:19 AM, adamrp notifications@github.com wrote:
In www/wwwadmin/ag_search.psp:
@@ -260,6 +268,28 @@ if 'search_term' in form:
# Close the div for this login
req.write('')
- elif len(kit_list) > 0:
This block only executes if len(login_list) is greater than 0; is that
the intent? It seems to me that you would want to display this information
regardless.Reply to this email directly or view it on GitHubhttps://github.com//pull/651/files#r10987337
.
Woops, that's what I meant -- wrong inequality! I see now, though. Could you change the name of the variable from |
req.write('<th>barcode</th>') | ||
req.write('<th>verification_code</th>') | ||
for row in results: | ||
tableout= '</td><td>'.join(row) |
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.
There seem to be a few extra tabs in this blocks and adding a comment explaining the the row creation would be awesome.
Search AG_Handout_kits for kit_id and barcode
Now that we are doing handout kits if a participant losses credentials sql is currently the only way to retrieve them. This change addes ag_handout_kits to the search page.
If a kit_id or barcode is not found in the normal tables than ag_handout_kits is searched.
barcodes to test with
000000001 - normal results
000015537 - ag_handout_kit results with one barcode in the kit
000015522 - ag_handout_kit with 5 barcodes in the kit
010000000 - no results found
fixes #641