Closed millenniumproof closed 9 years ago
Hey Miriam,
So are you modifying the code so the vote page it only shows ideas that are approved in the crowdflower results table?
If that is the case, should I modify the code in our submission function to add ideas to the crowdflower talbe as well as the idea table? With a not-approved start of course, at first.
Cheers, Alex
Yup, that's what the pull request is for. I tried to make it so you wouldn't need any changes anywhere else.
-Miriam
Alex Simes schreef op 1-4-2015 om 19:25:
Hey Miriam,
So are you modifying the code so the vote page it only shows ideas that are approved in the crowdflower results table?
Cheers, Alex
— Reply to this email directly or view it on GitHub https://github.com/alex9311/TUD-Information-Retrieval-Group-02/pull/61#issuecomment-88565262.
Should I add code to the submit function so it adds an entry in the crowdflower database as well? It will start off as being not approved of course.
I was thinking I could commit that to this branch as well
Nah, when the results come back from crowdflower the entry is made. It's in the 'GetJSONresultsCrowdFlower.php' script.
Ohh ok, I see that now! Nice!
The reason I think it might be nice to add entries in the crowdflower table upon submit is if we need to quickly mock data for the demo. So then all the entries are there and we just have to change a few to approve. Does that make sense? Do you think its a good idea?
I don't know. We can all send in mock ideas today and tomorrow. And then judge them on CrowdFlower on Friday and Saturday so that we'll have a nice selection approved by the time of the presentation. It's a bit cumbersome but that's the natural progression of the app. That way we test the whole process and don't need to add any more code.
Yeah that makes sense, I'm just a little worried about if we have to reset the database or something after we populate it with real data. I can still write a script with mockup data, that way we can have a demo ready pretty quick in case of emergency
Well, we still have the 'export to csv'-function in the 'crowdflower_admin_page.php' if you want to make a quick backup of the data we insert.
But yeah, always good to have a backup plan in case of emergency.
OK, i'll make a separate branch with a DB repopulate script on it then.
Maybe make a script to read ideas from a csv and submit to the database. You can use this old script 'send_ideas_from_csv_to_mysql.php' as an example. This script was for writing crowdflower results to the database, but since that happens dynamically now the script is defunct.
Yeah I can make it read from a CSV, good idea
Can I merge this branch?
btw the 'send_ideas_from_csv_to_mysql.php' script is called from the 'crowdflower_admin_page.php'. The page has a button to upload a csv from your computer.
One thing, I was thinking this query could maybe be made a lot simpler by using a JOIN. But if this works we can just use this.
I haven't tested it, there is no data in the crowdflower data in it. If I run the script from crowdflower_admin_page.php I can populate the table and test it though?
I structured it like that because when the first query doesn't have results that means there aren't any more ideas in the database since it goes from 1 to 1++. When the second query returns no results it just means it hasn't come back from crowdflower yet. Since the ideas don't come from crowdflower chronologically I set it up like this.
Makes sense!
We can just merge this if you like. I'm finishing something up for my other class and will have dinner after. I can test it after dinner on main. Seem good?
Sounds like a plan!
Check for correctness, please.