[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GSoC'24] M2.6: Generalize diagnostic test player #20664

Merged
merged 8 commits into from
Jul 21, 2024

Conversation

AFZL210
Copy link
Member
@AFZL210 AFZL210 commented Jul 10, 2024

Overview

  1. This PR fixes or fixes part of [Feature Request]: Support multiple classrooms from the learner side. #19849 .
  2. This PR does the following: Updated the diagnostic player to support any classroom earlier the diagnostic test player was hard coded just for the math classroom now we add the classroom url fragment in the query string when learner starts the test from the classroom page.

Essential Checklist

Please follow the instructions for making a code change.

  • I have linked the issue that this PR fixes in the "Development" section of the sidebar.
  • I have checked the "Files Changed" tab and confirmed that the changes are what I want to make.
  • I have written tests for my code.
  • The PR title starts with "Fix #bugnum: " or "Fix part of #bugnum: ...", followed by a short, clear summary of the changes.
  • I have assigned the correct reviewers to this PR (or will leave a comment with the phrase "@{{reviewer_username}} PTAL" if I can't assign them directly).

Proof that changes are correct

diagnostic-test.mp4

Proof of changes on desktop with slow/throttled network

N/A

Proof of changes on mobile phone

N/A

Proof of changes in Arabic language

N/A

PR Pointers

Copy link
oppiabot bot commented Jul 10, 2024

Hi @AFZL210 please assign the required reviewer(s) for this PR. Thanks!

@AFZL210 AFZL210 changed the title [GSoC'24] M2.6: Update diagnostic player page to support any classroom [GSoC'24] M2.6: Update diagnostic player to support any classroom Jul 10, 2024
@AFZL210 AFZL210 marked this pull request as ready for review July 11, 2024 13:33
@AFZL210 AFZL210 requested review from a team as code owners July 11, 2024 13:33
@AFZL210 AFZL210 requested a review from nikitaevg July 11, 2024 13:33
@AFZL210
Copy link
Member Author
AFZL210 commented Jul 11, 2024

@nikitaevg PTAL, Thanks!.

@AFZL210 AFZL210 changed the title [GSoC'24] M2.6: Update diagnostic player to support any classroom [GSoC'24] M2.6: Generalize diagnostic player to support any classroom Jul 11, 2024
@AFZL210 AFZL210 changed the title [GSoC'24] M2.6: Generalize diagnostic player to support any classroom [GSoC'24] M2.6: Generalize diagnostic test player Jul 11, 2024
'public_classrooms_count': 1,
'topic_id_to_prerequisite_topic_ids': {
self.public_topic_id_1: [],
self.private_topic_id: []
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add test that a prerequisite is displayed here if present. Can be done within this test

Copy link
Member Author
@AFZL210 AFZL210 Jul 19, 2024

Choose a reason for hiding this comment

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

We don't need this now as we are not adding topic_id_to_prerequisite_topic_ids in this endpoint.

Comment on lines 111 to 114
.catch(() => {
this.router.navigate([
`${AppConstants.PAGES_REGISTERED_WITH_FRONTEND.ERROR.ROUTE}/404`,
]);
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't look right, what if an error is not "not found", but some internal server error? Is there a page for 5xx status codes?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes we do have a page for that.

Let's do this instead:

if there is server error redirect user to /500 internal server error page.

and if the classroom url fragment is not correct show an alert saying "Invalid classroom url fragment" and disable the 'Start Test' button.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

Copy link
oppiabot bot commented Jul 13, 2024

Unassigning @nikitaevg since the review is done.

@AFZL210
Copy link
Member Author
AFZL210 commented Jul 19, 2024

@nikitaevg PTAL. Thanks!

Copy link
Contributor
@nikitaevg nikitaevg left a comment

Choose a reason for hiding this comment

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

Please fix the comment I left

})
.catch(error => {
this.isStartTestButtonDisabled = true;
if (error.status === 500) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This inconsistency is strange. For 500 we route to an error page, for others we show a warning. IIRC warnings are the default approach in Oppia to tell about the problem, so let's stick to it

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. let's just show warning and disable start button.

Copy link
oppiabot bot commented Jul 21, 2024

Unassigning @nikitaevg since they have already approved the PR.

@oppiabot oppiabot bot added the PR: LGTM label Jul 21, 2024
Copy link
oppiabot bot commented Jul 21, 2024

Hi @AFZL210, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to merge this PR once the CI checks pass and you're happy with it. Thanks!

@AFZL210 AFZL210 enabled auto-merge July 21, 2024 15:46
@AFZL210 AFZL210 added this pull request to the merge queue Jul 21, 2024
Merged via the queue into oppia:develop with commit 235e6d0 Jul 21, 2024
117 checks passed
@AFZL210 AFZL210 deleted the fix#19849-update-diagnostic-test branch July 21, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants