Пример #1
0
                $dialogBox->success(get_lang('You have just created the course website') . ' : ' . '<strong>' . $course->officialCode . '</strong>');
                $display = DISP_COURSE_CREATION_SUCCEED;
            } else {
                $dialogBox->error($course->backlog->output());
                $display = DISP_COURSE_CREATION_FAILED;
            }
        } else {
            $dialogBox->error($course->backlog->output());
            $display = DISP_COURSE_CREATION_FAILED;
        }
    }
    if ($cmd == 'rqProgress') {
        $course->handleForm();
        if ($course->validate()) {
            // Trig a waiting screen as course creation may take a while...
            $progressUrl = $course->buildProgressUrl();
            $htmlHeadXtra[] = '<meta http-equiv="REFRESH" content="0; URL=' . $progressUrl . '">';
            // Display "progression" page
            $dialogBox->info(get_lang('Creating course (it may take a while) ...') . '<br />' . "\n" . '<p align="center">' . '<img src="' . get_icon_url('processing') . '" alt="" />' . '</p>' . "\n" . '<p>' . get_lang('If after while no message appears confirming the course creation, please click <a href="%url">here</a>', array('%url' => $progressUrl)) . '</p>');
            $display = DISP_COURSE_CREATION_PROGRESS;
        } else {
            $dialogBox->error($course->backlog->output());
            $display = DISP_COURSE_CREATION_FAILED;
        }
    }
}
// Set navigation url
if ($adminContext && claro_is_platform_admin()) {
    ClaroBreadCrumbs::getInstance()->prepend(get_lang('Create course'), get_path('clarolineRepositoryWeb') . 'course/create.php?adminContext=1');
    ClaroBreadCrumbs::getInstance()->prepend(get_lang('Administration'), get_path('rootAdminWeb'));
    $backUrl = get_path('rootAdminWeb');