<commit_before>require 'awesome_print'

class TutorialController < ApplicationController
	before_filter :authenticate_user!


	def create_student
		@group = Group.find(params["group_id"])
		@week = Week.find(params["week_id"])

		return render :status => 400, :json => { error: "MatrNr is taken, search for the student first!" } if Student.where(:matrnr => params["matrnr"].to_i).length > 0
		return render :status => 400, :json => { error: "Email is taken, search for the student first!" } if Student.where(:email => params["email"].to_i).length > 0
		return render :status => 400, :json => { error: "Name too short!" } if params["firstname"].length < 3 or params["lastname"].length < 3

		s = Student.create(
			firstname: params["firstname"],
			lastname: params["firstname"],<commit_msg>fixed bug causing lastname not to be saved<commit_after>require 'awesome_print'

class TutorialController < ApplicationController
	before_filter :authenticate_user!


	def create_student
		@group = Group.find(params["group_id"])
		@week = Week.find(params["week_id"])

		return render :status => 400, :json => { error: "MatrNr is taken, search for the student first!" } if Student.where(:matrnr => params["matrnr"].to_i).length > 0
		return render :status => 400, :json => { error: "Email is taken, search for the student first!" } if Student.where(:email => params["email"].to_i).length > 0
		return render :status => 400, :json => { error: "Name too short!" } if params["firstname"].length < 3 or params["lastname"].length < 3

		s = Student.create(
			firstname: params["firstname"],
			lastname: params["lastname"],
{'fraction_non_alphanumeric': 0.14906832298136646, 'fraction_numerical': 0.016149068322981366, 'mean_word_length': 5.148854961832061, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 23, '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': '4137066', 'n_tokens_mistral': 535, 'n_tokens_neox': 478, 'n_words': 146}