def student_view(self, context=None):
<EOL>self.sys_selected_answers = {int(k): v for k, v in self.sys_selected_answers.items()}<EOL>student_item = self.get_student_item_dict()<EOL>random.seed(student_item['<STR_LIT>'])<EOL>answers = self.get_answers_for_student()<EOL>html = "<STR_LIT>"<EOL>html += self.resource_string("<STR_LIT>")<EOL>frag = Fragment(html)<EOL>frag.add_css(self.resource_string("<STR_LIT>"))<EOL>frag.add_javascript_url("<STR_LIT>")<EOL>frag.add_javascript_url("<STR_LIT>")<EOL>frag.add_javascript_url("<STR_LIT>")<EOL>frag.add_javascript_url("<STR_LIT>")<EOL>frag.add_javascript_url("<STR_LIT>")<EOL>frag.add_javascript_url("<STR_LIT>")<EOL>frag.add_javascript(self.resource_string("<STR_LIT>"))<EOL>frag.add_javascript(self.resource_string("<STR_LIT>"))<EOL>frag.add_javascript(self.resource_string("<STR_LIT>"))<EOL>frag.add_javascript(self.resource_string("<STR_LIT>"))<EOL>frag.add_javascript(self.resource_string("<STR_LIT>"))<EOL>question = deepcopy(self.question_text)<EOL>question.update({'<STR_LIT>': self.get_asset_url(question.get('<STR_LIT>'))})<EOL>options = deepcopy(self.options)<EOL>for option in options:<EOL><INDENT>if option.get('<STR_LIT>'):<EOL><INDENT>option.update({'<STR_LIT>': self.get_asset_url(option.get('<STR_LIT>'))})<EOL><DEDENT><DEDENT>js_vals = {<EOL>'<STR_LIT>': answers.get_vote(<NUM_LIT:0>),<EOL>'<STR_LIT>': answers.get_rationale(<NUM_LIT:0>),<EOL>'<STR_LIT>': answers.get_vote(<NUM_LIT:1>),<EOL>'<STR_LIT>': answers.get_rationale(<NUM_LIT:1>),<EOL>'<STR_LIT>': self.ugettext(self.display_name),<EOL>'<STR_LIT>': question,<EOL>'<STR_LIT>': self.weight,<EOL>'<STR_LIT>': options,<EOL>'<STR_LIT>': self.rationale_size,<EOL>'<STR_LIT>': self.get_user_role(),<EOL>'<STR_LIT>': {'<STR_LIT>': STATUS_NEW, '<STR_LIT>': STATUS_ANSWERED, '<STR_LIT>': STATUS_REVISED},<EOL>'<STR_LIT>': translation.get_language(),<EOL>}<EOL>if answers.has_revision(<NUM_LIT:0>) and not answers.has_revision(<NUM_LIT:1>):<EOL><INDENT>js_vals['<STR_LIT>'] = self.other_answers_shown<EOL><DEDENT>if answers.has_revision(<NUM_LIT:1>):<EOL><INDENT>js_vals['<STR_LIT>'] = self.correct_answer<EOL>js_vals['<STR_LIT>'] = self.correct_rationale<EOL><DEDENT>frag.initialize_js('<STR_LIT>', js_vals)<EOL>self.publish_event_from_dict(self.event_namespace + '<STR_LIT>', {})<EOL>return frag<EOL>
The primary view of the PeerInstructionXBlock, shown to students when viewing courses.