[Userscript] Attempt to Eliminate Phantom Entries

userscript

(Neoncube) #1

Hello everyone,

This userscript attempts to remove phantom entries in a course.

What are phantom entries? Well, sometimes when you’re presented with multiple choice answers, some of the answers will be old definitions that aren’t present in your course anymore. These are phantom entries.

For example, let’s say that you add two words in your course, one after the other.

Word 1: helo
Word 2: goodbye

You then notice that word 1 is spelled incorrectly, so you correct it to “hello”, but when you get a multiple choice question for word 2, one of the answers is “helo” instead of “hello”, which isn’t what you wanted. This is a “phantom entry”.

Userscript
Github page for my Memrise scripts

To run this script, first install Tampermonkey, and then visit the “userscript” link above.

Then, to activate the script, go to the the page where you can edit a course’s levels. Next to the “Add level” button, there should be a new button that says “Attempt to eliminate phantom entries”. Click that button and then wait for the script to begin. After all of the items in all the levels have turned green or gray, the script should be finished. Note that you must have more than one level in your course in order to run the script.

Thanks to the people in this topic who tracked down the cause of this bug, and props to @DrewSSP who wrote a similar script in Python.

This script is only for course creators or course contributors. If you’d like to use this script on a course that you’re not the creator of or a contributor to, you’ll need to contact the course’s owner or ask Memrise to add you as a contributor.

Eli


[wiki] All the Userscripts
Old typo showing up as multiple choice answer
Problem with generated alternative answers
Deleted some of the database but it still appears on the answers?
Troubles with course creating
Deleted/old answers still appearing in tests
Quick and Effective Way To Remove Phantom Entries
The answer shows up in a wrong place in multiple selection
Deleted some of the database but it still appears on the answers?
[Course Forum] American Sign Language by Diana.S
A word not in the database keeps appearing as a possible answer
[Course Forum] Dutch - The 1,001 Most Common Words
[Course Forum] Duolingo Irish, by milero
Databases and weird multible choices
Course Creator's Wish List
Deleted/old answers still appearing in tests
Goodbye Ziggy
(Overlord Hydroptère) #2

hi, Eli

if i leave the head aside, do you think I could install it with “stylish”?

many thanks for your work


(Neoncube) #3

Hi, Hydroptere,

I’m not sure what you mean by “leave the head aside”, but the script uses JavaScript to run, so I’m pretty sure you’ll need something like Greasemonkey or Tampermonkey to run it. As far as I know, Stylish is just for CSS.

Eli


(Overlord Hydroptère) #4

sorry, “header”

thanks for clarifying! (as java is blocked by efault on my laptops, i’ll probably pass this time)


(Neoncube) #5

@Hydroptere, if you want to run the script without installing Greasemonkey or Tampermonkey, I think you could open the page for editing the levels of your course and then copy and paste the script’s contents into the Developer’s Console window.


(Overlord Hydroptère) #6

thanks for the trick

.


(Neoncube) #7

You’re welcome :slight_smile:


(Neoncube) #8

I’ve changed the name of the file so that it should be easier to install using Greasemonkey/Tampermonkey/etc. Follow the link to the script that’s in the original post to install the new file or to update your old one.


(Neoncube) #9

It looks like this isn’t working at the moment. I’m not sure if it was never working or if a Memrise update broke the script.


(Owlielovesbooks) #10

I’ve just run the script with Tampermonkey in MS Edge and it looks like it’s done the job. Thanks :slight_smile:


(Neoncube) #11

Ah, okay, interesting. Have you tested it to make sure that the phantom entries are gone? I have a course that I’ve been running the script on, but the script seems to not be working for it. I’m not sure why.


(Owlielovesbooks) #12

Sorry for the delay in coming back. I don’t know how check deeper into the database, but running reviews etc daily, no phantom entries have reappeared as of yet.


(DW7) #13

This thread is also useful:


(Neoncube) #14

@owlielovesbooks, Okay, awesome. Thanks for letting me know :slight_smile:


(Matteogiuseppe) #15

Hi @neoncube,
Does this script work in Firefox? I added to Greasemonkey, enabled the script, and went to the add level page on my courses but I’m not seeing the option to eliminate phantom levels.

Any ideas what I’m doing wrong?

Thanks!


(Neoncube) #16

Hi @matteogiuseppe, I just tried the script on Firefox, and it looks like no, it doesn’t currently work there :\

Thanks for letting me know about this. I’m now working on a fix :slight_smile:


(Neoncube) #17

Okay, the script should now work on Firefox using Greasemonkey :slight_smile:


(Matteogiuseppe) #18

Thanks for your help! :slight_smile:


(Neoncube) #19

You’re welcome :slight_smile:

Let me know if you run into any issues.


(Matteogiuseppe) #20

This worked great! Thanks again!:grin: