This commit is contained in:
rianbtk 2022-10-08 12:56:37 +07:00
parent d2a19fbfbe
commit 22da6c5bd6
19 changed files with 51 additions and 7 deletions

View File

@ -156,6 +156,8 @@ class ExercisePythonController extends Controller
// 0 -> tidak ada error ([1] = status)
// 0 -> tidak error
if ( $cek_error[1] == 0 ) {
//ambil direktory
@ -164,10 +166,13 @@ class ExercisePythonController extends Controller
$unittest = "C:\\xampp\\htdocs\\iCLOP\\public\\python-resources\\unittest\\". $fileUnittest;
$output = shell_exec("C:\Users\Rania\AppData\Local\Programs\Python\Python310\python.exe".$unittest." ".$packageDirectory." ".$fileName." --verbose 2>&1");
$output = shell_exec("C:\Users\Rania\AppData\Local\Programs\Python\Python310\python.exe ".$unittest." ".$packageDirectory." ".$fileName." --verbose 2>&1");
$validation_detail = "";
$status = "";
// split output
$dataTest = explode("Error", $output);
@ -312,14 +317,13 @@ class ExercisePythonController extends Controller
'userid' => Auth::id()
);
$jmlPercobaanSubmit = DB::table("python_students_submit")->where( $where )->count();
echo json_encode(['status' => $statusSintax, 'data' => $statusPassed, 'jml' => $jmlPercobaanSubmit]);
} else {
echo json_encode(['status' => $statusSintax, 'statusPercobaan' => false, 'data' => $cek_error[0]]);
}
}

View File

@ -0,0 +1,5 @@
# Tuliskan kode program dibawah ini
jumlah = 10
pesanan = "komputer"
print(jumlah)
print(pesanan)

View File

@ -0,0 +1,8 @@
# Tuliskan variabel dibawah ini
umur = 23
def konversi(umur):
#Tuliskan kode program dibawah ini
return str(umur)
print(type(konversi(umur))

View File

@ -0,0 +1,4 @@
# Tuliskan kode program dibawah ini
buah = "Mangga"
jumlah = 6
berat = 1.6

View File

@ -0,0 +1,7 @@
# Tuliskan variabel dibawah ini
nama = "Qorinda "
lengkap = "Yulvarisma"
def hasil(nama, lengkap):
#Tuliskan kode program dibawah ini
return nama+lengkap

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print ("indo")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("indo")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("ok")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("ok")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("ok")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("ok")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("ok")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("ok")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("Hola")

View File

@ -0,0 +1,2 @@
# Tuliskan kode program dibawah ini
print("Indonesia")

View File

@ -757,10 +757,6 @@
dataType: "json",
success: function (response) {
if (response.status == true) {