If a cidReset is found we reset the course

skala
Julio Montoya 12 years ago
parent 249fe52343
commit 1ef111ac6e
  1. 17
      main/inc/routes.php

@ -14,7 +14,7 @@ $userAccessConditions = function (Request $request) use ($app) {
};
/** Setting course session and group global values */
$settingCourseConditions = function (Request $request) use ($app) {
$settingCourseConditions = function (Request $request) use ($cidReset, $app) {
$cidReq = $request->get('cidReq');
$sessionId = $request->get('id_session');
@ -29,6 +29,10 @@ $settingCourseConditions = function (Request $request) use ($app) {
$courseReset = true;
}
if (isset($cidReset) && $cidReset == 1) {
$courseReset = true;
}
Session::write('courseReset', $courseReset);
$groupReset = false;
@ -41,11 +45,11 @@ $settingCourseConditions = function (Request $request) use ($app) {
$sessionReset = true;
}
/*
$app['monolog']->addDebug('Start');
$app['monolog']->addDebug($courseReset);
$app['monolog']->addDebug($cidReq);
$app['monolog']->addDebug($tempCourseId);
$app['monolog']->addDebug('End');
$app['monolog']->addDebug('Start');
$app['monolog']->addDebug($courseReset);
$app['monolog']->addDebug($cidReq);
$app['monolog']->addDebug($tempCourseId);
$app['monolog']->addDebug('End');
*/
if ($courseReset) {
@ -121,6 +125,7 @@ $userPermissionsInsideACourse = function (Request $request) use ($app) {
$is_platformAdmin = api_is_platform_admin();
$courseReset = Session::read('courseReset');
//$app['monolog']->addDebug($courseReset);
//$app['monolog']->addDebug($courseId);

Loading…
Cancel
Save