public btCHSTRAS_091_Link(btSHFUserLogin shfUserLogin, btSHFUnitPractice shfUnitPratice) { this.shfUserLogin = shfUserLogin; this.shfUnitPratice = shfUnitPratice; btCHSTRAS_091_Base bt = new btCHSTRAS_091_Base(); int programID = bt.getPagesID(shfUnitPratice); btCHSTRAS_091_Database database = new btCHSTRAS_091_Database(); String where = "ProgramID=" + programID; String[] selection = new String[] { "TextInfo", "ImageInfo" }; reader = database.query("E_SHFPages", selection, where, null); unit = new btCHSTRAS_091_Unit(DateTime.Now, database.getSize(), shfUserLogin, shfUnitPratice); item = new btCHSTRAS_091_Item(shfUserLogin, shfUnitPratice); texts = new String[4]; images = new String[4]; }
public btCHSTRAS_091_Teach(btSHFUserLogin shfUserLogin, btSHFUnitPractice shfUnitPratice) { this.shfUserLogin = shfUserLogin; file = new btCHSTRAS_091_File(); database = new btCHSTRAS_091_Database(); btCHSTRAS_091_Base bt = new btCHSTRAS_091_Base(); String[] columns = new String[] { "ProgramID", "PageID" }; String where = "ProgramID=" + bt.getPagesID(shfUnitPratice); readerPages = database.query("E_SHFPages", columns, where, null); total = database.getSize(); itemLearned = -1; itemCurrent = -1; arrayList = new ArrayList(); startTime = DateTime.Now; }
public btCHSTRAS_091_Question(btSHFUnitPractice unitPractice, int courseType) { btCHSTRAS_091_Base bt = new btCHSTRAS_091_Base(); file = new btCHSTRAS_091_File(); int pageID = bt.getPagesID(unitPractice); database = new btCHSTRAS_091_Database(); String where = "QuestionType=" + pageID + " AND " + "QuestionTag=\'" + courseType + "\'"; String[] columns = new String[] {"QuestionID", "QuestionDiff", "QuestionScore", "AverageTime", "QuestionSubject", "Question","QuestionSolution", "QuestionAnswer"}; reader = database.query("E_SHFQuestions", columns, where, null); angry = file.getImage("angry.gif"); happy = file.getImage("happy.gif"); }