<commit_before>%p#notice= notice

.question_class{ data: {results: @results.to_json, answers: @question.answers.to_json } }

%p
  %b Created by:
  = get_user(@question.user_id).username
  %h2
    = @question.content
  = form_tag submit_question_url do
    = hidden_field_tag 'question', @question.id
    - @question.answers.shuffle.each do |a|
      %label
        = radio_button_tag :answer, a.id, a == @answer, required: true, disabled: @answered || is_instructor?
        = a.content
    %br
    - if not @answered and not is_instructor?
      = submit_tag 'submit'


#review
  %svg#graph

%div.block
  %button#show-results Show Results
  - if is_instructor?
    %button
      = link_to 'Make Live', show_live_question(:id => @question.id)
%br

- if is_instructor?
  %div.block
    = button_to 'Edit', edit_question_path(@question), :method => "get"
%div.block
  = button_to 'Back', questions_path, :method => "get"<commit_msg>Hide results for students if they haven't answered (#160)<commit_after>%p#notice= notice

.question_class{ data: {results: @results.to_json, answers: @question.answers.to_json } }

%p
  %b Created by:
  = get_user(@question.user_id).username
  %h2
    = @question.content
  = form_tag submit_question_url do
    = hidden_field_tag 'question', @question.id
    - @question.answers.shuffle.each do |a|
      %label
        = radio_button_tag :answer, a.id, a == @answer, required: true, disabled: @answered || is_instructor?
        = a.content
    %br
    - if not @answered and not is_instructor?
      = submit_tag 'submit'


#review
  %svg#graph

%div.block
  - if is_instructor? or @answered
    %button#show-results Show Results
  - if is_instructor?
    %button
      = link_to 'Make Live', show_live_question(:id => @question.id)
%br

- if is_instructor?
  %div.block
    = button_to 'Edit', edit_question_path(@question), :method => "get"
%div.block
  = button_to 'Back', questions_path, :method => "get"
{'fraction_non_alphanumeric': 0.13240597630087583, 'fraction_numerical': 0.002575991756826378, 'mean_word_length': 3.591016548463357, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '955164', 'n_tokens_mistral': 692, 'n_tokens_neox': 672, 'n_words': 159}