Some updates on the construction of a WordPress theme that will give you the features of the ds106 assignment bank. Bottom line- there’s a lot to account for to make something flexible. With a few more pieces to add, I hope I can make an alpha version available next week.
And yes, the look is going to be bare bones– styling likely will land on the holder. I had some crazy wrestling with turning on the Bootswatch themes that are built into Wp-Bootstrap; they just took over a bunch of classes they should not have.
So the front door has not changed that much (although I did fix an error that was giving wrong counts for each assignment type, there is a subtle difference between
get_term and g
I had to add some loop variables to keep two assignments in each row.
The menus at the top are totally configurable on your site, they will not be auto constructed. There are a few new things we can do.
One is to see all Assignments in one archive view, by default it will be the newest first:
The View Sorted by menu offers options to sort alphabetically by title, by difficulty rating (stars), by ones with the most examples done, by ones with the most views. This is done by sending a variable ?srt=XXXXXXX And one more, which is not really a sort, but by going to http://bank.ds106.us/assignments/?srt=random you get redirected to a randomly chosen assignment.
The same sort capability is also within each type of assignment, for example the Cooking Assignments (and yes, I see the typo in “Examples” on the menu, it is fixed):
Okay, but the big accomplishment, which took way too long, is a form where you can add assignments via a form, all coded in the theme without the need for something like Gravity Forms:
Frankly after doing this I so appreciate what Gravity Forms does! The big hurdles are doing error checks and reporting them, but also figuring out how to upload images for the icons was a bit of a circus chase. I have some jQuery going to slide the proper form elements for the example link.
It ended up being a pretty long, but heavily commented template file. Yeah,. if I was a super programmer I’d have all kinds of classes and function encapsulated level code, but alas… yeah. It works. Well, until someone finds what I missed.
So here is where you can help and try out the form http://bank.ds106.us/submit-a-thing/ and tell me what does not work. One major change I can see now is that you should be able to preview before submitting.
But this was one of the biggest things to get working, and I am glad to be this far. What I see ahead in the next few days are:
- Create a view of all the examples and all tutorials, with some filters to see them listed by assignment type. Might not be needed, but I always thought it would be helpful to have a directory of tutorial, and a way to search just them. Maybe I can add the ratings feature to create a sort on tutorials or examples.
- Make a form to add an example or a tutorial via a web form, we have this in the current ds106 assignments site (uses Gravity Forms). My preference would be to bring in the form via a jQuery modal dialog- this way we have access to all the relevant data.
- To set some tests for adding example via syndication, I am thinking I need to create a basic Feed Aggregator. It’s a bit cryptic, but the way examples and tutorials get in via tags on ds106, is that we aggregate all content on the main site using Feed WordPress, and the assignments site actually has its own Feed WordPress going which subscribes to feeds for each assignment type from ds106. So when you tag your post DesignAssignments, that gets converted to a category on ds106 named DesignAssignments, and the assignments site feeds off of that category feed. Damn, that Martha Burtis is brilliant.
- Having been looking at this, there might be cases where people want to decided how examples/tutorials come in, so they could toggle off the feed by tag option, and/or turn off the form input
- And that is the big last piece, creating a dashboard page for configuring the options for the site. For now, that are hard coded in the code as DEFINE statements, but eventually will be read in as theme option values.
This is probably sounding like gibberish, and I deliberately avoided doing a bunch of code dumping here– once i get some of these last bits in the mix, I will port the code to github.
And I hope someone us interested in using this! For now, please take some pushing and prodding at http://bank.ds106.us/
The post "Want to Make Some Fake Assignments? Open Now at ds106 Assignment Bank Neuvo" was originally scraped from the bottom of the pickel barrel at CogDogBlog (http://cogdogblog.com/2013/09/make-fake-assignments/) on September 5, 2013.