File size: 1,733 Bytes
b55a115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9c9198b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118

attempt:{
    id_event:
    id_exam:
    remaining_time:
    answered_question:[]str
    question
}

question:{
    id:uuid,
    question_type:string,
    content:string,
    options:[]string,
    current_answer:[]string,
}

Answer Soal -> (1) Request ke Backend untuk attempt
               (2) Rubah UI options
               (3) Fetch Status -> show Status
               (4) Set State question.current_answer update
               (5) Update navigation button soalnya sudah keisi = "hijau", sekarang di nomor berapa = "ungu"

# Isian Singkat, Handle onChange => 
[kjkajsksaf]

Before:
def sum(a,b):
    return {code}

print({code})

After :
def sum(a,b):
    return <input type  = "text" name="answer[0]" />

print(<input type  = "text" name="answer[1]" />)

# Puzzle:


#Payload ngirim jawaban (by default) -> Endpoint Ngirim Answer

answer: {
    id_question:uuid,
    answers:[]str
}

#mc
answer: {
    id_question:uuid,
    answers:["A"]str
}


#Complexmc T/F
answer: {
    id_question:uuid,
    answers:[1,0,0,1]
}
+++




++++++++++++
#code_Puzzle

answer: {
    id_question:uuid,
    answers:["a+b","sum(a,b)"]
}

# short_answer
answer: {
    id_question:uuid,
    answers:["jawaban"]
}

# upload_file
upload_file -> Form Data
answer: {
    id_question:uuid,
    answers:["{nama_file}"]
}

#competitive Programming
question_type:mock_coding[language]
upload_file -> Form Data (Generate nama_file)
answer:{
    id_questions:uuid,
    answers:["{nama_file}"]
}

#response answer
response:{
    success_response,
    meta_data{
        verdict:  [AC/WA/TLE/RTE]
        score:
        time_exec:
        memory:
    }
}

#Submit
{
    id_attempt:
}

Attempt{
    id_user:
    id_event:
    id_exam:
}


# Result / Scoreboard