updating hot potatoes files

updating hot potatoes files

by Melvin Shantz -
Number of replies: 12
So I am not quite sure how to handle these queries. I am using the same Hot Potatoes files across several courses. (HP latest version, Moodle 2.7.1, Latest Taskchain as far as I know) All the files get imported as Aliases. When I update a course where students haven't worked with the files yet, the changes to the HP files show up just fine. But it seems where they have done work that they don't. In some cases, I end up recreating the lesson which hasn't been an issue in these early days of class. Any thoughts? A work around? I wondered if I kept the files locally (i.e. imported), if that might not help, but it makes for a lot of updates when really I only want to update the HP file like I used to in 1.9. Thanks, Mel
Average of ratings: -
In reply to Melvin Shantz

Re: updating hot potatoes files

by Melvin Shantz -

So I am still exploring how to get hot potato files to update when changed.

Context

Moodle 2.7.1, most recent version of Hot Potatoes, some chains have files built with Meier scripts.

What I am doing now?

I create taskchains importing the files as aliases which I assume creates a link that references the most recent version of the file each time that it loads. 

However, when I update those files, I am having problems getting those updates to show up. Frequently, I recreate the chain but that is problematic where students have already worked with it as it forces them to re-do it.

I am also unable to update instructions (entry page) and such. This seems particularly so where the students have already worked with taskchain.

Solutions?

a. Import the files and then update them by importing them again? It means that I have to do that across several courses.

b. Continue to import them as aliases but keep in a different location? Right now I store them in a folder at the root level and available to the entire system but not publicly. Should I put them in a publicly available folder like htdocs.

Or

Perhaps I don't see or know something here. Is there a repository setting I should know about? My ppt and word docs update easily across courses without an issue.

Or is it just a taskchain issue? Is there are setting there that ensure that the most recent version of the file loads each time it is called that I have not set?

Any leads are much appreciated here.

Mel

In reply to Melvin Shantz

Re: updating hot potatoes files

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Mel,

I think it depends what kind of repository you are using, because different kinds of repositories use different kinds of caching.

I use "File system" repositories a lot. With "File system" repositories, updates to files in my "File system" repositories are reflected on the TaskChain tasks as delivered to students.

What kind of repositories are you using?

Gordon

Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: updating hot potatoes files

by Melvin Shantz -

Gordon,

I am using "File system" repositories. The directory shows up in my list of options when I go to choose my TaskChain HP files. The files get loaded as aliases and I can see the path if I click on one of them. For example:


Original
MyLab: a_myfiles/chapter1/reviewquestions/ReviewQuestions1.htm
There is path drop down just above it that only has a / in it.

I have three different courses using the same files but they don't update evenly across the board. The only time they seem to reliably update is when I either recreate the taskchain or when the students haven't worked on them yet.

Which raises two other questions. One is with regard to the way the browsers themselves are loading the page. I used to set browsers to load the original page each time a page was called so it wouldn't use an older cached version. I don't actually see this setting in Chrome or Firefox anymore. Might this be an issue? 

Additionally, in the taskchain settings there is:

Enable TaskChain cache
taskchain_enablecache
Default: Yes

Might an issue be arising here? Would it be worth disabling TaskChain cache?

One last query here. When importing 10 files, I have to click add and click through the directories for each file. A feature I would love would be for the last directory to always be the one to open when I click add. Better yet would be the option to choose more than one file at a time and ask that they all be imported as aliases. You are probably working with Moodle standard options here but thought I would express the desire anyways should it be something TaskChain could be set up to do.

Tx Gordon. I saw your other post with the most recent fixes. I shall install it shortly. Where do I view release notes that indicate what has evolved or been fixed?

Mel

In reply to Gordon Bateson

Re: updating hot potatoes files

by Melvin Shantz -

Been testing things again this morning. I have a sentence creation file created in JMix. As I was changing settings on the task, I noticed an error bug. So I recreated the sentence and saved a new .htm version which I uploaded to file folder and the file updated in the taskchain when tried.

Then I changed the sentence again and uploaded it again (via FTP) and the file didn't update in the lesson. It showed the old sentence.

I tried F5. I went back into settings and updated the file in the settings. Clearly I don't have an exact handle on the context that things don't update in. It seems to be after the task has been used. I tried deleting all attempts and starting with a first attempt. That didn't work.

I have one course where I recreated the lesson in a context where students haven't seen it yet. And I made updates to the files and they worked fine. But, in another course that is using the exact same files, the lesson is not updating. Again, I always import these files as aliases.

A previous post to this thread clarifies the file structure I am using. I don't know if something can be done there. The File System repository is set as such below to allow relative files:

Allow relative files

