reset password
Author Message
ashoush
Posts: 25
Posted 00:11 Nov 24, 2009 |

Hi Dr. Sun,

 

I have 2 question regarding the search:

1- If someone search without a keyword (pressing search button without anything in the box) what should it return? All question? Or nothing?

2- Is it ok for the search to return the questions already added to the current assignment? If it's not, can we remove them at controller level to keep the search funvtion more generic?

Last edited by ashoush at 01:01 Nov 24, 2009.
cysun
Posts: 2935
Posted 07:15 Nov 24, 2009 |
1- If someone search without a keyword (pressing search button without anything in the box) what should it return? All question? Or nothing?

Nothing - a search term should be required. You can use a validator to ensure that, or simply return nothing.

2- Is it ok for the search to return the questions already added to the current assignment? If it's not, can we remove them at controller level to keep the search funvtion more generic?

No, the results should not include any question from the current assignment. Preferably this should be implemented on the database side, but doing it in controller is OK, too.