no message

This commit is contained in:
1147192855@qq.com 2024-05-21 14:37:19 +08:00
parent 5d10205abb
commit a7bdfe9af7
3 changed files with 11 additions and 5 deletions

View File

@ -181,7 +181,9 @@ class MarkingTextQuestion extends Object {
bool setImageList(String resImage, int imageIndex) { bool setImageList(String resImage, int imageIndex) {
try { try {
String oldImage = studentAnswerList[imageIndex]; String oldImage = studentAnswerList[imageIndex];
commentImageUrlMap[oldImage] = '$resImage?${DateTime.now().millisecondsSinceEpoch}'; // commentImageUrlMap[oldImage] = 'https:$resImage?${DateTime.now().millisecondsSinceEpoch}';
commentImageUrlMap[oldImage] = 'https:$resImage?${DateTime.now().millisecondsSinceEpoch}';
return true; return true;
} catch (e) { } catch (e) {
return false; return false;

View File

@ -519,9 +519,8 @@ class _ExamPaperDrawingState extends ConsumerState<ExamPaperDrawing> with EventB
if (index + 1 == pointsPureData.length) { if (index + 1 == pointsPureData.length) {
pointsPureData = pointsPureData.sublist(0, index); pointsPureData = pointsPureData.sublist(0, index);
ref.read(drawMarkingProvider.notifier).setState(DrawMarkingVal(ref.read(drawMarkingProvider).data.sublist(0, index), pointsPureData));
index = pointsPureData.toList().lastIndexOf(null); index = pointsPureData.toList().lastIndexOf(null);
index == -1 ? -1 : index + 1; index = index == -1 ? -1 : index + 1;
} }
if (index != -1) { if (index != -1) {
pointsPureData = pointsPureData.sublist(0, index); pointsPureData = pointsPureData.sublist(0, index);

View File

@ -471,8 +471,13 @@ class _MarkingPapersState extends ConsumerState<DoPapers>
RestClient client = await getClient(); RestClient client = await getClient();
String? commentImageUrlStr; String? commentImageUrlStr;
List<String>? commentImageUrl = List<String>? commentImageUrl = (currentQuestion?.commentImageUrl.isNotEmpty ?? false) || res?.url != null
(currentQuestion?.commentImageUrl.isNotEmpty ?? false) || res?.url != null ? currentQuestion?.commentImageUrlMap.values.toList() : null; ? currentQuestion?.commentImageUrlMap.values.map((original) {
String withoutProtocol = original.replaceAll(RegExp(r"https?:"), "");
if (withoutProtocol.contains('?')) withoutProtocol = withoutProtocol.split('?').first;
return withoutProtocol;
}).toList()
: null;
if (commentImageUrl?.isNotEmpty ?? false) commentImageUrlStr = jsonEncode(commentImageUrl); if (commentImageUrl?.isNotEmpty ?? false) commentImageUrlStr = jsonEncode(commentImageUrl);
BaseStructureResult<bool> result = await client.submitTestQuestionsOfExam(SubmitExamParams( BaseStructureResult<bool> result = await client.submitTestQuestionsOfExam(SubmitExamParams(