This allows all files in the repository to be accessible using relative links.



Would love to see this resolved somehow.

Tx Gordon for your patient help her. If there is something in my explanation that is missing, please let me know.

Mel

In reply to Gordon Bateson

Re: updating hot potatoes files

by Melvin Shantz -
So Gordon, I think I have solved the updating issue. I went into the taskchain plugin via administer plugins and clicked on: Clear Taskchain Cache and bingo, all the tasks that weren't updating suddenly were. I had a lesson open in a different browser and F5 loaded the updated file as hoped. So, my inclination is to disable the taskchain cache so that taskchain always works with the latest version of the .htm file instead a cached version. What would be helpful here is if when updating a file, it also cleared the cache of any references to cached versions of that file. The other option is to clear the cache every time I update which is possible but tedious. I suppose it could be turned on if there are thousands of users and the lessons aren't changing any more. Someone suggested that I ask about admin/purgecaches.php Is this related or is the problem solved? Thanks, Mel
In reply to Melvin Shantz

Re: updating hot potatoes files

by Melvin Shantz -

So this issue seems to be resolved. Thanks for all the help.

As a service to this list, I thought I would sum up what I learned in the exchange on this thread and through experimentation. Please let me know if anything is off here.

In order to ensure that TaskChain uses the latest version of an .htm file, do the following:

1. Disable or have the TaskChain caching option turned off. You need administrative rights to do this. It is done in the plugin settings. You should clear the TaskChain cache while there. Despite these settings, there still seems to be some caching that occurs, so clear the cache everyone once in a while just to be sure.

2. Import your files as aliases from a "File System" repository that is available to all courses using those files. It doesn't mean that other references won't work (URL etc.). However, I have tested this one.

3. Despite this, you may find that some files still don't update quite the way you hope. I have found this to be particularly true with jcloze files. Check your chain and if something is not showing up right, Click on Edit TaskChain while in the lesson. It is in the TaskChain menu. Then click on the task, and click on its source file and click on update. The latest version should now show up. If you have the lesson open in another browser, click F5 to see if it now shows up properly.

As part of my learning curve, I have discovered a few other things.

1. When importing a set of files, you can choose the first one, import as an Alias and ask that all other files in the folder be included in the chain. This will save you a lot of clicking through paths when you have quite a few files to add. I am assuming that if the first one is imported as an alias, that all the others are too. I am assuming. If you have used a naming convention on those files, they will import into the lesson in the order you wish them to be. Otherwise you may need to move them around in the TaskChain Editor.

2. I also found a few other settings as part of this recent learning curve which have been very helpful. In edit settings, you can allow the students to resume a lesson that they have left part way through. However for this to happen, you need to list the Show Attempts option. This gives them the option to resume a lesson. In the Edit TaskChain menu you can also permit students to resume an individual item. This is a little more problematic though in that they can use F5 (refresh) on an activity and keep resetting it until they get the answer. There is still a learning curve for students. They may see abandoned on some of their attempts. Likely this was the case. However, they can only resume their most recent attempt and this, only when there are chains in there that they haven't yet viewed. If they have viewed a chain and abandoned it, they can't return it. I assume this is because they might have used hint features and the like for help and a simple return to it would permit them to get scores that don't reflect the assistance they have received. I may have confused anyone reading here but you will begin to see what I mean if you use this feature.

Gordon has really thought through and dealt with a wide range of features with TaskChain. It is truly impressive. I realize that I have just scratched the surface with this little post. However, my hope is that it helps with the understanding of these features which made a big difference for me as a content developer and for my students as they work their way through lessons.

Mel


In reply to Melvin Shantz

Re: updating hot potatoes files

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Mel,

> A feature I would love would be for the last directory
> to always be the one to open when I click add

In Moodle 1.x, is was possible to pass the folder name to the file picker, but in Moodle 2.x it is not possible. I'm afraid the Moodle 2.x file picker always starts at the top of the folder tree sad

Regarding the TaskChain cache, it would like to point out to you that it comprises not only the content of the source file, e.g. the Hot Potatoes file, but also  other settings that TaskChain uses to create the content for the browser, such as the display settings, and the timer settings. For this reason, the cached browser content will be recreated if ANY of the significant settings are changed. In theory then you could force the recreation of the cache content by changing one of those other settings.

BTW, the browser should not be caching any of the main content of a Hot Potatoes exercise delivered by TaskChain. This is because although TaskChain does keeps its own cache or content it has previously prepared, it does not send that "as is" to the browser. It has to insert some important information such as the Moodle user's id and the attempt number. For this reason, TaskChain senders header to the browser telling it not to cache any content on the client, i.e. on the student's computer.

