Open YunkaiXiao opened 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"=>" "}
This "dropdown"=>"true" returned above is actually referring to the selection of "dropdown/scale".....
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?
Done, but the model is not updates... How is the controller handling this field?
We gave the checkbox a new name name="assignment_form[assignment_questionnaire][][use_dropdown_instead]"
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??
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.