<commit_before>var student_list_modal = null;

function close_popup()
{
    student_list_modal.hide();
    student_list_modal = null;
}

function get_Add_Register_Student_Popup(strURL)
{
    student_list_modal = student_list_modal || null;
    if(student_list_modal !== null)
    {
        close_popup();
    }
    student_list_modal = new UI.Window({ theme:"lightbox", width:400, height:350});
    student_list_modal.setContent("<div style='padding:10px'>Loading...Please Wait.</div>").show(true).focus().center();
    student_list_modal.setHeader("Register and Add New Student");
    var clazz_id = $("portal_clazz_id").value;
    var options = {
        method: 'post',
        onSuccess: function(transport) {
            var text = transport.responseText;
            text = "<div id='oErrMsgDiv' style='color:Red;font-weight:bold'></div>"+ text;
            student_list_modal.setContent("<div style='padding:10px'>" + text + "</div>");
        }
    };
    var target_url = "/portal/classes/"+clazz_id+"/add_new_student_popup";
    new Ajax.Request(target_url, options);
}

function add_New_Student_To_Class()
{
    $('oErrMsgDiv').innerHTML = "";
    var oForm = $('new_portal_student');
    var options = {
        method: 'post',
        onSuccess: function(transport) {
            var text = transport.responseText;			
            var response = text.evalJSON(true);
            if (!response.success)
            {
                var error_msg = response.error_msg;
                if (typeof(response.error_msg) == "object")
                {
                    error_msg = "";
                    for (var strKey in response.error_msg)
                    {<commit_msg>Fix "Register and Add new student" alignment issue<commit_after>var student_list_modal = null;

function close_popup()
{
    student_list_modal.hide();
    student_list_modal = null;
}

function get_Add_Register_Student_Popup(strURL)
{
    student_list_modal = student_list_modal || null;
    if(student_list_modal !== null)
    {
        close_popup();
    }
    student_list_modal = new UI.Window({ theme:"lightbox", width:400, height:350});
    student_list_modal.setContent("<div style='padding:10px'>Loading...Please Wait.</div>").show(true).focus().center();
    student_list_modal.setHeader("Register and Add New Student");
    var clazz_id = $("portal_clazz_id").value;
    var options = {
        method: 'post',
        onSuccess: function(transport) {
            var text = transport.responseText;
            text = "<div id='oErrMsgDiv' style='color:Red;font-weight:bold;margin-left: 7px;'></div>"+ text;
            student_list_modal.setContent("<div style='padding:10px'>" + text + "</div>");
        }
    };
    var target_url = "/portal/classes/"+clazz_id+"/add_new_student_popup";
    new Ajax.Request(target_url, options);
}

function add_New_Student_To_Class()
{
    $('oErrMsgDiv').innerHTML = "";
    var oForm = $('new_portal_student');
    var options = {
        method: 'post',
        onSuccess: function(transport) {
            var text = transport.responseText;			
            var response = text.evalJSON(true);
            if (!response.success)
            {
                var error_msg = response.error_msg;
                if (typeof(response.error_msg) == "object")
                {
                    error_msg = "";
                    for (var strKey in response.error_msg)
                    {
{'fraction_non_alphanumeric': 0.1330609862853808, 'fraction_numerical': 0.00612780857893201, 'mean_word_length': 2.600840336134454, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '7374302', 'n_tokens_mistral': 1041, 'n_tokens_neox': 1015, 'n_words': 186}