private void activity_submit_buttonActionPerformed(
			java.awt.event.ActionEvent evt) {// GEN-FIRST:event_activity_submit_buttonActionPerformed
		// public Activity(String n, String sol, String lang, boolean p, boolean g)
		boolean prog; boolean group;
		if(activity_type_combo.getSelectedItem().toString().equalsIgnoreCase("Programming"))
			prog = true;
		else
			prog = false;
		if(activity_group_checkbox.isSelected())
			group = true;
		else
			group = false;
			
		Activity new_activity = new Activity(activity_name_field.getText(),
				activity_desc_field.getText(),
				activity_student_submissionpath_field.getText(),
				activity_solution_field.getText(),
				activity_lang_field.getText(),
				activity_due_date_1_field.getText(),
				prog, group,
				Integer.parseInt(activity_test_number_field.getText()));
		CourseAccess.addActivity(courseid, new_activity);
		if (prog) 
			CourseAccess.addTest(courseid, new_activity,
					activity_test_in_field.getText(),
					activity_test_out_field.getText());
		else
			CourseAccess.deleteTests(courseid,new_activity);

		JOptionPane.showMessageDialog(this, "Activity submitted.");
		GUIUtils.getMasterFrame(this).goBack();
	}// GEN-LAST:event_activity_submit_buttonActionPerformed