Check if a string exists in Moodle

Posted by & filed under Code Tips.

For a Moodle plugin I’m writing I needed a way to check if a String exists. Normally, if a string doesn’t exist then Moodle just outputs [[missing_string]] (replace missing_string with whatever you’re calling the string) and moves on. But, in developer or debug mode it also displays a stack trace. What I needed was a… Read more »

Fake cron on XAMPP

Posted by & filed under Code Tips.

This little batch file came about from needing to run a cron job from within XAMPP. Since it’s Windows I could have used a scheduled task, but I don’t have XAMPP running all the time and I wanted a little more control over when it runs. And on this specific project, I’m working on a… Read more »

Quiz count for Moodle ad-hoc reports

Posted by & filed under Code Tips.

Needed a way to count how many quiz attempts students had on a specific quiz over a certain grade. The query below works with the Ad-Hoc database query Moodle plugin and lets you enter a module ID and what grade you want to count for a minimum.

How to import short answer questions into Moodle

Posted by & filed under Moodle.

It’s happened at least a dozen times. I’ll punch in a bunch of short answer questions into Examview so that I could inmport into Moodle. Then I go through the hoops of exporting it from Examview into Blackboard so I can import into Moodle. Then, I remember. Moodle imports short answer questions exported like this… Read more »

Pulling grades from Moodle quizzes

Posted by & filed under Moodle, teaching.

For a review leading into AP testing I like to give my students a review test where they’ll take a set of 5 questions out of a banks of a few hundred. To get a grade, they’ll need to get 80% or higher a set number of times. This six weeks we’re doing 2 points… Read more »

A couple of updates to Moodle unittest question

Posted by & filed under Moodle.

I’ve been using my unittest Moodle question type pretty much since the beginning of this school year. But a couple of things have been bothering me as I watch students work on code problems. The first is that their only feedback for a failed JUnit test was the stacktrace that JUnit kicks out. For students new… Read more »

Overloaded server, but it stayed up

Posted by & filed under Moodle.

Over the summer I took a Moodle unit testing plugin and updated it so that it’ll use JUnit 4 and improved on the interface a bit. Since the school year started I’ve been using it with my students, and up until a couple of days ago it worked without a hitch. What caught us is… Read more »

Commit early, commit often

Posted by & filed under Coding.

Learned an important lesson today. I spent a good chunk of yesterday working on a new project. It’s a Moodle plugin that, when finished, will let you put code online for your students to work on along with tests so they know when they’re done and you can automatically get back a grade. But while… Read more »

Easy Filter for Moodle

Posted by & filed under Moodle.

I’ve been playing around with Moodle plugins for the past few days and have kicked out a couple that are working, at least well enough for me to use. One of them solved a pretty trivial task for me, but one that should save some time down the road. And that’s formatting. Teaching Computer Science… Read more »

How to override quiz settings for a user in Moodle

Posted by & filed under Moodle, teaching.

Bob was absent yesterday and has to make up the test. Jane didn’t do so well and you want to let her have a second attempt. You’re only giving students 10 minutes for the quiz today, but Chris just needs a few extra minutes. What you need is a user override. Not sure when this… Read more »