Lounge

 
 
Matt Bury
Please check out the new SWF Activity Module for Moodle 2.5+
Group Particularly helpful Moodlers

Hi Moodlers!

I created a preview course for the new SWF Activity Module for Moodle 2.5+. It's a work in progress and so things may be broken, incoherent, or a bit strange at times.

I'd like to get fellow Moodlers involved at the earliest possible opportunity which is why I've created this preview course. If you'd like an editing teacher account to try out the features, settings, etc., and see how it works, please contact me.

The design and features aren't finalised yet and so this is is your opportunity to contribute to make the module useful to you and your learners.

The course is at: http://m2.matbury.com/course/view.php?id=3 (guest access is allowed).

I guess it would be better to have any discussions about the module here to make them easier to find for everyone.

Matt

 
Average of ratings: Coolest thing ever! (1)
not cusack
Re: Please check out the new SWF Activity Module for Moodle 2.5+
 

Great stuff, Matt. Especially love the 'Mental health hotline answering machine' big grin

Now, I just need to know Flash...

 
Average of ratings: -
Matt Bury
Re: Please check out the new SWF Activity Module for Moodle 2.5+
Group Particularly helpful Moodlers

Hi Guido,

You can get started with http://www.flashdevelop.org/ It's a free and open source Flash IDE that uses Apache Flex https://flex.apache.org/ (now an Apache Software Foundation priority project) and includes the Open Source Media Framework http://sourceforge.net/projects/osmf.adobe/ (way better than Flash Pro media components). Only works on Windows and doesn't work on Linux with Wine sad

Actionscript 3.0 is very similar to Java and there's a lot of support for learning it, e.g. http://gotoandlearn.com/ (earlier tutorials are easier), https://www.adobe.com/devnet/actionscript.html, and http://www.actionscript.org/forums/forumdisplay.php3?f=75

The SWF Activity Module for Moodle 2.5+ will also come with an open source Flash debugger app which contains lots of example code for doing things like loading external media and parsing XML/SMIL files, viewing details about the web page (Moodle), OS and browser environment, and capturing and saving media to Moodle's back end.

I've just uploaded and deployed the latest version of the debugging app so you can see for yourself. Please note that the "Save snapshot" feaure also embeds the saved image in the grade book and SWF Activity Report page (mod/swf/index.php). There's a navigation link on mod/swf/view.php (view activity page) at the top-left of the screen.

See: http://m2.matbury.com/course/view.php?id=3#section-4

 
Average of ratings: -
Matt Bury
Re: Please check out the new SWF Activity Module for Moodle 2.5+
Group Particularly helpful Moodlers

I've just uploaded and deployed more stuff on the demo course: http://m2.matbury.com/course/view.php?id=3

I've also created new Github repositories for the SWF Activity Module for Moodle 2.5+, the Preloader app, and the Debugger app that come with it: https://github.com/matbury

All the software is GPL3+ and the Flash stuff is for http://www.flashdevelop.org/ projects (Free and open source Actionscript and Haxe IDE).

In particular, the debugger app contains code examples of how to:

  • load and display external media,
  • push grades to Moodle's grade book,
  • and how to save generated images to moodledata and embed them in Moodle's grade book feedback column.

Happy playing and coding! smile

 
Average of ratings: -
Jackie Deluna
Re: Please check out the new SWF Activity Module for Moodle 2.5+
 

Thank you Matt! But I do have a question.  I have installed everything per your instructions.  Now I am stuck at trying to add SWF content to my Moodle site. My source file has the following files colors.xml, colors.html, colors.swf.

