This module is useful to attach a text based agreement as a form to nodes that require an agreement to be signed by each user. Examples of agreements include Content Acceptance Agreements, Non-Disclosure Agreements, End-User License Agreements, etc.
Agreements can be attached to Nodes of any type, and each node can have its own specific agreement for a specific year e.g. Node can have two different agreements for two different years, once the current year exceeds the agreement year that agreement will be replaced with the agreement of next year.
All data related to user signing an agreement are stored per agreement and these reports can be viewed for a certain no. of years (this feature will be implemented in next release). The reports are of two types listing users who have signed the agreement and users who have pending signature.
Further a dialog functionality from JQuery has been implemented to send popup to all users if the signing of agreement is pending. To achieve this a small piece of code has to be added at the end of page.tpl.php file of your theme (we are considering it to move this code to module level in next release)
<?php
if (module_exists('signed_nodes') && $user->uid >0) {
global $user;
$snode = array();
$popup = FALSE;
$result = db_query("SELECT sn.nid, snu.uid FROM {signed_nodes} sn LEFT JOIN {signed_nodes_user} snu ON sn.snid = snu.snid AND snu.uid = :uid", array(':uid' => $user->uid));
foreach ($result as $row) {
if ($row->nid && $row->uid == NULL) {
$snode[] = $row->nid;
$popup = TRUE;
}
}
if ($popup == TRUE) {
?>
<div id="dialog" title="Signed Nodes">
<p>Following page(s) require your attention, please sign the agreement on these page(s)</p>
<?php
foreach ($snode as $nid) {
$nodetitle = db_query("SELECT title FROM {node} WHERE nid = :nid", array(':nid' => $nid))->fetchField();
print l(t($nodetitle. " Agreement"),'node/'.$nid);
echo "<br>";
}
?>
</div>
<?php
}
}
?>
TODO:
- User signed data to purge after a declared number of years.
- Move JQuery.dialog related php code to module page preprocess
SPONSORSHIP
Sponsored by Saudi Business Machine (SBM).
If you feel this module is useful to your business, please consider the following:
Contact me directly for paid work.
Thanks!
Project information
- Module categories: Content Editing Experience, Access Control
- 21 sites report using this module
- Created by Qandeel on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 7.x-1.x-dev updated 9 Jul 2012 at 00:44 UTC