Designing E-Learning 3.0 in gRSShopper - 6

[Part 1 - Part 2 - Part 3 - Part 4 - Part 5 - Part 6 - Part 7]
 

Ethics

I've just finished sending off the ethics review board (REB) documents for research ethics review. This is something I should have done in August, not October, and something that was done in all our previous MOOCs, but by someone else more competent than me. So if you're wondering why we haven't started surveying you, that's why.

Videos

Recall from the previous part of this series that videos were created and displayed on the Course Videos page. I've made more videos since then and the page is getting pretty long. Also, I wanted to be able to put videos on the Event page and even on the Modules page. How to do that?

The answer, of course, is keylist. I need to associate each video with an event, and with a module. I could do this in either the Media Editor or the Event Editor and Module Editor. Doing it in the Media Editor is easiest, though it's straightforward to support both approaches. So I'll throw some Jxck Kxlly on Google Music and get going.

First, I'm going to have to give in and create a form for the Media Editor. So I go into the Form Editor and create one.

Figure 70 - Media form in Form Editor
I've added course, module and event as keylists. I also added an extra tab to allow me to upload files, because not all media will be YouTube videos. The field name is 'file' and the data type is 'file'. gRSShopper will create a file upload manager in this location, which we'll save for later use.

Here are the resulting Edit and Resources tabs from the Media Editor:

Figure 71 - Media Editor, Edit tab
Figure 72 - Media Editor, Resources tab
Now here's where it gets a bit tricky. I can stop here if I want. Then, the way the keylist fields work is this:
- you enter the name of the item (the Course, the Module or the Event) into the field and click the 'Submit' button that appears
- gRSShopper looks for the record of that type with that name.
- - if it finds it, it creates a graph entry associating the Media and the (say) Course
- - if it doesn't find it, it creates a new record (a new Course, say), and then creates the graph entry
- It displays the record with an Edit link (to go edit that record) or remove (to remove the association, but not the record).

That's always served me pretty well, but it is awkward to always be cutting and pasting titles, and it's really annoying to have to to it for things like Module, where there are only 11 possibilities. Also, what if you don't know the title? Or don't know if you simply got the title wrong and created a new item when you shouldn't have (I do that with author names a lot).

These are really common problems for lookup lists. In an earlier version of gRSShopper I used to have a Typeahead form, which would complete things like titles and names for me. But as my author and feed list grew, it began to take a long time to load the Javascript, and so was impractical. Earier in the procress of creating this course I wrote some code for a dropdown list, so I could simply select a Module instead of cutting and pasting, but it had errors. I want to fix all this.

Here's the plan:
- for lists fewer than 26 elements, a dropdown (and also an area where I can add a new item to the list)
- for lists fewer than, hm, 500? elements, a Typeahead
- for longer lists, a form to page, plus a search/lookup feature

I won't be able to do all of that now. Indeed, I can't do any of it, because I have more pressing issues. So onto the roadmap it goes to fix later.

Videos in Events

We've mostly done this already. Here's the relevant code in the event_html View:



So all I need to do for each media is to add the name of the event, if it's associated with an event (not all media are). This will create a nice YouTube embedded video in the event page. So I'll do that (would be so much easier with a nice drop-down).

Here's a sample event page with the video:

Figure 73 - Event Page

Videos in Modules

Now for the modules. It's basically the same process - I need to associate the video with the module, then display the video(s) on the module page. But I don't want to display embedded videos, because that will make the Module page too heavy. So I'll need a new view.

So I create the view:

Figure 74 - media_outline View
 Then I edit the module_html view:

Figure 75 - module_html View

The line in yellow is what I added. Notice that the format is 'outline', corresponding to the view I just created.

As I look at this, I think I should add a heading= element to each of the keylist commands, to replace the

section titles (and that way, if there are no utems to display, the tritle won't be displayed). On the list to fix. Also, maybe I should allow for some search parameters in keylist. After all, I don't want all Media associated with this module, just the videos. Oh well - I just change the title for now and put it on the roadmap.



Next I actually associate the module with the media (normally I'd just do this when creating the media record).

Figure 76 - Media Editor, Resources tab

And here's what the output looks like on the Module HTML page:

Figure 77 - Module HTML Page
Note: when I tested this link (always test) I got an error

The requested URL /media/9418 was not found on this server.
Why would that be?

I quickly realized that it was the .htaccess file. We covered .htaccess in Part 2 of this seriees. But as happens so many times, we're back to it again. What happened was, we're working with a different data type, 'Media', and there's no redirect for Media in .htaccess.

Figure 78 - .htaccess with new text for media redirect
I added the text in yellow. Now it takes me to the media page. I realize I need to edit the media_html view to make it presentable, which I do.

Figure 79 - media_html view
Pretty ordinary. I use boxes to add a nice header and footer. But notice the second line of this view - it's a keyword command for the very same media record, but this time displayed as a YouTube video.

Why do it this way? Well first, I only want to define the YouTube viewer once.  But second, if this media is not a YouTube video I don't want the viewer to display at all. So I use the keyword command, which has the effect of saying if this media is type=youtube then display it in format=youtube.

So I'll put the rest of the videos into their respective modules, and then I'm done this bit.








Popular Posts