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

💻 change calculation and phrasing of number of programs in profile page #5193

Closed
Felienne opened this issue Feb 29, 2024 · 8 comments · Fixed by #5278
Closed

💻 change calculation and phrasing of number of programs in profile page #5193

Felienne opened this issue Feb 29, 2024 · 8 comments · Fixed by #5278
Assignees
Labels
frontend Issue with the web interface

Comments

@Felienne
Copy link
Member

Here is another remark from yesterday's school, in your public profile, why is there "programs created" and "programs saved", what is the difference?

image

I suspect this is legacy from when we really had a save button! IN the current state of things, where a run is a save, what does this mean?

And even more general (this is my note, not from the kids...) what does programs created mean? Should we use the new system here that @jpelay made in #5162 so we count the actual changed adventure codes (and change the label into something like "number of adventures completed" or "number of adventures tried" ?

@Felienne Felienne added the frontend Issue with the web interface label Feb 29, 2024
@Felienne Felienne changed the title 💻 💻 change calculation and phrasing of number of programs in profile page Feb 29, 2024
@jpelay
Copy link
Member

jpelay commented Feb 29, 2024

And even more general (this is my note, not from the kids...) what does programs created mean? Should we use the new system here that @jpelay made in #5162 so we count the actual changed adventure codes (and change the label into something like "number of adventures completed" or "number of adventures tried" ?

I like this idea! Gives more of a sense of completion I think! It'll be a little weird for kids that just use the editor to program their own thing as opposed to competing the adventures, but for students in a class I think it makes a lot of sense!

@Annelein
Copy link
Collaborator

@Felienne now 'programs saved' correspondents with the total of 'My programs', would this also mean that it's needed to implement that only a program becomes 'My program' once the adventure code is actually changed?

@Felienne
Copy link
Member Author

Felienne commented Mar 14, 2024 via email

@Annelein Annelein self-assigned this Mar 14, 2024
@Annelein
Copy link
Collaborator

I will implement it along with #5192

@Annelein
Copy link
Collaborator

@Felienne now 'programs saved' correspondents with the total of 'My programs', would this also mean that it's needed to implement that only a program becomes 'My program' once the adventure code is actually changed?

@jpelay is this possible with #5162 ?

def is_program_modified(self, program, full_adventures, teacher_adventures):

Because for that function you need a program but depending on that function, you want it to be saved as a program or not.

@jpelay
Copy link
Member

jpelay commented Mar 14, 2024

@Felienne now 'programs saved' correspondents with the total of 'My programs', would this also mean that it's needed to implement that only a program becomes 'My program' once the adventure code is actually changed?

@jpelay is this possible with #5162 ?

def is_program_modified(self, program, full_adventures, teacher_adventures):

Because for that function you need a program but depending on that function, you want it to be saved as a program or not.

I think so! It should be possible, but you'd need to pass all of the adventures and the teacher adventures that the student might have completed.

@Annelein
Copy link
Collaborator

I think so! It should be possible, but you'd need to pass all of the adventures and the teacher adventures that the student might have completed.

@jpelay and how would it work with having to pass a program, but depending on that function, you want it to be saved as a program or not. So the 'program' does not exist yet?

@jpelay
Copy link
Member

jpelay commented Mar 18, 2024

@jpelay and how would it work with having to pass a program, but depending on that function, you want it to be saved as a program or not. So the 'program' does not exist yet?

I think in this case the program does exist. We would automatically save the program just as we do right now, but we'd filter the programs we show on the basis of whether they're modified or not; or even show them, but as Felienne says, instead of saying: "X programs created", display: "X adventures completed/tried", and this would be the result of iterating through the programs and then adding the ones for which is_program_modified returns true.

@Annelein Annelein moved this to In Progress in Hedy organization board Mar 25, 2024
@Annelein Annelein moved this from In Progress to Ready for Review in Hedy organization board Apr 8, 2024
@mergify mergify bot closed this as completed in #5278 Apr 23, 2024
mergify bot pushed a commit that referenced this issue Apr 23, 2024
Fixes #5193 
Fixes #5192 
Fixes #1275

This fixes that only the programs which are modified are counted as (for now) programs saved.
[This](#5386) is the new issue for the design that shows this counter (where programs_saved will be changed):


**Also solved that only if a program is modified, the confetti button is shown:**

https://github.com/hedyorg/hedy/assets/48122190/dd0e6fe2-5484-4192-8f92-be01d1d5607e


How to test:
- Run a program with preview code, make sure it doesn't get added to my-programs
- Run a program with 'modified code' so not the preview code and make sure it does get added to my programs
- Remove a program from my programs and make sure the counter and the options in the forms get properly updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Issue with the web interface
Projects
Status: Ready for Review
Development

Successfully merging a pull request may close this issue.

3 participants