YunkaiXiao / expertiza

Expertiza is a web application through which students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation.
http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation
MIT License
0 stars 0 forks source link

Fix bug on issue #1312 #9

Open YunkaiXiao opened 4 years ago

YunkaiXiao commented 4 years ago
YunkaiXiao commented 4 years ago

This is what's returned as assignment_form_params[:assignment_questionnaire]:

{"assignment_id"=>"", "questionnaire_id"=>"618", "dropdown"=>"false", "questionn aire_weight"=>"100", "notification_limit"=>"15", "used_in_round"=>" "} {"assignment_id"=>"", "questionnaire_id"=>"42", "dropdown"=>"false", "questionna ire_weight"=>"0", "notification_limit"=>"15", "used_in_round"=>" "} {"assignment_id"=>"", "questionnaire_id"=>"516", "dropdown"=>"true", "questionna ire_weight"=>"0", "notification_limit"=>"15", "used_in_round"=>" "}

YunkaiXiao commented 4 years ago

This "dropdown"=>"true" returned above is actually referring to the selection of "dropdown/scale"..... bug3

YunkaiXiao commented 4 years ago

Assignment_questionnaires table doesn't even have a filed to host results of this check box... Maybe we should do a DB migrate and create a field?

YunkaiXiao commented 4 years ago

Done, but the model is not updates... How is the controller handling this field?

YunkaiXiao commented 4 years ago

We gave the checkbox a new name name="assignment_form[assignment_questionnaire][][use_dropdown_instead]"

YunkaiXiao commented 4 years ago

The only place that seems to handle these fields from assignment_form is in assignment_form.rb self.copy_assignment_questionnaire()... Let's add a new line to copy data from "old questionnaire" to "questionnaire".... Who uses this function for what anyway??

YunkaiXiao commented 4 years ago

Examining database.... Okay so the field is getting updated, that's good, though the checkbox is still not filled to reflect data in the model, adding a few lines to make it happen.