Game (crossword) not showing as an option to track in the progress bar

Game (crossword) not showing as an option to track in the progress bar

by Wes Sykes -
Number of replies: 9

Hi All

One of our staff members is creating courses with crosswords from the game block and progress bars.  They are trying to track every activity in the progress bar but the games do not show up in the configuration section of the progress bar.

Has anyone else experienced this and if they have did you ever sort the issue out?

Regards

Wes

Average of ratings: -
In reply to Wes Sykes

Re: Game (crossword) not showing as an option to track in the progress bar

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Wes,

If you look through the progress bar lib.ph file, you will see that it does not have the game module programmed in it. You might could see if the progress bar maintainer, Michael de Raadt, would add it for you, but I think you would also need to have the game module modified as with just a quick check, it looks like the only entry/event added to the log is whether or not a student has viewed a game. I am sure you would probably want to know if they played a game, not just viewed it.

HTH,

AL

In reply to AL Rachels

Re: Game (crossword) not showing as an option to track in the progress bar

by Wes Sykes -

Thanks for replying Al and for pointing out that it is not in the Lib File.  I feel I can have a dabble and add it myself smile

Regards


Wes

In reply to Wes Sykes

Re: Game (crossword) not showing as an option to track in the progress bar

by Andy Chaplin -

Hi Wes,

Can you let us know if you have any luck?


All the best!

In reply to Andy Chaplin

Re: Game (crossword) not showing as an option to track in the progress bar

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Andy and Wes,

If you guys really want this, I can give you a copy of the changes I made the other day when testing if it was available in answer to Wes' original question. You need to just be aware that without modifying the game addon to add other events, the only thing you can track the progress of is if they view the game. That means that someone who just clicks on the game, then exits will get complete marked just as the person who actually goes and plays the game.

AL

In reply to AL Rachels

Re: Game (crossword) not showing as an option to track in the progress bar

by Wes Sykes -

Hi Al

I'd love to see what you have done.  I did have a pop at it and as you said could only monitor that the game link was clicked.

Thanks for the contribution to my post smile

Regards

Wes

In reply to Wes Sykes

Re: Game (crossword) not showing as an option to track in the progress bar

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Wes,

If you got to the point that you were able to monitor that the game link was clicked, then you got as far as I did. To get Progress Bar to be able to track anything else about Game activities, the Game add-on itself would have to be modified and have more events added. I just don't have time to try and do that myself right now.

AL

In reply to AL Rachels

Re: Game (crossword) not showing as an option to track in the progress bar

by Wes Sykes -

OK Thanks Al

If I get any further I'll pass the code on smile

Regards

Wes

In reply to Wes Sykes

Re: Game (crossword) not showing as an option to track in the progress bar

by Vasilis Daloukas -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Try to add these lines to lib.php in line 585 (of folder progress)

        'game' => array(

            'defaultTime' => 'timeclose',

            'actions' => array(

                'attempted'    => "SELECT id

                                     FROM {game_attempts}

                                    WHERE gameid = :eventid

                                      AND userid = :userid",

                'finished'     => "SELECT id

                                     FROM {game_attempts}

                                    WHERE gameid = :eventid

                                      AND userid = :userid

                                      AND timefinish <> 0",

                'passed'       => "SELECT g.finalgrade, i.gradepass

                                     FROM {grade_grades} g, {grade_items} i

                                    WHERE i.itemmodule = 'game'

                                      AND i.iteminstance = :eventid

                                      AND i.id = g.itemid

                                      AND g.userid = :userid

                                      AND (g.finalgrade IS NOT NULL OR g.excluded <> 0)",

                'graded'       => "SELECT g.rawgrade

                                     FROM {grade_grades} g, {grade_items} i

                                    WHERE i.itemmodule = 'game'

                                      AND i.iteminstance = :eventid

                                      AND i.id = g.itemid

                                      AND g.userid = :userid

                                      AND (g.finalgrade IS NOT NULL OR g.excluded <> 0)",

            ),

            'defaultAction' => 'finished'

        ),



Also add 

$string['game'] = 'Game';


to lang/en/block_progress.php

In reply to Vasilis Daloukas

Re: Game (crossword) not showing as an option to track in the progress bar

by Wes Sykes -

Thanks for this Vasilis smile

I gave up after a few tries due to other pressures of our blended learning project.

If I get a quiet minute I'll certainly give this a try.

Regards

Wes