Skip to content

Commit d354b16

Browse files
committed
Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x
2 parents e54d0d4 + a6a09d3 commit d354b16

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

main/inc/lib/system/session.class.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ public static function destroy()
120120
}
121121

122122
/*
123-
* ArrayAccess
123+
* ArrayAccess : bool
124124
*/
125-
public function offsetExists($offset)
125+
public function offsetExists($offset): bool
126126
{
127127
return isset($_SESSION[$offset]);
128128
}
@@ -133,19 +133,19 @@ public function offsetExists($offset)
133133
*
134134
* @param string $offset
135135
*
136-
* @return mixed
136+
* @return mixed (write offsetGet($offset): mixed on PHP 8 and & > )
137137
*/
138138
public function offsetGet($offset)
139139
{
140140
return self::read($offset);
141141
}
142142

143-
public function offsetSet($offset, $value)
143+
public function offsetSet($offset, $value): void
144144
{
145145
self::write($offset, $value);
146146
}
147147

148-
public function offsetUnset($offset)
148+
public function offsetUnset($offset): void
149149
{
150150
unset($_SESSION[$offset]);
151151
}

main/survey/survey.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,19 @@
308308
}
309309
}
310310

311-
echo '<tr class="'.$questionsGroupClass.$breakClass.'">';
311+
// Highlight the question that was just updated and scrool to it
312+
if ($row['question_id']==$my_question_id_survey) {
313+
echo '<tr class="'.$questionsGroupClass.$breakClass.'" style="background-color:#A9DFBF;" >';
314+
echo '<a name="tocupdatelink" id="tocupdatelink" ></a>';
315+
echo '<script>';
316+
echo '$(document).ready(function() {';
317+
echo "var element_to_scroll_to = document.getElementById('tocupdatelink');";
318+
echo 'element_to_scroll_to.scrollIntoView();';
319+
echo '});';
320+
echo '</script>';
321+
} else {
322+
echo '<tr class="'.$questionsGroupClass.$breakClass.'">';
323+
}
312324
echo ' <td>'.$question_counter.'</td>';
313325
echo ' <td>';
314326

0 commit comments

Comments
 (0)