瀏覽代碼

添加老师端->陪练课评价详情页面

Pq 3 年之前
父節點
當前提交
53e2ab9d9f

+ 1 - 0
BaseLibrary/src/main/java/com/cooleshow/base/router/RouterPath.kt

@@ -43,6 +43,7 @@ object RouterPath {
         companion object {
             const val TEACHER_RECEIVED_COMMENT = "/teacher/ui/comment/ReceivedCommentActivity"
             const val TEACHER_COURSE_COMMENT = "/teacher/ui/comment/CourseCommentActivity"
+            const val TEACHER_COURSE_COMMENT_DETAIL = "/teacher/ui/comment/CourseCommentDetailActivity"
         }
     }
 

+ 7 - 0
BaseLibrary/src/main/java/com/cooleshow/base/ui/activity/BaseActivity.java

@@ -93,6 +93,13 @@ public abstract class BaseActivity<V extends ViewBinding> extends RxAppCompatAct
         return viewBinding;
     }
 
+    public boolean checkActivityExist() {
+        if (isFinishing() || isDestroyed()) {
+            return false;
+        }
+        return true;
+    }
+
     @Override
     protected void onDestroy() {
         super.onDestroy();

+ 6 - 0
teacher/src/main/AndroidManifest.xml

@@ -48,6 +48,12 @@
             android:windowSoftInputMode="adjustPan"
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:screenOrientation="portrait" />
+
+        <activity
+            android:name=".ui.comment.CourseCommentDetailActivity"
+            android:configChanges="orientation|screenSize|keyboardHidden"
+            android:screenOrientation="portrait" />
+
     </application>
 
 </manifest>

+ 3 - 3
teacher/src/main/java/com/cooleshow/teacher/bean/CourseCommentListBean.java

@@ -88,8 +88,8 @@ public class CourseCommentListBean {
 
         public String avatar;
         public String classDate;
-        public int courseGoupId;
-        public int courseId;
+        public String courseGoupId;
+        public String courseId;
         public String endTime;
         public int id;
         public String realName;
@@ -98,7 +98,7 @@ public class CourseCommentListBean {
         public String status;
         public int subjectId;
         public String subjectName;
-        public int userId;
+        public String userId;
         public String userName;
     }
 }

+ 35 - 0
teacher/src/main/java/com/cooleshow/teacher/contract/CourseCommentDetailContract.java

@@ -0,0 +1,35 @@
+package com.cooleshow.teacher.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+import com.cooleshow.teacher.bean.CourseCommentListBean;
+import com.cooleshow.teacher.bean.SparringCourseCommentBean;
+
+/**
+ * Author by pq, Date on 2022/5/5.
+ */
+public interface CourseCommentDetailContract {
+    interface CourseCommentDetailView extends BaseView {
+        void getSparringCourseCommentSuccess(SparringCourseCommentBean commentBean);
+
+        void getSparringCourseCommentError();
+
+        void submitSparringCourseTeacherCommentSuccess();
+    }
+
+    interface Presenter {
+
+        /**
+         * 查询课后评价详情
+         */
+        void queryCourseCommentDetail(String courseScheduleId, String courseGroupId, String studentId);
+
+        /**
+         * 提交老师评价回复
+         * @param commentContent
+         * @param courseScheduleId
+         * @param courseGroupId
+         * @param studentId
+         */
+        void submitSparringCourseComment(String commentContent, String courseScheduleId, String courseGroupId, String studentId);
+    }
+}

+ 92 - 0
teacher/src/main/java/com/cooleshow/teacher/presenter/comment/CourseCommentDetailPresenter.java

@@ -0,0 +1,92 @@
+package com.cooleshow.teacher.presenter.comment;
+
+import android.text.TextUtils;
+
+import com.cooleshow.base.constanst.Constanst;
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.RequestBodyUtil;
+import com.cooleshow.teacher.api.APIService;
+import com.cooleshow.teacher.bean.CourseCommentListBean;
+import com.cooleshow.teacher.bean.SparringCourseCommentBean;
+import com.cooleshow.teacher.contract.CourseCommentContract;
+import com.cooleshow.teacher.contract.CourseCommentDetailContract;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * Author by pq, Date on 2022/5/5.
+ */
+public class CourseCommentDetailPresenter extends BasePresenter<CourseCommentDetailContract.CourseCommentDetailView> implements CourseCommentDetailContract.Presenter {
+    @Override
+    public void queryCourseCommentDetail(String courseScheduleId, String courseGroupId, String studentId) {
+        if (getView() != null) {
+            getView().showLoading();
+        }
+        JSONObject jsonObject = new JSONObject();
+        try {
+            jsonObject.putOpt("courseScheduleId", courseScheduleId);
+            jsonObject.putOpt("courseGroupId", courseGroupId);
+            jsonObject.putOpt("studentId", studentId);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+
+        addSubscribe(create(APIService.class).getSparringCourseComment(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<SparringCourseCommentBean>(getView()) {
+            @Override
+            protected void onSuccess(SparringCourseCommentBean data) {
+                if (getView() != null) {
+                    getView().getSparringCourseCommentSuccess(data);
+                }
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+                if (getView() != null) {
+                    getView().getSparringCourseCommentError();
+                }
+            }
+        });
+    }
+
+    /**
+     * 提交陪练课老师评价
+     *
+     * @param commentContent
+     * @param courseScheduleId
+     * @param courseGroupId
+     * @param studentId
+     */
+    @Override
+    public void submitSparringCourseComment(String commentContent, String courseScheduleId, String courseGroupId, String studentId) {
+        if (getView() != null) {
+            getView().showLoading();
+        }
+        JSONObject jsonObject = new JSONObject();
+        try {
+            jsonObject.putOpt("courseScheduleId", courseScheduleId);
+            jsonObject.putOpt("teacherReplied", commentContent);
+            jsonObject.putOpt("courseGroupId", courseGroupId);
+            jsonObject.putOpt("studentId", studentId);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+
+        addSubscribe(create(APIService.class).submitSparringCourseComment(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<Object>(getView()) {
+            @Override
+            protected void onSuccess(Object o) {
+                if (getView() != null) {
+                    getView().submitSparringCourseTeacherCommentSuccess();
+                }
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+            }
+        });
+    }
+
+}

+ 188 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/comment/CourseCommentDetailActivity.java

@@ -0,0 +1,188 @@
+package com.cooleshow.teacher.ui.comment;
+
+import android.os.Bundle;
+import android.text.TextUtils;
+import android.view.View;
+
+import com.alibaba.android.arouter.facade.annotation.Route;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.ui.activity.BaseMVPActivity;
+import com.cooleshow.base.utils.GlideUtils;
+import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.bean.CourseCommentListBean;
+import com.cooleshow.teacher.bean.SparringCourseCommentBean;
+import com.cooleshow.teacher.constants.CourseConstants;
+import com.cooleshow.teacher.contract.CourseCommentDetailContract;
+import com.cooleshow.teacher.databinding.ActivityCourseCommentDetailLayoutBinding;
+import com.cooleshow.teacher.presenter.comment.CourseCommentDetailPresenter;
+import com.cooleshow.teacher.widgets.CourseSetCommentDialog;
+
+import androidx.annotation.Nullable;
+
+/**
+ * Author by pq, Date on 2022/5/5.
+ */
+@Route(path = RouterPath.CommentCenter.TEACHER_COURSE_COMMENT_DETAIL)
+public class CourseCommentDetailActivity extends BaseMVPActivity<ActivityCourseCommentDetailLayoutBinding, CourseCommentDetailPresenter> implements CourseCommentDetailContract.CourseCommentDetailView, View.OnClickListener {
+    public static final String COURSE_ID = "course_id";
+    public static final String COURSE_GROUP_ID = "course_group_id";
+    public static final String STUDENT_ID = "studentId";
+    private String mCourseId;
+    private String mCourseGroupId;
+    private String studentId;
+    private CourseSetCommentDialog mSetCommentDialog;
+
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        QMUIStatusBarHelper.setStatusBarLightMode(this);
+    }
+
+    @Override
+    protected void initView() {
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "课后评价");
+        mCourseId = getIntent().getStringExtra(COURSE_ID);
+        mCourseGroupId = getIntent().getStringExtra(COURSE_GROUP_ID);
+        studentId = getIntent().getStringExtra(STUDENT_ID);
+        if (TextUtils.isEmpty(mCourseId)
+                || TextUtils.isEmpty(mCourseGroupId)
+                || TextUtils.isEmpty(studentId)) {
+            finish();
+            return;
+        }
+    }
+
+    @Override
+    public void initData() {
+        super.initData();
+        initListener();
+        refreshMainData();
+    }
+
+    private void initListener() {
+        viewBinding.tvSetTeacherComment.setOnClickListener(this);
+    }
+
+    private void refreshMainData() {
+        presenter.queryCourseCommentDetail(mCourseId, mCourseGroupId, studentId);
+    }
+
+
+    @Override
+    protected ActivityCourseCommentDetailLayoutBinding getLayoutView() {
+        return ActivityCourseCommentDetailLayoutBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected CourseCommentDetailPresenter createPresenter() {
+        return new CourseCommentDetailPresenter();
+    }
+
+    private void showSetCommentDialog() {
+        if (mSetCommentDialog == null) {
+            mSetCommentDialog = new CourseSetCommentDialog(this);
+            mSetCommentDialog.setOnSubmitClickListener(new CourseSetCommentDialog.OnSubmitClickListener() {
+                @Override
+                public void onSubmit(String content, int type) {
+                    //提交
+                    viewBinding.tvTeacherAppraisalEmptyText.setVisibility(View.GONE);
+                    viewBinding.tvTeacherAppraisalContent.setVisibility(View.VISIBLE);
+                    viewBinding.tvTeacherAppraisalContent.setText(content);
+                }
+            });
+        }
+        if (!mSetCommentDialog.isShowing()) {
+            mSetCommentDialog.show();
+        }
+        mSetCommentDialog.showMethod(CourseSetCommentDialog.TYPE_SET_TEACHER_COMMENT);
+    }
+
+    /**
+     * 获取陪练课评价成功
+     *
+     * @param commentBean
+     */
+    @Override
+    public void getSparringCourseCommentSuccess(SparringCourseCommentBean commentBean) {
+        if (!checkActivityExist()) {
+            return;
+        }
+        if (commentBean != null) {
+            //头像
+            GlideUtils.INSTANCE.loadImage(this, commentBean.avatar, viewBinding.ivAvatar, R.drawable.icon_teacher_default_head);
+            //声部名称
+            viewBinding.tvCourseName.setText(commentBean.subjectName);
+            //学生名称
+            viewBinding.tvTitle.setText(commentBean.userName);
+            //开始时间
+            viewBinding.tvTime.setText(commentBean.startTime);
+
+            if (TextUtils.equals(CourseConstants.COURSE_STATUS_NOT_START, commentBean.status)) {
+                //未开始
+                viewBinding.tvCourseStatus.setText("未开始");
+                viewBinding.tvCourseStatus.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_ff802c));
+            }
+
+            if (TextUtils.equals(CourseConstants.COURSE_STATUS_ING, commentBean.status)) {
+                //进行中
+                viewBinding.tvCourseStatus.setText("进行中");
+                viewBinding.tvCourseStatus.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_2dc7aa));
+            }
+
+            if (TextUtils.equals(CourseConstants.COURSE_STATUS_COMPLETE, commentBean.status)) {
+                //已结束
+                viewBinding.tvCourseStatus.setText("已结束");
+                viewBinding.tvCourseStatus.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_999999));
+            }
+
+            if (!TextUtils.isEmpty(commentBean.teacherReplied)) {
+                //老师已评价 tv_set_teacher_comment
+                viewBinding.tvSetTeacherComment.setVisibility(View.GONE);
+                viewBinding.tvTeacherAppraisalEmptyText.setVisibility(View.GONE);
+                viewBinding.tvTeacherAppraisalContent.setVisibility(View.VISIBLE);
+                viewBinding.tvTeacherAppraisalContent.setText(commentBean.teacherReplied);
+                viewBinding.tvSubmit.setVisibility(View.GONE);
+            } else {
+                //老师未评价
+                viewBinding.tvSetTeacherComment.setVisibility(View.VISIBLE);
+                viewBinding.tvTeacherAppraisalEmptyText.setVisibility(View.VISIBLE);
+                viewBinding.tvTeacherAppraisalContent.setVisibility(View.GONE);
+                viewBinding.tvSubmit.setVisibility(View.VISIBLE);
+            }
+        }
+    }
+
+    @Override
+    public void getSparringCourseCommentError() {
+        ////获取课程详情评价信息失败
+    }
+
+    /**
+     * 提交老师评价成功
+     */
+    @Override
+    public void submitSparringCourseTeacherCommentSuccess() {
+        if (!checkActivityExist()) {
+            return;
+        }
+        refreshMainData();
+    }
+
+    @Override
+    public void onClick(View v) {
+        if (v.getId() == R.id.tv_set_teacher_comment) {
+            //显示提交老师评价回复他创
+            showSetCommentDialog();
+        }
+
+        if (v.getId() == R.id.tv_submit) {
+            //提交老师点评
+            String content = viewBinding.tvTeacherAppraisalContent.getText().toString().trim();
+            if (TextUtils.isEmpty(content)) {
+                return;
+            }
+            presenter.submitSparringCourseComment(content, mCourseId, mCourseGroupId, studentId);
+        }
+    }
+}

