Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x

pull/5867/head
Yannick Warnier 11 months ago
commit d354b16fc5
  1. 10
      main/inc/lib/system/session.class.php
  2. 14
      main/survey/survey.php

@ -120,9 +120,9 @@ class Session implements \ArrayAccess
}
/*
* ArrayAccess
* ArrayAccess : bool
*/
public function offsetExists($offset)
public function offsetExists($offset): bool
{
return isset($_SESSION[$offset]);
}
@ -133,19 +133,19 @@ class Session implements \ArrayAccess
*
* @param string $offset
*
* @return mixed
* @return mixed (write offsetGet($offset): mixed on PHP 8 and & > )
*/
public function offsetGet($offset)
{
return self::read($offset);
}
public function offsetSet($offset, $value)
public function offsetSet($offset, $value): void
{
self::write($offset, $value);
}
public function offsetUnset($offset)
public function offsetUnset($offset): void
{
unset($_SESSION[$offset]);
}

@ -308,7 +308,19 @@ while ($row = Database::fetch_array($result, 'ASSOC')) {
}
}
echo '<tr class="'.$questionsGroupClass.$breakClass.'">';
// Highlight the question that was just updated and scrool to it
if ($row['question_id']==$my_question_id_survey) {
echo '<tr class="'.$questionsGroupClass.$breakClass.'" style="background-color:#A9DFBF;" >';
echo '<a name="tocupdatelink" id="tocupdatelink" ></a>';
echo '<script>';
echo '$(document).ready(function() {';
echo "var element_to_scroll_to = document.getElementById('tocupdatelink');";
echo 'element_to_scroll_to.scrollIntoView();';
echo '});';
echo '</script>';
} else {
echo '<tr class="'.$questionsGroupClass.$breakClass.'">';
}
echo ' <td>'.$question_counter.'</td>';
echo ' <td>';

Loading…
Cancel
Save