From 288d1f39b7a040bdec52671a884caa2591eca367 Mon Sep 17 00:00:00 2001 From: Amal Udjir Date: Fri, 9 May 2025 16:52:35 +0700 Subject: [PATCH] update count down --- app/Http/Controllers/PHP/PHPController.php | 56 ++++++++-- iclop.sql | 102 +++++------------ .../php/student/material/index.blade.php | 28 ++--- .../student/material/topics_detail.blade.php | 105 ++++++++++++++++-- .../task/form_submission_task.blade.php | 48 +++++++- routes/php_routes.php | 3 +- 6 files changed, 223 insertions(+), 119 deletions(-) diff --git a/app/Http/Controllers/PHP/PHPController.php b/app/Http/Controllers/PHP/PHPController.php index 3aeabd1..eba046a 100644 --- a/app/Http/Controllers/PHP/PHPController.php +++ b/app/Http/Controllers/PHP/PHPController.php @@ -13,7 +13,7 @@ use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\File; -use Illuminate\Support\Facades\Session; +use Illuminate\Support\Facades\Session; class PHPController extends Controller{ public function index(){ @@ -30,9 +30,11 @@ public function index(){ } function php_material_detail(){ - $phpid = isset($_GET['phpid']) ? $_GET['phpid'] : ''; - $start = isset($_GET['start']) ? $_GET['start'] : ''; - $type = isset($_GET['type']) ? $_GET['type'] : ''; + $mulai = Session::put('mulai', $_GET['mulai']); + $phpid = isset($_GET['phpid']) ? $_GET['phpid'] : ''; + $start = isset($_GET['start']) ? $_GET['start'] : ''; + $type = isset($_GET['type']) ? $_GET['type'] : ''; + $materi = isset($_GET['materi']) ? $_GET['materi'] : ''; $results = DB::select("select * from php_topics_detail where id_topics = $phpid and id ='$start' "); @@ -62,6 +64,7 @@ function php_material_detail(){ 'row' => $detail, 'topics' => $topics, 'phpid' => $phpid, + 'materi' => $materi, 'html_start' => $html_start, 'pdf_reader' => $pdf_reader , 'topicsCount' => $topicsCount , @@ -98,6 +101,7 @@ function send_task(){ $phpid = isset($_GET['phpid']) ? $_GET['phpid'] : ''; $task = isset($_GET['task']) ? $_GET['task'] : ''; $type = isset($_GET['type']) ? $_GET['type'] : ''; + $materi = isset($_GET['materi']) ? $_GET['materi'] : ''; $task_db = DB::table('php_task') ->where('id_topics', $phpid) @@ -125,6 +129,7 @@ function send_task(){ 'row' => $detail, 'topics' => $topics, 'phpid' => $phpid, + 'materi' => $materi, 'html_start' => $html_start, 'pdf_reader' => $pdf_reader , 'detailCount' => $persen, @@ -142,9 +147,13 @@ function php_admin(){ } function task_submission(Request $request){ - $phpid = $_POST['phpid']; - $type = $_POST['type']; - $task_id = $_POST['testing_number_one']; + $phpid = $_POST['phpid']; + $type = $_POST['type']; + $task_id = $_POST['testing_number_one']; + $materi = $_POST['materi']; + $time_left = $_POST['time_left']; + + $file = $request->file('file'); //$file_name = Auth::user()->name.'_'.$file->getClientOriginalName(); @@ -179,12 +188,36 @@ function task_submission(Request $request){ DB::insert("insert into php_user_submits(userid) values ('$val')"); $fileContent = file_get_contents($path); - + $email = Auth::user()->email; + $date = date('Y-m-d'); + $fileContent = str_replace("'", '"', $fileContent); + if($_POST['testing_number_one'] == 1){ $testing_number_one = "testing_number_one"; + $time_start = "10:00:00"; + $start = new \DateTime($time_start); + $end = new \DateTime($time_left); + $diff = $start->diff($end); + $minutes = $diff->i; + $seconds = $diff->s; + $interval = new \DateInterval("PT{$minutes}M{$seconds}S"); + $start->add($interval); + $end_time = $start->format('H:i:s'); }elseif($_POST['testing_number_one'] == 2){ + $check_sq = DB::select("SELECT * FROM php_submits_submission where email = '$email' and testing_type = 'testing_number_one' and id_materi = '$materi' order by id desc limit 1"); + if(count($check_sq) > 0){ + $time_start = $check_sq[0]->time_end; + $start = new \DateTime($time_start); + $end = new \DateTime($time_left); + $diff = $start->diff($end); + $minutes = $diff->i; + $seconds = $diff->s; + $interval = new \DateInterval("PT{$minutes}M{$seconds}S"); + $start->add($interval); + $end_time = $start->format('H:i:s'); + } $testing_number_one = "testing_number_two"; }elseif($_POST['testing_number_one'] == 3){ $testing_number_one = "testing_number_three"; @@ -196,9 +229,10 @@ function task_submission(Request $request){ $testing_number_one = "testing_number_six"; } - $fileContent = str_replace("'", '"', $fileContent); - DB::select("insert into php_submits_submission(task_id,task_topics,task_no,testing_type,username,userfile,ket) values ('$task_id','$phpid','$type','$testing_number_one','$val','$file_name','$fileContent')"); - return redirect("/php/send-task?phpid=$phpid&task=$task_id&type=$type")->with('status', 'File Successfully Uploaded!'); + + DB::select("insert into php_submits_submission(id_materi,task_id,task_topics,task_no,testing_type,username,userfile,ket,email,time_start,created_at,time_end)values + ('$materi','$task_id','$phpid','$type','$testing_number_one','$val','$file_name','$fileContent','$email','$time_start','$date','$end_time')"); + return redirect("/php/send-task?phpid=$phpid&task=$task_id&type=$type&materi=$materi")->with('status', 'File Successfully Uploaded!'); } function task_submission_(Request $request){ diff --git a/iclop.sql b/iclop.sql index d21aa0d..47f5a3a 100644 --- a/iclop.sql +++ b/iclop.sql @@ -1,17 +1,17 @@ /* - Navicat Premium Data Transfer + Navicat Premium Dump SQL - Source Server : baru + Source Server : LocalHost Source Server Type : MySQL - Source Server Version : 100425 (10.4.25-MariaDB) + Source Server Version : 100432 (10.4.32-MariaDB) Source Host : localhost:3306 Source Schema : iclop Target Server Type : MySQL - Target Server Version : 100425 (10.4.25-MariaDB) + Target Server Version : 100432 (10.4.32-MariaDB) File Encoding : 65001 - Date: 09/05/2025 05:12:22 + Date: 09/05/2025 16:51:28 */ SET NAMES utf8mb4; @@ -52020,7 +52020,7 @@ CREATE TABLE `exercise_student_submits_view` ( `singletestcode` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, `checkstat` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `report` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, - `created_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, + `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP, `exerciseid` int NULL DEFAULT NULL, `validation_time` int NULL DEFAULT NULL, `projectfile` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, @@ -52419,7 +52419,7 @@ CREATE TABLE `failed_jobs` ( `queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `failed_at` timestamp NOT NULL DEFAULT current_timestamp, + `failed_at` timestamp NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC; @@ -86856,7 +86856,7 @@ CREATE TABLE `iaeng` ( `checkstat` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `checkresult` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, `validation_time` int NULL DEFAULT NULL, - `created_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP + `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; -- ---------------------------- @@ -86894,7 +86894,7 @@ CREATE TABLE `jplas_results` ( `filename` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `filepath` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `comment` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, - `created_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, + `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 324 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC; @@ -87231,7 +87231,7 @@ CREATE TABLE `jplas_topics` ( `name` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `packfile` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `docfile` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, - `created_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, + `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC; @@ -87580,7 +87580,7 @@ CREATE TABLE `php_submits_submission` ( `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, `testing_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, - `tipe` enum('github','zip','file') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `tipe` enum('github','zip','file') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'file', `userfile` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `ket` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL, `status_testing` int NULL DEFAULT NULL, @@ -87591,7 +87591,7 @@ CREATE TABLE `php_submits_submission` ( PRIMARY KEY (`id`) USING BTREE, INDEX `user_id`(`task_id` ASC) USING BTREE, INDEX `android_topic_id`(`testing_type` ASC) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 311 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC; +) ENGINE = InnoDB AUTO_INCREMENT = 337 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of php_submits_submission @@ -87836,60 +87836,8 @@ INSERT INTO `php_submits_submission` VALUES (252, 10, 6, 12, 1, NULL, 'leonardo. INSERT INTO `php_submits_submission` VALUES (253, 10, 6, 12, 1, NULL, 'jimmyjonshon@gmail.com', 'testing_number_six', 'file', 'GuideA6.php', NULL, 1, '11:02:30', '11:26:30', '2024-05-31', NULL); INSERT INTO `php_submits_submission` VALUES (254, 10, 6, 12, 1, NULL, 'richardsoegiarto@gmail.com', 'testing_number_six', 'file', 'GuideA6.php', NULL, 1, '10:57:07', '11:11:55', '2024-05-31', NULL); INSERT INTO `php_submits_submission` VALUES (255, 10, 6, 12, 1, NULL, 'amaludjir@gmail.com', 'testing_number_six', 'file', 'GuideA6.php', NULL, 1, '10:57:34', '11:09:48', '2024-05-31', NULL); -INSERT INTO `php_submits_submission` VALUES (257, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (258, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '\r\n\r\n\r\nBelajar Membuat Heading dan Paragraph\r\n\r\n\r\n

Heading ke-1

\r\n

Heading ke-2

\r\n

Heading ke-3

\r\n

Heading ke-4

\r\n
Heading ke-5
\r\n
Heading ke-6
\r\n

ini contoh paragraph

\r\n\r\n\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (259, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (260, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '\r\n\r\n\r\nBelajar Membuat Heading dan Paragraph\r\n\r\n\r\n

Heading ke-1

\r\n

Heading ke-2

\r\n

Heading ke-3

\r\n

Heading ke-4

\r\n
Heading ke-5
\r\n
Heading ke-6
\r\n

ini contoh paragraph

\r\n\r\n\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (261, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (262, NULL, 1, 13, 2, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'form_insert.php', '\r\n\r\n\r\n \r\n \r\n Formulir Pendaftaran\r\n\r\n\r\n

Formulir Pendaftaran Mahasiswa

\r\n
\r\n \r\n

\r\n\r\n \r\n

\r\n\r\n \r\n

\r\n\r\n \r\n
\r\n\r\n\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (263, NULL, 1, 14, 2, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'koneksi.php', 'connect_error) {\r\n die(\"Koneksi gagal: \" . $conn->connect_error);\r\n}\r\n\r\n?>\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (264, NULL, 3, 14, 2, 'Amal Dermawan Udjir', NULL, 'testing_number_three', 'github', 'insert.php', 'connect_error) {\r\ndie(\"Connection failed: \" . $conn->connect_error);\r\n}\r\n\r\n$name = $_POST[\"nama\"];\r\n$email = $_POST[\"email\"];\r\n$prodi = $_POST[\"prodi\"];\r\n\r\n\r\n$sql = \"INSERT INTO users (name, email, prodi) VALUES ( \"$name\", \"$email\", \"$prodi\")\";\r\n\r\nif ($conn->query($sql) === TRUE) {\r\necho \"New record created successfully\";\r\n} else {\r\necho \"Error: \" . $sql . \"
\" . $conn->error;\r\n}\r\n\r\n$conn->close();\r\n?>\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (265, NULL, 4, 14, 2, 'Amal Dermawan Udjir', NULL, 'testing_number_four', 'github', 'update.php', 'connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n}\r\n\r\n\r\n// Mengambil data berdasarkan ID\r\nif (isset($_GET[\"id\"])) {\r\n $id = $_GET[\"id\"];\r\n $query = \"SELECT * FROM users WHERE id = \"$id\"\";\r\n $result = $conn->query($query);\r\n \r\n if ($row = $result->fetch_assoc()) {\r\n $name = $row[\"name\"];\r\n $email = $row[\"email\"];\r\n $prodi = $row[\"prodi\"];\r\n }\r\n}\r\n\r\n// Proses update data\r\nif (isset($_POST[\"update\"])) {\r\n $id = $_POST[\"id\"];\r\n $name = $_POST[\"nama\"];\r\n $email = $_POST[\"email\"];\r\n $prodi = $_POST[\"prodi\"];\r\n\r\n $sql = \"UPDATE users SET name = \"$name\", email = \"$email\", prodi = \"$prodi\" WHERE id = \"$id\"\";\r\n\r\n if ($conn->query($sql) === TRUE) {\r\n echo \"Data berhasil diperbarui! Kembali ke daftar mahasiswa\";\r\n } else {\r\n echo \"Error: \" . $sql . \"
\" . $conn->error;\r\n }\r\n}\r\n?>\r\n\r\n\r\n\r\n\r\n \r\n \r\n Formulir Update Mahasiswa\r\n\r\n\r\n

Formulir Update Mahasiswa

\r\n
\r\n \">\r\n\r\n \r\n \" required>

\r\n\r\n \r\n \" required>

\r\n\r\n \r\n

\r\n\r\n \r\n
\r\n\r\n\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (266, NULL, 2, 14, 2, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'index.php', 'connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n}\r\n\r\n$sql = \"SELECT * FROM users\";\r\n$result = $conn->query($sql);\r\n\r\nif ($result->num_rows > 0) {\r\n echo \"Insert Data
\";\r\n echo \"\";\r\n echo \"\r\n \r\n \r\n \r\n \r\n \r\n \";\r\n\r\n while ($row = $result->fetch_assoc()) {\r\n echo \"\";\r\n echo \"\";\r\n echo \"\";\r\n echo \"\";\r\n echo \"\";\r\n echo \"\";\r\n echo \"\";\r\n }\r\n\r\n echo \"
NameEmailstudy programByAction
\" . $row[\"name\"] . \"\" . $row[\"email\"] . \"\" . $row[\"prodi\"] . \"\" . $row[\"username\"] . \"Edit | Delete
\";\r\n} else {\r\n echo \"Insert Data
\";\r\n echo \"0 results\";\r\n}\r\n\r\n?>\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (267, NULL, 5, 14, 2, 'Amal Dermawan Udjir', NULL, 'testing_number_five', 'github', 'delete.php', 'connect_error) {\r\ndie(\"Connection failed: \" . $conn->connect_error);\r\n}\r\n\r\n$id = $_GET[\"id\"];\r\n$sql = \"DELETE FROM users WHERE id = $id\";\r\n\r\n\r\nif ($conn->query($sql) === TRUE) {\r\necho \"Record deleted successfully\";\r\n} else {\r\necho \"Error: \" . $sql . \"
\" . $conn->error;\r\n}\r\n\r\n$conn->close();\r\n?>\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (268, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (269, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (270, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (271, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (272, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (273, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (274, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (275, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (276, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (277, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (278, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (279, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (280, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (281, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (282, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (283, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (284, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (285, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (286, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (287, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (288, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (289, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (290, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (291, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '\r\n\r\n\r\nBelajar Membuat Heading dan Paragraph\r\n\r\n\r\n

Heading ke-1

\r\n

Heading ke-2

\r\n

Heading ke-3

\r\n

Heading ke-4

\r\n
Heading ke-5
\r\n
Heading ke-6
\r\n

ini contoh paragraph

\r\n\r\n\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (292, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '\r\n\r\n\r\nBelajar Membuat Heading dan Paragraph\r\n\r\n\r\n

Heading ke-2

\r\n

Heading ke-2

\r\n

Heading ke-3

\r\n

Heading ke-4

\r\n
Heading ke-5
\r\n
Heading ke-6
\r\n

ini contoh paragraph

\r\n\r\n\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (293, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '\r\n\r\n\r\nBelajar Membuat Heading dan Paragraph\r\n\r\n\r\nHeading ke-1\";\r\necho $h1;\r\n?>\r\n

Heading ke-2

\r\n

Heading ke-3

\r\n

Heading ke-4

\r\n
Heading ke-5
\r\n
Heading ke-6
\r\n

ini contoh paragraph

\r\n\r\n\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (294, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (295, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '\r\n\r\n\r\nBelajar Membuat Heading dan Paragraph\r\n\r\n\r\nHeading ke-1\";\r\necho $h1;\r\n?>\r\n

Heading ke-2

\r\n

Heading ke-3

\r\n

Heading ke-4

\r\n
Heading ke-5
\r\n
Heading ke-6
\r\n

ini contoh paragraph

\r\n\r\n\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (296, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '\r\n\r\n\r\nBelajar Membuat Heading dan Paragraph\r\n\r\n\r\nHeading ke-1\";\r\necho $h1;\r\n?>\r\n

Heading ke-2

\r\n

Heading ke-3

\r\n

Heading ke-4

\r\n
Heading ke-5
\r\n
Heading ke-6
\r\n

ini contoh paragraph

\r\n\r\n\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (297, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '\r\n\r\n\r\nBelajar Membuat Heading dan Paragraph\r\n\r\n\r\nHeading ke-1\";\r\necho $h1;\r\n?>\r\n

Heading ke-2

\r\n

Heading ke-3

\r\n

Heading ke-4

\r\n
Heading ke-5
\r\n
Heading ke-6
\r\n

ini contoh paragraph

\r\n\r\n\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (298, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '\r\n\r\n\r\nBelajar Membuat Heading dan Paragraph\r\n\r\n\r\nHeading ke-1\";\r\necho $h1;\r\n?>\r\n

Heading ke-2

\r\n

Heading ke-3

\r\n

Heading ke-4

\r\n
Heading ke-5
\r\n
Heading ke-6
\r\n

ini contoh paragraph

\r\n\r\n\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (299, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (300, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '\r\n\r\n\r\nBelajar Membuat Heading dan Paragraph\r\n\r\n\r\nHeading ke-1\";\r\necho $h1;\r\n?>\r\n

Heading ke-2

\r\n

Heading ke-3

\r\n

Heading ke-4

\r\n
Heading ke-5
\r\n
Heading ke-6
\r\n

ini contoh paragraph

\r\n\r\n\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (301, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '\r\n\r\n\r\nBelajar Membuat Heading dan Paragraph\r\n\r\n\r\nHeading ke-1\";\r\necho $h1;\r\n?>\r\n

Heading \r\n ke-2

\r\n

Heading ke-3

\r\n

Heading ke-4

\r\n
Heading ke-5
\r\n
Heading ke-6
\r\n

ini contoh paragraph

\r\n\r\n\r\n', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (302, NULL, 3, 9, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_three', 'github', 'GuideA3.php', '\";\r\necho \"Umur : $umur
\";\r\necho \"Tinggi : $tinggi
\";\r\necho \"Aktif : $aktif
\";\r\necho \"Gaji Pokok : $gaji_pokok
\";\r\necho \"Gaji Bulanan : $gaji_bulanan
\";\r\necho \"Gaji Per Tahun : $gaji_per_tahun
\";\r\necho \"PPN : $ppn
\";\r\necho \"Gaji Setelah PPN : $gaji_setelah_ppn
\";', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (303, NULL, 3, 9, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_three', 'github', 'GuideA3.php', '\";\r\necho \"Umur : $umur
\";\r\necho \"Tinggi : $tinggi
\";\r\necho \"Aktif : $aktif
\";\r\necho \"Gaji Pokok : $gaji_pokok
\";\r\necho \"Gaji Bulanan : $gaji_bulanan
\";\r\necho \"Gaji Per Tahun : $gaji_per_tahun
\";\r\necho \"PPN : $ppn
\";\r\necho \"Gaji Setelah PPN : $gaji_setelah_ppn
\";\r\n\r\n?>', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (304, NULL, 3, 9, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_three', 'github', 'GuideA3.php', '\";\r\necho \"Umur : $umur
\";\r\necho \"Tinggi : $tinggi
\";\r\necho \"Aktif : $aktif
\";\r\necho \"Gaji Pokok : \r\n$gaji_pokok
\";\r\necho \"Gaji Bulanan : $gaji_bulanan
\";\r\necho \"Gaji Per Tahun : $gaji_per_tahun
\";\r\necho \"PPN : $ppn
\";\r\necho \"Gaji Setelah PPN : $gaji_setelah_ppn
\";\r\n\r\n?>', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (305, NULL, 3, 9, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_three', 'github', 'GuideA3.php', '\";\r\necho \"Umur : $umur
\";\r\necho \"Tinggi : $tinggi
\";\r\necho \"Aktif : $aktif
\";\r\necho \"Gaji Pokok : $gaji_pokok
\";\r\necho \"Gaji Bulanan : $gaji_bulanan
\";\r\necho \"Gaji Per Tahun : $gaji_per_tahun
\";\r\necho \"PPN : $ppn
\";\r\necho \"Gaji Setelah PPN : $gaji_setelah_ppn
\";\r\n\r\n?>', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (306, NULL, 3, 9, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_three', 'github', 'GuideA3.php', '\";\r\necho \"Umur : $umur
\";\r\necho \"Tinggi : $tinggi
\";\r\necho \"Aktif : $aktif
\";\r\necho \"Gaji Pokok : $gaji_pokok
\";\r\necho \"Gaji Bulanan : $gaji_bulanan
\";\r\necho \"Gaji Per Tahun : $gaji_per_tahun
\";\r\necho \"PPN : $ppn
\";\r\necho \"Gaji Setelah PPN : $gaji_setelah_ppn
\";\r\n\r\n?>', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (307, NULL, 4, 10, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_four', 'github', 'GuideA4.php', '= 70) {\r\n echo \"Nilai Anda: \" . $nilai . \"
\";\r\n echo \"Anda lulus!\";\r\n}\r\n\r\necho \"

\";\r\n$nilai = 55;\r\nif ($nilai >= 70) {\r\n echo \"Nilai Anda: \" . $nilai . \"
\";\r\n echo \"Anda lulus!\";\r\n} else {\r\n echo \"Nilai Anda:\".$nilai.\"
\";\r\n echo \"Anda tidak lulus.\";\r\n}\r\n\r\necho \"

\";\r\n$nilai = \"B\";\r\nswitch ($nilai){\r\n case \"A\":\r\n echo \"Nilai Anda: \" . $nilai . \"
\";\r\n echo \"Pertahankan prestasi!\";\r\n break;\r\n case \"B\":\r\n echo \"Nilai Anda: \" . $nilai . \"
\";\r\n echo \"Cukup baik, terus tingkatkan!\";\r\n break;\r\n case \"C\":\r\n echo \"Nilai Anda: \" . $nilai . \"
\";\r\n echo \"Perlu lebih banyak belajar.\";\r\n break;\r\n default:\r\n echo \"Nilai Anda: \" . $nilai . \"
\";\r\n echo \"Maaf, tidak ada keterangan.\";\r\n}\r\n?>', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (308, NULL, 5, 11, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_five', 'github', 'GuideA5.php', '\";\r\nwhile ($angka <= 5) {\r\n echo \"Angka: $angka
\";\r\n $angka++;\r\n}\r\necho \"
\";\r\n\r\necho \"Perulangan for:
\";\r\nfor ($i = 1; $i <= 5; $i++) {\r\n echo \"Angka: $i
\";\r\n}\r\necho \"
\";\r\n\r\n$angka = 1;\r\necho \"Perulangan do-while:
\";\r\ndo {\r\n echo \"Angka: $angka
\";\r\n $angka++;\r\n} while ($angka <= 5);\r\n\r\n?>', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (309, NULL, 6, 12, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_six', 'github', 'GuideA6.php', '\";\r\necho \"Status kedua: \" . ($status[1] ? \"Aktif\" : \"Tidak Aktif\") . \"
\";\r\n\r\n$bilangan[] = 6;\r\nunset($nama[0]);\r\n\r\n$posisi = array_search(\"Doe\", $nama);\r\necho \"Posisi Nama Doe Terletak Pada Array Ke : \". $posisi . \"
\";;\r\n\r\n$jumlah_nama = count($nama);\r\necho \"Jumlah Nama Pada Array Adalah : \". $jumlah_nama . \"
\";\r\n\r\narray_push($nama, \"Smith\");\r\n$elemen_terakhir = array_pop($nama);\r\necho \"Elemen baru ditambahkan ke Array adalah : \". $elemen_terakhir . \"
\";\r\n?>', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `php_submits_submission` VALUES (310, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '\r\n\r\n\r\nBelajar Membuat Heading dan Paragraph\r\n\r\n\r\nHeading ke-1\";\r\necho $h1;\r\n?>\r\n

Heading \r\n ke-2

\r\n

Heading ke-3

\r\n

Heading ke-4

\r\n
Heading ke-5
\r\n
Heading ke-6
\r\n

ini contoh paragraph

\r\n\r\n\r\n', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `php_submits_submission` VALUES (335, 10, 1, 7, 1, 'Amal Dermawan Udjir', 'amaludjir@gmail.com', 'testing_number_one', 'file', 'Test1.php', '\r\n\r\n\r\nBelajar Membuat Heading dan Paragraph\r\n\r\n\r\n

Heading ke-1

\r\n

Heading ke-2

\r\n

Heading ke-3

\r\n

Heading ke-4

\r\n
Heading ke-5
\r\n
Heading ke-6
\r\n

ini contoh paragraph

\r\n\r\n', 0, '10:00:00', '10:35:39', '2025-05-09', NULL); +INSERT INTO `php_submits_submission` VALUES (336, 10, 1, 7, 1, 'Amal Dermawan Udjir', 'amaludjir@gmail.com', 'testing_number_one', 'file', 'Test1.php', '\r\n\r\n\r\nBelajar Membuat Heading dan Paragraph\r\n\r\n\r\n

Heading ke-1

\r\n

Heading ke-2

\r\n

Heading ke-3

\r\n

Heading ke-4

\r\n
Heading ke-5
\r\n
Heading ke-6
\r\n

ini contoh paragraph

\r\n\r\n', NULL, '10:00:00', '10:42:54', '2025-05-09', NULL); -- ---------------------------- -- Table structure for php_task @@ -87944,7 +87892,7 @@ CREATE TABLE `php_testing_rule` ( -- ---------------------------- -- Records of php_testing_rule -- ---------------------------- -INSERT INTO `php_testing_rule` VALUES (1, ' Belajar Membuat Heading dan Paragraph Heading ke-1\"; echo $h1; ?>

Heading ke-2

Heading ke-3

Heading ke-4

Heading ke-5
Heading ke-6

ini contoh paragraph

', '1', 'testing_number_one'); +INSERT INTO `php_testing_rule` VALUES (1, '\r\n\r\n\r\nBelajar Membuat Heading dan Paragraph\r\n\r\n\r\n

Heading ke-1

\r\n

Heading ke-2

\r\n

Heading ke-3

\r\n

Heading ke-4

\r\n
Heading ke-5
\r\n
Heading ke-6
\r\n

ini contoh paragraph

\r\n\r\n', '1', 'testing_number_one'); INSERT INTO `php_testing_rule` VALUES (2, '', '9', 'testing_number_two'); INSERT INTO `php_testing_rule` VALUES (3, '\";\r\necho \"Umur : $umur
\";\r\necho \"Tinggi : $tinggi
\";\r\necho \"Aktif : $aktif
\";\r\necho \"Gaji Pokok : $gaji_pokok
\";\r\necho \"Gaji Bulanan : $gaji_bulanan
\";\r\necho \"Gaji Per Tahun : $gaji_per_tahun
\";\r\necho \"PPN : $ppn
\";\r\necho \"Gaji Setelah PPN : $gaji_setelah_ppn
\";\r\n\r\n?>', 'Nama : Ali Akbar\r\nUmur : 20\r\nTinggi : 172.5\r\nAktif : 1\r\nGaji Pokok : 1000000\r\nGaji Bulanan : 500000\r\nGaji Per Tahun : 6000000\r\nPPN : 600000\r\nGaji Setelah PPN : 5400000', 'testing_number_three'); INSERT INTO `php_testing_rule` VALUES (4, 'php_testing_rule', NULL, 'testMethodPOST'); @@ -88117,8 +88065,8 @@ CREATE TABLE `python_feedback` ( `id_topik` int NOT NULL, `id_percobaan` int NOT NULL, `comment` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, - `created_at` timestamp NOT NULL DEFAULT current_timestamp, - `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id_feedback`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 653 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC; @@ -88783,8 +88731,8 @@ CREATE TABLE `python_percobaan` ( `filetest` varchar(200) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, `deskripsi` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `texteditor` longtext CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL, - `created_at` timestamp NULL DEFAULT current_timestamp, - `updated_at` timestamp NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, + `created_at` timestamp NULL DEFAULT current_timestamp(), + `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id_percobaan`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC; @@ -88819,8 +88767,8 @@ CREATE TABLE `python_students_submit` ( `userid` int NOT NULL, `checkstat` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, `checkresult` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, - `created_at` timestamp NOT NULL DEFAULT current_timestamp, - `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id_submit`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 901 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC; @@ -89669,8 +89617,8 @@ CREATE TABLE `python_students_validation` ( `time` int NULL DEFAULT NULL, `report` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, `file_submitted` varchar(70) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, - `create_at` timestamp NOT NULL DEFAULT current_timestamp, - `update_at` timestamp NOT NULL DEFAULT current_timestamp, + `create_at` timestamp NOT NULL DEFAULT current_timestamp(), + `update_at` timestamp NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`id_validation`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 688 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC; @@ -90328,8 +90276,8 @@ CREATE TABLE `python_topics` ( `nama` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, `deskripsi` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, `status` tinyint NOT NULL DEFAULT 1, - `created_at` timestamp NULL DEFAULT current_timestamp, - `updated_at` timestamp NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, + `created_at` timestamp NULL DEFAULT current_timestamp(), + `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id_topik`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC; diff --git a/resources/views/php/student/material/index.blade.php b/resources/views/php/student/material/index.blade.php index 435538b..bfa3198 100644 --- a/resources/views/php/student/material/index.blade.php +++ b/resources/views/php/student/material/index.blade.php @@ -557,6 +557,8 @@ + + Memiliki {{ $topicsCount }} materi yang akan dibahas secara detail @@ -622,26 +624,16 @@ function materialDetailPage() { let title = $("#title").val(); let controller = $("#controller").val(); let type = $("#type").val(); - window.location.href = "{{ route('php_material_detail') }}?phpid="+id+"&start="+controller+"&type="+type; + let materi = $("#materi").val(); + let mulai = $("#mulai").val(); + + window.location.href = "{{ route('php_material_detail') }}?phpid="+id+"&start="+controller+"&type="+type+"&materi="+materi+"&mulai="+mulai; - /*$.ajax({ - type: "POST", - data: { - id: id, - title: title, - _token: csrfToken // Menambahkan token CSRF ke dalam data permintaan - }, - dataType: 'html', - url: "{{ route('php_material_detail') }}", - success: function(res) { - - }, - error: function(xhr, status, error) { - console.error("Error:", error); - } - });*/ } - + function resetCountdown() { + localStorage.removeItem('timeEnd'); + location.reload(); + } // Fungsi untuk mengubah warna ikon, teks, dan link menjadi biru function changeColor(id) { var icon = document.getElementById(id + 'Icon'); diff --git a/resources/views/php/student/material/topics_detail.blade.php b/resources/views/php/student/material/topics_detail.blade.php index 937d08c..4cbd154 100644 --- a/resources/views/php/student/material/topics_detail.blade.php +++ b/resources/views/php/student/material/topics_detail.blade.php @@ -176,10 +176,21 @@ @@ -251,7 +262,7 @@
- {{ $r->title }} + {{ $r->title }}
@endforeach @@ -292,7 +303,7 @@
- {{ $u->task_name }} + {{ $u->task_name }}
@php @@ -304,12 +315,13 @@ @endforeach - + +
  • Work Results
  • - + @@ -417,11 +429,84 @@ function updateProgress(params) { } }); } - $('#progress').text("@php - $width = session('params'); - echo $width."%"; - @endphp"); + + + diff --git a/resources/views/php/student/task/form_submission_task.blade.php b/resources/views/php/student/task/form_submission_task.blade.php index 0bc526e..819b2ca 100644 --- a/resources/views/php/student/task/form_submission_task.blade.php +++ b/resources/views/php/student/task/form_submission_task.blade.php @@ -59,6 +59,8 @@ + +
    @@ -72,7 +74,7 @@
    - +
    @@ -105,4 +107,46 @@ }); }); - \ No newline at end of file + + diff --git a/routes/php_routes.php b/routes/php_routes.php index b37b4af..a5bdc9e 100644 --- a/routes/php_routes.php +++ b/routes/php_routes.php @@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\Session; +use Illuminate\Support\Facades\Session; Route::group(['middleware' => ['auth', 'student']], function() { Route::prefix('php')->group(function () { @@ -36,6 +36,7 @@ Route::any('edit.php', [PHPController::class, 'edit_student'])->name('edit_student'); Route::any('index.php', [PHPController::class, 'index_student'])->name('index_student'); Route::any('delete.php', [PHPController::class, 'delete_student'])->name('delete_student'); + Route::any('/clearsession', [PHPController::class, 'clearSession'])->name('clearSession'); }); Route::prefix('codeception')->group(function () {