Monday, October 20, 2008

Moodle fixes: loss of admin rights, loss of admin password, loss of admin user name

Somewhere along the way, I messed up the roles that the administrator could do in Moodle. I don't know how I did it, but I saw nothing but my course list when I logged in as administrator because I had no rights. After searching the Moodle Forums, I found this post and its responses about the admin roles problem.

The solution here takes the solution above one step further. It sets roles, identifies the administrator and resets the administrators password, but also goes on to force a reset of the admin password and removal of the reset file. You can download the file: adminfix.php.

Here are the steps you need to take:
  1. Download this file to your machine.
  2. Remove the "_" that follows ".php"
  3. Drop the downloaded file (ftp, etc.) in the root directory of your server.
  4. Direct your browser to http://yourserver/adminfix.php.

Note: The admin password is changed to 'moodle' and all of the roles are reset. If the script reports that it cannot remove itself, the file must be removed manually and then you may proceed to login. If the removal went ok, you are redirected to login screen to reset your password.

Labels: , , ,

Sunday, February 24, 2008

Moodle Aiken Format Extensions

Moodle is a content manager designed for maintaining courses. I use Moodle for some courses that I teach at ECPI College of Technology. There are a number of formats for creating questions for quizzes with Moodle. However, one of the easiest, Aiken, is not quite as flexible as I would like.

The standard format is:

Question on one line
A. Option 1 on one line
B. Option 2 on one line
C. Option 3 on one line
....

ANSWER: A
I wanted something that would allow me to copy and paste questions from other sources which might include multiple line questions or options. I also wanted the ability to allow multiple selection questions and true/false as well as multiple choice, single selection questions. Also, I wanted to have the ability to include feedback. The other data might also have a question number which I wanted to remove.


The resulting format will accept pure Aiken format but is more flexible. For example, the format will accept:


33. Select one or more of the following which represent a star topology:
A.
* --- * --- * --- *
B.
*--------------*
| |
| |
| |
*--------------*
C.
*
|
O----*
|
*
D.
*
* | *
\ | /
\--O--/
|
|
*
ANSWER: C,D
FEEDBACK: A Star topology has a hub or a switch in the center with a connection to a device.


My updated version of the Aiken format conversion routine for Moodle is attached as format.php.txt. It belongs in the moodle directory "question/format/aiken"

Labels: , ,