<commit_before>EditStudentController.$inject = ['majors', 'TbUtils', '$stateParams', 'students'];

function EditStudentController (majors, TbUtils, stateParams, students) {
	const vm = this;

	vm.oldStudent = JSON.parse(atob(stateParams.student));

	vm.student = {
		AccountId: '',
		Name: vm.oldStudent.Name,
		Password: <PASSWORD>,
		MajorId: vm.oldStudent.Major.MajorId,
		Campus: vm.oldStudent.Campus,
		Email: vm.oldStudent.Email
	};

	const oldAccountId = vm.oldStudent.AccountId;

	vm.formTitle = "Editar Estudiante";
    vm.submitting = false;
    vm.accountId = Number(vm.oldStudent.AccountId);
	vm.majorsLoading = true;
	vm.majors = [];

    vm.submit = submit;
    TbUtils.getAndLoad(majors.getMajors, vm.majors, () => { vm.majorsLoading = false;});

    function submit () {
    	vm.submitting = true;
    	vm.student.AccountId = vm.accountId.toString();
    	// TbUtils.updateAndNotify(students.update, oldAccountId, vm.student, 'Estudiante actualizado!',
    	// 	                    ()   => { vm.submitting = false; },
    	// 	                    resp => { TbUtils.go('main.students'); });
    }

}

module.exports = { name: 'EditStudentController', ctrl: EditStudentController };<commit_msg>Remove comment<commit_after>EditStudentController.$inject = ['majors', 'TbUtils', '$stateParams', 'students'];

function EditStudentController (majors, TbUtils, stateParams, students) {
	const vm = this;

	vm.oldStudent = JSON.parse(atob(stateParams.student));

	vm.student = {
		AccountId: '',
		Name: vm.oldStudent.Name,
		Password: <PASSWORD>,
		MajorId: vm.oldStudent.Major.MajorId,
		Campus: vm.oldStudent.Campus,
		Email: vm.oldStudent.Email
	};

	const oldAccountId = vm.oldStudent.AccountId;

	vm.formTitle = "Editar Estudiante";
    vm.submitting = false;
    vm.accountId = Number(vm.oldStudent.AccountId);
	vm.majorsLoading = true;
	vm.majors = [];

    vm.submit = submit;
    TbUtils.getAndLoad(majors.getMajors, vm.majors, () => { vm.majorsLoading = false;});

    function submit () {
    	vm.submitting = true;
    	vm.student.AccountId = vm.accountId.toString();
    }

}

module.exports = { name: 'EditStudentController', ctrl: EditStudentController };
{'fraction_non_alphanumeric': 0.14692378328741965, 'fraction_numerical': 0.0, 'mean_word_length': 3.747276688453159, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '1371695', 'n_tokens_mistral': 777, 'n_tokens_neox': 737, 'n_words': 126}