<commit_before>angular.module("doubtfire.common.services.tasks", [])

.factory("taskService", (TaskFeedback, TaskComment, Task, TaskDefinition, alertService, $rootScope, analyticsService, GradeTaskModal, gradeService, ConfirmationModal, ProgressModal) ->
  #
  # The unit service object
  #
  taskService = {}

  taskService.statusKeys = [
    'not_started'
    'do_not_resubmit'
    'redo'
    'need_help'
    'working_on_it'
    'fix_and_resubmit'
    'ready_to_mark'
    'discuss'
    'demonstrate'
    'complete'
    'fail'
  ]

  taskService.validTopTask = [
    'not_started'
    'redo'
    'need_help'
    'working_on_it'
    'fix_and_resubmit'
    'demonstrate'
    'discuss'
  ]

  taskService.toBeWorkedOn = [
    'not_started'
    'redo'
    'need_help'
    'working_on_it'
  ]

  taskService.statusToDiscuss = [
    'need_help'
    'demonstrate'
    'discuss'
  ]

  taskService.gradeableStatuses = [
    'discuss'
    'demonstrate'
    'complete'
  ]


  taskService.acronymKey =
    RTM: 'ready_to_mark'
    NOS: 'not_started'
    WRK: 'working_on_it'
    HLP: 'need_help'
    RDO: 'redo'
    DNR: 'do_not_resubmit'
    FIX: 'fix_and_resubmit'
    DIS: 'discuss'
    DEM: 'demonstrate'
    COM: 'complete'
    FAL: 'fail'

  taskService.learningWeight =
    fail:               0.0
    not_started:        0.0
    working_on_it:      0.0
    need_help:          0.0
    redo:               0.1
    do_not_resubmit:    0.1
    fix_and_resubmit:   0.3
    ready_to_mark:      0.5
    discuss:            0.8
    demonstrate:        0.8
    complete:           1.0

  taskService.statusAcronym =
    ready_to_mark:      'RTM'
    not_started:        'NOS'
    working_on_it:      'WRK'
    need_help:          'HLP'
    redo:               'RDO'
    do_not_resubmit:    "DNR"
    fix_and_resubmit:   'FIX'
    discuss:            'DIS'
    demonstrate:        'DEM'
    complete:           'COM'
    fail:               'FAL'

  taskService.statusLabels =
    ready_to_mark:      'Ready for Feedback'
    not_started:        'Not Started'
    working_on_it:      'Working On It'
    need_help:          'Need Help'
    redo:               'Redo'
    do_not_resubmit:    "Don't Resubmit"
    fix_and_resubmit:   'Resubmit'
    discuss:            'Discuss'
    demonstrate:        'Demonstrate'
    complete:           'Complete'
    fail:               'Fail'

  taskService.statusIcons =
    ready_to_mark:      'fa fa-thumbs-o-up'
    not_started:        'fa fa-pause'
    working_on_it:      'fa fa-bolt'
    need_help:          'fa fa-question-circle'
    redo:               'fa fa-refresh'
    do_not_resubmit:    'fa fa-book'
    fix_and_resubmit:   'fa fa-wrench'
    discuss:            'fa fa-commenting'
    demonstrate:        'fa fa-commenting'
    complete:           'fa fa-check'
    fail:               'fa fa-times'

  taskService.statusColors =
    # Please make sure this matches task-status-colors.less
    ready_to_mark:     '#0079D8'
    not_started:       '#CCCCCC'
    working_on_it:     '#EB8F06'
    need_help:         '#a48fce'
    fix_and_resubmit:  '#f2d85c'
    do_not_resubmit:   '#d46b54'
    redo:              '#804000'
    discuss:           '#31b0d5'
    demonstrate:       '#428bca'
    complete:          '#5BB75B'
    fail:              '#d93713'

  taskService.statusSeq =
    not_started:        1
    fail:               2
    do_not_resubmit:    3
    redo:               4
    need_help:          5
    working_on_it:      6
    ready_to_mark:      7
    fix_and_resubmit:   8
    discuss:            9
    demonstrate:       10
    complete:          11

  taskService.helpTextDesc =
    ready_to_mark:
      'You have completed the Task, and uploaded it for your tutor to assess.'
    not_started:
      'You have not yet started the Task.'
    working_on_it:
      'You are working on the task, but it is not yet ready to assess.'
    need_help:
      'You are working on the task but would like some help to get it complete.'
    redo:
      'Your tutor wants you to start this task from scratch.'
    do_not_resubmit:
      'Your tutor wants you to stop submitting this task and include it fixed in your portfolio.'
    fix_and_resubmit:
      'Your tutor wants you to fix something and resubmit it for review again.'
    discuss:
      'Your tutor is happy with your work. To mark as complete, attend class and discuss it with your tutor.'
    demonstrate:
      'Your work looks good. Attend class and demonstrate the task to your tutor to have it marked as Complete.'
    complete:
      'Your tutor is happy with your work and it has been discussed with them.'<commit_msg>ENHANCE: Rename Do Not Resubmit to Feedback Exceeded<commit_after>angular.module("doubtfire.common.services.tasks", [])

.factory("taskService", (TaskFeedback, TaskComment, Task, TaskDefinition, alertService, $rootScope, analyticsService, GradeTaskModal, gradeService, ConfirmationModal, ProgressModal) ->
  #
  # The unit service object
  #
  taskService = {}

  taskService.statusKeys = [
    'not_started'
    'do_not_resubmit'
    'redo'
    'need_help'
    'working_on_it'
    'fix_and_resubmit'
    'ready_to_mark'
    'discuss'
    'demonstrate'
    'complete'
    'fail'
  ]

  taskService.validTopTask = [
    'not_started'
    'redo'
    'need_help'
    'working_on_it'
    'fix_and_resubmit'
    'demonstrate'
    'discuss'
  ]

  taskService.toBeWorkedOn = [
    'not_started'
    'redo'
    'need_help'
    'working_on_it'
  ]

  taskService.statusToDiscuss = [
    'need_help'
    'demonstrate'
    'discuss'
  ]

  taskService.gradeableStatuses = [
    'discuss'
    'demonstrate'
    'complete'
  ]


  taskService.acronymKey =
    RTM: 'ready_to_mark'
    NOS: 'not_started'
    WRK: 'working_on_it'
    HLP: 'need_help'
    RDO: 'redo'
    DNR: 'do_not_resubmit'
    FIX: 'fix_and_resubmit'
    DIS: 'discuss'
    DEM: 'demonstrate'
    COM: 'complete'
    FAL: 'fail'

  taskService.learningWeight =
    fail:               0.0
    not_started:        0.0
    working_on_it:      0.0
    need_help:          0.0
    redo:               0.1
    do_not_resubmit:    0.1
    fix_and_resubmit:   0.3
    ready_to_mark:      0.5
    discuss:            0.8
    demonstrate:        0.8
    complete:           1.0

  taskService.statusAcronym =
    ready_to_mark:      'RTM'
    not_started:        'NOS'
    working_on_it:      'WRK'
    need_help:          'HLP'
    redo:               'RDO'
    do_not_resubmit:    "DNR"
    fix_and_resubmit:   'FIX'
    discuss:            'DIS'
    demonstrate:        'DEM'
    complete:           'COM'
    fail:               'FAL'

  taskService.statusLabels =
    ready_to_mark:      'Ready for Feedback'
    not_started:        'Not Started'
    working_on_it:      'Working On It'
    need_help:          'Need Help'
    redo:               'Redo'
    do_not_resubmit:    'Feedback Exceeded'
    fix_and_resubmit:   'Resubmit'
    discuss:            'Discuss'
    demonstrate:        'Demonstrate'
    complete:           'Complete'
    fail:               'Fail'

  taskService.statusIcons =
    ready_to_mark:      'fa fa-thumbs-o-up'
    not_started:        'fa fa-pause'
    working_on_it:      'fa fa-bolt'
    need_help:          'fa fa-question-circle'
    redo:               'fa fa-refresh'
    do_not_resubmit:    'fa fa-low-vision'
    fix_and_resubmit:   'fa fa-wrench'
    discuss:            'fa fa-commenting'
    demonstrate:        'fa fa-commenting'
    complete:           'fa fa-check'
    fail:               'fa fa-times'

  taskService.statusColors =
    # Please make sure this matches task-status-colors.less
    ready_to_mark:     '#0079D8'
    not_started:       '#CCCCCC'
    working_on_it:     '#EB8F06'
    need_help:         '#a48fce'
    fix_and_resubmit:  '#f2d85c'
    do_not_resubmit:   '#d46b54'
    redo:              '#804000'
    discuss:           '#31b0d5'
    demonstrate:       '#428bca'
    complete:          '#5BB75B'
    fail:              '#d93713'

  taskService.statusSeq =
    not_started:        1
    fail:               2
    do_not_resubmit:    3
    redo:               4
    need_help:          5
    working_on_it:      6
    ready_to_mark:      7
    fix_and_resubmit:   8
    discuss:            9
    demonstrate:       10
    complete:          11

  taskService.helpTextDesc =
    ready_to_mark:
      'You have completed the Task, and uploaded it for your tutor to assess.'
    not_started:
      'You have not yet started the Task.'
    working_on_it:
      'You are working on the task, but it is not yet ready to assess.'
    need_help:
      'You are working on the task but would like some help to get it complete.'
    redo:
      'Your tutor wants you to start this task from scratch.'
    do_not_resubmit:
      'This work is not complete to an acceptable standard and your tutor will not reassess it. You should fix it and include a corrected version in your portfolio.'
    fix_and_resubmit:
      'Your tutor wants you to fix something and resubmit it for review again.'
    discuss:
      'Your tutor is happy with your work. To mark as complete, attend class and discuss it with your tutor.'
    demonstrate:
      'Your work looks good. Attend class and demonstrate the task to your tutor to have it marked as Complete.'
    complete:
      'Your tutor is happy with your work and it has been discussed with them.'
{'fraction_non_alphanumeric': 0.08647497337593184, 'fraction_numerical': 0.015548455804046858, 'mean_word_length': 1.9737175427485751, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5001604', 'n_tokens_mistral': 3302, 'n_tokens_neox': 3176, 'n_words': 792}