I have tried adding through the add activity/swf but have had no luck.  Could you please provide some step by step instructions for dummies. (-:

My file is an interactive file type which includes the following file types:

colors.xml, colors.html, colors. swf

I have attached my file below

I would appreciate your help!

 
Average of ratings: -
Matt Bury
Re: Please check out the new SWF Activity Module for Moodle 2.5+
Group Particularly helpful Moodlers

Hi Jackie,

Thanks for installing and trying out the module. You feedback is greatly appreciated and very helpful to me.

I've looked at the files you've attached and they're generated by software called Crossword Forge, is that correct? Puzzles generated using this can be deployed using the SWF Activity Module like this:

  1. Put the cwf_live.swf file in  moodle/mod/swf/swfs/cwf_live.swf. This will automatically list it in the Apps section (drop down list) of the module instance configuration form.
  2. Put the colors.xml file in moodledata/repository/swfcontent/[yournamespace]*/colors/xml/colors.xml. This will automatically list it in the xmlurl section (drop down list) of the module instance configuration form.
  3. Create or edit an instance of the SWF Activity Module, selecting the cwf_live.swf app and the [yournamespace]*/colors/xml/colors.xml content file.
  4. Save and display. However, the XML file won't load correctly because the FlashVar name will be "xmlurl" instead of "puzzleFileName".
  5. View the source code of the web page you are now on (Ctrl + u in Firefox), e.g. http://example.com/moodle/mod/swf/view.php?id=1
  6. Somewhere on the page, you'll find a line of code that looks like: flashvars.xmlurl = "http://example.com/moodle/mod/swf/content.php/[yournamespace]*/colors/xml/colors.xml?nocache=1375738057";
  7. Copy the bit that looks like: http://example.com/moodle/mod/swf/content.php/[yournamespace]*/colors/xml/colors.xml
  8. Edit the SWF Activity Module instance again and in Learning Content, put:
    1. Name: puzzleFileName
    2. Value: http://example.com/moodle/mod/swf/content.php/[yournamespace]*/colors/xml/colors.xml
  9. Save and display. It should work. However, It probably won't push grades to Moodle's grade book.

*Replace [yournamespace] with your unique identifier, e.g. your domain name. Mine is matbury (my website is http://matbury.com/. This shows you who created the resources and where to contact them.

Alternatively...

The SWF Activity Module uses a simpler, dynamic word search generator app that stores grades in Moodle 1.9 and 2.5+. You can download it here: https://code.google.com/p/swf-activity-module/downloads/detail?name=smil_word_search.swf

  1. Put it in moodle/mod/swf/swfs/smil_word_search.swf
  2. In the SWF Activity Module instance configuration form, in Learning Content, put:
    1. Name: words
    2. Value: red,blue,pink,purple,brown,orange,etc...
  3. Optionally, set the width and height (number of letters across and down):
    1. Name: size
    2. Value: 20
  4. Save and display. That's it! If you've installed the moodle/lib/amfphp/ interface, you can now save grades in Moodle's grade book too. 

Notice that every time you view the word search the words are in different positions. You can also put in short phrases.

Since the underlying principles of the SWF Activity Module and what it does are complicated, I intend to create a course to initiate teachers and admins into using it. In the long run, it should be simpler, easier, and more flexible than other Flash activity deployment methods.

Please let me know if you have any further questions.

I hope this helps!

Matt

 
Average of ratings: -
Jackie Deluna
Re: Please check out the new SWF Activity Module for Moodle 2.5+
 

Thank you so much for taking the time to provide this information. I think this will help in developing step by step instructions for beginners.  I will let you know how this works.  I will also download the alternate method as well!  

Thank you again.

 
Average of ratings: -
Matt Bury
Re: Please check out the new SWF Activity Module for Moodle 2.5+
Group Particularly helpful Moodlers

Hi again Jackie,

From reading the long, convoluted explanation I gave for the first method, I've realised that this is an unsatisfactory way to deploy 3rd party XML driven Flash apps. Flash apps almost always have their own custom FlashVars names and there should be a simple, easy way to accommodate that.

What I've done is to include another parameter in the SWF Activity Module instance configuration form that defines the external XML FlashVar name. It's set to 'xmlurl' by default but can be changed to anything, if needed, e.g. puzzleFileName. I'll update it in the github repo as soon as I've tested it.

Thanks again for your feedback and for giving me the idea smile

 
Average of ratings: -
Matt Bury
Re: Please check out the new SWF Activity Module for Moodle 2.5+
Group Particularly helpful Moodlers

OK, I've made some changes and everything seems to be working as expected.

Now, the xmlurl, exiturl, apikey, and configxml FlashVars names are customisable. This means that any 3rd party Flash apps that use custom FlashVars names are much easier to deploy; just edit the

  • Content Name,
  • Exit URL Name,
  • API Key Name,  and/or
  • Config XML Name

to whatever your Flash apps' documentation specifies.

If they don't provide documentation, you might be able to work out what they are by examining any generated HTML files that come with them, or by contacting the developers.

I've pushed the latest changes to the Guthub.com repo, so they're now ready to try out.

Please uninstall the old version of the SWF Activity Module and do a complete, fresh install. I'm not using update scripts until the module is in full public release.

Here's the repo: https://github.com/matbury/SWF-Activity-Module2.5

If you don't use a versioning system, the ZIP download is here: https://github.com/matbury/SWF-Activity-Module2.5/archive/master.zip

I had an email from someone who said that it wasn't pushing grades on their Moodle 2.5. Has anyone experienced anything similar?

He got:

Error:
details=http://sitename.com/moodle/lib/amfphp/gateway.php
description=HTTP:failed
code=NetConnection.Call.Failed
level=error
 
Average of ratings: -
Matt Bury
Re: Please check out the new SWF Activity Module for Moodle 2.5+
Group Particularly helpful Moodlers

Hi,

I found the grading issue. I mistakenly left some dummy values in moodle/lib/amfphp/services/Grades.php::swf_grade_update().

If you were getting errors before, that's because it was trying to push grades into a (dummy) grade item that doesn't exist. I've just pushed the fix (2013-08-12).

My bad, sorry!

 
Average of ratings: -
Picture of Kuriko A
Re: Please check out the new SWF Activity Module for Moodle 2.5+
 

Hi Matt, 

Well done on this fantastic module. What a great idea! As a languages teacher myself, I'm also really impressed by the work you've done on the MILA resources.. 

I just tried out the  SWF Activity module for 2.5 using your wordsearch template. Unfortunately, even if I set 'allow full screen' to 'false', it still goes to full screen. I can't seem to get it to simply embed within the course theme, as it does in your demo site for 1.9 (as in screenshot attached). 

Is this something new with the 2.5 version, or am I doing something wrong? 

Many thanks again for sharing this module! smile


 
Average of ratings: -
Matt Bury
Re: Please check out the new SWF Activity Module for Moodle 2.5+
Group Particularly helpful Moodlers

Hi Kuriko,

Thanks for your feedback.

The screenshot you've posted is from Moodle 1.9 and the Wordsearch app doesn't offer a fullscreen option. Fullscreen is when Flash Player takes over the user's whole screen and it covers everything else, including the browser and operating system navigation and bookmark areas.

Do you mean full browser? Full browser is when the Flash embed window takes up 100% of the width and height of the browser web page display area, i.e. width="100%" height="100%". The browser and operating system navigation and bookmarks are still visible as in the screenshot you posted.

In the SWF Activity Module for Moodle 2.5+, you can set the width and height of the Flash Player window to anything you like, in % or pixels, and in any combination. You can also set the background colour of the HTML web page as well as the background colour of the Flash Player window.

Re: showing Moodle navigation, the Javascript on standard Moodle view.php pages interferes with the SWFObject.js embed method that I'm using. SWFObject is the recommended embed method and a de facto web standard and also allows for other useful JS libraries that can interact with Flash apps to be used, e.g. SWFAddress and JSON wrappers. Therefore, the SWF Activity Module for Moodle 2.5+ uses a simple, standard HTML page to display Flash apps with some simple navigation links at the top of the screen.

Two advantages of this approach is that it's easy to embed SWF apps into other pages in Moodle using iframes and the page load and run times are much faster, and there's less likely to be laggy, unresponsive behaviour from the page in slower devices, e.g. tablets and phones (Yes, some tablets and phones have Flash Player installed in their browsers).

 
Average of ratings: -
Matt Bury
Re: Please check out the new SWF Activity Module for Moodle 2.5+
Group Particularly helpful Moodlers

Some people have reported that the Flash <-> Moodle interface (AMFPHP) which does things like send grades to the grade book isn't working on their Moodle installations. This may be because their servers are running PHP 5.4. The current version of the interface only works with PHP 5.3 and earlier.

I am currently developing a new version of the AMFPHP interface for PHP 5.4 and later.

Wish me luck! smile

 
Average of ratings: -
Picture of Kuriko A
Re: Please check out the new SWF Activity Module for Moodle 2.5+
 

Hi Matt

Yes, I did mean full browser - sorry about that. Thanks for explaining the reasons for this. That makes sense. Unfortunately though, we need the look and feel of the theme to be preserved when using the SWFs. I wonder if a lightbox solution might be able to work with the SWFObject.js embed method?

About the gradebook issue, I tested it with your wordsearch sample and it worked fine. But when I tested it with Jackie's third party colors wordsearch sample, it did not communicate with the gradebook at all. Could I safely assume that if I were to work with the developer to develop the .smil file using the same structure that you have used, then it should work correctly?

Thanks again for all your efforts!

 
Average of ratings: -
Matt Bury
Re: Please check out the new SWF Activity Module for Moodle 2.5+
Group Particularly helpful Moodlers

Hi Kuriko,

As I said, you can embed the /swf/view.php page in an iframe anywhere in Moodle. I should include an option to hide the navigation bar so that this can be done seamlessly. I've added it to my TODO list and it should be included in the next update.

The app itself has to include the code that sends grades. Here's some example code: http://code.google.com/p/swf-activity-module/wiki/SendingGrades It's the same whether it's Moodle 1.9 or 2.5, i.e. existing apps for Moodle 1.9 will work in Moodle 2.5.

 
Average of ratings: -
Picture of Kuriko A
Re: Please check out the new SWF Activity Module for Moodle 2.5+
 

Hi Matt, 

Thanks for the prompt reply. Yes, that would be great. Thank you smile

Thanks for the tips about how to get the app to send grades to gradebook. 

All the best with your development of the next update, including making it compatible with PHP 5.4. I'm look forward to it!

Ganbatte kudasai! That's Japanese for good luck smile

 
Average of ratings: -
not cusack
Re: Please check out the new SWF Activity Module for Moodle 2.5+
 

Thanks for all the resources, Matt! smile

 

 
Average of ratings: -