Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Track who gets results printed #691

Merged
merged 12 commits into from May 1, 2014
Merged

Track who gets results printed #691

merged 12 commits into from May 1, 2014

Conversation

teravest
Copy link
Contributor

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.

open results_ for
select print_results from ag_handout_kits
where kit_id = kit_id_;
end ag_get_print_results;
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

@teravest
Copy link
Contributor Author

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

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

@teravest
Copy link
Contributor Author

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:
Copy link
Member

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.

Copy link
Member

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

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?

Copy link
Contributor Author

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
.

@adamrp
Copy link
Member

adamrp commented May 1, 2014

Cool, I'm 👍 for merging this

@adamrp
Copy link
Member

adamrp commented May 1, 2014

@ElDeveloper?

@ElDeveloper
Copy link
Member

Looks good to me @adamrp & @teravest!

ElDeveloper added a commit that referenced this pull request May 1, 2014
Track who gets results printed
@ElDeveloper ElDeveloper merged commit 36c79a6 into qiime:master May 1, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants