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

[#11085] Instructor edit questions: tweak option order for generating answers from teams #11092

Merged
merged 10 commits into from
Apr 9, 2021

Conversation

tlhuynh
Copy link
Contributor

@tlhuynh tlhuynh commented Apr 6, 2021

Fixes #11085

Outline of Solution

The goal is to reorder the list from "Or, generate options for the list of all" checkbox for the multiple-choice type questions.

The fix was to reorder the strings inside PARTICIPANT_TYPES to match with the expected order.

The files edited were:

src/web/app/components/question-types/question-edit-details-form/mcq-question-edit-details-form.component.ts

src/web/app/components/question-types/question-edit-details-form/msq-question-edit-details-form.component.ts

Copy link
Contributor

@daongochieu2810 daongochieu2810 left a comment

Choose a reason for hiding this comment

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

Changes look good to me! However please remove changes made in .vscode/settings.json, angular.json and the alarmingly large package-lock,.json

@moziliar
Copy link
Contributor

moziliar commented Apr 7, 2021

Do remove file .vscode/settings.json (I suppose you should add it in your .gitignore, preferably globally too), and git restore both angular.json and package-lock.json as mentioned above, which were a result of your npm install.

@tlhuynh
Copy link
Contributor Author

tlhuynh commented Apr 7, 2021

Alright! I made the changes. I'll keep this in mind for the next PR. Regarding the package-lock.json and angular.json, what do you guys normally do to avoid big changes added to those files due to npm install?

@moziliar
Copy link
Contributor

moziliar commented Apr 7, 2021

@tlhuynh Before you commit, you should check your git status (and even git diff) to ensure that you are going to commit the intended changes; if you find changes to files like package-lock.json, you could just git restore it, since the file is about locking the dependency versions in your package.json and you shouldn't really expect it to be different from the master unless you add in new dependency (and lock again). For changes to angular.json, you could just simply omit it when committing.

Of course, the cause of the additional line in angular.json is that you enabled angular's analytics by default (becoz Google); you can do ng analytics off to manually turn it off, or just indicate N when prompted upon npm run start (which in turn runs ng serve that normally prompts you so anyways).

.gitignore Outdated
@@ -1,4 +1,5 @@
.DS_Store
.vscode/
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we should explicitly add this here.. Ideally, every dev should kind of add it anyways.
@rrtheonlyone should we add vsc gitignore in this PR? I see that IDEA is added but not vsc.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think for now, you could try to add this line to your own global .gitignore first instead of project local.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it. I will get to it now.

Copy link
Contributor

@moziliar moziliar left a comment

Choose a reason for hiding this comment

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

Maybe you should reorder the options further:

student -> student exclude self
team -> team exclude self
own team exclude self -> own team (reversed?)

@tlhuynh
Copy link
Contributor Author

tlhuynh commented Apr 7, 2021

@moziliar I see I see. Thank you so much. I'll make sure to pay attention to this more from now on.

@moziliar
Copy link
Contributor

moziliar commented Apr 8, 2021

One thing to note is that for UI changes, it is best to attach screenshot of all the affected components.

@tlhuynh
Copy link
Contributor Author

tlhuynh commented Apr 8, 2021

Do you mean for the PR description? Like screenshots for how it was before and how it looks after the changes? I thought about it but wasn't sure if it was necessary. Will do, if I work with UIs again.

Copy link
Contributor

@moziliar moziliar left a comment

Choose a reason for hiding this comment

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

LGTM. @damithc do you want to vet the ordering of the options too?

@damithc
Copy link
Contributor

damithc commented Apr 8, 2021

@damithc do you want to vet the ordering of the options too?

Yes please. Let me know when a screenshot has been posted.

@moziliar
Copy link
Contributor

moziliar commented Apr 8, 2021

@tlhuynh typically, a screenshot is needed for UI related changes. Do attach screenshots for both dropdown (I see two are changed and only these two are needed)

@tlhuynh
Copy link
Contributor Author

tlhuynh commented Apr 8, 2021

@damithc , @moziliar

Here are the screenshots for the changes:

This one is for the MC-single answer
Multiple-choice Single Answer

And, this one is for the MC-multi answers
Multiple-choice Multiple Answers

@moziliar moziliar added the s.FinalReview The PR is ready for final review label Apr 8, 2021
@moziliar moziliar requested a review from madanalogy April 8, 2021 04:20
@damithc
Copy link
Contributor

damithc commented Apr 8, 2021

his one is for the MC-single answer
Multiple-choice Single Answer

Not what I was expecting when I posted the original issue. Isn't it easier for the user if we pair x and x (excluding ...)?

e.g.,

students
students (excluding self)
...

@tlhuynh
Copy link
Contributor Author

tlhuynh commented Apr 8, 2021

@damithc
That was the original fix, but @moziliar wants to see if we can reorder it further and put them into groups (with self and excluding self). I can always reorder them depend on how you guys want them.

@moziliar
Copy link
Contributor

moziliar commented Apr 8, 2021

@tlhuynh I didn't imply grouping by the way; instead, I was just pointing out that the self and excluding self ordering of the last pair was reversed.

@tlhuynh
Copy link
Contributor Author

tlhuynh commented Apr 8, 2021

@moziliar
Ahh, I see I see. I misunderstood, then. I thought you wanted to separate them. That was my fault. Making the change now.

@tlhuynh
Copy link
Contributor Author

tlhuynh commented Apr 8, 2021

@damithc
Here are the new screenshots:
For MC-single answer:
New-MC-single answer

For MC-multi answers:
New-MC-multi answers

@damithc
Copy link
Contributor

damithc commented Apr 8, 2021

For MC-single answer:
New-MC-single answer

Looks good to me 👍

Copy link
Contributor

@daongochieu2810 daongochieu2810 left a comment

Choose a reason for hiding this comment

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

lgtm

@daongochieu2810 daongochieu2810 added s.ToMerge The PR is approved by all reviewers including final reviewer; ready for merging and removed s.FinalReview The PR is ready for final review labels Apr 9, 2021
@daongochieu2810 daongochieu2810 merged commit f7033a3 into TEAMMATES:master Apr 9, 2021
@madanalogy madanalogy added the c.Feature User-facing feature; can be new feature or enhancement to existing feature label Apr 11, 2021
@madanalogy madanalogy added this to the V7.15.0 milestone Apr 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c.Feature User-facing feature; can be new feature or enhancement to existing feature s.ToMerge The PR is approved by all reviewers including final reviewer; ready for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instructor edit questions: tweak option order for generating answers from teams
5 participants