diff --git a/Changelog.md b/Changelog.md index d4f8ecf204..2165d91034 100644 --- a/Changelog.md +++ b/Changelog.md @@ -7,6 +7,7 @@ ### 🚨 Breaking changes ### ✨ New features and improvements +- Updated links to refer to new documentation website (#8049) - Migrated `AnnotationUsagePanel` component to use `react-table` v8 (#8021) - Migrated `SummaryPanel` component to React Table V8 (#8019) - Migrated `graders_manager.jsx` file's `GradersTable`, `GroupsTable`, `CriteriaTable` to use `react-table` v8 (#8014) diff --git a/app/javascript/Components/Modals/graders_distribution_modal.jsx b/app/javascript/Components/Modals/graders_distribution_modal.jsx index aa20ad982b..1520cc235f 100644 --- a/app/javascript/Components/Modals/graders_distribution_modal.jsx +++ b/app/javascript/Components/Modals/graders_distribution_modal.jsx @@ -55,9 +55,7 @@ export class GraderDistributionModal extends React.Component {

{I18n.t("graders.weight")}

{I18n.t("graders.random_instruction")} - + {" " + I18n.t("graders.wiki")}

diff --git a/app/javascript/Components/__tests__/graders_distribution_modal.test.jsx b/app/javascript/Components/__tests__/graders_distribution_modal.test.jsx index 11f9d96794..47b2945a8e 100644 --- a/app/javascript/Components/__tests__/graders_distribution_modal.test.jsx +++ b/app/javascript/Components/__tests__/graders_distribution_modal.test.jsx @@ -22,7 +22,6 @@ describe("GraderDistributionModal", () => { isOpen: true, onSubmit: jest.fn().mockImplementation(() => (props.isOpen = false)), }; - global.MARKUS_VERSION = "master"; jest.spyOn(window, "FormData").mockImplementationOnce(() => form1); }); diff --git a/app/views/admin/users/_upload_modal.html.erb b/app/views/admin/users/_upload_modal.html.erb index 8e52edc52c..990435780c 100644 --- a/app/views/admin/users/_upload_modal.html.erb +++ b/app/views/admin/users/_upload_modal.html.erb @@ -5,7 +5,7 @@ <%= content_for :modal_content do %>

- <%= t('users.admin_csv_upload_help_html', markus_version: Rails.configuration.markus_version) %> + <%= t('users.admin_csv_upload_help_html', docs_url: Settings.docs_url) %>

<%= form_tag upload_admin_users_path, { multipart: true } do %>
diff --git a/app/views/annotation_categories/_annotation_upload_modal.html.erb b/app/views/annotation_categories/_annotation_upload_modal.html.erb index 21d353ee67..b5bdb8a169 100644 --- a/app/views/annotation_categories/_annotation_upload_modal.html.erb +++ b/app/views/annotation_categories/_annotation_upload_modal.html.erb @@ -4,7 +4,7 @@ <%= content_for :modal_content do %> - <%= t('upload_help_html', markus_version: Rails.configuration.markus_version, section_id: AnnotationCategory.name.pluralize.underscore.dasherize) %> + <%= t('upload_help_html', docs_url: Settings.docs_url, section_id: AnnotationCategory.name.pluralize.underscore.dasherize) %> <%= form_tag({ action: 'upload' }, { multipart: true }) do %>

<%= file_field_tag :upload_file, required: true, accept: '.csv,.yml,.yaml' %>

