Exemplo n.º 1
0
                 $myxls->write_string($row, $i++, '', $cellform);
             }
             $studentid = !empty($user->idnumber) ? $user->idnumber : " ";
             $ug2 = '';
             if ($usergrps = groups_get_all_groups($course->id, $user->id)) {
                 foreach ($usergrps as $ug) {
                     $ug2 = $ug2 . $ug->name;
                 }
             }
             $row++;
             $pos = 4;
         }
     }
 } else {
     // get list of one specified booking option: $action is $optionid
     foreach ($bookingData->get_all_users() as $usernumber => $user) {
         $bookingData = new booking_option($cm->id, $optionid);
         $bookingData->apply_tags();
         $option_text = $bookingData->option->text;
         if ($user->waitinglist) {
             $cellform = $cellformat1;
         } else {
             $cellform = $cellformat;
         }
         if (isset($option_text)) {
             $myxls->write_string($row, 0, format_string($option_text, true));
         }
         $myxls->write_string($row, 1, $user->id, $cellform);
         $myxls->write_string($row, 2, $user->firstname, $cellform);
         $myxls->write_string($row, 3, $user->lastname, $cellform);
         $myxls->write_string($row, 4, $user->email, $cellform);