See what grammar/vocabulary/objectives a lesson is going to teach you
< Feedback on Duolingo extended lesson info
Thanks for the feedback!
This is awesome. I tried it with German for English learners and it works. Joining two classes at once seems not supported (yet).
I added a patch for this in the latest version, let me know if this works for you.
I want to report one thing though: since the descriptions of the lessons are sometimes long, there is a need to scroll down to read the rest, but doing so takes the description out of focus and will have to click again to read. And whenever there is another scroll, the same thing happens. You think you can fix that? Maybe make the description stay there even when the page is scrolled?
Sadly I couldn't find a way to hook into Duolingo's page scroll handler (suggestions welcome) to prevent the description popup from closing. I limited the dialog height so a scrollbar shows up in the description popup itself, and I also made it so that collapsed sections stay collapsed until you click on them again. Hopefully that reduces the need to scroll the site itself a bit.
let me know if this works for you.
1.2 doesn't work for me. It doesn't show the description popup anymore. I tried joining more than one classroom to check and still nothing. On the other hand, downgrading to 1.1 again makes it work. Not only that but it also makes the description popup for the other languages as well without even joining their corresponding classrooms (only German for English classroom). If that was an option, I would have picked it for myself. I would like the script to show me the description of all the languages I am learning on my profile without the need to join classrooms.
Sadly I couldn't find a way to hook into Duolingo's page scroll handler (suggestions welcome) to prevent the description popup from closing. I limited the dialog height so a scrollbar shows up in the description popup itself, and I also made it so that collapsed sections stay collapsed until you click on them again. Hopefully that reduces the need to scroll the site itself a bit.
Thanks for all the efforts. That sounds like a good temporary solution. Too bad I couldn't test that out since v1.2 doesn't work for me but looking forward to it. Keep it up!
let me know if this works for you.
1.2 doesn't work for me.
Ah whoops, you're probably using Tampermonkey/Violentmonkey, right? Fetching data from the Schools API needs separate code for these, which I forgot to consider with the update. Should be working now!
Ah whoops, you're probably using Tampermonkey/Violentmonkey, right? Fetching data from the Schools API needs separate code for these, which I forgot to consider with the update. Should be working now!
Awesome! It is working now, but...
I limited the dialog height so a scrollbar shows up in the description popup itself, and I also made it so that collapsed sections stay collapsed until you click on them again. Hopefully that reduces the need to scroll the site itself a bit.
The collapsed sections update works but there is still no scrollbar. There is a small resizing clickable at the corner of the popup to resize the panel but it's not of much help.
Not only that but it also makes the description panel appear for the other languages as well without even joining their corresponding classrooms (only German for English classroom).
Only before refreshing the page. As soon as it is refreshed, the script notifies that the user has not joined the corresponding classroom of the target language.
The collapsed sections update works but there is still no scrollbar. There is a small resizing clickable at the corner of the popup to resize the panel but it's not of much help.
Have you expanded all three of "Learning objectives"/"Grammar"/"Vocabulary"? The scrollbar won't show up unless the content exceeds 300 pixels. If it doesn't show up even then, maybe it's a browser restriction.
Not only that but it also makes the description panel appear for the other languages as well without even joining their corresponding classrooms (only German for English classroom).
Only before refreshing the page. As soon as it is refreshed, the script notifies that the user has not joined the corresponding classroom of the target language.
The refresh being needed is something that'll take some effort to fix, so not sure when/if I'll put down the effort for that.
Are you saying you still have other problems after refreshing the page? In that case, what languages are you learning and what classrooms have you set up (native_language->language_to_be_learned for each)? I've tested with French for English speakers and Spanish for German speakers, so I'm surprised it wouldn't work.
Have you expanded all three of "Learning objectives"/"Grammar"/"Vocabulary"? The scrollbar won't show up unless the content exceeds 300 pixels. If it doesn't show up even then, maybe it's a browser restriction.
Ah, okay, it's working as intended. Great work.
The refresh being needed is something that'll take some effort to fix, so not sure when/if I'll put down the effort for that.
If it was up to me, I'd prefer to have the descriptions show up even after the refresh. You think that's possible?
Are you saying you still have other problems after refreshing the page? In that case, what languages are you learning and what classrooms have you set up (native_language->language_to_be_learned for each)? I've tested with French for English speakers and Spanish for German speakers, so I'm surprised it wouldn't work.
No, it's just that before refreshing I get the descriptions for all the languages I have on my account without the need to have classrooms for them, but after the refresh it is limited to the only language pair I have a classroom for.
What's your next step with this project?
Ah, okay, it's working as intended. Great work.
Glad it's working! With this in place, I'll probably just expand all sections by default with the next update.
No, it's just that before refreshing I get the descriptions for all the languages I have on my account without the need to have classrooms for them, but after the refresh it is limited to the only language pair I have a classroom for.
Heh, I misunderstood your initial problem description. Looks like what I thought is the bug is what you want to have by default :) However, for the descriptions in languages you did *not* join a classroom for, can you double check with the previous script version if those descriptions actually match the language?
During my testing I saw the same behavior as you described, but on closer look it was actually just the descriptions for the French course displayed on the Spanish course. That would clearly not be useful, which is why I thought you were pointing at this bug. But if you're seeing something different, that might be an interesting thing I didn't know about the Duolingo for Schools API.
What's your next step with this project?
Honestly nothing big really. I'm happy with the current functionality, and the Schools API doesn't provide any further information beyond. I have some other (completely unrelated) ideas, but working with React (the web framework used by Duolingo) makes many of those too difficult to bother unfortunately.
However, for the descriptions in languages you did *not* join a classroom for, can you double check with the previous script version if those descriptions actually match the language?
During my testing I saw the same behavior as you described, but on closer look it was actually just the descriptions for the French course displayed on the Spanish course. That would clearly not be useful, which is why I thought you were pointing at this bug. But if you're seeing something different, that might be an interesting thing I didn't know about the Duolingo for Schools API.
Oh my god, how did I miss that? 🤣
You are completely right. It's a bug then. Oh well, I'll just make use of the script as it is for now. Looking forward to future updates.
This is awesome. I tried it with German for English learners and it works. Joining two classes at once seems not supported (yet).
I want to report one thing though: since the descriptions of the lessons are sometimes long, there is a need to scroll down to read the rest, but doing so takes the description out of focus and will have to click again to read. And whenever there is another scroll, the same thing happens. You think you can fix that? Maybe make the description stay there even when the page is scrolled?
Great script overall. Thank you!