|
|
<view class="classroom" bindtap="select_stu" data-id="none">
|
|
|
<movable-area>
|
|
|
<movable-view wx:if="{{show_conversation}}" 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 class="hint">课程名称:{{class_name}} 教员姓名:{{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 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>
|
|
|
</movable-area>
|
|
|
</view>
|