function qcollection_add_question_action_form in Quiz 6.6
Return a form for selecting collections and quizzes to which a node should be copied
File
- includes/
qcollection/ qcollection.module, line 278 - The main file for qcollection.
Code
function qcollection_add_question_action_form($context) {
global $user;
$form = array();
// user's collections
$sql = "SELECT nid, title\n FROM {node}\n WHERE (type in ('qcollection')) AND (uid = %d)";
$result = db_query($sql, $user->uid);
while ($row = db_fetch_array($result)) {
$options[$row['nid']] = $row['title'];
}
// checkboxes for the qcollections the user has permission to add to
$form['my_collections'] = array(
'#type' => 'checkboxes',
'#title' => t('My Collections'),
'#options' => $options,
'#description' => t('Collections to which you can add question items.'),
);
return $form;
}