Пример #1
0
         $courseid = 0;
     }
     $time_estimate = get_str('time_estimate');
     if (!$time_estimate) {
         $time_estimate = 60;
     }
     $time_limit = get_str('time_limit');
     if (!$time_limit) {
         $time_limit = 3600;
     }
     $calibration_frac = get_str('calibration_frac', true);
     if (!$calibration_frac) {
         $calibration_frac = 0;
     }
     $now = time();
     $app_id = BossaApp::insert("(create_time, name, short_name, description, bolt_course_id, time_estimate, time_limit, calibration_frac) values ({$now}, '{$name}', '{$short_name}', '{$description}', {$courseid}, {$time_estimate}, {$time_limit}, {$calibration_frac})");
     if ($courseid) {
         $course->update("bossa_app_id={$app_id}");
     }
     Header('Location: bossa_admin.php');
     exit;
 case 'update_user':
     $flags = 0;
     if (get_str('show_all', true)) {
         $flags |= BOLT_FLAGS_SHOW_ALL;
     }
     if (get_str('debug', true)) {
         $flags |= BOLT_FLAGS_DEBUG;
     }
     $user->bossa->update("flags={$flags}");
     $user->bossa->flags = $flags;