<commit_before>Markus::Application.routes.draw do
  resources :key_pairs

  # Install the default routes as the lowest priority.
  root controller: 'main', action: 'login', via: [:post, :get]

  # optional path scope (denoted by the parentheses)
  scope "(:locale)", locale: /en|fr|pt/  do
    # API routes
    namespace :api do
      resources :users, except: [:new, :edit]
      resources :assignments, except: [:new, :edit] do
        resources :groups, except: [:new, :edit] do
          collection do
            get 'group_ids_by_name'
          end
          resources :submission_downloads, except: [:new, :edit]
          resources :feedback_files, except: [:new, :edit]
          resources :test_script_results, except: [:new, :edit] do
            resources :test_results, except: [:new, :edit]
          end
          member do
            put 'update_marks'
            put 'update_marking_state'
          end
        end
      end
      resources :main_api
    end

    resources :admins do
      collection do
        get 'populate'
      end
    end

    resources :assignments do

      collection do
        get 'delete_rejected'
        post 'update_collected_submissions'
        get 'download_assignment_list'
        post 'upload_assignment_list'
      end

      member do
        get 'refresh_graph'
        get 'student_interface'
        post 'invite_member'
        get 'creategroup'
        get 'join_group'
        get 'deletegroup'
        get 'decline_invitation'
        post 'disinvite_member'
        get 'render_feedback_file'
        get 'view_summary'
        get 'populate_file_manager'
        post 'update_files'
        get 'download'
        get 'peer_review'
      end

      resources :tags do
        collection do
          get 'download_tag_list'
          post 'csv_upload'
          post 'yml_upload'
        end

        member do
          post 'update_tag'
          get 'edit_tag_dialog'
          get 'destroy'
        end
      end

      resources :criteria do
        collection do
          post 'update_positions'
        end
      end

      resources :rubric_criteria do
        member do
          delete 'destroy'
        end

        collection do
          post 'csv_upload'
          post 'yml_upload'
          get 'download_csv'
          get 'download_yml'
        end
      end

      resources :flexible_criteria do
        member do
          delete 'destroy'
        end

        collection do
          post 'upload'
          get 'download'
        end
      end<commit_msg>criteria-routes: Changed routes for criteria, flexible criteria and rubric criteria.<commit_after>Markus::Application.routes.draw do
  resources :key_pairs

  # Install the default routes as the lowest priority.
  root controller: 'main', action: 'login', via: [:post, :get]

  # optional path scope (denoted by the parentheses)
  scope "(:locale)", locale: /en|fr|pt/  do
    # Regular routes for rubric criteria
    get 'assignments/:assignment_id/rubric_criteria' => 'rubric_criteria#index', as: :assignment_rubric_criteria
    post 'assignments/:assignment_id/rubric_criteria/csv_upload' => 'rubric_criteria#csv_upload', as: :csv_upload_assignment_rubric_criteria
    post 'assignments/:assignment_id/rubric_criteria/yml_upload' => 'rubric_criteria#yml_upload', as: :yml_upload_assignment_rubric_criteria
    get 'assignments/:assignment_id/rubric_criteria/download_csv' => 'rubric_criteria#download_csv', as: :download_csv_assignment_rubric_criteria
    get 'assignments/:assignment_id/rubric_criteria/download_yml' => 'rubric_criteria#download_yml', as: :download_yml_assignment_rubric_criteria

    # Regular routes for flexible criteria
    get 'assignments/:assignment_id/flexible_criteria' => 'flexible_criteria#index', as: :assignment_flexible_criteria
    post 'assignments/:assignment_id/flexible_criteria/upload' => 'flexible_criteria#upload', as: :upload_assignment_flexible_criteria
    get 'assignments/:assignment_id/flexible_criteria/download' => 'flexible_criteria#download', as: :download_assignment_flexible_criteria

    # API routes
    namespace :api do
      resources :users, except: [:new, :edit]
      resources :assignments, except: [:new, :edit] do
        resources :groups, except: [:new, :edit] do
          collection do
            get 'group_ids_by_name'
          end
          resources :submission_downloads, except: [:new, :edit]
          resources :feedback_files, except: [:new, :edit]
          resources :test_script_results, except: [:new, :edit] do
            resources :test_results, except: [:new, :edit]
          end
          member do
            put 'update_marks'
            put 'update_marking_state'
          end
        end
      end
      resources :main_api
    end

    resources :admins do
      collection do
        get 'populate'
      end
    end

    resources :assignments do

      collection do
        get 'delete_rejected'
        post 'update_collected_submissions'
        get 'download_assignment_list'
        post 'upload_assignment_list'
      end

      member do
        get 'refresh_graph'
        get 'student_interface'
        post 'invite_member'
        get 'creategroup'
        get 'join_group'
        get 'deletegroup'
        get 'decline_invitation'
        post 'disinvite_member'
        get 'render_feedback_file'
        get 'view_summary'
        get 'populate_file_manager'
        post 'update_files'
        get 'download'
        get 'peer_review'
      end

      resources :tags do
        collection do
          get 'download_tag_list'
          post 'csv_upload'
          post 'yml_upload'
        end

        member do
          post 'update_tag'
          get 'edit_tag_dialog'
          get 'destroy'
        end
      end

      resources :criteria, except: [:index] do
        collection do
          post 'update_positions'
        end
      end
{'fraction_non_alphanumeric': 0.07728733299509555, 'fraction_numerical': 0.0, 'mean_word_length': 2.2855555555555553, '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': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7509589', 'n_tokens_mistral': 1741, 'n_tokens_neox': 1701, 'n_words': 452}