Skip to content

hide import button if no access, minor lint fixes - #8554

Merged
adi-herwana-nus merged 2 commits into
masterfrom
adi/import-assessments-button-fix
Aug 23, 2026
Merged

hide import button if no access, minor lint fixes#8554
adi-herwana-nus merged 2 commits into
masterfrom
adi/import-assessments-button-fix

Conversation

@adi-herwana-nus

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates assessment marketplace permissions so import visibility is independent of assessment-creation access, with related tests and RuboCop cleanup.

Changes:

  • Adds and tests canImportAssessments authorization.
  • Separates import and create action visibility.
  • Applies minor Ruby, view, frontend, and configuration cleanups.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Summary
spec/libraries/has_one_many_attachments_spec.rb Documents intentional self-assignment.
spec/controllers/course/assessment/assessments_marketplace_spec.rb Tests marketplace import permissions.
lib/autoload/duplicator.rb Simplifies maximum-time capping.
client/app/types/course/assessment/assessments.ts Adds import permission type.
client/app/bundles/course/assessment/pages/AssessmentsIndex/index.tsx Separates import and create action visibility.
client/app/bundles/course/assessment/pages/AssessmentsIndex/__test__/AssessmentsTable.test.tsx Updates assessment fixtures.
client/app/bundles/course/assessment/pages/AssessmentsIndex/__test__/AssessmentsIndex.test.tsx Tests action visibility combinations.
app/views/course/assessment/question/programming/_response.json.jbuilder Simplifies conditional JSON output.
app/views/course/assessment/assessments/index.json.jbuilder Exposes marketplace access permission.
app/services/course/duplication/object_duplication_service.rb Simplifies nonnegative time shifting.
app/services/course/assessment/question/codaveri_problem_generation_service.rb Removes redundant fallback.
app/services/concerns/course/user_invitation_service/parse_invitation_concern.rb Removes redundant require and escape.
app/models/course/settings/survey_component.rb Removes a redundant method.
app/models/course/settings/email.rb Removes a trailing comma.
app/models/course/lesson_plan/item.rb Removes redundant receivers.
app/models/course/assessment/answer/programming_file.rb Simplifies range clamping.
app/models/course/assessment/answer/multiple_response.rb Removes a redundant receiver.
app/models/concerns/course/video/watch_statistics_concern.rb Simplifies conditional control flow.
app/models/concerns/course/assessment/questions_concern.rb Simplifies unanswered-question lookup.
app/jobs/course/assessment/submission/auto_feedback_job.rb Simplifies conditional execution.
app/helpers/application_html_formatters_helper.rb Uses a literal replacement string.
app/controllers/course/assessment/question/text_responses_controller.rb Simplifies conditional assignment.
app/controllers/concerns/application_authentication_concern.rb Renames token helper methods.
.rubocop_todo.yml Removes resolved lint exclusions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@adi-herwana-nus
adi-herwana-nus merged commit f0be60c into master Aug 23, 2026
10 of 11 checks passed
@adi-herwana-nus
adi-herwana-nus deleted the adi/import-assessments-button-fix branch August 23, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants