Category editing in quizzes is now supported. Some other little

cleanups along the way ...
This commit is contained in:
moodler
2002-10-20 17:15:39 +00:00
parent f9a9499a62
commit c74a0ca5c2
8 changed files with 232 additions and 27 deletions
+7 -3
View File
@@ -681,7 +681,7 @@ function optional_variable(&$var, $default=0) {
/// DATABASE HANDLING ////////////////////////////////////////////////
function execute_sql($command) {
function execute_sql($command, $feedback=true) {
// Completely general
global $db;
@@ -689,10 +689,14 @@ function execute_sql($command) {
$result = $db->Execute("$command");
if ($result) {
echo "<P><FONT COLOR=green><B>".get_string("success")."</B></FONT></P>";
if ($feedback) {
echo "<P><FONT COLOR=green><B>".get_string("success")."</B></FONT></P>";
}
return true;
} else {
echo "<P><FONT COLOR=red><B>".get_string("error")."</B></FONT></P>";
if ($feedback) {
echo "<P><FONT COLOR=red><B>".get_string("error")."</B></FONT></P>";
}
return false;
}
}