+ 27 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/comment/CourseCommentHasReplyFragment.java

@@ -4,11 +4,15 @@ import android.text.TextUtils;
 import android.view.View;
 import android.widget.TextView;
 
+import com.alibaba.android.arouter.launcher.ARouter;
 import com.bigkoo.pickerview.builder.TimePickerBuilder;
 import com.bigkoo.pickerview.listener.CustomListener;
 import com.bigkoo.pickerview.view.TimePickerView;
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.listener.OnItemClickListener;
 import com.chad.library.adapter.base.listener.OnLoadMoreListener;
 import com.cooleshow.base.constanst.Constanst;
+import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
 import com.cooleshow.base.utils.TimeUtils;
 import com.cooleshow.teacher.R;
@@ -78,6 +82,16 @@ public class CourseCommentHasReplyFragment extends BaseMVPFragment<FragmentCours
             }
         });
 
+        mAdapter.setOnItemClickListener(new OnItemClickListener() {
+            @Override
+            public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
+                if (position < mAdapter.getData().size()) {
+                    CourseCommentListBean.RowsBean rowsBean = mAdapter.getData().get(position);
+                    startDetailActivity(rowsBean);
+                }
+            }
+        });
+
         mAdapter.getLoadMoreModule().setOnLoadMoreListener(new OnLoadMoreListener() {
             @Override
             public void onLoadMore() {
@@ -92,6 +106,19 @@ public class CourseCommentHasReplyFragment extends BaseMVPFragment<FragmentCours
         });
     }
 
