Conversation
open results_ for | ||
select print_results from ag_handout_kits | ||
where kit_id = kit_id_; | ||
end ag_get_print_results; |
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 add an example call to the end of this file, as we have for other procedure files?
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.
Its in the db, but I didn't want to put kit_ids on github.
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.
Doesn't have to be a real Kit ID, but even if it is, I wouldn't be concerned.
comments addressed and deployed on webdev |
@@ -27,6 +27,7 @@ zip = form['zip'] | |||
country = form['country'] | |||
kit_id = form['kit_id'] | |||
password = form['password'] | |||
printresults = form.get('printresults', 'N') |
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.
lower case the N here
Hey guys, I just put this back on webdev. We need to get this one deployed before Elaine creates the May 1st kits. |
@@ -305,9 +305,11 @@ if form.has_key('username'): | |||
# Special AG case: if user data is None, it may be the first login from a hand-out kit. Check | |||
# if the username/password exists in the handout list. If so, this must be the first time | |||
# they've accessed the site and will need to fill out their user data. | |||
print_results = 'n' | |||
if not user_data: |
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 logic structure here is a little confusing. There's an if user_data
, then an if not user_data
, then an else
.
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.
these could be combined into
if user_data:
# stuff
else:
# other stuff
@@ -43,8 +43,12 @@ sql = "select cast(ag_login_id as varchar2(100)) from ag_login where email = '{0 | |||
ag_login_id = ag_data_access.dynamicMetadataSelect(sql).fetchone()[0] | |||
sql = "select swabs_per_kit, verification_code from ag_handout_kits where kit_id = '{0}'".format(kit_id) | |||
swabs_per_kit, kit_verification_code = ag_data_access.dynamicMetadataSelect(sql).fetchone() | |||
printresults = ag_data_access.checkPrintResults(kit_id) | |||
if printresults is None: | |||
printresults = 'N' |
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 lower-case this please?
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.
sorry about that just changed it
On Thu, May 1, 2014 at 4:26 PM, adamrp notifications@github.com wrote:
In www/americangut/add_participant.psp:
@@ -43,8 +43,12 @@ sql = "select cast(ag_login_id as varchar2(100)) from ag_login where email = '{0
ag_login_id = ag_data_access.dynamicMetadataSelect(sql).fetchone()[0]
sql = "select swabs_per_kit, verification_code from ag_handout_kits where kit_id = '{0}'".format(kit_id)
swabs_per_kit, kit_verification_code = ag_data_access.dynamicMetadataSelect(sql).fetchone()
+printresults = ag_data_access.checkPrintResults(kit_id)
+if printresults is None:
- printresults = 'N'
Can you lower-case this please?
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/691/files#r12211087
.
Cool, I'm 👍 for merging this |
Track who gets results printed
This adds a column in ag_handout_kits and ag_kit called print results it is a varchar(1) with default value of N.
The code now passes the value from ag_handout_kits to ag_kit.
Because the value by default is N anything inserted in ag_handout_kits from now on will have a print_results value of N.