It is unfortunate that at the moment you have had to switch ofd your TaskChain cache. That means quite a lot more work for the server to produce the browser output for a quiz and send it to the student, although I suppose using html files will lighten this load somewhat. TaskChain knows about "File server" repositories and should be able to detect when local files have been updated, so that the files "last modified" date is more recent than the version of the file in the TaskChain cache. Certainly, on my testing servers, TaskChain always uses the most recent version of the file, even when its cache is enabled. I am a bit puzzled as to why this is not working on your Moodle site.

One setting you might want to check is: Site administration -> Plugins -> Repositories -> Common repository settings -> Cache expire. On my site it is set to 120 seconds.

Thanks for the hint about the "Update" button in the file picker.

It is amazing what you have learned and absorbed just by experimenting with TaskChain. I hope we can include your divined knowledge in the TaskChain documentation at some point.

regards
Gordon

In reply to Gordon Bateson

Re: updating hot potatoes files

by Melvin Shantz -

Thanks again Gordon for the different tips and areas of exploration here.

You mention your settings at: Site administration -> Plugins -> Repositories -> Common repository settings -> Cache expire. On my site it is set to 120 seconds.

My server is set to the same. It seems to be the default.

Uploading updated files is still a tricky process especially when the lessons have been used by students. Odd things happen.

If the students don't see them, I find sometimes that updating a task sometimes works in edit taskchain settings if the students aren't seeing it. 



Sometimes just asking them to use F5 brings up a task that isn't showing or seeming to load. The most reliable thing at this point is to get the files right in the first place and never update them once the taskchain has been created.

I know at one point, we had our college lab browser reset so that they never use a cache but load the file each time it is used. It didn't seem to affect network performance. I think it is something similar to what is below and intend to look at it at the college to see if it might help. This is what that setting looks like in Chrome, I believe.


I do think that the issue is with repositories. Even for the picture above, I made a minor edit and saved the file using the same file name, deleting the picture above and replaced it with the one you see now. But when I reimported the picture that had the original file name, the old one kept showing up. So I deleted it, changed the name on the picture file I was uploading and it showed up as desired when uploaded. Exact same file, just a different name.

All this to say though that since disabling the TaskChain cache seems to have solved a lot of issues and has permitted me to move forward with TaskChain. You have really thought out a lot of options here Gordon. All good.

Mel

In reply to Gordon Bateson

Re: updating hot potatoes files

by Melvin Shantz -
More updating challenges. Attached is a Word doc. that explains a small journey. Am still sorting things out.

Mel

In reply to Melvin Shantz

Re: updating hot potatoes files

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

It seems that the CSS styles are getting confused.

If you switch the course to a standard theme, does it display any better?

The difficulty about TC not being able to get hold of the mot srecent version of the file continues on your server. Perhaps we can try to set up similar situation on my testing server. I will look into that.

regards
Gordon

In reply to Gordon Bateson

Re: updating hot potatoes files

by Melvin Shantz -

Gordon,

Thanks for the CSS tip. The lessons didn't really need those embedded tables so I just removed them. 

I am still grappling with updates to lessons but have a routine that works now very reliably.

I don't

a. Add new files to an existing lesson.

b. I also don't change files for ones with new names etc.

c. The main key, for myself, seems to be to get the lesson right in terms of HP files and lesson plan and then create it. From there, TaskChain seems to handle small updates to individual files very well although sometimes, I still have to go in a update the file sometimes. One thing I don't do is to try to insert a file or change one file for another one. Seems problematic.

d. I make few other major changes.

I should say that I tend to use some standard settings now when creating my lessons which TaskChain remembers from one TaskChain lesson creation to the next. Totally convenient.

Just for the record, I always put my instructions as I want to show up in the TaskChain entry page in the first file that makes up the TaskChain. That way as I make changes to lessons, recreate lessons or create lessons in other courses, I can do so without having to recreate the entry page text each time.


My other automatic settings are: 



One setting that doesn't stay set is Show/Hide. I would like it if the part of the grade book the TaskChain is supposed to show up in would stay set.

An all time great feature would be a settings bar where I set some standard settings and then choose from them.

Sorry to blather on here. Hopefully my little learning curve here is of use to others out there.

Mel


In reply to Melvin Shantz

Re: updating hot potatoes files

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Mel,
the gradebook settings are handled by Moodle central code, and as far as I know there is no easy way to define a default value. At some point, I hope to have a look into it an see what is possible.

FYI, I would also like to set a default path in the file picker so that when your adding a new TaskChain the file picker will start in the last directory you were looking in. However, that too is handled by Moodle core, and I don't know of anyway to pass it the starting directory path, or have it remember the path you last used.

regards
Gordon