<commit_before>App.QuestionController = Ember.ObjectController.extend({
  needs: ["answer_choices", "answer_types", "survey_step"]
  
  answer_choices: (->
    Ember.ArrayProxy.createWithMixins Ember.SortableMixin,
      sortProperties: ["option_text"],
      content: @get("content.answer_choices")
  ).property("content.answer_choices")
  
  actions:
    editQuestion: ->
      @set "isEditing", true
      
    exitEditQuestion: -><commit_msg>intermediate checkin as experimenting with filter<commit_after>App.QuestionController = Ember.ObjectController.extend({
  needs: ["answer_choices", "answer_types", "survey_step"]
  
  # sort answer_choices by group_text, option_text
  # called inside question controller because of has_many relationship for each question-kdh
  answer_choices: (->
    Ember.ArrayProxy.createWithMixins Ember.SortableMixin,
      sortProperties: ["group_text","option_text"],
      content: @get("content.answer_choices")
  ).property("content.answer_choices")
  
  grouped_answer_choices: (->
    Ember.ArrayProxy.createWithMixins Ember.SortableMixin,
      sortProperties: ["group_text","option_text"],
      content: @.get("content.answer_choices").filterBy('group_text', 'GI')
  ).property("content.answer_choices")
  
  root_level_answer_choices: (-> 
    return @.get("content.answer_choices").filterBy('group_text', '')
    #return @.get('model').filterBy('step', 1)
  ).property("content.answer_choices")
  
  actions:
    editQuestion: ->
      @set "isEditing", true
      
    exitEditQuestion: ->
{'fraction_non_alphanumeric': 0.13272608978529604, 'fraction_numerical': 0.0006506180871828237, 'mean_word_length': 4.572463768115942, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '3870519', 'n_tokens_mistral': 481, 'n_tokens_neox': 477, 'n_words': 77}