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

Show a level as in progress when a student starts interacting with it #36918

Merged
merged 4 commits into from
Sep 25, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/src/StudioApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -1860,7 +1860,8 @@ StudioApp.prototype.silentlyReport = function() {
this.report({
app: getStore().getState().pageConstants.appType,
level: this.config.level.id,
skipSuccessCallback: true
skipSuccessCallback: true,
testResult: TestResults.LEVEL_STARTED
Copy link
Contributor

Choose a reason for hiding this comment

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

Apologies if this is a dumb question, but why do we report LEVEL_STARTED on every report instead of reporting it once when the level starts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"when the level starts" = on initial page load?

Let me know if this answers your question:
Initially, we wanted to report milestones more often so we can get a more accurate idea of how much time a user is spending on a level (details here if helpful: #36606). This milestone report is intended to allow us to measure the time spent on the level.

However, when triggering this milestone report, we weren't recording any sort of testResult as part of the API call. Even though we now had a record that the user had started the level, that wouldn't translate back to the user as a green outline on their progress bubble.

Reporting the progress as "LEVEL_STARTED" once when the level starts would probably be a better overall design, but the existing convention from other milestone is to record a testResult on every API call, even if that testResult will end up as a noop action.

Copy link
Contributor

Choose a reason for hiding this comment

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

@jmkulwik i wonder if renaming the LEVEL_STARTED constant would make the more clear? right now it looks like a boolean. maybe INITIAL_TEST_VALUE or LEVEL_STARTED_VALUE or something like that?

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense now, thanks for the explanation. I tried to think of another name but the best I could come up with was "REPORTED_PROGRESS". Not sure if that's better than "LEVEL_STARTED" or not, up to you.

});
this.hasReported = false;
};
Expand Down
1 change: 1 addition & 0 deletions apps/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const TestResults = {
UNSUBMITTED_ATTEMPT: -50, // Progress was saved without submitting for review, or was unsubmitted.

SKIPPED: -100, // Skipped, e.g. they used the skip button on a challenge level
LEVEL_STARTED: -150, // The user has triggered the reset action at least once (ex: by clicking the reset button)

// Numbers below 20 are generally considered some form of failure.
// Numbers >= 20 generally indicate some form of success (although again there
Expand Down
2 changes: 1 addition & 1 deletion apps/test/integration/levelSolutions/applab2/ec_simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = {
expected: [
{
result: undefined,
testResult: undefined
testResult: TestResults.LEVEL_STARTED
},
{
result: true,
Expand Down