<commit_before>var NANESPACE_QA_SESSION = {
	showSessionList : function() {

		$("#divSessionDetail").hide();
		$("#divSessionList").hide();
		$
				.ajax({
					type : 'GET',
					url : 'rest/user',
					contentType : 'application/json',
					dataType : 'json',
					success : function(data) {
						$
								.ajax({
									type : 'GET',
									url : 'rest/qasession/',
									contentType : 'application/json',
									dataType : 'json',
									success : function(data) {
										$("#tbodySession").empty();
										$
												.each(
														data,
														function(i, qasession) {

															$("#tbodySession")
																	.append(
																			"<tr id = \"tbtrSession_"
																					+ qasession.qasessionId
																					+ "\"><td>"
																					+ qasession.qasessionId
																							.substring(
																									0,
																									10)
																					+ "</td><td>"
																					+ qasession.qasessionTopic
																							.substring(
																									0,
																									30)
																					+ "</td><td>"
																					+ qasession.qasessionStatus
																					+ "</td><td>"
																					+ qasession.updateDate
																					+ "</td><td><a href=\"#\" onClick=\"NANESPACE_QA_SESSION.showSessionDetail('"
																					+ qasession.qasessionId
																					+ "')\"><span class=\"glyphicon glyphicon-th-list\"></span></a>  <a href=\"#\" onClick=\"NANESPACE_QA_SESSION.deleteSessionConfirm('"
																					+ qasession.qasessionId
																					+ "')\"><span class=\"glyphicon glyphicon-trash\"></span></a></td></tr>");
														});
										$("#divSessionList").show();

									}, // success
									error : function(jqXHR, textStatus,
											errorThrown) {
										NANESPACE_QA_SESSION.redirectUser;
									}
								});
					}, // success
					error : function(jqXHR, textStatus, errorThrown) {
						NANESPACE_QA_SESSION.redirectUser;
					}
				});
	},
	showSessionDetail : function(qasessionId) {

		$("#divSessionDetail").hide();
		$("#divSessionList").hide();

		$
				.ajax({
					type : 'GET',
					url : 'rest/qasession/' + qasessionId,
					contentType : 'application/json',
					dataType : 'json',
					success : function(data) {
						$("#existSessionSessionTopic").val(data.qasessionTopic);
						$("#existSessionSessionDescription").val(
								data.qasessionDescription);
						$("#existSessionSessionMaxQuestion").val(
								data.qasessionMaxQuestion);
						$("#existSessionSessionStatus option:selected").text(
								data.qasessionStatus);

						$("#buttonExistSessionSaveExistSession").attr(
								"onClick",
								"NANESPACE_QA_SESSION.saveExistSession('"
										+ data.qasessionId + "');")

						$("#buttonSessionCreateQuestion").attr(
								"onClick",
								"NANESPACE_QA_SESSION.createQuestion('"
										+ data.qasessionId + "');")
						$("#sessionQuestionContent").val("");				
										
						if (data.questions.length > 0) {
							$("#divSessionDetailQuestions").empty();
							$
									.each(
											data.questions,
											function(i, question) {
												$("#divSessionDetailQuestions")
														.append(
																"<div id=\"divQuestion_"
																		+ question.questionId
																		+ "\"><span class=\"label label-primary\">Question</span> <span class=\"label label-info\">" + question.questionStatus + "</span>"
																		//+ "<span class=\"label label-info\">Created By " + question.createdBy.userTranslate.firstName + " " + question.createdBy.userTranslate.lastName + "</span>"
																		+ "<p>"
																		+ question.questionContent
																		+ "</p><p class=\"text-right\"> <a href=\"#\" onClick=\"NANESPACE_QA_SESSION.createAnswer('"
																		+ question.qasessionId
																		+ "', '"
																		+ question.questionId
																		+ "');\"><span class=\"glyphicon glyphicon-console\"></a>  <a href=\"#\" onClick=\"NANESPACE_QA_SESSION.editQuestion('"
																		+ question.qasessionId
																		+ "', '"
																		+ question.questionId
																		+ "');\"><span class=\"glyphicon glyphicon-th-list\">  <a href=\"#\" onClick=\"NANESPACE_QA_SESSION.deleteQuestion('"
																		+ question.qasessionId
																		+ "', '"
																		+ question.questionId
																		+ "');\"><span class=\"glyphicon glyphicon-trash\"></span></a></p></div>");
												if (question.answer != null) {
													$(
															"#divSessionDetailQuestions")
															.append(
																	"<blockquote><span class=\"label label-success\">Answer</span> <span class=\"label label-info\">Created By " + question.answer.createdBy + "</span><p> "
																			+ question.answer.answerContent
																			+ " </p></blockquote>");
												} // if
											});<commit_msg>Update sql schema and minor fixes on javascript for display the question info<commit_after>var NANESPACE_QA_SESSION = {
	showSessionList : function() {

		$("#divSessionDetail").hide();
		$("#divSessionList").hide();
		$
				.ajax({
					type : 'GET',
					url : 'rest/user',
					contentType : 'application/json',
					dataType : 'json',
					success : function(data) {
						$
								.ajax({
									type : 'GET',
									url : 'rest/qasession/',
									contentType : 'application/json',
									dataType : 'json',
									success : function(data) {
										$("#tbodySession").empty();
										$
												.each(
														data,
														function(i, qasession) {

															$("#tbodySession")
																	.append(
																			"<tr id = \"tbtrSession_"
																					+ qasession.qasessionId
																					+ "\"><td>"
																					+ qasession.qasessionId
																							.substring(
																									0,
																									10)
																					+ "</td><td>"
																					+ qasession.qasessionTopic
																							.substring(
																									0,
																									30)
																					+ "</td><td>"
																					+ qasession.qasessionStatus
																					+ "</td><td>"
																					+ qasession.updateDate
																					+ "</td><td><a href=\"#\" onClick=\"NANESPACE_QA_SESSION.showSessionDetail('"
																					+ qasession.qasessionId
																					+ "')\"><span class=\"glyphicon glyphicon-th-list\"></span></a>  <a href=\"#\" onClick=\"NANESPACE_QA_SESSION.deleteSessionConfirm('"
																					+ qasession.qasessionId
																					+ "')\"><span class=\"glyphicon glyphicon-trash\"></span></a></td></tr>");
														});
										$("#divSessionList").show();

									}, // success
									error : function(jqXHR, textStatus,
											errorThrown) {
										NANESPACE_QA_SESSION.redirectUser;
									}
								});
					}, // success
					error : function(jqXHR, textStatus, errorThrown) {
						NANESPACE_QA_SESSION.redirectUser;
					}
				});
	},
	showSessionDetail : function(qasessionId) {

		$("#divSessionDetail").hide();
		$("#divSessionList").hide();

		$
				.ajax({
					type : 'GET',
					url : 'rest/qasession/' + qasessionId,
					contentType : 'application/json',
					dataType : 'json',
					success : function(data) {
						$("#existSessionSessionTopic").val(data.qasessionTopic);
						$("#existSessionSessionDescription").val(
								data.qasessionDescription);
						$("#existSessionSessionMaxQuestion").val(
								data.qasessionMaxQuestion);
						$("#existSessionSessionStatus option:selected").text(
								data.qasessionStatus);

						$("#buttonExistSessionSaveExistSession").attr(
								"onClick",
								"NANESPACE_QA_SESSION.saveExistSession('"
										+ data.qasessionId + "');")

						$("#buttonSessionCreateQuestion").attr(
								"onClick",
								"NANESPACE_QA_SESSION.createQuestion('"
										+ data.qasessionId + "');")
						$("#sessionQuestionContent").val("");				
										
						if (data.questions.length > 0) {
							$("#divSessionDetailQuestions").empty();
							$
									.each(
											data.questions,
											function(i, question) {
												$("#divSessionDetailQuestions")
														.append(
																"<div id=\"divQuestion_"
																		+ question.questionId
																		+ "\"><span class=\"label label-primary\">Question</span> <span class=\"label label-info\">" + question.questionStatus + "</span>"
																		//+ "<span class=\"label label-info\">Created By " + question.createdBy.userTranslate.firstName + " " + question.createdBy.userTranslate.lastName + "</span>"
																		+ "<p>"
																		+ question.questionContent
																		+ "</p><p class=\"text-right\"> <a href=\"#\" onClick=\"NANESPACE_QA_SESSION.createAnswer('"
																		+ question.qasessionId
																		+ "', '"
																		+ question.questionId
																		+ "');\"><span class=\"glyphicon glyphicon-console\"></a>  <a href=\"#\" onClick=\"NANESPACE_QA_SESSION.editQuestion('"
																		+ question.qasessionId
																		+ "', '"
																		+ question.questionId
																		+ "');\"><span class=\"glyphicon glyphicon-th-list\">  <a href=\"#\" onClick=\"NANESPACE_QA_SESSION.deleteQuestion('"
																		+ question.qasessionId
																		+ "', '"
																		+ question.questionId
																		+ "');\"><span class=\"glyphicon glyphicon-trash\"></span></a></p><br/><p class=\"text-right\"> + Last Update on + " + question.update_timestamp + " By " + question.updatedBy + "</p></div>");
												if (question.answer != null) {
													$(
															"#divSessionDetailQuestions")
															.append(
																	"<blockquote><span class=\"label label-success\">Answer</span> <span class=\"label label-info\">Created By " + question.answer.createdBy + "</span><p> "
																			+ question.answer.answerContent
																			+ " </p></blockquote>");
												} // if
											});
{'fraction_non_alphanumeric': 0.1580290537887711, 'fraction_numerical': 0.0013741656851197488, 'mean_word_length': 1.590643274853801, 'pattern_counts': {'":': 0, '<': 104, '<?xml version=': 0, '>': 106, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2198203', 'n_tokens_mistral': 4619, 'n_tokens_neox': 2834, 'n_words': 392}