alex9311 / information-retrieval

TU Delft, Masters Software Technology, Information Retrieval, 3rd Quarter 2015
1 stars 2 forks source link

refactored voting page, top 5 page, removed old images #67

Closed alex9311 closed 9 years ago

alex9311 commented 9 years ago

@millenniumproof I refactored the "Top 5" table to only consider ideas that have been approved by crowdflower

I also refactored the logic a bit that selects the next idea to be shown in voting. I'm instead passing the "previous idea id" to the get_idea function which then gets the next idea in the ideas table that has been approved. I like it a bit more because its not running multiple queries on the sql server. What do you think?

This is the query: SELECT Idea.id, Idea.title, Idea.text_description, Idea.image FROM Idea INNER JOIN Screening_results_crowdflower ON Screening_results_crowdflower.id_idea = Idea.id WHERE Idea.id > 2 AND Screening_results_crowdflower.accepted = 1 ORDER BY Idea.id ASC LIMIT 1"; Where 2 is the idea of the idea previously shown

i also removed old images, I was getting weird errors on the server that it was "full"

millenniumproof commented 9 years ago

It looks good to me! Seems to be a better solution than what we had before. If it runs fine, you can merge it.