| 1 |
<?php |
<?php |
| 2 |
// $Id: uts.module,v 1.52 2009/01/12 01:56:20 boombatower Exp $ |
// $Id: uts.module,v 1.53 2009/05/26 15:58:24 boombatower Exp $ |
| 3 |
/** |
/** |
| 4 |
* @file |
* @file |
| 5 |
* Provide general Usability Testing Suite functionality and module implementation. |
* Provide general Usability Testing Suite functionality and module implementation. |
| 831 |
$study = node_load($form['study_nid']['#value']); |
$study = node_load($form['study_nid']['#value']); |
| 832 |
$output = t('<p><b>Description:</b> @body</p>', array('@body' => $study->body)) . $output; |
$output = t('<p><b>Description:</b> @body</p>', array('@body' => $study->body)) . $output; |
| 833 |
} |
} |
| 834 |
|
else { |
| 835 |
|
$studies = uts_studies_load(); |
| 836 |
|
$list = array(); |
| 837 |
|
$list[] = t('--'); |
| 838 |
|
foreach ($studies as $study) { |
| 839 |
|
$list[$study->nid] = $study->title; |
| 840 |
|
} |
| 841 |
|
|
| 842 |
|
$form = array(); |
| 843 |
|
$form['filter'] = array( |
| 844 |
|
'#type' => 'fieldset', |
| 845 |
|
'#title' => t('Filter'), |
| 846 |
|
'#attributes' => array('class' => 'container-inline'), |
| 847 |
|
); |
| 848 |
|
$form['filter']['study_nid'] = array( |
| 849 |
|
'#type' => 'select', |
| 850 |
|
'#title' => t('Study'), |
| 851 |
|
'#options' => $list, |
| 852 |
|
'#attributes' => array('onchange' => 'window.location.href = "/admin/uts/tasks/" + $(this).val();'), |
| 853 |
|
); |
| 854 |
|
$output = drupal_render($form) . $output; |
| 855 |
|
} |
| 856 |
return $output; |
return $output; |
| 857 |
} |
} |
| 858 |
|
|