[svn r19232] This fixes a bug that avoid to add a course with a quote in his title (in the ajax function)

skala
Noël Dieschburg 16 years ago
parent e7e6986fea
commit 353b47e5eb
  1. 3
      main/admin/add_courses_to_session.php

@ -116,7 +116,8 @@ function search_courses($needle)
$course_list = array();
while($course = Database :: fetch_array($rs)) {
$course_list[] = $course['code'];
$return .= '<a href="#" onclick="add_course_to_session(\''.$course['code'].'\',\''.$course['title'].' ('.$course['visual_code'].')'.'\')">'.$course['title'].' ('.$course['visual_code'].')</a><br />';
$course_title=str_replace("'","\'",$course_title);
$return .= '<a href="#" onclick="add_course_to_session(\''.$course['code'].'\',\''.$course_title.' ('.$course['visual_code'].')'.'\')">'.$course['title'].' ('.$course['visual_code'].')</a><br />';
}
}
$_SESSION['course_list'] = $course_list;

Loading…
Cancel
Save