Hangman

Hangman

by Mark Tyers -
Number of replies: 16

At the college we often use hangman style games to reinforce vocabulary etc. I have produced a version using php running off a text file but given the demand for the tool and that lecturers want to assemble their own word/clue lists on the fly with students I am intending to port to a mySQL backend.

Part of the problem is that access to the word-lists needs to be restricted (for obvious reasons) and I though about linking into Moodle authentication as the staff already have accounts set up.

When a member of staff accesses a restricted page I want to redirect them to the Moodle login and then if they are authenticated pass them back to the secure page.

Trouble is I don't understand how to do this :o(

I have examined the mdl_user table and can see that the passwords are encrypted a la Unix. but this is as far as my knowledge goes.

Can anyone help or is this something best left well alone...

Average of ratings: -
In reply to Mark Tyers

Re: Hangman

by Williams Castillo -

Interesting.. A week or so ago I was thinking in this and other kind of ludic activities, as crosswords, puzzles, etc... I think it's a great way to make Moodle more useful to the youngest kids...

This could be a great start!

Regarding your problem.. I don't know if I fully understood what you want, but if the script is out of Moodle, I think that you should import the require_login functions and all its related stuff, including part of the config.php.

Will

In reply to Mark Tyers

Re: Hangman

by Robert Lefebvre -
Could you construct it as a "hangman" course? I mean that the entire course is the game itself. If the game will operate there, then you might restrict access to the word list to "course creators" only.

In reply to Mark Tyers

Re: Hangman: Javascript cookied

by John Taylor Johnston -
Mark,
I made a Windows app using Borland Delphi to make hangman exercises using Javascript.
You might prefer this?

http://www.collegesherbrooke.qc.ca/languesmodernes/jtjohnston/hangman/hangman.htm

You can hack the html file and make your own word list, or you could reply and I could post the exe in a zip on my site. The JS is not mine, though I modified it extensively, but obtained permission to use it in my windows executable. The app is awfully easy to use. I used to use it when I taught primary, but might consider using it with very low level ESl students myself.


// Hangman Generator Windows 95 code written by John Taylor-Johnston
// Created with Borland Delphi Version 3.0
// Avaialble at: http://callisto.si.usherb.ca/~eslcafe/
// This Win95 programme is Copyright (c) 1998 John Taylor-Johnston, all rights reserved.
// Quiz Manifold Version 2 (c) 1999 John Taylor-Johnston, all rights reserved.
//==============================================================================
// JavaScript Hangman code written by Rick Glusick
// execpt the functions getCookie, setCookie, and delCookie.
// See note below.
// This code is Copyright (c) 1997 Rick Glusick, all rights reserved.
//==============================================================================
// This code is Copyright (c) 1996 Nick Heinle and Athenia Associates,
// all rights reserved. In order to receive the right to license this
// code for use on your site the original code must be copied from the
// Web site webreference.com/javascript/. License is granted to user to
// reuse this code on their own Web site if and only if this entire copyright
// notice is included. Code written by Nick Heinle of webreference.com.
In reply to John Taylor Johnston

Re: Hangman: Javascript cookied

by Mark Tyers -

to help you might want to look at the 'current' version:

HANGMAN

the problem i need to solve is to allow teachers to add their own word lists without giving students the same level of access.

data and source code attached...

In reply to Mark Tyers

Re: Hangman: Create your own - an easier way.

by John Taylor Johnston -
Hangman: Create your own - an easier way.

http://nymphs.covcollege.ac.uk/hangman/ is indeed interesting, but try:
the cookied hangman activity at http://ccl.flsh.usherbrooke.ca/eslcafe/

I like Mark's activity, but think it needs graphics smile I would love to see the source too.
Mark, what do you think of my stick man? The Windows executable generates the word list and builds the page.

John

In reply to John Taylor Johnston

Re: Hangman: Create your own - an easier way.

by Mark Tyers -

If you look carefully at my posting you will see the source attached wink.gif.

Basically the next step is to create a web page which will allow tutors and students to create their own word lists. We are just about ot be inspected (10th Nov) so the paper avalanche from our management team is threatening to swamp my desk, hence the hangman game is not top priority blush.gif but most of the work is done on the improved version, which has undergone some major code refactoring to reduce thes paghetti (just some bugs to squish evil.gif).

