From: jj v. a. <we...@ma...> - 2005-09-17 16:32:26
|
Log Message: ----------- Use underscore2nbsp from higher up module. Hopefully this fixes bug 841. Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: Stats.pm StudentProgress.pm webwork-modperl/lib/WeBWorK/ContentGenerator: Grades.pm Revision Data ------------- Index: Stats.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/Stats.pm,v retrieving revision 1.57 retrieving revision 1.58 diff -Llib/WeBWorK/ContentGenerator/Instructor/Stats.pm -Llib/WeBWorK/ContentGenerator/Instructor/Stats.pm -u -r1.57 -r1.58 --- lib/WeBWorK/ContentGenerator/Instructor/Stats.pm +++ lib/WeBWorK/ContentGenerator/Instructor/Stats.pm @@ -112,7 +112,7 @@ foreach my $setID (@setIDs) { my $problemPage = $urlpath->newFromModule("WeBWorK::ContentGenerator::Instructor::Stats", courseID => $courseID, setID => $setID,statType => 'set',); - print CGI::li(CGI::a({href=>$self->systemLink($problemPage)}, underscore2nbsp($setID))); + print CGI::li(CGI::a({href=>$self->systemLink($problemPage)}, WeBWorK::ContentGenerator::underscore2nbsp($setID))); } print CGI::end_ul(); @@ -195,7 +195,7 @@ statType => 'set', setID => $set ); - push @setLinks, CGI::a({-href=>$self->systemLink($setStatisticsPage) }, underscore2nbsp($set)); + push @setLinks, CGI::a({-href=>$self->systemLink($setStatisticsPage) }, WeBWorK::ContentGenerator::underscore2nbsp($set)); } foreach my $student (@studentList) { @@ -600,10 +600,4 @@ return shift; } -sub underscore2nbsp { - my $str = shift; - $str =~ s/_/ /g; - return($str); -} - 1; Index: StudentProgress.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -Llib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm -Llib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm -u -r1.18 -r1.19 --- lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm +++ lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm @@ -111,7 +111,7 @@ foreach my $setID (@setIDs) { my $problemPage = $urlpath->newFromModule("WeBWorK::ContentGenerator::Instructor::StudentProgress", courseID => $courseID, setID => $setID,statType => 'set',); - print CGI::li(CGI::a({href=>$self->systemLink($problemPage)}, underscore2nbsp($setID))); + print CGI::li(CGI::a({href=>$self->systemLink($problemPage)}, WeBWorK::ContentGenerator::underscore2nbsp($setID))); } print CGI::end_ul(); @@ -224,7 +224,7 @@ statType => 'set', setID => $set ); - push @setLinks, CGI::a({-href=>$self->systemLink($setStatisticsPage) }, underscore2nbsp($set)); + push @setLinks, CGI::a({-href=>$self->systemLink($setStatisticsPage) }, WeBWorK::ContentGenerator::underscore2nbsp($set)); } foreach my $studentRecord (@sortedStudentRecords) { @@ -847,10 +847,4 @@ return shift; } -sub underscore2nbsp { - my $str = shift; - $str =~ s/_/ /g; - return($str); -} - 1; Index: Grades.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Grades.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -Llib/WeBWorK/ContentGenerator/Grades.pm -Llib/WeBWorK/ContentGenerator/Grades.pm -u -r1.15 -r1.16 --- lib/WeBWorK/ContentGenerator/Grades.pm +++ lib/WeBWorK/ContentGenerator/Grades.pm @@ -336,7 +336,7 @@ my $successIndicator = ($avg_num_attempts) ? ($totalRight/$total)**2/$avg_num_attempts : 0 ; push @rows, CGI::Tr( - CGI::td(CGI::a({-href=>$act_as_student_set_url}, underscore2nbsp($setName))), + CGI::td(CGI::a({-href=>$act_as_student_set_url}, WeBWorK::ContentGenerator::underscore2nbsp($setName))), CGI::td(sprintf("%0.2f",$totalRight)), # score CGI::td($total), # out of CGI::td(sprintf("%0.0f",100*$successIndicator)), # indicator @@ -390,10 +390,4 @@ return shift; } -sub underscore2nbsp { - my $str = shift; - $str =~ s/_/ /g; - return($str); -} - 1; |