User talk:Snaramb: Difference between revisions
(Created page with "We have added a new column in the ‘responses’ table (in the database), namely, ‘visibility’. Visibility can have 4 values as listed below: File:Example.jpg We have ...") |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
We have added a new column in the ‘responses’ table (in the database), namely, ‘visibility’. Visibility can have 4 values as listed below: | We have added a new column in the ‘responses’ table (in the database), namely, ‘visibility’. Visibility can have 4 values as listed below: | ||
We have maintained these constants in a new file at helpers/response_constants.rb. | We have maintained these constants in a new file at helpers/response_constants.rb. | ||
< | <pre> | ||
module ResponseConstants | module ResponseConstants | ||
def _private | def _private | ||
Line 23: | Line 21: | ||
end | end | ||
end | end | ||
< | </pre> | ||
<button>clickable text</button> | |||
In the existing implementation of reviews, when a student starts a review (but hasn’t filled any text or ratings yet), a response gets created in the database. This response has a default visibility of 0. | |||
We have provided a checkbox (a HTML input node with attribute ‘type’ as ‘checkbox’) for the student to consent for his / her review to be used as an example, with values 0 and 1 for unchecked and checked respectively. This value is used to update the response object as part of the form submission. |
Latest revision as of 13:42, 6 December 2018
We have added a new column in the ‘responses’ table (in the database), namely, ‘visibility’. Visibility can have 4 values as listed below:
We have maintained these constants in a new file at helpers/response_constants.rb.
module ResponseConstants def _private 0 end def in_review 1 end def approved_as_sample 2 end def rejected_as_sample 3 end end
<button>clickable text</button>
In the existing implementation of reviews, when a student starts a review (but hasn’t filled any text or ratings yet), a response gets created in the database. This response has a default visibility of 0.
We have provided a checkbox (a HTML input node with attribute ‘type’ as ‘checkbox’) for the student to consent for his / her review to be used as an example, with values 0 and 1 for unchecked and checked respectively. This value is used to update the response object as part of the form submission.