<commit_before><div id='CourseEditForm'>
<?php
echo $this->Form->create('Course');
echo $this->Form->input('id');
echo $form->input('Course.course');
echo $html->div('help-text', _('Course subjects and course numbers, e.g. APSC 201 001'));
echo $form->input('Course.title');
echo $html->div('help-text', _('Course title, e.g. Technical Communication'));

function makeInstructor($i, $userId, $fullName, $html, $form) {
    // make instructor text box
    $name = "'$fullName'";
    $input = $form->label(' ') . $form->text("Instructor.$i.full_name", array('default' => $fullName, 'disabled' => true)) . 
        $html->link('X', '#', array('onclick' => "rmInstructor($i, $name, $userId); return false;"));
    $input .= $form->hidden("Instructor.$i.id", array('default' => $userId));
    $ret = $html->div('input text', $input, array('id' => "instructorsList$i"));
    return $ret;
}

$numInstructors = 0;
$selected = array();
$instructorTemplate = makeInstructor(-1, -2, -3, $html, $form);
$prof = $form->input('instructors', array(
    'after' => $html->link('Add Instructor','#', array('onclick' => 'addInstructor(); return false;')),
    'empty' => '-- Select an instructor --'));
if (isset($this->data) && isset($this->data['Instructor'])) {
    foreach($this->data['Instructor'] as $key => $val) {
        $prof .= makeInstructor($key, $val['id'], $val['full_name'], $html, $form);
        $numInstructors = $key + 1;
        $selected[] = $val['id'];
    }
}
echo $html->div('input text', $prof, array('id' => 'instructors'));

echo $form->input(
    'Course.record_status',
    array(
        'type' => 'select',
        'id' => 'status',
        'label' => 'Status',
        'options' => $statusOptions,
    )
);
echo $form->input('Department', array(
    'label' => __($this->Vocabulary->translate('Department'), true),
));
echo $html->div('help-text', _('Selecting correct assoication will allow admin to help troubleshooting.')); 
echo $this->Form->input('homepage');
echo $html->div('help-text', _('e.g. http://mycoursehome.com'));

echo $html->div('center', $form->submit(_('Save'), array('div' => false)));<commit_msg>fixed internalization for courses add and edit<commit_after><div id='CourseEditForm'>
<?php
echo $this->Form->create('Course');
echo $this->Form->input('id');
echo $form->input('Course.course');
echo $html->div('help-text', __('Course subjects and course numbers, e.g. APSC 201 001', true));
echo $form->input('Course.title');
echo $html->div('help-text', __('Course title, e.g. Technical Communication', true));

function makeInstructor($i, $userId, $fullName, $html, $form) {
    // make instructor text box
    $name = "'$fullName'";
    $input = $form->label(' ') . $form->text("Instructor.$i.full_name", array('default' => $fullName, 'disabled' => true)) . 
        $html->link('X', '#', array('onclick' => "rmInstructor($i, $name, $userId); return false;"));
    $input .= $form->hidden("Instructor.$i.id", array('default' => $userId));
    $ret = $html->div('input text', $input, array('id' => "instructorsList$i"));
    return $ret;
}

$numInstructors = 0;
$selected = array();
$instructorTemplate = makeInstructor(-1, -2, -3, $html, $form);
$prof = $form->input('instructors', array(
    'after' => $html->link(__('Add Instructor', true),'#', array('onclick' => 'addInstructor(); return false;')),
    'empty' => '-- Select an instructor --'));
if (isset($this->data) && isset($this->data['Instructor'])) {
    foreach($this->data['Instructor'] as $key => $val) {
        $prof .= makeInstructor($key, $val['id'], $val['full_name'], $html, $form);
        $numInstructors = $key + 1;
        $selected[] = $val['id'];
    }
}
echo $html->div('input text', $prof, array('id' => 'instructors'));

echo $form->input(
    'Course.record_status',
    array(
        'type' => 'select',
        'id' => 'status',
        'label' => 'Status',
        'options' => $statusOptions,
    )
);
echo $form->input('Department', array(
    'label' => __($this->Vocabulary->translate('Department'), true),
));
echo $html->div('help-text', __('Selecting correct assoication will allow admin to help troubleshooting.', true)); 
echo $this->Form->input('homepage');
echo $html->div('help-text', __('e.g. http://mycoursehome.com', true));

echo $html->div('center', $form->submit(__('Save', true), array('div' => false)));
{'fraction_non_alphanumeric': 0.24033149171270718, 'fraction_numerical': 0.0050644567219152855, 'mean_word_length': 4.506970849176172, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 95, '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': '4119973', 'n_tokens_mistral': 1463, 'n_tokens_neox': 1432, 'n_words': 321}