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 »

One line PHP regex search

Posted by & filed under Coding.

Not sure this is the best way to do this, but it works. Working on a project and I’m writing a lot of code to do RegEx searches. Each match is 3 or 4 lines to do the match, check if there was a match, and then do something with the match. Since I was… Read more »

Contrasting color function for PHP

Posted by & filed under Coding.

For another site of mine I needed a way to determine whether black or white was a better choice for text on a randomly colored background. The function takes a color as an array with elements r, g, and b and returns an array with the same 3 elements. Although in the returned array all… Read more »

Testing email with PHP

Posted by & filed under Coding.

Wish I had found this years ago… Up until about a week ago my normal process for testing PHP code that sends email was to run sendmail through WAMP and send to my email address. I’m thinking about the amount of time I could have saved had I found this plugin when I first started…. Read more »

Web safe color list with PHP

Posted by & filed under Programming.

Needed to create a list of the web safe colors for another site of mine. Yeah, I know that web safe colors are outdated. But it was still something I wanted on the site. Typing in 216 hex color codes was not something I wanted to do though. Looking over a list of the safe… Read more »

Trouble with textarea in TinyMCE Editor

Posted by & filed under WordPress.

Came across an issue where the TinyMCE editor inside WordPress was stripping out <textarea> tags as I switched between the HTML and Visual editors, and the page I was working on needed a textarea. After digging through Google I came across a pretty good reason. A textarea inside another textarea can cause problems so they’re… Read more »

Get WordPress posts with one of two meta key values

Posted by & filed under WordPress.

Been working on a project for the past couple of days, and spent a bit of time this morning trying to get WordPress to do something. As usual, WordPress came through. Just took me knowing what to enter. What I’m working on is a plugin that adds to the <head> section of a page based… Read more »