The main priority with my version was to produce a simple HTML4 compliant page which could be tweaked easily. Given the great graphics functions in PHP, adding graphics to the game should only take a short while.

If you would like me to post the latest version before I go under, let me know.

In reply to Mark Tyers

Re: Hangman: Javascript cookied

by John Taylor Johnston -
Interesting, but you should use some form of graphics. use mine, if you want. or see:

http://janmulder.co.uk/Games/Hangman/ I like that one.

Try separating your spaces as well so the user can see how many blanks there are between words. __c_c__ should be _ _ c _ c _ _

Have a look at my URL if you want a Wndows app that will create it:

http://ccl.flsh.usherbrooke.ca/eslcafe/
In reply to John Taylor Johnston

Re: Hangman: Javascript cookied

by Ger Tielemans -

I like the visual look of Jan Mulder's Hangman. There are enough windows- and DOS-hangman's around the world, the same for crosswords etc.

I would prefer for all these add-ons a 100% web-interface:

  • the teacher with teacher rights can create content on the web, no separete editor (So on this point HP also falls short)
  • students can do the exercises and games with anormal webbrowser
  • Constructivism:  In this version students must create topic-related examples with these tools as an extra way of making use of their new knowledge in another way..

 

In reply to Ger Tielemans

Re: Hangman: Javascript cookied

by Ger Tielemans -

Found your story editor as Windows.exe version... mm.. for the moment we can live with it, nice, thanks.

(The Titanic example shows almost correct in the inline-window.)

In reply to John Taylor Johnston

Re: Hangman: Javascript cookied

by Ger Tielemans -

Question for a Moodle Man:

Maybe this is a good example for a "create your own Mooodle Module for Dummies"

How can this script be changed into a module that you can put on a moodle card and that gives the score back to the moolde student-admin.

Seven steps ? 

In reply to Ger Tielemans

Re: Hangman: Javascript cookied

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
See the README in mod/newmodule_template.zip
In reply to Martin Dougiamas

Re: Hangman: Javascript cookied

by Mark Tyers -

Have taken the plunge biggrin.gif and started on a moodle hangman module...

Quick question: when I look at the options in the 'add' dropdown box I get modulename instead of hangman, so when I go to the add screen I get:

Adding a new modulename to topic 1

I am assuming a variable has not been assigned correctly but for the life of me I can't find it thoughtful.gif

In reply to Mark Tyers

Re: Hangman: Javascript cookied

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
You need to create a hangman.php in the English lang pack ie /lang/en/hangman.php (the file must match the module name)
In reply to Martin Dougiamas

Re: Hangman: Creating a Moodle Module

by Mark Tyers -

Thanks for the prompt reply. I now have a hangman.php file!

when I go back in the name appears fine but the label for the text area still says wordlist.

I am keen to get this working and as a person new to moodle would be happy to work with you to develop a Moodle for Dummies resource with me being the dummy in question smile

Once I have fixed this issues I will then need to validate the data submitted. Where would the validate/db update code go? I can see a reference to function 'insert-record' in the 'hangman_add_instance' function in lib.php. Is this function already written or is this for me to write? Would this be where the validate/db insert stuff goes?

As you have no doubt gathered I may need more than a little handholding smile

Thanks for helping.

In reply to Mark Tyers

Re: Hangman: Creating a Moodle Module

by Vasilis Daloukas -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Take a look at the module Game http://moodle.org/mod/data/view.php?d=13&rid=1196
This module gets input from quiz, glossary or questions and plays some games.
The games are: hangman, crossword, cryptex, millionaire, sudoku, "Snakes and Ladders", "Book with questions" and "The hidden picture"
If you like the idea goto http://bdaloukas.gr/moodle
Currently works with Greek, English, German, French and Spanish language.
There are demo courses in Greek languages, one demo in English language and one demo in French language.
For info goto http://bdaloukas.gr/moodle/course/view.php?id=15
Here you can find a a flash video about installation the module game http://bdaloukas.gr/moodle/course/view.php?id=15