+    private void startDetailActivity(CourseCommentListBean.RowsBean rowsBean) {
+        if (rowsBean == null) {
+            return;
+        }
+        ARouter.getInstance()
+                .build(RouterPath.CommentCenter.TEACHER_COURSE_COMMENT_DETAIL)
+                .withString(CourseCommentDetailActivity.COURSE_ID, rowsBean.courseId)
+                .withString(CourseCommentDetailActivity.COURSE_GROUP_ID, rowsBean.courseGoupId)
+                .withString(CourseCommentDetailActivity.STUDENT_ID, rowsBean.userId)
+                .navigation();
+
+    }
+
     /**
      * 构造筛选条件
      *

+ 27 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/comment/CourseCommentNoReplyFragment.java

@@ -4,11 +4,15 @@ import android.text.TextUtils;
 import android.view.View;
 import android.widget.TextView;
 
+import com.alibaba.android.arouter.launcher.ARouter;
 import com.bigkoo.pickerview.builder.TimePickerBuilder;
 import com.bigkoo.pickerview.listener.CustomListener;
 import com.bigkoo.pickerview.view.TimePickerView;
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.listener.OnItemClickListener;
 import com.chad.library.adapter.base.listener.OnLoadMoreListener;
 import com.cooleshow.base.constanst.Constanst;
+import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
 import com.cooleshow.base.utils.TimeUtils;
 import com.cooleshow.teacher.R;
@@ -77,6 +81,16 @@ public class CourseCommentNoReplyFragment extends BaseMVPFragment<FragmentCourse
                 queryComment(true);
             }
         });
+        mAdapter.setOnItemClickListener(new OnItemClickListener() {
+            @Override
+            public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
+                if (position < mAdapter.getData().size()) {
+                    CourseCommentListBean.RowsBean rowsBean = mAdapter.getData().get(position);
+                    startDetailActivity(rowsBean);
+                }
+            }
+        });
+
 
         mAdapter.getLoadMoreModule().setOnLoadMoreListener(new OnLoadMoreListener() {
             @Override
@@ -92,6 +106,19 @@ public class CourseCommentNoReplyFragment extends BaseMVPFragment<FragmentCourse
         });
     }
 
+    private void startDetailActivity(CourseCommentListBean.RowsBean rowsBean) {
+        if (rowsBean == null) {
+            return;
+        }
+        ARouter.getInstance()
+                .build(RouterPath.CommentCenter.TEACHER_COURSE_COMMENT_DETAIL)
+                .withString(CourseCommentDetailActivity.COURSE_ID, rowsBean.courseId)
+                .withString(CourseCommentDetailActivity.COURSE_GROUP_ID, rowsBean.courseGoupId)
+                .withString(CourseCommentDetailActivity.STUDENT_ID, rowsBean.userId)
+                .navigation();
+
+    }
+
     /**
      * 构造筛选条件
      *

+ 219 - 0
teacher/src/main/res/layout/activity_course_comment_detail_layout.xml

@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <include
+        android:id="@+id/toolbar_include"
+        layout="@layout/common_toolbar_layout" />
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:id="@+id/cs_course_info"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="14dp"
+        android:layout_marginTop="12dp"
+        android:layout_marginEnd="14dp"
+        android:background="@drawable/bg_white_10dp"
+        android:paddingStart="11dp"
+        android:paddingEnd="11dp"
+        android:paddingBottom="20dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/toolbar_include">
+
+        <ImageView
+            android:id="@+id/iv_clock_icon"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="11dp"
+            android:src="@drawable/icon_clock"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <TextView
+            android:id="@+id/tv_time"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="6dp"
+            android:includeFontPadding="false"
+            android:textColor="@color/color_666666"
+            android:textSize="@dimen/sp_13"
+            app:layout_constraintBottom_toBottomOf="@+id/iv_clock_icon"
+            app:layout_constraintLeft_toRightOf="@+id/iv_clock_icon"
+            app:layout_constraintTop_toTopOf="@+id/iv_clock_icon"
+            tools:text="2021/09/17 14:00~14:25" />
+
+        <View
+            android:id="@+id/view_line"
+            android:layout_width="0dp"
+            android:layout_height="1dp"
+            android:layout_marginTop="10dp"
+            android:background="@color/color_f2f2f2"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/iv_clock_icon" />
+
+        <com.cooleshow.base.widgets.QMUIRadiusImageView
+            android:id="@+id/iv_avatar"
+            android:layout_width="47dp"
+            android:layout_height="51dp"
+            android:layout_marginTop="17dp"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/view_line"
+            app:qmui_corner_radius="5dp" />
+
+        <TextView
+            android:id="@+id/tv_title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="10dp"
+            android:includeFontPadding="false"
+            android:textColor="@color/color_1a1a1a"
+            android:textSize="@dimen/sp_16"
+            android:textStyle="bold"
+            app:layout_constraintBottom_toTopOf="@+id/tv_course_name"
+            app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
+            app:layout_constraintTop_toTopOf="@+id/iv_avatar"
+            app:layout_constraintVertical_chainStyle="packed"
+            tools:text="张豆豆" />
+
+
+        <TextView
+            android:id="@+id/tv_course_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="8dp"
+            android:background="@drawable/shape_couse_type_text_bg"
+            android:gravity="center"
+            android:includeFontPadding="false"
+            android:paddingStart="4dp"
+            android:paddingTop="2dp"
+            android:paddingEnd="4dp"
+            android:paddingBottom="2dp"
+            android:textColor="@color/color_ff8c00"
+            android:textSize="@dimen/sp_11"
+            app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
+            app:layout_constraintLeft_toLeftOf="@+id/tv_title"
+            app:layout_constraintTop_toBottomOf="@+id/tv_title"
+            tools:text="单簧管" />
+
+
+        <TextView
+            android:id="@+id/tv_course_status"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textColor="@color/color_999999"
+            android:textSize="@dimen/sp_14"
+            app:layout_constraintBottom_toTopOf="@+id/view_line"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toTopOf="parent"
+            tools:text="未开始" />
+
+
+    </androidx.constraintlayout.widget.ConstraintLayout>
+
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:id="@+id/cs_content"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="14dp"
+        android:layout_marginTop="12dp"
+        android:layout_marginEnd="14dp"
+        android:background="@drawable/bg_white_10dp"
+        android:paddingBottom="10dp"
+        app:layout_constraintTop_toBottomOf="@+id/cs_course_info">
+
+        <View
+            android:id="@+id/view_title_line"
+            android:layout_width="4dp"
+            android:layout_height="14dp"
+            android:layout_marginStart="12dp"
+            android:layout_marginTop="13dp"
+            android:background="@drawable/shape_course_title_tag_bg"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <TextView
+            android:id="@+id/tv_teacher_appraisal_title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:includeFontPadding="false"
+            android:paddingStart="5dp"
+            android:text="老师评价"
+            android:textColor="@color/color_1a1a1a"
+            android:textSize="@dimen/sp_13"
+            app:layout_constraintBottom_toBottomOf="@+id/view_title_line"
+            app:layout_constraintLeft_toRightOf="@+id/view_title_line"
+            app:layout_constraintTop_toTopOf="@+id/view_title_line" />
+
+        <TextView
+            android:id="@+id/tv_set_teacher_comment"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:drawableLeft="@drawable/icon_edit_appraisal"
+            android:drawablePadding="3dp"
+            android:includeFontPadding="false"
+            android:paddingEnd="11dp"
+            android:text="@string/appraisal_str"
+            android:textColor="@color/color_2dc7aa"
+            android:textSize="@dimen/sp_14"
+            android:visibility="invisible"
+            app:layout_constraintBottom_toBottomOf="@+id/view_title_line"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toTopOf="@+id/view_title_line" />
+
+        <FrameLayout
+            android:id="@+id/view_content_bg"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="11dp"
+            android:layout_marginTop="11dp"
+            android:layout_marginEnd="11dp"
+            android:background="@drawable/shape_bg_f7f8f9_4dp"
+            android:minHeight="88dp"
+            android:padding="11dp"
+            app:layout_constraintTop_toBottomOf="@+id/view_title_line">
+
+            <TextView
+                android:id="@+id/tv_teacher_appraisal_empty_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:drawableLeft="@drawable/icon_teacher_appraisal_empty"
+                android:drawablePadding="8dp"
+                android:gravity="center_vertical"
+                android:text="课程结束之后记得对学员的\n表现进行评价哦!"
+                android:textColor="@color/color_999999"
+                android:textSize="@dimen/sp_13" />
+
+            <TextView
+                android:id="@+id/tv_teacher_appraisal_content"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:includeFontPadding="false"
+                android:textColor="@color/color_333333"
+                android:textSize="@dimen/sp_13"
+                android:visibility="gone"
+                tools:text="每个音的指法比较熟练,但是遇到指法变换比较频繁的小节熟练度不足,建议平时可以选择指法变换较大的曲目多加练习!" />
+        </FrameLayout>
+    </androidx.constraintlayout.widget.ConstraintLayout>
+
+
+    <TextView
+        android:id="@+id/tv_submit"
+        android:layout_width="match_parent"
+        android:layout_height="44dp"
+        android:layout_marginStart="27dp"
+        android:layout_marginTop="25dp"
+        android:layout_marginEnd="27dp"
+        android:background="@drawable/shape_login_bt_bg"
+        android:gravity="center"
+        android:text="@string/submit_comment_str"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_18"
+        android:visibility="gone"
+        app:layout_constraintTop_toBottomOf="@+id/cs_content" />
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 1 - 0
teacher/src/main/res/values/strings.xml

@@ -14,4 +14,5 @@
     <string name="set_homework_str">布置作业</string>
     <string name="comment_str">点评</string>
     <string name="submit_action_str">提交</string>
+    <string name="submit_comment_str">提交评价</string>
 </resources>