Разработка подсистемы подготовки адаптивного тестирования в открытой системе дистанционного образования

Дипломная работа - Компьютеры, программирование

Другие дипломы по предмету Компьютеры, программирование



ros. Tables [Vopros].Rows)

{MaxPosition++;}= new Random().Next(MaxPosition);rn = new Random();= new int[MaxPosition];(int i = 0; i < MaxPosition; i++)

{Rand = rn. Next(MaxPosition);[i] = Rand;(i >= 1)

{for (int j = 0; j < i; j++)

{if (Rand == array[j])

{i - ;}

}

}

}(int i = 0; i < MaxPosition; i++)

{textBox3. Text += array[i].ToString() + ;}(MaxPosition > 0)

{row = DSVopros. Tables [Vopros].Rows [array[position]];_vopr = row[0].ToString();. Text = row[1].ToString();}

}

{

}

}void AddControlsForQuestions()

{try

{X = 10;= 225;= 0;= 0;= groupBox2. Controls. Count;thisConnection = new OleDbConnection (ConStr. GetConString());. Open();query = Select id_rez From Rez Where (id_test = @id_test AND id_vopr = @id_vopr);cmd = new OleDbCommand (query, thisConnection);

. Parameters. AddWithValue (@id_test, id_test);. Parameters. AddWithValue (@id_vopr, id_vopr);thisReader = cmd. ExecuteReader();

while (thisReader. Read())

{kk++;

}= new int[kk];. Close();query1 = Select id_otv From Otvet Where (id_test = @id_test AND id_vopr = @id_vopr);cmd1 = new OleDbCommand (query1, thisConnection);. Parameters. AddWithValue (@id_test, id_test);. Parameters. AddWithValue (@id_vopr, id_vopr);thisReader1 = cmd1. ExecuteReader();(thisReader1. Read())

{++;

}. Close();. Close();(kk > 1)

{(int i = 0; i < kkk; i++)

{= new Label();. Width = 930;. Height = 50;. Font = new Font (Microsoft Sans Serif, 12);. Location = new Point (X, Y);. Name = lb + this.groupBox2. Controls. Count. ToString();= new CheckBox();. Location = new Point (X + 960, Y + 10);. Name = cb + this.groupBox2. Controls. Count. ToString();.groupBox2. Controls. Add(lb);. Text = groupBox2. Controls. Count. ToString();.groupBox2. Controls. Add(cb);. Text = groupBox2. Controls. Count. ToString();+= 60;

}

}

{(int i = 0; i < kkk; i++)

{= new Label();. Width = 930;. Height = 50;. Font = new Font (Microsoft Sans Serif, 12);. Location = new Point (X, Y);. Name = lb + this.groupBox2. Controls. Count. ToString();= new RadioButton();. Location = new Point (X + 960, Y + 10);. Name = rb + this.groupBox2. Controls. Count. ToString();.groupBox2. Controls. Add(lb);. Text = groupBox2. Controls. Count. ToString();.groupBox2. Controls. Add(rb);. Text = groupBox2. Controls. Count. ToString();+= 60;

}

}}

{}

}void BindQuestion()

{try

{rn = new Random();[] array1 = new int [groupBox2. Controls. Count - CntrlsCnt];[] array2 = new int[(groupBox2. Controls. Count - CntrlsCnt) / 2];= new int[(groupBox2. Controls. Count - CntrlsCnt) / 2];g = 1;(int z = 0; z < (groupBox2. Controls. Count - CntrlsCnt) / 2; z++)

{array3 [z] = groupBox2. Controls [CntrlsCnt + g].TabIndex;+= 2;

}(int j = 0; j < groupBox2. Controls. Count - CntrlsCnt; j++)

{= rn. Next (CntrlsCnt, groupBox2. Controls. Count);[j] = groupBox2. Controls[Rand].TabIndex;(j >= 1)

{for (int p = 0; p < j; p++)

{if (Rand == array1 [p])

{-;

}

}

}

}f = 0;(int r = 0; r < array1. Length; r++)

{(array1 [r]% 2 == 0)

{[f] = array1 [r];++;

}

}thisConnection = new OleDbConnection (ConStr. GetConString());. Open();query1 = Select id_otv, otv From Otvet Where (id_test = @id_test AND id_vopr = @id_vopr);cmd = new OleDbCommand (query1, thisConnection);. Parameters. AddWithValue (@id_test, id_test);. Parameters. AddWithValue (@id_vopr, id_vopr);thisReader = cmd. ExecuteReader();i = 0;(thisReader. Read())

{

(groupBox2. Controls [array2 [i]] as Label).Text = thisReader. GetValue(1).ToString();++;

}. Close();. Close();

}

{

}

}void DelControlsFromGrupBox2 ()

{

(groupBox2. Controls. Count > CntrlsCnt && CntrlsCnt!= 0)

{(int i = groupBox2. Controls. Count; i > CntrlsCnt; i-)

{. Controls. RemoveAt (i - 1);

}

}

}void comboBox3_SelectedIndexChanged (object sender, EventArgs e)

{. Enabled = false;. Enabled = false;= 0;= 0;. Text = ;();();();();

}void button6_Click (object sender, EventArgs e)

{();(position < MaxPosition - 1)

{++;= DSVopros. Tables [Vopros].Rows [array[position]];. Text = row[1].ToString();_vopr = row[0].ToString();();();();

}

}

void button2_Click (object sender, EventArgs e)

void RightAnsw()

{try

{(End!= MaxPosition)

{. Enabled = false;thisConnection = new OleDbConnection (ConStr. GetConString());. Open();. Items. Clear();length = 0;(kk > 1)

{foreach (int t in array3)

{. Items. Add((groupBox2. Controls [t - 1] as Label).Text);++;

}

}

}

{(int t in array3)

{((groupBox2. Controls[t] as RadioButton).Checked)

{. Items. Add((groupBox2. Controls [t - 1] as Label).Text);++;;

}

}

}= new int[length];l = 0;(string str in comboBox4. Items)

{query = Select id_otv From Otvet Where (id_test = @id_test AND id_vopr = @id_vopr AND otv = @otv);cmd = new OleDbCommand (query, thisConnection);. Parameters. AddWithValue (@id_test, id_test);. Parameters. AddWithValue (@id_vopr, id_vopr);. Parameters. AddWithValue (@otv, str);thisReader = cmd. ExecuteReader();(thisReader. Read())

{[l] = thisReader. GetInt32 (0);++;

}. Close();

}query1 = Select id_otv From Rez Where (id_test = @id_test AND id_vopr = @id_vopr);cmd1 = new OleDbCommand (query1, thisConnection);. Parameters. AddWithValue (@id_test, id_test);. Parameters. AddWithValue (@id_vopr, id_vopr);thisReader1 = cmd1. ExecuteReader();u = 0;(thisReader1. Read())

{[u] = thisReader1. GetInt32 (0);++;

}. Close();right = 0;(array4. Length == array5. Length)

{(int x in array4)

{(int y in array5)

{(x == y)

{++;

}

}

}

}(right == array5. Length)

{++;

}(End + 1 == MaxPosition)

{. Show (Тест: + +comboBox3. SelectedItem. ToString()+\n\n+Количество вопросов в тесте: + +MaxPosition. ToString()+\n\n+Вы ответили верно на: + +schet. ToString());

. Enabled = true;. Enabled = true;. Enabled = true;. Text = ;();. Text = ;. SelectedValue = ;= 0;

}++;

}

}

{

}

}

}

}

программа семантический visual тестирование