--- loncom/interface/loncoursedata.pm 2003/06/25 19:25:54 1.80 +++ loncom/interface/loncoursedata.pm 2003/08/27 21:34:24 1.85 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncoursedata.pm,v 1.80 2003/06/25 19:25:54 www Exp $ +# $Id: loncoursedata.pm,v 1.85 2003/08/27 21:34:24 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -104,8 +104,7 @@ sub get_sequence_assessment_data { my $fn=$ENV{'request.course.fn'}; ## ## use navmaps - my $navmap = Apache::lonnavmaps::navmap->new($fn.".db", - $fn."_parms.db",1,0); + my $navmap = Apache::lonnavmaps::navmap->new(); if (!defined($navmap)) { return 'Can not open Coursemap'; } @@ -159,8 +158,13 @@ sub get_sequence_assessment_data { } # get the map itself, instead of BEGIN_MAP $title = $previous->title(); + $title =~ s/\:/\&\#058;/g; $symb = $previous->symb(); $src = $previous->src(); + # pick up the filename if there is no title available + if (! defined($title) || $title eq '') { + ($title) = ($src=~/\/([^\/]*)$/); + } $randompick = $previous->randompick(); my $newmap = { title => $title, src => $src, @@ -183,6 +187,7 @@ sub get_sequence_assessment_data { next if (! $curRes->is_problem());# && !$curRes->randomout); # Okay, from here on out we only deal with assessments $title = $curRes->title(); + $title =~ s/\:/\&\#058;/g; $symb = $curRes->symb(); $src = $curRes->src(); my $parts = $curRes->parts(); @@ -521,6 +526,8 @@ sub init_dbs { { name => 'student', type => 'VARCHAR(100)', restrictions => 'NOT NULL'}, + { name => 'classification', + type => 'varchar(100)', }, ], 'PRIMARY KEY' => ['student (100)'], 'KEY' => [{ columns => ['student_id']},], @@ -838,7 +845,7 @@ sub get_student_id { $have_read_student_table = 1; } if (! exists($ids_by_student{$student})) { - &Apache::lonmysql::store_row($student_table,[undef,$student]); + &Apache::lonmysql::store_row($student_table,[undef,$student,undef]); undef(%ids_by_student); my @Result = &Apache::lonmysql::get_rows($student_table); foreach (@Result) { @@ -1371,9 +1378,9 @@ sub get_problem_statistics { } # $dbh->do('DROP TABLE '.$stats_table); # May return an error -# -# Store in metadata -# + # + # Store in metadata + # if ($num) { my %storestats=(); @@ -1387,9 +1394,9 @@ sub get_problem_statistics { $urlres=~/^(\w+)\/(\w+)/; &Apache::lonnet::put('nohist_resevaldata',\%storestats,$1,$2); } -# -# Return result -# + # + # Return result + # return { num_students => $num, tries => $tries, max_tries => $mod, @@ -1399,7 +1406,7 @@ sub get_problem_statistics { num_solved => $Solved, num_override => $solved, per_wrong => $wrongpercent, - deg_of_diff => $DegOfDiff } + deg_of_diff => $DegOfDiff }; } sub execute_SQL_request {