<style type="text/css">
span.required{color:red;}
.download{width:200px;display:inline-block;float:left}
</style>
<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'operatescore-form',
	'enableAjaxValidation'=>false,
)); ?>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php //echo $form->labelEx($model,'username'); ?>
		<?php //echo $form->textArea($model,'username',array('rows'=>6, 'cols'=>50)); ?>
		<?php //echo $form->error($model,'username'); ?>
	</div>
	<div class="row">
	<h3>操作题</h3><hr/>
	</div>
	<?php $i=1; foreach($data as $k=>$v) {?>
		<div class="row">
			<div style="clear:left;">第<?php echo $i;?>题：<?php echo $v['tigan'];?></div>
			<div>
				<p class="download"><?php echo CHtml::link('下载原题',$v['tizhi'])?></p>	
				<p class="download"><?php echo CHtml::link('下载学生答案',$v['student_answer'])?></p>	
				<p class="download"><?php echo CHtml::link('下载参考答案',$v['answer'])?></p>
			</div>
		</div>
		<hr style="clear:both"/>
	<?php $i++;}?>

	<div style="clear:both" class="row">
		<?php echo $form->labelEx($model,'operateScore'); ?>
		<?php echo $form->textField($model,'operateScore',array('class'=>'easyui-numberspinner','data-options'=>"min:1,max:100,required:true")); ?>(<span class="required">将<?php echo $i-1?>个操作题的得分加在一起</span>)
		<?php echo $form->error($model,'operateScore'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : '完成'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->