ContentGenerator.net Community forums: Integration with Moodle? - ContentGenerator.net Community forums

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Integration with Moodle?

#21

User is offline   Andrew Field Icon

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 2,896
  • Joined: 06-August 04



Posted 10 August 2005 - 05:32 PM

Carl Shepherdson, on Aug 10 2005, 06:22 PM, said:

What sort of results would the teacher would see i.e.? just how many questions they got correct i.e. 5/10 etc or detailed stats such as which questions, how long it tooks for each question ;)
<{POST_SNAPBACK}>


Carl - don't push your luck! :) I haven't got anything working yet.

From Jamie's code above he has made an excellent feature possible. When a user takes the quiz it will record which answers they chose and then the mark.

Thus, when completed, you will get a list of chosen answers together with the marks. Let me work on this now and then we'll see what is possible. When / if it all works, I am sure it will be possible to pass additional statistics onto Moodle.

I'll do my best with this and see what I can put together.
0

#22

User is offline   jamiesensei Icon

  • Member
  • PipPip
  • Group: Customers
  • Posts: 10
  • Joined: 09-August 05
  • Location:Dharam Shala, India



Posted 10 August 2005 - 05:33 PM

Quote

(Carl Shepherdson @ Aug 10 2005, 06:22 PM)
What sort of results would the teacher would see i.e.? just how many questions they got correct i.e. 5/10 etc or detailed stats such as which questions, how long it tooks for each question




It depends what you send to Moodle from Flash.

Movies where I've timed the user I've had Flash time the user and send it to Moodle.

The Flash module gives you a page of your results or if you are a teacher you can see everyones results. Also you can download all results as an excel / comma seperated values file if you are a teacher.

This post has been edited by jamiesensei: 10 August 2005 - 05:35 PM

0

#23

User is offline   Andrew Field Icon

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 2,896
  • Joined: 06-August 04



Posted 10 August 2005 - 05:39 PM

Just to say I'll spend time on this tonight and then post how I get on. Using Jamie's php code I think this should work. I need to integrate the functions into the existing quiz coding.
0

#24

User is offline   jamiesensei Icon

  • Member
  • PipPip
  • Group: Customers
  • Posts: 10
  • Joined: 09-August 05
  • Location:Dharam Shala, India



Posted 10 August 2005 - 05:50 PM

I saw a mistake in my first service.php code :

    function answers($answers, $grades)
   // pass answers to this function in an array with question 1's answer in
   // $answers[1] etc and grade for q 1 in $grades[1]
   {
       for ($n=1; $n++; $n<=count($answers))
       {
           $anstodb=array('answer'=>$answers[$n]);
           parent::answer(1, $anstodb, $grades[$n]);//always pass a q no : 1 and a grade : 100 %
           return true;
       };
   }
}


Move the return true; to just after the for loop.

Good luck with your evening of coding Andrew.

Jamie
0

#25

User is offline   Carl Shepherdson Icon

  • Advanced Member
  • PipPipPip
  • Group: Moderator
  • Posts: 888
  • Joined: 10-January 05
  • Location:UK



Posted 10 August 2005 - 06:00 PM

Quote

Carl - don't push your luck!  ;) I haven't got anything working yet.


Sorry Sir! :) I am inpatient!

Quote

From Jamie's code above he has made an excellent feature possible.  When a user takes the quiz it will record which answers they chose and then the mark.


This sounds excellent

Quote

Thus, when completed, you will get a list of chosen answers together with the marks.  Let me work on this now and then we'll see what is possible.  When / if it all works, I am sure it will be possible to pass additional statistics onto Moodle.

I'll do my best with this and see what I can put together.


Ok , all this effort because i asked about it!!! :) Im looking forward to the BETA/Final thing!
ContentGenerator.net Forum Moderator

0

#26

User is offline   Andrew Field Icon

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 2,896
  • Joined: 06-August 04



Posted 10 August 2005 - 10:26 PM

;) Well, I've got the multi-choice generator 'working' within Moodle, as part of a Flash module.

:) However - all of the commands that I'm trying to use to send the data, to communicate with the Moodle database seem to be failing to connect.

For example, the movie just hangs when I call the following
onClipEvent (load) {
// first request username
this._visible = false;
_root.firstname = "default";
moodleService.onInit=function()
{
 _root.firstname = moodleService.userFirstName;
 _root.dreams =moodleService.oldanswer;
 _root.gotoAndPlay("start");
}
moodleService.init();
}


I'll keep trying! It just seems that I'm not 'connecting' the .swf to the database.

I think I'll try the basic one now - just to see if I can make anything happen. I'm sure this will be possible, it is just about fiddling with all the settings and scripting.
0

#27

User is offline   Andrew Field Icon

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 2,896
  • Joined: 06-August 04



Posted 10 August 2005 - 10:47 PM

Nope :)

I've uploaded the following attempt:
http://www.effectiveict.co.uk/moodle/mod/f.../view.php?id=10

