Beispiel #1
0
    }
    if (isset($rowcols['city'])) {
        $rowcols['city'] = trim($rowcols['city']);
        if (empty($rowcols['city'])) {
            $rowcols['status'][] = get_string('fieldrequired', 'error', 'city');
        }
    }
    $rowcols['status'] = implode('<br />', $rowcols['status']);
    $data[] = $rowcols;
}
if ($fields = $cir->next()) {
    $data[] = array_fill(0, count($fields) + 2, '...');
}
$cir->close();
$table = new html_table();
$table->id = "uupreview";
$table->attributes['class'] = 'generaltable';
$table->tablealign = 'center';
$table->summary = get_string('uploaduserspreview', 'admin');
$table->head = array();
$table->data = $data;
$table->head[] = get_string('uucsvline', 'admin');
foreach ($filecolumns as $column) {
    $table->head[] = $column;
}
$table->head[] = get_string('status');
echo html_writer::tag('div', html_writer::table($table), array('class' => 'flexible-wrap'));
/// Print the form
$mform2->display();
echo $OUTPUT->footer();
die;
Beispiel #2
0
        foreach ($fields as $field) {
            echo '<td class="cell c' . $ci++ . '">...</td>';
        }
        break;
    }
    $ci = 0;
    echo '<tr class="r' . $ri++ . '">';
    foreach ($fields as $field) {
        echo '<td class="cell c' . $ci++ . '">' . s($field) . '</td>';
    }
    echo '</tr>';
}
$cir->close();
echo '</table>';
echo '<div class="centerpara">' . get_string('uupreprocessedcount', 'admin', $readcount) . '</div>';
$mform->display();
echo $OUTPUT->footer();
die;
/////////////////////////////////////
/// Utility functions and classes ///
/////////////////////////////////////
class uu_progress_tracker
{
    var $_row;
    var $columns = array('status', 'line', 'id', 'username', 'firstname', 'lastname', 'email', 'password', 'auth', 'enrolments', 'deleted');
    function uu_progress_tracker()
    {
    }
    function init()
    {
        $ci = 0;