Policy agreement

Policy agreement

by Jay S -
Number of replies: 13

I am about to create a policy agreement page. What I want is this. If the user has not agreed to the policy agreement they can not proceed into the CMS.

Initially I thought I would just create a db table which will have two fields, the username and policyagreed. I was going to hack some security code (which is called on every page) insert a call to a function which queries the db table. If the user has not agreed they will receive a pop-up or be re-directed to the policy agreement page.

However, this may not be the best way to go about this. So please give me some feedback on how you have or would do this.

Average of ratings: -
In reply to Jay S

Re: Policy agreement

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
I've just put this in 1.5 development version. There is a new config variable called "sitepolicy" which lets you specify a URL to a policy document. If this is set, then each user is redirected to see it and answer "Yes" to continue, which sets a flag called "policyagreed" in the user table.

The config variable can be set anytime. If the policy document is updated and you need everyone to agree again, just issue

UPDATE user SET policyagreed = 0
In reply to Martin Dougiamas

Re: Policy agreement

by Jay S -
For those of us using 1.4X, what do we do. 
In reply to Jay S

Re: Policy agreement

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
Hack it quite a lot (see CVS mailing list or cvs:/moodle for recent checkins), or wait for 1.5 to come out.

Files changed were:

/version.php
/admin/config.html
/lang/en/moodle.html
/lib/defaults.php
/lib/moodlelib.php
/lib/db/mysql.*
/lib/db/postgres7.*
/user/policy.php

In reply to Martin Dougiamas

Re: Policy agreement

by Jay S -
What exactly happens to all of the hacks I and others have done to 1.4, when they install 1.5.

My hacks include:

  1. Hacking the way the homepage displays the courses. Now displays all of the courses the user is a part of and below that all of the categories and courses that are not hidden.
  2. Hacking of language files. For example:
    dialogue=elsmail
  3. Hacked certificate mod
In reply to Martin Dougiamas

Re: Policy agreement

by N Hansen -
Would it possible to make the policies on a course-by-course basis? There are some good reasons I could see not wanting a single policy for everything, depending on the nature of the courses and their content.
In reply to Martin Dougiamas

Re: Policy agreement

by Jeff Wood -

Love the new "Policy Page"

For us newbies - where/how does one "UPDATE user SET policyagreed = 0" to force everyone to accept the aagreement once it has changed?

Tnx

Jeff

In reply to Jeff Wood

Re: Policy agreement

by Teemu Sumi -
It's a SQL query. You must change all the values of policyagreed column of mdl_user table.


Teemu 
In reply to Martin Dougiamas

Re: Policy agreement

by Timothy Takemoto -
"UPDATE user SET policyagreed = 0"
Cool, thanks that is just what I wanted to hear.

I did not realise that when my site was set to maintenance, users could still fill out profiles and enrol on the site. I had not yet set up a site policy agreement and would like those that enrolled during this time to be asked to agree to it (the site policy).

Tim
In reply to Jay S

Re: Policy agreement

by Leonhard Küllinger -

Hi,

we discussed exactly this at the moodle meeting in Klagenfurt, Austria two weeks ago.

It would be nice to insert a individual message. A school has something other to say than a commercial site.

Maybe it would be useful to give teachers an other message than pupils.

For example that all content and messages made on the plattform are being. Or that a teacher is not allowed to give course backups containing user entries further......

Great idea!!!

Power on moodle

Average of ratings: Useful (1)
In reply to Leonhard Küllinger

Re: Policy agreement

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
> we discussed exactly this at the moodle meeting in Klagenfurt, Austria two weeks ago.

I know. Actually, it's been a very common and long-term request (most recently I heard it at the Aussie MoodleMoot). I'm sorry it took so long because it was very easy to add.

Yes, every site can make their own policy and it can be anything you like. In fact there is no default text, currently.  Most institutions who already have an existing policy document somewhere on their institution web site will probably just point Moodle at that.

Separating teachers and students is more difficult, since user roles may not be defined on new accounts. It really won't hurt to include both in one policy document for all users, though.
In reply to Martin Dougiamas

Re: Policy agreement

by Timothy Takemoto -
It is really big news in Japan right now. All staff members of my faculty had to attend a lecture about the necessity of getting students to agree to one of these policies.
Timothy