This gets stuck when the Moodle logo appears. This is a MovieClip with the following code attached:
onClipEvent (load) {
// first request username
//this._visible = false;
_root.firstName = "default";

moodleService.onInit=function()
{
 _root.firstName = moodleService.userFirstName;
 _root.dreams =moodleService.oldanswer;
 _root.gotoAndPlay("start");
}
moodleService.init();
}


It seems that the .swf never communicates with Moodle, and thus the gotoAndPlay("start") never happens ;)

Bit stuck with it really as this is obviously a key thing.
0

#28

User is offline   Andrew Field Icon

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 2,896
  • Joined: 06-August 04



Posted 10 August 2005 - 11:16 PM

Right - I'm going to leave this for now. This problem is quite simple - the .swf isn't communicating with Moodle, but I don't know why.

I'll look again tomorrow.
0

#29

User is offline   Carl Shepherdson Icon

  • Advanced Member
  • PipPipPip
  • Group: Moderator
  • Posts: 888
  • Joined: 10-January 05
  • Location:UK



Posted 10 August 2005 - 11:47 PM

Good Luck :) Thanks for all your hard work too with all that nasty coding!
ContentGenerator.net Forum Moderator

0

#30

User is offline   jamiesensei Icon

  • Member
  • PipPip
  • Group: Customers
  • Posts: 10
  • Joined: 09-August 05
  • Location:Dharam Shala, India



Posted 11 August 2005 - 02:55 AM

This is where the debugging features of the module come in handy.

You can use in Flash :

moodleDebugger.addText('Saving');

Which will output 'Saving' to the debug view. (The debug view is what you see when the movie is loading and you can press CTRL-D to switch to the debug view at any time - this switching unfortunately doesn't work in IE, IE hogs the keys and Flash can't detect this key combo in IE)

And in PHP anything you output using echo, print_r, print, etc will be output to the debug view in Flash upon return from calling the function.
0

#31

User is offline   jamiesensei Icon

  • Member
  • PipPip
  • Group: Customers
  • Posts: 10
  • Joined: 09-August 05
  • Location:Dharam Shala, India



Posted 11 August 2005 - 04:21 AM

You can also do this to check that your service file is being parsed correctly. Add a file with this contents in the same directory as your movie :

<?php
include ('../../../../config.php');
include ('./service.php');
?>


Just to check for any parse errors of your class file. Point to the file with your browser and hopefully there will be no parse errors.

You aren't using php5 are you? You are aware that the module doesn't yet work with php5 aren't you?
0

#32

User is offline   Andrew Field Icon

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 2,896
  • Joined: 06-August 04



Posted 11 August 2005 - 11:28 AM

Just checked with my hosts - PHP Version 4.3.10.

At least that isn't the issue :) I'll have a further play with all this later.
0

#33

User is offline   Carl Shepherdson Icon

  • Advanced Member
  • PipPipPip
  • Group: Moderator
  • Posts: 888
  • Joined: 10-January 05
  • Location:UK



Posted 11 August 2005 - 11:43 AM

Andrew Field, on Aug 11 2005, 12:28 PM, said:

Just checked with my hosts - PHP Version 4.3.10.

At least that isn't the issue :)  I'll have a further play with all this later.
<{POST_SNAPBACK}>


Me just checked too! latest 4 series, v4.4.0 ;)
ContentGenerator.net Forum Moderator

0

#34

User is offline   Carl Shepherdson Icon

  • Advanced Member
  • PipPipPip
  • Group: Moderator
  • Posts: 888
  • Joined: 10-January 05
  • Location:UK



Posted 15 August 2005 - 04:36 PM

Any update Andrew? :)
ContentGenerator.net Forum Moderator

0

#35

User is offline   Andrew Field Icon

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 2,896
  • Joined: 06-August 04



Posted 15 August 2005 - 06:35 PM

I'm afraid I haven't had a chance to experiment with things further yet. I'll update this topic when I have done.
0

#36

User is offline   Andrew Field Icon

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 2,896
  • Joined: 06-August 04



Posted 19 August 2005 - 10:52 PM

I've put this aside for a while so as I really want to concentrate on the new releases. I will do my best to get this integration working, but once the Multi-choice and Match-up generators are released.

There is also the surprise Fling the Teacher generator to put together too [see the other topic].

Apologies for this, but I'd like to prioritise properly and get the current developments finished before completing this integration.

I'll reopen this thread when I have updates.
0

#37

User is offline   Andrew Field Icon

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 2,896
  • Joined: 06-August 04



Posted 17 July 2006 - 09:34 PM

Right, I'm moving back to try and get the connection with Moodle working over this summer.

I've made a small donation to support the development of the Flash module and, at Jamie's request, reposted a summary of this thread on the Moodle discussion forums.

http://moodle.org/mo...uss.php?d=49967

So, watch this space. ;)
0



Share this topic:
  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users