From 6e80f6eab5a69d0bab6c39127ddeabf07fe02afc Mon Sep 17 00:00:00 2001 From: esoe Date: Fri, 9 Sep 2022 17:08:09 +0300 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=B1=D1=80=D0=B0=D0=BB=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D1=81=D1=8B=20=D0=BB=D0=B8=D1=88=D0=BD=D0=B8?= =?UTF-8?q?=D1=85=20=D1=82=D0=B0=D0=B1=D0=BB=D0=B8=D1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/ru/egspt/Data.java | 33 ++--------------------------- target/classes/ru/egspt/Data.class | Bin 4936 -> 4911 bytes 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/src/main/java/ru/egspt/Data.java b/src/main/java/ru/egspt/Data.java index 03cc478..8467b28 100644 --- a/src/main/java/ru/egspt/Data.java +++ b/src/main/java/ru/egspt/Data.java @@ -24,7 +24,7 @@ public class Data extends UserListModel { */ public ArrayList getQuizesFromBase(Base base) { ArrayList q = new ArrayList<>(); - String querry = "SELECT id, name, timelimit FROM mdl_quiz"; + String querry = "SELECT id, name FROM mdl_quiz"; ResultSet rs = base.querry(querry); try { while (rs.next()){ @@ -86,38 +86,9 @@ public class Data extends UserListModel { /** * @return полный перечень результатов из базы */ - /** - * - * @param base - * @return - - public ArrayList getResultsFromBase(Base base) { - ArrayList r = new ArrayList<>(); - String querry = "SELECT id, quiz, userid, grade, timemodified FROM mdl_quiz_grades"; - ResultSet rs = base.querry(querry); - try { - while (rs.next()){ - int id = rs.getInt("id"); - int quizid = rs.getInt("quiz"); - int userid = rs.getInt("userid"); - double grade = rs.getDouble("grade"); - Long time = rs.getLong("timemodified"); - Result result = new Result(id, quizid, userid, grade, time); - r.add(result); - } - } - catch (Exception ex){ - System.err.println ("Подключение к серверу баз данных не установлено ... "); - ex.printStackTrace(); - System.out.println (ex); - } - return r; - } - */ - public ArrayList getResultsFromBase(Base base) { ArrayList r = new ArrayList<>(); - String querry = "SELECT id, quiz, userid, attempt, timestart, timefinish, timemodified, sumgrades FROM mdl_quiz_attempts"; + String querry = "SELECT id, quiz, userid, attempt, timestart, timefinish, sumgrades FROM mdl_quiz_attempts"; ResultSet rs = base.querry(querry); try { while (rs.next()){ diff --git a/target/classes/ru/egspt/Data.class b/target/classes/ru/egspt/Data.class index 1c446de652d8f19572cb0745de777e1a4e7e56bc..3f52e158dd9eb9265f94e65e74a1ac0c3d5a2bb4 100644 GIT binary patch delta 173 zcmWNJI}1T!06>ph>Xs5WMs=sVAe%BM5~aw1!Q1uByF}y>CW}a9wAdJ^yZQlsmTx?r z)A?y{?Q@cBu5>gJjbzkL!=n!MLDP6jN3$t+3CICsE3f2a9+?6biYSzEQbDDP8y!D2 z!qiF8phS}aEw;4Ti|$N^D_w5%xYOq$?2C~Rx5rH0u~<&Ta*CB1cIG%(;A2UUH6g)q NHY9}4vb%hh!yoZ}Cba+n delta 197 zcmZ3lc0z4KKa;dZu&a-&bBID_ijG2FVs5IALP=(BYEEWuX36IHOnt13>67(1EO|hJ zx%nxXX_=`hn^QUJIDE?)I2bAzxEU%LgczzBL>X!r6c}n5v>ECc%oyq!92puI{23Y< zVi}qkav7R|ycULbpt^|+Z46U@tZ57#4D%Q|85T2iF|20j*=!)_#;Ds5G;$))$Vm)* oKt+NKQyD}UrZea>%wVu(n8n}#