I used this script to “clean up” two courses I’m developing (about 1,000 words each). It worked like a champ! Thanks, @neoncube, for providing this!
Is there any chance you could adapt your script so it would be possible to check for just a few levels at a time and not for a whole course at once. I’m asking this for an XL course (nearly 5000 words and 200 levels) that I’m going to contribute to.
Are you wanting the script to process the levels in “chunks”, so that the browser doesn’t freeze for large courses, or are you wanting to be able to just process certain levels (for example, levels 2, 5, and 7)?
They are 25-words levels but there are so many levels. So I am mainly worried about freezing when processing all the levels at once. If the latter option would be possible.
Okay. That seems like a reasonable request to me, but honestly, I’m not sure that I have the time/motivation to do a change like that at the moment.
Can you go ahead and run the script and see how things go? I’ve run this script before on courses that had similar amounts of words/levels as what you’ve described, and the page would often freeze for perhaps a few minutes, but it would eventually become responsive again
All right, I really didn’t know if it would be possible and how much time it would take to make such a change. But I just thought I could try and ask if you saw a chance to do this because the course in question needs a lot of editing.
I ran the script once without any difficulties and it took about 15 minutes.
I’m having some issues with a popular course I’ve recently adopted. It is a multiple instances of the same picture problem that your script does not seem able to fix.
Maybe that is because of the amount of test columns this course has. The main problem is the fourth test column. When I run your script the database entries in levels testing for the third and fourth column stay grey. So I guess that means (in this case) these columns are not being processed?
Can you please post a screenshot?
I got your screenshot. I have some ideas on how it might be possible to modify the script to fix phantom images as well as phantom text entries, but my motivation to work on this script is kind of low at the moment, sorry.
Does deleting and reuploading the images on the entries that have the phantoms fix them?
Thank you so much for writing and sharing this script. I made a lot of corrections in my course and the phantom answers drove me crazy. Thanks to you it was solved in a minute.
Glad to hear it was helpful
You are an absolute STAR. Thank you!
This script seems to have resolved the issues I’ve been having on one on my private courses. Thanks!
Pardon a probably simple question from a newbie working on his first course. I have the Chrome Tampermonkey add-in installed and working. I have installed the “Eliminate Phantom Entires” script in Tampermonkey. When I go to my course “edit words” page, I see the Tampermonkey icon indicating that the “Eliminate Phantom Entries.” How do I now run the script?
Thanks for any help you can give me.
It’s the button at the top of the edit course page, above the levels.
I guess you’ll need to add a level to your course first.
Thanks for the help. Once I added a new level to my course, the button appeared. I ran the script and then deleted the new level (which had no words in it). The course now looks fine.
The script also solved the other mystery that I had which was that the course thought there were more words than it actually had. Running the “Eliminate Phantom Entries” script returned the word count back to the correct value.
Finished courses show up as "unfinished"
New Course Showing More Words Than In Database
@Ieuan_ab_Arthur, thanks for letting us know! I’d been curious if maybe this script would also fix that problem
Hmm, now this got me thinking. As you might’ve noticed, there is a problem with courses showing up as “unfinished” in the Android app (see this thread). Now I do wonder as to whether those phantom entries might actually be the root cause of the problem!
On the off-chance: in case anybody of you guys has administrative access to a course that erroneously shows up as “unfinished”: could you try and run the script on it to see whether the course shows up as “finished” afterwards?