diff --git a/bin/OPL-update b/bin/OPL-update index 430b2eabc3..13016567a3 100755 --- a/bin/OPL-update +++ b/bin/OPL-update @@ -262,7 +262,7 @@ for my $tableinfo (@create_tables) { my $tabinit = $tableinfo->[1]; my $query = "DROP TABLE IF EXISTS `$tabname`"; $dbh->do($query); - $query = "CREATE TABLE `$tabname` ( $tabinit ) ENGINE=$db_storage_engine"; + $query = "CREATE TABLE `$tabname` ( $tabinit ) ENGINE=$db_storage_engine CHARACTER SET latin1"; $dbh->do($query); if($lib eq 'OPL') { $old_tabname = $tabname; diff --git a/conf/defaults.config b/conf/defaults.config index a694cc7ddc..e50aca4a08 100644 --- a/conf/defaults.config +++ b/conf/defaults.config @@ -1621,7 +1621,7 @@ $ConfigValues = [ { var => 'pg{options}{displayMode}', doc => 'The default display mode', - doc2 => 'Enter one of the allowed display mode types above. See \'display modes entry\' for descriptions.', + doc2 => 'Enter one of the allowed display mode types above. See \'display modes entry\' for descriptions.', min => 1, values => [qw(MathJax images plainText)], type => 'popuplist' diff --git a/conf/snippets/ASimpleCombinedHeaderFile.pg b/conf/snippets/ASimpleCombinedHeaderFile.pg index 14cc26995c..a0447d2afd 100644 --- a/conf/snippets/ASimpleCombinedHeaderFile.pg +++ b/conf/snippets/ASimpleCombinedHeaderFile.pg @@ -1,5 +1,5 @@ # ASimpleCombinedHeaderFile.pg -# This header file can be used for both the screen and hardcopy output +# Ce fichier en-tête peut être utilisé pour l'interface web ou pour la copie papier du devoir DOCUMENT(); @@ -7,14 +7,15 @@ DOCUMENT(); loadMacros( "PG.pl", "PGbasicmacros.pl", - "PGcourse.pl", + ); TEXT($BEGIN_ONE_COLUMN); #################################################### # -# The item below printed out only when a hardcopy is made. +# La section ci-dessous apparaîtra seulement lorsqu'une copie papier +# du devoir sera créée. # #################################################### @@ -25,61 +26,52 @@ TEXT(MODES(TeX =>EV3(<<'EOT'),HTML=>"")); \noindent {\large \bf $studentName} \hfill {\large \bf {\{protect_underbar($courseName)\}}} -% Uncomment the line below if this course has sections. Note that this is a comment in TeX mode since this is only processed by LaTeX +% Décommenter la ligne ci-dessous s'il existe plusieurs groupes dans ce cours. Notez que ceci est un commentaire en LaTeX car cette section est compilée seulement par LaTeX % {\large \bf { Section: \{protect_underbar($sectionName)\} } } \par -\noindent{\large \bf {Assignment \{protect_underbar($setNumber)\} due $formatedDueDate}} -\par\noindent \bigskip -% Uncomment and edit the line below if this course has a web page. Note that this is a comment in TeX mode. -%See the course web page for information http://yoururl/yourcourse - +\noindent{\large \bf {Date de remise de \{protect_underbar($setNumber)\} : \{protect_underbar($DueDateDay)\} \{protect_underbar($DueDateMonthWord)\} \{protect_underbar($DueDateYear4Digit)\} à \{protect_underbar(${DueDateHour24})\}h\{protect_underbar($DueDateMinute)\}}} EOT #################################################### # -# End of hardcopy only output. +# Fin de la section copie papier # #################################################### #################################################### # -# The items below are printed out only when set is displayed on screen +# La section ci-dessous apparaît sur la page principale du devoir, +# dans l'interface web de WeBWorK # #################################################### TEXT(MODES(TeX =>"",HTML=>EV3(<<'EOT'))); -$BBOLD WeBWorK Assignment \{ protect_underbar($setNumber) \} is due : $formattedDueDate. $EBOLD +$BBOLD Ce devoir WeBWorK \{ protect_underbar($setNumber) \} doit être remis le $DueDateDay $DueDateMonthWord $DueDateYear4Digit à ${DueDateHour24}:$DueDateMinute. $EBOLD $PAR -Here's the list of -\{ htmlLink(qq!http://webwork.maa.org/wiki/Available_Functions!,"functions and symbols") \} - which WeBWorK understands. +Un résumé des commandes et notations que WeBWorK reconnaît est $BBOLD disponible ici$EBOLD. $BR + EOT -#################################################### -# Uncomment and edit the lines below if this course has a web page. Note that this is comment in Perl mode. -# IMPORTANT: Make sure the EOT at the bottom is at the beginning of a line with no spaces preceeding it. -#TEXT(MODES(TeX =>"",HTML=>EV3(<<'EOT'))); -#See the course web page for information \{ htmlLink(qq!http://yoururl/yourcourse!,"your course name") \} -#EOT -#################################################### #################################################### # -# End of screen only output. +# Fin de la section interface web # #################################################### #################################################### # -# Anything between the BEGIN_TEXT AND END_TEXT lines -# will be printed in both screen and hardcopy output +# Toutes les lignes entre les balises BEGIN_TEXT et END_TEXT +# apparaîtront autant sur la copie papier que sur l'interface web. # #################################################### BEGIN_TEXT + + END_TEXT diff --git a/htdocs/js/apps/SetMaker/setmaker.js b/htdocs/js/apps/SetMaker/setmaker.js index 47b78150e6..87ba9d66ba 100644 --- a/htdocs/js/apps/SetMaker/setmaker.js +++ b/htdocs/js/apps/SetMaker/setmaker.js @@ -54,8 +54,8 @@ function togglepaths() { $('#toggle_path_current').val('hide'); $("[id*=filepath]").each(function() { // If showing, trigger - if(this.textContent.match('^Show')) { - this.click(); + if(this.textContent.match(show_string)) { + this.click(); } }); } else { @@ -63,7 +63,7 @@ function togglepaths() { $('#toggle_path_current').val('show'); $("[id*=filepath]").each(function() { // If hidden, trigger - if(! this.textContent.match('^Show')) { + if(! this.textContent.match(show_string)) { this.click(); } }); @@ -197,11 +197,11 @@ function capFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } -function addme(path, who) { +function addme(path, who, selectsetstring) { nomsg(); var target = $('[name="local_sets"] option:selected').val(); - if(target == 'Select a Set from this Course') { - alert('You need to pick a target set above so we know what set to which we should add this problem.'); + if(target == selectsetstring) { + alert(maketext("You need to pick a target set above so we know what set to which we should add this problem.")); return true; } var mydefaultRequestObject = init_webservice('addProblem'); diff --git a/lib/Apache/WeBWorK.pm b/lib/Apache/WeBWorK.pm index 926d7eb537..96c252bb20 100644 --- a/lib/Apache/WeBWorK.pm +++ b/lib/Apache/WeBWorK.pm @@ -67,7 +67,7 @@ sub handler($) { # We set the bimode for print to utf8 because some language options # use utf8 characters - binmode(STDOUT, ":utf8"); +# binmode(STDOUT, ":utf8"); # the warning handler accumulates warnings in $r->notes("warnings") for # later cumulative reporting diff --git a/lib/WeBWorK/ContentGenerator.pm b/lib/WeBWorK/ContentGenerator.pm index 379da6ad3e..b95db3f267 100644 --- a/lib/WeBWorK/ContentGenerator.pm +++ b/lib/WeBWorK/ContentGenerator.pm @@ -654,11 +654,12 @@ sub links { # experimental subroutine for generating links, to clean up the rest of the # code. ignore for now. (this is a closure over $self.) my $makelink = sub { + use utf8; my ($module, %options) = @_; my $urlpath_args = $options{urlpath_args} || {}; my $systemlink_args = $options{systemlink_args} || {}; - my $text = HTML::Entities::encode_entities($options{text}); + my $text = HTML::Entities::encode_entities($options{text},"<>&"); my $active = $options{active}; my %target = ($options{target} ? (target => $options{target}) : ()); @@ -768,7 +769,7 @@ sub links { } - print CGI::li(&$makelink("${pfx}Options", urlpath_args=>{%args}, systemlink_args=>\%systemlink_args)); + print CGI::li(&$makelink("${pfx}Options", text=>$r->maketext("User Settings"), urlpath_args=>{%args}, systemlink_args=>\%systemlink_args)); print CGI::li(&$makelink("${pfx}Grades", urlpath_args=>{%args}, systemlink_args=>\%systemlink_args)); diff --git a/lib/WeBWorK/ContentGenerator/Grades.pm b/lib/WeBWorK/ContentGenerator/Grades.pm index 884bd52cd3..10ec2dbebe 100644 --- a/lib/WeBWorK/ContentGenerator/Grades.pm +++ b/lib/WeBWorK/ContentGenerator/Grades.pm @@ -301,7 +301,7 @@ sub displayStudentStats { next; } else { push( @rows, CGI::Tr({}, CGI::td(WeBWorK::ContentGenerator::underscore2sp($setID)), - CGI::td({colspan=>($max_problems+2)}, CGI::em("No versions of this assignment have been taken."))) ); + CGI::td({colspan=>($max_problems+2)}, CGI::em($r->maketext("No versions of this assignment have been taken.")))) ); next; } } diff --git a/lib/WeBWorK/ContentGenerator/Hardcopy.pm b/lib/WeBWorK/ContentGenerator/Hardcopy.pm index abd67fa365..7f6ae18259 100644 --- a/lib/WeBWorK/ContentGenerator/Hardcopy.pm +++ b/lib/WeBWorK/ContentGenerator/Hardcopy.pm @@ -468,7 +468,7 @@ sub display_form { # we change the text a little bit depending on whether the user has multiuser privileges my $ss = $perm_multiuser ? "s" : ""; my $aa = $perm_multiuser ? " " : " a "; - my $phrase_for_privileged_users = $perm_multiuser ? "to privileged users or" : ""; + my $phrase_for_privileged_users = $perm_multiuser ? $r->maketext("to privileged users or") : ""; my $button_label = $perm_multiuser ? $r->maketext("Generate hardcopy for selected sets and selected users") : $r->maketext("Generate Hardcopy"); # print CGI::start_p(); diff --git a/lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm b/lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm index 0a76e9b4f3..319ee9ed28 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm @@ -23,6 +23,7 @@ use File::Path; use File::Copy; use File::Spec; use String::ShellQuote; +use utf8; =head1 NAME @@ -160,7 +161,7 @@ sub body { elsif($action eq "Rename" || $action eq $r->maketext("Rename")) {$self->Rename;} elsif($action eq "Delete" || $action eq $r->maketext("Delete")) {$self->Delete;} elsif($action eq "Make Archive" || $action eq $r->maketext("Make Archive")) {$self->MakeArchive;} - elsif($action eq "Unpack" || $action eq $r->maketext("Unpack")) {$self->UnpackArchive;} + elsif($action eq "Unpack Archive" || $action eq $r->maketext("Unpack Archive")) {$self->UnpackArchive;} elsif($action eq "New Folder" || $action eq $r->maketext("New Folder")) {$self->NewFolder;} elsif($action eq "New File" || $action eq $r->maketext("New File")) {$self->NewFile;} elsif($action eq "Upload" || $action eq $r->maketext("Upload")) {$self->Upload;} @@ -287,11 +288,12 @@ sub Refresh { } function checkArchive(files,disabled) { var button = document.getElementById('MakeArchive'); - //button.value = 'Make Archive'; + button.value = 'Make Archive'; if (disabled) return; - if (!files.childNodes[files.selectedIndex].value.match(/\\.(tar|tar\\.gz|tgz)\$/)) return; + if (!files[files.selectedIndex].value.match(/\\.(tar|tar\\.gz|tgz)\$/)) + return; for (var i = files.selectedIndex+1; i < files.length; i++) - {if (files.childNodes[i].selected) return} + {if (files[i].selected) return;} button.value = 'Unpack Archive'; } EOF @@ -454,7 +456,7 @@ sub View { my $fileManagerPage = $urlpath->newFromModule($urlpath->module, $r, courseID => $self->{courseName}); my $fileManagerURL = $self->systemLink($fileManagerPage, params => {download => $filename, pwd => $pwd}); print CGI::div({style=>"float:right"}, - CGI::a({href=>$fileManagerURL},"Download")); + CGI::a({href=>$fileManagerURL},$r->maketext("Download"))); print CGI::p(),CGI::b($name),CGI::p(); print CGI::hr(); @@ -469,7 +471,7 @@ sub View { print CGI::img({src=>$fileManagerURL, border=>0}); } else { print CGI::div({class=>"ResultsWithError"}, - "The file does not appear to be a text file."); + $r->maketext("The file does not appear to be a text file.")); } } @@ -510,7 +512,7 @@ sub Edit { } my $data = readFile($file); if (!isText($data)) { - $self->addbadmessage($r->maketext("The file does not appear to be a text file")); + $self->addbadmessage($r->maketext("The file does not appear to be a text file.")); $self->Refresh; return; } @@ -734,14 +736,14 @@ sub Delete { CGI::p({style=>"color:red"},$r->maketext("There is no undo for deleting files or directories!")), CGI::p($r->maketext("Really delete the items listed above?")), CGI::div({style=>"float:left; padding-left:3ex"}, - CGI::input({type=>"submit",name=>"action",value=>"Cancel"})), + CGI::input({type=>"submit",name=>"action",value=>$r->maketext("Cancel")})), CGI::div({style=>"float:right; padding-right:3ex"}, - CGI::input({type=>"submit",name=>"action",value=>"Delete"})), + CGI::input({type=>"submit",name=>"action",value=>$r->maketext("Delete")})), ), ); print CGI::end_table(); - print CGI::hidden({name=>"confirmed",value=>"Delete"}); + print CGI::hidden({name=>"confirmed",value=>$r->maketext("Delete")}); foreach my $file (@files) {print CGI::hidden({name=>"files",value=>$file})} $self->HiddenFlags; } @@ -767,7 +769,7 @@ sub MakeArchive { @files = readpipe $tar." 2>&1"; if ($? == 0) { my $n = scalar(@files); - $self->addgoodmessage($r->maketext("Archive '[_1]' created successfully ([quant, _2, file])",$archive, $n)); + $self->addgoodmessage($r->maketext("Archive '[_1]' created successfully ([quant,_2,file])",$archive, $n)); } else { $self->addbadmessage($r->maketext("Can't create archive '[_1]': command returned [_2]",$archive,systemError($?))); } @@ -903,7 +905,7 @@ sub Upload { $self->Confirm($r->maketext("File [_1] already exists. Overwrite it, or rename it as:",$name).CGI::p(),uniqueName($dir,$name),$r->maketext("Rename"),$r->maketext("Overwrite")); #$self->Confirm("File ".CGI::b($name)." already exists. Overwrite it, or rename it as:".CGI::p(),uniqueName($dir,$name),"Rename","Overwrite"); - print CGI::hidden({name=>"action",value=>"Upload"}); + print CGI::hidden({name=>"action",value=>$r->maketext("Upload")}); print CGI::hidden({name=>"file",value=>$fileIDhash}); return; } @@ -932,7 +934,7 @@ sub Upload { } if (-e $file) { - $self->addgoodmessage($r->maketext("File '[_2]' uploaded successfully",$name)); + $self->addgoodmessage($r->maketext("File '[_1]' uploaded successfully",$name)); if ($name =~ m/\.(tar|tar\.gz|tgz)$/ && $self->getFlag('unpack')) { if ($self->unpack($name) && $self->getFlag('autodelete')) { if (unlink($file)) {$self->addgoodmessage($r->maketext("Archive '[_1]' deleted", $name))} diff --git a/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor2.pm b/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor2.pm index 4996848ef9..2ebb7cf9c8 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor2.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor2.pm @@ -436,10 +436,10 @@ sub title { my $problemNumber = $r->urlpath->arg("problemID"); my $file_type = $self->{'file_type'} || ''; - return "Set Header for set $setID" if ($file_type eq 'set_header'); - return "Hardcopy Header for set $setID" if ($file_type eq 'hardcopy_header'); - return "Course Information for course $courseName" if ($file_type eq 'course_info'); - return "Options Information" if ($file_type eq 'options_info'); + return $r->maketext("Set Header for set [_1]", $setID) if ($file_type eq 'set_header'); + return $r->maketext("Hardcopy Header for set [_1]", $setID) if ($file_type eq 'hardcopy_header'); + return $r->maketext("Course Information for course [_1]", $courseName) if ($file_type eq 'course_info'); + return $r->maketext("Options Information") if ($file_type eq 'options_info'); if ($setID) { my $set = $r->db->getGlobalSet($setID); @@ -600,14 +600,14 @@ sub body { my $file_type = $self->{file_type}; my %titles = ( - problem => CGI::b("set $fullSetName/problem $prettyProblemNumber"), - blank_problem => "blank problem", - set_header => "header file", - hardcopy_header => "hardcopy header file", - course_info => "course information", - options_info => "options information", - '' => 'Unknown file type', - source_path_for_problem_file => " unassigned problem file: ".CGI::b("set $setName/problem $prettyProblemNumber"), + problem => CGI::b($r->maketext("set [_1]/problem [_2]", $fullSetName, $prettyProblemNumber)), + blank_problem => $r->maketext("blank problem"), + set_header => $r->maketext("header file"), + hardcopy_header => $r->maketext("hardcopy header file"), + course_info => $r->maketext("course information"), + options_info => $r->maketext("options information"), + '' => $r->maketext("Unknown file type"), + source_path_for_problem_file => $r->maketext(" unassigned problem file: ").CGI::b($r->maketext("set [_1]/problem [_2]",$setName, $prettyProblemNumber)), ); my $header = CGI::i($r->maketext("Editing [_1] in file '[_2]'",$titles{$file_type}, $self->shortPath($inputFilePath))); $header = ($self->isTempEditFilePath($inputFilePath) ) ? CGI::div({class=>'temporaryFile'},$header) : $header; # use colors if temporary file @@ -1380,9 +1380,9 @@ sub add_problem_form { $allSetNames[$j] =~ s|\.def||; } my $labels = { - problem => 'problem', - set_header => 'set header', - hardcopy_header => 'hardcopy header', + problem => $r->maketext('problem'), + set_header => $r->maketext('set header'), + hardcopy_header => $r->maketext('hardcopy header'), }; return "" if $self->{file_type} eq 'course_info' || $self->{file_type} eq 'options_info'; return join(" ", diff --git a/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail2.pm b/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail2.pm index ebfc4324e7..554b4bd5b8 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail2.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail2.pm @@ -227,10 +227,10 @@ use constant FIELD_PROPERTIES => { type => "choose", override => "all", choices => [qw( default gateway proctored_gateway jitar)], - labels => { default => "homework", - gateway => "gateway/quiz", - proctored_gateway => "proctored gateway/quiz", - jitar => "just-in-time" + labels => { default => x("homework"), + gateway => x("gateway/quiz"), + proctored_gateway => x("proctored gateway/quiz"), + jitar => x("just-in-time") }, }, version_time_limit => { diff --git a/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList2.pm b/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList2.pm index fea14ce75a..d05b660cfd 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList2.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList2.pm @@ -1197,7 +1197,7 @@ sub create_handler { # Assign set to current active user my $userName = $r->param('user'); # FIXME possible security risk $self->assignSetToUser($userName, $newSetRecord); # cures weird date error when no-one assigned to set - $self->addgoodmessage("Set $newSetID was assigned to $userName."); # not currently used + $self->addgoodmessage($r->maketext("Set [_1] was assigned to [_2].", $newSetID,$userName)); # not currently used push @{ $self->{visibleSetIDs} }, $newSetID; push @{ $self->{allSetIds} }, $newSetID; diff --git a/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm b/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm index f6dc33aa31..75db4f3819 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm @@ -746,7 +746,7 @@ sub print_form { print CGI::table( { -border=>2,-cellpadding=>4}, CGI::Tr( {}, CGI::td({}, CGI::submit(-name=>'sendEmail', -id=>"sendEmail_id", -value=>$r->maketext('Send Email')) ), "\n", - CGI::td({}, CGI::submit(-name=>'saveMessage', -value=>$r->maketext('Save')),' ',$r->maketext('to'),' ',$output_file), " \n", + CGI::td({}, CGI::submit(-name=>'saveMessage', -value=>$r->maketext('Save')),' ',$r->maketext('to '),$output_file), " \n", CGI::td({}, CGI::submit(-name=>'saveAs', -value=>$r->maketext('Save as').":"), CGI::textfield(-name=>'savefilename', -size => 20, -value=> "$output_file", -override=>1) ), "\n", diff --git a/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm b/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm index 687649fa1d..1aceab0551 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm @@ -48,6 +48,8 @@ use constant MAX_SHOW_DEFAULT => 20; use constant NO_LOCAL_SET_STRING => x('No sets in this course yet'); use constant SELECT_SET_STRING => x('Select a Set from this Course'); use constant SELECT_LOCAL_STRING => x('Select a Problem Collection'); +use constant SELECT_HMW_SET_STRING => x('Select a Homework Set'); +use constant SELECT_SETDEF_FILE_STRING => x('Select a Set Definition File'); use constant MY_PROBLEMS => x('My Problems'); use constant MAIN_PROBLEMS => x('Unclassified Problems'); use constant ALL_CHAPTERS => 'All Chapters'; @@ -383,7 +385,7 @@ sub view_problems_line { my $defaultMax = $r->param('max_shown') || MAX_SHOW_DEFAULT; $result .= ' '.$r->maketext('Max. Shown:').' '. CGI::popup_menu(-name=> 'max_shown', - -values=>[5,10,15,20,25,30,50,'All'], + -values=>[5,10,15,20,25,30,50,$r->maketext("All")], -default=> $defaultMax); # Option of whether to show hints and solutions my $defaultHints = $r->param('showHints') || SHOW_HINTS_DEFAULT; @@ -407,7 +409,7 @@ sub browse_local_panel { my $list_of_prob_dirs= get_problem_directories($r,$lib); if(scalar(@$list_of_prob_dirs) == 0) { - $library_selected = "Found no directories containing problems"; + $library_selected = $r->maketext("Found no directories containing problems"); unshift @{$list_of_prob_dirs}, $library_selected; } else { my $default_value = $r->maketext(SELECT_LOCAL_STRING); @@ -441,7 +443,7 @@ sub browse_mysets_panel { my $r = $self->r; my $library_selected = shift; my $list_of_local_sets = shift; - my $default_value = "Select a Homework Set"; + my $default_value = $r->maketext(SELECT_HMW_SET_STRING); if(scalar(@$list_of_local_sets) == 0) { $list_of_local_sets = [$r->maketext(NO_LOCAL_SET_STRING)]; @@ -685,9 +687,9 @@ sub browse_library_panel2adv { my $count_line = WeBWorK::Utils::ListingDB::countDBListings($r); if($count_line==0) { - $count_line = "There are no matching WeBWorK problems"; + $count_line = $r->maketext("There are no matching WeBWorK problems"); } else { - $count_line = "There are $count_line matching WeBWorK problems"; + $count_line = $r->maketext("There are [_1] matching WeBWorK problems", $count_line); } # Formatting level checkboxes by hand @@ -789,7 +791,7 @@ sub browse_setdef_panel { my $r = $self->r; my $ce = $r->ce; my $library_selected = shift; - my $default_value = "Select a Set Definition File"; + my $default_value = $r->maketext(SELECT_SETDEF_FILE_STRING); # in the following line, the parens after sort are important. if they are # omitted, sort will interpret get_set_defs as the name of the comparison # function, and ($ce->{courseDirs}{templates}) as a single element list to @@ -932,13 +934,14 @@ sub make_top_row { $show_hide_path_button .= " ".CGI::hidden(-name=>"hidetext", -id=>"hidetext", -default=>$r->maketext("Hide all paths")); $show_hide_path_button .= " ".CGI::hidden(-name=>"showtext", -id=>"showtext", -default=>$r->maketext("Show all paths")); } - + + my $stringalert = $r->maketext(SELECT_SET_STRING); print CGI::Tr({}, CGI::td({-class=>"InfoPanel", -align=>"center"}, CGI::start_table({-border=>"0"}), CGI::Tr({}, CGI::td({ -align=>"center"}, CGI::button(-name=>"select_all", -style=>$these_widths, - -onClick=>'return addme("", "all")', + -onClick=>"return addme(\"\", \'all\', \"$stringalert\" )", -value=>$r->maketext("Add All")), CGI::submit(-name=>"cleardisplay", -style=>$these_widths, @@ -1001,7 +1004,7 @@ sub make_data_row { problemSeed=> $problem_seed} ), id=> "editit$cnt", - target=>"WW_Editor", title=>"Edit it"}, '' ); + target=>"WW_Editor", title=>$r->maketext("Edit it")}, '' ); my $displayMode = $self->r->param("mydisplayMode"); $displayMode = $self->r->ce->{pg}->{options}->{displayMode} @@ -1022,11 +1025,11 @@ sub make_data_row { displayMode => $displayMode, } ), target=>"WW_View", - title=>"Try it", + title=>$r->maketext("Try it"), id=>"tryit$cnt", style=>"text-decoration: none"}, ''); - my $inSet = ($self->{isInSet}{$sourceFileName})?" (in target set)" : " "; + my $inSet = ($self->{isInSet}{$sourceFileName})? " ".$r->maketext("(in target set)") : " "; $inSet = CGI::span({-id=>"inset$cnt", -style=>"text-align: right"}, CGI::i(CGI::b($inSet))); my $fpathpop = "$sourceFileName"; @@ -1062,7 +1065,7 @@ sub make_data_row { my $level =0; - my $rerand = $isstatic ? '' : ''; + my $rerand = $isstatic ? '' : ''; my $MOtag = $isMO ? $self->helpMacro("UsesMathObjects",'Uses Math Objects') : ''; $MOtag = ''.$MOtag.''; @@ -1104,19 +1107,21 @@ sub make_data_row { print $mltstart; # Print the cell + my $stringalert = $r->maketext(SELECT_SET_STRING); print CGI::Tr({-align=>"left", -id=>"pgrow$cnt", -style=>$noshow, class=>$noshowclass }, CGI::td( CGI::div({-class=>"lb-problem-header"}, CGI::span({-class=>"lb-problem-add"},CGI::button(-name=>"add_me", -value=>$r->maketext("Add"), - -title=>"Add problem to target set", - -onClick=>"return addme(\"$sourceFileName\", \'one\')")), + -title=>$r->maketext("Add problem to target set"), + -onClick=>"return addme(\"$sourceFileName\", \'one\', \"$stringalert\")")), "\n",CGI::span({-class=>"lb-problem-path"},CGI::span({id=>"filepath$cnt"},$r->maketext("Show path ..."))),"\n", - '', + '', CGI::span({-class=>"lb-problem-icons"}, $inSet, $MOtag, $mlt, $rerand, $edit_link, " ", $try_link, CGI::span({-name=>"dont_show", - -title=>"Hide this problem", + -title=>$r->maketext("Hide this problem"), -style=>"cursor: pointer", -onClick=>"return delrow($cnt)"}, "X")), $problem_stats, @@ -1227,7 +1232,7 @@ sub pre_header_initialize { my $ce = $r->ce; my $db = $r->db; my $maxShown = $r->param('max_shown') || MAX_SHOW_DEFAULT; - $maxShown = 10000000 if($maxShown eq 'All'); # let's hope there aren't more + $maxShown = 10000000 if($maxShown eq $r->maketext("All")); # let's hope there aren't more my $library_basic = $r->param('library_is_basic') || 1; $self->{problem_seed} = $r->param('problem_seed') || 1234; ## Fix some parameters @@ -1383,7 +1388,7 @@ sub pre_header_initialize { my $set_to_display = $self->{current_library_set}; debug("set_to_display is $set_to_display"); if (not defined($set_to_display) - or $set_to_display eq "Select a Homework Set" + or $set_to_display eq $r->maketext(SELECT_HMW_SET_STRING) or $set_to_display eq $r->maketext(NO_LOCAL_SET_STRING)) { $self->addbadmessage($r->maketext("You need to select a set from this course to view.")); } else { @@ -1420,7 +1425,7 @@ sub pre_header_initialize { my $set_to_display = $self->{current_library_set}; debug("set_to_display is $set_to_display"); if (not defined($set_to_display) - or $set_to_display eq "Select a Set Definition File" + or $set_to_display eq $r->maketext(SELECT_SETDEF_FILE_STRING) or $set_to_display eq $r->maketext(NO_LOCAL_SET_STRING)) { $self->addbadmessage($r->maketext("You need to select a set definition file to view.")); } else { diff --git a/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm b/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm index 3befebd934..578d4549c7 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm @@ -833,14 +833,14 @@ sub displaySets { CGI::Tr(CGI::td( {-align=>'left'}, [$r->maketext('Name').CGI::br().CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'first_name', %past_sort_methods})},$r->maketext('First')). '   '.CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'last_name', %past_sort_methods })},$r->maketext('Last')).CGI::br(). - CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'email_address', %past_sort_methods })},'Email'), + CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'email_address', %past_sort_methods })},$r->maketext('Email')), CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'score', %past_sort_methods})},$r->maketext("Score")), $r->maketext("Out Of"), # CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'index', %past_sort_methods})},'Ind'), $r->maketext("Problems").CGI::br().$problem_header, CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'section', %past_sort_methods})},$r->maketext('Section')), CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'recitation', %past_sort_methods})},$r->maketext('Recitation')), - CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'user_id', %past_sort_methods})},'Login Name'), + CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'user_id', %past_sort_methods})},$r->maketext('Login Name')), ]) ), diff --git a/lib/WeBWorK/ContentGenerator/Instructor/UserDetail.pm b/lib/WeBWorK/ContentGenerator/Instructor/UserDetail.pm index 00cc26eba6..bcd1761f33 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/UserDetail.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/UserDetail.pm @@ -283,13 +283,13 @@ sub body { print CGI::start_table({ border=> 1,cellpadding=>5}),"\n"; print CGI::Tr( - CGI::th({align=>'center',colspan=>3}, "Sets assigned to $userName ($editForUserID)") + CGI::th({align=>'center',colspan=>3}, $r->maketext("Sets assigned to [_1] ([_2])",$userName,$editForUserID)) ),"\n"; print CGI::Tr( CGI::th({ -align => "center"}, [ - "Assigned", - "Edit set for $editForUserID", - "Dates", + $r->maketext("Assigned"), + $r->maketext("Edit set for [_1]",$editForUserID), + $r->maketext("Dates"), ]) ),"\n"; @@ -412,19 +412,19 @@ sub checkDates { } if ($answer_date < $due_date || $answer_date < $open_date) { - $self->addbadmessage("Answers cannot be made available until on or after the due date in set $setID!"); + $self->addbadmessage($r->maketext("Answers cannot be made available until on or after the close date in set [_1]!",$setID)); $error = 1; } if ($due_date < $open_date) { - $self->addbadmessage("Answers cannot be due until on or after the open date in set $setID!"); + $self->addbadmessage($r->maketext("Answers cannot be due until on or after the open date in set [_1]!",$setID)); $error = 1; } if ($ce->{pg}{ansEvalDefaults}{enableReducedScoring} && $setRecord->enable_reduced_scoring && ($reduced_scoring_date < $open_date || $reduced_scoring_date > $due_date)) { - $self->addbadmessage("The reduced scoring date should be between the open date and the due date in set $setID!"); + $self->addbadmessage($r->maketext("The reduced scoring date should be between the open date and close date in set [_1]!",$setID)); $error = 1; } @@ -434,21 +434,21 @@ sub checkDates { my $seconds_per_year = 31_556_926; my $cutoff = $curr_time + $seconds_per_year*10; if ($open_date > $cutoff) { - $self->addbadmessage("Error: open date cannot be more than 10 years from now in set $setID"); + $self->addbadmessage($r->maketext("Error: open date cannot be more than 10 years from now in set [_1]",$setID)); $error = 1; } if ($due_date > $cutoff) { - $self->addbadmessage("Error: due date cannot be more than 10 years from now in set $setID"); + $self->addbadmessage($r->maketext("Error: close date cannot be more than 10 years from now in set [_1]",$setID)); $error = 1; } if ($answer_date > $cutoff) { - $self->addbadmessage("Error: answer date cannot be more than 10 years from now in set $setID"); + $self->addbadmessage($r->maketext("Error: answer date cannot be more than 10 years from now in set [_1]",$setID)); $error = 1; } if ($error) { - $self->addbadmessage("No date changes were saved!"); + $self->addbadmessage($r->maketext("No date changes were saved!")); } return {%dates,error=>$error}; } @@ -498,7 +498,7 @@ sub DBFieldTable { (CGI::input({ -name=>"$recordType.$recordID.$field", -id =>"$recordType.$recordID.${field}_id", -type=> "text", - -value => $userValue ? $self->formatDateTime($userValue,'','%m/%d/%Y at %I:%M%P') : "None Specified", + -value => $userValue ? $self->formatDateTime($userValue,'','%m/%d/%Y at %I:%M%P') : $r->maketext("None Specified"), -onchange => $onChange, -size => 25}) ) : "", diff --git a/lib/WeBWorK/ContentGenerator/Instructor/UserList2.pm b/lib/WeBWorK/ContentGenerator/Instructor/UserList2.pm index 0aec70a8a9..066b48f2b1 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/UserList2.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/UserList2.pm @@ -711,7 +711,7 @@ sub filter_handler { } elsif ($field eq 'status') { $record->{status} = $ce->status_abbrev_to_name($record->{status}); } - push @userIDs, $record->user_id if $record->{$field} =~ /^$regex/i; + push @userIDs, $record->user_id if $r->maketext($record->{$field}) =~ /^$regex/i; } $self->{visibleUserIDs} = \@userIDs; } elsif ($scope eq "match_ids") { diff --git a/lib/WeBWorK/ContentGenerator/Instructor/UsersAssignedToSet.pm b/lib/WeBWorK/ContentGenerator/Instructor/UsersAssignedToSet.pm index 9d0014bee3..81b28d97cc 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/UsersAssignedToSet.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/UsersAssignedToSet.pm @@ -209,7 +209,7 @@ sub body { print CGI::submit({name=>"assignToSelected", value=>$r->maketext("Save")}); print CGI::p( CGI::hr(), CGI::div( {class=>'ResultsWithError'}, - $r->maketext("There is NO undo for this function. Do not use it unless you know what you are doing! When you unassign a student using this button, or by unchecking their name, you destroy all of the data for homework set $setID for this student."), + $r->maketext("There is NO undo for this function. Do not use it unless you know what you are doing! When you unassign a student using this button, or by unchecking their name, you destroy all of the data for homework set [_1] for this student.",$setID), CGI::br(), CGI::submit({name=>"unassignFromAll", value=>$r->maketext("Unassign from All Users")}), CGI::radio_group(-name=>"unassignFromAllSafety", -values=>[0,1], -default=>0, -labels=>{0=>$r->maketext('Read only'), 1=>$r->maketext('Allow unassign')}), diff --git a/lib/WeBWorK/ContentGenerator/Problem.pm b/lib/WeBWorK/ContentGenerator/Problem.pm index dcd4711a55..b4d0e9ed74 100644 --- a/lib/WeBWorK/ContentGenerator/Problem.pm +++ b/lib/WeBWorK/ContentGenerator/Problem.pm @@ -1603,7 +1603,7 @@ sub output_score_summary{ my $notCountedMessage = ($problem->value) ? "" : $r->maketext("(This problem will not count towards your grade.)"); print join("", $submitAnswers ? $scoreRecordedMessage . CGI::br() : "", - $r->maketext("You have attempted this problem [quant,_1,time,times].",$attempts), $prMessage, CGI::br(), + $r->maketext("You have attempted this problem [quant,_1,time,times,0 time].",$attempts), $prMessage, CGI::br(), $submitAnswers ? $r->maketext("You received a score of [_1] for this attempt.",wwRound(0, $pg->{result}->{score} * 100).'%') . CGI::br():'', $problem->attempted diff --git a/lib/WeBWorK/Localize.pm b/lib/WeBWorK/Localize.pm index 5c51f2cfae..c0a68bbee4 100644 --- a/lib/WeBWorK/Localize.pm +++ b/lib/WeBWorK/Localize.pm @@ -15,7 +15,7 @@ use WeBWorK::Utils qw(x); my $path = "$WeBWorK::Constants::WEBWORK_DIRECTORY/lib/WeBWorK/Localize"; my $pattern = File::Spec->catfile($path, '*.[pm]o'); -my $decode = 1; +my $decode = 0; my $encoding = undef; # For some reason this next stanza needs to be evaluated @@ -87,8 +87,8 @@ sub negquant { '_LOGIN_MESSAGE' => x(q{If you check [_1] your login information will be remembered by the browser you are using, allowing you to visit WeBWorK pages without typing your user name and password (until your session expires). This feature is not safe for public workstations, untrusted machines, and machines over which you do not have direct control.}), - '_HMWKSETS_EDITOR_DESCRIPTION' => x(q{This is the homework sets editor page where you can view and edit the homework sets that exist in this course and the problems that they contain. The top of the page contains forms which allow you to filter which sets to display in the table, sort the sets in a chosen order, edit homework sets, publish homework sets, import/export sets from/to an external file, score sets, or create/delete sets. To use, please select the action you would like to perform, enter in the relevant information in the fields below, and hit the \"Take Action!\" button at the bottom of the form. The bottom of the page contains a table displaying the sets and several pieces of relevant information.}), - "_CLASSLIST_EDITOR_DESCRIPTION" => x(q{This is the classlist editor page, where you can view and edit the records of all the students currently enrolled in this course. The top of the page contains forms which allow you to filter which students to view, sort your students in a chosen order, edit student records, give new passwords to students, import/export student records from/to external files, or add/delete students. To use, please select the action you would like to perform, enter in the relevant information in the fields below, and hit the \"Take Action!\" button at the bottom of the form. The bottom of the page contains a table containing the student usernames and their information.}), + '_HMWKSETS_EDITOR_DESCRIPTION' => x(q{This is the homework sets editor page where you can view and edit the homework sets that exist in this course and the problems that they contain. The top of the page contains forms which allow you to filter which sets to display in the table, sort the sets in a chosen order, edit homework sets, publish homework sets, import/export sets from/to an external file, score sets, or create/delete sets. To use, please select the action you would like to perform, enter in the relevant information in the fields below, and hit the "Take Action!" button at the bottom of the form. The bottom of the page contains a table displaying the sets and several pieces of relevant information.}), + "_CLASSLIST_EDITOR_DESCRIPTION" => x(q{This is the classlist editor page, where you can view and edit the records of all the students currently enrolled in this course. The top of the page contains forms which allow you to filter which students to view, sort your students in a chosen order, edit student records, give new passwords to students, import/export student records from/to external files, or add/delete students. To use, please select the action you would like to perform, enter in the relevant information in the fields below, and hit the "Take Action!" button at the bottom of the form. The bottom of the page contains a table containing the student usernames and their information.}), "_ACHIEVEMENTS_EDITOR_DESCRIPTION" => x(q{This is the Achievement Editor. It is used to edit the achievements available to students. Please keep in mind the following facts: Achievments are displayed, and evaluated, in the order they are listed. The "secret" category creates achievements which are not visible to students until they are earned. The "level" category is used for the achievements associated to a users level.}), @@ -100,6 +100,8 @@ sub negquant { "_USER_TABLE_SUMMARY" => x(q{A table showing all the current users along with several fields of user information. The fields from left to right are: Login Name, Login Status, Assigned Sets, First Name, Last Name, Email Address, Student ID, Enrollment Status, Section, Recitation, Comments, and Permission Level. Clicking on the links in the column headers will sort the table by the field it corresponds to. The Login Name fields contain checkboxes for selecting the user. Clicking the link of the name itself will allow you to act as the selected user. There will also be an image link following the name which will take you to a page where you can edit the selected user's information. Clicking the emails will allow you to email the corresponding user. Clicking the links in the entries in the assigned sets columns will take you to a page where you can view and reassign the sets for the selected user.}), + "_ANSWER_LOG_DESCRIPTION" => x(q{This is the past answer viewer. Students can only see their answers, and they will not be able to see which parts are correct. Instructors can view any users answers using the form below and the answers will be colored according to correctness.}), + "_ONE_COLUMN" => x('One Column'), "_TWO_COLUMNS" => x('Two Columns'), @@ -195,7 +197,7 @@ my $ConfigStrings = [ [x('Optional Modules'), { var => 'achievementsEnabled', doc => x('Enable Course Achievements'), - doc2 => x('Activiating this will enable Mathchievements for webwork. Mathchievements can be managed by using the Achievement Editor link.'), + doc2 => x('Activating this will enable Mathchievements for webwork. Mathchievements can be managed by using the Achievement Editor link.'), type => 'boolean' }, { var => 'achievementPointsPerProblem', @@ -205,7 +207,7 @@ my $ConfigStrings = [ }, { var => 'achievementItemsEnabled', doc => x('Enable Achievement Items'), - doc2 => x('Activiating this will enable achievement items. This features rewards students who earn achievements with items that allow them to affect their homework in a limited way.'), + doc2 => x('Activating this will enable achievement items. This features rewards students who earn achievements with items that allow them to affect their homework in a limited way.'), type => 'boolean' }, { var => 'options{enableConditionalRelease}', @@ -253,6 +255,11 @@ my $ConfigStrings = [ doc2 => x('Enables use of the Show Me Another button, which offers the student a newly-seeded version of the current problem, complete with solution (if it exists for that problem).'), type => 'boolean' }, + { var => 'pg{options}{showMeAnotherDefault}', + doc => x('Default number of attempts before Show Me Another can be used (-1 => Never)'), + doc2 => x('This is the default number of attempts before show me another becomes available to students. It can be set to -1 to disable show me another by default.'), + type => 'number' + }, { var => 'pg{options}{showMeAnotherMaxReps}', doc => x('Maximum times Show me Another can be used per problem (-1 => unlimited)'), doc2 => x('The Maximum number of times Show me Another can be used per problem by a student. If set to -1 then there is no limit to the number of times that Show Me Another can be used.'), @@ -345,13 +352,13 @@ my $ConfigStrings = [ { var => 'pg{options}{displayMode}', doc => x('The default display mode'), - doc2 => 'Enter one of the allowed display mode types above. See \'display modes entry\' for descriptions.', + doc2 => x('Enter one of the allowed display mode types above. See \'display modes entry\' for descriptions.'), min => 1, values => [qw(MathJax images plainText)], type => 'popuplist' }, { var => 'pg{specialPGEnvironmentVars}{MathView}', - doc => 'Use MathView editor for answer entry', + doc => x('Use MathView editor for answer entry'), doc2 => x('Set to true to display MathView equation editor icon next to each answer box'), type => 'boolean' }, @@ -374,7 +381,7 @@ my $ConfigStrings = [ { var => 'pg{ansEvalDefaults}{numRelPercentTolDefault}', doc => x('Allowed error, as a percentage, for numerical comparisons'), - doc2 => "When numerical answers are checked, most test if the student's answer is close enough to the programmed answer be computing the error as a percentage of the correct answer. This value controls the default for how close the student answer has to be in order to be marked correct.

A value such as 0.1 means 0.1 percent error is allowed.", + doc2 => x(q{When numerical answers are checked, most test if the student's answer is close enough to the programmed answer be computing the error as a percentage of the correct answer. This value controls the default for how close the student answer has to be in order to be marked correct.

A value such as 0.1 means 0.1 percent error is allowed.}), type => 'number' }, ], diff --git a/lib/WeBWorK/Localize/webwork2.pot b/lib/WeBWorK/Localize/webwork2.pot index 5e4763e090..4089d3e064 100644 --- a/lib/WeBWorK/Localize/webwork2.pot +++ b/lib/WeBWorK/Localize/webwork2.pot @@ -1493,6 +1493,10 @@ msgstr "" msgid "Default Length of Reduced Scoring Period in minutes" msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/Localize.pm:257 +msgid "Default number of attempts before Show Me Another can be used (-1 => Never)" +msgstr "" + #: /opt/webwork/webwork2/lib/WeBWorK/Localize.pm:177 msgid "Default Time that the Assignment is Due" msgstr "" @@ -2534,6 +2538,10 @@ msgstr "" msgid "Hide path:" msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm:1120 +msgid "Hide this problem" +msgstr "" + #: /opt/webwork/pg/macros/PGbasicmacros.pl:1538 msgid "Hint:" msgstr "" @@ -3654,6 +3662,10 @@ msgstr "" msgid "Publish" msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm:1065 +msgid "Randomize" +msgstr "" + #: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm:33 msgid "RECITATION" msgstr "" @@ -4109,10 +4121,18 @@ msgstr "" msgid "Select a database layout below." msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm:51 +msgid "Select a Homework Set" +msgstr "" + #: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm:1448 /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm:1679 /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm:3030 msgid "Select a listing format:" msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm:52 +msgid "Select a Set Definition File" +msgstr "" + #: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/AchievementEditor.pm:287 msgid "Select above then:" msgstr "" @@ -5155,6 +5175,10 @@ msgstr "" msgid "This is the classlist editor page, where you can view and edit the records of all the students currently enrolled in this course. The top of the page contains forms which allow you to filter which students to view, sort your students in a chosen order, edit student records, give new passwords to students, import/export student records from/to external files, or add/delete students. To use, please select the action you would like to perform, enter in the relevant information in the fields below, and hit the \\\"Take Action!\\\" button at the bottom of the form. The bottom of the page contains a table containing the student usernames and their information." msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/Localize.pm:258 +msgid "This is the default number of attempts before show me another becomes available to students. It can be set to -1 to disable show me another by default." +msgstr "" + #: /opt/webwork/webwork2/lib/WeBWorK/Localize.pm:90 msgid "This is the homework sets editor page where you can view and edit the homework sets that exist in this course and the problems that they contain. The top of the page contains forms which allow you to filter which sets to display in the table, sort the sets in a chosen order, edit homework sets, publish homework sets, import/export sets from/to an external file, score sets, or create/delete sets. To use, please select the action you would like to perform, enter in the relevant information in the fields below, and hit the \\\"Take Action!\\\" button at the bottom of the form. The bottom of the page contains a table displaying the sets and several pieces of relevant information." msgstr "" @@ -5537,6 +5561,10 @@ msgstr "" msgid "Use log base 10 instead of base e" msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/Localize.pm:359 +msgid "Use MathView editor for answer entry" +msgstr "" + #: /opt/webwork/webwork2/lib/WeBWorK/Localize.pm:370 msgid "Use older answer checkers" msgstr "" @@ -6011,7 +6039,7 @@ msgstr "" #. ($attempts) #: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm:1606 -msgid "You have attempted this problem %quant(%1,time,times)." +msgid "You have attempted this problem %quant(%1,time,times,0 time)." msgstr "" #: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Logout.pm:158 @@ -6625,6 +6653,10 @@ msgstr "" msgid "from" msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail2.pm:231 +msgid "gateway/quiz" +msgstr "" + #: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/UserList2.pm:913 msgid "giving new passwords to all users" msgstr "" @@ -6676,6 +6708,10 @@ msgstr "" msgid "hidden sets" msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail2.pm:230 +msgid "homework" +msgstr "" + # doe snot need to be translated #. ('j','k','_0') #. ('j','k') @@ -6704,11 +6740,20 @@ msgstr "" msgid "index" msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm:1896 +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail2.pm:2106 +msgid "individual versions" +msgstr "" + #. ($restrictLoc, $setName) #: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList2.pm:1784 msgid "input set location %1 already exists for set %2." msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail2.pm:233 +msgid "just-in-time" +msgstr "" + #: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm:705 msgid "list of insertable macros" msgstr "" @@ -6790,6 +6835,10 @@ msgstr "" msgid "number of students not defined" msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker2.pm:1903 +msgid "of" +msgstr "" + #: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/Index.pm:381 msgid "one set" msgstr "" @@ -6872,6 +6921,10 @@ msgstr "" msgid "problems" msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail2.pm:232 +msgid "proctored gateway/quiz" +msgstr "" + #: /opt/webwork/webwork2/lib/WeBWorK/Localize.pm:107 msgid "professor" msgstr "" @@ -6948,6 +7001,11 @@ msgstr "" msgid "set" msgstr "" +#. ($setName, $prettyProblemNumber) +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor2.pm:610 +msgid "set %1/problem %2" +msgstr "" + #: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor.pm:646 /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm:593 msgid "sets" msgstr "" @@ -7008,6 +7066,10 @@ msgstr "" msgid "showing visible sets" msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker2.pm:1903 +msgid "shown." +msgstr "" + #: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm:616 msgid "still open" msgstr "" @@ -7093,6 +7155,11 @@ msgstr "" msgid "to" msgstr "" +# Context is Save to _____ +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm:749 +msgid "to " +msgstr "" + #: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/AchievementList.pm:429 msgid "to all users, create global data, and" msgstr "" @@ -7101,6 +7168,10 @@ msgstr "" msgid "to one set" msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm:471 +msgid "to privileged users or" +msgstr "" + #: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/Stats.pm:718 /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/Stats_old.pm:538 msgid "top score" msgstr "" @@ -7116,6 +7187,10 @@ msgstr "" msgid "unable to write to directory %1" msgstr "" +#: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor2.pm:610 +msgid " unassigned problem file: " +msgstr "" + #: /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail2.pm:357 /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/ProblemSet.pm:504 msgid "unlimited" msgstr "" diff --git a/lib/WeBWorK/Utils.pm b/lib/WeBWorK/Utils.pm index d0d49b8261..4ca41a0efb 100644 --- a/lib/WeBWorK/Utils.pm +++ b/lib/WeBWorK/Utils.pm @@ -31,6 +31,8 @@ use DateTime; use DateTime::TimeZone; use Date::Parse; use Date::Format; +use Encode; + use File::Copy; use File::Spec::Functions qw(canonpath); use Time::Zone; @@ -640,7 +642,7 @@ sub formatDateTime($;$;$;$) { $dt = DateTime->from_epoch(epoch => $dateTime, time_zone => $display_tz); } #warn "\t\$dt = ", $dt->strftime(DATE_FORMAT), "\n"; - return $dt->strftime($format_string); + return Encode::encode_utf8($dt->strftime($format_string)); }