diff --git a/app/views/assignments/_assignment_upload_modal.html.erb b/app/views/assignments/_assignment_upload_modal.html.erb index 3bde1b282c..fee42072d2 100644 --- a/app/views/assignments/_assignment_upload_modal.html.erb +++ b/app/views/assignments/_assignment_upload_modal.html.erb @@ -4,7 +4,7 @@ <%= content_for :modal_content do %> - <%= t('upload_help_html', markus_version: Rails.configuration.markus_version, section_id: Assignment.name.pluralize.underscore.dasherize) %> + <%= t('upload_help_html', docs_url: Settings.docs_url, section_id: Assignment.name.pluralize.underscore.dasherize) %> <%= form_tag upload_assignments_course_path(@current_course), { multipart: true } do %> diff --git a/app/views/assignments/_cp_assignment_upload_modal.html.erb b/app/views/assignments/_cp_assignment_upload_modal.html.erb index 32b65e4d5c..890f9fcdf3 100644 --- a/app/views/assignments/_cp_assignment_upload_modal.html.erb +++ b/app/views/assignments/_cp_assignment_upload_modal.html.erb @@ -4,7 +4,7 @@ <%= content_for :modal_content do %> - <%= t('assignments.upload_config_help_html', markus_version: Rails.configuration.markus_version, section_id: 'assignment-configuration') %> + <%= t('assignments.upload_config_help_html', docs_url: Settings.docs_url, section_id: 'assignment-configuration') %> <%= form_tag upload_config_files_course_assignments_path(@current_course), { multipart: true } do %> diff --git a/app/views/criteria/_upload_modal.html.erb b/app/views/criteria/_upload_modal.html.erb index 9591d0986b..bf3436c2e3 100644 --- a/app/views/criteria/_upload_modal.html.erb +++ b/app/views/criteria/_upload_modal.html.erb @@ -10,7 +10,7 @@

<%= t('assignments.due_date.marking_overwrite_warning_html') %>

<% end %> - <%= t('upload_help_html', markus_version: Rails.configuration.markus_version, section_id: Criterion.name.pluralize.underscore.dasherize) %> + <%= t('upload_help_html', docs_url: Settings.docs_url, section_id: Criterion.name.pluralize.underscore.dasherize) %> <%= form_tag upload_course_assignment_criteria_path(@current_course, @assignment), multipart: true, size: 1 do %>

<%= file_field_tag :upload_file, required: true, accept: '.yaml,.yml' %>

diff --git a/app/views/exam_templates/_manager_help.html.erb b/app/views/exam_templates/_manager_help.html.erb index efb7b1d5eb..c7658b3591 100644 --- a/app/views/exam_templates/_manager_help.html.erb +++ b/app/views/exam_templates/_manager_help.html.erb @@ -1,7 +1,7 @@

<%= t(:help) %>

<%= t('exam_templates.help_manual_html', - markus_version: Rails.configuration.markus_version, + docs_url: Settings.docs_url, template_division_title: ExamTemplate.human_attribute_name('template_divisions'), automatic_parsing_title: t('exam_templates.parsing.title')) %>
diff --git a/app/views/grade_entry_forms/_upload_modal.html.erb b/app/views/grade_entry_forms/_upload_modal.html.erb index 429203bc12..079c19cd33 100644 --- a/app/views/grade_entry_forms/_upload_modal.html.erb +++ b/app/views/grade_entry_forms/_upload_modal.html.erb @@ -3,7 +3,7 @@ <%= content_for :modal_open_link, '#uploadModal' %> <%= content_for :modal_content do %> - <%= t('upload_help_html', markus_version: Rails.configuration.markus_version, section_id: 'marks-spreadsheet-grades') %> + <%= t('upload_help_html', docs_url: Settings.docs_url, section_id: 'marks-spreadsheet-grades') %> <%= form_tag upload_course_grade_entry_form_path(@current_course, @grade_entry_form), { multipart: true, size: 1 } do %> diff --git a/app/views/graders/_upload_modal.html.erb b/app/views/graders/_upload_modal.html.erb index 0183bdb074..9236d213a8 100644 --- a/app/views/graders/_upload_modal.html.erb +++ b/app/views/graders/_upload_modal.html.erb @@ -4,7 +4,7 @@ <%= content_for :modal_content do %> - <%= t('upload_help_html', markus_version: Rails.configuration.markus_version, section_id: 'graders') %> + <%= t('upload_help_html', docs_url: Settings.docs_url, section_id: 'graders') %> <%= form_tag upload_course_assignment_graders_path(@current_course, @assignment), { multipart: true } do %> diff --git a/app/views/groups/_upload_modal.html.erb b/app/views/groups/_upload_modal.html.erb index 824d4bc945..eafd87c14e 100644 --- a/app/views/groups/_upload_modal.html.erb +++ b/app/views/groups/_upload_modal.html.erb @@ -5,7 +5,7 @@ <%= content_for :modal_content do %>

- <%= t('upload_help_html', markus_version: Rails.configuration.markus_version, section_id: 'groups') %> + <%= t('upload_help_html', docs_url: Settings.docs_url, section_id: 'groups') %>

