|
@@ -58,11 +58,11 @@ public class MyConsumer extends Consumer<String> {
|
|
|
try {
|
|
|
Class.forName("com.mysql.cj.jdbc.Driver");
|
|
|
|
|
|
- String url = "jdbc:mysql://localhost:3306/moodle_question?serverTimezone=GMT%2B8";
|
|
|
+ String url = "jdbc:mysql://210.38.32.28:3306/moodle_question?serverTimezone=GMT%2B8";
|
|
|
|
|
|
- String user = "root";
|
|
|
+ String user = "questionreader";
|
|
|
|
|
|
- String password = "123456";
|
|
|
+ String password = "xhhG88tdsk4Rvbgd";
|
|
|
connect = DriverManager.getConnection(url, user, password);
|
|
|
exportPaper(connect, code);
|
|
|
ExportByCourseCode.addDisposeCount();
|
|
@@ -165,7 +165,9 @@ public class MyConsumer extends Consumer<String> {
|
|
|
ResultSet resultSet = null;
|
|
|
try {
|
|
|
String sql = "SELECT f.* FROM mdl_question f WHERE category IN (" + getInStr(qcids)
|
|
|
- + ") AND f.qtype IN ('multichoice','truefalse') ";
|
|
|
+ + ") AND f.qtype IN ('multichoice','truefalse','multichoiceset') ";
|
|
|
+// + ") AND f.qtype = 'multichoiceset' ";
|
|
|
+
|
|
|
preState = connect.prepareStatement(sql);
|
|
|
|
|
|
resultSet = preState.executeQuery();
|