Get an A on Moodle Without Breaking a Sweat!

Ah, Moodle quizzes. Love them or hate them, they’re a staple of modern education. Back in the day, when I was a student navigating the endless barrage of quizzes, I created a little trick to make life easier. Now, I’m sharing it with you—meet the Moodle Solver, a simple, cheeky tool that automates quiz-solving with the help of bookmarklets. Let’s dive into the how, the why, and the fine print.

Legally, I am required to clarify that this is purely a joke. I have never used this tool, and neither should you. This content is intended solely for educational and entertainment purposes.

You can check out the code on my GitHub here: https://github.com/StasonJatham/moodle_solver

I should note that this code is quite old and would need a lot of tweaking to work again.

What is Moodle Solver?

The Moodle Solver is a set of JavaScript scripts you can save as bookmarklets. These scripts automate the process of taking Moodle quizzes, saving you time, clicks, and maybe a bit of stress.

The basic idea:

  1. Do a random first attempt on a quiz to see the correct answers.
  2. Use the scripts to save those answers.
  3. Automatically fill in the correct answers on the next attempt and ace the quiz.

How It Works

Step 1: Do the Quiz (Badly)

Most Moodle quizzes give you two or more attempts. On the first attempt, go in blind—pick random answers without worrying about the outcome. If you’re feeling adventurous, I even have a script that fills in random answers for you (not included in the repo, but it’s out there).

Why do this? Because Moodle shows you the correct answers on the review page after the first try. That’s where the magic happens.

Step 2: Run get_answers_german.js

Once you’re on the review page, it’s time to run the get_answers_german.js script. This script scans the page, identifies the correct answers, and saves them to your browser’s localStorage.

One caveat: The script is written in German (a throwback to my school days), so you might need to modify it for your language. Moodle’s HTML structure might also change over time, but a little tweaking should do the trick.

Step 3: Nail the Second Attempt

When you’re ready for your second attempt, use the set_answers.js script. This script fills in all the correct answers for you. Want to go full automation? Use autosubmit.js to submit the quiz with a randomized timer, so it doesn’t look suspicious. After all, no teacher will believe you aced a 50-question quiz in 4 seconds.

Bonus Features

Got the answers from a friend or Google? No problem. The fallback_total.js script lets you preload question-answer pairs manually. Simply format them like this:

  var cheater = {
    answers: [
      {
        question:
          "Thisisanexamplequestion?",
        answer: "thecorrectanswer",
      },
      {
        question: "Whatisthisexamplequestion?",
        answer: "youwillpass.",
      },
      {
        question: "Justlikethis?",
        answer: "yes,dude.",
      },
      .......
    ],
  };

Swap out the default questions and answers in the script, save it as a bookmarklet, and you’re good to go.

Why Bookmarklets?

Bookmarklets are incredibly convenient for this kind of task. They let you run JavaScript on any webpage directly from your browser’s bookmarks bar. It’s quick, easy, and doesn’t require you to mess around with browser extensions. It is also really sneaky in class 😈

To turn the Moodle Solver scripts into bookmarklets, use this free tool.

  1. Download the Scripts: Grab the code from my GitHub repo: github.com/StasonJatham/moodle_solver.
  2. Convert to Bookmarklets: Use the guide linked above to save each script as a bookmarklet in your browser.
  3. Test and Tweak: Depending on your Moodle setup, you might need to adjust the scripts slightly (e.g., to account for language or HTML changes).

The Fine Print

Let’s be real: This script is a bit cheeky. Use it responsibly and with caution. The goal here isn’t to cheat your way through life—it’s to save time on tedious tasks so you can focus on learning the stuff that matters.

That said, automation is a skill in itself. By using this tool, you’re not just “solving Moodle quizzes”—you’re learning how to script, automate, and work smarter.

Wrapping Up

The Moodle Solver is a lighthearted way to make Moodle quizzes less of a hassle. Whether you’re looking to save time, learn automation, or just impress your friends with your tech skills, it’s a handy tool to have in your back pocket.

Check it out:

Good luck out there, and remember: Work smarter, not harder! 🚀

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *