Exemplo n.º 1
0
 if (enrol_is_enabled('manual')) {
     $manual = enrol_get_plugin('manual');
 } else {
     $manual = NULL;
 }
 // clear bulk selection
 if ($bulk) {
     $SESSION->bulk_users = array();
 }
 // init csv import helper
 $cir->init();
 $linenum = 1;
 //column header is first line
 // init upload progress tracker
 $upt = new uu_progress_tracker();
 $upt->start();
 // start table
 while ($line = $cir->next()) {
     $upt->flush();
     $linenum++;
     $upt->track('line', $linenum);
     $user = new stdClass();
     // add fields to user object
     foreach ($line as $keynum => $value) {
         if (!isset($filecolumns[$keynum])) {
             // this should not happen
             continue;
         }
         $key = $filecolumns[$keynum];
         if (strpos($key, 'profile_field_') === 0) {
             //NOTE: bloody mega hack alert!!
Exemplo n.º 2
0
    } else {
        $manual = NULL;
    }

    // clear bulk selection
    if ($bulk) {
        $SESSION->bulk_users = array();
    }

    // init csv import helper
    $cir->init();
    $linenum = 1; //column header is first line

    // init upload progress tracker
    $upt = new uu_progress_tracker();
    $upt->start(); // start table

    while ($line = $cir->next()) {
        $upt->flush();
        $linenum++;

        $upt->track('line', $linenum);

        $user = new stdClass();

        // add fields to user object
        foreach ($line as $keynum => $value) {
            if (!isset($filecolumns[$keynum])) {
                // this should not happen
                continue;
            }