no message
This commit is contained in:
parent
5d10205abb
commit
a7bdfe9af7
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue