private void loadAnswer(ListSoal listSoal) { if (listSoal.jenisSoal.ToLower().Equals("pilihan ganda")) { loadAnswerPilGan(listSoal); } else if (listSoal.jenisSoal.ToLower().Equals("melengkapi")) { loadAnswerEssay(listSoal); } }
private double checkEssay1(ListSoal listSoal) { double point = 0; if (RemoveWhitespace(listSoal.pil1.Trim().ToLower().Replace(",", "").Replace(".", "")) == RemoveWhitespace(rtbEssay1.Text.Trim().ToLower().Replace(",", "").Replace(".", ""))) { point++; } return(point); }
private void loadSoalPilGan(ListSoal listSoal) { pnlPilGan.Visible = true; pnlEssay.Visible = false; rtbIsiSoal.Text = listSoal.isiSoal; rbA.Text = listSoal.pil1; rbB.Text = listSoal.pil2; rbC.Text = listSoal.pil3; rbD.Text = listSoal.pil4; rbE.Text = listSoal.pil5; }
private void checkPilGanAdaptif(ListSoal listSoal) { string jawab = getJawabPilgan(); setJawabPilGan(jawab); if (jawab.Trim().ToLower().Equals(listSoal.kunci.Trim().ToLower())) { double score = listSoal.bobot * testOpen.scoreItem; scores[noTest] = score; } else { scores[noTest] = 0; } }
private void loadSoal(ListSoal listSoal) { if (listSoal.jenisSoal.ToLower().Equals("pilihan ganda")) { pnlPilGan.Visible = true; pnlEssay.Visible = false; loadSoalPilGan(listSoal); } else if (listSoal.jenisSoal.ToLower().Equals("melengkapi")) { pnlEssay.Visible = true; pnlPilGan.Visible = false; loadSoalEssay(listSoal); } }
private void checkPilGanKlasik(ListSoal listSoal) { string jawab = getJawabPilgan(); setJawabPilGan(jawab); if (jawab.Trim().ToLower().Equals(listSoal.kunci.Trim().ToLower())) { double score = testOpen.scoreItem; scores[noTest] = score; this.listSoal[noTest].crosscek = 1; } else { scores[noTest] = 0; this.listSoal[noTest].crosscek = 0; } }
private void checkEssayKlassik(ListSoal listSoal) { if (listSoal.jumlahEsay == 1) { double midScore = testOpen.scoreItem * checkEssay1(listSoal); scores[noTest] = midScore; saveEssayAnswer(1); if (checkEssay1(listSoal) == 1) { this.listSoal[noTest].crosscek = 1; } else { this.listSoal[noTest].crosscek = 0; } } else if (listSoal.jumlahEsay == 2) { double midScore = testOpen.scoreItem * checkEssay2(listSoal); scores[noTest] = midScore; saveEssayAnswer(2); if (checkEssay2(listSoal) == 1) { this.listSoal[noTest].crosscek = 1; } else { this.listSoal[noTest].crosscek = 0; } } else if (listSoal.jumlahEsay == 3) { double midScore = testOpen.scoreItem * checkEssay3(listSoal); scores[noTest] = midScore; saveEssayAnswer(3); if (checkEssay3(listSoal) == 1) { this.listSoal[noTest].crosscek = 1; } else { this.listSoal[noTest].crosscek = 0; } } }
private void loadAnswerEssay(ListSoal listSoal) { if (listSoal.jumlahEsay == 1) { rtbEssay1.Text = answers[noTest].pil1; } else if (listSoal.jumlahEsay == 2) { rtbEssay1.Text = answers[noTest].pil1; rtbEssay2.Text = answers[noTest].pil2; } else if (listSoal.jumlahEsay == 3) { rtbEssay1.Text = answers[noTest].pil1; rtbEssay2.Text = answers[noTest].pil2; rtbEssay3.Text = answers[noTest].pil3; } }
private void checkEssayAdaptif(ListSoal listSoal) { if (listSoal.jumlahEsay == 1) { double midScore = listSoal.bobot * testOpen.scoreItem * checkEssay1(listSoal); scores[noTest] = midScore; saveEssayAnswer(1); } else if (listSoal.jumlahEsay == 2) { double midScore = (listSoal.bobot * testOpen.scoreItem) * checkEssay2(listSoal); scores[noTest] = midScore; saveEssayAnswer(2); } else if (listSoal.jumlahEsay == 3) { double midScore = (listSoal.bobot * testOpen.scoreItem) * checkEssay3(listSoal); scores[noTest] = midScore; saveEssayAnswer(3); } }
private double checkEssay3(ListSoal listSoal) { double point = 0; if (RemoveWhitespace(listSoal.pil1.Trim().ToLower().Replace(",", "").Replace(".", "")) == RemoveWhitespace(rtbEssay1.Text.Trim().ToLower().Replace(",", "").Replace(".", ""))) { point++; } if (RemoveWhitespace(listSoal.pil2.Trim().ToLower().Replace(",", "").Replace(".", "")) == RemoveWhitespace(rtbEssay2.Text.Trim().ToLower().Replace(",", "").Replace(".", ""))) { point++; } if (RemoveWhitespace(listSoal.pil3.Trim().ToLower().Replace(",", "").Replace(".", "")) == RemoveWhitespace(rtbEssay3.Text.Trim().ToLower().Replace(",", "").Replace(".", ""))) { point++; } Debug.WriteLine("score : " + point); return(point / 3); }
private void loadSoalEssay(ListSoal listSoal) { rtbIsiSoal.Text = listSoal.isiSoal; Debug.WriteLine("jumlah esay : " + listSoal.jumlahEsay); if (listSoal.jumlahEsay == 1) { Debug.WriteLine("jalan di if 1"); rtbEssay1.Visible = true; label1.Visible = true; rtbEssay2.Visible = false; label5.Visible = false; rtbEssay3.Visible = false; label7.Visible = false; } else if (listSoal.jumlahEsay == 2) { Debug.WriteLine("jalan di if 2"); rtbEssay1.Visible = true; label1.Visible = true; rtbEssay2.Visible = true; label5.Visible = true; rtbEssay3.Visible = false; label7.Visible = false; } else if (listSoal.jumlahEsay == 3) { Debug.WriteLine("jalan di if 3"); rtbEssay1.Visible = true; label1.Visible = true; rtbEssay2.Visible = true; label5.Visible = true; rtbEssay3.Visible = true; label7.Visible = true; } else { Debug.WriteLine("jalan di else nya"); } }
private void loadAnswerPilGan(ListSoal listSoal) { if (answers[noTest].kunci.ToLower().Trim().Equals("a")) { rbA.Checked = true; } else if (answers[noTest].kunci.ToLower().Trim().Equals("b")) { rbB.Checked = true; } else if (answers[noTest].kunci.ToLower().Trim().Equals("c")) { rbC.Checked = true; } else if (answers[noTest].kunci.ToLower().Trim().Equals("d")) { rbD.Checked = true; } else if (answers[noTest].kunci.ToLower().Trim().Equals("e")) { rbE.Checked = true; } }