<%= form_tag upload_course_assignment_groups_path(@current_course, @assignment), { multipart: true } do %> diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb index 8f0cc48d15..d023801db0 100644 --- a/app/views/layouts/_head.html.erb +++ b/app/views/layouts/_head.html.erb @@ -18,6 +18,6 @@ <% end %> <%= javascript_tag("const AUTH_TOKEN = document.querySelector('[name=\"csrf-token\"]').content;", nonce: true) if protect_against_forgery? %> <%= javascript_tag nonce: true do %> - const MARKUS_VERSION = '<%= Rails.configuration.markus_version %>'; + const DOCS_URL = '<%= Settings.docs_url %>'; const I18N_LOCALE = '<%= I18n.locale %>'; <% end %> diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 5f20e99621..44b6e05b80 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -49,7 +49,7 @@ <% end %>
  • - + <%= t(:help) %>
  • diff --git a/app/views/marks_graders/_upload_modal.html.erb b/app/views/marks_graders/_upload_modal.html.erb index 27a2ba8675..6ae6b44122 100644 --- a/app/views/marks_graders/_upload_modal.html.erb +++ b/app/views/marks_graders/_upload_modal.html.erb @@ -3,7 +3,7 @@ <%= content_for :modal_open_link, '#uploadModal' %> <%= content_for :modal_content do %> - <%= t('upload_help_html', markus_version: Rails.configuration.markus_version, section_id: 'graders') %> + <%= t('upload_help_html', docs_url: Settings.docs_url, section_id: 'graders') %> <%= form_tag({ controller: 'marks_graders', action: 'upload' }, diff --git a/app/views/peer_reviews/_upload_modal.html.erb b/app/views/peer_reviews/_upload_modal.html.erb index 1ae6b1ff45..35fa841d5b 100644 --- a/app/views/peer_reviews/_upload_modal.html.erb +++ b/app/views/peer_reviews/_upload_modal.html.erb @@ -4,7 +4,7 @@ <%= content_for :modal_content do %> - <%= t('upload_help_html', markus_version: Rails.configuration.markus_version, section_id: 'peer-reviews') %> + <%= t('upload_help_html', docs_url: Settings.docs_url, section_id: 'peer-reviews') %> <%= form_tag({ controller: 'peer_reviews', action: 'upload' }, diff --git a/app/views/students/_upload_modal.html.erb b/app/views/students/_upload_modal.html.erb index 874964ddc4..c45abc3815 100644 --- a/app/views/students/_upload_modal.html.erb +++ b/app/views/students/_upload_modal.html.erb @@ -5,7 +5,7 @@ <%= content_for :modal_content do %>

    - <%= t('upload_help_html', markus_version: Rails.configuration.markus_version, section_id: 'students') %> + <%= t('upload_help_html', docs_url: Settings.docs_url, section_id: 'students') %>

    <%= form_tag upload_course_students_path(@current_course), { multipart: true } do %>
    diff --git a/app/views/tags/_upload_modal.html.erb b/app/views/tags/_upload_modal.html.erb index dc68907b64..d62f2ec527 100644 --- a/app/views/tags/_upload_modal.html.erb +++ b/app/views/tags/_upload_modal.html.erb @@ -4,7 +4,7 @@ <%= content_for :modal_content do %> - <%= t('upload_help_html', markus_version: Rails.configuration.markus_version, section_id: 'tags') %> + <%= t('upload_help_html', docs_url: Settings.docs_url, section_id: 'tags') %> <%= form_tag upload_course_tags_path(@current_course, assignment_id: @assignment.id), { multipart: true, size: 1 } do %> diff --git a/app/views/tas/_upload_modal.html.erb b/app/views/tas/_upload_modal.html.erb index 21353fab2a..c6b7835ddc 100644 --- a/app/views/tas/_upload_modal.html.erb +++ b/app/views/tas/_upload_modal.html.erb @@ -4,7 +4,7 @@ <%= content_for :modal_content do %>

    - <%= t('upload_help_html', markus_version: Rails.configuration.markus_version, section_id: 'students') %> + <%= t('upload_help_html', docs_url: Settings.docs_url, section_id: 'tas') %>

    <%= form_tag upload_course_tas_path(@current_course), { multipart: true } do %>
    diff --git a/app/views/users/_key_display.html.erb b/app/views/users/_key_display.html.erb index 7074830753..7f0350cc61 100644 --- a/app/views/users/_key_display.html.erb +++ b/app/views/users/_key_display.html.erb @@ -3,7 +3,7 @@ <%= User.human_attribute_name(:api_key) %>

    - <%= t('users.api_key.help_html', markus_version: Rails.configuration.markus_version,) %> + <%= t('users.api_key.help_html', docs_url: Settings.docs_url,) %>

    diff --git a/app/views/users/settings.html.erb b/app/views/users/settings.html.erb index 20a6d3859f..fbc38e120b 100644 --- a/app/views/users/settings.html.erb +++ b/app/views/users/settings.html.erb @@ -57,12 +57,12 @@

    <%= t('help') %>

    - + <%= t('key_pairs.help.windows') %>

    - + <%= t('key_pairs.help.macOS_linux') %>

    diff --git a/config/initializers/config.rb b/config/initializers/config.rb index 5f67ff5af8..2fc56ec8bc 100644 --- a/config/initializers/config.rb +++ b/config/initializers/config.rb @@ -191,6 +191,7 @@ optional(:lti).filled(:string) optional(:repos).filled(:string) end + optional(:docs_url).filled(:string) optional(:lti).hash do optional(:course_filter_file).filled(:string) required(:domains).array(:str?) diff --git a/config/locales/defaults/download_upload/en.yml b/config/locales/defaults/download_upload/en.yml index 2e62b1bb80..73784b24cf 100644 --- a/config/locales/defaults/download_upload/en.yml +++ b/config/locales/defaults/download_upload/en.yml @@ -26,7 +26,7 @@ en: unparseable_csv: The selected file is not a CSV file (even though it may have a .csv extension). zip_entry_too_large: Zip entry %{file_name} exceeds the maximum file size of %{max_size} MB. zip_too_large_total: Zip file uncompressed size exceeds the maximum of %{max_mb} MB. - upload_help_html: ' For information about the file format(s) supported, please visit this page.' + upload_help_html: ' For information about the file format(s) supported, please visit this page.' upload_success: one: "%{count} object successfully uploaded." other: "%{count} objects successfully uploaded." diff --git a/config/locales/views/admin/en.yml b/config/locales/views/admin/en.yml index f2adb9ef22..946c8519f1 100644 --- a/config/locales/views/admin/en.yml +++ b/config/locales/views/admin/en.yml @@ -8,4 +8,4 @@ en: markus_administration: MarkUs Administration monitoring: Monitoring users: - admin_csv_upload_help_html: For more information about this feature and the
    file format(s) supported, please visit this page. + admin_csv_upload_help_html: For more information about this feature and the
    file format(s) supported, please visit this page. diff --git a/config/locales/views/assignments/en.yml b/config/locales/views/assignments/en.yml index 40c9526cb0..d03729e5a8 100644 --- a/config/locales/views/assignments/en.yml +++ b/config/locales/views/assignments/en.yml @@ -107,7 +107,7 @@ en: upload_config_files: errors: invalid_starter_file_group_dirname: 'Invalid directory_name for starter file group: %{directory_name}' - upload_config_help_html: "

    This zip file will configure and create this assignment.

    This does not configure student or grader settings.
    For more information please visit this page.

    " + upload_config_help_html:

    This zip file will configure and create this assignment.

    This does not configure student or grader settings.
    For more information please visit this page.

    upload_file_requirement: Filename %{file_name} is not allowed for this assignment. upload_file_requirement_in_folder: Filename %{file_name} in %{file_path} is not allowed for this assignment. upload_grades: diff --git a/config/locales/views/exam_templates/en.yml b/config/locales/views/exam_templates/en.yml index ed18ae30d0..d9e04aaa39 100644 --- a/config/locales/views/exam_templates/en.yml +++ b/config/locales/views/exam_templates/en.yml @@ -47,7 +47,7 @@ en: title: Generate Exam Copies help_manual_html: |

    - For more details on any of these steps and more, please visit the MarkUs wiki. + For more details on any of these steps and more, please visit the MarkUs documentation website.

    Editing Exam Templates

    Select an Exam Template on the left to edit it. In addition to changing the name and template file you may also make changes to the following: @@ -68,7 +68,7 @@ en: If enabled, MarkUs will attempt to scan a portion of the test cover page and parse handwriting corresponding to either a student's user name or ID number. MarkUs will then attempt to match the test paper to a student in the course. This feature is not designed to replace the manual matching process. For more details please - consult the wiki. + consult the documentation.

    Uploading Completed Test Papers

    diff --git a/config/locales/views/graders/en.yml b/config/locales/views/graders/en.yml index 9b2f018852..22929a8001 100644 --- a/config/locales/views/graders/en.yml +++ b/config/locales/views/graders/en.yml @@ -33,4 +33,4 @@ en: upload: remove_existing_mappings: Remove existing grader assignments weight: Grader Weight - wiki: See our wiki for more information. + wiki: See our documentation website for more information. diff --git a/config/locales/views/users/en.yml b/config/locales/views/users/en.yml index 92b4f28c5b..6fec0654d0 100644 --- a/config/locales/views/users/en.yml +++ b/config/locales/views/users/en.yml @@ -43,7 +43,7 @@ en: users: account_settings: Account Settings api_key: - help_html: The API key is used for authentication for the MarkUs API. See MarkUs Wiki for information on using the API. + help_html: The API key is used for authentication for the MarkUs API. See the MarkUs documentation website for information on using the API. reset: Reset API key unavailable: Unavailable not_found: 'No user can be found with the user name: %{user_names}' diff --git a/config/settings/development.yml b/config/settings/development.yml index 52055d6caa..93871e3f33 100644 --- a/config/settings/development.yml +++ b/config/settings/development.yml @@ -38,6 +38,8 @@ logging: autotest: max_batch_size: 10 +docs_url: http://localhost:4000 + lti: adapter_file: <%= "#{::Rails.root}/config/dummy_lti_config.rb" %> domains: <%= %w[host.docker.internal] %> diff --git a/config/settings/production.yml b/config/settings/production.yml index e6414c88f7..c8f73143f3 100644 --- a/config/settings/production.yml +++ b/config/settings/production.yml @@ -32,6 +32,8 @@ logging: autotest: max_batch_size: 500 +docs_url: https://markus-docs.teach.cs.toronto.edu + # The settings below are for an experimental feature that is not available # in production yet. Please disregard for now. lti: diff --git a/config/settings/test.yml b/config/settings/test.yml index 977f31384d..bd21b67b84 100644 --- a/config/settings/test.yml +++ b/config/settings/test.yml @@ -38,5 +38,7 @@ lti: unpermitted_new_course_message: 'You are not permitted to create a new MarkUs course for %{course_name}. Please contact your system administrator.' sync_schedule: "0 3 * * *" +docs_url: http://localhost:4000 + file_storage: default_root_path: <%= "#{::Rails.root}/data/#{::Rails.env}#{ENV['TEST_ENV_NUMBER']}/" %> diff --git a/doc/README_FOR_APP b/doc/README_FOR_APP deleted file mode 100644 index b79bb5d5cc..0000000000 --- a/doc/README_FOR_APP +++ /dev/null @@ -1,10 +0,0 @@ -This is the API documentation for MarkUs, an online marking tool. - -For further information please see: - https://github.com/MarkUsProject/Markus - -Tickets and/or bug reports: - https://github.com/MarkUsProject/Markus/issues - -Wiki: - https://github.com/MarkUsProject/Wiki diff --git a/docs/_config.yml b/docs/_config.yml index 6cb7d6908c..4a71d27611 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,6 +1,7 @@ destination: /jekyll/site cache_dir: /jekyll/cache +url: https://markus-docs.teach.cs.toronto.edu title: MarkUs Docs description: Documentation for MarkUs — a web-based tool for the submission and grading of student programming assignments. theme: just-the-docs diff --git a/jest_env_setup.js b/jest_env_setup.js index f9dce12887..02a2e62efa 100644 --- a/jest_env_setup.js +++ b/jest_env_setup.js @@ -11,3 +11,5 @@ window.$ = window.jQuery = global.jQuery = global.$ = $; import {I18n} from "i18n-js"; import translations from "translations.json"; window.I18n = new I18n(translations); + +global.DOCS_URL = "http://localhost:4000";