aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xGradeBook_lib.tcl13
1 files changed, 3 insertions, 10 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl
index 88cd800..5779d5f 100755
--- a/GradeBook_lib.tcl
+++ b/GradeBook_lib.tcl
@@ -34,7 +34,7 @@ proc isCalculateTotalForCategorySet { category } {
return $flag
}
-proc allColumnNames {table} {
+proc getColListFromTable {table} {
set eval_str [concat SELECT * FROM \'$table\']
set err [catch {
db eval $eval_str v {
@@ -50,7 +50,7 @@ proc allColumnNames {table} {
}
proc doesColumnExists {col table} {
- if { $col in [allColumnNames $table] } {
+ if { $col in [getColListFromTable $table] } {
return true;
} else {
return false;
@@ -76,7 +76,7 @@ proc allUserNamesInGroup { group } {
proc calculteWeightedTotals { } {
global grades_category
- set all_column_names [allColumnNames GradesTable]
+ set all_column_names [getColListFromTable GradesTable]
# locate all column names of this category
foreach category $grades_category {
if { [isCalculateTotalForCategorySet $category] } {
@@ -1172,13 +1172,6 @@ proc ChangeGrades { permission_list user } {
}
}
-proc getColListFromTable { table } {
- set eval_str [concat SELECT * FROM \'$table\' ]
- set err [catch {db eval $eval_str v {} } errStat]
- set old_column_list $v(*)
- return $old_column_list
-}
-
proc removeElementFromList { element2remove old_list } {
set new_list {}
foreach element $old_list {