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.

61 lines
4.0 KiB

<movable-area>
<view class="classroom" bindtap="select_stu" data-id="none">
<movable-view wx:if="{{show_conversation&&!loading}}" direction="all" y="{{240}}">
<myicon type="close" class="close" bindtap="close_conversation"></myicon>
<scroll-view scroll-y="{{true}}" class="message-list">
<block wx:for="{{messages}}" wx:for-item="message" wx:key="objectId">
<view class="message flex-wrap">
<text>{{message.sender_name}}</text><text>{{message.text}}</text>
</view>
</block>
</scroll-view>
<view class="message-footer flex-wrap">
<input
placeholder="请输入消息:{{classname}}"
bindinput="update_message"
bindconfirm="send_message"
value="{{message_text}}"
class="message"/>
<text style="display: {{message_text ? 'inline': 'none'}}" class="send-message" ontap="send_message">发送</text>
</view>
</movable-view>
<text wx:if="{{!loading}}" class="hint" >课程名称:{{class_name}} 教员姓名:{{teacher.name}}</text>
<view wx:if="{{(students.length==0 || students.length==1 && students[0].objectId==current_user.objectId)&& !loading}}" class="no-student-view">
<image src="../../images/cry.png" class="no-student"></image>
<text class="no-student">还没有学员加入</text>
</view>
<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 wx:if="{{!loading}}" 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 wx:if="{{!loading}}" 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 wx:if="{{!loading}}" class="footer white">
<text class="tappable class-setting" hidden="{{teacher.objectId!=current_user.objectId}}" bindtap="enter_setting" data-id="{{class_id}}">设置</text>
<text hidden="{{teacher.objectId==current_user.objectId}}">我的得分:{{current_user.mark}}分</text>
<text class="tappable class-detail" bindtap="enter_detail">资源</text>
</view>
</view>
</movable-area>