Skip to content

Add Evaluate Button to Share Page #10614

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

Merged
merged 12 commits into from
May 30, 2025
Merged

Add Evaluate Button to Share Page #10614

merged 12 commits into from
May 30, 2025

Conversation

thsparks
Copy link
Contributor

@thsparks thsparks commented May 28, 2025

This adds an "Evaluate" button to the share page, which will only appear if the teachertool/showSharePageEvalButton is set to true in targetconfig.

It also includes some fixes to the load-project-from-url behavior that already existed in the teacher tool. Specifically, it:

  1. Ensures we preserve the hash and params on sign-in.
  2. Updates the share link input.
  3. Loads a new default checklist and goes to the results page automatically

The default checklist will only load if the teacher does not already have a checklist loaded. This way, if they're grading the same project for a bunch of students and have a customized rubric, they can still click the evaluate button here and it will load the same rubric they've been working with. It also prevents any accidental loss of work, which could happen if we overwrote the active rubric.

image

Fixes microsoft/pxt-microbit#5904

@thsparks thsparks requested a review from a team May 28, 2025 23:27
Copy link
Contributor

@srietkerk srietkerk left a comment

Choose a reason for hiding this comment

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

Just a couple of questions

const decoded = decodeURIComponent(projectParam);
const shareId = pxt.Cloud.parseScriptId(decoded);
if (!!shareId) {
pxt.tickEvent(Ticks.LoadProjectFromUrl);
Copy link
Collaborator

Choose a reason for hiding this comment

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

If would you prefer to remove the project param from the URL after processing it, this can be accomplished without a page reload using window.history.replaceState.

Copy link
Contributor

@srietkerk srietkerk left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@eanders-ms eanders-ms left a comment

Choose a reason for hiding this comment

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

Looks good!

@thsparks thsparks merged commit 06dba32 into master May 30, 2025
20 checks passed
@thsparks thsparks deleted the thsparks/eval_from_share branch May 30, 2025 18:00
@abchatra
Copy link
Collaborator

I asked LLM itself on what are the good questions for middle school students project.

✅ Basic Code Quality

  • Is the code clear and easy to understand?
  • Are the blocks arranged in a logical order?
  • Do the names of variables make sense for what they do?
  • Are there any blocks that don’t seem necessary?

🐞 Bug Checking

  • Are there any bugs or mistakes in this program?
  • Does the program work the way it’s supposed to?
  • Is anything missing that would make the program work better or more completely?

💡 Suggestions & Improvements

  • What are some ways this program could be improved?
  • Can the code be made simpler or shorter without changing how it works?
  • What could the student add to make this project more interesting or fun?

@Jaqster
Copy link
Member

Jaqster commented May 30, 2025

Can we put the button after the "Edit Code" button? This is only for Teachers, seems like the hierarchy should be switched...

@thsparks
Copy link
Contributor Author

I asked LLM itself on what are the good questions for middle school students project.

✅ Basic Code Quality

  • Is the code clear and easy to understand?
  • Are the blocks arranged in a logical order?
  • Do the names of variables make sense for what they do?
  • Are there any blocks that don’t seem necessary?

🐞 Bug Checking

  • Are there any bugs or mistakes in this program?
  • Does the program work the way it’s supposed to?
  • Is anything missing that would make the program work better or more completely?

💡 Suggestions & Improvements

  • What are some ways this program could be improved?
  • Can the code be made simpler or shorter without changing how it works?
  • What could the student add to make this project more interesting or fun?

Those seem to align fairly well with the questions included, which are:

  1. Does this program demonstrate good software development practices? (Code Quality)
  2. Are there any bugs in this program? (Bug checking)
  3. How could this program be improved? (Suggestions & Improvements)

@thsparks
Copy link
Contributor Author

Can we put the button after the "Edit Code" button? This is only for Teachers, seems like the hierarchy should be switched...

This code is already checked in, but feel free to file an issue. I will note that from my perspective, I feel like the farthest-right button (where Edit Code is currently) is actually the more strongly weighted / most-likely-to-be-clicked one. I feel like my attention is pulled more towards buttons on the end than buttons in the middle. Is it worth checking with a few other folks to see?

@Jaqster
Copy link
Member

Jaqster commented May 30, 2025

Yeah, I'm not sure. Just feels like evaluating the code is as important as opening the project in the editor (which it isn't). We can keep and see what happens? I think we'll just get a lot of confused people clicking on that button. The other thing maybe we could do is only show it if you're signed in already to try and scope this feature to Teachers?

@thsparks
Copy link
Contributor Author

Yeah, I'm not sure. Just feels like evaluating the code is as important as opening the project in the editor (which it isn't). We can keep and see what happens? I think we'll just get a lot of confused people clicking on that button. The other thing maybe we could do is only show it if you're signed in already to try and scope this feature to Teachers?

Unfortunately, the share page does not currently support sign-in, so that would be a significant amount of work. We could consider changing the appearance of the buttons so one is more "Primary" than the other?

@abchatra
Copy link
Collaborator

We could use different color for edit button as well, if that helps to prioritize. Sign-in for share page is lot of work and we shouldn't pick for this release.

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.

teacher tool: provide a set of premade AI questions (enhancement)
6 participants