<commit_before>$(document).ready(function(){

	$('#member_page_controller').hide();
	$('#text_event_name').text("Error: Invalid event name ");
	var eventName = getURLParameter("q");
	if(eventName != null && eventName !== '') {
		$('#text_event_name').text("Event name: " + eventName);
		$('#member_page_controller').show();
	}

});

angular.module('ability-test-app', ['firebase'])
.controller('AbilityTestCtrl', ['$scope', '$firebaseObject', '$firebaseArray',
	function($scope, $firebaseObject, $firebaseArray) {

    $scope.quiz = [];
  	$scope.quiz = $firebaseArray(firebase.database().ref("quiz/java"));
}]);<commit_msg>add the function of submit button<commit_after>$(document).ready(function(){

	$('#member_page_controller').hide();
	$('#text_event_name').text("Error: Invalid event name ");
	var eventName = getURLParameter("q");
	if(eventName != null && eventName !== '') {
		$('#text_event_name').text("Event name: " + eventName);
		$('#member_page_controller').show();
	}

});

angular.module('ability-test-app', ['firebase'])
.controller('AbilityTestCtrl', ['$scope', '$firebaseObject', '$firebaseArray',
	function($scope, $firebaseObject, $firebaseArray) {
	
	firebase.auth().onAuthStateChanged(function(firebaseUser) {
		if(firebaseUser) {
			var user = firebase.auth().currentUser;
	        	$scope.uid = user.uid;
		}
	});
	
	$scope.quiz = [];
  	$scope.quiz = $firebaseArray(firebase.database().ref("quiz/java"));
		
	$scope.param = {
		"answer" : []
	};
		
	$scope.addanswer = function(option){
		$scope.param.answer.push(option);
	};

	$scope.submitFunc = function() {
		var userID = $.trim($scope.uid);
		var newData = {
			'answers': $scope.param.answers
		};
		var refPath = getURLParameter("q") +"/member/" + userID;
		var ref = firebase.database().ref(refPath);
		ref.update({answer: $scope.param.answer})
		window.location.href = "index.html";
	};
		
	
}]);
{'fraction_non_alphanumeric': 0.21360255047821466, 'fraction_numerical': 0.0, 'mean_word_length': 5.214521452145214, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2809291', 'n_tokens_mistral': 664, 'n_tokens_neox': 632, 'n_words': 94}