/** Return the name for a testsurvey */
 function testsurvey_name($testsurvey)
 {
     if ($testsurvey->description) {
         return $testsurvey->description;
     } else {
         $CI =& get_instance();
         $test = $CI->testModel->get_test_by_id($testsurvey->test_id);
         return implode(' ', array($test->name, testsurvey_when($testsurvey->whensent, $testsurvey->whennr)));
     }
 }
Ejemplo n.º 2
0
			<th><?php 
echo lang('limesurvey_id');
?>
</th>
			<td><?php 
echo survey_by_id($testsurvey->limesurvey_id);
?>
</td>
		</tr>
		<tr>
			<th><?php 
echo lang('whensent');
?>
</th>
			<td><?php 
echo testsurvey_when($testsurvey->whensent, $testsurvey->whennr);
?>
			</td>
		</tr>
	</table>

	<!-- Download scores -->
	<?php 
if (in_array($test->code, array('ncdi_wz', 'anamnese'))) {
    echo '<p>';
    echo anchor('testsurvey/download_scores/' . $testsurvey->id, lang('download_scores'));
    echo '</p>';
}
?>

	<!-- Scores -->
Ejemplo n.º 3
0
    echo form_dropdown_and_label('test', test_options($tests), $test_id);
    if (!empty($testcat_id)) {
        echo form_dropdown_and_label('testcat', testcat_options($testcats), $testcat_id);
    } else {
        echo form_dropdown_and_label('testcat', array(), array(), 'disabled');
    }
    if (!empty($testsurvey_id)) {
        echo form_dropdown_and_label('testsurvey', testsurvey_options($testsurveys), $testsurvey_id);
    } else {
        echo form_dropdown_and_label('testsurvey', array(), array(), 'disabled');
    }
    echo form_input_and_label('participant');
    echo form_hidden('participant_id', $participant_id);
} else {
    echo form_input_and_label('test', $test->name, 'readonly');
    echo form_input_and_label('testcat', testcat_code_name($testcat), 'readonly');
    echo form_input_and_label('participant', name($participant), 'readonly');
    echo form_input_and_label('testsurvey', testsurvey_when($testsurvey->whensent, $testsurvey->whennr), 'readonly');
}
?>

<?php 
echo form_input_and_label('score', $score, 'class="positive-integer"');
echo form_input_and_label('date', $date, 'id="score_datepicker"');
?>

<?php 
echo form_controls();
echo form_fieldset_close();
echo form_close();
echo validation_errors();