You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
2.7 KiB

<view bindtap="select_stu" data-id="none">
<text class="hint">课程名称:{{class_name}}\t教员姓名:{{teacher.name}}</text>
<view class="student-list">
<block wx:for="{{students}}" wx:for-item="student" wx:key="objectId">
<view class="{{teacher.objectId==current_user.objectId?'student selectable':'student'}}" hidden="{{teacher.objectId==student.objectId}}" catchtap="select_stu" data-id="{{student.objectId}}">
<myicon wx:if="{{!student.present}}" class="student-icon" type="absent_student" size="36"></myicon>
<myicon wx:elif="{{student.isasking==1}}" class="student-icon" type="question" size="36" color="red"></myicon>
<myicon wx:elif="{{student.isasking==0}}" class="student-icon" type="present_student" color="#00ff00" size="36"></myicon>
<myicon wx:elif="{{student.isasking==2}}" class="student-icon" type="answer" color="#0000ff" size="36"></myicon>
<text class="{{student.present?'present':'absent'}}">{{student.name+'\n'}}</text>
<text>{{student.mark}}分</text>
</view>
</block>
</view>
<view class="operation-list">
<view class="teacher-operation" hidden="{{teacher.objectId!=current_user.objectId || select_stu_id==''}}">
<button type="primary" catchtap="add_mark" data-id="{{select_stu_id}}" data-mark="{{-1}}">减一分</button>
<button type="primary" catchtap="add_mark" data-id="{{select_stu_id}}" data-mark="{{1}}">加一分</button>
<button type="primary" catchtap="add_mark" data-id="{{select_stu_id}}" data-mark="{{2}}">加两分</button>
<button type="primary" catchtap="set_isasking" data-id="{{select_stu_id}}" data-status="{{2}}">请起立</button>
</view>
<view class="student-operation" hidden="{{teacher.objectId==current_user.objectId}}">
<button hidden="{{current_user.isasking!=0}}" type="primary" catchtap="set_isasking" data-id="{{current_user.objectId}}" data-status="{{1}}">我要提问/回答</button>
<button hidden="{{current_user.isasking!=1}}" type="primary" catchtap="set_isasking" data-id="{{current_user.objectId}}" data-status="{{0}}">取消提问</button>
<text hidden="{{current_user.isasking!=2}}" class="warning">请起立提问/回答</text>
<button hidden="{{current_user.isasking!=2}}" type="primary" catchtap="set_isasking" data-id="{{current_user.objectId}}" data-status="{{0}}">完成回答</button>
</view>
</view>
<view class="{{teacher.objectId!=current_user.objectId?'footer white':'footer'}}">
<!--text hidden="{{teacher.objectId==current_user.objectId}}">测试</text-->
<text hidden="{{teacher.objectId==current_user.objectId}}">我的得分:{{current_user.mark}}分</text>
<text class="tappable class-detail" bindtap="enter_detail">更多</text>
</view>
</view>