|
@@ -5,6 +5,7 @@ import android.view.View;
|
|
|
import android.widget.LinearLayout;
|
|
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
+import io.rong.imkit.utils.helper.OpenChatHelper;
|
|
|
|
|
|
import com.cooleshow.base.ui.activity.BaseMVPActivity;
|
|
|
import com.cooleshow.base.utils.GlideUtils;
|
|
@@ -32,6 +33,7 @@ public class SparringCourseDetailActivity extends BaseMVPActivity<ActivitySparri
|
|
|
private String mCourseGroupId;
|
|
|
private String studentId;
|
|
|
private CourseSetCommentDialog mSetCommentDialog;
|
|
|
+ private SparringCourseHomeworkBean mInfoBean;
|
|
|
|
|
|
@NonNull
|
|
|
@Override
|
|
@@ -87,6 +89,7 @@ public class SparringCourseDetailActivity extends BaseMVPActivity<ActivitySparri
|
|
|
if (infoBean == null) {
|
|
|
return;
|
|
|
}
|
|
|
+ this.mInfoBean = infoBean;
|
|
|
//时间
|
|
|
viewBinding.tvCourseTime.setText(infoBean.classDate);
|
|
|
//学生头像
|
|
@@ -266,6 +269,12 @@ public class SparringCourseDetailActivity extends BaseMVPActivity<ActivitySparri
|
|
|
showSetCommentDialog(CourseSetCommentDialog.TYPE_SET_TEACHER_COMMENT);
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
+ if (v.getId() == R.id.iv_go_chat) {
|
|
|
+ if (mInfoBean != null) {
|
|
|
+ OpenChatHelper.goChat(SparringCourseDetailActivity.this, mInfoBean.teacherId, mInfoBean.teacherName);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private void showSetCommentDialog(int typeSetTeacherComment) {
|
|
@@ -273,19 +282,19 @@ public class SparringCourseDetailActivity extends BaseMVPActivity<ActivitySparri
|
|
|
mSetCommentDialog = new CourseSetCommentDialog(this);
|
|
|
mSetCommentDialog.setOnSubmitClickListener(new CourseSetCommentDialog.OnSubmitClickListener() {
|
|
|
@Override
|
|
|
- public void onSubmit(String content,int type) {
|
|
|
+ public void onSubmit(String content, int type) {
|
|
|
//提交
|
|
|
if (type == CourseSetCommentDialog.TYPE_SET_TEACHER_COMMENT) {
|
|
|
//提交老师点评
|
|
|
- presenter.submitSparringCourseComment(content,mCourseId,mCourseGroupId,studentId);
|
|
|
+ presenter.submitSparringCourseComment(content, mCourseId, mCourseGroupId, studentId);
|
|
|
}
|
|
|
if (type == CourseSetCommentDialog.TYPE_SET_HOMEWORK) {
|
|
|
//提交布置作业
|
|
|
- presenter.submitSparringCourseHomework(content,mCourseId);
|
|
|
+ presenter.submitSparringCourseHomework(content, mCourseId);
|
|
|
}
|
|
|
if (type == CourseSetCommentDialog.TYPE_SET_HOMEWORK_COMMENT) {
|
|
|
//提交作业点评
|
|
|
- presenter.submitSparringCourseHomeworkComment(content,mCourseId);
|
|
|
+ presenter.submitSparringCourseHomeworkComment(content, mCourseId);
|
|
|
}
|
|
|
}
|
|
|
});
|