pax_global_header00006660000000000000000000000064134117610240014511gustar00rootroot0000000000000052 comment=7cc701fb8fe4aedea8a9fc250e09571bfebdbd2e auto-multiple-choice-1.4.0/000077500000000000000000000000001341176102400155445ustar00rootroot00000000000000auto-multiple-choice-1.4.0/AMC-analyse.pl000077500000000000000000000402661341176102400201460ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use File::Spec::Functions qw/tmpdir/; use File::Temp qw/ tempfile tempdir /; use Getopt::Long; use AMC::Path; use AMC::Basic; use AMC::Exec; use AMC::Queue; use AMC::Calage; use AMC::Subprocess; use AMC::Boite qw/min max/; use AMC::Data; use AMC::DataModule::capture qw/:zone :position/; use AMC::DataModule::layout qw/:flags/; use AMC::Gui::Avancement; my $pid=''; my $queue=''; sub catch_signal { my $signame = shift; debug "*** AMC-analyse : signal $signame, transfered to $pid..."; kill 2,$pid if($pid); $queue->killall() if($queue); die "Killed"; } $SIG{INT} = \&catch_signal; my $data_dir=""; my $cr_dir=""; my $debug=''; my $debug_image_dir=''; my $debug_image=''; my $debug_pixels=0; my $progress=0; my $progress_id=0; my $scans_list; my $n_procs=0; my $project_dir=''; my $tol_mark=''; my $prop=0.8; my $bw_threshold=0.6; my $blur='1x1'; my $threshold='60%'; my $multiple=''; my $ignore_red=1; my $pre_allocate=0; my $try_three=1; my $tag_overwritten=1; GetOptions("data=s"=>\$data_dir, "cr=s"=>\$cr_dir, "tol-marque=s"=>\$tol_mark, "prop=s"=>\$prop, "bw-threshold=s"=>\$bw_threshold, "debug=s"=>\$debug, "debug-pixels!"=>\$debug_pixels, "progression=s"=>\$progress, "progression-id=s"=>\$progress_id, "liste-fichiers=s"=>\$scans_list, "projet=s"=>\$project_dir, "n-procs=s"=>\$n_procs, "debug-image-dir=s"=>\$debug_image_dir, "multiple!"=>\$multiple, "ignore-red!"=>\$ignore_red, "pre-allocate=s"=>\$pre_allocate, "try-three!"=>\$try_three, "tag-overwritten!"=>\$tag_overwritten, ); $tag_overwritten=0 if($multiple); utf8::downgrade($debug_image_dir); use_gettext; set_debug($debug); $queue=AMC::Queue::new('max.procs',$n_procs); my $progress_h=AMC::Gui::Avancement::new($progress,'id'=>$progress_id); my $data; my $layout; # Reads scan files from command line my @scans=@ARGV; # Adds scan files from a list file if($scans_list && open(LISTE,$scans_list)) { while() { chomp; if(-f $_) { debug "Scan from list : $_"; push @scans,$_; } else { debug_and_stderr "WARNING. File does not exist : $_"; } } close(LISTE); } exit(0) if($#scans <0); sub error { my ($process,$e,$silent)=@_; if($process) { if($debug_image) { $process->commande("output ".$debug_image); $process->ferme_commande; } } if($silent) { debug $e; } else { debug "ERROR($scan): $e\n"; print "ERROR($scan): $e\n"; } exit(1); } sub check_rep { my ($r,$create)=(@_); if($create && $r && ! -x $r) { mkdir($r); } die "ERROR: directory does not exist: $r" if(! -d $r); } $data_dir=$project_dir."/data" if($project_dir && !$data_dir); $cr_dir=$project_dir."/cr" if($project_dir && !$cr_dir); check_rep($data_dir); check_rep($cr_dir,1); my $delta=$progress/(1+$#scans); my $tol_mark_plus=1/5; my $tol_mark_moins=1/5; if($tol_mark) { if($tol_mark =~ /(.*),(.*)/) { $tol_mark_moins=$1; $tol_mark_plus=$2; } else { $tol_mark_moins=$tol_mark; $tol_mark_plus=$tol_mark; } } ######################################## # Gets layout data from a (random) page sub code_cb { my ($nombre,$chiffre)=(@_); return("$nombre:$chiffre"); } sub detecte_cb { my $k=shift; if($k =~ /^([0-9]+):([0-9]+)$/) { return($1,$2); } else { return(); } } sub get_layout_data { my ($student,$page,$all)=@_; my $r={'corners.test'=>{},'zoom.file'=>{},'darkness.data'=>{}, 'boxes'=>{},'flags'=>{}}; ($r->{'width'},$r->{'height'},$r->{'markdiameter'},undef) =$layout->dims($student,$page); $r->{'frame'}=AMC::Boite::new_complete($layout->all_marks($student,$page)); for my $c ($layout->type_info('digit',$student,$page)) { my $k=code_cb($c->{'numberid'},$c->{'digitid'}); $r->{'boxes'}->{$k}=AMC::Boite::new_MN(map { $c->{$_} } (qw/xmin ymin xmax ymax/)); } if($all) { for my $c ($layout->type_info('box',$student,$page)) { $r->{'boxes'}->{$c->{'question'}.".".$c->{'answer'}}= AMC::Boite::new_MN(map { $c->{$_} } (qw/xmin ymin xmax ymax/)); $r->{'flags'}->{$c->{'question'}.".".$c->{'answer'}}= $c->{'flags'}; } for my $c ($layout->type_info('namefield',$student,$page)) { $r->{'boxes'}->{'namefield'}= AMC::Boite::new_MN(map { $c->{$_} } (qw/xmin ymin xmax ymax/)); } } return($r); } my $t_type='lineaire'; my $cale=AMC::Calage::new('type'=>$t_type); $data=AMC::Data->new($data_dir); $layout=$data->module('layout'); $layout->begin_read_transaction('cRLY'); if($layout->pages_count()==0) { $layout->end_transaction('cRLY'); error('',"No layout"); } debug "".$layout->pages_count()." layouts\n"; my @ran=$layout->random_studentPage; my $random_layout=get_layout_data(@ran); $layout->end_transaction('cRLY'); $data->disconnect; ######################################## # Fits marks on scan to layout data sub command_transf { my ($process,$cale,@args)=@_; my @r=$process->commande(@args); for(@r) { $cale->{'t_'.$1}=$2 if(/([a-f])=(-?[0-9.]+)/); $cale->{'MSE'}=$1 if(/MSE=([0-9.]+)/); } } sub marks_fit { my ($process,$ld,$three)=@_; $cale=AMC::Calage::new('type'=>'lineaire'); command_transf($process,$cale, join(' ',"optim".($three? "3":""), $ld->{'frame'}->draw_points())); debug "MSE=".$cale->mse(); $ld->{'transf'}=$cale; } sub get_shape { my ($flags)=@_; if($flags & BOX_FLAGS_SHAPE_OVAL) { return('oval'); } return('square'); } ################################################## # Reads darkness of a particular box sub measure_box { my ($process,$ld,$k,@spc)=(@_); my $r=0; $ld->{'corners.test'}->{$k}=AMC::Boite::new(); if(@spc) { if($k =~ /^([0-9]+)\.([0-9]+)$/) { $process->commande(join(' ',"id",@spc[0,1],$1,$2)) } } if(!($ld->{'flags'}->{$k} & BOX_FLAGS_DONTSCAN)) { $ld->{'boxes.scan'}->{$k}=AMC::Boite::new(); } else { $ld->{'boxes.scan'}->{$k}=$ld->{'boxes'}->{$k}->clone; $ld->{'boxes.scan'}->{$k}->transforme($ld->{'transf'}); } if(!($ld->{'flags'}->{$k} & BOX_FLAGS_DONTSCAN)) { my $pc; $pc=$ld->{'boxes'}->{$k} ->commande_mesure0($prop,get_shape($ld->{'flags'}->{$k})); for($process->commande($pc)) { if(/^TCORNER\s+(-?[0-9\.]+),(-?[0-9\.]+)$/) { $ld->{'boxes.scan'}->{$k}->def_point_suivant($1,$2); } if(/^COIN\s+(-?[0-9\.]+),(-?[0-9\.]+)$/) { $ld->{'corners.test'}->{$k}->def_point_suivant($1,$2); } if(/^PIX\s+([0-9]+)\s+([0-9]+)$/) { $r=($2==0 ? 0 : $1/$2); debug sprintf("Binary box $k: %d/%d = %.4f\n",$1,$2,$r); $ld->{'darkness.data'}->{$k}=[$2,$1]; } if(/^ZOOM\s+(.*)/) { $ld->{'zoom.file'}->{$k}=$1; } } } return($r); } ######################################## # Reads ID (student/page/check) from binary boxes sub decimal { my @ch=(@_); my $r=0; for (@ch) { $r=2*$r+$_; } return($r); } sub get_binary_number { my ($process,$ld,$i)=@_; my @ch=(); my $a=1; my $fin=''; do { my $k=code_cb($i,$a); if($ld->{'boxes'}->{$k}) { push @ch,(measure_box($process,$ld,$k)>.5 ? 1 : 0); $a++; } else { $fin=1; } } while(!$fin); return(decimal(@ch)); } sub get_id_from_boxes { my ($process,$ld,$data_layout)=@_; @epc=map { get_binary_number($process,$ld,$_) } (1,2,3); my $id_page="+".join('/',@epc)."+"; print "Page : $id_page\n"; debug("Found binary ID: $id_page"); $data_layout->begin_read_transaction('cFLY'); my $ok=$data_layout->exists(@epc); $data_layout->end_transaction('cFLY'); return($ok,@epc); } sub marks_fit_and_id { my ($process,$ld,$data_layout,$three)=@_; marks_fit($process,$ld,$three); return(get_id_from_boxes($process,$ld,$data_layout)); } my $process; my $temp_loc; my $temp_dir; my $commands; sub one_scan { my ($scan,$allocate)=@_; my $sf=$scan; if($project_dir) { $sf=abs2proj({'%PROJET',$project_dir, '%HOME'=>$ENV{'HOME'}, ''=>'%PROJET', }, $sf); } my $sf_file=$sf; $sf_file=~ s:.*/::; if($debug_image_dir) { $debug_image=$debug_image_dir."/$sf_file.png"; utf8::downgrade($debug_image); } debug "Analysing scan $scan"; $data->connect; $layout=$data->module('layout'); $commands=AMC::Exec::new('AMC-analyse'); $commands->signalise(); $process=AMC::Subprocess::new(); ########################################## # Marks detection ########################################## my @r; my @args=('-x',$random_layout->{'width'}, '-y',$random_layout->{'height'}, '-d',$random_layout->{'markdiameter'}, '-p',$tol_mark_plus,'-m',$tol_mark_moins, '-c',($try_three ? 3 : 4), '-t',$bw_threshold, '-o',($debug_image ? $debug_image : 1) ); push @args,'-P' if($debug_image); push @args,'-r' if($ignore_red); push @args,'-k' if($debug_pixels); $process->set('args',\@args); @r=$process->commande("load ".$scan); my @c=(); for(@r) { if(/Frame\[([0-9]+)\]:\s*(-?[0-9.]+)\s*[,;]\s*(-?[0-9.]+)/) { push @c,$2,$3; } } $cadre_general=AMC::Boite::new_complete(@c); debug "Global frame:", $cadre_general->txt(); ########################################## # ID detection ########################################## my @epc; my $upside_down=0; my $ok; ($ok,@epc)=marks_fit_and_id($process,$random_layout,$layout); if($try_three && !$ok) { # now tries with only 3 corner marks: ($ok,@epc)=marks_fit_and_id($process,$random_layout,$layout,1); } if(!$ok) { # Unknown ID: tries again upside down $process->commande("rotate180"); ($ok,@epc)=marks_fit_and_id($process,$random_layout,$layout); if($try_three && !$ok) { # now tries with only 3 corner marks: ($ok,@epc)=marks_fit_and_id($process,$random_layout,$layout,1); } $upside_down=1; } if(!$ok) { # Failed! # Page ID has not been found: report it in the database. my $capture=AMC::Data->new($data_dir)->module('capture'); $capture->begin_transaction('CFLD'); $capture->failed($sf); $capture->end_transaction('CFLD'); error($process,sprintf("No layout for ID +%d/%d/%d+",@epc)) ; } command_transf($process,$random_layout->{'transf'},"rotateOK"); ########################################## # Get all boxes positions from the right page ########################################## $layout->begin_read_transaction('cELY'); my $ld=get_layout_data(@epc[0,1],1); $layout->end_transaction('cELY'); # But keep all results from binary boxes analysis for my $cat (qw/boxes boxes.scan corners.test darkness.data zoom.file/) { for my $k (%{$random_layout->{$cat}}) { $ld->{$cat}->{$k}=$random_layout->{$cat}->{$k} if(! $ld->{$cat}->{$k}); } } $ld->{'transf'}=$random_layout->{'transf'}; ########################################## # Get a free copy number ########################################## my $capture=AMC::Data->new($data_dir)->module('capture'); @spc=@epc[0,1]; if(!$debug_image) { if($multiple) { $capture->begin_transaction('cFCN'); push @spc,$capture->new_page_copy(@epc[0,1],$allocate); debug "WARNING: pre-allocation failed. $allocate -> " .pageids_string(@spc) if($pre_allocate && $allocate != $spc[2]); $capture->set_page_auto($sf,@spc,-1, $ld->{'transf'}->params); $capture->end_transaction('cFCN'); } else { push @spc,0; } } my $zoom_dir = tempdir( DIR=>tmpdir(), CLEANUP => (!get_debug()) ); $process->commande("zooms $zoom_dir"); ########################################## # Read darkness data from all boxes ########################################## for my $k (keys %{$ld->{'boxes'}}) { measure_box($process,$ld,$k,@spc) if($k =~ /^[0-9]+\.[0-9]+$/); } if($out_cadre) { $process->commande("annote ".pageids_string(@spc)); } error($process,"End of diagnostic",1) if($debug_image); ########################################## # Creates layout image report ########################################## $layout_file="page-".pageids_string(@spc,'path'=>1).".jpg"; $out_cadre="$cr_dir/$layout_file" if($cr_dir && !$out_cadre); if($out_cadre) { $process->commande("output ".$out_cadre); } ########################################## # Rotates scan if it is upside-down ########################################## if($upside_down) { # Rotates the scan file print "Rotating...\n"; $commands->execute(magick_module("convert"), "-rotate","180",$scan,$scan); } ########################################## # Some more image reports ########################################## my $nom_file="name-".studentids_string_filename(@spc[0,2]).".jpg"; my $whole_page; if($out_cadre || $nom_file) { debug "Reading scan $scan for extractions..."; $whole_page=magick_perl_module()->new(); $whole_page->Read($scan); } # Name field sub-image if($nom_file && $ld->{'boxes'}->{'namefield'}) { my $n=$ld->{'boxes'}->{'namefield'}->clone; $n->transforme($ld->{'transf'}); clear_old('name image file',"$cr_dir/$nom_file"); debug "Name box : ".$n->txt(); my $e=$whole_page->Clone(); $e->Crop(geometry=>$n->etendue_xy('geometry',$zoom_plus)); debug "Writing to $cr_dir/$nom_file..."; $e->Write("$cr_dir/$nom_file"); } ########################################## # Writes results to the database ########################################## $capture->begin_transaction('CRSL'); annotate_source_change($capture); if($capture->set_page_auto($sf,@spc,time(), $ld->{'transf'}->params)) { debug "Overwritten page data for [SCAN] ".pageids_string(@spc); if($tag_overwritten) { $capture->tag_overwritten(@spc); print "VAR+: overwritten\n"; } } # removes (if exists) old entry in the failed database $capture->statement('deleteFailed')->execute($sf); $capture->set_layout_image(@spc,$layout_file); $cadre_general->to_data($capture, $capture->get_zoneid(@spc,ZONE_FRAME,0,0,1), POSITION_BOX); for my $k (keys %{$ld->{'boxes'}}) { my $zoneid; if($k =~ /^([0-9]+)\.([0-9]+)$/) { my $question=$1; my $answer=$2; $zoneid=$capture->get_zoneid(@spc,ZONE_BOX,$question,$answer,1); $ld->{'corners.test'}->{$k}->to_data($capture,$zoneid,POSITION_MEASURE) if($ld->{'corners.test'}->{$k}); } elsif(($n,$i)=detecte_cb($k)) { $zoneid=$capture->get_zoneid(@spc,ZONE_DIGIT,$n,$i,1); } elsif($k eq 'namefield') { $zoneid=$capture->get_zoneid(@spc,ZONE_NAME,0,0,1); $capture->set_zone_auto_id($zoneid,-1,-1,$nom_file,undef); } if($zoneid) { if($k ne 'namefield') { if($ld->{'flags'}->{$k} & BOX_FLAGS_DONTSCAN) { debug "Box $k is DONT_SCAN"; $capture->set_zone_auto_id($zoneid,1,0,undef,undef); } elsif($ld->{'darkness.data'}->{$k}) { $capture->set_zone_auto_id($zoneid, @{$ld->{'darkness.data'}->{$k}}, undef, file_content($zoom_dir."/".$ld->{'zoom.file'}->{$k})); } else { debug "No darkness data for box $k"; } } if($ld->{'boxes'}->{$k} && !$ld->{'boxes.scan'}->{$k}) { $ld->{'boxes.scan'}->{$k}=$ld->{'boxes'}->{$k}->clone; $ld->{'boxes.scan'}->{$k}->transforme($ld->{'transf'}); } $ld->{'boxes.scan'}->{$k} ->to_data($capture,$zoneid,POSITION_BOX); } } $capture->end_transaction('CRSL'); $process->ferme_commande(); $progress_h->progres($delta); } my $scan_i=0; for my $s (@scans) { my $a=($pre_allocate ? $pre_allocate+$scan_i : 0); debug "Pre-allocate ID=$a for scan $s\n" if($pre_allocate); $queue->add_process(\&one_scan,$s,$a); $scan_i++; } $queue->run(); $progress_h->fin(); auto-multiple-choice-1.4.0/AMC-annotate.pl000066400000000000000000000161451341176102400203170ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2013-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use Getopt::Long; use AMC::Basic; use AMC::Annotate; use AMC::Exec; my $single_output=''; my $sort=''; my $filename_model='(N)-(ID)'; my $force_ascii=0; my $pdf_subject=''; my $pdf_corrected=''; my $pdf_dir=''; my $cr_dir=""; my $project_dir=''; my $projects_dir=''; my $id_file=''; my $darkness_threshold=''; my $darkness_threshold_up=''; my $data_dir=''; my $debug=''; my $progress=1; my $progress_id=''; my $text_color='red'; my $line_width=2; my $font_name='Linux Libertine O 12'; my @o_symbols=(); my $annotate_indicatives=''; my $position='marges'; my $dist_to_box='1cm'; my $dist_margin='5mm'; my $dist_margin_globaltext='3mm'; my $significant_digits=4; my $verdict='TOTAL : %S/%M => %s/%m'; my $verdict_question_cancelled='"X"'; my $verdict_question="\"%"."s/%"."m\""; my $rtl=''; my $names_file=''; my $names_encoding='utf-8'; my $association_key='', my $csv_build_name=''; my $embedded_max_size=""; my $embedded_jpeg_quality=80; my $embedded_format="jpeg"; my $changes_only=''; my $compose=''; my $moteur_latex='pdflatex'; my $src_file=''; my $filter=''; my $filtered_source=''; my $n_copies=0; # key is "to be ticked"-"ticked" my %symboles=( '0-0'=>{qw/type none/}, '0-1'=>{qw/type circle color red/}, '1-0'=>{qw/type mark color red/}, '1-1'=>{qw/type mark color blue/}, ); @ARGV=unpack_args(@ARGV); GetOptions("cr=s"=>\$cr_dir, "project=s",\$project_dir, "projects-dir=s",\$projects_dir, "data=s"=>\$data_dir, "subject=s"=>\$pdf_subject, "pdf-dir=s"=>\$pdf_dir, "darkness-threshold=s"=>\$darkness_threshold, "darkness-threshold-up=s"=>\$darkness_threshold_up, "filename-model=s"=>\$filename_model, "force-ascii!"=>\$force_ascii, "single-output=s"=>\$single_output, "sort=s"=>\$sort, "id-file=s"=>\$id_file, "debug=s"=>\$debug, "progression=s"=>\$progress, "progression-id=s"=>\$progress_id, "line-width=s"=>\$line_width, "font-name=s"=>\$font_name, "text-color=s"=>\$text_color, "symbols=s"=>\@o_symbols, "indicatives!"=>\$annotate_indicatives, "position=s"=>\$position, "dist-to-box=s"=>\$dist_to_box, "dist-margin=s"=>\$dist_margin, "dist-margin-global=s"=>\$dist_margin_globaltext, "n-digits=s"=>\$significant_digits, "verdict=s"=>\$verdict, "verdict-question=s"=>\$verdict_question, "verdict-question-cancelled=s"=>\$verdict_question_cancelled, "names-file=s"=>\$names_file, "names-encoding=s"=>\$names_encoding, "association-key=s"=>\$association_key, "csv-build-name=s"=>\$csv_build_name, "rtl!"=>\$rtl, "changes-only!"=>\$changes_only, "sort=s"=>\$sort, "compose=s"=>\$compose, "corrected=s"=>\$pdf_corrected, "n-copies=s"=>\$n_copies, "src=s"=>\$src_file, "with=s"=>\$latex_engine, "filter=s"=>\$filter, "filtered-source=s"=>\$filtered_source, "embedded-max-size=s"=>\$embedded_max_size, "embedded-format=s"=>\$embedded_format, "embedded-jpeg-quality=s"=>\$embedded_jpeg_quality, ); set_debug($debug); for(split(/,/,join(',',@o_symbols))) { if(/^([01]-[01]):(none|circle|mark|box)(?:[\/:]([\#a-z0-9]+))?$/) { $symboles{$1}={type=>$2,color=>$3}; } else { die "Bad symbol syntax: $_"; } } # try to set sensible values when these directories are not set by the # user: $projects_dir=$ENV{'HOME'}.'/'.__("MC-Projects") if(!$projects_dir); $project_dir=$projects_dir.'/'.$project_dir if($project_dir !~ /\//); $pdf_subject="DOC-sujet.pdf" if(!$pdf_subject); $pdf_subject=$project_dir.'/'.$pdf_subject if($pdf_subject !~ /\//); $pdf_corrected="DOC-indiv-solution.pdf" if(!$pdf_corrected); $pdf_corrected=$project_dir.'/'.$pdf_corrected if($pdf_corrected !~ /\//); $cr_dir=$project_dir."/cr" if(! $cr_dir); $data_dir=$project_dir."/data" if(! $data_dir); $pdf_dir=$cr_dir."/corrections/pdf" if(! $pdf_dir); # single output should be a file name, not a path $single_output =~ s:.*/::; # We need a destination directory! utf8::downgrade($pdf_dir); if(! -d $pdf_dir) { attention("No PDF directory: $pdf_dir"); die "No PDF directory: $pdf_dir"; } my $commandes=AMC::Exec::new('AMC-annotate'); $commandes->signalise(); # prepare the corrected answer sheet for all students. This file is # used when option --compose is 2, to take sheets when there are no # answer boxes on it. This can be very useful to produce a complete # annotated answer sheet with subject *and* answers when separate # answer sheet layout is used. if($compose==2) { if(! -f $pdf_corrected) { debug "Building individual corrected sheet..."; print "Building individual corrected sheet...\n"; $commandes->execute("auto-multiple-choice","prepare", pack_args("--n-copies",$n_copies, "--with",$latex_engine, "--filter",$filter, "--filtered-source",$filtered_source, "--mode","k", "--out-corrige-indiv",$pdf_corrected, "--debug",debug_file(), $src_file)); } } my $annotate =AMC::Annotate::new(data_dir=>$data_dir, project_dir=>$project_dir, projects_dir=>$projects_dir, pdf_dir=>$pdf_dir, single_output=>$single_output, filename_model=>$filename_model, force_ascii=>$force_ascii, pdf_subject=>$pdf_subject, names_file=>$names_file, names_encoding=>$names_encoding, association_key=>$association_key, csv_build_name=>$csv_buildname, significant_digits=>$significant_digits, darkness_threshold=>$darkness_threshold, darkness_threshold_up=>$darkness_threshold_up, id_file=>$id_file, sort=>$sort, annotate_indicatives=>$annotate_indicatives, position=>$position, text_color=>$text_color, line_width=>$line_width, font_name=>$font_name, dist_to_box=>$dist_to_box, dist_margin=>$dist_margin, dist_margin_globaltext=>$dist_margin_globaltext, symbols=>\%symboles, verdict=>$verdict, verdict_question=>$verdict_question, verdict_question_cancelled=>$verdict_question_cancelled, progress=>$progress, progress_id=>$progress_id, compose=>$compose, pdf_corrected=>$pdf_corrected, changes_only=>$changes_only, embedded_max_size=>$embedded_max_size, embedded_format=>$embedded_format, embedded_jpeg_quality=>$embedded_jpeg_quality, rtl=>$rtl, ); $annotate->go(); $annotate->quit(); auto-multiple-choice-1.4.0/AMC-annote.pl000077500000000000000000000337761341176102400200060ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2009-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use Getopt::Long; use Gtk3; use Cairo; use List::Util qw(min max sum); use AMC::Path; use AMC::Basic; use AMC::Exec; use AMC::Gui::Avancement; use AMC::NamesFile; use AMC::Data; use AMC::DataModule::capture qw/:zone :position/; use AMC::DataModule::layout qw/:flags/; use AMC::Substitute; use utf8; my $cr_dir=""; my $rep_projet=''; my $rep_projets=''; my $fichnotes=''; my $fich_bareme=''; my $id_file=''; my $seuil=0.1; my $seuil_up=1.0; my $data_dir=''; my $taille_max="1000x1500"; my $qualite_jpg="65"; my $debug=''; my $progress=1; my $progress_id=''; my $line_width=2; my @o_symbols=(); my $annote_indicatives=''; my $position='marge'; my $ecart=1; my $ecart_marge=1.5; my $pointsize_rel=60; my $chiffres_significatifs=4; my $verdict='TOTAL : %S/%M => %s/%m'; my $verdict_question_cancelled='"X"'; my $verdict_question=''; my $font_name='FreeSans'; my $rtl=''; my $test_font_size=100; my $fich_noms=''; my $noms_encodage='utf-8'; my $csv_build_name=''; my $changes_only=1; # cle : "a_cocher-cochee" my %symboles=( '0-0'=>{qw/type none/}, '0-1'=>{qw/type circle color red/}, '1-0'=>{qw/type mark color red/}, '1-1'=>{qw/type mark color blue/}, ); @ARGV=unpack_args(@ARGV); GetOptions("cr=s"=>\$cr_dir, "projet=s",\$rep_projet, "projets=s",\$rep_projets, "data=s"=>\$data_dir, "id-file=s"=>\$id_file, "debug=s"=>\$debug, "taille-max=s"=>\$taille_max, "qualite=s"=>\$qualite_jpg, "progression=s"=>\$progress, "progression-id=s"=>\$progress_id, "line-width=s"=>\$line_width, "symbols=s"=>\@o_symbols, "indicatives=s"=>\$annote_indicatives, "position=s"=>\$position, "pointsize-nl=s"=>\$pointsize_rel, "ecart=s"=>\$ecart, "ecart-marge=s"=>\$ecart_marge, "ch-sign=s"=>\$chiffres_significatifs, "verdict=s"=>\$verdict, "verdict-question=s"=>\$verdict_question, "verdict-question-cancelled=s"=>\$verdict_question_cancelled, "fich-noms=s"=>\$fich_noms, "noms-encodage=s"=>\$noms_encodage, "csv-build-name=s"=>\$csv_build_name, "font=s"=>\$font_name, "rtl!"=>\$rtl, "changes-only!"=>\$changes_only, ); set_debug($debug); print (("*"x60)."\n"); print "* WARNING: AMC-annote is now obsolete\n* Please move to AMC-annotate\n"; print (("*"x60)."\n"); for(split(/,/,join(',',@o_symbols))) { if(/^([01]-[01]):(none|circle|mark|box)(?:\/([\#a-z0-9]+))?$/) { $symboles{$1}={type=>$2,color=>$3}; } else { die "Bad symbol syntax: $_"; } } my $commandes=AMC::Exec::new("AMC-annote"); $commandes->signalise(); $cr_dir=$rep_projet."/cr" if(! $cr_dir); if(! -d $cr_dir) { attention("No CR directory: $cr_dir"); die "No CR directory: $cr_dir"; } my $noms=''; if($fich_noms) { $noms=AMC::NamesFile::new($fich_noms, "encodage"=>$noms_encodage, "identifiant"=>$csv_build_name); debug "Keys in names file: ".join(", ",$noms->heads()); } # --- sub color_rgb { my ($s)=@_; my $col=Gtk3::Gdk::Color::parse($s); return($col->red/65535,$col->green/65535,$col->blue/65535); } my $avance=AMC::Gui::Avancement::new($progress,'id'=>$progress_id); my $data=AMC::Data->new($data_dir); my $capture=$data->module('capture'); my $scoring=$data->module('scoring'); my $assoc=$data->module('association'); my $layout=$data->module('layout'); $seuil=$scoring->variable_transaction('darkness_threshold'); $seuil_up=$scoring->variable_transaction('darkness_threshold_up'); ################################# sub milieu_cercle { my $zoneid=shift; return($capture->sql_row($capture->statement('zoneCenter'), $zoneid,POSITION_BOX)); } sub cercle_coors { my ($context,$zoneid,$color)=@_; my ($x,$y)=milieu_cercle($zoneid); my $t=sqrt($capture->zone_dist2($zoneid,$x,$y)); $context->set_source_rgb(color_rgb($color)); $context->new_path; $context->arc($x,$y,$t,0,360); $context->stroke; } sub croix_coors { my ($context,$zoneid,$color)=@_; $context->set_source_rgb(color_rgb($color)); $context->new_path; for my $i (1,2) { $context->move_to($capture->zone_corner($zoneid,$i)); $context->line_to($capture->zone_corner($zoneid,$i+2)); } $context->stroke; } sub boite_coors { my ($context,$zoneid,$color)=@_; my @pts=""; $context->set_source_rgb(color_rgb($color)); $context->new_path; $context->move_to($capture->zone_corner($zoneid,1)); for my $i (2..4) { $context->line_to($capture->zone_corner($zoneid,$i)); } $context->close_path; $context->stroke; } my $delta=1; $capture->begin_read_transaction('PAGE'); my $annotate_source_change=$capture->variable('annotate_source_change'); my @pages=@{$capture->dbh ->selectall_arrayref($capture->statement('pages'), {Slice => {}})}; $capture->end_transaction('PAGE'); $delta=1/(1+$#pages) if($#pages>=0); $n_processed_pages=0; my %ok_students=(); # a) first case: these numbers are given by --id-file option if($id_file) { open(NUMS,$id_file); while() { chomp; if(/^[0-9]+(:[0-9]+)?$/) { $ok_students{$_}=1; } } close(NUMS); } my $subst=AMC::Substitute::new('names'=>$noms, 'scoring'=>$scoring, 'assoc'=>$assoc, 'name'=>'', 'chsign'=>$chiffres_significatifs, ); print "* Annotation\n"; PAGE: for my $p (@pages) { my @spc=map { $p->{$_} } (qw/student page copy/); if($id_file && !$ok_students{studentids_string($spc[0],$spc[2])}) { next PAGE; } if($changes_only && $p->{'timestamp_annotate'}>$annotate_source_change) { my $f=$p->{'annotated'}; if(-f "$cr_dir/corrections/jpg/$f") { print "Skipping page ".pageids_string(@spc). " (up to date)\n"; debug "Skipping page ".pageids_string(@spc). " (up to date)"; next PAGE; } } debug "Analyzing ".pageids_string(@spc); my $scan=$p->{'src'}; debug "Scan file: $scan"; if($rep_projet) { $scan=proj2abs({'%PROJET',$rep_projet, '%PROJETS',$rep_projets, '%HOME'=>$ENV{'HOME'}, }, $scan); } my $scan_f=$scan; $scan_f =~ s/\[[0-9]+\]$//; if(-f $scan_f) { # ONE SCAN FILE # read scan file (converting to PNG) debug "Reading $scan"; open(CONV,"-|",magick_module("convert"),$scan,"png:-"); my $surface = Cairo::ImageSurface ->create_from_png_stream( sub { my ($cb_data,$length)=@_; read CONV,$data,$length; return($data); }); close(CONV); my $context = Cairo::Context->create ($surface); $context->set_line_width($line_width); my $lay=Pango::Cairo::create_layout($context); # adjusts text size... my $l0=Pango::Cairo::create_layout($context); $l0->set_font_description (Pango::FontDescription->from_string ($font_name.' '.$test_font_size)); $l0->set_text('H'); my ($text_x,$text_y)=$l0->get_pixel_size(); my $page_width=$surface->get_width; my $page_height=$surface->get_height; debug "Scan height: $page_height"; my $target_y=$page_height/$pointsize_rel; debug "Target TY: $target_y"; my $font_size=int($test_font_size*$target_y/$text_y); debug "Font size: $font_size"; $lay->set_font_description (Pango::FontDescription->from_string ($font_name.' '.$font_size)); $lay->set_text('H'); ($text_x,$text_y)=$lay->get_pixel_size(); my ($x_ppem, $y_ppem, $ascender, $descender, $width, $height, $max_advance); my $idf=pageids_string(@spc,'path'=>1); print "Annotating $scan (sheet $idf)...\n"; my %question=(); $capture->begin_read_transaction('xSTD'); # print global mark and name on the page if($p->{'page'}==1 || $capture->zones_count(@spc,ZONE_NAME)) { my $text=$subst->substitute($verdict,@spc[0,2]); $lay->set_text($text); $context->set_source_rgb(color_rgb('red')); if($rtl) { my ($tx,$ty)=$lay->get_pixel_size; $context->move_to($page_width-$text_x-$tx,$text_y*.7); } else { $context->move_to($text_x,$text_y*.7); } Pango::Cairo::show_layout($context,$lay); } ######################################### # signs around each box my $sth=$capture->statement('pageZones'); $sth->execute(@spc,ZONE_BOX); BOX: while(my $b=$sth->fetchrow_hashref) { my $p_strategy=$scoring->unalias($p->{'student'}); my $q=$b->{'id_a'}; my $r=$b->{'id_b'}; my $indic=$scoring->indicative($p_strategy,$q); next BOX if($indic && !$annote_indicatives); # to be ticked? my $bonne=$scoring->correct_answer($p_strategy,$q,$r); # ticked on this scan? my $cochee=$capture->ticked($p->{'student'},$p->{'copy'}, $q,$r,$seuil,$seuil_up); debug "Q=$q R=$r $bonne-$cochee"; my $sy=$symboles{"$bonne-$cochee"}; if($debug) { for my $i (1..4) { debug(sprintf("Corner $i: (%.2f,%.2f)", $capture->zone_corner($b->{'zoneid'},$i))); } } if(!($layout->get_box_flags($p->{'student'},$q,$r,BOX_ROLE_ANSWER) & BOX_FLAGS_DONTANNOTATE)) { if($sy->{type} eq 'circle') { cercle_coors($context,$b->{'zoneid'},$sy->{color}); } elsif($sy->{type} eq 'mark') { croix_coors($context,$b->{'zoneid'},$sy->{color}); } elsif($sy->{type} eq 'box') { boite_coors($context,$b->{'zoneid'},$sy->{color}); } elsif($sy->{type} eq 'none') { } else { debug "Unknown symbol type ($bonne-$cochee): $sy->{type}"; } } # pour avoir la moyenne des coors pour marquer la note de # la question $question{$q}={} if(!$question{$q}); my @mil=milieu_cercle($b->{'zoneid'}); push @{$question{$q}->{'x'}},$mil[0]; push @{$question{$q}->{'y'}},$mil[1]; } ######################################### # write questions scores if($position ne 'none') { QUEST: for my $q (keys %question) { next QUEST if($scoring->indicative($p_strategy,$q)); my $x; my $result=$scoring->question_result(@spc[0,2],$q); my $text; if($result->{'why'} =~ /c/i) { $text=$verdict_question_cancelled; } else { $text=$verdict_question; } $text =~ s/\%[S]/$result->{'score'}/g; $text =~ s/\%[M]/$result->{'max'}/g; $text =~ s/\%[W]/$result->{'why'}/g; $text =~ s/\%[s]/$subst->format_note($result->{'score'})/ge; $text =~ s/\%[m]/$subst->format_note($result->{'max'})/ge; my $te=eval($text); if($@) { debug "Annotation: $text"; debug "Evaluation error $@"; } else { $text=$te; } $lay->set_text($text); my ($tx,$ty)=$lay->get_pixel_size; # mean of the y coordinate of all boxes my $y=sum(@{$question{$q}->{'y'}})/(1+$#{$question{$q}->{'y'}})-$ty/2; if($position eq 'marge') { # scores written in one margin if($rtl) { $x=$page_width-$ecart_marge*$text_x-$tx; } else { $x=$ecart_marge*$text_x; } } elsif($position eq 'case') { # scores written at the left of the boxes if($rtl) { $x=max(@{$question{$q}->{'x'}}) + $ecart*$text_x ; } else { $x=min(@{$question{$q}->{'x'}}) - $ecart*$text_x - $tx; } } elsif($position eq 'marges') { # scores written in one of the margins (left or right), # depending on the position of the boxes. This mode is often # used when the subject is in a 2-column layout. # fist extract the y coordinates of the boxes in the left column my $left=1; my @y=map { $question{$q}->{'y'}->[$_] } grep { $rtl xor ( $question{$q}->{'x'}->[$_] <= $page_width/2 ) } (0..$#{$question{$q}->{'x'}} ); if(!@y) { # if empty, use the right column $left=0; @y=map { $question{$q}->{'y'}->[$_] } grep { $rtl xor ( $question{$q}->{'x'}->[$_] > $page_width/2 ) } (0..$#{$question{$q}->{'x'}} ); } # set the x-position to the right margin if($left xor $rtl) { $x=$ecart_marge*$text_x; } else { $x=$page_width-$ecart_marge*$text_x-$tx; } # set the y-position to the mean of y coordinates of the # boxes in the corresponding column $y=sum(@y)/(1+$#y)-$ty/2; } else { debug "Annotation : position invalide : $position"; $x=$ecart_marge*$text_x; } $context->set_source_rgb(color_rgb('red')); $context->move_to($x,$y); Pango::Cairo::show_layout($context,$lay); } } $capture->end_transaction('xSTD'); # WRITE TO FILE $context->show_page; my $out_file="page-$idf.jpg"; debug "Saving annotated scan to $cr_dir/corrections/jpg/$out_file"; my @args=(); if($qualite_jpg) { if($qualite_jpg =~ /^[0-9]+$/) { push @args,"-quality",$qualite_jpg; } else { debug "WARNING: non-numeric --qualite argument, ignored ($qualite_jpg)"; } } if($taille_max) { if($taille_max =~ /^[0-9]*x?[0-9]*$/) { push @args,"-geometry",$taille_max; } else { debug "WARNING: malformed --taille-max argument, ignored ($taille_max)"; } } open(CONV,"|-",magick_module("convert"),"png:-", @args, "$cr_dir/corrections/jpg/$out_file"); $surface->write_to_png_stream( sub { my ($cb_data,$data)=@_; print CONV $data; }); close(CONV); $capture->begin_transaction('ANNf'); $capture->set_annotated(@spc,$out_file); $capture->end_transaction('ANNf'); $n_processed_pages++; } else { print "No scan for page ".pageids_string(@spc).":$scan_f\n"; debug "No scan: $scan_f"; } $avance->progres($delta); } # stores state parameter to know all sheets have been annotated $capture->begin_transaction('Aend'); $capture->variable('annotate_source_change',0); $capture->end_transaction('Aend'); print "VAR: n_processed=$n_processed_pages\n"; $avance->fin(); auto-multiple-choice-1.4.0/AMC-association-auto.pl000077500000000000000000000072111341176102400217650ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2009-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use Getopt::Long; use AMC::Basic; use AMC::NamesFile; use AMC::Data; my $notes_id=''; my $liste_file=''; my $liste_key=''; my $liste_enc='utf-8'; my $csv_build_name=''; my $data_dir=''; my $debug=''; my $preassoc=''; @ARGV=unpack_args(@ARGV); GetOptions("notes-id=s"=>\$notes_id, "pre-association!"=>\$preassoc, "liste=s"=>\$liste_file, "liste-key=s"=>\$liste_key, "csv-build-name=s"=>\$csv_build_name, "data=s"=>\$data_dir, "encodage-liste=s"=>\$liste_enc, "debug=s"=>\$debug, ); set_debug($debug); utf8::downgrade($liste_file); utf8::downgrade($data_dir); die "Needs notes-id" if(!$notes_id && !$preassoc); die "Needs liste-key" if(!$liste_key); die "Needs liste_file" if(! -s $liste_file); die "Needs data_dir" if(!-d $data_dir); my $data=AMC::Data->new($data_dir); my $scoring=$data->module('scoring'); my $assoc=$data->module('association'); my $capture=$data->module('capture'); my $layout; $layout=$data->module('layout') if($preassoc); debug "Automatic association $liste_file [$liste_enc] / $liste_key"; # function that "cleans" IDs, removing leading zeros (so that 0001234 # will be the same as 1234) sub clean_id { my ($i)=@_; $i =~ s/^0+//; return($i); } # First read from the students list the possible values for the # primary key to be found there (from column named $liste_key). my $liste_e=AMC::NamesFile::new($liste_file, 'encodage'=>$liste_enc, "identifiant"=>$csv_build_name); my %bon_code; for my $ii (0..($liste_e->taille()-1)) { my $id=$liste_e->data_n($ii,$liste_key); $bon_code{clean_id($id)}=$id; } debug "Cleaned student list keys: ".join(',',keys %bon_code); # Open association database and clear old automatic association $assoc->begin_transaction('ASSA'); annotate_source_change($capture); $assoc->check_keys($liste_key,$notes_id); $assoc->clear_auto; # Loop on all codes that can be read on the scans. my $sth=$scoring->statement($preassoc ? 'preAssocCounts' : 'codesCounts'); if($preassoc) { $sth->execute(); } else { $sth->execute($notes_id); } while(my $v=$sth->fetchrow_hashref) { if($v->{'nb'}==1) { # nb is the number of scans on which the same code value has been # read. If nb=1, this is OK: we can process association... my $id_in_list=$bon_code{clean_id($v->{'value'})}; if(defined($id_in_list)) { # Association OK debug "Association OK for code value $v->{'value'} ($id_in_list)"; $assoc->set_auto((map { $v->{$_} } (qw/student copy/)),$id_in_list); } else { # ... unless this value is NOT in the students list! debug "Code value $v->{'value'} not found in students list: ignoring"; } } else { # Code value found on several sheets: do nothing, wait for the # user to make a manual association for these sheets. debug "Incorrect association for code value \"".$v->{'value'}."\": $v->{'nb'} instances"; } } $assoc->end_transaction('ASSA'); auto-multiple-choice-1.4.0/AMC-association.pl000077500000000000000000000045201341176102400210170ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use Getopt::Long; use AMC::Basic; my $cr_dir=''; my $liste=''; my $data_dir=''; my $list=''; my $set=''; my $student=''; my $copy=0; my $id=undef; my $raw=''; GetOptions("cr=s"=>\$cr_dir, "liste=s"=>\$liste, "data=s"=>\$data_dir, "list!"=>\$list, "raw!"=>\$raw, "set!"=>\$set, "student=s"=>\$student, "copy=s"=>\$copy, "id=s"=>\$id, ); if($list) { require AMC::Data; my $data=AMC::Data->new($data_dir); my $assoc=$data->module('association'); my $capture=$data->module('capture'); $data->begin_read_transaction('ALST'); my @list; if($raw) { @list=map { [$_->{student},$_->{copy}] } (@{$assoc->list()}); } else { @list=$capture->student_copies(); } print "Student\tID\n"; for my $c (@list) { print studentids_string(@$c)."\t"; my $manual=$assoc->get_manual(@$c); my $auto=$assoc->get_auto(@$c); if(defined($manual)) { print $manual; print " (manual"; if(defined($auto)) { print ", auto=".$auto; } print ")\n"; } elsif(defined($auto)) { print $auto." (auto)\n"; } else { print "(none)\n"; } } $data->end_transaction('ALST'); } elsif($set) { require AMC::Data; my $data=AMC::Data->new($data_dir); my $assoc=$data->module('association'); $data->begin_transaction('ASET'); $assoc->set_manual($student,$copy,$id); $data->end_transaction('ASET'); } else { require AMC::Gui::Association; my $g=AMC::Gui::Association::new('cr'=>$cr_dir, 'liste'=>$liste, 'data_dir'=>$data_dir, 'global'=>1, ); Gtk3->main; } auto-multiple-choice-1.4.0/AMC-buildpdf.cc000066400000000000000000000133371341176102400202510ustar00rootroot00000000000000/* Copyright (C) 2013-2017 Alexis Bienvenue This file is part of Auto-Multiple-Choice Auto-Multiple-Choice is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. Auto-Multiple-Choice is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Auto-Multiple-Choice. If not, see . */ #include "buildpdf.cc" #include #include #include #include #include #ifdef NEEDS_GETLINE #include #endif void strip_endline(char *line) { char *endline; if((endline = strchr(line, '\r'))) *endline = '\0'; if((endline = strchr(line, '\n'))) *endline = '\0'; } int main(int argc, char** argv ) { size_t command_t; char* command = NULL; std::string saved_text = ""; int processing_error = 0; double width_in_pixels, height_in_pixels; double dppt; double line_width = -1.0; double a, b, c, d, e, f; long int i, n; #if !GLIB_CHECK_VERSION(2, 35, 0) g_type_init (); #endif char ch; while ((ch = getopt(argc, argv, "d:h:w:l:")) != -1) { switch(ch) { case 'd': dppt = atof(optarg) / 72.0; break; case 'w': width_in_pixels = atof(optarg); break; case 'h': height_in_pixels = atof(optarg); break; case 'l': line_width = atof(optarg); break; } } BuildPdf PDF(width_in_pixels, height_in_pixels, dppt); PDF.set_line_width(line_width); while(getline(&command, &command_t, stdin) >= 6) { strip_endline(command); printf("> %s\n", command); if(processing_error == 0) { if(strncmp(command, "output ", 7) == 0) { processing_error = PDF.start_output(command + 7); } else if(strcmp(command, "debug") == 0) { PDF.set_debug(1); } else if(strncmp(command, "page png ", 9) == 0) { processing_error = PDF.new_page_from_png(command + 9); } else if(strncmp(command, "page img ", 9) == 0) { processing_error = PDF.new_page_from_image(command + 9); } else if(strncmp(command, "load pdf ", 9) == 0) { processing_error = PDF.load_pdf(command + 9); } else if(sscanf(command, "page pdf %ld", &i) == 1) { processing_error = PDF.new_page_from_pdf(i); } else if(strcmp(command, "matrix identity") == 0) { PDF.identity_matrix(); } else if(sscanf(command, "matrix %lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) == 6) { PDF.set_matrix_to_scan(a, b, c, d, e, f); } else if(sscanf(command, "color %lf %lf %lf %lf", &a, &b, &c, &d) == 4) { PDF.color(a, b, c, d); } else if(sscanf(command, "color %lf %lf %lf", &a, &b, &c) == 3) { PDF.color(a, b, c); } else if(sscanf(command, "rectangle %lf %lf %lf %lf", &a, &b, &c, &d) == 4 || sscanf(command, "box %lf %lf %lf %lf", &a, &b, &c, &d) == 4) { PDF.draw_rectangle(a, b, c, d); } else if(sscanf(command, "circle %lf %lf %lf %lf", &a, &b, &c, &d) == 4) { PDF.draw_circle(a, b, c, d); } else if(sscanf(command, "mark %lf %lf %lf %lf", &a, &b, &c, &d) == 4) { PDF.draw_mark(a, b, c, d); } else if(sscanf(command, "fill %lf %lf %lf %lf", &a, &b, &c, &d) == 4) { PDF.fill_rectangle(a, b, c, d); } else if(sscanf(command, "line width %lf", &a) == 1) { PDF.set_line_width(a); } else if(strncmp(command, "font name ", 10) == 0) { PDF.set_font(command + 10); } else if(sscanf(command, "margin %lf", &a) == 1) { PDF.set_margin(a); } else if(sscanf(command, "max width %ld", &i) == 1) { PDF.set_scan_max_width(i); } else if(sscanf(command, "max height %ld", &i) == 1) { PDF.set_scan_max_height(i); } else if(strcmp(command, "embedded png") == 0) { PDF.set_embedded_png(); } else if(strcmp(command, "embedded jpeg") == 0) { PDF.set_embedded_jpeg(); } else if(sscanf(command, "jpeg quality %ld", &i) == 1) { PDF.set_jpeg_quality(i); } else if(sscanf(command, "text rectangle %lf %lf %lf %lf %ln", &a, &b, &c, &d, &i) >= 4) { processing_error = PDF.draw_text_rectangle(a, b, c, d, command + i); } else if(sscanf(command, "text %lf %lf %lf %lf %ln", &a, &b, &c, &d, &i) >= 4) { PDF.draw_text(a, b, c, d, command + i); } else if(sscanf(command, "text margin %ld %lf %lf %lf %ln", &n, &b, &c, &d, &i) >= 4) { PDF.draw_text_margin(n, b, c, d, command + i); } else if(sscanf(command, "stext margin %ld %lf %lf %lf", &n, &b, &c, &d) == 4) { PDF.draw_text_margin(n, b, c, d, saved_text.c_str()); } else if(sscanf(command, "stext rectangle %lf %lf %lf %lf", &a, &b, &c, &d) == 4) { processing_error = PDF.draw_text_rectangle(a, b, c, d, saved_text.c_str()); } else if(sscanf(command, "stext %lf %lf %lf %lf", &a, &b, &c, &d) == 4) { PDF.draw_text(a, b, c, d, saved_text.c_str()); } else if(strcmp(command, "stext begin") == 0) { saved_text = ""; while(getline(&command, &command_t, stdin) >= 0) { strip_endline(command); if(strcmp(command, "__END__") == 0) break; printf(">> %s\n", command); if(saved_text.length() > 0) saved_text += "\n"; saved_text += command; } } else { printf("! ERROR: SYNTAX => %s\n", command + i); processing_error = 2; } } else { printf("> SKIPPING: not responding due to previous error.\n"); } printf("__END__\n"); fflush(stdout); } PDF.close_output(); return(processing_error); } auto-multiple-choice-1.4.0/AMC-detect.cc000066400000000000000000001205731341176102400177310ustar00rootroot00000000000000/* Copyright (C) 2011-2017 Alexis Bienvenue This file is part of Auto-Multiple-Choice Auto-Multiple-Choice is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. Auto-Multiple-Choice is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Auto-Multiple-Choice. If not, see . */ #include #include #include #include #include #include #include #include #include #ifdef NEEDS_GETLINE #include #endif #include "opencv2/core/core.hpp" #if CV_MAJOR_VERSION > 2 #define OPENCV_23 1 #define OPENCV_21 1 #define OPENCV_20 1 #define OPENCV_30 1 #else #if CV_MAJOR_VERSION == 2 #define OPENCV_20 1 #if CV_MINOR_VERSION >= 1 #define OPENCV_21 1 #endif #if CV_MINOR_VERSION >= 3 #define OPENCV_23 1 #endif #endif #endif #include "opencv2/imgproc/imgproc.hpp" #ifdef OPENCV_30 #include "opencv2/imgcodecs/imgcodecs.hpp" #ifdef AMC_DETECT_HIGHGUI #include "opencv2/highgui/highgui.hpp" #endif #else #include "opencv2/highgui/highgui.hpp" #endif using namespace std; int processing_error = 0; /* Note: IMAGE COORDINATES: (0,0) is upper-left corner */ #define GET_PIXEL(src,x,y) *((uchar*)(src.data+src.step*(y)+src.channels()*(x))) #define PIXEL(src,x,y) GET_PIXEL(src,x,y)>100 #define RGB_COLOR(r,g,b) cv::Scalar((b),(g),(r),0) #define BLEU RGB_COLOR(38,69,223) #define ROSE RGB_COLOR(223,38,203) #define SWAP(x,y,tmp) tmp=x;x=y;y=tmp #define SGN_ROT (1-2*upside_down) #define SUM_SQUARE(x,y) ((x)*(x)+(y)*(y)) #define SHAPE_SQUARE 0 #define SHAPE_OVAL 1 #define DIR_X 1 #define DIR_Y 2 #define ILLUSTR_BOX 1 #define ILLUSTR_PIXELS 2 /* the following functions select, from a points sequence, four extreme points: - the most NW one with coordinates (corner_x[0],corner_y[0]), - the most NE one with coordinates (corner_x[1],corner_y[1]), - the most SE one with coordinates (corner_x[2],corner_y[2]), - the most SW one with coordinates (corner_x[3],corner_y[3]), First call agrege_init(image_width,image_height,corners_x,corners_y) which will initialize the extreme points coordinates, and then agrege(x,y) for all points (x,y) from the sequence. */ void agrege_init(double tx,double ty,double* coins_x,double* coins_y) { coins_x[0] = tx; coins_y[0] = ty; coins_x[1] = 0; coins_y[1] = ty; coins_x[2] = 0; coins_y[2] = 0; coins_x[3] = tx; coins_y[3] = 0; } #define AGREGE_POINT(op,comp,i) if((x op y) comp (coins_x[i] op coins_y[i])) { coins_x[i]=x;coins_y[i]=y; } void agrege(double x,double y,double* coins_x,double* coins_y) { AGREGE_POINT(+,<,0) AGREGE_POINT(+,>,2) AGREGE_POINT(-,>,1) AGREGE_POINT(-,<,3) } /* load_image(...) loads the scan image, with some pre-processings: - if ignore_red is true, the red color is discarder from the scan: only the red channel is kept from the scan. - the image is (a little) smoothed with a Gaussian kernel, and a threshold is applied to convert the image from greyscale to black&white only. The threshold value is MAX*threshold, where MAX is the maximum value for all pixels (that is the grey value for the lighter pixel), and threshold is given to load_image as a parameter. - the image is flipped if necessary to get the upper-left pixel at coordinates (0,0) The result image is *src. */ void load_image(cv::Mat &src,char *filename, int ignore_red,double threshold=0.6,int view=0) { cv::Mat color; double max; if(ignore_red) { printf(": loading red channel from %s ...\n", filename); try { color = cv::imread(filename, #ifdef OPENCV_23 cv::IMREAD_ANYCOLOR #else cv::IMREAD_UNCHANGED #endif ); } catch (const cv::Exception& ex) { printf("! LOAD : Error loading scan file in ANYCOLOR [%s]\n", filename); printf("! OpenCV error: %s\n", ex.what()); processing_error = 3; return; } if(color.channels() >= 3) { // 'src' will only keep the red channel. src = cv::Mat(color.rows, color.cols, CV_MAKETYPE(color.depth(), 1 /* 1 channel for red */)); // Take the red channel (2) from 'color' and put it in the // only channel of 'src' (0). int from_to[] = {2,0}; cv::mixChannels(&color, 1, &src, 1, from_to, 1); color.release(); } else if(color.channels() != 1) { printf("! LOAD : Scan file with 2 channels [%s]\n", filename); processing_error = 2; return; } else { src = color; } } else { printf(": loading %s ...\n", filename); try { src = cv::imread(filename, cv::IMREAD_GRAYSCALE); } catch (const cv::Exception& ex) { printf("! LOAD : Error loading scan file in GRAYSCALE [%s]\n", filename); printf("! OpenCV error: %s\n", ex.what()); processing_error = 3; return; } } cv::minMaxLoc(src, NULL, &max); printf(": Image max = %.3f\n", max); cv::GaussianBlur(src, src, cv::Size(3,3), 1); cv::threshold(src, src, max*threshold, 255, cv::THRESH_BINARY_INV); } /* pre_traitement(...) tries to remove scan artefacts (dust and holes) from image *src, using morphological closure and opening. - lissage_trous is the radius of the holes to remove (in pixels) - lissage_poussieres is the radius of the dusts to remove (in pixels) */ void pre_traitement(cv::Mat &src,int lissage_trous,int lissage_poussieres) { printf("Morph: +%d -%d\n", lissage_trous, lissage_poussieres); cv::Mat trous = cv::getStructuringElement( cv::MORPH_ELLIPSE, cv::Size(1 + 2 * lissage_trous, 1 + 2 * lissage_trous), cv::Point(lissage_trous, lissage_trous)); cv::Mat poussieres = cv::getStructuringElement( cv::MORPH_ELLIPSE, cv::Size(1 + 2 * lissage_poussieres, 1 + 2 * lissage_poussieres), cv::Point(lissage_poussieres, lissage_poussieres)); cv::morphologyEx(src, src, cv::MORPH_CLOSE, trous); cv::morphologyEx(src, src, cv::MORPH_OPEN, poussieres); trous.release(); poussieres.release(); } /* LINEAR TRANSFORMS */ /* the linear_transform structure contains a linear transform x'=ax+by+e y'=cx+dy+f */ typedef struct { double a,b,c,d,e,f; } linear_transform; /* transforme(t,x,y,&xp,&yp) applies the linear transform t to the point (x,y) to give (xp,yp) */ void transforme(linear_transform* t,double x,double y,double* xp,double* yp) { *xp = t->a * x + t->b * y + t->e; *yp = t->c * x + t->d * y + t->f; } /* POINTS AND LINES */ /* point structure */ typedef struct { double x,y; } point; /* line structure (through its equation ax+by+c=0) */ typedef struct { double a,b,c; } ligne; /* calcule_demi_plan(...) computes the equation of line (AB) from the coordinates *a of A and *b of B, and stores it to *l. */ void calcule_demi_plan(point *a,point *b,ligne *l) { double vx,vy; vx = b->y - a->y; vy = -(b->x - a->x); l->a = vx; l->b = vy; l->c = - a->x*vx - a->y*vy; } /* evalue_demi_plan(...) computes the sign of ax+by+c from line *equation l, giving which side of l the point at (x,y) is. */ int evalue_demi_plan(ligne *l,double x,double y) { return l->a * x + l->b * y + l->c <= 0 ? 1 : 0; } /* VECTOR ARITHMETIC */ /* moyenne(x[],n) returns the mean of the n values from vector x[] */ double moyenne(double *x, int n, int omit=-1) { double s = 0; for(int i = 0; i < n; i++) { if(i != omit) { s += x[i]; } } return s / (n - (omit >= 0 ? 1 : 0)); } /* scalar_product(x[],y[],n) returns the scalar product of vectors x[] and y[] (both of size n), that is the sum over i of x[i]*y[i]. */ double scalar_product(double *x,double *y,int n, int omit=-1) { double sx = 0, sy = 0, sxy = 0; for(int i = 0; i < n; i++) { if(i != omit) { sx += x[i]; sy += y[i]; sxy += x[i]*y[i]; } } if(omit>=0) n--; return sxy/n - sx/n * sy/n; } /* sys_22(...) solves the 2x2 linear system ax+by+e=0 cx+dy+f=0 and sets *x and *y with the solution. If the system is not-invertible, *x and *y are left unchanged and a warning is printed out. */ void sys_22(double a,double b,double c,double d,double e,double f, double *x,double *y) { double delta = a*d - b*c; if(delta == 0) { printf("! NONINV : Non-invertible system.\n"); return; } *x = (d*e - b*f) / delta; *y = (a*f - c*e) / delta; } /* square of x */ double sqr(double x) { return(x*x); } /* LINEAR TRANSFORM OPTIMIZATION */ /* revert_transform(...) computes the inverse transform of *direct, and stores it to *back. */ void revert_transform(linear_transform *direct, linear_transform *back) { double delta = direct->a * direct->d - direct->b * direct->c; if(delta == 0) { printf("! NONINV : Non-invertible system.\n"); return; } back->a = direct->d / delta; back->b = - direct->b / delta; back->e = (direct->b * direct->f - direct->e * direct->d) / delta; back->c = - direct->c / delta; back->d = direct->a / delta; back->f = (direct->e * direct->c - direct->a * direct->f) / delta; printf("Back:\na'=%f\nb'=%f\nc'=%f\nd'=%f\ne'=%f\nf'=%f\n", back->a, back->b, back->c, back->d, back->e, back->f); } /* optim(...) computes the linear transform T such that the sum S of square distances from T(M[i]) to MP[i] is minimal, where M[] and MP[] are sequences of n points. points_x[] and points_y[] are the coordinates of the points M[], and points_xp[] and points_yp[] are the coordinates of the points M[]. The return value is the mean square error (square root of S/n). */ double optim(double* points_x,double* points_y, double* points_xp,double* points_yp, int n, linear_transform* t, int omit=-1) { double sxx = scalar_product(points_x, points_x, n, omit); double sxy = scalar_product(points_x, points_y, n, omit); double syy = scalar_product(points_y, points_y, n, omit); double sxxp = scalar_product(points_x, points_xp, n, omit); double syxp = scalar_product(points_y, points_xp, n, omit); double sxyp = scalar_product(points_x, points_yp, n, omit); double syyp = scalar_product(points_y, points_yp, n, omit); sys_22(sxx, sxy, sxy, syy, sxxp, syxp, &(t->a), &(t->b)); sys_22(sxx, sxy, sxy, syy, sxyp, syyp, &(t->c), &(t->d)); t->e = moyenne(points_xp,n,omit) - (t->a * moyenne(points_x,n,omit) + t->b*moyenne(points_y,n,omit)); t->f = moyenne(points_yp,n,omit) - (t->c * moyenne(points_x,n,omit) + t->d*moyenne(points_y,n,omit)); double mse = 0; for(int i = 0; i < n; i++) { if(i != omit) { mse += sqr(points_xp[i] - (t->a * points_x[i] + t->b * points_y[i] + t->e)); mse += sqr(points_yp[i] - (t->c * points_x[i] + t->d * points_y[i] + t->f)); } } mse = sqrt(mse / (n - (omit <= 0 ? 1 : 0))); return mse; } /* transform_quality(&t) returns a "square distance" from the transform t to an exact orthonormal transform. */ double transform_quality_2(linear_transform* t) { return SUM_SQUARE(t->c+t->b,t->d-t->a) / SUM_SQUARE(t->a,t->b); } /* omit_optim(...) tries an optim() call omitting in turn one of the points, and returns the best transform (the more "orthonormal" one). */ double omit_optim(double* points_x, double* points_y, double* points_xp, double* points_yp, int n, linear_transform* t) { linear_transform t_best; double q, q_best; int i_best = -1; for(int i = 0; i < n; i++) { optim(points_x, points_y, points_xp, points_yp, n, t, i); q = transform_quality_2(t); printf("OMIT_CORNER=%d Q2=%lf\n", i, q); if(i_best < 0 || q < q_best) { i_best = i; q_best = q; memcpy((void*)&t_best, (void*)t, sizeof(linear_transform)); } } memcpy((void*)t, (void*)&t_best, sizeof(linear_transform)); return sqrt(q_best); } /* calage(...) tries to detect the position of a page on a scan. - *src is the scan image (comming from load_image). - if illustr is not NULL, a rectangle is drawn on image *illustr to show where the corner marks (circles) has been detected. - taille_orig_x and taille_orig_y are the width and height of the model page. - dia_orig is the diameter of the corner marks (circles) on the model page. - tol_plus and tol_moins are tolerence ratios for corner marks: calage will look for marks with diameter between dia_orig*(1-tol_moins) and dia_orig*(1+tol_plus) (scaled to scan size). - coins_x[] and coins_y[] will be filled with the coordinates of the 4 corner marks detected on the scan. - if view==1, a report image *dst will be created to show all connected components from source image that has correct diameter. - if view==2, a report image *dst will be created from the source image with over-printed connected components with correct diameter. 1) pre_traitement is called to remove dusts and holes. 2) cvFindContours find the connected components from the image. All connected components with diameter too far from target diameter (see tol_plus and tol_moins parameters) are discarded. 3) the centers of the extreme connected components with correct diameter are returned. */ void calage(cv::Mat src, cv::Mat illustr, double taille_orig_x, double taille_orig_y, double dia_orig, double tol_plus, double tol_moins, int n_min_cc, double* coins_x, double *coins_y, cv::Mat &dst,int view=0) { cv::Point coins_int[4]; int n_cc; /* computes target min and max size */ double rx = src.cols / taille_orig_x; double ry = src.rows / taille_orig_y; double target = dia_orig * (rx + ry) / 2; double target_max = target * (1 + tol_plus); double target_min = target * (1 - tol_moins); /* 1) remove holes that are smaller than 1/8 times the target mark diameter, and dusts that are smaller than 1/20 times the target mark diameter. */ pre_traitement(src, 1 + (int)((target_min+target_max)/2 /20), 1 + (int)((target_min+target_max)/2 /8)); if(view == 2) { /* prepares *dst from a copy of the scan (after pre-processing). */ dst = cv::Mat(cv::Size(src.rows, src.cols), CV_MAKETYPE(CV_8U, 3)); // cvConvertImage(src, *dst) is not needed anymore as 'src' and 'dst' have // the same type. cv::bitwise_not(dst,dst); } printf("Target size: %.1f ; %.1f\n", target_min, target_max); /* 2) find connected components */ // CvSeq* contour = 0; vector > contours; vector hierarchy; // unused; but could be used in drawContours cv::findContours(src, contours, hierarchy, cv::RETR_CCOMP, cv::CHAIN_APPROX_SIMPLE); #ifdef OPENCV_21 if(view == 1) { /* prepares *dst as a white image with same size as the scan. */ dst = cv::Mat::zeros(cv::Size(src.rows, src.cols), CV_MAKETYPE(src.depth(), 3)); } #endif /* 3) returns the result, and draws reports */ agrege_init(src.cols, src.rows, coins_x, coins_y); n_cc = 0; printf("Detected connected components:\n"); for(int i = 0; i < contours.size(); i++) { cv::Rect rect = cv::boundingRect(cv::Mat(contours[i])); /* discard the connected components that are too large or too small */ if(rect.width <= target_max && rect.width >= target_min && rect.height <= target_max && rect.height >= target_min) { /* updates the extreme points coordinates from the coordinates of the center of the connected component. */ agrege(rect.x + (rect.width - 1) / 2.0, rect.y + (rect.height - 1) / 2.0, coins_x, coins_y); /* outputs connected component center and size. */ printf("(%d;%d)+(%d;%d)\n", rect.x, rect.y, rect.width, rect.height); n_cc++; #ifdef OPENCV_21 if(view == 1) { /* draws the connected component, and the enclosing rectangle, with a random color. */ cv::Scalar color = RGB_COLOR(rand() & 255, rand() & 255, rand() & 255); cv::rectangle(dst, cv::Point(rect.x,rect.y), cv::Point(rect.x+rect.width,rect.y+rect.height), color); cv::drawContours(dst, contours, i, color, cv::FILLED); } #endif if(view==2) { /* draws the connected component, and the enclosing rectangle, in green. */ cv::Scalar color = RGB_COLOR(60,198,127); cv::rectangle(dst, cv::Point(rect.x,rect.y), cv::Point(rect.x+rect.width,rect.y+rect.height), color); cv::drawContours(dst, contours, i, color, cv::FILLED); } } } if(n_cc >= n_min_cc) { for(int i = 0; i < 4; i++) { /* computes integer coordinates of the extreme coordinates, for later drawings */ if(view > 0 || illustr.data != NULL) { coins_int[i].x = (int)coins_x[i]; coins_int[i].y = (int)coins_y[i]; } /* outputs extreme points coordinates: the (supposed) coordinates of the marks on the scan. */ printf("Frame[%d]: %.1f ; %.1f\n", i, coins_x[i], coins_y[i]); } if(view==1) { #ifdef OPENCV_21 /* draws a rectangle to see the corner marks positions on the scan. */ for(int i = 0; i < 4; i++) { cv::line(dst, coins_int[i], coins_int[(i+1)%4], RGB_COLOR(255,255,255), 1, cv::LINE_AA); } #endif } if(view==2) { /* draws a rectangle to see the corner marks positions on the scan. */ for(int i = 0; i < 4; i++) { cv::line(dst, coins_int[i], coins_int[(i+1)%4], RGB_COLOR(193,29,27), 1, cv::LINE_AA); } } if(illustr.data!=NULL) { /* draws a rectangle to see the corner marks positions on the scan. */ for(int i = 0; i < 4; i++) { cv::line(illustr, coins_int[i], coins_int[(i+1)%4], BLEU, 1, cv::LINE_AA); } } } else { /* There are less than 3 correct connected components: can't know where are the marks on the scan! */ printf("! NMARKS=%d : Not enough marks detected.\n", n_cc); } } /* moves A and B to each other, proportion delta of the distance between A and B -- here only one coordinate is processed: cn is 'x' or 'y'. d is a temporary variable. */ #define CLOSER(pointa,pointb,cn,dist,delta) dist=delta*(pointb.cn-pointa.cn);pointa.cn+=dist;pointb.cn-=dist; /* deplace(...) moves coins[i] and coins[j] to each other */ void deplace(int i,int j,double delta,point *coins) { double d; CLOSER(coins[i], coins[j],x, d, delta); CLOSER(coins[i], coins[j],y, d, delta); } /* deplace_xy(...) moves two real numbers *m1 and *m2 to each other, proportion delta of the distance between them. */ void deplace_xy(double *m1,double *m2,double delta) { double d = (*m2-*m1) * delta; *m1 += d; *m2 -= d; } /* restreint(...) ensures that the point (*x,*y) is inside the image, moving it inside if necessary. tx and ty are the width and height of the image. */ void restreint(int *x,int *y,int tx,int ty) { if(*x < 0) *x = 0; if(*y < 0) *y = 0; if(*x >= tx) *x = tx - 1; if(*y >= ty) *y = ty - 1; } /* if student>=0, check_zooms_dir(...) checks that the zoom directory zooms_dir (for student number given as a parameter) exists, or tries to create it. In case of problem, error message is printer to STDOUT. if log is true, some more messages are printed. */ int check_zooms_dir(int student, char *zooms_dir=NULL,int log=0) { int ok = 1; struct stat zd; if(student >= 0) { if(stat(zooms_dir,&zd) != 0) { if(errno == ENOENT) { if(mkdir(zooms_dir,0755) != 0) { ok = 0; printf("! ZOOMDC : Zoom dir creation error %d : %s\n", errno, zooms_dir); } else { printf(": Zoom dir created %s\n", zooms_dir); } } else { ok = 0; printf("! ZOOMDS : Zoom dir stat error %d : %s\n", errno, zooms_dir); } } else { if(!S_ISDIR(zd.st_mode)) { ok = 0; printf("! ZOOMDP : Zoom dir is not a directory : %s\n", zooms_dir); } } } else { ok = 0; if(log) { printf(": No zoom dir to create (student<0).\n"); } } return ok; } /* mesure_case(...) computes the darkness value (number of black pixels, and total number of pixels) of a particular box on the scan. A "zoom" (small image with the box on the scan only) can be extracted in order to have a closer look at the scaned box later. - *src is the source black&white image. - *illustr is an image on which drawings will be made: with illustr_mode==ILLUSTR_BOX, a blue rectangle shows the box position, and a pink rectangle shows the measuring box (a box a little smaller than the box itself). with illustr_mode==ILLUSTR_PIXELS, all measured pixels will be coloured (black pixels in green, and white pixels in blue) - student is the student number. student<0 means that the student number is not yet known (we are measuring the ID binary boxes to detect the page and student numbers), so that zooms are extracted only when student>=0 - page is the page number (unused) - question,answer are the question and answer numbers for the box beeing measured. These are used to build a zoom file name from the template zooms_dir/question-answer.png - prop is a ratio that is used to reduce the box before measuring how many pixels are black (the goal here is to try to avoid measuring the border of the box, that are always dark...). It should be small (0.1 seems to be reasonable), otherwise only a small part in the center of the box will be considered -- but not too small, otherwise the border of the box could be taken into account, so that the measures are less reliable to determine if a box is ticked or not. - shape_id is the shape id of the box: SHAPE_OVAL or SHAPE_SQUARE. - o_xmin,o_xmax,o_ymin,o_ymax are the box coordinates on the original subject. NOTE: if o_xmin<0, the box coordinates on the scan are not given through these variables values, but directly in the coins[] variables. - transfo_back is the optimal linear transform that gets coordinates on the scan to coordinates on the original subject. NOTE: only used if o_xmin>=0. - coins[] will be filled with the coordinates of the 4 corners of the measuring box on the scan. NOTE: if o_xmin<0, coins[] contains as an input the coordinates of 4 corners of the box on the scan. - some reports will be drawn on *dst: if view==1, the measuring boxes will be drawn. - zooms_dir is the directory path where to store zooms extracted from the *src image. */ void mesure_case(cv::Mat src, cv::Mat illustr,int illustr_mode, int student,int page,int question, int answer, double prop,int shape_id, double o_xmin,double o_xmax,double o_ymin,double o_ymax, linear_transform *transfo_back, point *coins, cv::Mat &dst, char *zooms_dir=NULL,int view=0) { int npix, npixnoir, xmin, xmax, ymin, ymax, x, y; int z_xmin, z_xmax, z_ymin, z_ymax; ligne lignes[4]; int i, ok; double delta; double o_x, o_y; cv::Scalar pixel; double ov_r, ov_r2, ov_dir, ov_center, ov_x0, ov_x1, ov_y0, ov_y1; int tx = src.cols; int ty = src.rows; cv::Point coins_int[4]; static char* zoom_file = NULL; #if OPENCV_20 vector save_options; save_options.push_back(cv::IMWRITE_PNG_COMPRESSION); save_options.push_back(7); #endif npix = 0; npixnoir = 0; if(illustr.data != NULL) { for(int i = 0; i < 4; i++) { coins_int[i].x = (int)coins[i].x; coins_int[i].y = (int)coins[i].y; } if(illustr_mode == ILLUSTR_BOX) { /* draws the box on the illustrated image (for zoom) */ for(int i = 0; i < 4; i++) { cv::line(illustr, coins_int[i], coins_int[(i+1)%4], BLEU, 1, cv::LINE_AA); } } /* bounding box for zoom */ z_xmin = tx - 1; z_xmax = 0; z_ymin = ty - 1; z_ymax = 0; for(int i = 0; i < 4; i++) { if(coins_int[i].x < z_xmin) z_xmin = coins_int[i].x; if(coins_int[i].x > z_xmax) z_xmax = coins_int[i].x; if(coins_int[i].y < z_ymin) z_ymin = coins_int[i].y; if(coins_int[i].y > z_ymax) z_ymax = coins_int[i].y; } /* a little bit larger... */ int delta = (z_xmax - z_xmin + z_ymax - z_ymin) / 20; z_xmin -= delta; z_ymin -= delta; z_xmax += delta; z_ymax += delta; } /* box reduction */ delta = (1 - prop) / 2; deplace(0, 2, delta, coins); deplace(1, 3, delta, coins); deplace_xy(&o_xmin, &o_xmax, delta); deplace_xy(&o_ymin, &o_ymax, delta); /* output points used for mesuring */ for(i = 0; i < 4; i++) { printf("COIN %.3f,%.3f\n",coins[i].x,coins[i].y); } /* bounding box */ xmin = tx - 1; xmax = 0; ymin = ty - 1; ymax = 0; for(i = 0; i < 4; i++) { if(coins[i].x < xmin) xmin = (int)coins[i].x; if(coins[i].x > xmax) xmax = (int)coins[i].x; if(coins[i].y < ymin) ymin = (int)coins[i].y; if(coins[i].y > ymax) ymax = (int)coins[i].y; } restreint(&xmin, &ymin, tx, ty); restreint(&xmax, &ymax, tx, ty); if(o_xmin < 0) { /* computes half planes equations */ calcule_demi_plan(&coins[0], &coins[1], &lignes[0]); calcule_demi_plan(&coins[1], &coins[2], &lignes[1]); calcule_demi_plan(&coins[2], &coins[3], &lignes[2]); calcule_demi_plan(&coins[3], &coins[0], &lignes[3]); } else { if(shape_id == SHAPE_OVAL) { if(o_xmax-o_xmin < o_ymax-o_ymin) { /* vertical oval */ ov_dir = DIR_Y; ov_r = (o_xmax - o_xmin) / 2; ov_x0 = o_xmin; ov_x1 = o_xmax; ov_y0 = o_ymin + ov_r; ov_y1 = o_ymax - ov_r; ov_center = (o_xmin + o_xmax) / 2; } else { /* horizontal oval */ ov_dir = DIR_X; ov_r = (o_ymax - o_ymin) / 2; ov_x0 = o_xmin + ov_r; ov_x1 = o_xmax - ov_r; ov_y0 = o_ymin; ov_y1 = o_ymax; ov_center = (o_ymin + o_ymax) / 2; } ov_r2 = ov_r * ov_r; } } for(x = xmin; x <= xmax; x++) { for(y = ymin; y <= ymax; y++) { if(o_xmin < 0) { /* With "mesure" command, checks if this point is in the box or not from the scan coordinates (x,y) */ ok = 1; for(i = 0; i < 4; i++) { if(evalue_demi_plan(&lignes[i], (double)x, (double)y) == 0) ok = 0; } } else { /* With "mesure0" command, computes the coordinates in the original image with transfo_back, and then check if the point is in the box (this is easier since this box has edges parallel to coordinate axis) */ transforme(transfo_back, (double)x, (double)y, &o_x, &o_y); if(shape_id == SHAPE_OVAL) { if(ov_dir == DIR_X) { if(o_x <= ov_x0) { ok = (SUM_SQUARE(o_x - ov_x0, o_y - ov_center) <= ov_r2); } else if(o_x>=ov_x1) { ok = (SUM_SQUARE(o_x - ov_x1, o_y - ov_center) <= ov_r2); } else { ok = (o_y>=ov_y0 && o_y<=ov_y1); } } else { if(o_y<=ov_y0) { ok = (SUM_SQUARE(o_y - ov_y0, o_x - ov_center) <= ov_r2); } else if(o_y>=ov_y1) { ok = (SUM_SQUARE(o_y - ov_y1, o_x - ov_center) <= ov_r2); } else { ok = (o_x >= ov_x0 && o_x <= ov_x1); } } } else { ok = !(o_x < o_xmin || o_x > o_xmax || o_y < o_ymin || o_y > o_ymax); } } if(ok == 1) { npix++; if(PIXEL(src,x,y)) npixnoir++; if(illustr.data != NULL && illustr_mode == ILLUSTR_PIXELS) { /* with option -k, colors (on the zooms) pixels that are taken into account while computing the darkness ratio of the boxes */ illustr.ptr(y)[x*3] = (PIXEL(src,x,y) ? 0 : 255); illustr.ptr(y)[x*3 + 1] = 128; illustr.ptr(y)[x*3 + 2] = 0; } } } } if(view == 1 || illustr.data != NULL) { for(int i = 0; i < 4; i++) { coins_int[i].x = (int)coins[i].x; coins_int[i].y = (int)coins[i].y; } } #ifdef OPENCV_21 if(view == 1) { for(int i = 0; i < 4; i++) { cv::line(dst, coins_int[i], coins_int[(i+1)%4], RGB_COLOR(255,255,255), 1, cv::LINE_AA); } } #endif if(illustr.data != NULL) { if(illustr_mode == ILLUSTR_BOX) { /* draws the measuring box on the illustrated image (for zoom) */ for(int i = 0; i < 4; i++) { cv::line(illustr, coins_int[i], coins_int[(i+1)%4], ROSE, 1, cv::LINE_AA); } } /* making zoom */ if(zooms_dir != NULL && student >= 0) { /* check if directory is present, or ceate it */ ok = check_zooms_dir(student, zooms_dir, 0); /* save zoom file */ if(ok) { if(asprintf(&zoom_file, "%s/%d-%d.png", zooms_dir, question, answer)>0) { printf(": Saving zoom to %s\n", zoom_file); printf(": Z=(%d,%d)+(%d,%d)\n", z_xmin, z_ymin, z_xmax - z_xmin, z_ymax - z_ymin); cv::Mat roi = illustr(cv::Rect(z_xmin, z_ymin, z_xmax - z_xmin, z_ymax - z_ymin)); bool result = false; try { result = cv::imwrite(zoom_file, roi #if OPENCV_20 , save_options #endif ); } catch (const cv::Exception& ex) { printf("! ZOOMS : Zoom save error: %s\n", ex.what()); } if(result) printf("ZOOM %d-%d.png\n", question, answer); } else { printf("! ZOOMFN : Zoom file name error\n"); } } } } printf("PIX %d %d\n", npixnoir, npix); } /* MAIN Processes command-line parameters, and then reads commands from standard input, and answers them on standard output. */ int main(int argc, char** argv) { if(! setlocale(LC_ALL, "POSIX")) { printf("! LOCALE : setlocale failed\n"); } double threshold = 0.6; double taille_orig_x = 0; double taille_orig_y = 0; double dia_orig = 0; double tol_plus = 0; double tol_moins = 0; int n_min_cc = 3; double prop, xmin, xmax, ymin, ymax; double coins_x[4], coins_y[4]; double coins_x0[4], coins_y0[4]; double tmp; int upside_down; int i; int student, page, question, answer; point box[4]; linear_transform transfo, transfo_back; double mse; cv::Mat src; cv::Mat dst; cv::Mat illustr; cv::Mat src_calage; int illustr_mode = ILLUSTR_BOX; char *scan_file = NULL; char *out_image_file = NULL; char *zooms_dir = NULL; int view = 0; int post_process_image = 0; int ignore_red = 0; #if OPENCV_20 vector save_options; save_options.push_back(cv::IMWRITE_JPEG_QUALITY); save_options.push_back(75); #endif // Options // -x tx : gives the width of the original subject // -y ty : gives the height of the opriginal subject // -d d : gives the diameter of the corner marks on the original subject // -p dp : gives the tolerance above mark diameter (fraction of the diameter) // -m dm : gives the tolerance below mark diameter // -c n : gives the minimum requested number of corner marks // -t th : gives the threshold to convert to black&white // -o file : gives output file name for detected layout report image // -v / -P : asks for marks detection debugging image report char c; while ((c = getopt(argc, argv, "x:y:d:i:p:m:t:c:o:vPrk")) != -1) { switch (c) { case 'x': taille_orig_x = atof(optarg); break; case 'y': taille_orig_y = atof(optarg); break; case 'd': dia_orig = atof(optarg); break; case 'p': tol_plus = atof(optarg); break; case 'm': tol_moins = atof(optarg); break; case 't': threshold = atof(optarg); break; case 'c': n_min_cc = atoi(optarg); break; case 'o': out_image_file = strdup(optarg); break; case 'v': view = 1; break; case 'r': ignore_red = 1; break; case 'P': post_process_image = 1; view = 2; break; case 'k': illustr_mode=ILLUSTR_PIXELS; break; } } printf("TX=%.2f TY=%.2f DIAM=%.2f\n", taille_orig_x, taille_orig_y, dia_orig); size_t commande_t; char* commande = NULL; char* endline; char text[128]; char shape_name[32]; int shape_id; cv::Point textpos; double fh; while(getline(&commande, &commande_t, stdin) >= 6) { //printf("LC_NUMERIC: %s\n",setlocale(LC_NUMERIC,NULL)); if((endline=strchr(commande, '\r'))) *endline='\0'; if((endline=strchr(commande, '\n'))) *endline='\0'; if(processing_error == 0) { if(strncmp(commande, "output ", 7) == 0) { free(out_image_file); out_image_file = strdup(commande + 7); } else if(strncmp(commande,"zooms ", 6)==0) { free(zooms_dir); zooms_dir = strdup(commande + 6); } else if(strncmp(commande,"load ", 5)==0) { free(scan_file); scan_file = strdup(commande + 5); if(out_image_file != NULL && !post_process_image) { try { illustr = cv::imread(scan_file, cv::IMREAD_COLOR); } catch (const cv::Exception& ex) { printf("! LOAD : Error loading scan file in COLOR [%s]\n", scan_file); printf("! OpenCV error: %s\n", ex.what()); processing_error = 4; } printf(": Image background loaded\n"); } load_image(src,scan_file, ignore_red, threshold, view); printf(": Image loaded\n"); if(processing_error == 0) { src_calage = src.clone(); if(src_calage.data == NULL) { printf("! LOAD : Error cloning image\n"); processing_error = 5; } } if(processing_error == 0) { calage(src_calage, illustr, taille_orig_x, taille_orig_y, dia_orig, tol_plus, tol_moins, n_min_cc, coins_x, coins_y, dst, view); upside_down = 0; } if(out_image_file != NULL && illustr.data == NULL) { printf(": Storing layout image\n"); illustr = dst; dst = cv::Mat(); } src_calage.release(); } else if((sscanf(commande,"optim3 %lf,%lf %lf,%lf %lf,%lf %lf,%lf", &coins_x0[0], &coins_y0[0], &coins_x0[1], &coins_y0[1], &coins_x0[2], &coins_y0[2], &coins_x0[3], &coins_y0[3]) == 8) || (strncmp(commande,"reoptim3",8) == 0) ) { /* TRYING TO OMIT EACH CORNER IN TURN */ /* "optim3" and 8 arguments: 4 marks positions (x y, order: UL UR BR BL) return: optimal linear transform and MSE */ /* "reoptim3": optim with the same arguments as for last "optim" call */ mse = omit_optim(coins_x0, coins_y0, coins_x, coins_y, 4, &transfo); printf("Transfo:\na=%f\nb=%f\nc=%f\nd=%f\ne=%f\nf=%f\n", transfo.a, transfo.b, transfo.c, transfo.d, transfo.e, transfo.f); printf("MSE=0.0\n"); printf("QUALITY=%f\n", mse); revert_transform(&transfo, &transfo_back); } else if((sscanf(commande,"optim %lf,%lf %lf,%lf %lf,%lf %lf,%lf", &coins_x0[0], &coins_y0[0], &coins_x0[1], &coins_y0[1], &coins_x0[2], &coins_y0[2], &coins_x0[3], &coins_y0[3]) == 8) || (strncmp(commande,"reoptim",7) == 0) ) { /* "optim" and 8 arguments: 4 marks positions (x y, order: UL UR BR BL) return: optimal linear transform and MSE */ /* "reoptim": optim with the same arguments as for last "optim" call */ mse = optim(coins_x0,coins_y0,coins_x,coins_y,4,&transfo); printf("Transfo:\na=%f\nb=%f\nc=%f\nd=%f\ne=%f\nf=%f\n", transfo.a, transfo.b, transfo.c, transfo.d, transfo.e, transfo.f); printf("MSE=%f\n",mse); revert_transform(&transfo, &transfo_back); } else if(strncmp(commande,"rotateOK",8) == 0) { /* validates upside down rotation */ if(upside_down) { transfo.a = - transfo.a; transfo.b = - transfo.b; transfo.c = - transfo.c; transfo.d = - transfo.d; transfo.e = (src.cols - 1) - transfo.e; transfo.f = (src.rows - 1) - transfo.f; if(src.data != NULL) cv::flip(src, src, -1); if(illustr.data != NULL) cv::flip(illustr, illustr, -1); if(dst.data != NULL) cv::flip(dst, dst, -1); for(i = 0; i < 4; i++) { coins_x[i] = (src.cols - 1) - coins_x[i]; coins_y[i] = (src.rows - 1) - coins_y[i]; } upside_down = 0; printf("Transfo:\na=%f\nb=%f\nc=%f\nd=%f\ne=%f\nf=%f\n", transfo.a, transfo.b, transfo.c, transfo.d, transfo.e, transfo.f); revert_transform(&transfo, &transfo_back); } } else if(strncmp(commande,"rotate180", 9) == 0) { for(i = 0; i < 2; i++) { SWAP(coins_x[i], coins_x[i+2], tmp); SWAP(coins_y[i], coins_y[i+2], tmp); } upside_down = 1 - upside_down; printf("UpsideDown=%d\n", upside_down); } else if(sscanf(commande,"id %d %d %d %d", &student, &page, &question, &answer) == 4) { /* box id */ } else if(sscanf(commande, "mesure0 %lf %s %lf %lf %lf %lf", &prop, shape_name, &xmin, &xmax, &ymin, &ymax) == 6) { /* "mesure0" and 6 arguments: proportion, shape, xmin, xmax, ymin, ymax return: number of black pixels and total number of pixels */ transforme(&transfo, xmin, ymin, &box[0].x, &box[0].y); transforme(&transfo, xmax, ymin, &box[1].x, &box[1].y); transforme(&transfo, xmax, ymax, &box[2].x, &box[2].y); transforme(&transfo, xmin, ymax, &box[3].x, &box[3].y); if(strcmp(shape_name,"oval") == 0) { shape_id = SHAPE_OVAL; } else { shape_id = SHAPE_SQUARE; } /* output transformed points */ for(i = 0; i < 4; i++) { printf("TCORNER %.3f,%.3f\n", box[i].x, box[i].y); } mesure_case(src, illustr, illustr_mode, student, page, question, answer, prop, shape_id, xmin, xmax, ymin, ymax, &transfo_back, box, dst, zooms_dir, view); student = -1; } else if(sscanf(commande,"mesure %lf %lf %lf %lf %lf %lf %lf %lf %lf", &prop, &box[0].x, &box[0].y, &box[1].x, &box[1].y, &box[2].x, &box[2].y, &box[3].x, &box[3].y) == 9) { /* "mesure" and 9 arguments: proportion, and 4 vertices (x y, order: UL UR BR BL) returns: number of black pixels and total number of pixels */ mesure_case(src, illustr, illustr_mode, student, page, question, answer, prop, SHAPE_SQUARE, -1, -1, -1, -1, NULL, box, dst, zooms_dir, view); student = -1; } else if(strlen(commande) < 100 && sscanf(commande, "annote %s", text) == 1) { fh = src.rows / 50.0; textpos.x = 10; textpos.y = (int)(1.6 * fh); cv::putText(illustr, text, textpos, cv::FONT_HERSHEY_PLAIN, fh/14, BLEU, 1+(int)(fh/20), cv::LINE_AA); } else { printf(": %s\n", commande); printf("! SYNERR : Syntax error\n"); } } else { printf("! ERROR : not responding due to previous error.\n"); } printf("__END__\n"); fflush(stdout); } #ifdef OPENCV_21 #ifdef AMC_DETECT_HIGHGUI if(view == 1) { cv::namedWindow("Source", cv::WINDOW_NORMAL); cv::imshow("Source", src); cv::namedWindow("Components", cv::WINDOW_NORMAL); cv::imshow("Components", dst); cv::waitKey(0); dst.release(); } #endif #endif if(illustr.data && strlen(out_image_file) > 1) { printf(": Saving layout image to %s\n", out_image_file); try { cv::imwrite(out_image_file, illustr #if OPENCV_20 , save_options #endif ); } catch (const cv::Exception& ex) { printf("! LAYS : Layout image save error: %s\n", ex.what()); } } illustr.release(); src.release(); free(commande); free(scan_file); return(0); } auto-multiple-choice-1.4.0/AMC-export.pl000077500000000000000000000041131341176102400200220ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2009-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use Getopt::Long; use AMC::Basic; use AMC::Gui::Avancement; use Module::Load; use_amc_plugins(); my $module='CSV'; my $output=''; my $data_dir=''; my $fich_notes=''; my $fich_assoc=''; my $fich_noms=''; my $noms_encodage='utf-8'; my $csv_build_name=''; my @o_out=(); my $debug=''; my $sort='n'; my $useall=1; my $rtl=''; @ARGV=unpack_args(@ARGV); @ARGV_ORIG=@ARGV; GetOptions("module=s"=>\$module, "sort=s"=>\$sort, "useall=s"=>\$useall, "data=s"=>\$data_dir, "fich-noms=s"=>\$fich_noms, "csv-build-name=s"=>\$csv_build_name, "noms-encodage=s"=>\$noms_encodage, "rtl!"=>\$rtl, "option-out=s"=>\@o_out, "output|o=s"=>\$output, "debug=s"=>\$debug, ); set_debug($debug); debug "Parameters: ".join(" ",map { "<$_>" } @ARGV_ORIG); load("AMC::Export::$module"); $ex = "AMC::Export::$module"->new(); $ex->set_options("sort", "keys"=>$sort); $ex->set_options("fich", "datadir"=>$data_dir, "noms"=>$fich_noms, ); $ex->set_options("noms", "encodage"=>$noms_encodage, "useall"=>$useall, "identifiant"=>$csv_build_name, ); $ex->set_options("out","rtl"=>$rtl); for my $oo (@o_out) { if($oo =~ /([^=]+)=(.*)/) { $ex->set_options("out",$1=>$2); } } debug "Exporting..."; utf8::downgrade($output); $ex->export($output); print $ex->messages_as_string(); auto-multiple-choice-1.4.0/AMC-getimages.pl000077500000000000000000000353711341176102400204600ustar00rootroot00000000000000#! /usr/bin/perl -w # # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use AMC::Basic; use AMC::Gui::Avancement; use File::Spec::Functions qw/splitpath catpath splitdir catdir catfile rel2abs tmpdir/; use File::Temp qw/ tempdir /; use File::Copy; use Getopt::Long; use_gettext; binmode(STDOUT, ":utf8"); my $list_file=''; my $progress_id=''; my $copy_to=''; my $debug=''; my $vector_density=300; my $orientation=""; my $rotate_direction="90"; my $force_convert=0; my %use=(pdfimages=>1,pdftk=>1,qpdf=>1); GetOptions("list=s"=>\$list_file, "progression-id=s"=>\$progress_id, "copy-to=s"=>\$copy_to, "debug=s"=>\$debug, "vector-density=s"=>\$vector_density, "orientation=s"=>\$orientation, "rotate-direction=s"=>\$rotate_direction, "use-pdfimages!"=>\$use{pdfimages}, "use-pdftk!"=>\$use{pdftk}, "use-qpdf!"=>\$use{qpdf}, "force-convert!"=>\$force_convert, ); set_debug($debug); $use{pdfimages}=0 if($force_convert); # cancels use of pdfimages/pdftk if these commands are not available # on the system for my $cmd (qw/pdfimages pdftk qpdf/) { if($use{$cmd} && !commande_accessible($cmd)) { debug "WARNING: command $cmd not found"; $use{$cmd}=0; } } # delete trailing / in the --copy-to directory option $copy_to =~ s:(?<=.)/+$::; # filenames of scan files are handled by a hashref that reminds if the # file has already been processed: in this hash, # # * path is the whole path of the scan, # * dir is the directory part of the path # * file is the file part of the path # * orig is 1 if the file is the original scan # original_file builds a hashref for a original scan file (not yet # processed or split or moved) sub original_file { my ($file_path)=@_; utf8::downgrade($file_path); return({ path=>$file_path,orig=>1 }); } # derivative_file builds a hashref for a file that has already been # processed in some way by AMC-getimages sub derivative_file { my ($file_path)=@_; return({ path=>$file_path }); } # check_split_path($f,$force) computes (if $force is set, or if not # yet already done) the dir and file parts of the path sub check_split_path { my ($f,$force)=@_; if($f->{path} && ($force || ! $f->{file})) { my ($fxa,$fxb,$file)=splitpath($f->{path}); $f->{file}=$file; $f->{dir}=catpath($fxa,$fxb,''); } } # variables to show progress my $dp; my $p; $p=AMC::Gui::Avancement::new(1,'id'=>$progress_id) if($progress_id); # image_size computes the image size (width,height) using 'identify' # from ImageMagick/GraphicsMagick sub image_size { my ($file)=@_; my @r=(); my @cmd=(magick_module("identify"),"-format","%w,%h\n",$file); if(open(IDF,"-|",@cmd)) { while() { chomp(); @r=($1,$2) if(/([^,]+),(.*)/); } close(IDF); } else { debug("CMD: ".join(' ',@cmd)); debug("ERROR: $!"); } return(@r); } # image_orientation returns "portrait", "landscape" or "" (in # indetermined cases) depending on the image orientation. sub image_orientation { my ($file)=@_; my ($w,$h)=image_size($file); if(defined($h) && defined($w)) { return( $h>1.1*$w ? "portrait" : $w>1.1*$h ? "landscape" : ""); } else { debug "WARNING: undefined image orientation for $file"; return(undef); } } # move_derivative($origin,$derivative) moves the file descried by # $derivative to the same directory as $origin (changing its name if a # file with this name already exists), and then updates $derivative to # point to the new location, and returns it. sub move_derivative { my ($origin,$derivative)=@_; if(!$copy_to) { check_split_path($origin); check_split_path($derivative); my $dest=new_filename($origin->{dir}."/".$derivative->{file}); debug "Moving $derivative->{path} to $dest"; if(!move($derivative->{path},$dest)) { debug_and_stderr "File move failed: $dest"; } $derivative->{path}=$dest; check_split_path($derivative,1); } return($derivative); } # replace_by($origin,@derivative_paths) is called after a scan file # described by $origin has been split in several files. It moves the # derivative files to the same directory has the origin, deletes the # $origin file if it is not an original scan file (has already been # processed in some way), and returns the derivatives files # descriptions array. sub replace_by { my ($origin,@derivative_paths)=@_; my @fd=map { move_derivative($origin,derivative_file($_)) } @derivative_paths; unlink $origin->{path} if(!$origin->{orig}); return(@fd); } ################################################################### # STEP 0: collects all original scan provided as arguments of the # command, or in a file my @f=map { original_file($_) } (@ARGV); if(-f $list_file) { open(LIST,$list_file); while() { chomp; push @f,original_file($_); } close(LIST); } ################################################################### # STEP 1: split multi-page PDF with pdfimages, pdftk or qpdf, which use # less memory than ImageMagick if($use{pdfimages} || $use{pdftk} || $use{qpdf}) { # @pdfs is the list of PDF files my @pdfs=grep { $_->{path} =~ /\.pdf$/i } @f; # @fs will collect all split pages from PDF files. It is initialized # with the list of non-PDF files. @fs=grep { $_->{path} !~ /\.pdf$/i } @f; # starts PDFs processing... if(@pdfs) { $dp=1/(1+$#pdfs); $p->text(__("Splitting multi-page PDF files...")) if($p); PDF:for my $file (@pdfs) { $p->progres($dp) if($p); # makes a temporary directory to extract images from the PDF my $temp_loc=tmpdir(); my $temp_dir; check_split_path($file); # First, try pdfimages, which is much more judicious if($use{pdfimages}) { $temp_dir = tempdir( DIR=>$temp_loc, CLEANUP => (!get_debug()) ); debug "PDF split tmp dir / pdfimages: $temp_dir"; if(system("pdfimages","-p",$file->{path}, $temp_dir.'/'.$file->{file}.'-page')==0) { opendir(my $dh, $temp_dir) || debug "can't opendir $temp_dir: $!"; my @images=map { "$temp_dir/$_" } sort { $a cmp $b } grep { /-page-/ } readdir($dh); closedir $dh; if(@images) { # pdfimages produced some files. Check that the page # numbers follow each other starting from 1 my $ok=1; PDFIM: for my $i (0..$#images) { if($images[$i] =~ /-page-([0-9]+)/) { my $pp=$1; if($pp != $i+1) { debug "INFO: missing page ".($i+1)." from pdfimages"; $ok=0; last PDFIM; } } } if($ok) { debug "pdfimages ok for $file->{file}"; push @fs,replace_by($file,@images); next PDF; } } else { debug "INFO: pdfimages produced no file"; } } else { debug "ERROR while trying pdfimages: [$?] $!"; } } # Second, try qpdf if($use{qpdf}) { $temp_dir = tempdir( DIR=>$temp_loc, CLEANUP => (!get_debug()) ); debug "PDF split tmp dir / qpdf: $temp_dir"; if(system("qpdf",$file->{path},"--split-pages",$temp_dir.'/'.$file->{file}.'-page-%d.pdf')==0) { opendir(my $dh, $temp_dir) || debug "can't opendir $temp_dir: $!"; my @images=map { "$temp_dir/$_" } sort { $a cmp $b } grep { /-page-/ } readdir($dh); closedir $dh; if(@images) { debug "qpdf ok for $file->{file}"; push @fs,replace_by($file,@images); next PDF; } else { debug "INFO: qpdf produced no file"; } } else { debug "ERROR while trying qpdf: [$?] $!"; } } # If not successful with pdfimages and qpdf, use pdftk if($use{pdftk}) { $temp_dir = tempdir( DIR=>$temp_loc, CLEANUP => (!get_debug()) ); debug "PDF split tmp dir / pdftk: $temp_dir"; if(system("pdftk",$file->{path},"burst","output", $temp_dir.'/'.$file->{file}.'-page-%04d.pdf')==0) { opendir(my $dh, $temp_dir) || debug "can't opendir $temp_dir: $!"; my @burst=replace_by($file, map { "$temp_dir/$_" } sort { $a cmp $b } grep { /-page-/ } readdir($dh)); closedir $dh; if(@burst) { push @fs,@burst; next PDF; } else { debug "WARNING: pdftk produced no file"; } } else { debug "ERROR while trying pdftk burst: [$?] $!"; } } # no success... keep the PDF to be processed by magick push @fs,$file; } $p->text('') if($p); } # To end, replaces the file list @f=@fs; } ################################################################### # STEP 2: split other multi-page images (such as TIFF) with # ImageMagick, and convert vector to bitmap @fs=(); for my $fich (@f) { check_split_path($fich); if($fich->{file} =~ /\.(pdf|eps|ps)$/i && commande_accessible('gs')) { # ghostscript is preferred for PDF, EPS and PS files. my $temp_loc=tmpdir(); my $temp_dir = tempdir( DIR=>$temp_loc, CLEANUP => (!get_debug()) ); debug "GS split tmp dir: $temp_dir"; my $fb = $fich->{file}; if(! ($fb =~ s/\.([^.]+)$/_%04d.$1/)) { $fb .= '_%04d'; } $fb.=".png"; my @cmd=("gs","-sDEVICE=png16m","-sOutputFile=$temp_dir/$fb", "-r$vector_density", "-dNOPAUSE","-dSAFER","-dBATCH"); push @cmd,"-dQUIET" if(!$debug); system(@cmd,$fich->{path}); opendir(my $dh, $temp_dir) || debug "can't opendir $temp_dir: $!"; push @fs,replace_by($fich, grep { -f "$_" } map { "$temp_dir/$_" } sort { $a cmp $b } readdir($dh)); closedir $dh; } else { # Image files, that maybe need some processing... my $suffix_change=''; my @pre_options=(); # number of pages : my $np=0; # any scene with number > 0 ? This may cause problems with OpenCV my $scene=0; open(NP,"-|",magick_module("identify"),"-format","%s\n",$fich->{path}); while() { chomp(); if(/[^\s]/) { $np++; $scene=1 if($_ > 0); } } close(NP); # Is this a vector format file? If so, we have to convert it # to bitmap my $vector=''; if($fich->{file} =~ /\.(pdf|eps|ps)$/i) { $vector=1; $suffix_change='.png'; @pre_options=('-density',$vector_density) if($vector_density); } # With ImageMagic, remove alpha channel to get white background if(!use_gm_command()) { push @pre_options,"-alpha","remove"; } debug "> Scan $fich->{path}: $np page(s)".($scene ? " [has scene>0]" : ""); if($np>1 || $scene || $vector || $force_convert) { # split multipage image into 1-page images, and/or convert # to bitmap format if($p) { if($vector) { # TRANSLATORS: Here, %s will be replaced with the path of a file that will be converted. $p->text(sprintf(__("Converting %s to bitmap..."),$fich->{file})); } elsif($np>1) { # TRANSLATORS: Here, %s will be replaced with the path of a file that will be splitted to several images (one per page). $p->text(sprintf(__("Splitting multi-page image %s..."),$fich->{file})); } elsif($scene || $force_convert) { # TRANSLATORS: Here, %s will be replaced with the path of a file that will be splitted to several images (one per page). $p->text(sprintf(__("Processing image %s..."),$fich->{file})); } } my $temp_loc=tmpdir(); my $temp_dir = tempdir( DIR=>$temp_loc, CLEANUP => (!get_debug()) ); debug "Image split tmp dir: $temp_dir"; my $fb = $fich->{file}; if(! ($fb =~ s/\.([^.]+)$/_%04d.$1/)) { $fb .= '_%04d'; } $fb.=$suffix_change; system(magick_module("convert"), @pre_options,$fich->{path},"+adjoin","$temp_dir/$fb"); opendir(my $dh, $temp_dir) || debug "can't opendir $temp_dir: $!"; push @fs,replace_by($fich, grep { -f "$_" } map { "$temp_dir/$_" } sort { $a cmp $b } readdir($dh)); closedir $dh; $p->text('') if($p); } else { # no coversion needed... push @fs,$fich; } } } @f=@fs; ################################################################### # STEP 3: check files orientation (if requested) and rotate them 90° # if needed. if($orientation) { my $temp_dir = tempdir( DIR=>tmpdir(), CLEANUP => (!get_debug()) ); @fs=(); for my $fich (@f) { my $o=image_orientation($fich->{path}); if($o && $o ne $orientation) { check_split_path($fich); debug "Rotate scan file $fich->{path} to orientation $orientation"; my $dest=new_filename($temp_dir.'/rotated-'.$fich->{file}); my @cmd=(magick_module("convert"), $fich->{path}, "-rotate",$rotate_direction, $dest); debug "CMD: ".join(' ',@cmd); if(system(@cmd)==0) { push @fs,replace_by($fich,$dest); } else { debug "Error while rotating $fich->{path}: $?"; push @fs,$fich; } } else { push @fs,$fich; } } @f=@fs; } ################################################################### # STEP 4: if requested, copy files to project directory if($copy_to && @f) { $p->text(__"Copying scans to project directory...") if($p); $dp=1/(1+$#f); my @fl=(); my $c=0; for my $fich (@f) { check_split_path($fich); # no accentuated or special characters in filename, please! # this could break the process somewere... my $fb=string_to_filename($fich->{file},'scan'); my $dest=$copy_to."/".$fb; utf8::downgrade($dest); my $deplace=0; if($fich->{path} ne $dest) { if(-e $dest) { # dest file already exists: change name debug "File $dest already exists"; $dest=new_filename($dest); debug "--> $dest"; } if(copy($fich->{path},$dest)) { push @fl,derivative_file($dest); $deplace=1; } else { debug "$fich->{path} --> $dest"; debug "COPY ERROR: $!"; } } $c+=$deplace; push @fl,derivative_file($fich->{path}) if(!$deplace); $p->progres($dp) if($p); } debug "Copied scan files: ".$c."/".(1+$#f); @f=@fl; $p->text('') if($p); } ################################################################### # STEP 5: updates the files list with processed files names if($list_file) { open(LIST,">",$list_file); for(@f) { print LIST $_->{path}."\n"; } close(LIST); } else { debug "WARNING: no output list file requested"; } auto-multiple-choice-1.4.0/AMC-gui-apropos.glade.in000066400000000000000000000047101341176102400220140ustar00rootroot00000000000000 False 5 AMC A propos amc-apropos False True center-on-parent dialog amc-apropos Auto Multiple Choice @/PACKAGE_V_DEB/@ Copyright (C) 2008-2018 Alexis Bienvenüe and the AMC development team Automatic multiple choice questionnaires management https://www.auto-multiple-choice.net/ Visit the AMC website @/CREATORS/@ and @/AUTHORS/@ @/DOCUMENTERS/@ @/TRANSLATORS/@ auto-multiple-choice gpl-2-0 True False vertical 2 True False end False True end 0 auto-multiple-choice-1.4.0/AMC-gui-choix_pages_impression.glade000066400000000000000000000406511341176102400244710ustar00rootroot00000000000000 450 False 5 Papers printing amc-imprime-copies center-on-parent dialog amc-imprime-copies True False vertical 2 True False end gtk-cancel False True True True True False False 0 gtk-ok False True True True True False False 1 False True end 2 True False vertical True False Please select papers you wish to print: False True 0 60 True True 60 True True Select papers you wish to print (ctrl-a for all), then confirm... True True 1 True True 0 True False True False Answer sheet printing True True 0 True False liststore4 0 True True 1 False True 1 False vertical True False 4 True False Printer: True True 0 True False liststore3 0 True True 1 False False 0 True True True False vertical True False 4 True False center two-side printing 0 0 True False center liststore1 0 1 0 True True 0 True False False False 1 True False printing options False False 1 False False 2 False True False Destination directory True True 0 True False select-folder Select destination directory for printable files True True 1 False True 3 button14 button15 auto-multiple-choice-1.4.0/AMC-gui-choix_postcorrect.glade000066400000000000000000000250151341176102400234660ustar00rootroot00000000000000 1 100 1 1 10 1000 1 10 False 5 Post-correction dialog True False vertical 2 True False end gtk-cancel False True True True True False False 0 gtk-apply False True True True True False False 1 False True end 0 400 100 True False True True 0 True False vertical True False Please enter the teacher score sheet number and copy number to get the correct answers from: True False False 0 True False gtk-go-back False True True True True False True 0 True True 6 False False adjustment1 True True False True 1 True True 6 False False adjustment2 True True False True 2 gtk-go-forward False True True True True False True 3 False False 1 Guess simple/multiple status False True True False Sets type of all questions for which 2 or more answers are ticked on the teacher answer sheet to multiple 0.5 True True True 2 False True 1 button22 postcorrect_apply auto-multiple-choice-1.4.0/AMC-gui-choix_projet.glade000066400000000000000000000475731341176102400224370ustar00rootroot00000000000000 True False gtk-directory True False gtk-copy False 5 Open a MC project amc-choix-projet center-on-parent dialog amc-choix-projet True False vertical 2 True False end False True True True True False True False gtk-undo True True 0 True False Cancel True True 1 False False 0 False True True True False True False gtk-new True True 0 True False New project True True 1 False False 1 gtk-open False True True True True False False 2 False True True True False True False gtk-edit True True 0 True False Rename True True 1 False False 3 Clone False True True image2 False False 4 gtk-delete False True True True False False 5 gtk-undo False True True True False False 6 gtk-ok False True True True False False 7 False True end 0 True False vertical True False 4 Choose directory False True True True image1 False True 0 True False Open an existing MC project: True True 1 False True 0 200 True True True True 4 horizontal 4 1 1 2 True True 1 True False False True 4 2 True True 1 False vertical True False <b>Create an new project:</b> True False False 3 0 True False 4 True False Project name: True True 0 True True False False True True 1 False True 1 False 5 <b>Note :</b> a project name can only contain alphanumeric characters, plus some simple characters (-_+.:). True True True True 2 False True 2 projet_bouton_annule projet_bouton_creation projet_bouton_ouverture auto-multiple-choice-1.4.0/AMC-gui-choose-mode.glade000066400000000000000000000126201341176102400221250ustar00rootroot00000000000000 False 5 dialog True question Before starting data capture, please choose the mode corresponding to what you did with the printed questions. False vertical 14 False end gtk-undo False True True True False True False True 0 gtk-ok False True True True False True False True 1 False True end 0 horizontal True False True False 0 False False 0 False True True True False True False gtk-info False False 1 False False 3 button1 button_capture_go auto-multiple-choice-1.4.0/AMC-gui-choose_columns.glade000066400000000000000000000121431341176102400227430ustar00rootroot00000000000000 False 5 Choose columns to export dialog False vertical False end gtk-undo False True True True True False True 0 gtk-ok False True True True True False True 1 False True end 0 True False vertical True False Order and select the columns to include in the exported file: True 30 False True 0 200 True True never in 200 True True multiple True True 1 True True 1 button2 columns_ok auto-multiple-choice-1.4.0/AMC-gui-choose_students.glade000066400000000000000000000174121341176102400231400ustar00rootroot00000000000000 True False gtk-clear False 5 Choose students dialog False vertical False end gtk-cancel False True True True True False True 0 gtk-ok False True True True True False True 1 False True end 0 True False vertical True False Select the students for which you want to annotate the score sheet: True 40 False True 0 200 True True never in 200 True True multiple True True 1 True False True False Search: False True 0 True True True True 1 False True True True end center image1 False False 2 False False 2 True True 1 button2 columns_ok auto-multiple-choice-1.4.0/AMC-gui-cleanup.glade000066400000000000000000000110021341176102400213430ustar00rootroot00000000000000 True False gtk-clear False 5 Cleanup dialog False vertical False end gtk-undo False True True True True False True 0 Remove selected files False True True True image1 False True 1 False True end 0 True False vertical 3 True False To save disk space, you can remove some intermediate files from your project directory. True False True 0 True True left True True 1 False True 1 button3 button4 auto-multiple-choice-1.4.0/AMC-gui-edit_preferences.glade000066400000000000000000011063441341176102400232410ustar00rootroot00000000000000 1 0.10000000000000001 0.01 0.10000000000000001 1 10 1 1 10 25 100 1 10 1 65535 1 10 0.40000000000000002 1 0.01 0.10000000000000001 1 0.01 0.10000000000000001 1 30 1 1 5 10 100 1 10 1 0.01 0.10000000000000001 100 0.10000000000000001 2 1 1 0.01 0.10000000000000001 10 100 10 1 10 50 0.10000000000000001 1 100 0.10000000000000001 1 10 1 2 1 0.10000000000000001 0.01 0.10000000000000001 1 0.01 0.10000000000000001 1 0.01 0.10000000000000001 30 500 30 10 100 UTF-8 ISO-8859-15 Windows-1252 pdflatex latex+dvipdf latex+dvipdfmx xelatex platex+dvipdf lualatex False amc-preferences dialog amc-preferences True False vertical True False end False True end 0 True True True True True True never in True False True False vertical True False 0 none True False 12 True False True True True False LaTeX models directory select-folder Please select a directory containing LaTeX models for AMC, with their descriptions 1 0 True False LaTeX models directory 0 0 True False True Projects directory. May be modified only if there are no opened projects. select-folder Please select the projects directory 1 1 True False Projects directory 0 1 True False <b>Directories</b> True False False 0 True False 0 none True False 12 True False True True True False PDF files 0 0 True False Images 0 1 True False CSV data files 0 2 True False OpenOffice files 0 3 True False XML files 0 4 True False Command to edit LaTeX files LaTeX editor 0 5 True False Plain text editor 0 6 True False Command for directory browsing (string %d will be replaced by the directory path before execution) File browser 0 7 True False Web browser 0 8 True True True False False 1 0 True True True False False 1 1 True True True False False 1 2 True True False False 1 3 True True True False False 1 4 True True False False 1 5 True True False False 1 6 True True False False 1 7 True True False False 1 8 True False <b>Visualisation commands</b> True False False 1 True False 0 none True False 12 True False True True False Default LaTeX engine 0 0 True True Default command to compile LaTeX file and make PDF, PS or DVI output (may be changed for each project). moteurs_principaux True 0 True 1 0 True False <b>External programs</b> True False True 2 True False 0 none True False 12 True False True True True False Students list charset 0 0 True False CSV charset 0 1 True False CSV surname headers 0 2 True False CSV name headers 0 3 True False LaTeX files charset 0 4 True True Default encoding for the students list file. encodages_principaux True 0 True 1 0 True False Default charset for AMC CSV output. encodages_principaux True 0 True 1 1 True True Comma separated list of CSV headers of columns that may contain the surnames of the students in the names list file. False False 1 2 True True Comma separated list of CSV headers of columns that may contain the names of the students in the names list file. False False 1 3 True True Charset used when producing LaTeX files from models. 0 1 4 True False Decimal delimiter 0 7 True True True 0 1 7 True False ASCII filenames 0 6 True True False Force all annotated completed student sheets to have only ASCII characters in their file names. When set, all non-ASCII characters will be replaced by underscores. True 1 6 True False Accept non-ASCII project names 0 5 True True False True 1 5 True False <b>Internationalization</b> True False True 3 True False 0 none True False 12 True False True True True False Printing method 0 0 True False Printing command 0 1 True False Extracting method 0 2 True False Useful printing options 0 3 True True 0 1 0 True True Command to print one paper (with stapling). String %f will be replaced by the PDF file to be printed. False False 1 1 True False 0 1 2 True True 1 3 True False <b>Printing</b> True False True 4 True False 0 none True False 12 True False True True True False Number of processes 0 0 True True Number of processes to be run in parallel. Default value is 0, which allows to start as many processes as processors. False False 1 0 True False <b>System</b> True False True 5 True False Main False True False vertical True False 0 none True False 12 True False vertical Solution False True True False 0 True False False 0 Individual solution True True False 0 True True True 1 Catalog False True True False 0 True False False 2 True False <b>Optional working documents to build</b> True False False 0 1 True False Documents 1 False True True never in True False True False vertical True False 0 none True False 12 True False True True True False Limit MSE 0 0 True False Limit sensitivity 0 1 True True True False False 1 0 True True True False False 1 1 True False <b>Colouring thresholds</b> True False True 0 True False start immediate 0 none True False 12 True False True True True False No answers color 0 0 True False Invalid answers color 0 1 True True True 1 0 True True True 1 1 True False <b>Scan view</b> True False False 1 True False 0 none True False 12 True False True True True False Maximum density for manual data capture question paper rendering (DPI) Manual capture density (DPI) 0 0 True False Image type 0 1 True False Remember window size 0 2 True False Number of columns for names 0 3 True False Number of columns for zoomes boxes 0 4 True True True False False 1 0 True True Temporary file type used for manual data capture. Fastest choice is (none), but this seems to be problematic in some environments. 0 1 1 False True True False Do you want to keep the same window size each time you start AMC? 0.5 True 1 2 True True Starting number of columns for names in the manual association window. False False adjustment10 True True 1 3 True True Number of columns for zoomed boxes in the zooms window (opened from the Diagnosis list in the Data capture tab). False False adjustment15 True True 1 4 True False <b>Miscellaneous</b> True False True 2 True False 0 none True False 12 True False vertical True False Notify the user at the end of the following actions: 0 False False 0 True False 3 Documents update False True True False 0.5 True False False 0 Data capture False True True False 0.5 True False False 1 Grading False True True False 0.5 True False False 2 Annotation False True True False 0.5 True False False 3 False False 1 True False Notify using: 0 False False 2 True False 2 Desktop notifications False True True False 0.5 True False False 0 True True 3 True False 2 True False Command: False False 0 True True Command that will be called as a user notification. %m will be replaced by AMC's message, and %a by AMC completed action. False False True True 1 True True 4 True False <b>Notifications</b> True False False 3 2 True False Display 2 False True True never in True False True False vertical True False 0 none True False 12 True False True True True False Vector formats density (DPI) 0 0 True False Black&white conversion threshold 0 1 True False Erease red from scans 0 2 True False Force conversion 0 3 True True Density used when converting vector format scans (PDF, EPS) into bitmap. False False adjustment9 1 0 True True Threshold used when converting scans to black and white. Value 0.0 means all white, value 1.0 means all black. False False adjustment14 2 1 1 False True True False When set, AMC will erease red color from the color scans before automatic data capture. This can be useful if the boxes are drawn in red. 0 True 1 2 False True True False With this option, all scan files will be converted with ImageMagick. This can slow down scans processing, but may allow some unusual file formats to be processed successfully. 0 True 1 3 True False <b>Scans conversion</b> True False False 0 True False 0 none True False 12 True False True True True False Marks size max increase 0 0 True False Marks size max decrease 0 1 True False Can be customized on a per-project basis in the Project tab. Default darkness threshold 0 2 True False Default upper darkness threshold 0 3 True False Proportion of the box (on the scan) that is measured to compute its blackness. Measured box proportion 0 4 True False Process scans with 3 corner marks 0 5 True True Maximum increase (proportion: 0.1 means 10%) allowed for corner marks after printing/scanning process. False False adjustment8 2 True 1 0 True True Maximum decrease (proportion: 0.1 means 10%) allowed for corner marks after printing/scanning process. False False adjustment7 2 True 1 1 True True If black proportion is greater than this value, the box will be considered as beeing ticked. This is a default value, it can be changed in each project. False False adjustment6 2 True 1 2 True True adjustment17 2 1 3 True True False False adjustment13 2 1 4 False True True False Do you want to process scans with 3 corner circles only? 0.5 True 1 5 True False <b>Detection parameters</b> True False True 1 3 False True False Scan 3 False True True never in True False True False start 0 none True False These options are used when creating a new project. See the project tab for more details. start True False True Minimal mark 0 0 True False Floor mark 0 1 True False Maximal mark 0 2 True False Grain 0 3 True False Rounding type 0 4 True True True 1 0 True True 1 1 True True 1 3 True False True True False True 0 ceil True True False True False True 1 1 2 True False 0 1 4 True False <b>Default marking options</b> True 4 True False Marking 4 False True True never in True False True False vertical True False 0 none True False 12 True False True True True False Max size 0 0 True False Image format 0 1 True False JPEG quality 0 2 True True False False 1 0 True False 0 1 1 True True False False adjustment16 True True 1 2 True False <b>Scans</b> True False False 0 True False 0 none True False 12 True False vertical True False vertical True False Can be customized on a per-project basis in the Project tab. 4 Default header text False True 0 True True in 75 True True Text to be written on annotated sheets header. Use %S for score, %M for max score, %s for grade, %m for max grade, and %(col) for content of the column col in the students list file. False False True 1 False True 0 True False vertical False True 1 True False True True True False Default writing direction 0 0 True False Default questions annotation 0 1 True False Default cancelled questions annotation True 0 2 right to left False True True False 0.5 True 1 0 True True False False 1 1 True True False False 1 2 False True 2 True False <b>Header</b> True False False 1 True False 0 none True False 12 True False True True True False Significant digits 0 0 True True Number of significant digits to display for marks when annotating papers. False False adjustment5 True True 1 0 True False <b>Marks</b> True False True 2 True False 0 none True False 12 True False vertical True False True True True False Line width 0 0 True False Font 0 1 True False Marks shift 0 2 True True False False adjustment4 1 True True 1 0 True True True Sans 12 1 1 True True When marks are written on annotated papers left to the boxes, shifts to the left marks by this value. You can use mm or in as a unit. False False 1 2 False True 0 True False True True False <b>To be ticked</b> True 0 0 True False <b>Ticked</b> True 1 0 True False <b>type</b> True 2 0 True False <b>colour</b> True 3 0 True False no 0 1 True False no 0 2 True False yes 0 3 True False yes 0 4 True False no 1 1 True False yes 1 2 True False no 1 3 True False yes 1 4 True True 0 2 1 True True 0 2 2 True True 0 2 3 True True 0 2 4 False True True True 3 1 False True True True 3 2 False True True True 3 3 False True True True 3 4 False True 2 Also annotate informative questions False True True False 0.5 True True True 4 True False <b>Symbols</b> True False True 3 5 True False Annotation 5 False True True never in True False True False vertical True False 0 none True False 12 True False vertical True False True True True False Sender email 0 0 True False Carbon copy address 0 1 True False Blind Carbon copy address 0 2 True True False False email 1 0 True True False False email 1 1 True True False False email 1 2 True False Delay between sendings 0 3 True True adjustment18 1 1 3 False True 0 True False 4 True False Mail delivery method: False True 0 True True 0 False True 1 False True 1 True False True True False sendmail path 0 0 True True False False 1 0 False True 2 True False True True False SMTP host 0 0 True False SMTP port 0 1 True True False False 1 0 True True True False False adjustment12 True 1 1 True False SMTP security 0 2 True False SMTP user 0 3 True True 1 3 True False 0 1 2 True False SMTP password 0 4 True True False 1 4 False True 3 True False <b>Sending emails</b> True False True 0 True False 0 none True False 12 True True False False True False <b>Default subject</b> True False False 1 True False 0 none True False 12 True True in True True 6 True False <b>Default content</b> True True True 2 6 True False Email 6 False True True never in True False True False vertical True False <i>Project preferences</i> True True middle False False 0 True False 0 none True False 12 True False True True True False Darkness threshold 0 0 True True If black proportion is greater than this value, the box will be considered as beeing ticked. If students have been told to darken the boxes entirely, one can choose value 0.5. If students have been told to tick the boxes, values around 0.15 seems appropriate. False False adjustment1 2 True 1 0 True False Upper darkness threshold 0 1 True True If black proportion is greater than this value, the box is considered as not ticked. Setting this threshold to a value less than one allows the students to cancel ticked boxes by filling them completely. False False adjustment19 2 True 1 1 True False <b>Automatic data capture</b> True False False 1 True False 0 none True False 12 True False True True True False Minimal mark 0 0 True False Floor mark 0 1 True False Maximal mark 0 2 True False Grain 0 3 True False Rounding type 0 4 True True Mark associated with null score False False 1 0 True True Floor mark: any exam with a global mark less than this value will be given this mark. Let empty for no floor mark. False False 1 1 True True True False False 1 3 True True True center 0 1 4 True False True True True Mark to be given to a perfect sheet with all good answers (scaling the marks). Value 0 meens that you don't want to scale the marks. False False False True 0 ceil False True True False When using SUF option in general grading scale, should marks be ceiled not to be larger than the maximum mark ? 0.5 True False True 1 1 2 True False <b>Global mark rules</b> True False False 2 True False 0 none True False 12 True False vertical True False vertical True False Header text False True 0 True True 75 1 in True True Text to be written on annotated sheets header. Use %S for score, %M for max score, %s for grade, %m for max grade, and %(col) for content of the column col in the students list file. False False True 1 False True 0 True False True True True False Writing direction 0 0 True False Questions marks position 0 1 True False Questions annotation text 0 2 True False Cancelled questions annotation text True 0 3 right to left False True True False 0.5 True 1 0 True True 0 1 1 True True Text to be written for each question. This will be evaluated by perl, so quote it to make a single string. Use %S for score, %M for max score, and %s and %m for these values truncated to the requested number of significant digits. False False 1 2 True True Same as above, but for cancelled questions (when using allowempty). False False 1 3 False True 1 True False <b>Papers annotation</b> True False False 3 True False 0 none True False 12 True False True True True False Examination name 0 0 True False Code (short name) for examination 0 1 True True False False 1 0 True True False False 1 1 True False <b>Examination description</b> True False True 4 True False 0 none True False 12 True False True True True False Students list charset 0 0 True False CSV files charset 0 1 True False Charset used for the students list file encodages_principaux True 0 True 1 0 True False Charset for the CSV marks file produced by AMC. encodages_principaux True 0 True 1 1 True False <b>Internationnalization</b> True False False 5 True False 0 none True False 12 True False True True True False LaTeX engine 0 0 True False Command to compile LaTeX file and make PDF, PS or DVI output. moteurs_principaux True 0 True 1 0 True False <b>External commands</b> True False False 6 7 True False True Project 7 False True True 0 True False AMC Preferences False True False start gtk-undo False True True True True False False 0 True False start gtk-ok False True True True True False False 0 end 1 button_undo button_ok auto-multiple-choice-1.4.0/AMC-gui-filter_details.glade000066400000000000000000000145221341176102400227200ustar00rootroot00000000000000 False 5 Formats details dialog False vertical False end gtk-cancel False True True True False True False True 0 gtk-apply False True True True False True False True 1 False True end 0 vertical True False True False AMC supports different formats for the source file. Here are some details about each of them. True False True 0 True False start 0 False False 1 True False 0 in True True False word 4 4 False True False <b>Description:</b> True False True 2 False False 1 button2 button1 auto-multiple-choice-1.4.0/AMC-gui-liste_dialog.glade000066400000000000000000000201421341176102400223600ustar00rootroot00000000000000 False 5 True True normal True False vertical 2 True False end False True True True True False True False gtk-cancel True True 0 True False No names list True True 1 False False 0 False True True True True False True False gtk-undo False False 0 True False Cancel True True 1 False False 1 False True True True True False True False gtk-apply False False 0 True False Apply True True 1 False False 2 False True end 0 True False Choose your students names list file False False 2 button29 button28 button9 auto-multiple-choice-1.4.0/AMC-gui-mailing.glade000066400000000000000000000567311341176102400213560ustar00rootroot00000000000000 True False amc-send False 5 Mailing dialog False vertical False end gtk-undo False True True True True False True 0 Send False True True True image1 False True 1 False True end 0 True False vertical True False 3 True False Current project name %n: False False 0 True False False False False True True 1 gtk-edit False True True True True False False 2 False False 0 True False 0 none True False 12 True False vertical True False True False True False Emails column: False True 0 True False 0 False True 1 False True 0 Select failed True True True False True end 1 False False 0 True True never in True True True True 1 True False <b>Addressees</b> True True True 1 True False 0 none True False 12 True True False False True False <b>Subject</b> True False False 2 True False 0 none True False 12 True False vertical Enable HTML Tags True True False 0 True False True 0 True True never in True True word False True True 1 True False <b>Body</b> True True True 3 True True True False True vertical True False start end gtk-add False True True True True False False 0 gtk-remove False True True True True False False 1 False False 0 True True True True True True 1 True False <b>Attachments</b> True True True 4 True True 1 button2 button1 auto-multiple-choice-1.4.0/AMC-gui-main_window.glade000066400000000000000000005506331341176102400222510ustar00rootroot00000000000000 1 5 1 1 1 100000 1 10 True False gtk-refresh True False gtk-info True False gtk-page-setup True False gtk-page-setup True False document-new-symbolic True False gtk-page-setup True False amc-send True False document-properties-symbolic True False gtk-print True False open-menu-symbolic True False gnome-mime-application-pdf True False document-save-symbolic True False gtk-edit True False gtk-find True False gtk-clear True False gtk-find True False gtk-info True False gtk-clear True False gtk-zoom-in True False gtk-dialog-warning True False Columns True False Updated True True True False MSE True True True False Sensitivity True True True False Scan file True True True False amc-main-window amc-main-window True False vertical True False True True False 4 vertical 4 True False vertical True False True True True True False gtk-info False False 0 True False 0 False False 1 Edit source file True True True image3 False False 2 True True 0 True False False False 2 False False 0 True False vertical 3 True False 3 True False Number of papers: False True 0 True True True Number of papers to produce. Zero means taking into account the number written in the LaTeX source file. Number of papers to produce. Zero means taking into account the number written in the LaTeX source file. 4 False False adjustment2 True True True False True 1 False True 0 True False vertical True False _Update documents True True True image1 True True False False 0 True True 0 True False 2 True end Question True True True image23 True False False end 0 Documents True True True True True 1 True True 1 True True 1 True False other False 6 end False False 0 False 16 True False True True True 0 False False 0 False True 2 False False 1 True False vertical 3 True False start Layout detection True True True image12 True False False 0 False False 0 True False other False 2 expand True True Warnings start image8 True False False 0 True True True Check layouts start image13 True False False 1 False False end 0 False True 16 True False True True True True 0 False False 0 False True 1 True False False True 3 False False 3 True False False False 3 True False start Print papers True True True image21 True False True 0 False False 5 False True False Preparation False True False False 4 vertical True False 0 out True False 12 True False spread True True True From papers' scans True False True False amc-auto-capture True True 0 True False Automatic True True 1 False False 0 True True True On screen with mouse True False True False amc-manual-capture True True 0 True False Manual True True 1 False False 1 True False <b>Data capture after examination</b> True False True 0 True False 2 vertical True False False True expand True True False True Missing pages start image39 True False False 0 False False 0 False 16 True False True False True 0 False False 0 False True 0 True False False True expand True True True Look at scans image38 True False True 0 False False 0 False 16 True False True False True 0 False False 0 False True 1 True False False True expand True True True Forget image35 True False True 0 True True True Look at pages image31 True False True 1 False False 0 False 16 True False True False True 0 False False 0 False True 2 False True 1 True False 0 out True False 12 True False vertical True False Pages: False True 0 True False 4 True True never True True False False both False False 0 True False vertical 5 True True True menu_columns True False True False Columns False True 0 True False down False True 1 False False 0 True False vertical 5 True center Zooms True True False True Show images of the boxes from the scan, and check their categorization. image7 top True False False 0 Layout True True False True Show where corner marks have been detected on the scan, and where boxes are supposed to be. image19 top True False False 1 Remove True True True Remove data capture for selected pages. image6 top True False True 2 True True 1 False True 1 True True 1 True False <b>Diagnosis</b> True True True 2 1 True False Data capture 1 False True False False vertical 4 True False 0 out True False 12 True False vertical 2 True False Update marking scale True True False Also update marking scale extraction from LaTeX source file True 0 0 True True True Mark papers True False True False amc-mark True True 0 True False Mark True True 1 1 0 True True 0 True False <b>Marking</b> True False True 0 True False False True expand True True True Look at marks image10 False False 0 False False 0 False 16 True False True False True 0 False False 0 False True 1 True False 0 out True False 12 True False vertical True False 4 True False Students list: False True 0 True False True True True True 1 True True True True False 2 True False gtk-open True True 0 True False Set file True True 1 False False 2 True False True True True False 2 True False gtk-edit True True 0 True False Edit list True True 1 False False 4 True True True False True False gtk-refresh True True 0 True False Re-read True True 1 True True 5 False True 0 True False True False 0 1 1 True False 0 1 0 True False Code name for automatic association: 0 1 True False Primary key from this list: 0 0 True True 1 True False 4 True False Papers/students association: True True 0 True False True True True True False True False amc-auto-assoc True True 0 True False Automatic True True 1 False False 0 True True True True False True False amc-manual-assoc True True 0 True False Manual True True 1 False False 1 True True 1 True True 2 True False <b>Students identification</b> True False True 2 True False 2 False 6 end False False 0 False 16 True False True False True 0 False False 0 False True 3 2 True False Marking 2 False True False vertical True False 0 out True False 12 True False vertical True False 4 True False 0 False False 0 True True True True False True False gtk-convert True True 0 True False Export True True 1 False False 1 True False and False False 2 True False 0 False False 3 False False 0 True False True False vertical True False 4 True False Sorting: 0 0 True False 0 1 0 include absentees True True False True Should exported data include absentees? Should exported data include absentees? True 0 1 2 True True 0 True False vertical False False 1 False True 0 False True 1 True False end True True True True False True False gtk-directory True True 0 True False Exports dir True True 1 False False 0 True True 2 True False <b>Marks export</b> True False True 0 True False 0 out True False 12 True False vertical True False 4 True False 0 False False 0 True True 0 False False 1 False True 0 True False True False File name model: True True 0 True True True File name model used to make file names for PDF annotated papers, one by student. Keep empty in order to use student name. File name model used to make file names for PDF annotated papers, one by student. Keep empty in order to use student name. False False True True 1 False False 1 True False True False 0 False True 0 True True True True Annotate papers&apos; scans with marking details. Annotate papers' scans with marking details. True False True False amc-annotate True True 0 True False Annotate papers True True 1 False False 1 True True True True Look at grouped files Look at grouped files True False 2 True False gtk-directory True True 0 True False Look True True 1 False False 2 False False 2 True False end Send... True True True image2 True False True 0 False False 3 True False <b>Annotated papers</b> True False False 1 3 True False Reports 3 False True True 1 True True True True True True True False True False Command output details True True 2 True False True False True True True 0 gtk-cancel True True True True False True 1 False True 3 True False 2 False True 4 True False Auto Multiple Choice True True False True expand gtk-open True True True Open project True True True 0 True True True New project image16 True True 1 True False True expand True True True Save project image24 True True 0 True True True Preferences image20 True True 2 True True True Menu image22 True True 2 end 1 False toggle_documents bottom False True False 4 4 4 4 True False end Catalog 0 0 True False end Solution 0 1 True False end Individual solution 0 2 True False False True False Update the document True gtk-refresh False True True False Open the document True gtk-open False True 1 0 True False False True False Update the document True gtk-refresh False True True False Open the document True gtk-open False True 1 1 True False False True False Update the document True gtk-refresh False True True False Open the document True gtk-open False True 1 2 False menu_button True False vertical True True True Project main True True False True 0 True True True Cleanup False True 1 True True True Export as template False True 2 True True True User templates False True 3 True False False True 4 True True True Manage False True 5 project 1 True False vertical True True True Help main True True False True 0 True True True About False True 1 True True True Cancel learning… False True 2 Debugging True True False True False True 3 True True True Bug report False True 4 True True True Documentation doc False True 5 help 2 True False vertical True True True Documentation help True True False True 0 True True True French False True 1 True True True English False True 2 True True True Japanese False True 3 doc 3 True False vertical True True True Plugins main True True False True 0 True True True Browse False True 1 True True True Install plugin False True 2 plugins 4 True False vertical True True True Project project False True 0 True True True Plugins plugins False True 1 True True True Help help False True 2 main 5 auto-multiple-choice-1.4.0/AMC-gui-make_template.glade000066400000000000000000000357121341176102400225420ustar00rootroot00000000000000 False 5 Save as a template dialog True False vertical 2 True False end gtk-cancel False True True True True False False 0 gtk-ok False True False True True True False False 1 False True end 0 True False To make a new template from your project, describe it below: True False False 1 True False vertical True False True False File name: False False 0 True True True True 1 False False 0 False <b>Note:</b> please use only alphanumeric characters and characters from "-_+" for the template file name. True True True True 1 False False 2 True False 4 True False Short name: False False 0 True True True True 1 False False 3 True False 0 none True False 12 True True etched-in 50 True True word True False Description: True True True 4 True False 0 none True False 12 True False vertical True False end gtk-add False True True True True False False 0 gtk-delete False True True True True False False 1 False False 0 True True etched-in 50 True True False True True 1 True False Included files: True True True 5 mt_cancel mt_ok auto-multiple-choice-1.4.0/AMC-gui-overwritten.glade000066400000000000000000000077171341176102400223260ustar00rootroot00000000000000 False True dialog False vertical 2 False end gtk-close True True True True True True True 0 False False 0 True False vertical True False List of pages with overwritten data: False True 0 True True never in 150 True True horizontal True True 1 True True 1 close_button auto-multiple-choice-1.4.0/AMC-gui-saisie_auto.glade000066400000000000000000000231651341176102400222360ustar00rootroot00000000000000 True True Please select all papers' scans 5 Automatic data capture amc-saisie-auto True center-on-parent dialog amc-saisie-auto True True False vertical 2 True False Proceed to data capture from scans with button OK end gtk-cancel False True True True True False False 0 gtk-ok False True True True True False False 1 False True end 1 True False 0 in True False vertical Copy to project directory (recommended) False True True False True Copy all scans to scans sub-directory in project directory Copy all scans to scans sub-directory in project directory 0 True False True 0 True False True False 0 False False 0 False True True True True False gtk-info False False 1 False False 1 allocate_ids False True True False Use this setting to be sure that the exam copy IDs allocated to the pages of the scans you selected will be consecutive numbers, <b>in the same order</b> as the pages. 0 True True True 2 True False <b>Options</b> True False False 2 button6 button_capture_go auto-multiple-choice-1.4.0/AMC-gui-source_latex_choix.glade000066400000000000000000000057171341176102400236230ustar00rootroot00000000000000 False 5 Choose LaTeX source file center-on-parent dialog True False vertical 2 True False end gtk-cancel False True True True True False False 0 gtk-apply False True True True True False False 1 False True end 0 button19 button20 auto-multiple-choice-1.4.0/AMC-gui-source_latex_choix_zip.glade000066400000000000000000000057141341176102400245020ustar00rootroot00000000000000 False 5 ZIP file choice center-on-parent dialog True False vertical 2 True False end gtk-cancel False True True True True False False 0 gtk-apply False True True True True False False 1 False True end 0 button26 button27 auto-multiple-choice-1.4.0/AMC-gui-source_latex_dialog.glade000066400000000000000000000404531341176102400237440ustar00rootroot00000000000000 False Choose LaTeX source False True dialog False vertical 2 False end gtk-cancel True True True True False True 0 gtk-go-forward True True True True False True 1 False True end 0 True False 10 10 A multiple choice project is mainly made of a source file, which describes the questionnaire. <b>Please choose your situation:</b> True center True 35 False True 0 True False False True 2 True True False True True True False 10 5 vertical True False start <b>Template</b> True False True 0 True False start You did not write any description of the questionnaire, and want to start from a template. True fill True 35 False True 1 False True 3 True False False True 4 True True False True True sl_type_new True False 10 5 vertical True False start <b>File</b> True False True 0 True False start You already wrote a questionnaire description, and want to use it for this project. True fill True 35 False True 1 False True 5 True False False True 6 True True False True True sl_type_new True False 10 5 vertical True False start <b>Empty</b> True False True 0 True False start You want to write the description from zero. True fill True 35 False True 1 False True 7 True False False True 8 True True False True True sl_type_new True False 10 5 vertical True False start <b>Archive</b> True False True 0 True False start You have a <i>.tgz</i> or <i>.zip</i> file containing the questionnaire and other related stuff, coming from a third party software or a backup. True fill True 35 False True 1 False True 9 True False False True 10 button1 button2 auto-multiple-choice-1.4.0/AMC-gui-source_latex_modele.glade000066400000000000000000000122551341176102400237510ustar00rootroot00000000000000 False 5 Template selection center-on-parent dialog True False vertical 2 True False end gtk-cancel False True True True True False False 0 gtk-apply False True False True True True False False 1 False True end 0 True True True True True True vertical True False True 300 300 True True False word False True True True True 4 1 button21 model_choice_button auto-multiple-choice-1.4.0/AMC-gui-unrecognized.glade000066400000000000000000000322031341176102400224160ustar00rootroot00000000000000 True False Preprocess system-run-symbolic True False Delete edit-delete-symbolic True False go-up-symbolic True False go-down-symbolic False Unrecognized scans dialog True True vertical True False vertical True True 10 100 True True never True True both True False Scans list True True 1 True False 2 False start expand True True True start image1 True True 0 True True True start image2 True True 1 True True True start image3 True True 4 True True True start image4 True True 4 False True 0 False 16 True False start False True 0 False False 0 False True 4 False False True True True False 0 in 100 100 True False False True True True False <b>Original scan</b> True False True True False 0 in True False False True True True False <b>Preprocessed</b> True True True True True auto-multiple-choice-1.4.0/AMC-gui.pl.in000066400000000000000000006454031341176102400177040ustar00rootroot00000000000000#! /usr/bin/perl -w # # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use Getopt::Long; use Gtk3 -init; use Glib::Object::Introspection; use XML::Simple; use IO::File; use IO::Select; use POSIX qw/strftime/; use Time::Local; use Cwd; use File::Spec::Functions qw/splitpath catpath splitdir catdir catfile rel2abs tmpdir/; use File::Temp qw/ tempfile tempdir /; use File::Copy; use File::Path qw/remove_tree/; use File::Find; use Archive::Tar; use Archive::Tar::File; use Encode; use Unicode::Normalize; use I18N::Langinfo qw(langinfo CODESET); use Locale::Language; use Text::ParseWords; use Module::Load; use Module::Load::Conditional qw/check_install/; use AMC::Path; use AMC::Basic; use AMC::State; use AMC::Config; use AMC::Data; use AMC::DataModule::capture ':zone'; use AMC::DataModule::report ':const'; use AMC::Scoring; use AMC::Gui::Prefs; use AMC::Gui::Manuel; use AMC::Gui::Association; use AMC::Gui::Commande; use AMC::Gui::Notes; use AMC::Gui::Zooms; use AMC::FileMonitor; use AMC::Gui::WindowSize; use utf8; use Data::Dumper; use constant { DOC_TITRE => 0, DOC_MAJ => 1, MEP_PAGE => 0, MEP_ID => 1, MEP_MAJ => 2, DIAG_ID => 0, DIAG_ID_BACK => 1, DIAG_MAJ => 2, DIAG_MAJ_NUM => 3, DIAG_EQM => 4, DIAG_EQM_BACK => 5, DIAG_DELTA => 6, DIAG_DELTA_BACK => 7, DIAG_ID_STUDENT => 8, DIAG_ID_PAGE => 9, DIAG_ID_COPY => 10, DIAG_SCAN_FILE => 11, INCONNU_FILE => 0, INCONNU_SCAN => 1, INCONNU_TIME => 2, INCONNU_TIME_N => 3, INCONNU_PREPROC => 4, PROJ_NOM => 0, PROJ_NOM_PLAIN => 1, PROJ_ICO => 2, MODEL_NOM => 0, MODEL_PATH => 1, MODEL_DESC => 2, COPIE_N => 0, TEMPLATE_FILES_PATH => 0, TEMPLATE_FILES_FILE => 1, EMAILS_SC => 0, EMAILS_NAME => 1, EMAILS_EMAIL => 2, EMAILS_ID => 3, EMAILS_STATUS => 4, ATTACHMENTS_FILE => 0, ATTACHMENTS_NAME => 1, ATTACHMENTS_FOREGROUND => 2, }; my $libnotify_error=''; Gtk3::IconTheme::get_default->prepend_search_path(amc_specdir('icons')); Gtk3::Window::set_default_icon_list([map { Gtk3::IconTheme::get_default->load_icon("auto-multiple-choice",$_,"force-svg") } (8,16,32,48,64,128)]); use_gettext; use_amc_plugins(); POSIX::setlocale(&POSIX::LC_NUMERIC,"C"); my $debug=0; my $debug_file=''; my $do_nothing=0; my $profile=''; my $project_dir=''; GetOptions("debug!"=>\$debug, "debug-file=s"=>\$debug_file, "profile=s"=>\$profile, "p=s"=>\$project_dir, "do-nothing!"=>\$do_nothing, ); sub set_debug_mode { my ($debug)=@_; set_debug($debug); if($debug) { my $date=strftime("%c",localtime()); debug ('#' x 40); debug "# DEBUG - $date"; debug ('#' x 40); debug "GUI module is located at ".__FILE__; } } if($debug || $debug_file) { set_debug_mode($debug_file || 'new'); print "DEBUG ==> ".debug_file()."\n"; } debug_pm_version("Gtk3"); my %w=(); my $glade_base=__FILE__; $glade_base =~ s/\.p[ml]$/-/i; my $home_dir=Glib::get_home_dir(); my $encodage_systeme=langinfo(CODESET()); my $shortcuts=AMC::Path::new(home_dir=>$home_dir); my $config=AMC::Config::new(shortcuts=>$shortcuts,home_dir=>$home_dir,profile=>$profile); my $prefs=AMC::Gui::Prefs::new(shortcuts=>$shortcuts,alternate_w=>\%w,config=>$config); my $monitor=AMC::FileMonitor->new(); sub hex_color { my $s=shift; return(Gtk3::Gdk::Color::parse($s)->to_string()); } my @export_modules=@{$config->{export_modules}}; # Reads filter plugins list my @filter_modules=perl_module_search('AMC::Filter::register'); for my $m (@filter_modules) { load("AMC::Filter::register::$m"); } @filter_modules=sort { "AMC::Filter::register::$a"->weight <=> "AMC::Filter::register::$b"->weight } @filter_modules; sub best_filter_for_file { my ($file)=@_; my $mmax=''; my $max=-10; for my $m (@filter_modules) { my $c="AMC::Filter::register::$m"->claim($file); if($c>$max) { $max=$c; $mmax=$m; } } return($mmax); } # ----------------- ## Notifications sub notify_end_of_work { my ($action,$message)=@_; if($config->get('notify_'.$action)) { if($config->get('notify_desktop')) { if($libnotify_error) { debug "Notification ignored: $libnotify_error"; } else { eval { my $notification=Notify::Notification->new('Auto Multiple Choice',$message, '@/ICONSDIR/@/auto-multiple-choice.svg'); $notification->show; }; $libnotify_error=$@; } } if($config->get('notify_command')) { my @cmd=map { s/[%]m/$message/g;s/[%]a/$action/g;$_; } quotewords('\s+',0,$config->get('notify_command')); if(commande_accessible($cmd[0])) { commande_parallele(@cmd); } else { debug "ERROR: command '$cmd[0]' not found when trying to notify"; } } } } # Test whether the magick perl package is installed sub test_magick { if(!magick_perl_module(1)) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( __"None of the perl modules Graphics::Magick and Image::Magick are installed: AMC won't work properly!" ); $dialog->run; $dialog->destroy; } } # tests if debian package auto-multiple-choice-common is installed but # not auto-multiple-choice... sub deb_is_installed { my ($package_name)=@_; my $v=''; open(QUERY,"-|","dpkg-query","-W",'--showformat=${Version}\n',$package_name); while() { $v=$1 if(/^\s*([^\s]+)\s*$/); } close(QUERY); return($v); } sub test_debian_amc { if(commande_accessible("dpkg-query")) { if(deb_is_installed("auto-multiple-choice-common") && !deb_is_installed("auto-multiple-choice")) { debug "ERROR: auto-multiple-choice package not installed!"; my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( __"The package auto-multiple-choice-common is installed, but not auto-multiple-choice.\nAMC won't work properly until you install auto-multiple-choice package!" ); $dialog->run; $dialog->destroy; } } } sub check_for_tmp_disk_space { my ($needs_mo)=@_; my $tmp_path=tmpdir(); my $space=free_disk_mo($tmp_path); if(defined($space) && $space < $needs_mo) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( sprintf((__"There is too little space left in the temporary disk directory (%s). Please clean this directory and try again."), $tmp_path) ); $dialog->run; $dialog->destroy; return 0; } return 1; } # annulation apprentissage sub annule_apprentissage { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'question','yes-no',''); $dialog->set_markup( # Explains that some dialogs are shown only to learn AMC, only once by default (first part). __("Several dialogs try to help you be at ease handling AMC.")." ". # Explains that some dialogs are shown only to learn AMC, only once by default (second part). %s will be replaced with the text "Show this message again next time" that is written along the checkbox allowing the user to keep these learning message next time. sprintf(__"Unless you tick the \"%s\" box, they are shown only once.", # Explains that some dialogs are shown only to learn AMC, only once by default. This is the message shown along the checkbox allowing the user to keep these learning message next time. __"Show this message again next time")." ". # Explains that some dialogs are shown only to learn AMC, only once by default (third part). If you answer YES here, all these dialogs will be shown again. __"Do you want to forgot which dialogs you have already seen and ask to show all of them next time they should appear ?" ); my $reponse=$dialog->run; $dialog->destroy; if($reponse eq 'yes') { debug "Clearing learning states..."; $config->set("state:apprentissage",{}); $config->save(); } } # Reset projects directory to standard one $config->set('global:rep_projets', $config->get_absolute('projects_home')); # Warn if Notify is not available sub test_libnotify { my $initted=eval { Notify::is_initted() }; if(!$initted) { eval { Glib::Object::Introspection->setup(basename => 'Notify', version => '0.7', package => 'Notify') if(!defined($initted)); # Set application name for notifications Notify::init('Auto Multiple Choice'); }; $libnotify_error=$@; if($libnotify_error && $config->get('notify_desktop')) { debug "libnotify loading error: $libnotify_error"; my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'warning','ok',''); $dialog->set_markup( __"Please install libnotify to make desktop notifications available." ); $dialog->run; $dialog->destroy; $config->set('notify_desktop',''); } } } # goes to a specific directory if the project directory is given as a # command-line option utf8::downgrade($project_dir); if(-f $project_dir) { $project_dir =~ s/\/?options\.xml$//; } $project_dir =~ s/\/+$//; if(-d $project_dir) { debug "Opening project from directory $project_dir ..."; $project_dir=Cwd::realpath($project_dir); my ($v,$d,$f)=splitpath($project_dir); my $r=catpath($v,$d,''); $r =~ s/\/+$//; $config->set('rep_projets',$r); @ARGV=$f; } # creates projets and models directories if needed (if not present, # Edit/Parameters can be disrupted) for my $k (qw/rep_projets rep_modeles/) { my $path=$config->get($k); if(-e $path) { debug "WARNING: $path ($k) is not a directory!" if(!-d $path); } else { mkdir($path); } } sub set_projects_home { my ($p)=@_; $config->set('rep_projets',$p); $shortcuts->set(projects_path=>$p); } set_projects_home($config->get('rep_projets')); ############################################################################# my %projet=(); sub bon_encodage { my ($type)=@_; return($config->get("encodage_$type") || $config->get("defaut_encodage_$type") || "UTF-8"); } sub csv_build_0 { my ($k,@default)=@_; push @default,grep { $_ } map { s/^\s+//;s/\s+$//;$_; } split(/,+/,$config->get('csv_'.$k.'_headers')); return("(".join("|",@default).")"); } sub csv_build_name { return(csv_build_0('surname','nom','surname').' ' .csv_build_0('name','prenom','name')); } sub id2file { my ($id,$prefix,$extension)=(@_); $id =~ s/\+//g; $id =~ s/\//-/g; return($config->get_absolute('cr')."/$prefix-$id.$extension"); } sub is_local { my ($f,$proj)=@_; my $prefix=$config->get('rep_projets')."/"; $prefix .= $projet{'nom'}."/" if($proj); utf8::downgrade($prefix); if(defined($f)) { return($f !~ /^[\/%]/ || $f =~ /^$prefix/ || $f =~ /[\%]PROJET\//); } else { return(''); } } sub fich_options { my ($nom,$rp)=@_; $rp=$config->get('rep_projets') if(!$rp); $rp.="/$nom/options.xml"; utf8::downgrade($rp); return($rp); } sub moteur_latex { return($config->get('moteur_latex_b') || $config->get('defaut_moteur_latex_b') ); } sub read_glade { my ($main_widget,@widgets)=@_; my $g=Gtk3::Builder->new(); my $glade_file=$glade_base.$main_widget.".glade"; debug "Reading glade file ".$glade_file; $g->set_translation_domain('auto-multiple-choice'); $g->add_from_file($glade_file); for my $i ($main_widget,@widgets) { $w{$i}=$g->get_object($i); if (ref($w{$i}) =~ /::(FileChooser|About)?Dialog$/ && !$w{$i}->is_visible()) { debug "Found modal dialog: $i"; $w{$i}->set_transient_for($w{'main_window'}); $w{$i}->set_modal(1); } if ($w{$i}) { $w{$i}->set_name($i) if($i !~ /^(apropos)$/); } else { debug_and_stderr "WARNING: Object $i not found in $main_widget glade file."; } } $g->connect_signals(undef); return($g); } # As a workaround for Bug #93 these widgets are disabled when Preferences window is opened. # Since Bug #93 only affects Ubuntu 12.04 LTS, this workaround can be safely removed when # Ubuntu 12.04 LTS reaches its end of life date i.e. April 2017 my @widgets_disabled_when_preferences_opened=(qw/menu_popover/); my @widgets_only_when_opened=(qw/cleanup_menu menu_projet_enreg menu_projet_modele/); my $gui=read_glade('main_window', qw/onglets_projet onglet_preparation documents_popover toggle_documents but_question but_solution but_indiv_solution but_catalog doc_line1 prepare_docs prepare_layout prepare_src menu_popover header_bar state_layout state_layout_label state_docs state_docs_label state_unrecognized state_unrecognized_label state_marking state_marking_label state_assoc state_assoc_label state_overwritten state_overwritten_label button_edit_src button_unrecognized button_show_missing edition_latex onglet_notation onglet_saisie onglet_reports log_general commande avancement annulation button_mep_warnings liste_filename liste_edit liste_setfile liste_refresh menu_debug menu_columns toggle_column_updated toggle_column_mse toggle_column_sensitivity toggle_column_file diag_tree state_capture state_capture_label maj_bareme regroupement_corriges groupe_model pref_assoc_c_assoc_code pref_assoc_c_liste_key export_c_format_export export_c_export_sort export_cb_export_include_abs config_export_modules standard_export_options notation_c_regroupement_type notation_c_regroupement_compose pref_prep_s_nombre_copies pref_prep_c_filter /,@widgets_only_when_opened,@widgets_disabled_when_preferences_opened); # Grid lines are not well-positioned in RTL environments, I don't know # why... so I remove them. if($w{'main_window'}->get_direction() eq 'rtl') { debug "RTL mode: removing vertical grids"; for(qw/documents diag inconnu/) { my $w=$gui->get_object($_.'_tree'); $w->set_grid_lines('horizontal') if($w); } } $w{'commande'}->hide(); sub debug_set { $debug=$w{'menu_debug'}->get_active; debug "DEBUG MODE : OFF" if(!$debug); set_debug_mode($debug); if($debug && !$do_nothing) { debug "DEBUG MODE : ON"; my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'info','ok', # TRANSLATORS: Message when switching to debugging mode. __("Debugging mode.")." " # TRANSLATORS: Message when switching to debugging mode. %s will be replaced with the path of the log file. .sprintf(__"Debugging informations will be written in file %s.",AMC::Basic::debug_file())); $dialog->run; $dialog->destroy; } Glib::Timeout->add (500,sub { $w{menu_popover}->hide(); return(0); }); } $w{'menu_debug'}->set_active($debug); sub open_menu { $w{menu_popover}->show_all(); } # add doc list menu my $docs_menu=Gtk3::Menu->new(); my @doc_langs=(); my $hdocdir=amc_specdir('doc/auto-multiple-choice')."/html/"; if(opendir(DOD,$hdocdir)) { push @doc_langs,map { s/auto-multiple-choice\.//;$_; } grep { /auto-multiple-choice\...(_..)?/ } readdir(DOD); closedir(DOD); } else { debug("DOCUMENTATION : Can't open directory $hdocdir: $!"); } # TRANSLATORS: One of the documentation languages. my %ltext_loc=('French'=>__"French", # TRANSLATORS: One of the documentation languages. 'English'=>__"English", # TRANSLATORS: One of the documentation languages. 'Japanese'=>__"Japanese", ); ### sub dialogue_apprentissage { my ($key,$type,$buttons,$force,@oo)=@_; my $resp=''; $type='info' if(!$type); $buttons='ok' if(!$buttons); if($force || !$config->get("apprentissage/$key")) { my $garde; my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', $type,$buttons,''); $dialog->set_markup(@oo); if(!$force) { $garde=Gtk3::CheckButton->new(__"Show this message again next time"); $garde->set_active(0); $garde->set_can_focus(0); $dialog->get_content_area()->add($garde); } $dialog->show_all(); $resp=$dialog->run; if(!($force || $garde->get_active())) { debug "Learning : $key"; $config->set("apprentissage/$key",1); } $dialog->destroy; } return($resp); } ### COPIES my $copies_store = Gtk3::ListStore->new ('Glib::String'); ### FILES FOR TEMPLATE my $template_files_store = Gtk3::TreeStore->new ('Glib::String', 'Glib::String'); ### Unrecognized scans my $inconnu_store = Gtk3::ListStore->new ('Glib::String','Glib::String', 'Glib::String','Glib::String', 'Glib::String'); $inconnu_store->set_sort_column_id(INCONNU_TIME_N,GTK_SORT_ASCENDING); ### modele EMAILS my $emails_store=Gtk3::ListStore->new ('Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', ); ### modele EMAILS my $attachments_store=Gtk3::ListStore->new ('Glib::String', 'Glib::String', 'Glib::String', ); ### modele DIAGNOSTIQUE SAISIE my $diag_store; sub new_diagstore { $diag_store = Gtk3::ListStore->new ('Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String'); $diag_store->set_sort_func(DIAG_EQM,\&sort_num,DIAG_EQM); $diag_store->set_sort_func(DIAG_DELTA,\&sort_num,DIAG_DELTA); $diag_store->set_sort_func(DIAG_SCAN_FILE,\&sort_string,DIAG_SCAN_FILE); $diag_store->set_sort_func(DIAG_ID,\&sort_from_columns, [{'type'=>'n','col'=>DIAG_ID_STUDENT}, {'type'=>'n','col'=>DIAG_ID_COPY}, {'type'=>'n','col'=>DIAG_ID_PAGE}, ]); } sub sort_diagstore { $diag_store->set_sort_column_id(DIAG_ID,GTK_SORT_ASCENDING); } sub show_diagstore { $w{'diag_tree'}->set_model($diag_store); } new_diagstore(); sort_diagstore(); show_diagstore(); my %capture_column=(); $renderer=Gtk3::CellRendererText->new; # TRANSLATORS: This is the title of the column containing student/copy identifier in the table showing the results of data captures. $column = Gtk3::TreeViewColumn->new_with_attributes (__"identifier", $renderer, text=> DIAG_ID, 'background'=> DIAG_ID_BACK); $column->set_sort_column_id(DIAG_ID); $w{'diag_tree'}->append_column ($column); $renderer=Gtk3::CellRendererText->new; # TRANSLATORS: This is the title of the column containing data capture date/time in the table showing the results of data captures. $capture_column{updated} = Gtk3::TreeViewColumn->new_with_attributes (__"updated", $renderer, text=> DIAG_MAJ); $capture_column{updated}->set_sort_column_id(DIAG_MAJ_NUM); $w{'diag_tree'}->append_column ($capture_column{updated}); $renderer=Gtk3::CellRendererText->new; # TRANSLATORS: This is the title of the column containing Mean Square Error Distance (some kind of mean distance between the location of the four corner marks on the scan and the location where they should be if the scan was not distorted at all) in the table showing the results of data captures. $capture_column{mse} = Gtk3::TreeViewColumn->new_with_attributes (__"MSE", $renderer, 'text'=> DIAG_EQM, 'background'=> DIAG_EQM_BACK); $capture_column{mse}->set_sort_column_id(DIAG_EQM); $w{'diag_tree'}->append_column ($capture_column{mse}); $renderer=Gtk3::CellRendererText->new; # TRANSLATORS: This is the title of the column containing so-called "sensitivity" (an indicator telling the user if the darkness ratio of some boxes on the page are very near the threshold. A great value tells that some darkness ratios are very near the threshold, so that the capture is very sensitive to the threshold. A small value is a good thing) in the table showing the results of data captures. $capture_column{sensitivity} = Gtk3::TreeViewColumn->new_with_attributes (__"sensitivity", $renderer, 'text'=> DIAG_DELTA, 'background'=> DIAG_DELTA_BACK); $capture_column{sensitivity}->set_sort_column_id(DIAG_DELTA); $w{'diag_tree'}->append_column ($capture_column{sensitivity}); $renderer=Gtk3::CellRendererText->new; $capture_column{file} = Gtk3::TreeViewColumn->new_with_attributes (__"scan file", $renderer, 'text'=> DIAG_SCAN_FILE); $capture_column{file}->set_sort_column_id(DIAG_SCAN_FILE); $w{'diag_tree'}->append_column ($capture_column{file}); $w{'diag_tree'}->get_selection->set_mode(GTK_SELECTION_MULTIPLE); # columns to be shown... sub toggle_column { my ($item)=@_; if($item->get_name() =~ /toggle_column_(.*)/) { my $type=$1; my $checked=$item->get_active(); $capture_column{$type}->set_visible($checked); } else { debug "ERROR: unknown toggle_column name: ".$item->get_name(); } } # Columns that should be hidden at startup: for my $c (qw/updated file/) { $w{"toggle_column_".$c}->set_active(0); } # rajouter a partir de Encode::Supported # TRANSLATORS: for encodings my $encodages=[{qw/inputenc latin1 iso ISO-8859-1/,'txt'=>'ISO-8859-1 ('.__("Western Europe").')'}, # TRANSLATORS: for encodings {qw/inputenc latin2 iso ISO-8859-2/,'txt'=>'ISO-8859-2 ('.__("Central Europe").')'}, # TRANSLATORS: for encodings {qw/inputenc latin3 iso ISO-8859-3/,'txt'=>'ISO-8859-3 ('.__("Southern Europe").')'}, # TRANSLATORS: for encodings {qw/inputenc latin4 iso ISO-8859-4/,'txt'=>'ISO-8859-4 ('.__("Northern Europe").')'}, # TRANSLATORS: for encodings {qw/inputenc latin5 iso ISO-8859-5/,'txt'=>'ISO-8859-5 ('.__("Cyrillic").')'}, # TRANSLATORS: for encodings {qw/inputenc latin9 iso ISO-8859-9/,'txt'=>'ISO-8859-9 ('.__("Turkish").')'}, # TRANSLATORS: for encodings {qw/inputenc latin10 iso ISO-8859-10/,'txt'=>'ISO-8859-10 ('.__("Northern").')'}, # TRANSLATORS: for encodings {qw/inputenc utf8x iso UTF-8/,'txt'=>'UTF-8 ('.__("Unicode").')'}, {qw/inputenc cp1252 iso cp1252/,'txt'=>'Windows-1252', alias=>['Windows-1252','Windows']}, # TRANSLATORS: for encodings {qw/inputenc applemac iso MacRoman/,'txt'=>'Macintosh '.__"Western Europe"}, # TRANSLATORS: for encodings {qw/inputenc macce iso MacCentralEurRoman/,'txt'=>'Macintosh '.__"Central Europe"}, ]; sub get_enc { my ($txt)=@_; for my $e (@$encodages) { return($e) if($e->{'inputenc'} =~ /^$txt$/i || $e->{'iso'} =~ /^$txt$/i); if($e->{'alias'}) { for my $a (@{$e->{'alias'}}) { return($e) if($a =~ /^$txt$/i); } } } return(''); } # TRANSLATORS: you can omit the [...] part, just here to explain context my $cb_model_vide_key=cb_model(''=>__p"(none) [No primary key found in association list]"); # TRANSLATORS: you can omit the [...] part, just here to explain context my $cb_model_vide_code=cb_model(''=>__p"(none) [No code found in LaTeX file]"); my @printing_methods=(); for my $m ({name=>"CUPS",description=>"CUPS"}, {name=>"CUPSlp",description=>"CUPS (via lp)"}, ) { my $mod="AMC::Print::".lc($m->{name}); load($mod); my $error=$mod->check_available(); if(! $error) { push @printing_methods,$m->{name},$m->{description}; if(!$config->get("methode_impression")) { $config->set("global:methode_impression",$m->{name}); debug "Switching to printing method <$m->{name}>."; } } else { if($config->get("methode_impression") eq $m->{name}) { $config->set("global:methode_impression",''); debug "Printing method <$m->{name}> is not available: $error"; } } } if(!$config->get("methode_impression")) { $config->set("global:methode_impression",'commande'); debug "Switching to printing method ."; } push @printing_methods, # TRANSLATORS: One of the printing methods: use a command (This is not the command name itself). This is a menu entry. 'commande',__("command"), # TRANSLATORS: One of the printing methods: print to files. This is a menu entry. 'file',__("to files") ; # TRANSLATORS: One of the rounding method for marks. This is a menu entry. my $rounding_store=cb_model('inf',__"floor", # TRANSLATORS: One of the rounding method for marks. This is a menu entry. 'normal',__"rounding", # TRANSLATORS: One of the rounding method for marks. This is a menu entry. 'sup',__"ceiling"); $prefs->store_register( # TRANSLATORS: One option for decimal point: use a comma. This is a menu entry 'delimiteur_decimal'=>cb_model(',',__", (comma)", # TRANSLATORS: One option for decimal point: use a point. This is a menu entry. '.',__". (dot)"), 'note_arrondi'=>$rounding_store, 'defaut_note_arrondi'=>$rounding_store, 'methode_impression'=>cb_model(@printing_methods), # TRANSLATORS: you can omit the [...] part, just here to explain context 'sides'=>cb_model('one-sided',__p("one sided [No two-sided printing]"), # TRANSLATORS: One of the two-side printing types. This is a menu entry. 'two-sided-long-edge',__"long edge", # TRANSLATORS: One of the two-side printing types. This is a menu entry. 'two-sided-short-edge',__"short edge"), 'encodage_latex'=>cb_model(map { $_->{'iso'}=>$_->{'txt'} } (@$encodages)), # TRANSLATORS: you can omit the [...] part, just here to explain context 'manuel_image_type'=>cb_model('ppm'=>__p("(none) [No transitional image type (direct processing)]"), 'xpm'=>'XPM', 'gif'=>'GIF'), 'liste_key'=>$cb_model_vide_key, 'assoc_code'=>$cb_model_vide_code, 'format_export'=>cb_model(map { $_=>"AMC::Export::register::$_"->name() } (@export_modules)), 'filter'=>cb_model(map { $_=>"AMC::Filter::register::$_"->name() } (@filter_modules)), # TRANSLATORS: One of the actions that can be done after exporting the marks. Here, do nothing more. This is a menu entry. 'after_export'=>cb_model(""=>__"that's all", # TRANSLATORS: One of the actions that can be done after exporting the marks. Here, open the exported file. This is a menu entry. "file"=>__"open the file", # TRANSLATORS: One of the actions that can be done after exporting the marks. Here, open the directory where the file is. This is a menu entry. "dir"=>__"open the directory", ), # TRANSLATORS: you can omit the [...] part, just here to explain context 'annote_position'=>cb_model("none"=>__p("(none) [No annotation position (do not write anything)]"), # TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: in one margin. This is a menu entry. "marge"=>__"in one margin", # TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: in one of the two margins. This is a menu entry. "marges"=>__"in the margins", # TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: near the boxes. This is a menu entry. "case"=>__"near boxes", # TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: in the zones defined in the source file "zones"=>__"where defined in the source", ), # TRANSLATORS: One of the possible sorting criteria for students in the exported spreadsheet with scores: the student name. This is a menu entry. 'export_sort'=>cb_model("n"=>__"name", # TRANSLATORS: One of the possible sorting criteria for students in the exported spreadsheet with scores: the student sheet number. This is a menu entry. "i"=>__"exam copy number", # TRANSLATORS: One of the possible sorting criteria for students in the exported spreadsheet with scores: the line where one can find this student in the students list file. This is a menu entry. "l"=>__"line in students list", # TRANSLATORS: you can omit the [...] part, just here to explain context # One of the possible sorting criteria for students in the exported spreadsheet with scores: the student mark. This is a menu entry. "m"=>__p("mark [student mark, for sorting]"), ), 'embedded_format'=>cb_model('png'=>'PNG', 'jpeg'=>'JPEG'), # TRANSLATORS: One of the possible way to group annotated answer sheets together to PDF files: make one PDF file per student, with all his pages. This is a menu entry. 'regroupement_type'=>cb_model('STUDENTS'=>__"One file per student", # TRANSLATORS: One of the possible way to group annotated answer sheets together to PDF files: make only one PDF with all students sheets. This is a menu entry. 'ALL'=>__"One file for all students", ), # TRANSLATORS: One of the possible way to annotate answer sheets: here we only select pages where the student has written something (in separate answer sheet mode, these are the pages from the answer sheet and not the pages from the subject). 'regroupement_compose'=>cb_model(0=>__"Only pages with answers", # TRANSLATORS: One of the possible way to annotate answer sheets: here we take the pages were the students has nothing to write (often question pages from a subject with separate answer sheet option) from the subject. 1=>__"Question pages from subject", # TRANSLATORS: One of the possible way to annotate answer sheets: here we take the pages were the students has nothing to write (often question pages from a subject with separate answer sheet option) from the correction. 2=>__"Question pages from correction", ), # TRANLATORS: For which students do you want to annotate papers? This is a menu entry. 'regroupement_copies'=>cb_model('ALL'=>__"All students", # TRANLATORS: For which students do you want to annotate papers? This is a menu entry. 'SELECTED'=>__"Selected students", ), 'auto_capture_mode'=>cb_model(-1=>__"Please select...", # TRANSLATORS: One of the ways exam was made: each student has a different answer sheet with a different copy number - no photocopy was made. This is a menu entry. 0=>__"Different answer sheets", # TRANSLATORS: One of the ways exam was made: some students have the same exam subject, as some photocopies were made before distributing the subjects. This is a menu entry. 1=>__"Some answer sheets were photocopied"), # TRANSLATORS: One of the ways to send mail: use sendmail command. This is a menu entry. 'email_transport'=>cb_model('sendmail'=>__"sendmail", # TRANSLATORS: One of the ways to send mail: use a SMTP server. This is a menu entry. 'SMTP'=>__"SMTP"), 'email_smtp_ssl'=>cb_model(0=>__p"None [SMTP security]", # TRANSLATORS: SMTP security mode: None (nor SSL nor STARTTLS) 1=>'SSL', 'starttls'=>'STARTTLS'), 'print_extract_with'=>cb_model('pdftk'=>'pdftk', 'gs'=>'gs (ghostscript)', 'qpdf'=>'qpdf', ), # TRANLATORS: One of the way to handle separate answer sheet when printing: standard (same as in the question pdf document). This is a menu entry. 'print_answersheet'=>cb_model(''=>__"Standard", # TRANLATORS: One of the way to handle separate answer sheet when printing: print separately answer sheet and question. This is a menu entry. 'split'=>__"Separate answer sheet", # TRANLATORS: One of the way to handle separate answer sheet when printing: print the answr sheet first. This is a menu entry. 'first'=>__"Answer sheet first"), ); # TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. my $symbole_type_cb=cb_model("none"=>__"nothing", # TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. "circle"=>__"circle", # TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. Here, a cross. "mark"=>__"mark", # TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. Here, the box outline. "box"=>__"box", ); for my $k (qw/0_0 0_1 1_0 1_1/) { $prefs->store_register("symbole_".$k."_type"=>$symbole_type_cb); } # Add config GUI for export modules... for my $m (@export_modules) { my $x="AMC::Export::register::$m"->build_config_gui(\%w,$prefs); if($x) { $w{'config_export_module_'.$m}=$x; $w{'config_export_modules'}->pack_start($x,0,0,0); } } ### export sub maj_export { my $old_format=$config->get('format_export'); valide_options_for_domain('export','',@_); if($config->key_changed("export_sort")) { annotate_source_change($projet{'_capture'},1); } debug "Format : ".$config->get('format_export'); for(@export_modules) { if($w{'config_export_module_'.$_}) { if($config->get('format_export') eq $_) { $w{'config_export_module_'.$_}->show; } else { $w{'config_export_module_'.$_}->hide; } } } my %hide=("AMC::Export::register::".$config->get('format_export')) ->hide(); for (qw/standard_export_options/) { if($hide{$_}) { $w{$_}->hide(); } else { $w{$_}->show(); } } } sub exporte { maj_export(); my $format=$config->get('format_export'); my @options=(); my $ext="AMC::Export::register::$format"->extension(); if(!$ext) { $ext=lc($format); } my $type="AMC::Export::register::$format"->type(); my $code=$config->get('code_examen'); $code=$projet{'nom'} if(!$code); utf8::encode($code); my $output=$shortcuts->absolu('%PROJET/exports/'.$code.$ext); my @needs_module=(); my %ofc="AMC::Export::register::$format" ->options_from_config($config); my $needs_catalog="AMC::Export::register::$format" ->needs_catalog($config); for(keys %ofc) { push @options,"--option-out",$_.'='.$ofc{$_}; } push @needs_module,"AMC::Export::register::$format"->needs_module(); if(@needs_module) { # teste si les modules necessaires sont disponibles my @manque=(); for my $m (@needs_module) { if(!check_install(module=>$m)) { push @manque,$m; } } if(@manque) { debug 'Exporting to '.$format.': Needs perl modules '.join(', ',@manque); my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok', __("Exporting to '%s' needs some perl modules that are not installed: %s. Please install these modules or switch to another export format."), "AMC::Export::register::$format"->name(),join(', ',@manque) ); $dialog->run; $dialog->destroy; return(); } } # If some data involving detailed results (concerning some # particular answers) is required, then check that the catalog # document is prepared, or propose to build it. This way, answers # will be identified by the character drawn in the boxes in the # catalog document. These characters default to A, B, C and so on, # but can be others if requested in the source file. if($needs_catalog) { if(!$projet{'_layout'}->nb_chars_transaction()) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'question','yes-no',''); $dialog->set_markup(__"When referring to a particular answer in the export, the letter used will be the one found in the catalog. However, the catalog has not yet been built. Do you want to build it now?"); $dialog->get_widget_for_response('yes')->get_style_context()->add_class("suggested-action"); my $reponse=$dialog->run; $dialog->destroy; if($reponse eq 'yes') { update_catalog(); } } } # wait for GUI update before going on with the table Glib::Idle->add(\&export_go, { format=>$format,output=>$output, o=>\@options,type=>$type, }, Glib::G_PRIORITY_LOW); } sub export_go { my ($opts)=@_; commande('commande'=>["auto-multiple-choice","export", pack_args( "--debug",debug_file(), "--module",$opts->{format}, "--data",$config->get_absolute('data'), "--useall",$config->get('export_include_abs'), "--sort",$config->get('export_sort'), "--fich-noms",$config->get_absolute('listeetudiants'), "--noms-encodage",bon_encodage('liste'), "--csv-build-name",csv_build_name(), ($config->get('annote_rtl') ? "--rtl" : "--no-rtl"), "--output",$opts->{output}, @{$opts->{o}}, ), ], 'texte'=>__"Exporting marks...", 'progres.id'=>'export', 'progres.pulse'=>0.01, 'fin'=>\&export_done, 'o'=>$opts, ); } sub export_done { my ($c,%data)=@_; my $output=$c->{o}->{output}; my $type=$c->{o}->{type}; if(-f $output) { # shows export messages my $t=$c->higher_message_type(); if($t) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', ($t eq 'ERR' ? 'error' : $t eq 'WARN' ? 'warning' : 'info'), 'ok', join("\n",$c->get_messages($t)) ); $dialog->run; $dialog->destroy; } if($config->get('after_export') eq 'file') { my $cmd = commande_accessible([$config->get($type.'_viewer'), $config->get($type.'_editor'), 'xdg-open', 'open']); commande_parallele($cmd,$output) if($cmd); } elsif($config->get('after_export') eq 'dir') { view_dir($shortcuts->absolu('%PROJET/exports/')); } } else { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'warning','ok', __"Export to %s did not work: file not created...",$output); $dialog->run; $dialog->destroy; } } ## menu contextuel sur liste diagnostique -> visualisation zoom/page # TRANSLATORS: One of the popup menu that appears when right-clicking on a page in the data capture diagnosis table. Choosing this entry, an image will be opened to see where the corner marks were detected. my %diag_menu=(page=>{text=>__"page adjustment",icon=>'gtk-zoom-fit'}, # TRANSLATORS: One of the popup menu that appears when right-clicking on a page in the data capture diagnosis table. Choosing this entry, a window will be opened were the user can see all boxes on the scans and how they were filled by the students, and correct detection of ticked-or-not if needed. zoom=>{text=>__"boxes zooms",icon=>'gtk-zoom-in'}, ); sub zooms_display { my ($student,$page,$copy,$forget_it)=@_; debug "Zooms view for ".pageids_string($student,$page,$copy)."..."; my $zd=$shortcuts->absolu('%PROJET/cr/zooms'); debug "Zooms directory $zd"; if($w{'zooms_window'} && $w{'zooms_window'}->actif) { $w{'zooms_window'}->page([$student,$page,$copy],$zd,$forget_it); } elsif(!$forget_it) { $w{'zooms_window'}=AMC::Gui::Zooms::new('seuil'=>$config->get('seuil'), 'seuil_up'=>$config->get('seuil_up'), 'n_cols'=>$config->get('zooms_ncols'), 'zooms_dir'=>$zd, 'page_id'=>[$student,$page,$copy], 'size-prefs',$config, 'encodage_interne'=>$config->get('encodage_interne'), 'data'=>$projet{'_capture'}, 'cr-dir'=>$config->get_absolute('cr'), 'list_view'=>$w{'diag_tree'}, 'global_options'=>$config, 'prefs'=>$prefs, ); } } sub zooms_line_base { my ($forget_it)=@_; my @selected=$w{'diag_tree'}->get_selection->get_selected_rows; my $first_selected=$selected[0]->[0]; if(defined($first_selected)) { my $iter=$diag_store->get_iter($first_selected); my $id=$diag_store->get($iter,DIAG_ID); zooms_display((map { $diag_store->get($iter,$_) } (DIAG_ID_STUDENT, DIAG_ID_PAGE, DIAG_ID_COPY) ),$forget_it); } } sub zooms_line { zooms_line_base(1); } sub zooms_line_open { zooms_line_base(0); } sub layout_line { my @selected=$w{'diag_tree'}->get_selection->get_selected_rows; for my $s (@{$selected[0]}) { my $iter=$diag_store->get_iter($s); my @id=map { $diag_store->get($iter,$_); } (DIAG_ID_STUDENT,DIAG_ID_PAGE,DIAG_ID_COPY); $projet{'_capture'}->begin_read_transaction('Layl'); my $f=$config->get_absolute('cr').'/' .$projet{'_capture'}->get_layout_image(@id); $projet{'_capture'}->end_transaction('Layl'); utf8::downgrade($f); commande_parallele($config->get('img_viewer'),$f) if(-f $f); } } sub delete_line { my @selected=$w{'diag_tree'}->get_selection->get_selected_rows; my $f; if(@{$selected[0]}) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'question','yes-no',''); $dialog->set_markup( sprintf((__"You requested to delete all data capture results for %d page(s)"),1+$#{$selected[0]})."\n" .''.(__"All data and image files related to these pages will be deleted.")."\n" .(__"Do you really want to continue?") ); $dialog->get_widget_for_response('yes')->get_style_context()->add_class("destructive-action"); my $reponse=$dialog->run; $dialog->destroy; if($reponse eq 'yes') { my @iters=(); $projet{'_capture'}->begin_transaction('rmAN'); for my $s (@{$selected[0]}) { my $iter=$diag_store->get_iter($s); my @id=map { $diag_store->get($iter,$_); } (DIAG_ID_STUDENT,DIAG_ID_PAGE,DIAG_ID_COPY); debug "Removing data capture for ".pageids_string(@id); # # 1) get image files generated, and remove them # my $crdir=$config->get_absolute('cr'); my @files=(); # # scan file push @files,$shortcuts->absolu($projet{'_capture'}->get_scan_page(@id)); # # layout image, in cr directory push @files,$crdir.'/' .$projet{'_capture'}->get_layout_image(@id); # # annotated scan push @files,$crdir.'/corrections/jpg/' .$projet{'_capture'}->get_annotated_page(@id); # # zooms push @files,map { $crdir.'/zooms/'.$_ } grep { defined($_) } ($projet{'_capture'}->get_zones_images(@id,ZONE_BOX)); # for (@files) { if (-f $_) { debug "Removing $_"; unlink($_); } } # # 2) remove data from database # $projet{'_capture'}->delete_page_data(@id); if($config->get('auto_capture_mode') == 1) { $projet{'_scoring'}->delete_scoring_data(@id[0,2]); $projet{'_association'}->delete_association_data(@id[0,2]); } push @iters,$iter; } for(@iters) { $diag_store->remove($_); } update_analysis_summary(); $projet{'_capture'}->end_transaction('rmAN'); assoc_state(); } } } $w{'diag_tree'}->signal_connect('button_release_event' => sub { my ($self, $event) = @_; return 0 unless $event->button == 3; my ($path, $column, $cell_x, $cell_y) = $w{'diag_tree'}->get_path_at_pos ($event->x, $event->y); if ($path) { my $iter=$diag_store->get_iter($path); my $id=[map { $diag_store->get($iter,$_) } (DIAG_ID_STUDENT, DIAG_ID_PAGE, DIAG_ID_COPY)]; my $menu = Gtk3::Menu->new; my $c=0; my @actions=('page'); # new zooms viewer $projet{'_capture'}->begin_read_transaction('ZnIm'); my @bi=grep { -f $shortcuts->absolu('%PROJET/cr/zooms')."/".$_ } $projet{'_capture'}->zone_images($id->[0],$id->[2],ZONE_BOX); $projet{'_capture'}->end_transaction('ZnIm'); if(@bi) { $c++; my $item = Gtk3::ImageMenuItem->new($diag_menu{'zoom'}->{text}); $item->set_image(Gtk3::Image->new_from_icon_name($diag_menu{'zoom'}->{icon},'menu')); $menu->append ($item); $item->show; $item->signal_connect (activate => sub { my (undef, $sortkey) = @_; zooms_display(@$id); }, $_); } else { push @actions,'zoom'; } # page viewer and old zooms viewer foreach $a (@actions) { my $f; if($a eq 'page') { $projet{'_capture'}->begin_read_transaction('gLIm'); $f=$config->get_absolute('cr').'/' .$projet{'_capture'}->get_layout_image(@$id); $projet{'_capture'}->end_transaction('gLIm'); } else { $f=id2file($id,$a,'jpg'); } if(-f $f) { $c++; my $item = Gtk3::ImageMenuItem->new($diag_menu{$a}->{text}); $item->set_image(Gtk3::Image->new_from_icon_name($diag_menu{$a}->{icon},'menu')); $menu->append ($item); $item->show; $item->signal_connect (activate => sub { my (undef, $sortkey) = @_; debug "Looking at $f..."; commande_parallele($config->get('img_viewer'),$f); }, $_); } } $menu->popup (undef, undef, undef, undef, $event->button, $event->time) if($c>0); return 1; # stop propagation! } }); ### Appel a des commandes externes -- log, annulation my %les_commandes=(); my $cmd_id=0; sub commande { my (@opts)=@_; $cmd_id++; my $c=AMC::Gui::Commande::new('avancement'=>$w{'avancement'}, 'log'=>$w{'log_general'}, 'finw'=>sub { my $c=shift; $w{'onglets_projet'}->set_sensitive(1); $w{'commande'}->hide(); delete $les_commandes{$c->{'_cmdid'}}; }, @opts); $c->{'_cmdid'}=$cmd_id; $les_commandes{$cmd_id}=$c; $w{'onglets_projet'}->set_sensitive(0); $w{'commande'}->show(); $c->open(); } sub commande_annule { for (keys %les_commandes) { $les_commandes{$_}->quitte(); } } sub commande_parallele { my (@c)=(@_); if(commande_accessible($c[0])) { my $pid=fork(); if($pid==0) { debug "Command // [$$] : ".join(" ",@c); exec(@c) || debug "Exec $$ : error"; exit(0); } } else { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup(sprintf(__"Following command could not be run: %s, perhaps due to a poor configuration?",$c[0])); $dialog->run; $dialog->destroy; } } ### Actions des menus my $proj_store; sub projet_nouveau { liste_des_projets('cree'=>1); } sub projet_charge { liste_des_projets(); } sub projet_gestion { liste_des_projets('gestion'=>1); } sub projects_list { # construit la liste des projets existants debug "Projects list: ".$w{'local_rep_projets'} .(utf8::is_utf8($w{'local_rep_projets'}) ? " (UTF8)" : ""); if(-d $w{'local_rep_projets'}) { opendir(DIR, $w{'local_rep_projets'}) || die "Error opening directory ".$w{'local_rep_projets'}." : $!"; my @f=grep { ! /^\./ } readdir(DIR); closedir DIR; debug "F:".join(',',map { $_.":".(-d $w{'local_rep_projets'}."/".$_) } @f); my @projs = grep { ! /^\./ && -d $w{'local_rep_projets'}."/".$_ } @f; debug "[".$w{'local_rep_projets'}."] P:".join(',',@projs); return(@projs); } } sub projects_show { my ($p)=@_; $p=[projects_list()] if(!$p); $w{'projet_bouton_choose_directory'} ->set_tooltip_text(sprintf(__("Current directory: %s"), Glib::filename_display_name($w{'local_rep_projets'}))); if(!$w{'icon_project'}) { $w{'icon_project'} = Gtk3::IconTheme::get_default->load_icon("auto-multiple-choice",$config->get("project_icon_size") ,"force-svg"); $w{'icon_project_dir'} = Gtk3::IconTheme::get_default->load_icon("gtk-no",$config->get("project_icon_size") ,"force-svg"); $w{'icon_project'}=$w{'main_window'}->render_icon ('gtk-open', 'menu') if(!$w{'icon_project'}); } $proj_store->clear; # $prefix is the UTF8 character in RTL environments. my $prefix=($w{'main_window'}->get_direction() eq 'rtl' ? decode("utf-8","\xe2\x80\x8e"): ''); for my $proj_name (sort { $a cmp $b } @$p) { my $is_amc=(-f fich_options($proj_name,$w{'local_rep_projets'})); my $name_plain=$proj_name; my $label=$proj_name=Glib::filename_display_name($proj_name); $label=$prefix.$label if($proj_name =~ /^[0-9]*$/); debug "Directory: $label".(utf8::is_utf8($label) ? " (utf8)" : "") .($is_amc ? " (AMC)" : ""); $proj_store->set($proj_store->append, PROJ_NOM,$label, PROJ_NOM_PLAIN,$name_plain, PROJ_ICO, ($is_amc ? $w{'icon_project'} : $w{'icon_project_dir'} )); } } sub liste_des_projets { my %oo=(@_); $w{'local_rep_projets'}=$config->get('rep_projets'); mkdir($w{'local_rep_projets'}) if(-d $w{'local_rep_projets'}); my @projs=projects_list(); if($#projs>=0 || $oo{'cree'}) { # fenetre pour demander le nom du projet my $gp=read_glade('choix_projet', qw/label_etat label_action choix_projets_liste projet_bouton_ouverture projet_bouton_creation projet_bouton_supprime projet_bouton_annule projet_bouton_annule_label projet_bouton_renomme projet_bouton_clone projet_bouton_mv_yes projet_bouton_mv_no projet_bouton_choose_directory projet_nom projet_nouveau_syntaxe projet_nouveau/); if($oo{'cree'}) { $w{'projet_nouveau'}->show(); $w{'projet_bouton_creation'}->show(); $w{'projet_bouton_ouverture'}->hide(); $w{'label_etat'}->set_text(__"Existing projects:"); $w{'choix_projet'}->set_focus($w{'projet_nom'}); # TRANSLATORS: Window title when creating a new project. $w{'choix_projet'}->set_title(__"New AMC project"); } if($oo{'gestion'}) { $w{'label_etat'}->set_text(__"Projects management:"); $w{'label_action'}->set_markup(__"Change project name:"); $w{'projet_bouton_ouverture'}->hide(); for (qw/supprime clone renomme/) { $w{'projet_bouton_'.$_}->show(); } $w{'projet_bouton_annule_label'}->set_text(__"Back"); # TRANSLATORS: Window title when managing projects. $w{'choix_projet'}->set_title(__"AMC projects management"); } # mise a jour liste des projets dans la fenetre $proj_store = Gtk3::ListStore->new ('Glib::String','Glib::String', 'Gtk3::Gdk::Pixbuf'); $w{'choix_projets_liste'}->set_model($proj_store); $w{'choix_projets_liste'}->set_text_column(PROJ_NOM); $w{'choix_projets_liste'}->set_pixbuf_column(PROJ_ICO); projects_show(\@projs); $w{'choix_projet'}->show(); } else { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'info','ok', __"You don't have any MC project in directory %s!",$config->get('rep_projets')); $dialog->run; $dialog->destroy; } } sub project_choose_directory { my $d=Gtk3::FileChooserDialog ->new(__("Choose directory"), $w{'choix_projet'},'select-folder', 'gtk-cancel'=>'cancel', 'gtk-ok'=>'ok'); $d->set_current_folder($w{'local_rep_projets'}); my $r=$d->run; if($r eq 'ok') { my $rep=$d->get_filename || $d->get_current_directory; utf8::downgrade($rep); if(-d $rep) { $w{'local_rep_projets'}=$rep; } } $d->destroy(); if($r eq 'ok') { projects_show(); } } sub projet_gestion_check { my ($open_ok)=@_; # lequel ? my $sel=$w{'choix_projets_liste'}->get_selected_items()->[0]; my $iter; my $proj; if($sel) { $iter=$proj_store->get_iter($sel); $proj=$proj_store->get($iter,PROJ_NOM_PLAIN) if($iter); } return('','') if(!$proj); return($proj,$iter) if($open_ok); # est-ce le projet en cours ? if($projet{'nom'} && $proj eq $projet{'nom'}) { my $dialog = Gtk3::MessageDialog ->new($w{'choix_projet'}, 'destroy-with-parent', 'error','ok', __"You can't change project %s since it's open.",$proj); $dialog->run; $dialog->destroy; $w{'choix_projet'}->set_keep_above(1); $proj=''; } return($proj,$iter); } sub projet_liste_clone { my ($proj,$iter)=projet_gestion_check(1); return if(!$proj); my $proj_clone=new_filename($shortcuts->absolu($w{'local_rep_projets'}).'/'.$proj); my (undef,undef,$proj_c) = splitpath($proj_clone); my $dialog = Gtk3::MessageDialog ->new($w{'choix_projet'}, 'destroy-with-parent', 'warning','ok-cancel',''); $dialog->set_markup( sprintf(__("This will clone project %s to a new project %s."), glib_filename($proj),glib_filename($proj_c))); my $r=$dialog->run; $dialog->destroy; if($r eq 'ok') { if(!project_copy($w{'local_rep_projets'}.'/'.$proj, $proj_clone,$w{'choix_projet'})) { debug_and_stderr("ERROR (clone project): $!"); } projects_show(); } } my $nom_original=''; my $nom_original_iter=''; sub projet_liste_renomme { my ($proj,$iter)=projet_gestion_check(); return if(!$proj); # ouverture zone : $w{'projet_nouveau'}->show(); $w{'projet_nom'}->set_text(glib_filename($proj)); $nom_original=$proj; $nom_original_iter=$iter; # boutons... for (qw/annule renomme clone supprime/) { $w{'projet_bouton_'.$_}->hide(); } for (qw/mv_no mv_yes/) { $w{'projet_bouton_'.$_}->show(); } } sub projet_renomme_fin { # fermeture zone : $w{'projet_nouveau'}->hide(); # boutons... for (qw/annule renomme clone supprime/) { $w{'projet_bouton_'.$_}->show(); } for (qw/mv_no mv_yes/) { $w{'projet_bouton_'.$_}->hide(); } } sub projet_mv_yes { projet_renomme_fin(); my $nom_nouveau=$w{'projet_nom'}->get_text(); utf8::encode($nom_nouveau); return if($nom_nouveau eq $nom_original || !$nom_nouveau); if ($w{'local_rep_projets'}) { my $dir_original=$w{'local_rep_projets'}."/".$nom_original; utf8::downgrade($dir_original); if (-d $dir_original) { my $dir_nouveau=$w{'local_rep_projets'}."/".$nom_nouveau; utf8::downgrade($dir_nouveau); if (-d $dir_nouveau) { $w{'choix_projet'}->set_keep_above(0); my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( # TRANSLATORS: Message when you want to create an AMC project with name xxx, but there already exists a directory in the projects directory with this name! sprintf(__("Directory %s already exists, so you can't choose this name."),glib_filename($dir_nouveau))); $dialog->run; $dialog->destroy; $w{'choix_projet'}->set_keep_above(1); return; } else { # OK if (!move($dir_original,$dir_nouveau)) { debug_and_stderr("ERROR (move project): $!"); } $proj_store->set($nom_original_iter, PROJ_NOM,glib_filename($nom_nouveau), ); utf8::downgrade($nom_nouveau); $proj_store->set($nom_original_iter, PROJ_NOM_PLAIN,$nom_nouveau, ); } } else { debug_and_stderr "No original directory"; } } else { debug "No projects directory"; } } sub projet_mv_no { projet_renomme_fin(); } my @find_results=(); sub add_to_results { push @find_results,$File::Find::name; } sub project_copy { my ($src,$dest,$parent_window)=@_; utf8::downgrade($src); utf8::downgrade($dest); $parent_window=$w{'main_window'} if(!$parent_window); my $err=''; if(!$err && -e $dest) { $err=__("Destination project directory already exists"); } if(!$err) { @find_results=(); find({wanted=>\&add_to_results,no_chdir=>1}, $src); my $total=1+$#find_results; if($total>0) { my $done=0; my $i=0; my $last_fraction=0; my $old_text=$w{'avancement'}->get_text(); $w{'avancement'}->set_text(__"Copying project..."); $w{'avancement'}->set_fraction(0); $w{'commande'}->show(); for my $s (@find_results) { my $d=$s; $d =~ s:^$src:$dest:; if(-d $s) { $done++ if(mkdir($d)); } else { $done++ if(copy($s,$d)); } $i++; if($i/$total-$last_fraction>1/40) { $last_fraction=$i/$total; $w{'avancement'}->set_fraction($last_fraction); Gtk3::main_iteration while ( Gtk3::events_pending ); } } $w{'avancement'}->set_text($old_text); $w{'commande'}->hide(); my $dialog = Gtk3::MessageDialog ->new($parent_window, 'destroy-with-parent', 'info','ok', __("Your project has been copied"). ($done!=$total ? " ".sprintf(__("(%d files out of %d)"), $done,$total) : "") ."." ); $dialog->run; $dialog->destroy; } else { $err=__("Source project directory not found"); } } if($err) { my $dialog = Gtk3::MessageDialog ->new($parent_window, 'destroy-with-parent', 'error','ok', __("An error occuried during project copy: %s."), $err ); $dialog->run; $dialog->destroy; return(0); } return(1); } sub projet_liste_supprime { my ($proj,$iter)=projet_gestion_check(); return if(!$proj); # on demande confirmation... $w{'choix_projet'}->set_keep_above(0); my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'warning','ok-cancel',''); $dialog->set_markup( sprintf(__("You asked to remove project %s.")." " .__("This will permanently erase all the files of this project, including the source file as well as all the files you put in the directory of this project, as the scans for example.")." " .__("Is this really what you want?"),glib_filename($proj))); $dialog->get_widget_for_response('ok')->get_style_context()->add_class("destructive-action"); my $reponse=$dialog->run; $dialog->destroy; $w{'choix_projet'}->set_keep_above(1); if($reponse ne 'ok') { return; } debug "Removing project $proj !"; $proj_store->remove($iter); # suppression effective des fichiers... if($w{'local_rep_projets'}) { my $dir=$w{'local_rep_projets'}."/".$proj; utf8::downgrade($dir); if(-d $dir) { remove_tree($dir,{'verbose'=>0,'safe'=>1,'keep_root'=>0}); } else { debug "No directory $dir"; } } else { debug "No projects directory"; } } sub projet_charge_ok { # ouverture projet deja existant my $sel_items=$w{'choix_projets_liste'}->get_selected_items(); return if(!$sel_items); my $sel=$sel_items->[0]; my $proj; if($sel) { $proj=$proj_store->get($proj_store->get_iter($sel),PROJ_NOM_PLAIN); } $w{'choix_projet'}->destroy(); Gtk3::main_iteration while ( Gtk3::events_pending ); if($proj) { my $reponse='yes'; my $options_file=fich_options($proj,$w{'local_rep_projets'}); if(! -f $options_file) { debug_and_stderr "Options file not found: ".$options_file .(utf8::is_utf8($options_file) ? " (UTF8)" : ""); my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'warning','yes-no',''); $dialog->set_markup( sprintf(__("You selected directory %s as a project to open.")." " .__("However, this directory does not seem to contain a project. Do you still want to try?"),$proj)); $reponse=$dialog->run; $dialog->destroy; } if($reponse eq 'yes') { quitte_projet() or return(); # If the project to open lies on a removable media, suggest # to copy it first to the user standard projects directory: if($w{'local_rep_projets'} =~ /^\/media\// && $config->get_absolute('projects_home') !~ /^\/media\//) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'warning','yes-no',''); $dialog->set_markup( sprintf(__("You selected project %s from directory %s.")." " .__("Do you want to copy this project to your projects directory before opening it?"), $proj,$w{'local_rep_projets'})); my $r=$dialog->run; $dialog->destroy; if($r eq 'yes') { my $proj_dest=new_filename($config->get_absolute('projects_home').'/'.$proj); if(project_copy($w{'local_rep_projets'}.'/'.$proj, $proj_dest)) { (undef,undef,$proj_dest) = splitpath($proj_dest); $w{'local_rep_projets'}=$config->get_absolute('projects_home'); $proj=$proj_dest; } } } # OK, now, open the project! set_projects_home($w{'local_rep_projets'}); projet_ouvre($proj) ; } } } sub restricted_check { my ($text,$warning,$chars)=@_; my $nom=$text->get_text(); if (!$config->get('nonascii_projectnames')) { if ($nom =~ s/[^$chars]//g) { $text->set_text($nom); $warning->show(); my $col=Gtk3::Gdk::RGBA::parse('#FFC0C0'); for (qw/normal active/) { $text->override_background_color($_,$col); } Glib::Timeout->add (500, sub { for (qw/normal active/) { $text->override_background_color($_,undef); } return 0; }); } } } sub projet_nom_verif { restricted_check($w{'projet_nom'},$w{'projet_nouveau_syntaxe'},"a-zA-Z0-9._+:-"); } sub projet_charge_non { $w{'choix_projet'}->destroy(); } sub projet_charge_nouveau { # creation nouveau projet my $proj=$w{'projet_nom'}->get_text(); utf8::encode($proj); $w{'choix_projet'}->destroy(); # existe deja ? if(-e $w{'local_rep_projets'}."/$proj") { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( sprintf(__("The name %s is already used in the projects directory.")." " .__"You must choose another name to create a project.",$proj)); $dialog->run; $dialog->destroy; } else { quitte_projet() or return(); set_projects_home($w{'local_rep_projets'}); if(projet_ouvre($proj,1)) { projet_sauve(); } } } sub projet_sauve { debug "Saving project..."; $config->save(); } sub projet_check_and_save { if($projet{'nom'}) { valide_options_notation(); $config->save(); } } ### Actions des boutons de la partie DOCUMENTS sub format_markup { my ($t)=@_; $t =~ s/\&/\&/g; return($t); } sub mini {($_[0]<$_[1] ? $_[0] : $_[1])} my %component_name=('latex_packages'=>__("LaTeX packages:"), 'commands'=>__("Commands:"), 'fonts'=>__("Fonts:"), ); sub check_sty_version { my ($c)=@_; my $sty_v=$c->variable('styversion'); $sty_v='unknown' if(!$sty_v); my $sty_p=$c->variable('stypath'); my $amc_v='@/PACKAGE_V_STY/@'; if($sty_p && $sty_v ne $amc_v) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'warning','ok',''); $dialog->set_markup (__"Your AMC version and LaTeX style file version differ. Even if the documents are properly generated, this can lead to many problems using AMC.". "\n".__"Please check your installation to get matching AMC and LaTeX style file versions.". "\n".sprintf(__"AMC version: %s\nsty version: %s\nsty path: %s",$amc_v,$sty_v,$sty_p) ); $dialog->run; $dialog->destroy; } } sub update_document { my($mode,%opts)=@_; commande('commande'=>["auto-multiple-choice","prepare", "--with",moteur_latex(), "--filter",$config->get('filter'), "--filtered-source",$config->get_absolute('filtered_source'), "--debug",debug_file(), "--out-sujet",$config->get_absolute('doc_question'), "--out-corrige",$config->get_absolute('doc_solution'), "--out-corrige-indiv",$config->get_absolute('doc_indiv_solution'), "--out-catalog",$config->get_absolute('doc_catalog'), "--out-calage",$config->get_absolute('doc_setting'), "--mode",$mode, "--n-copies",$config->get('nombre_copies'), $config->get_absolute('texsrc'), "--prefix",$shortcuts->absolu('%PROJET/'), "--latex-stdout", "--data",$config->get_absolute('data'), ], 'signal'=>2, 'texte'=>__"Documents update...", 'progres.id'=>'MAJ', 'progres.pulse'=>0.01, 'fin'=>\&end_of_document_update, 'o'=>\%opts); } sub end_of_document_update { my ($c,%data)=@_; detecte_documents(); if($data{cancelled}) { debug "Prepare documents: CANCELLED!"; return(); } check_sty_version($c); my @err=$c->erreurs(); my @warn=$c->warnings(); if (@err || @warn) { debug "Errors preparing documents!"; notify_end_of_work('documents', __"Problems while preparing documents"); my $message=__("Problems while processing the source file."); if(!$c->{o}->{partial}) { $message.=" " .__("You have to correct the source file and re-run documents update."); } if(@err) { $message.="\n\n".__("Errors")."\n" .join("\n",map { format_markup($_) } (@err[0..mini(9,$#err)])).($#err>9 ? "\n\n(".__("Only first ten errors written").")": ""); } if(@warn) { $message.="\n\n".__("Warnings")."\n" .join("\n",map { format_markup($_) } (@warn[0..mini(9,$#warn)])).($#warn>9 ? "\n\n(".__("Only first ten warnings written").")": ""); } $message.="\n\n". # TRANSLATORS: Here, %s will be replaced with the translation of "Command output details", and refers to the small expandable part at the bottom of AMC main window, where one can see the output of the commands lauched by AMC. sprintf(__("See also the processing log in '%s' below."), # TRANSLATORS: Title of the small expandable part at the bottom of AMC main window, where one can see the output of the commands lauched by AMC. __"Command output details"); $message.=" ".__("Use LaTeX editor or latex command for a precise diagnosis.") if($config->get('filter') eq 'latex'); debug($message); my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup($message); $dialog->run; $dialog->destroy; return(); } notify_end_of_work('documents', __"Documents have been prepared"); if($c->{o}->{partial}) { debug "Partial: return"; return(); } # verif que tout y est my $ok=1; for (qw/question setting/) { $ok=0 if(! -f $config->get_absolute('doc_'.$_)); } if ($ok) { debug "All documents are successfully generated"; # set project option from filter requests my %vars=$c->variables; for my $k (keys %vars) { if ($k =~ /^project:(.*)/) { debug "Configuration: $k = $vars{$k}"; $config->set($k,$vars{$k}); } } # success message dialogue_apprentissage('MAJ_DOCS_OK','','',0, __("Working documents successfully generated.")." " # TRANSLATORS: Here, "them" refers to the working documents. .__("You can take a look at them double-clicking on the list.")." " # TRANSLATORS: Here, "they" refers to the working documents. .__("If they are correct, proceed to layouts detection...")); # Try to guess the best place to write question # scores when annotating. This option can be # changed later in the Edit/Preferences window. my $ap='marges'; if($c->variable('scorezones')) { $ap='zones'; } elsif($c->variable('ensemble')) { $ap='cases'; } $config->set('annote_position',$ap); my $ensemble=$c->variable('ensemble') && !$c->variable('outsidebox'); if (($ensemble || $c->variable('insidebox')) && $config->get('seuil')<0.4) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'question','yes-no',''); $dialog->set_markup( sprintf(($ensemble ? __("Your question has a separate answers sheet.")." " .__("In this case, letters are shown inside boxes.") : __("Your question is set to present labels inside the boxes to be ticked.")) ." " # TRANSLATORS: Here, %s will be replaced with the translation of "darkness threshold". .__("For better ticking detection, ask students to fill out completely boxes, and choose parameter \"%s\" around 0.5 for this project.")." " .__("At the moment, this parameter is set to %.02f.")." " .__("Would you like to set it to 0.5?") # TRANSLATORS: This parameter is the ratio of dark pixels number over total pixels number inside box above which a box is considered to be ticked. ,__"darkness threshold", $config->get('seuil')) ); my $reponse=$dialog->run; $dialog->destroy; if ($reponse eq 'yes') { $config->set('seuil',0.5); $config->set('seuil_up',1.0); } } } } sub doc_maj { my $sur=0; if($projet{'_capture'}->n_pages_transaction()>0) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'warning','ok-cancel',''); $dialog->set_markup( __("Papers analysis was already made on the basis of the current working documents.")." " .__("You already made the examination on the basis of these documents.")." " .__("If you modify working documents, you will not be capable any more of analyzing the papers you have already distributed!")." " .__("Do you wish to continue?")." " .__("Click on OK to erase the former layouts and update working documents, or on Cancel to cancel this operation.")." " ."".__("To allow the use of an already printed question, cancel!").""); $dialog->get_widget_for_response('ok')->get_style_context()->add_class("destructive-action"); my $reponse=$dialog->run; $dialog->destroy; if($reponse ne 'ok') { return(0); } $sur=1; } # deja des MEP fabriquees ? $projet{_layout}->begin_transaction('DMAJ'); my $pc=$projet{_layout}->pages_count; $projet{_layout}->end_transaction('DMAJ'); if($pc > 0) { if(!$sur) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'question','ok-cancel',''); $dialog->set_markup( __("Layouts are already calculated for the current documents.")." " .__("Updating working documents, the layouts will become obsolete and will thus be erased.")." " .__("Do you wish to continue?")." " .__("Click on OK to erase the former layouts and update working documents, or on Cancel to cancel this operation.") ." ".__("To allow the use of an already printed question, cancel!").""); $dialog->get_widget_for_response('ok')->get_style_context()->add_class("destructive-action"); my $reponse=$dialog->run; $dialog->destroy; if($reponse ne 'ok') { return(0); } } clear_processing('mep:'); } # new layout document : XY (from LaTeX) if($config->get('doc_setting') =~ /\.pdf$/) { $config->set_project_option_to_default('doc_setting','FORCE'); } # check for filter dependencies my $filter_register=("AMC::Filter::register::".$config->get('filter')) ->new(); my $check=$filter_register->check_dependencies(); if(!$check->{'ok'}) { my $message=sprintf(__("To handle properly %s files, AMC needs the following components, that are currently missing:"),$filter_register->name())."\n"; for my $k (qw/latex_packages commands fonts/) { if(@{$check->{$k}}) { $message .= "".$component_name{$k}." "; if($k eq 'fonts') { $message.=join(', ',map { @{$_->{'family'}} } @{$check->{$k}}); } else { $message.=join(', ',@{$check->{$k}}); } $message.="\n"; } } $message.=__("Install these components on your system and try again."); my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup($message); $dialog->run; $dialog->destroy; return(0); } # set options from filter: if($config->get('filter')) { $filter_register->set_oo($config); $filter_register->configure(); } # remove pre-existing DOC-corrected.pdf (built by AMC-annotate) my $pdf_corrected=$shortcuts->absolu("DOC-corrected.pdf"); if(-f $pdf_corrected) { debug "Removing pre-existing $pdf_corrected"; unlink($pdf_corrected); } # my $mode_s='s['; $mode_s.='s' if($config->get('prepare_solution')); $mode_s.='c' if($config->get('prepare_catalog')); $mode_s.=']'; $mode_s.='k' if($config->get('prepare_indiv_solution')); update_document($mode_s); } sub filter_details { my $gd=read_glade('filter_details', qw/filter_text/); debug "Filter details: conf->details GUI"; $prefs->transmet_pref($gd,prefix=>'filter_details', root=>"project:"); my $r=$w{'filter_details'}->run(); if($r == 10) { $config->set_local_keys('filter'); debug "Filter details: new value->local"; $prefs->reprend_pref(prefix=>'filter_details',container=>'local'); $w{'filter_details'}->destroy; debug "Filter details: local->main GUI"; $prefs->transmet_pref($gui,prefix=>'pref_prep', keys=>["local:filter"],container=>'project'); } else { $w{'filter_details'}->destroy; } } sub filter_details_update { $config->set_local_keys('filter'); $prefs->reprend_pref(prefix=>'filter_details',container=>'local'); my $b=$w{'filter_text'}->get_buffer; if($config->get('local:filter')) { $b->set_text(("AMC::Filter::register::".$config->get('local:filter'))->description); } else { $b->set_text(''); } } my $cups; my $g_imprime; sub nonnul { my $s=shift; $s =~ s/\000//g; return($s); } sub autre_imprimante { my %alias=(); my %trouve=(); my ($ok,$imp_iter)=$w{'imprimante'}->get_active_iter; if($ok) { my $i=$w{'imprimante'}->get_model->get($imp_iter,COMBO_ID); debug "Choix imprimante $i"; $config->set("global:options_impression/printer",{}) if(!$config->get("options_impression/printer")); my $printer_settings=$config->get("options_impression/printer"); $printer_settings->{$i}={} if(!$printer_settings->{$i}); $w{print_object}->printer_options_table($w{printing_options_table}, \%w,$prefs, $i,$printer_settings->{$i}); $prefs->transmet_pref($g_imprime,prefix=>'imp', root=>'options_impression'); $prefs->transmet_pref($g_imprime,prefix=>'printer', root=>"options_impression/printer/$i"); } else { debug "No printer choice!"; } } sub project_printing_method { if($config->get('project:pdfform')) { return('file'); } else { return($config->get("methode_impression")); } } sub project_extract_with { if($config->get('project:pdfform')) { if($config->get('print_extract_with') eq 'qpdf') { return('qpdf'); } else { return('pdftk+NA'); } } else { return($config->get("print_extract_with")); } } sub sujet_impressions { if(! -f $config->get_absolute('doc_question')) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( # TRANSLATORS: Message when the user required printing the question paper, but it is not present (probably the working documents have not been properly generated). __"You don't have any question to print: please check your source file and update working documents first."); $dialog->run; $dialog->destroy; return(); } $projet{'_layout'}->begin_read_transaction('PGCN'); my $c=$projet{'_layout'}->pages_count; $projet{'_layout'}->end_transaction('PGCN'); if($c==0) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( # TRANSLATORS: Message when AMC does not know about the subject pages that has been generated. Usualy this means that the layout computation step has not been made. __("Question's pages are not detected.")." " .__"Perhaps you forgot to compute layouts?"); $dialog->run; $dialog->destroy; return(); } my $method=project_printing_method(); if($method =~ /^CUPS/) { my $print_module="AMC::Print::".lc($method); load($print_module); # checks for availibility my $error=$print_module->check_available(); if($error) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok', sprintf(__("You chose the printing method '%s' but it is not available (%s). Please install the missing dependencies or switch to another printing method."),$method,$error)); $dialog->run; $dialog->destroy; return(); } $w{print_object}=$print_module-> new(useful_options=>$config->get("printer_useful_options")); # check for a installed printer debug "Checking for at least one CUPS printer..."; my $default_printer=$w{print_object}->default_printer(); if(!$default_printer) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok', __("You chose a printing method using CUPS but there are no configured printer in CUPS. Please configure some printer or switch to another printing method.")); $dialog->run; $dialog->destroy; return(); } } debug "Printing dialog..."; $g_imprime=read_glade('choix_pages_impression', qw/arbre_choix_copies bloc_imprimante answersheet_box imprimante printing_options_table bloc_fichier/); $prefs->transmet_pref($g_imprime,prefix=>'impall', root=>"options_impression"); debug "Printing method: ".$method; if($method =~ /^CUPS/) { $w{'bloc_imprimante'}->show(); # les imprimantes : my @printers = $w{print_object}->printers_list(); debug "Printers : ".join(' ',map { $_->{name} } @printers); my $p_model=cb_model(map { $_->{name}=>$_->{description} } @printers); $w{'imprimante'}->set_model($p_model); if(! $config->get('imprimante')) { my $defaut=$w{print_object}->default_printer; if($defaut) { $config->set('imprimante',$defaut); } else { $config->set('imprimante',$printers[0]->{name}); } } my $i=model_id_to_iter($p_model,COMBO_ID,$config->get('imprimante')); if($i) { $w{'imprimante'}->set_active_iter($i); # (this will call autre_imprimante and transmet_pref with # the right options) } else { # updates the values in the GUI from the general options $prefs->transmet_pref($g_imprime,prefix=>'imp', root=>'options_impression'); } } if($method eq 'file') { $w{'bloc_imprimante'}->hide(); $w{'bloc_fichier'}->show(); $prefs->transmet_pref($g_imprime,prefix=>'impf', root=>'options_impression'); } $copies_store->clear(); $projet{'_layout'}->begin_read_transaction('PRNT'); my $row=0; for my $c ($projet{'_layout'}->students()) { $copies_store->insert_with_values($row++,COPIE_N,$c); } $projet{'_layout'}->end_transaction('PRNT'); $w{'arbre_choix_copies'}->set_model($copies_store); my $renderer=Gtk3::CellRendererText->new; # TRANSLATORS: This is the title of the column containing the paper's numbers (1,2,3,...) in the table showing all available papers, from which the user will choose those he wants to print. my $column = Gtk3::TreeViewColumn->new_with_attributes (__"papers", $renderer, text=> COPIE_N ); $w{'arbre_choix_copies'}->append_column ($column); $w{'arbre_choix_copies'}->get_selection->set_mode("multiple"); $w{'choix_pages_impression'}->show(); } sub sujet_impressions_cancel { if(get_debug()) { $prefs->reprend_pref(prefix=>'imp'); $Data::Dumper::Indent = 0; debug(Dumper($config->get('options_impression'))); } $w{'choix_pages_impression'}->destroy; } sub options_strings { my ($o)=@_; return(map { $_."=".$o->{$_} } grep { ! /^_/ && !/^(repertoire|print_answersheet)$/ && exists($o->{$_}) && $o->{$_} && !ref($o->{$_}) } (keys %$o)); } sub options_string { my (@oos)=@_; return(join(',',map { options_strings($_) } (@oos))); } sub sujet_impressions_ok { my $os='none'; my @e=(); my @selected=$w{'arbre_choix_copies'}->get_selection()->get_selected_rows(); for my $i (@{$selected[0]}) { push @e,$copies_store->get($copies_store->get_iter($i),COPIE_N) if($i); } $prefs->reprend_pref(prefix=>'impall'); my $method=project_printing_method(); if($method =~ /^CUPS/) { my ($ok,$imp_iter)=$w{'imprimante'}->get_active_iter; my $i; if($ok) { $i=$w{'imprimante'}->get_model->get($imp_iter,COMBO_ID); } else { $i='default'; } $config->set('imprimante',$i); $prefs->reprend_pref(prefix=>'imp'); $prefs->reprend_pref(prefix=>'printer'); $os=options_string($config->get("options_impression"), $config->get("options_impression/printer")->{$i}); debug("Printing options : $os"); } if($method eq 'file') { $prefs->reprend_pref(prefix=>'impf'); if(!$config->get('options_impression/repertoire')) { debug "Print to file : no destination..."; $config->set('options_impression/repertoire',''); } else { my $path=$config->get_absolute('options_impression/repertoire'); mkdir($path) if(! -e $path); } } $w{'choix_pages_impression'}->destroy; debug "Printing: ".join(",",@e); if(!@e) { # No page selected: my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'info','ok', __("You did not select any exam to print...")); $dialog->run; $dialog->destroy; return(); } if(1+$#e <= 10) { # Less than 10 pages selected: is it a mistake? $projet{'_layout'}->begin_read_transaction('pPFP'); my $max_p=$projet{'_layout'}->max_enter(); my $students=$projet{'_layout'}->students_count(); $projet{'_layout'}->end_transaction('pPFP'); if($max_p>1) { # Some sheets have more than one enter-page: multiple scans # are not supported... my $resp=dialogue_apprentissage('PRINT_FEW_PAGES', 'warning','yes-no',$students<=10, __("You selected only a few sheets to print.")."\n". __("As students are requested to write on more than one page, you must create as many exam sheets as necessary for all your students, with different sheets numbers, and print them all.")." ". __("If you print one or several sheets and photocopy them to have enough for all the students, you won't be able to continue with AMC!")."\n". __("Do you want to print the selected sheets anyway?"), ); return() if($resp eq 'no'); } elsif($students<=10) { if($config->get('auto_capture_mode') != 1) { # This looks strange: a few sheets printed, a few sheets # generated, and photocopy mode not selected yet. Ask the # user if he wants to select this mode now. my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'question','yes-no',''); $dialog->set_markup( __("You selected only a few sheets to print.")."\n". "".__("Are you going to photocopy some printed subjects before giving them to the students?")."\n". __("If so, the corresponding option will be set for this project.")." ". __("However, you will be able to change this when giving your first scans to AMC.") ); my $reponse=$dialog->run; $dialog->destroy; my $mult=($reponse eq 'yes' ? 1 : 0); $config->set('auto_capture_mode',$mult); } } } if($config->get('options_impression/print_answersheet') eq 'first') { # This options needs pdftk! if($config->get('print_extract_with') !~ /(pdftk|qpdf)/) { my $found=0; EXTRACT: for my $cmd (qw/qpdf pdftk/) { if(commande_accessible($cmd)) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'info','ok',''); $dialog->set_markup( # TRANSLATORS: the two %s will be replaced by the translations of "Answer sheet first" and "Extracting method". sprintf(__("You selected the '%s' option, that uses '%s', so the %s has been set to '%s' for you."), __("Answer sheet first"),$cmd, __("Extracting method"),$cmd) ); $dialog->run; $dialog->destroy; $config->set("print_extract_with",$cmd); $found=1; last EXTRACT; } } if(!$found) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( sprintf(__("You selected the '%s' option, but this option needs 'qpdf' or 'pdftk' to be installed on your system. Please install one of these and try again."), __"Answer sheet first") ); $dialog->run; $dialog->destroy; return(); } } } my $fh=File::Temp->new(TEMPLATE => "nums-XXXXXX", TMPDIR => 1, UNLINK=> 1); print $fh join("\n",@e)."\n"; $fh->seek( 0, SEEK_END ); my @o_answer=('--no-split','--no-answer-first'); if($config->get('options_impression/print_answersheet') eq 'split') { @o_answer=('--split','--no-answer-first'); } elsif($config->get('options_impression/print_answersheet') eq 'first') { @o_answer=('--answer-first','--no-split'); } my $extract_with=project_extract_with(); commande('commande'=>["auto-multiple-choice","imprime", "--methode",$method, "--imprimante",$config->get('imprimante'), "--options",$os, "--output",$config->get_absolute('options_impression/repertoire')."/sheet-%e.pdf", @o_answer, "--print-command",$config->get('print_command_pdf'), "--sujet",$config->get_absolute('doc_question'), "--data",$config->get_absolute('data'), "--progression-id",'impression', "--progression",1, "--debug",debug_file(), "--fich-numeros",$fh->filename, "--extract-with",$extract_with, ], 'signal'=>2, 'texte'=>__"Print papers one by one...", 'progres.id'=>'impression', 'o'=>{'fh'=>$fh,'etu'=>\@e,'printer'=>$config->get('imprimante'), 'method'=>$method}, 'fin'=>sub { my $c=shift; close($c->{'o'}->{'fh'}); save_state_after_printing($c->{'o'}); }, ); } sub save_state_after_printing { my $c=shift; my $st=AMC::State::new('directory'=>$shortcuts->absolu('%PROJET/')); $st->read(); my @files=grep { -f $shortcuts->absolu($_) } map { $config->get('doc_'.$_) } (qw/question solution setting catalog/); push @files,$config->get_absolute('texsrc'); push @files,$config->get_absolute('filtered_source') if(-f $config->get_absolute('filtered_source')); if(!$st->check_local_md5(@files)) { $st=AMC::State::new('directory'=>$shortcuts->absolu('%PROJET/')); $st->add_local_files(@files); } $st->add_print('printer'=>$c->{'printer'}, 'method'=>$c->{'method'}, 'content'=>join(',',@{$c->{'etu'}})); $st->write(); } sub calcule_mep { if($config->get('doc_setting') !~ /\.xy$/) { # OLD STYLE WORKING DOCUMENTS... Not supported anymore: update! my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error', # message type 'ok', # which set of buttons? ''); $dialog->set_markup( __("Working documents are in an old format, which is not supported anymore.")." " .__("Please generate again the working documents!").""); $dialog->run; $dialog->destroy; return; } commande('commande'=>["auto-multiple-choice","meptex", "--debug",debug_file(), "--src",$config->get_absolute('doc_setting'), "--progression-id",'MEP', "--progression",1, "--data",$config->get_absolute('data'), ], 'texte'=>__"Detecting layouts...", 'progres.id'=>'MEP', 'fin'=>sub { my ($c,%data)=@_; detecte_mep(); if(!$data{cancelled}) { $projet{'_layout'}->begin_read_transaction('PGCN'); my $c=$projet{'_layout'}->pages_count(); $projet{'_layout'}->end_transaction('PGCN'); if($c<1) { # avertissement... my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error', # message type 'ok', # which set of buttons? ''); $dialog->set_markup( __("No layout detected.")." " .__("Don't go through the examination before fixing this problem, otherwise you won't be able to use AMC for correction.")); $dialog->run; $dialog->destroy; } else { dialogue_apprentissage('MAJ_MEP_OK','','',0, __("Layouts are detected.")." " .sprintf(__"You can check all is correct clicking on button %s and looking at question pages to see if red boxes are well positioned.",__"Check layouts")." " .__"Then you can proceed to printing and to examination."); } } }); } sub verif_mep { saisie_manuelle(0,0,1); } ### Actions des boutons de la partie SAISIE sub saisie_manuelle { my ($self,$event,$regarder)=@_; $projet{'_layout'}->begin_read_transaction('PGCN'); my $c=$projet{'_layout'}->pages_count(); $projet{'_layout'}->end_transaction('PGCN'); if($c>0) { if(!$regarder) { # if auto_capture_mode is not set, ask the user... my $n=check_auto_capture_mode(); if($config->get('auto_capture_mode')<0) { my $gsa=read_glade('choose-mode', qw/saisie_auto_c_auto_capture_mode button_capture_go/); $w{saisie_auto_cb_allocate_ids}=''; $prefs->transmet_pref($gsa,prefix=>'saisie_auto', root=>'project:'); my $ret=$w{'choose-mode'}->run(); if($ret==1) { $prefs->reprend_pref(prefix=>'saisie_auto'); $w{'choose-mode'}->destroy; } else { $w{'choose-mode'}->destroy; return(); } } } # go for capture my $gm=AMC::Gui::Manuel::new ( 'multiple'=>$config->get('auto_capture_mode'), 'data-dir'=>$config->get_absolute('data'), 'project-dir'=>$shortcuts->absolu('%PROJET'), 'sujet'=>$config->get_absolute('doc_question'), 'etud'=>'', 'dpi'=>$config->get('saisie_dpi'), 'seuil'=>$config->get('seuil'), 'seuil_up'=>$config->get('seuil_up'), 'seuil_sens'=>$config->get('seuil_sens'), 'seuil_eqm'=>$config->get('seuil_eqm'), 'global'=>0, 'encodage_interne'=>$config->get('encodage_interne'), 'image_type'=>$config->get('manuel_image_type'), 'retient_m'=>1, 'editable'=>($regarder ? 0 : 1), 'en_quittant'=>($regarder ? '' : sub { detecte_analyse(); assoc_state(); }), 'size_monitor'=>{config=>$config, key=>($regarder?'checklayout':'manual') .'_window_size'}, invalid_color_name=>$config->get("view_invalid_color"), empty_color_name=>$config->get("view_empty_color"), ); } else { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( __("No layout for this project.")." " # TRANSLATORS: Here, the first %s will be replaced with "Layout detection" (a button title), and the second %s with "Preparation" (the tab title where one can find this button). .sprintf(__("Please use button %s in %s before manual data capture."), __"Layout detection", __"Preparation")); $dialog->run; $dialog->destroy; } } sub check_auto_capture_mode { $projet{'_capture'}->begin_read_transaction('ckac'); my $n=$projet{'_capture'}->n_copies; if($n>0 && $config->get('auto_capture_mode') <0) { # the auto_capture_mode (sheets photocopied or not) is not set, # but some capture has already been done. This looks weird, but # it can be the case if captures were made with an old AMC # version, or if project parameters have not been saved... # So we try to detect the correct value from the capture data. $config->set('auto_capture_mode', ($projet{'_capture'}->n_photocopy() > 0 ? 1 : 0)); } $projet{'_capture'}->end_transaction('ckac'); return($n); } sub saisie_automatique { # mode can't be changed if data capture has been made already my $n=check_auto_capture_mode; $projet{'_capture'}->begin_read_transaction('adcM'); my $mcopy=$projet{'_capture'}->max_copy_number()+1; $w{'saisie_auto_allocate_start'}=$mcopy; $projet{'_capture'}->end_transaction('adcM'); my $gsa=read_glade('saisie_auto', qw/copie_scans saisie_auto_c_auto_capture_mode saisie_auto_cb_allocate_ids button_capture_go/); $w{'copie_scans'}->set_active(1); $prefs->transmet_pref($gsa,prefix=>'saisie_auto', root=>'project:'); $w{'saisie_auto_cb_allocate_ids'}->set_label(sprintf(__"Pre-allocate sheet ids from the page numbers, starting at %d",$mcopy)); $w{'saisie_auto_c_auto_capture_mode'}->set_sensitive($n==0); $w{saisie_auto}->show(); } sub saisie_auto_mode_update { $config->set_local_keys('auto_capture_mode'); # the mode value (auto_capture_mode) has been updated. valide_options_for_domain('saisie_auto','local',@_); my $acm=$config->get('local:auto_capture_mode'); $acm=-1 if(!defined($acm)); $w{'button_capture_go'}->set_sensitive($acm>=0); if($w{saisie_auto_cb_allocate_ids}) { if($acm == 1) { $w{'saisie_auto_cb_allocate_ids'}->show(); } else { $w{'saisie_auto_cb_allocate_ids'}->hide(); } } } sub saisie_auto_annule { $w{'saisie_auto'}->destroy(); } sub saisie_auto_info { my $dialog=Gtk3::MessageDialog ->new($w{'saisie_auto'},'destroy-with-parent','info','ok',''); $dialog->set_markup( __("Automatic data capture can be done in two different modes:")."\n" ."". # TRANSLATORS: This is a title for the AMC mode where the distributed exam papers are all different (different paper numbers at the top) -- photocopy is not used. __("Different answer sheets"). ". ". __("In the most robust one, you give a different exam (with a different exam number) to every student. You must not photocopy subjects before distributing them.")."\n" ."". # TRANSLATORS: This is a title for the AMC mode where some answer sheets have been photocopied before being distributed to the students. __("Some answer sheets were photocopied"). ". ". __("In the second one (which can be used only if answer sheets to be scanned have one page per candidate) you can photocopy answer sheets and give the same subject to different students.")."\n" .__("After the first automatic capture, you can't switch to the other mode.") ); $dialog->run; $dialog->destroy; } sub analyse_call { my (%oo)=@_; # meeds a little tmp disk space (for zooms), and first decent space # for AMC-getimages... return() if(!check_for_tmp_disk_space($oo{getimages} ? 20 : 2)); # make temporary file with the list of images to analyse my $fh=File::Temp->new(TEMPLATE => "liste-XXXXXX", TMPDIR => 1, UNLINK=> 1); print $fh join("\n",@{$oo{'f'}})."\n"; $fh->seek( 0, SEEK_END ); # first try to see if some of the files are PDF forms $oo{fh}=$fh; $oo{liste}=$fh->filename; commande(commande=>["auto-multiple-choice","read-pdfform", "--progression-id",'analyse', "--list",$fh->filename, "--debug",debug_file(), ($config->get('auto_capture_mode') ? "--multiple" : "--no-multiple"), "--data",$config->get_absolute('data'), ], signal=>2, o=>\%oo, fin=>sub { my ($c,%data)=@_; ${$c->{o}->{overwritten}}+=$c->variable('overwritten') if($c->{o}->{overwritten} && $c->variable('overwritten')); if(!$data{cancelled}) { analyse_call_images(%{$c->{o}}); } }, 'progres.id'=>$oo{'progres'}, ); } sub analyse_call_images { my (%oo)=@_; # extract individual images scans if($oo{'getimages'}) { my @args=("--progression-id",'analyse', "--list",$oo{fh}->filename, "--debug",debug_file(), "--vector-density",$config->get('vector_scan_density'), ); push @args,"--copy-to",$oo{'copy'} if($oo{'copy'}); push @args,"--force-convert" if($config->get("force_convert")); $projet{_layout}->begin_transaction('Orie'); my $orientation=$projet{_layout}->orientation(); $projet{_layout}->end_transaction('Orie'); push @args,"--orientation",$orientation if($orientation); debug "Target orientation: $orientation"; commande('commande'=>["auto-multiple-choice","getimages", @args], 'signal'=>2, 'progres.id'=>$oo{'progres'}, 'o'=>\%oo, 'fin'=>sub { my ($c,%data)=@_; if(!$data{cancelled}) { analyse_call_go(%{$c->{o}}); } }, ); } else { analyse_call_go(%oo); } } sub analyse_call_go { my (%oo)=@_; my @args=("--debug",debug_file(), ($config->get('auto_capture_mode') ? "--multiple" : "--no-multiple"), "--tol-marque",$config->get('tolerance_marque_inf').','.$config->get('tolerance_marque_sup'), "--prop",$config->get('box_size_proportion'), "--bw-threshold",$config->get('bw_threshold'), "--progression-id",'analyse', "--progression",1, "--n-procs",$config->get('n_procs'), "--data",$config->get_absolute('data'), "--projet",$shortcuts->absolu('%PROJET/'), "--cr",$config->get_absolute('cr'), "--liste-fichiers",$oo{'liste'}, ($config->get('ignore_red') ? "--ignore-red" : "--no-ignore-red"), ($config->get('try_three') ? "--try-three" : "--no-try-three"), ); push @args,"--pre-allocate",$oo{'allocate'} if($oo{'allocate'}); # Diagnostic image file ? if($oo{'diagnostic'}) { push @args,"--debug-image-dir",$shortcuts->absolu('%PROJET/cr/diagnostic'); push @args,"--no-tag-overwritten"; } # call AMC-analyse commande('commande'=>["auto-multiple-choice","analyse", @args], 'signal'=>2, 'texte'=>$oo{'text'}, 'progres.id'=>$oo{'progres'}, 'o'=>{'fh'=>$oo{'fh'},overwritten=>$oo{overwritten}}, fin=>sub { my ($c,%data)=@_; debug "Overall [SCAN] overwritten pages @".$c.": " .($c->variable('overwritten') || "(none)"); ${$c->{o}->{overwritten}} += $c->variable('overwritten') if($c->{o}->{overwritten} && $c->variable('overwritten')); debug "Calling original hook from analyse_call_go"; &{$oo{fin}}($c,%data) if($oo{fin}); }, ); } sub clean_gtk2_filenames { my @f=@_; return( map { if(ref($_) eq 'ARRAY') { return(clean_gtk2_filenames(@$_)); } else { if (utf8::is_utf8($_)) { $_= Glib->filename_from_unicode ($_); } $_; } } @f); } sub glib_filename { my ($n)=@_; utf8::downgrade($n); return(Glib::filename_display_name($n)); } sub glib_project_name { return(glib_filename($projet{'nom'})); } sub saisie_auto_ok { my @f=clean_gtk2_filenames(sort { $a cmp $b } ($w{'saisie_auto'}->get_filenames())); my $copie=$w{'copie_scans'}->get_active(); $prefs->reprend_pref(prefix=>'saisie_auto'); $w{'saisie_auto'}->destroy(); Gtk3::main_iteration while ( Gtk3::events_pending ); clear_old('diagnostic', $shortcuts->absolu('%PROJET/cr/diagnostic')); $w{'annulation'}->set_sensitive(1); my $overwritten=0; analyse_call('f'=>\@f, 'getimages'=>1, 'copy'=>($copie ? $shortcuts->absolu('scans/') : ''), 'text'=>__("Automatic data capture..."), 'progres'=>'analyse', 'allocate'=>($config->get('allocate_ids') ? $w{'saisie_auto_allocate_start'} : 0), overwritten=>\$overwritten, 'fin'=>sub { my ($c,%data)=@_; close($c->{'o'}->{'fh'}); detecte_analyse('apprend'=>1); assoc_state(); if(!$data{cancelled}) { notify_end_of_work('capture',__"Automatic data capture has been completed"); } my $ov=${$c->{o}->{overwritten}}; if($ov>0) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'warning','ok',''); $dialog->set_markup( sprintf(__"Some of the pages you submitted (%d of them) have already been processed before. Old data has been overwritten.",$ov) ); $dialog->run; $dialog->destroy; } }, ); } sub choisit_liste { my $dial=read_glade('liste_dialog') ->get_object('liste_dialog'); my @f; if($config->get('listeetudiants')) { @f=splitpath($config->get_absolute('listeetudiants')); } else { @f=splitpath($shortcuts->absolu('%PROJET/')); } $f[2]=''; $dial->set_current_folder(catpath(@f)); my $ret=$dial->run(); debug("Names list file choice [$ret]"); my $file=$dial->get_filename(); $dial->destroy(); if($ret eq '1') { # file chosen debug("List: ".$file); valide_liste('set'=>$file); } elsif($ret eq '2') { # No list valide_liste('set'=>''); } else { # Cancel } } sub edite_liste { my $f=$config->get_absolute('listeetudiants'); debug "Editing $f..."; commande_parallele($config->get('txt_editor'),$f); } sub students_list_show { $w{'liste_refresh'}->show(); $monitor->remove_key('type','StudentsList'); } sub students_list_hide { $w{'liste_refresh'}->hide(); $monitor->remove_key('type','StudentsList'); $monitor->add_file($config->get_absolute('listeetudiants'), \&students_list_show, type=>'StudentsList') if($config->get('listeetudiants')); } sub valide_liste { my %oo=@_; debug "* valide_liste"; if(defined($oo{'set'}) && !$oo{'nomodif'}) { $config->set('listeetudiants',$shortcuts->relatif($oo{'set'})); } my $fl=$config->get_absolute('listeetudiants'); $fl='' if(!$config->get('listeetudiants')); my $fn=$fl; $fn =~ s/.*\///; # For proper markup rendering escape '<', '>' and '&' characters # in filename with \<, \gt;, and \& $fn=Glib::Markup::escape_text(glib_filename($fn)); if($fl) { $w{'liste_filename'}->set_markup("$fn"); $w{'liste_filename'}->set_tooltip_text(glib_filename($fl)); for(qw/liste_edit/) { $w{$_}->set_sensitive(1); } } else { # TRANSLATORS: Names list file : (none) $w{'liste_filename'}->set_markup(__"(none)"); $w{'liste_filename'}->set_tooltip_text(''); for(qw/liste_edit/) { $w{$_}->set_sensitive(0); } } $projet{_students_list}=AMC::NamesFile::new($fl, 'encodage'=>bon_encodage('liste'), 'identifiant'=>csv_build_name(), ); my ($err,$errlig)=$projet{_students_list}->errors(); if($err) { students_list_show(); if(!$oo{'noinfo'}) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( sprintf(__"Unsuitable names file: %d errors, first on line %d.",$err,$errlig)); $dialog->run; $dialog->destroy; } $prefs->store_register('liste_key'=>$cb_model_vide_key); } else { # problems with ID (name/surname) my $e=$projet{_students_list}->problem('ID.empty'); if($e>0) { debug "NamesFile: $e empty IDs"; students_list_show(); my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'warning','ok',''); $dialog->set_markup( # TRANSLATORS: Here, do not translate 'name' and 'surname' (except in french), as the column names in the students list file has to be named in english in order to be properly detected. sprintf(__"Found %d empty names in names file %s. Check that name or surname column is present, and always filled.",$e,$fl)." ". __"Edit the names file to correct it, and re-read."); $dialog->run; $dialog->destroy; } else { my $d=$projet{_students_list}->problem('ID.dup'); if(@$d) { debug "NamesFile: duplicate IDs [".join(',',@$d)."]"; if($#{$d}>8) { @$d=(@{$d}[0..8],'(and more)'); } students_list_show(); my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'warning','ok',''); $dialog->set_markup( sprintf(__"Found duplicate names: %s. Check that all names are different.",join(', ',@$d))." ".__"Edit the names file to correct it, and re-read."); $dialog->run; $dialog->destroy; } else { # OK, no need to refresh students_list_hide(); } } # transmission liste des en-tetes my @heads=$projet{_students_list}->heads_for_keys(); debug "sorted heads: ".join(",",@heads); # TRANSLATORS: you can omit the [...] part, just here to explain context $prefs->store_register('liste_key'=>cb_model('',__p("(none) [No primary key found in association list]"), map { ($_,$_) } (@heads))); } $prefs->transmet_pref($gui,prefix=>'pref_assoc', keys=>["project:liste_key"]); assoc_state(); } ### Actions des boutons de la partie NOTATION sub check_possible_assoc { my ($code)=@_; if(! -s $config->get_absolute('listeetudiants')) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( # TRANSLATORS: Here, %s will be replaced with the name of the tab "Data capture". sprintf(__"Before associating names to papers, you must choose a students list file in tab \"%s\".", __"Data capture")); $dialog->run; $dialog->destroy; } elsif(!$config->get('liste_key')) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( __("Please choose a key from primary keys in students list before association.")); $dialog->run; $dialog->destroy; } elsif($code && ! $config->get('assoc_code')) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( __("Please choose a code (made with LaTeX command \\AMCcodeGrid or equivalent) before automatic association.")); $dialog->run; $dialog->destroy; } else { return(1); } return(0); } # manual association sub associe { return() if(!check_possible_assoc(0)); if(-f $config->get_absolute('listeetudiants')) { my $ga=AMC::Gui::Association::new('cr'=>$config->get_absolute('cr'), 'data_dir'=>$config->get_absolute('data'), 'liste'=>$config->get_absolute('listeetudiants'), 'liste_key'=>$config->get('liste_key'), 'identifiant'=>csv_build_name(), 'fichier-liens'=>$config->get_absolute('association'), 'global'=>0, 'assoc-ncols'=>$config->get('assoc_ncols'), 'encodage_liste'=>bon_encodage('liste'), 'encodage_interne'=>$config->get('encodage_interne'), 'rtl'=>$config->get('annote_rtl'), 'fin'=>sub { assoc_state(); }, 'size_prefs'=>($config->get('conserve_taille') ? $config : ''), ); if($ga->{'erreur'}) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok', $ga->{'erreur'}); $dialog->run; $dialog->destroy; } } else { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'info','ok', # TRANSLATORS: Here, %s will be replaced with "Students identification", which refers to a paragraph in the tab "Marking" from AMC main window. sprintf(__"Before associating names to papers, you must choose a students list file in paragraph \"%s\".", __"Students identification")); $dialog->run; $dialog->destroy; } } # automatic association sub associe_auto { return() if(!check_possible_assoc(1)); commande('commande'=>["auto-multiple-choice","association-auto", pack_args("--data",$config->get_absolute('data'), "--notes-id",$config->get('assoc_code'), "--liste",$config->get_absolute('listeetudiants'), "--liste-key",$config->get('liste_key'), "--csv-build-name",csv_build_name(), "--encodage-liste",bon_encodage('liste'), "--debug",debug_file(), ($config->get('assoc_code') eq '' ? "--pre-association" : "--no-pre-association"), ), ], 'texte'=>__"Automatic association...", 'fin'=>sub { my ($c,%data)=@_; assoc_state(); assoc_resultat() if(!$data{cancelled}); }, ); } # automatic association finished : explain what to do after sub assoc_resultat { my $mesg=1; $projet{'_association'}->begin_read_transaction('ARCC'); my ($auto,$man,$both)=$projet{'_association'}->counts(); $projet{'_association'}->end_transaction('ARCC'); my $dialog=Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'info','ok',''); $dialog->set_markup( sprintf(__("Automatic association completed: %d students recognized."),$auto). # TRANSLATORS: Here %s and %s will be replaced with two parameters names: "Primary key from this list" and "Code name for automatic association". ($auto==0 ? "\n".sprintf(__("Please check \"%s\" and \"%s\" values and try again."), __("Primary key from this list"), __("Code name for automatic association"))."" : "") ); $dialog->run; $dialog->destroy; dialogue_apprentissage('ASSOC_AUTO_OK','','',0, __("Automatic association is now finished. You can ask for manual association to check that all is fine and, if necessary, read manually students names which have not been automatically identified.")) if($auto>0); } sub valide_options_correction { my ($ww,$o)=@_; my $name=$ww->get_name(); debug "Options validation from $name"; if(!$w{$name}) { debug "WARNING: Option validation failed, unknown name $name."; } else { $config->set("project:$name",$w{$name}->get_active() ? 1 : 0); } } sub valide_options_for_domain { my ($domain,$container,$widget,$user_data)=@_; $container='project' if(!$container); if($widget) { my $name=$widget->get_name(); debug "<$domain> options validation for widget $name"; if($name =~ /${domain}_[a-z]+_(.*)/) { $prefs->reprend_pref(prefix=>$domain,keys=>["project:".$1],trace=>1,container=>$container); } else { debug "Widget $name is not in domain <$domain>!"; } } else { debug "<$domain> options validation: ALL"; $prefs->reprend_pref(prefix=>$domain,container=>$container); } } sub valide_options_association { $previous_liste_key=$config->get('liste_key'); valide_options_for_domain('pref_assoc','',@_); } sub valide_options_preparation { valide_options_for_domain('pref_prep','',@_); } sub filter_changed { my (@args)=@_; # check it is a different value... my $old_filter=$config->get('filter'); debug "Filter changed callback / old=$old_filter"; $config->set_local_keys(); $config->set('local:filter',$old_filter); valide_options_for_domain('pref_prep','local',@_); my $new_filter=$config->get('local:filter'); return if($old_filter eq $new_filter); debug "Filter changed -> ".$new_filter; # working document already built: ask for confirmation if(-f $config->get_absolute('doc_question')) { debug "Ask for confirmation"; my $text; if($projet{'_capture'}->n_pages_transaction()>0) { $text=__("The working documents are already prepared with the current file format. If you change the file format, working documents and all other data for this project will be ereased.").' ' .__("Do you wish to continue?")." " .__("Click on Ok to erease old working documents and change file format, and on Cancel to get back to the same file format.") ."\n".__("To allow the use of an already printed question, cancel!").""; } else { $text=__("The working documents are already prepared with the current file format. If you change the file format, working documents will be ereased.").' ' .__("Do you wish to continue?")." " .__("Click on Ok to erease old working documents and change file format, and on Cancel to get back to the same file format."); } my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'question','ok-cancel',''); $dialog->set_markup($text); my $reponse=$dialog->run; $dialog->destroy; if($reponse eq 'cancel') { $prefs->transmet_pref($gui,prefix=>'pref_prep', root=>'project:'); return(0); } clear_processing('doc:'); } valide_options_preparation(@args); # No source created: change source filename if(!-f $config->get_absolute('texsrc') || -z $config->get_absolute('texsrc')) { $config->set('project:texsrc','%PROJET/'. ("AMC::Filter::register::".$config->get('filter')) ->default_filename()); $w{button_edit_src}->set_tooltip_text(glib_filename($config->get_absolute('texsrc'))); } } sub valide_options_notation { valide_options_for_domain('notation','',@_); if($config->key_changed("regroupement_compose")) { annotate_source_change($projet{'_capture'},1); } $w{'groupe_model'}->set_sensitive($config->get('regroupement_type') eq 'STUDENTS'); } sub change_liste_key { valide_options_association(); debug "New liste_key: ".$config->get('liste_key'); if($projet{_students_list}->head_n_duplicates($config->get('liste_key'))) { debug "Invalid key: back to old value $previous_liste_key"; my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok', __"You can't choose column '%s' as a key in the students list, as it contains duplicates (value '%s')", $config->get('liste_key'), $projet{_students_list}->head_first_duplicate($config->get('liste_key')), ); $dialog->run; $dialog->destroy; $config->set('liste_key', ($previous_liste_key ne $config->get('liste_key') ? $previous_liste_key : "")); $prefs->transmet_pref($gui,prefix=>'pref_assoc', keys=>['project:liste_key']); return(); } if ($config->get('liste_key')) { $projet{'_association'}->begin_read_transaction('cLky'); my $assoc_liste_key=$projet{'_association'}->variable('key_in_list'); $assoc_liste_key='' if(!$assoc_liste_key); my ($auto,$man,$both)=$projet{'_association'}->counts(); $projet{'_association'}->end_transaction('cLky'); debug "Association [$assoc_liste_key] counts: AUTO=$auto MANUAL=$man BOTH=$both"; if ($assoc_liste_key ne $config->get('liste_key') && $auto+$man>0) { # liste_key has changed and some association has been # made with another liste_key if ($man>0) { # manual association work has been made my $dialog=Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'warning','yes-no',''); $dialog->set_markup( sprintf(__("The primary key from the students list has been set to \"%s\", which is not the value from the association data."),$config->get('liste_key'))." ". sprintf(__("Some manual association data has be found, which will be lost if the primary key is changed. Do you want to switch back to the primary key \"%s\" and keep association data?"),$assoc_liste_key) ); $dialog->get_widget_for_response('yes')->get_style_context()->add_class("suggested-action"); my $resp=$dialog->run; $dialog->destroy; if ($resp eq 'no') { # clears association data clear_processing('assoc'); # automatic association run if ($config->get('assoc_code') && $auto>0) { associe_auto; } } else { $config->set('liste_key',$assoc_liste_key); $prefs->transmet_pref($gui,prefix=>'pref_assoc', keys=>['project:liste_key']); } } else { if ($config->get('assoc_code')) { # only automated association, easy to re-run my $dialog=Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'info','ok',''); $dialog->set_markup( sprintf(__("The primary key from the students list has been set to \"%s\", which is not the value from the association data."),$config->get('liste_key'))." ". __("Automatic papers/students association will be re-run to update the association data.") ); $dialog->run; $dialog->destroy; clear_processing('assoc'); associe_auto(); } } } } assoc_state(); } sub voir_notes { $projet{'_scoring'}->begin_read_transaction('smMC'); my $c=$projet{'_scoring'}->marks_count; $projet{'_scoring'}->end_transaction('smMC'); if($c>0) { my $n=AMC::Gui::Notes::new (scoring=>$projet{'_scoring'}, layout=>$projet{'_layout'}, size_prefs=>($config->get('conserve_taille') ? $config : ''), ); } else { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'info','ok', sprintf(__"Papers are not yet corrected: use button \"%s\".", # TRANSLATORS: This is a button: "Mark" is here an action to be called by the user. When clicking this button, the user requests scores to be computed for all students. __"Mark")); $dialog->run; $dialog->destroy; } } # Get the number of copies used to build the working documents sub original_n_copies { my $n=$projet{'_layout'}->variable_transaction('build:ncopies'); if(defined($n) && $n ne '') { $n=0 if($n eq 'default'); } else { # Documents were built with an older AMC version: use value from GUI $n=$config->get('nombre_copies'); } return($n); } sub noter { if($config->get('maj_bareme')) { my $mode="b"; my $pdf_corrected=$config->get_absolute('doc_indiv_solution'); if(-f $pdf_corrected) { debug "Removing pre-existing $pdf_corrected"; unlink($pdf_corrected); } $mode.='k' if($config->get('prepare_indiv_solution')); commande('commande'=>["auto-multiple-choice","prepare", "--out-corrige-indiv",$pdf_corrected, "--n-copies",original_n_copies(), "--with",moteur_latex(), "--filter",$config->get('filter'), "--filtered-source",$config->get_absolute('filtered_source'), "--debug",debug_file(), "--progression-id",'bareme', "--progression",1, "--data",$config->get_absolute('data'), "--mode",$mode, $config->get_absolute('texsrc'), ], 'texte'=>__"Extracting marking scale...", 'fin'=>sub { my ($c,%data)=@_; check_sty_version($c); noter_postcorrect(); }, 'progres.id'=>'bareme'); } else { noter_calcul('',''); } } my $g_pcid; my %postcorrect_ids=(); my $postcorrect_copy_0; my $postcorrect_copy_1; my $postcorrect_student_min; my $postcorrect_student_max; sub noter_postcorrect { my ($c,%data)=@_; detecte_documents(); return if($data{cancelled}); # check marking scale data: in PostCorrect mode, ask for a sheet # number to get right answers from... if($projet{'_scoring'}->variable_transaction('postcorrect_flag')) { debug "PostCorrect option ON"; # gets available sheet ids %postcorrect_ids=(); $projet{'_capture'}->begin_read_transaction('PCex'); my $sth=$projet{'_capture'}->statement('studentCopies'); $sth->execute; while(my $sc=$sth->fetchrow_hashref) { $postcorrect_student_min=$sc->{'student'} if(!defined($postcorrect_student_min)); $postcorrect_ids{$sc->{'student'}}->{$sc->{'copy'}}=1; $postcorrect_student_max=$sc->{'student'}; } $projet{'_capture'}->end_transaction('PCex'); # ask user for a choice $g_pcid=read_glade('choix_postcorrect', qw/postcorrect_student postcorrect_copy postcorrect_set_multiple postcorrect_photo postcorrect_apply/); AMC::Gui::PageArea::add_feuille($w{'postcorrect_photo'}); debug "Student range: $postcorrect_student_min,$postcorrect_student_max\n"; $w{'postcorrect_student'}->set_range($postcorrect_student_min,$postcorrect_student_max); if($config->get('postcorrect_student')) { for (qw/student copy/) { $w{'postcorrect_'.$_} ->set_value($config->get('postcorrect_'.$_)); } } else { $w{'postcorrect_student'}->set_value($postcorrect_student_min); my @c=sort { $a <=> $b } (keys %{$postcorrect_ids{$postcorrect_student_min}}); $w{'postcorrect_copy'}->set_value($c[0]); } $w{postcorrect_set_multiple}->set_active($config->get("postcorrect_set_multiple")); $w{choix_postcorrect}->show(); } else { noter_calcul('',''); } } sub postcorrect_change_copy { my $student=$w{'postcorrect_student'}->get_value(); my $copy=$w{'postcorrect_copy'}->get_value(); $w{'postcorrect_apply'}->set_sensitive($postcorrect_ids{$student}->{$copy}); $projet{'_capture'}->begin_read_transaction('PCCN'); my ($f)=$projet{'_capture'}->zone_images($student,$copy,ZONE_NAME); $projet{'_capture'}->end_transaction('PCCN'); if(!defined($f)) { $f='' ; } else { $f=$config->get_absolute('cr')."/$f"; } debug "Postcorrect name field image: $f"; if(-f $f) { $w{'postcorrect_photo'}->set_content(image=>$f); } else { $w{'postcorrect_photo'}->set_content(); } } sub postcorrect_change { my $student=$w{'postcorrect_student'}->get_value(); my @c=sort { $a <=> $b } (keys %{$postcorrect_ids{$student}}); $postcorrect_copy_0=$c[0]; $postcorrect_copy_1=$c[$#c]; debug "Postcorrect copy range for student $student: $c[0],$c[$#c]\n"; $w{'postcorrect_copy'}->set_range($c[0],$c[$#c]); postcorrect_change_copy; } sub postcorrect_student_exists { my ($student)=@_; my @c=(); @c=(keys %{$postcorrect_ids{$student}}) if($postcorrect_ids{$student}); return($#c>=0 ? 1 : 0); } sub postcorrect_previous { my $student=$w{'postcorrect_student'}->get_value(); my $copy=$w{'postcorrect_copy'}->get_value(); $copy--; if($copy<$postcorrect_copy_0) { do { $student-- } while($student>=$postcorrect_student_min && !postcorrect_student_exists($student)); if($student>=$postcorrect_student_min) { $w{'postcorrect_student'}->set_value($student); $w{'postcorrect_copy'}->set_value(10000); } } else { $w{'postcorrect_copy'}->set_value($copy); } } sub postcorrect_next { my $student=$w{'postcorrect_student'}->get_value(); my $copy=$w{'postcorrect_copy'}->get_value(); $copy++; if($copy>$postcorrect_copy_1) { do { $student++ } while($student<=$postcorrect_student_max && !postcorrect_student_exists($student)); if($student<=$postcorrect_student_max) { $w{'postcorrect_student'}->set_value($student); $w{'postcorrect_copy'}->set_value(0); } } else { $w{'postcorrect_copy'}->set_value($copy); } } sub choix_postcorrect_cancel { $w{'choix_postcorrect'}->destroy(); } sub choix_postcorrect_ok { my $student=$w{'postcorrect_student'}->get_value(); my $copy=$w{'postcorrect_copy'}->get_value(); my $mult=$w{postcorrect_set_multiple}->get_active(); $w{'choix_postcorrect'}->destroy(); $config->set('postcorrect_student',$student); $config->set('postcorrect_copy',$copy); $config->set('postcorrect_set_multiple',$mult); noter_calcul($student,$copy,$mult); } sub noter_calcul { my ($postcorrect_student,$postcorrect_copy,$postcorrect_set_multiple)=@_; debug "Using sheet $postcorrect_student:$postcorrect_copy to get correct answers" if($postcorrect_student); # computes marks. commande('commande'=>["auto-multiple-choice","note", "--debug",debug_file(), "--data",$config->get_absolute('data'), "--seuil",$config->get('seuil'), "--seuil-up",$config->get('seuil_up'), "--grain",$config->get('note_grain'), "--arrondi",$config->get('note_arrondi'), "--notemax",$config->get('note_max'), ($config->get('note_max_plafond') ? "--plafond" : "--no-plafond"), "--notenull",$config->get('note_null'), "--notemin",$config->get('note_min'), "--postcorrect-student",$postcorrect_student, "--postcorrect-copy",$postcorrect_copy, ($postcorrect_set_multiple ? "--postcorrect-set-multiple" : "--no-postcorrect-set-multiple"), "--progression-id",'notation', "--progression",1, ], 'signal'=>2, 'texte'=>__"Computing marks...", 'progres.id'=>'notation', 'fin'=>sub { my ($c,%data)=@_; notify_end_of_work('grading', __"Grading has been completed") if(!$data{cancelled}); noter_resultat(); }, ); } sub noter_resultat { $projet{'_scoring'}->begin_read_transaction('MARK'); my $avg=$projet{'_scoring'}->average_mark; my $ok; my $text; if(defined($avg)) { $ok='info'; # TRANSLATORS: This is the marks mean for all students. $text=sprintf(__"Mean: %.2f",$avg); } else { $ok='error'; $text=__("No marks computed"); } set_state('marking',$ok,$text); my @codes=$projet{'_scoring'}->codes; my $pre_assoc=$projet{'_layout'}->pre_association(); $projet{'_scoring'}->end_transaction('MARK'); debug "Codes : ".join(',',@codes); # TRANSLATORS: you can omit the [...] part, just here to explain context my @cbs=(''=>__p("(none) [No code found in LaTeX file]")); if(my $el=get_enc($config->get('encodage_latex'))) { push @cbs,map { $_=>decode($el->{iso},$_) } (@codes); } else { push @cbs,map { $_=>$_ } (@codes); } if($pre_assoc) { push @cbs,'',__"Pre-association"; debug "Adding pre-association item"; } $prefs->store_register('assoc_code'=>cb_model(@cbs)); $prefs->transmet_pref($gui,prefix=>'pref_assoc', keys=>['project:assoc_code']); $w{'onglet_reports'}->set_sensitive(defined($avg)); } sub assoc_state { my $i='question'; my $t=''; if(! -s $config->get_absolute('listeetudiants')) { $t=__"No students list file"; } elsif(!$config->get('liste_key')) { $t=__"No primary key from students list file"; } else { $projet{'_association'}->begin_read_transaction('ARST'); my $mc=$projet{'_association'}->missing_count; $projet{'_association'}->end_transaction('ARST'); if($mc) { $t=sprintf((__"Missing identification for %d answer sheets"),$mc); } else { $t=__"All completed answer sheets are associated with a student name"; $i='info'; } } set_state('assoc',$i,$t); } sub opt_symbole { my ($s)=@_; my $k=$s; $k =~ s/-/_/g; my $type=$config->get('symbole_'.$k.'_type','none'); my $color=$config->get('symbole_'.$k.'_color','red'); return("$s:$type/$color"); } sub select_students { my ($id_file)=@_; # restore last setting my %ids=(); if (open(IDS,$id_file)) { while () { chomp; $ids{$_}=1 if(/^[0-9]+(:[0-9]+)?$/); } close(IDS); } # dialog to let the user choose... my $gstud=read_glade('choose_students', qw/choose_students_area students_instructions students_select_list students_list_search/); my $lk=$config->get('liste_key'); my $students_store=Gtk3::ListStore ->new('Glib::String','Glib::String','Glib::String', 'Glib::String','Glib::String', 'Glib::Boolean','Glib::Boolean'); my $filtered=Gtk3::TreeModelFilter->new($students_store); $filtered->set_visible_column(5); my $filtered_sorted=Gtk3::TreeModelSort->new_with_model($filtered); $filtered_sorted->set_sort_func(0,\&sort_num,0); $filtered_sorted->set_sort_func(1,\&sort_string,1); $w{'students_list_store'}=$students_store; $w{'students_list_filtered'}=$filtered; $w{'students_list_filtered_sorted'}=$filtered_sorted; $w{'students_select_list'}->set_model($filtered_sorted); my $renderer=Gtk3::CellRendererText->new; my $column = Gtk3::TreeViewColumn->new_with_attributes (__"exam ID", $renderer, text=> 0); $column->set_sort_column_id(0); $w{'students_select_list'}->append_column ($column); if($lk) { $column = Gtk3::TreeViewColumn->new_with_attributes ($lk, $renderer, text=> 4); $column->set_sort_column_id(4); $filtered_sorted->set_sort_func(4,\&sort_string,4); $w{'students_select_list'}->append_column ($column); } $column = Gtk3::TreeViewColumn->new_with_attributes (__"student", $renderer, text=> 1); $column->set_sort_column_id(1); $w{'students_select_list'}->append_column ($column); $projet{'_capture'}->begin_read_transaction('gSLi'); my $key=$projet{'_association'}->variable('key_in_list'); my @selected_iters=(); my $i=0; for my $sc ($projet{'_capture'}->student_copies) { my $id=$projet{'_association'}->get_real(@$sc); my ($name)=$projet{_students_list}->data($key,$id,test_numeric=>1); my $iter=$students_store->insert_with_values($i++, 0=>studentids_string(@$sc), 1=>$name->{'_ID_'}, 2=>$sc->[0],3=>$sc->[1], 5=>1, 4=>($lk ? $name->{$lk} : ''), ); push @selected_iters,$iter if($ids{studentids_string(@$sc)}); } $projet{'_capture'}->end_transaction('gSLi'); $w{'students_select_list'}->get_selection->set_mode(GTK_SELECTION_MULTIPLE); for (@selected_iters) { $w{'students_select_list'}->get_selection->select_iter ($filtered_sorted->convert_child_iter_to_iter ($filtered->convert_child_iter_to_iter($_))); } my $resp=$w{'choose_students'}->run; select_students_save_selected_state(); my @k=(); if($resp==1) { $students_store->foreach(sub { my ($model,$path,$iter,$user)=@_; push @k,[$students_store->get($iter,2,3)] if($students_store->get($iter,6)); return(0); }); } $w{'choose_students'}->destroy; if ($resp==1) { open(IDS,">$id_file"); for (@k) { print IDS studentids_string(@$_)."\n"; } close(IDS); } else { return(); } return(1); } sub select_students_save_selected_state { my $sel=$w{'students_select_list'}->get_selection; my $fs=$w{'students_list_filtered_sorted'}; my $f=$w{'students_list_filtered'}; my $s=$w{'students_list_store'}; my @states=(); $fs->foreach(sub { my ($model,$path,$iter,$user)=@_; push @states,[$f->convert_iter_to_child_iter ($fs->convert_iter_to_child_iter($iter)), $sel->iter_is_selected($iter)]; return(0); }); for my $row (@states) { $s->set($row->[0],6=>$row->[1]); } } sub select_students_recover_selected_state { my $sel=$w{'students_select_list'}->get_selection; my $f=$w{'students_list_filtered'}; my $fs=$w{'students_list_filtered_sorted'}; my $s=$w{'students_list_store'}; $fs->foreach(sub { my ($model,$path,$iter,$user)=@_; if($s->get($f->convert_iter_to_child_iter ($fs->convert_iter_to_child_iter($iter)),6)) { $sel->select_iter($iter); } else { $sel->unselect_iter($iter); } return(0); }); } sub select_students_search { select_students_save_selected_state(); my $pattern=$w{'students_list_search'}->get_text; my $s=$w{'students_list_store'}; $s->foreach(sub { my ($model,$path,$iter,$user)=@_; my ($id,$n,$nb)=$s->get($iter,0,1,4); $s->set($iter,5=> ((!$pattern) || $id =~ /$pattern/i || (defined($n) && $n =~ /$pattern/i) || (defined($nb) && $nb =~ /$pattern/i) ? 1 : 0)); return(0); }); select_students_recover_selected_state(); } sub select_students_all { $w{'students_list_search'}->set_text(''); } sub annote_copies { my $id_file=''; if($config->get('regroupement_copies') eq 'SELECTED') { # use a file in project directory to store students ids for which # sheets will be annotated $id_file=$shortcuts->absolu('%PROJET/selected-ids'); return() if(!select_students($id_file)); } my $single_output=''; if($config->get('regroupement_type') eq 'ALL') { $single_output=($id_file ? # TRANSLATORS: File name for single annotated answer sheets with only some selected students. Please use simple characters. (__("Selected_students")).".pdf" : # TRANSLATORS: File name for single annotated answer sheets with all students. Please use simple characters. (__("All_students")).".pdf" ); } commande('commande'=>["auto-multiple-choice","annotate", pack_args("--cr",$config->get_absolute('cr'), "--project",$shortcuts->absolu('%PROJET/'), "--projects",$shortcuts->absolu('%PROJETS/'), "--data",$config->get_absolute('data'), "--subject",$config->get_absolute('doc_question'), "--corrected",$config->get_absolute('doc_indiv_solution'), "--filename-model",$config->get('modele_regroupement'), ($config->get('ascii_filenames') ?"--force-ascii":"--no-force-ascii"), "--single-output",$single_output, "--sort",$config->get('export_sort'), "--id-file",$id_file, "--debug",debug_file(), "--progression-id",'annotate', "--progression",1, "--line-width",$config->get('symboles_trait'), "--font-name",$config->get('annote_font_name'), "--symbols",join(',',map { opt_symbole($_); } (qw/0-0 0-1 1-0 1-1/)), ($config->get('symboles_indicatives') ?"--indicatives":"--no-indicatives"), "--position",$config->get('annote_position'), "--dist-to-box",$config->get('annote_ecart'), "--n-digits",$config->get('annote_chsign'), "--verdict",$config->get('verdict'), "--verdict-question",$config->get('verdict_q'), "--verdict-question-cancelled",$config->get('verdict_qc'), "--names-file",$config->get_absolute('listeetudiants'), "--names-encoding",bon_encodage('liste'), "--csv-build-name",csv_build_name(), ($config->get('annote_rtl') ? "--rtl" : "--no-rtl"), "--changes-only",1, "--sort",$config->get('export_sort'), "--compose",$config->get('regroupement_compose'), "--n-copies",original_n_copies(), "--src",$config->get_absolute('texsrc'), "--with",moteur_latex(), "--filter",$config->get('filter'), "--filtered-source",$config->get_absolute('filtered_source'), "--embedded-max-size",$config->get('embedded_max_size'), "--embedded-format",$config->get('embedded_format'), "--embedded-jpeg-quality",$config->get('embedded_jpeg_quality'), ) ], 'texte'=>__"Annotating papers...", 'progres.id'=>'annotate', 'fin'=>sub { my ($c,%data); notify_end_of_work('annotation',__"Annotations have been completed") if(!$data{cancelled}); }, ); } sub annotate_papers { valide_options_notation(); maj_export(); annote_copies; } sub view_dir { my ($dir)=@_; debug "Look at $dir"; my $seq=0; my @c=map { $seq+=s/[%]d/$dir/g;utf8::downgrade($_);$_; } split(/\s+/,$config->get('dir_opener')); push @c,$dir if(!$seq); commande_parallele(@c); } sub open_exports_dir { view_dir($shortcuts->absolu('%PROJET/exports/')); } sub open_templates_dir { view_dir($config->get('rep_modeles')); } sub regarde_regroupements { view_dir($config->get_absolute('cr')."/corrections/pdf"); } sub plugins_browse { view_dir($config->subdir("plugins")); } ### sub activate_apropos { my $gap=read_glade('apropos'); $w{'apropos'}->run(); $w{'apropos'}->destroy(); } sub activate_doc { my ($w,$lang)=@_; if(!$lang) { my $n=$w->Gtk3::Buildable::get_name; if($n =~ /_([a-z]{2})$/) { $lang=$1; } } my $url='file://'.$hdocdir; $url.="auto-multiple-choice.$lang/index.html" if($lang && -f $hdocdir."auto-multiple-choice.$lang/index.html"); my $seq=0; my @c=map { $seq+=s/[%]u/$url/g;$_; } split(/\s+/,$config->get('html_browser')); push @c,$url if(!$seq); @c=map { encode($encodage_systeme,$_); } @c; commande_parallele(@c); } ### ### sub change_methode_impression { if($w{'pref_x_print_command_pdf'}) { my $m=''; my ($ok,$iter)=$w{'pref_c_methode_impression'}->get_active_iter; if($ok) { $m=$w{'pref_c_methode_impression'}->get_model->get($iter,COMBO_ID); } $w{'pref_x_print_command_pdf'}->set_sensitive($m eq 'commande'); } } sub edit_preferences { for my $k (@widgets_disabled_when_preferences_opened) { $w{$k}->set_sensitive(0); } my $gap=read_glade('edit_preferences', qw/pref_projet_tous pref_projet_annonce pref_x_print_command_pdf pref_c_methode_impression email_group_sendmail email_group_SMTP/); $w{'edit_preferences_manager'}=$gap; if($config->get('conserve_taille')) { AMC::Gui::WindowSize::size_monitor ($w{'edit_preferences'},{config=>$config, key=>'preferences_window_size'}); } # copy tooltip from note_* to defaut_note_* my $marking_prefs={min=>'x',max=>'x',null=>'x',grain=>'x',max_plafond=>'v',arrondi=>'c'}; for my $k (keys %$marking_prefs) { $gap->get_object("pref_".$marking_prefs->{$k}."_defaut_note_$k")->set_tooltip_text ($gap->get_object("pref_projet_".$marking_prefs->{$k}."_note_$k")->get_tooltip_text); } # tableau type/couleurs pour correction $prefs->widget_store_clear(store=>'prefwindow'); $prefs->transmet_pref($gap,store=>'prefwindow',prefix=>'pref',root=>'global:'); $prefs->transmet_pref($gap,store=>'prefwindow_project',prefix=>'pref_projet', root=>'project:') if($projet{'nom'}); # projet ouvert ? if($projet{'nom'}) { $w{'pref_projet_annonce'}->set_label(''.sprintf(__"Project \"%s\" preferences",$projet{'nom'}).'.'); } else { $w{'pref_projet_tous'}->set_sensitive(0); $w{'pref_projet_annonce'}->set_label(''.__("Project preferences").''); } # anavailable options, managed by the filter: if($config->get('filter')) { for my $k (("AMC::Filter::register::".$config->get('filter')) ->forced_options()) { TYPES: for my $t (qw/c cb ce col f s t v x/) { if(my $w=$gap->get_object("pref_projet_".$t."_".$k)) { $w->set_sensitive(0); last TYPES; } } } } change_methode_impression(); my $resp=$w{'edit_preferences'}->run(); if($resp) { accepte_preferences(); } else { closes_preferences(); } } sub closes_preferences { $w{'edit_preferences'}->destroy(); for my $k (@widgets_disabled_when_preferences_opened) { $w{$k}->set_sensitive(1); } } sub accepte_preferences { $prefs->reprend_pref(store=>'prefwindow',prefix=>'pref'); $prefs->reprend_pref(store=>'prefwindow_project',prefix=>'pref_projet') if($projet{'nom'}); my %pm; my %gm; my @dgm; my %labels; if ($projet{'nom'}) { %pm=map { $_=>1 } ($config->changed_keys('project')); %gm=map { $_=>1 } ($config->changed_keys('global')); @dgm=grep { /^defaut_/ } (keys %gm); for my $k (@dgm) { my $l=$w{'edit_preferences_manager'}->get_object('label_'.$k); $labels{$k}=$l->get_text() if($l); my $kp=$k; $kp =~ s/^defaut_//; $l=$w{'edit_preferences_manager'}->get_object('label_'.$kp); $labels{$kp}=$l->get_text() if($l); } } closes_preferences(); if ($projet{'nom'}) { # Check if annotations are still valid (same options) my $changed=0; for(qw/annote_chsign symboles_trait embedded_format embedded_max_size embedded_jpeg_quality symboles_indicatives annote_font_name annote_ecart/) { $changed=1 if($gm{$_}); } for my $tag (qw/0_0 0_1 1_0 1_1/) { $changed=1 if($gm{"symbole_".$tag."_type"} || $gm{"symbole_".$tag."_color"}); } for(qw/annote_position verdict verdict_q annote_rtl/) { $changed=1 if($pm{$_}); } if($changed) { annotate_source_change($projet{'_capture'},1); } # Look at modified default values... debug "Labels: ".join(',',keys %labels); for my $k (@dgm) { my $kp=$k; $kp =~ s/^defaut_//; debug "Test G:$k / P:$kp"; if ((!$pm{$kp}) && ($config->get($kp) ne $config->get($k))) { # project option has NOT been modified, and the new # value of general default option is different from # project option. Ask the user for modifying also the # project option value $label_projet=$labels{$kp}; $label_general=$labels{$k}; debug "Ask user $label_general | $label_projet"; if ($label_projet && $label_general) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'question','yes-no',''); $dialog->set_markup( sprintf(__("You modified \"%s\" value, which is the default value used when creating new projects. Do you want to change also \"%s\" for the opened %s project?"), $label_general,$label_projet,$projet{'nom'})); $dialog->get_widget_for_response('yes')->get_style_context()->add_class("suggested-action"); my $reponse=$dialog->run; $dialog->destroy; debug "Reponse: $reponse"; if ($reponse eq 'yes') { # change also project option value $config->set($kp,$config->get($k)); } } } } } if ($projet{'nom'}) { for my $k (qw/note_null note_min note_max note_grain/) { my $v=$config->get($k); $v =~ s/\s+//g; $config->set($k,$v); } } if($config->key_changed("projects_home") && !$projet{'nom'}) { set_projects_home($config->get_absolute('projects_home')); } $config->test_commands(); test_libnotify(); if($config->key_changed("seuil") || $config->key_changed("seuil_up")) { if ($projet{'_capture'}->n_pages_transaction()>0) { detecte_analyse(); } } $config->save(); } sub sauve_pref_generales { $config->save(); } sub annule_preferences { debug "Canceling preferences modification"; closes_preferences(); } sub file_maj { my (@f)=@_; my $present=1; my $oldest=0; for my $file (@f) { if($file && -f $file) { if(-r $file) { my @s=stat($file); $oldest=$s[9] if($s[9]>$oldest); } else { return('UNREADABLE'); } } else { return('NOTFOUND'); } } return(format_date($oldest)); } sub open_documents_popover { if($w{toggle_documents}->get_active()) { $w{documents_popover}->show_all(); } else { $w{documents_popover}->hide(); } return(1); } sub popover_hidden { $w{toggle_documents}->set_active(0) if($w{toggle_documents}); return(1); } sub check_document { my ($filename,$k)=@_; debug("Document $filename ".(-f $filename ? "exists" : "NOT FOUND")); $w{'but_'.$k}->set_sensitive(-f $filename); } sub set_state { my ($k,$type,$message)=@_; if(defined($type) && $w{'state_'.$k}) { if($type eq 'none') { $w{'state_'.$k}->hide(); } else { $w{'state_'.$k}->show(); $w{'state_'.$k}->set_message_type($type); } } $w{'state_'.$k.'_label'}->set_text($message) if(defined($message) && $w{'state_'.$k.'_label'}); } sub detecte_documents { check_document($config->get_absolute('doc_question'),'question'); check_document($config->get_absolute('doc_solution'),'solution'); check_document($config->get_absolute('doc_indiv_solution'),'indiv_solution'); check_document($config->get_absolute('doc_catalog'),'catalog'); my $s=file_maj(map { $config->get_absolute('doc_'.$_) } (qw/question setting/)); my $ok; if($s eq 'UNREADABLE') { $s=__("Working documents are not readable"); $ok='error'; } elsif($s eq 'NOTFOUND') { $s=__("No working documents"); $ok='warning'; } else { $s=__("Working documents last update:")." ".$s; $ok='info'; } if($ok eq 'info') { $w{toggle_documents}->show(); } else { $w{toggle_documents}->set_active(0); $w{toggle_documents}->hide(); } set_state('docs',$ok,$s); } sub show_document { my ($sel)=@_; my $f=$config->get_absolute('doc_'.$sel); debug "Looking at $f..."; commande_parallele($config->get('pdf_viewer'),$f); } sub show_question { show_document('question'); } sub show_solution { show_document('solution'); } sub show_indiv_solution { show_document('indiv_solution'); } sub show_catalog { show_document('catalog'); } sub update_catalog { update_document("C",partial=>1); } sub update_solution { update_document("S",partial=>1); } sub update_indiv_solution { update_document("k",partial=>1); } sub detecte_mep { $projet{'_layout'}->begin_read_transaction('LAYO'); $projet{'_mep_defauts'}={$projet{'_layout'}->defects()}; my $c=$projet{'_layout'}->pages_count; $projet{'_layout'}->end_transaction('LAYO'); my @def=(keys %{$projet{'_mep_defauts'}}); if(@def) { $w{'button_mep_warnings'}->show(); } else { $w{'button_mep_warnings'}->hide(); } $w{'onglet_saisie'}->set_sensitive($c>0); my $s; my $ok; if($c<1) { $s=__("No layout"); $ok='error'; } else { $s=sprintf(__("Processed %d pages"), $c); if(@def) { $s.=", ".__("but some defects were detected."); $ok=defects_class(@def); } else { $s.='.'; $ok='info'; } } set_state('layout',$ok,$s); } my %defect_text= ( 'NO_NAME'=>__("The \\namefield command is not used. Writing subjects without name field is not recommended"), 'SEVERAL_NAMES'=>__("The \\namefield command is used several times for the same subject. This should not be the case, as each student should write his name only once"), 'NO_BOX'=>__("No box to be ticked"), 'DIFFERENT_POSITIONS'=>__("The corner marks and binary boxes are not at the same location on all pages"), 'OUT_OF_PAGE'=>__("Some material has been placed out of the page. This is often a result of a multiple columns question group starting too close from the page bottom. In such a case, use \"needspace\"."), ); sub defects_class { my (@defects)=@_; my $w=0; my $e=0; for my $k (@defects) { if($k eq 'NO_NAME') { $w++; } else { $e++; } } return($e ? 'error' : $w ? 'question' : 'info'); } sub mep_warnings { my $m=''; my @def=(keys %{$projet{'_mep_defauts'}}); if(@def) { $m=__("Some potential defects were detected for this subject. Correct them in the source and update the working documents."); for my $k (keys %defect_text) { my $dd=$projet{'_mep_defauts'}->{$k}; if($dd) { if($k eq 'DIFFERENT_POSITIONS') { $m.="\n".$defect_text{$k}." ". sprintf(__('(See for example pages %s and %s)'), pageids_string($dd->{'student_a'},$dd->{'page_a'}), pageids_string($dd->{'student_b'},$dd->{'page_b'})).'.'; } elsif($k eq 'OUT_OF_PAGE') { $m.="\n".$defect_text{$k}." ". sprintf(__('(Concerns %1$d pages, see for example page %2$s)'), 1+$#{$dd}, pageids_string($dd->[0]->{'student'},$dd->[0]->{'page'})).'.'; } else { my @e=sort { $a <=> $b } (@{$dd}); if(@e) { $m.="\n".$defect_text{$k}." ". sprintf(__('(Concerns %1$d exams, see for example sheet %2$d)'),1+$#e,$e[0]).'.'; } } } } } else { # should not be possible to go there... return(); } my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'warning','ok',''); $dialog->set_markup($m); $dialog->run; $dialog->destroy; } sub clear_processing { my ($steps)=@_; my $next=''; my %s=(); for my $k (qw/doc mep capture mark assoc/) { if($steps =~ /\b$k:/) { $next=1; $s{$k}=1; } elsif($next || $steps =~ /\b$k\b/) { $s{$k}=1; } } if($s{'doc'}) { for (qw/question solution setting catalog/) { my $f=$config->get_absolute('doc_'.$_); unlink($f) if(-f $f); } detecte_documents(); } delete($s{'doc'}); return() if(!%s); # data to remove... $projet{'_data'}->begin_transaction('CLPR'); if($s{'mep'}) { $projet{_layout}->clear_all; } if($s{'capture'}) { $projet{_capture}->clear_all; } if($s{'mark'}) { $projet{'_scoring'}->clear_strategy; $projet{'_scoring'}->clear_score; } if($s{'assoc'}) { $projet{_association}->clear; } $projet{'_data'}->end_transaction('CLPR'); # files to remove... if($s{'capture'}) { # remove zooms remove_tree($shortcuts->absolu('%PROJET/cr/zooms'), {'verbose'=>0,'safe'=>1,'keep_root'=>1}); # remove namefield extractions and page layout image my $crdir=$shortcuts->absolu('%PROJET/cr'); opendir(my $dh,$crdir); my @cap_files=grep { /^(name-|page-)/ } readdir($dh); closedir($dh); for(@cap_files) { unlink "$crdir/$_"; } } # update gui... if($s{'mep'}) { detecte_mep(); } if($s{'capture'}) { detecte_analyse(); } if($s{'mark'}) { noter_resultat(); } if($s{'assoc'}) { assoc_state(); } } sub update_analysis_summary { my $n=$projet{'_capture'}->n_pages; my %r=$projet{'_capture'}->counts; $r{'npages'}=$n; my $failed_nb=$projet{'_capture'} ->sql_single($projet{'_capture'}->statement('failedNb')); my $ow=$projet{'_capture'}->n_overwritten ||0; $w{'onglet_notation'}->set_sensitive($n>0); # resume my $tt=''; my $ok='info'; if ($r{'incomplete'}) { $tt=sprintf(__"Data capture from %d complete papers and %d incomplete papers",$r{'complete'},$r{'incomplete'}); $ok='error'; $w{'button_show_missing'}->show(); } elsif ($r{'complete'}) { $tt=sprintf(__("Data capture from %d complete papers"),$r{'complete'}); $ok='info'; $w{'button_show_missing'}->hide(); } else { # TRANSLATORS: this text points out that no data capture has been made yet. $tt=sprintf(__"No data"); $ok='error'; $w{'button_show_missing'}->hide(); } set_state('capture',$ok,$tt); if($ow>0) { set_state('overwritten','warning',sprintf(__"Overwritten pages: %d",$ow)); $w{state_overwritten}->show(); } else { $w{state_overwritten}->hide(); } if ($failed_nb<=0) { if($r{'complete'}) { $tt=__"All scans were properly recognized."; $ok='none'; } else { $tt=""; $ok='none'; } } else { $tt=sprintf(__"%d scans were not recognized.",$failed_nb); $ok='question'; } set_state('unrecognized',$ok,$tt); return(\%r); } sub overwritten_clear { $projet{'_capture'}->begin_transaction('OWcl'); $projet{'_capture'}->clear_overwritten(); update_analysis_summary(); $projet{'_capture'}->end_transaction('OWcl'); } sub overwritten_look { my $go=read_glade('overwritten', qw/overwritten_dialog overwritten_list/); my $olist=Gtk3::ListStore->new ('Glib::String','Glib::String','Glib::String'); $w{overwritten_list}->set_model($olist); $w{overwritten_list}->append_column (Gtk3::TreeViewColumn->new_with_attributes # TRANSLATORS: column title for the list of overwritten pages. This refers to the page from the question (__"Page",Gtk3::CellRendererText->new, text=> 0)); $w{overwritten_list}->append_column (Gtk3::TreeViewColumn->new_with_attributes # TRANSLATORS: column title for the list of overwritten pages. This refers to the number of times the page has been overwritten. (__"count",Gtk3::CellRendererText->new, text=> 1)); $w{overwritten_list}->append_column (Gtk3::TreeViewColumn->new_with_attributes # TRANSLATORS: column title for the list of overwritten pages. This refers to the date of the last data capture for the page. (__"Date",Gtk3::CellRendererText->new, text=> 2)); for my $o (@{$projet{_capture}->overwritten_pages_transaction()}) { $olist->set($olist->append, 0,pageids_string($o->{student},$o->{page},$o->{copy}), 1,$o->{overwritten}, 2,format_date($o->{timestamp_auto}), ); } $w{overwritten_list}->get_selection->set_mode(GTK_SELECTION_NONE); $w{overwritten_dialog}->run; $w{overwritten_dialog}->destroy; } sub detecte_analyse { my (%oo)=(@_); my $iter; my $row; new_diagstore(); $w{'commande'}->show(); my $av_text=$w{'avancement'}->get_text(); my $frac; my $total; my $i; $projet{'_capture'}->begin_read_transaction('ADCP'); my $summary=$projet{'_capture'} ->summaries('darkness_threshold'=>$config->get('seuil'), 'darkness_threshold_up'=>$config->get('seuil_up'), 'sensitivity_threshold'=>$config->get('seuil_sens'), 'mse_threshold'=>$config->get('seuil_eqm')); $total=$#{$summary}+1; $i=0; $frac=0; if($total>0) { $w{'avancement'}->set_text(__"Looking for analysis..."); Gtk3::main_iteration while ( Gtk3::events_pending ); } for my $p (@$summary) { $diag_store->insert_with_values ($i, DIAG_ID,pageids_string($p->{'student'},$p->{'page'},$p->{'copy'}), DIAG_ID_STUDENT,$p->{'student'}, DIAG_ID_PAGE,$p->{'page'}, DIAG_ID_COPY,$p->{'copy'}, DIAG_ID_BACK,$p->{'color'}, DIAG_EQM,$p->{'mse_string'}, DIAG_EQM_BACK,$p->{'mse_color'}, DIAG_MAJ,format_date($p->{'timestamp'}), DIAG_MAJ_NUM,$p->{'timestamp'}, DIAG_DELTA,$p->{'sensitivity_string'}, DIAG_DELTA_BACK,$p->{'sensitivity_color'}, DIAG_SCAN_FILE,path_to_filename($p->{'src'}), ); if($i/$total>=$frac+.05) { $frac=$i/$total; $w{'avancement'}->set_fraction($frac); Gtk3::main_iteration while ( Gtk3::events_pending ); } } sort_diagstore(); show_diagstore(); $w{'avancement'}->set_text($av_text); $w{'avancement'}->set_fraction(0) if(!$oo{'interne'}); $w{'commande'}->hide() if(!$oo{'interne'}); Gtk3::main_iteration while ( Gtk3::events_pending ); my $r=update_analysis_summary(); $projet{'_capture'}->end_transaction('ADCP'); # dialogue apprentissage : if($oo{'apprend'}) { dialogue_apprentissage('SAISIE_AUTO','','',0, __("Automatic data capture now completed.")." " .($r->{'incomplete'}>0 ? sprintf(__("It is not complete (missing pages from %d papers).")." ",$r->{'incomplete'}) : '') .__("You can analyse data capture quality with some indicators values in analysis list:") ."\n" .sprintf(__"- %s represents positioning gap for the four corner marks. Great value means abnormal page distortion.",__"MSE") ."\n" .sprintf(__"- great values of %s are seen when darkness ratio is very close to the threshold for some boxes.",__"sensitivity") ."\n" .sprintf(__"You can also look at the scan adjustment (%s) and ticked and unticked boxes (%s) using right-click on lines from table %s.",__"page adjustment",__"boxes zooms",__"Diagnosis") ); } } sub show_missing_pages { $projet{'_capture'}->begin_read_transaction('cSMP'); my %r=$projet{'_capture'}->counts; $projet{'_capture'}->end_transaction('cSMP'); my $l=''; my @sc=(); for my $p (@{$r{'missing'}}) { if($sc[0] != $p->{'student'} || $sc[1] != $p->{'copy'}) { @sc=($p->{'student'},$p->{'copy'}); $l.="\n"; } $l.=" ".pageids_string($p->{'student'}, $p->{'page'},$p->{'copy'}); } my $dialog = Gtk3::MessageDialog ->new ($w{'main_window'}, 'destroy-with-parent', 'info','ok',''); $dialog->set_markup( "".(__"Pages that miss data capture to complete students sheets:")."" .$l ); $dialog->run; $dialog->destroy; } sub update_unrecognized { $projet{'_capture'}->begin_read_transaction('UNRC'); my $failed=$projet{'_capture'}->dbh ->selectall_arrayref($projet{'_capture'}->statement('failedList'), {Slice => {}}); $projet{'_capture'}->end_transaction('UNRC'); $inconnu_store->clear; for my $ff (@$failed) { my $iter=$inconnu_store->append; my $f=$ff->{'filename'}; $f =~ s:.*/::; my (undef,undef,$scan_n)=splitpath($shortcuts->absolu($ff->{'filename'})); my $preproc_file=$shortcuts->absolu('%PROJET/cr/diagnostic')."/".$scan_n.".png"; $inconnu_store->set($iter, INCONNU_SCAN,$f, INCONNU_FILE,$ff->{'filename'}, INCONNU_TIME,format_date($ff->{'timestamp'}), INCONNU_TIME_N,$ff->{'timestamp'}, INCONNU_PREPROC,$preproc_file, ); } } sub open_unrecognized { my $dialog=read_glade('unrecognized', qw/inconnu_tree scan_area preprocessed_area inconnu_hpaned inconnu_vpaned state_scanrecog state_scanrecog_label unrecog_process_button unrecog_delete_button unrecog_next_button unrecog_previous_button ur_frame_scan/); for (qw/scan preprocessed/) { AMC::Gui::PageArea::add_feuille($w{$_.'_area'}); } $w{'inconnu_tree'}->set_model($inconnu_store); $renderer=Gtk3::CellRendererText->new; $column = Gtk3::TreeViewColumn->new_with_attributes ("scan", $renderer, text=> INCONNU_SCAN); $w{'inconnu_tree'}->append_column ($column); $column->set_sort_column_id(INCONNU_SCAN); $renderer=Gtk3::CellRendererText->new; $column = Gtk3::TreeViewColumn->new_with_attributes ("date", $renderer, text=> INCONNU_TIME); $w{'inconnu_tree'}->append_column ($column); $column->set_sort_column_id(INCONNU_TIME_N); update_unrecognized(); $w{'inconnu_tree'}->get_selection->set_mode(GTK_SELECTION_MULTIPLE); $w{'inconnu_tree'}->get_selection->signal_connect("changed",\&unrecognized_line); $w{'inconnu_tree'}->get_selection->select_iter($inconnu_store->get_iter_first); $w{unrecognized}->show(); } sub unrecognized_actions { my ($available)=@_; my %actions=(delete=>$available>0, process=>$available==1, next=>$available>=0, previous=>$available>=0, ); for my $k (keys %actions) { if($actions{$k} > 0) { $w{'unrecog_'.$k.'_button'}->show; } else { $w{'unrecog_'.$k.'_button'}->hide; } } } sub unrecognized_line { if($inconnu_store->get_iter_first) { my @sel=$w{'inconnu_tree'}->get_selection->get_selected_rows; my $first_selected=$sel[0]->[0]; my $iter=''; if(defined($first_selected)) { $iter=$inconnu_store->get_iter($first_selected); } if($iter) { $w{'inconnu_tree'}->scroll_to_cell($first_selected,undef,0,0,0); my $scan=$shortcuts->absolu($inconnu_store->get($iter,INCONNU_FILE)); if(-f $scan) { $w{'scan_area'}->set_content(image=>$scan); } else { debug_and_stderr "Scan not found: $scan"; $w{'scan_area'}->set_content(); } my $preproc=$inconnu_store->get($iter,INCONNU_PREPROC); utf8::downgrade($preproc); if(-f $preproc) { $w{'preprocessed_area'}->set_content(image=>$preproc); } else { $w{'preprocessed_area'}->set_content(); } if($w{'scan_area'}->get_image) { my $scan_n=$scan; $scan_n =~ s:^.*/::; set_state('scanrecog','question',$scan_n); } else { set_state('scanrecog','error', sprintf((__"Error loading scan %s"),$scan)); } unrecognized_actions(-f $preproc ? 2 : 1); } else { $w{'scan_area'}->set_content(); $w{'preprocessed_area'}->set_content(); set_state('scanrecog','question',__"No scan selected"); unrecognized_actions(0); } } else { # empty list set_state('scanrecog','info',__"No more unrecognized scans"); $w{'scan_area'}->set_content(); $w{'preprocessed_area'}->set_content(); unrecognized_actions(-1); } } sub unrecognized_next { my ($widget,@sel)=@_; @sel=() if(!defined($sel[0])); if(!@sel) { @sel=$w{'inconnu_tree'}->get_selection->get_selected_rows; if($sel[0]) { @sel=@{$sel[0]}; } else { @sel=(); } } my $iter; my $ok=0; if(@sel && defined($sel[$#sel])) { $iter=$inconnu_store->get_iter($sel[$#sel]); $ok=$inconnu_store->iter_next($iter); } $iter=$inconnu_store->get_iter_first if(!$ok); $w{'inconnu_tree'}->get_selection->unselect_all; $w{'inconnu_tree'}->get_selection->select_iter($iter) if($iter); } sub unrecognized_prev { my @sel=$w{'inconnu_tree'}->get_selection->get_selected_rows; my $first_selected=$sel[0]->[0]; my $iter; if(defined($first_selected)) { my $p=$inconnu_store->get_path($inconnu_store->get_iter($first_selected)); if($p->prev) { $iter=$inconnu_store->get_iter($p); } else { $iter=''; } } $iter=$inconnu_store->get_iter_first if(!$iter); $w{'inconnu_tree'}->get_selection->unselect_all; $w{'inconnu_tree'}->get_selection->select_iter($iter) if($iter); } sub unrecognized_delete { my @iters; my @sel=($w{'inconnu_tree'}->get_selection->get_selected_rows); @sel=@{$sel[0]}; return if(!@sel); $projet{'_capture'}->begin_transaction('rmUN'); for my $s (@sel) { my $iter=$inconnu_store->get_iter($s); my $file=$inconnu_store->get($iter,INCONNU_FILE); $projet{'_capture'}->statement('deleteFailed')->execute($file); unlink $shortcuts->absolu($file); push @iters,$iter; } unrecognized_next('',@sel); for(@iters) { $inconnu_store->remove($_); } update_analysis_summary(); $projet{'_capture'}->end_transaction('rmUN'); } sub analyse_diagnostic { my @sel=$w{'inconnu_tree'}->get_selection->get_selected_rows; my $first_selected=$sel[0]->[0]; if(defined($first_selected)) { my $iter=$inconnu_store->get_iter($first_selected); my $scan=$shortcuts->absolu($inconnu_store->get($iter,INCONNU_FILE)); my $diagnostic_file=$inconnu_store->get($iter,INCONNU_PREPROC); if(!-f $diagnostic_file) { analyse_call('f'=>[$scan], 'text'=>__("Making diagnostic image..."), 'progres'=>'diagnostic', 'diagnostic'=>1, 'fin'=>sub { unrecognized_line(); }, ); } } } sub set_source_tex { my ($importe)=@_; importe_source() if($importe); valide_source_tex(); } sub valide_source_tex { debug "* valide_source_tex"; $w{button_edit_src}->set_tooltip_text(glib_filename($config->get_absolute('texsrc'))); if(!$config->get('filter')) { $config->set('filter', best_filter_for_file($config->get_absolute('texsrc'))); } detecte_documents(); } my $modeles_store; sub charge_modeles { my ($store,$parent,$rep)=@_; return if(! -d $rep); my @all; my @ms; my @subdirs; if(opendir(DIR,$rep)) { @all=readdir(DIR); @ms=grep { /\.tgz$/ && -f $rep."/$_" } @all; @subdirs=grep { -d $rep."/$_" && ! /^\./ } @all; closedir DIR; } else { debug("MODELS : Can't open directory $rep : $!"); } for my $sd (sort { $a cmp $b } @subdirs) { my $nom=$sd; my $desc_text=''; my $child = $store->append($parent); if(-f $rep."/$sd/directory.xml") { my $d=XMLin($rep."/$sd/directory.xml"); $nom=$d->{'title'} if($d->{'title'}); $desc_text=$d->{'text'} if($d->{'text'}); } $store->set($child,MODEL_NOM,$nom, MODEL_PATH,'', MODEL_DESC,$desc_text); charge_modeles($store,$child,$rep."/$sd"); } for my $m (sort { $a cmp $b } @ms) { my $nom=$m; $nom =~ s/\.tgz$//i; my $desc_text=__"(no description)"; my $tar=Archive::Tar->new(); if($tar->read($rep."/$m")) { my @desc=grep { /description.xml$/ } ($tar->list_files()); if($desc[0]) { my $d=XMLin($tar->get_content($desc[0]),'SuppressEmpty'=>''); $nom=$d->{'title'} if($d->{'title'}); $desc_text=$d->{'text'} if($d->{'text'}); } debug "Adding model $m"; debug "NAME=$nom DESC=$desc_text"; $store->set($store->append($parent), MODEL_NOM,$nom, MODEL_PATH,$rep."/$m", MODEL_DESC,$desc_text); } else { debug_and_stderr "WARNING: Could not read archive file \"$rep/$m\" ..."; } } } sub modele_dispo { my $iter=$w{'modeles_liste'}->get_selection()->get_selected(); if($iter) { $w{'model_choice_button'}->set_sensitive($modeles_store->get($iter,MODEL_PATH) ? 1 : 0); } else { debug "No iter for models selection"; } } sub path_from_tree { my ($store,$view,$f)=@_; my $i=undef; return(undef) if(!$f); my $d=''; for my $pp (split(m:/:,$f)) { my $ipar=$i; $d.='/' if($d); $d.=$pp; $i=model_id_to_iter($store,TEMPLATE_FILES_PATH,$d); if(!$i) { $i=$store->append($ipar); $store->set($i,TEMPLATE_FILES_PATH,$d, TEMPLATE_FILES_FILE,$pp); } } $view->expand_to_path($store->get_path($i)); return($i); } sub template_add_file { my ($store,$view,$f)=@_; # removes local part my $p_dir=$shortcuts->absolu('%PROJET/'); if($f =~ s:^\Q$p_dir\E::) { my $i=path_from_tree($store,$view,$f); return($i); } else { debug "Trying to add non local file: $f (local dir is $p_dir)"; return(undef); } } sub make_template { if(!$projet{'nom'}) { debug "Make template: no opened project"; return(); } my $gt=read_glade('make_template', qw/template_files_tree template_name template_file_name template_description template_file_name_warning mt_ok template_description_scroll template_files_scroll/); $template_files_store->clear; $w{'template_files_tree'}->set_model($template_files_store); my $renderer=Gtk3::CellRendererText->new; # TRANSLATORS: This is a column title for the list of files to be included in a template being created. my $column = Gtk3::TreeViewColumn->new_with_attributes(__"file", $renderer, text=> TEMPLATE_FILES_FILE ); $w{'template_files_tree'}->append_column ($column); $w{'template_files_tree'}->get_selection->set_mode("multiple"); # Detects files to include template_add_file($template_files_store,$w{'template_files_tree'}, $config->get_absolute('texsrc')); template_add_file($template_files_store,$w{'template_files_tree'}, fich_options($projet{'nom'})); for (qw/description files/) { $w{'template_'.$_.'_scroll'}->set_policy('automatic','automatic'); } # Waits for action $resp=$w{'make_template'}->run(); if($resp eq "1") { projet_check_and_save(); # Creates template my $tfile=$config->get('rep_modeles').'/'.$w{'template_file_name'}->get_text().".tgz"; my $tar=Archive::Tar->new(); $template_files_store->foreach(\&add_to_archive,[$tar]); # Description my $buf=$w{'template_description'}->get_buffer; my $desc=''; my $writer=new XML::Writer(OUTPUT=>\$desc,ENCODING=>'utf-8'); $writer->xmlDecl("UTF-8"); $writer->startTag('description'); $writer->dataElement('title',$w{'template_name'}->get_text()); $writer->dataElement('text',$buf->get_text($buf->get_start_iter,$buf->get_end_iter,1)); $writer->endTag('description'); $writer->end(); $tar->add_data('description.xml',encode_utf8($desc)); $tar->write($tfile,COMPRESS_GZIP); } $w{'make_template'}->destroy; } sub add_to_archive { my ($store,$path,$iter,$data)=@_; my ($tar)=@$data; my $f=$store->get($iter,TEMPLATE_FILES_PATH); my $af=$shortcuts->absolu("%PROJET/$f"); return(0) if($f eq 'description.xml'); if(-f $af) { debug "Adding to template archive: $f\n"; my $tf=Archive::Tar::File->new( file => $af); $tf->rename($f); $tar->add_files($tf); } return(0); } sub template_filename_verif { restricted_check($w{'template_file_name'}, $w{'template_file_name_warning'},"a-zA-Z0-9_+-"); my $t=$w{'template_file_name'}->get_text(); my $tfile=$config->get('rep_modeles').'/'.$t.".tgz"; $w{'mt_ok'}->set_sensitive($t && !-e $tfile); } sub make_template_add { my $fs=Gtk3::FileSelection->new(__"Add files to template"); $fs->set_filename($shortcuts->absolu('%PROJET/')); $fs->set_select_multiple(1); $fs->hide_fileop_buttons; my $err=0; my $resp=$fs->run(); if($resp eq 'ok') { for my $f ($fs->get_selections()) { $err++ if(!defined(template_add_file($template_files_store,$w{'template_files_tree'},$f))); } } $fs->destroy(); if($err) { my $dialog=Gtk3::MessageDialog ->new($w{'make_template'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( __("When making a template, you can only add files that are within the project directory.")); $dialog->run(); $dialog->destroy(); } } sub make_template_del { my @i=(); my @selected=$w{'template_files_tree'}->get_selection->get_selected_rows; for my $path (@{$selected[0]}) { push @i,$template_files_store->get_iter($path) if($path); } for(@i) { $template_files_store->remove($_); } } sub n_fich { my ($dir)=@_; if(opendir(NFICH,$dir)) { my @f=grep { ! /^(\.|__MACOSX)/ } readdir(NFICH); closedir(NFICH); return(1+$#f,"$dir/$f[0]"); } else { debug("N_FICH : Can't open directory $dir : $!"); return(0); } } sub unzip_to_temp { my ($file)=@_; my $temp_dir = tempdir( DIR=>tmpdir(),CLEANUP => 1 ); my $error=0; my @cmd; if($file =~ /\.zip$/i) { @cmd=("unzip","-d",$temp_dir,$file); } else { @cmd=("tar","-x","-v","-z","-f",$file,"-C",$temp_dir); } debug "Extracting archive files\nFROM: $file\nWITH: ".join(' ',@cmd); if(open(UNZIP,"-|",@cmd) ) { while() { debug $_; } close(UNZIP); } else { $error=$!; } return($temp_dir,$error); } sub source_latex_choisir { my %oo=@_; my $texsrc=''; if(!$oo{'nom'}) { debug "ERR: Empty name for source_latex_choisir"; return(0,''); } if(-e $config->get('rep_projets')."/".$oo{'nom'}) { debug "ERR: existing project directory $oo{'nom'} for source_latex_choisir"; return(0,''); } my %bouton=(); if($oo{'type'}) { $bouton{$oo{'type'}}=1; } else { # fenetre de choix du source latex my $gap=read_glade('source_latex_dialog'); my $dialog=$gap->get_object('source_latex_dialog'); my $reponse=$dialog->run(); for(qw/new choix vide zip/) { $bouton{$_}=$gap->get_object('sl_type_'.$_)->get_active(); debug "Bouton $_" if($bouton{$_}); } $dialog->destroy(); debug "RESPONSE=$reponse"; return(0,'') if($reponse!=10); } # actions apres avoir choisi le type de source latex a utiliser if($bouton{'new'}) { # choix d'un modele $gap=read_glade('source_latex_modele', qw/modeles_liste modeles_description model_choice_button mlist_separation/); $reponse=$w{'source_latex_modele'}->show(); $modeles_store = Gtk3::TreeStore->new('Glib::String', 'Glib::String', 'Glib::String'); charge_modeles($modeles_store,undef,$config->get('rep_modeles')) if($config->get('rep_modeles')); charge_modeles($modeles_store,undef,amc_specdir('models')); $w{'modeles_liste'}->set_model($modeles_store); my $renderer=Gtk3::CellRendererText->new; # TRANSLATORS: This is a column name for the list of available templates, when creating a new project based on a template. my $column = Gtk3::TreeViewColumn->new_with_attributes(__"template", $renderer, text=> MODEL_NOM ); $w{'modeles_liste'}->append_column ($column); $w{'modeles_liste'}->get_selection->signal_connect("changed",\&source_latex_mmaj); $w{'mlist_separation'}->set_position(.5*$w{'mlist_separation'}->get_property('max-position')); $reponse=$w{'source_latex_modele'}->run(); debug "Dialog modele : $reponse"; # le modele est choisi : l'installer my $mod; if($reponse) { my $iter=$w{'modeles_liste'}->get_selection()->get_selected(); $mod=$modeles_store->get($iter,MODEL_PATH) if($iter); } $w{'source_latex_modele'}->destroy(); return(0,'') if($reponse!=10); if($mod) { debug "Installing model $mod"; return(source_latex_choisir('type'=>'zip','fich'=>$mod, 'decode'=>1,'nom'=>$oo{'nom'})); } else { debug "No model"; return(0,''); } } elsif($bouton{'choix'}) { # choisir un fichier deja present $gap=read_glade('source_latex_choix'); $w{'source_latex_choix'}->set_current_folder($home_dir); # default filter: all possible source files my $filtre_all=Gtk3::FileFilter->new(); $filtre_all->set_name(__"All source files"); for my $m (@filter_modules) { for my $p ("AMC::Filter::register::$m"->file_patterns) { $filtre_all->add_pattern($p); } } $w{'source_latex_choix'}->add_filter($filtre_all); # filters for each filter module for my $m (@filter_modules) { my $f=Gtk3::FileFilter->new(); # TRANSLATORS: This is the label of a choice in a menu to select only files that corresponds to a particular format (which can be LaTeX or Plain for example). %s will be replaced by the name of the format. my @pat=(); for my $p ("AMC::Filter::register::$m"->file_patterns) { push @pat,$p; $f->add_pattern($p); } $f->set_name(sprintf(__("%s files"), "AMC::Filter::register::$m"->name()) .' ('.join(', ',@pat).')'); $w{'source_latex_choix'}->add_filter($f); } # $reponse=$w{'source_latex_choix'}->run(); my $f=$w{'source_latex_choix'}->get_filename(); $w{'source_latex_choix'}->destroy(); return(0,'') if($reponse!=10); $texsrc=$shortcuts->relatif($f,$oo{'nom'}); debug "Source LaTeX $f"; } elsif($bouton{'zip'}) { my $fich; if($oo{'fich'}) { $fich=$oo{'fich'}; } else { # choisir un fichier ZIP $gap=read_glade('source_latex_choix_zip'); $w{'source_latex_choix_zip'}->set_current_folder($home_dir); my $filtre_zip=Gtk3::FileFilter->new(); $filtre_zip->set_name(__"Archive (zip, tgz)"); $filtre_zip->add_pattern("*.zip"); $filtre_zip->add_pattern("*.tar.gz"); $filtre_zip->add_pattern("*.tgz"); $filtre_zip->add_pattern("*.TGZ"); $filtre_zip->add_pattern("*.ZIP"); $w{'source_latex_choix_zip'}->add_filter($filtre_zip); $reponse=$w{'source_latex_choix_zip'}->run(); $fich=$w{'source_latex_choix_zip'}->get_filename(); $w{'source_latex_choix_zip'}->destroy(); return(0,'') if($reponse!=10); } # cree un repertoire temporaire pour dezipper my ($temp_dir,$rv)=unzip_to_temp($fich); my ($n,$suivant)=n_fich($temp_dir); if($rv || $n==0) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( sprintf(__"Nothing extracted from archive %s. Check it.",$fich)); $dialog->run; $dialog->destroy; return(0,''); } else { # unzip OK # vire les repertoires intermediaires : while($n==1 && -d $suivant) { debug "Changing root directory : $suivant"; $temp_dir=$suivant; ($n,$suivant)=n_fich($temp_dir); } # bouge les fichiers la ou il faut my $hd=$config->get('rep_projets')."/".$oo{'nom'}; mkdir($hd) if(! -e $hd); my @archive_files; if(opendir(MVR,$temp_dir)) { @archive_files=grep { ! /^\./ } readdir(MVR); closedir(MVR); } else { debug("ARCHIVE : Can't open $temp_dir : $!"); } my $latex; for my $ff (@archive_files) { debug "Moving to project: $ff"; if($ff =~ /\.tex$/i) { $latex=$ff; if($oo{'decode'}) { debug "Decoding $ff..."; move("$temp_dir/$ff","$temp_dir/$ff.0enc"); copy_latex("$temp_dir/$ff.0enc","$temp_dir/$ff"); } } if(system("mv","$temp_dir/$ff","$hd/$ff") != 0) { debug "ERR: Move failed: $temp_dir/$ff --> $hd/$ff -- $!"; debug "(already exists)" if(-e "$hd/$ff"); } } if($latex) { $texsrc="%PROJET/$latex"; debug "LaTeX found : $latex"; } return(2,$texsrc); } } elsif($bouton{'vide'}) { my $hd=$config->get('rep_projets')."/".$oo{'nom'}; mkdir($hd) if(! -e $hd); $texsrc='source.tex'; my $sl="$hd/$texsrc"; } else { return(0,''); } return(1,$texsrc); } sub source_latex_mmaj { my $iter=$w{'modeles_liste'}->get_selection()->get_selected(); my $desc=''; $desc=$modeles_store->get($iter,MODEL_DESC) if($iter); $w{'modeles_description'}->get_buffer->set_text($desc); } # copie en changeant eventuellement d'encodage sub copy_latex { my ($src,$dest)=@_; # 1) reperage du inputenc dans le source my $i=''; open(SRC,$src); LIG: while() { s/%.*//; if(/\\usepackage\[([^\]]*)\]\{inputenc\}/) { $i=$1; last LIG; } } close(SRC); my $ie=get_enc($i); my $id=get_enc($config->get('encodage_latex')); if($ie && $id && $ie->{'iso'} ne $id->{'iso'}) { debug "Reencoding $ie->{'iso'} => $id->{'iso'}"; open(SRC,"<:encoding($ie->{'iso'})",$src) or return(''); open(DEST,">:encoding($id->{'iso'})",$dest) or close(SRC),return(''); while() { chomp; s/\\usepackage\[([^\]]*)\]\{inputenc\}/\\usepackage[$id->{'inputenc'}]{inputenc}/; print DEST "$_\n"; } close(DEST); close(SRC); return(1); } else { return(copy($src,$dest)); } } sub importe_source { my $file=$config->get('texsrc'); utf8::downgrade($file); my ($fxa,$fxb,$fb) = splitpath($file); my $dest=$shortcuts->absolu($fb); # fichier deja dans le repertoire projet... return() if(is_local($file,1)); if(-f $dest) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','yes-no', __("File %s already exists in project directory: do you want to replace it?")." " .__("Click yes to replace it and loose pre-existing contents, or No to cancel source file import."),$fb); my $reponse=$dialog->run; $dialog->destroy; if($reponse eq 'no') { return(0); } } if(copy_latex($config->get_absolute('texsrc'),$dest)) { $config->set('project:texsrc',$shortcuts->relatif($dest)); set_source_tex(); my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'info','ok', __("The source file has been copied to project directory.")." ".sprintf(__"You can now edit it with button \"%s\" or with any editor.",__"Edit source file")); $dialog->run; $dialog->destroy; } else { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok', __"Error copying source file: %s",$!); $dialog->run; $dialog->destroy; } } sub edit_src { my $f=$config->get_absolute('texsrc'); # create new one if necessary if(!-f $f) { debug "Creating new empty source file..."; ("AMC::Filter::register::".$config->get('filter')) ->default_content($f); } # debug "Editing $f..."; my $editor=$config->get('txt_editor'); if($config->get('filter')) { my $type=("AMC::Filter::register::".$config->get('filter')) ->filetype(); $editor=$config->get($type.'_editor') if($config->get($type.'_editor')); } commande_parallele($editor,$f); } sub valide_projet { set_source_tex(); $projet{'_data'}=AMC::Data->new($config->get_absolute('data'), 'progress'=>\%w); for (qw/layout capture scoring association report/) { $projet{'_'.$_}=$projet{'_data'}->module($_); } $projet{_students_list}=AMC::NamesFile::new(); detecte_mep(); detecte_analyse('premier'=>1); debug "Correction options : MB".$config->get('maj_bareme'); $w{'maj_bareme'}->set_active($config->get('maj_bareme')); $prefs->transmet_pref($gui,prefix=>'notation', root=>'project:'); $w{'header_bar'}->set_title(glib_project_name.' - '. 'Auto Multiple Choice'); noter_resultat(); valide_liste('noinfo'=>1,'nomodif'=>1); # options specific to some export module: $prefs->transmet_pref('',prefix=>'export',root=>'project:'); # standard export options: $prefs->transmet_pref($gui,prefix=>'export',root=>'project:'); $prefs->transmet_pref($gui,prefix=>'pref_prep',root=>'project:'); for my $k (@widgets_only_when_opened) { $w{$k}->set_sensitive(1); } } sub cursor_wait { $w{cursor_watch}=Gtk3::Gdk::Cursor->new('GDK_WATCH') if(!$w{cursor_watch}); $w{main_window}->get_window()->set_cursor($w{cursor_watch}) if($w{main_window}); Gtk3::main_iteration while ( Gtk3::events_pending ); } sub cursor_standard { $w{main_window}->get_window()->set_cursor(undef) if($w{main_window}); Gtk3::main_iteration while ( Gtk3::events_pending ); } sub projet_ouvre { my ($proj,$deja)=(@_); my $new_source=0; # ouverture du projet $proj. Si $deja==1, alors il faut le creer if($proj) { my ($ok,$texsrc); quitte_projet(); # choix fichier latex si nouveau projet... if($deja) { ($ok,$texsrc)=source_latex_choisir('nom'=>$proj); if(!$ok) { cursor_standard; return(0); } if($ok==1) { $new_source=1; } elsif($ok==2) { $deja=''; } } cursor_wait; # creates project directory structure for my $sous ('',qw:cr cr/corrections cr/corrections/jpg cr/corrections/pdf cr/zooms cr/diagnostic data scans exports:) { my $rep=$config->get('rep_projets')."/$proj/$sous"; utf8::downgrade($rep); if(! -x $rep) { debug "Creating directory $rep..."; mkdir($rep); } } $projet{'nom'}=$proj; $shortcuts->set(project_name=>$proj); $config->open_project($proj); $config->set('project:texsrc',$texsrc) if($texsrc && !$config->get('project:texsrc')); $projet{'nom'}=$proj; $w{'onglets_projet'}->set_sensitive(1); valide_projet(); set_source_tex(1) if($new_source); cursor_standard; return(1); } } sub gui_no_project { for my $k (@widgets_only_when_opened) { $w{$k}->set_sensitive(0); } } sub quitte_projet { if ($projet{'nom'}) { maj_export(); valide_options_notation(); $config->close_project(); %projet=(); gui_no_project(); } return(1); } sub quitter { quitte_projet() or return(1); if($config->get('conserve_taille')) { my ($x,$y)=$w{'main_window'}->get_size(); $config->set("global:taille_x_main",$x); $config->set("global:taille_y_main",$y); } $config->save(); Gtk3->main_quit; } sub bug_report { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'info','ok',''); $dialog->set_markup( __("In order to send a useful bug report, please attach the following documents:")."\n" ."- ".__("an archive (in some compressed format, like ZIP, 7Z, TGZ...) containing the project directory, scan files and configuration directory (.AMC.d in home directory), so as to reproduce and analyse this problem.")."\n" ."- ".__("the log file produced when the debugging mode (in Help menu) is checked. Please try to reproduce the bug with this mode activated.")."\n\n" .sprintf(__("Bug reports can be filled at %s or sent to the address below."), "".__("AMC community site")."", ) ); my $ma=$dialog->get('message-area'); my $web=Gtk3::LinkButton->new_with_label("http://project.auto-multiple-choice.net/projects/auto-multiple-choice/issues",__("AMC community site")); $ma->add($web); my $mail=Gtk3::LinkButton->new_with_label('mailto:paamc@passoire.fr', 'paamc@passoire.fr'); $ma->add($mail); $ma->show_all(); $dialog->run; $dialog->destroy; } ####################################### sub pref_change_delivery { $config->set_local_keys('email_transport'); $prefs->reprend_pref(store=>'prefwindow',prefix=>'pref',container=>'local'); my $transport=$config->get('local:email_transport'); if($transport) { for my $k (qw/sendmail SMTP/) { $w{'email_group_'.$k}->set_sensitive($k eq $transport); } } else { debug "WARNING: could not retrieve email_transport!"; } } my $email_sl; my $email_key; my $email_r; sub project_email_name { my ($markup)=@_; my $pn=($config->get('nom_examen') || $config->get('code_examen') || $projet{'nom'}); if($markup) { return($pn eq $projet{'nom'} ? "$pn" : $pn); } else { return($pn); } } sub email_attachment_addtolist { for my $f (@_) { if(ref($f) eq 'ARRAY') { email_attachment_addtolist(@$f); } else { my $name=$f; $name =~ s/.*\///; $attachments_store->set($attachments_store->append, ATTACHMENTS_FILE,$shortcuts->absolu($f), ATTACHMENTS_NAME,$name, ATTACHMENTS_FOREGROUND, (-f $shortcuts->absolu($f) ? hex_color('black') : hex_color('red')), ); } } } sub email_attachment_add { my $d=Gtk3::FileChooserDialog ->new(__("Attach file"), $w{'main_window'},'open', 'gtk-cancel'=>'cancel', 'gtk-ok'=>'ok'); $d->set_select_multiple(1); my $r=$d->run; if($r eq 'ok') { email_attachment_addtolist($d->get_filenames); } $d->destroy(); } sub email_attachment_remove { my @selected=$w{'attachments_list'}->get_selection->get_selected_rows; for my $i (map { $attachments_store->get_iter($_); } (@{$selected[0]}) ) { $attachments_store->remove($i) if($i); } } sub send_emails { # are there some annotated answer sheets to send? $projet{'_report'}->begin_read_transaction('emNU'); my $n=$projet{'_report'}->type_count(REPORT_ANNOTATED_PDF); my $n_annotated=$projet{'_capture'}->annotated_count(); $projet{'_report'}->end_transaction('emNU'); if($n==0) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok', __("There are no annotated corrected answer sheets to send.") ." " .($n_annotated>0 ? __("Please group the annotated sheets to PDF files to be able to send them.") : __("Please annotate answer sheets and group them to PDF files to be able to send them.") ) ); $dialog->run; $dialog->destroy; return(); } # check perl modules availibility my @needs_module=(qw/Email::Address Email::MIME Email::Sender Email::Sender::Simple/); if($config->get('email_transport') eq 'sendmail') { push @needs_module,'Email::Sender::Transport::Sendmail'; } elsif($config->get('email_transport') eq 'SMTP') { push @needs_module,'Email::Sender::Transport::SMTP'; } my @manque=(); for my $m (@needs_module) { if(!check_install(module=>$m)) { push @manque,$m; } } if(@manque) { debug 'Mailing: Needs perl modules '.join(', ',@manque); my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup( sprintf(__("Sending emails requires some perl modules that are not installed: %s. Please install these modules and try again."), ''.join(', ',@manque).'') ); $dialog->run; $dialog->destroy; return(); } # STARTTLS is only available with Email::Sender >= 1.300027 # Warn in case it is not available if($config->get('email_smtp_ssl') =~ /[^01]/) { load "Email::Sender"; load "version"; if(version->parse($Email::Sender::VERSION) < version->parse("1.300027")) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup(__("SMTP security mode \"STARTTLS\" is only available with Email::Sender version 1.300027 and over. Please install a newer version of this perl module or change SMTP security mode, and try again.")); $dialog->run; $dialog->destroy; return(); } } load Email::Address; # then check a correct sender address has been set my @sa=Email::Address->parse($config->get('email_sender')); if(!@sa) { my $message; if($config->get('email_sender')) { $message.=sprintf(__("The email address you entered (%s) is not correct."), $config->get('email_sender')). "\n".__"Please edit your preferences to correct your email address."; } else { $message.=__("You did not enter your email address."). "\n".__"Please edit the preferences to set your email address."; } my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup($message); $dialog->run; $dialog->destroy; return(); } # Now check (if applicable) that sendmail path is ok if($config->get('email_transport') eq 'sendmail' && $config->get('email_sendmail_path') && !-f $config->get('email_sendmail_path')) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', # TRANSLATORS: Do not translate the 'sendmail' word. 'error','ok',''); $dialog->set_markup(sprintf(__("The sendmail program cannot be found at the location you specified in the preferences (%s). Please update your configuration."),$config->get('email_sendmail_path'))); $dialog->run; $dialog->destroy; return(); } # find columns with emails in the students list file my %cols_email=$projet{_students_list} ->heads_count(sub { my @a=Email::Address->parse(@_);return(@a) }); my @cols=grep { $cols_email{$_}>0 } (keys %cols_email); $prefs->store_register('email_col'=> cb_model(map { $_=>$_ } (@cols))); if(!@cols) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok', __"No email addresses has been found in the students list file. You need to write the students addresses in a column of this file."); $dialog->run; $dialog->destroy; return(); } # which is the best column ? my $nmax=0; my $col_max=''; for(@cols) { if($cols_email{$_}>$nmax) { $nmax=$cols_email{$_}; $col_max=$_; } } $config->set('project:email_col',$col_max) if(!$config->get('email_col')); # Then, open configuration window... my $gap=read_glade('mailing', qw/emails_list email_dialog label_name attachments_list attachments_expander email_cb_email_use_html/); $w{'label_name'}->set_text(project_email_name()); $w{'attachments_list'}->set_model($attachments_store); $renderer=Gtk3::CellRendererText->new; # TRANSLATORS: This is the title of a column containing attachments file paths in a table showing all attachments, when sending them to the students by email. $column = Gtk3::TreeViewColumn->new_with_attributes (__"file", $renderer, text=> ATTACHMENTS_NAME, 'foreground'=> ATTACHMENTS_FOREGROUND, ); $w{'attachments_list'}->append_column ($column); $w{'attachments_list'}->set_tooltip_column(ATTACHMENTS_FILE); $w{'attachments_list'}->get_selection->set_mode(GTK_SELECTION_MULTIPLE); # $w{'emails_list'}->set_model($emails_store); $renderer=Gtk3::CellRendererText->new; # TRANSLATORS: This is the title of a column containing copy numbers in a table showing all annotated answer sheets, when sending them to the students by email. $column = Gtk3::TreeViewColumn->new_with_attributes (__"copy", $renderer, text=> EMAILS_SC); $w{'emails_list'}->append_column ($column); $renderer=Gtk3::CellRendererText->new; # TRANSLATORS: This is the title of a column containing students names in a table showing all annotated answer sheets, when sending them to the students by email. $column = Gtk3::TreeViewColumn->new_with_attributes (__"name", $renderer, text=> EMAILS_NAME); $w{'emails_list'}->append_column ($column); $renderer=Gtk3::CellRendererText->new; # TRANSLATORS: This is the title of a column containing students email addresses in a table showing all annotated answer sheets, when sending them to the students by email. $column = Gtk3::TreeViewColumn->new_with_attributes (__"email", $renderer, text=> EMAILS_EMAIL); $w{'emails_list'}->append_column ($column); $renderer=Gtk3::CellRendererText->new; # TRANSLATORS: This is the title of a column containing mailing status (not sent, already sent, failed) in a table showing all annotated answer sheets, when sending them to the students by email. $column = Gtk3::TreeViewColumn->new_with_attributes (__"status", $renderer, text=> EMAILS_STATUS); $w{'emails_list'}->append_column ($column); $projet{'_report'}->begin_read_transaction('emCC'); $email_key=$projet{'_association'}->variable('key_in_list'); $email_r=$projet{'_report'}->get_associated_type(REPORT_ANNOTATED_PDF); $emails_store->clear; for my $i (@$email_r) { my ($s)=$projet{_students_list}->data($email_key,$i->{id},test_numeric=>1); my @sc=$projet{'_association'}->real_back($i->{id}); $emails_store->set($emails_store->append, EMAILS_ID,$i->{id}, EMAILS_EMAIL,'', EMAILS_NAME,$s->{'_ID_'}, EMAILS_SC,(defined($sc[0]) ? pageids_string(@sc) : "[".$i->{id}."]"), EMAILS_STATUS,($i->{mail_status}==REPORT_MAIL_OK ? __("done") : $i->{mail_status}==REPORT_MAIL_FAILED ? __("failed") : ""), ); } $w{emails_failed}=[map { $_->{id} } grep { $_->{mail_status}==REPORT_MAIL_FAILED } (@$email_r)]; $projet{'_report'}->end_transaction('emCC'); $w{'emails_list'}->get_selection->set_mode(GTK_SELECTION_MULTIPLE); $w{'emails_list'}->get_selection->select_all; $attachments_store->clear; email_attachment_addtolist(@{$config->get('email_attachment')}); $w{'attachments_expander'}->set_expanded(@{$config->get('email_attachment')} ? 1 : 0); if($config->get('conserve_taille')) { AMC::Gui::WindowSize::size_monitor ($w{'email_dialog'},{config=>$config, key=>'mailing_window_size'}); } $prefs->transmet_pref($gap,prefix=>'email',root=>'project:'); my $resp=$w{'email_dialog'}->run; my @ids=(); if($resp==1) { $prefs->reprend_pref(prefix=>'email'); # get selection my @selected=$w{'emails_list'}->get_selection->get_selected_rows; @selected=@{$selected[0]}; for my $i (@selected) { my $iter=$emails_store->get_iter($i); push @ids,$emails_store->get($iter,EMAILS_ID); } # get attachments filenames my @f=(); my $iter=$attachments_store->get_iter_first; my $ok=defined($iter); while($ok) { push @f,$shortcuts->relatif($attachments_store->get($iter,ATTACHMENTS_FILE)); $ok=$attachments_store->iter_next($iter); } if(@f) { $config->set('project:email_attachment',[@f]); } else { $config->set('project:email_attachment',[]); } } $w{'email_dialog'}->destroy; # are all attachments present? if($resp==1) { my @missing=grep { ! -f $shortcuts->absolu($_) } (@{$config->get('email_attachment')}); if(@missing) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok', __("Some files you asked to be attached to the emails are missing:")."\n".join("\n",@missing)."\n". __("Please create them or remove them from the list of attached files.")); $dialog->run(); $dialog->destroy(); $resp=0; } } if($resp==1) { # writes the list of copies to send in a temporary file my $fh=File::Temp->new(TEMPLATE => "ids-XXXXXX", TMPDIR => 1, UNLINK=> 1); print $fh join("\n",@ids)."\n"; $fh->seek( 0, SEEK_END ); my @mailing_args=("--project",$shortcuts->absolu('%PROJET/'), "--project-name",project_email_name(), "--students-list",$config->get_absolute('listeetudiants'), "--list-encoding",bon_encodage('liste'), "--csv-build-name",csv_build_name(), "--ids-file",$fh->filename, "--email-column",$config->get('email_col'), "--sender",$config->get('email_sender'), "--subject",$config->get('email_subject'), "--text",$config->get('email_text'), "--text-content-type", ($config->get('email_use_html') ? 'text/html' : 'text/plain'), "--transport",$config->get('email_transport'), "--sendmail-path",$config->get('email_sendmail_path'), "--smtp-host",$config->get('email_smtp_host'), "--smtp-port",$config->get('email_smtp_port'), "--smtp-ssl",$config->get('email_smtp_ssl'), "--smtp-user",$config->get('email_smtp_user'), "--smtp-passwd-file",$config->passwd_file("SMTP"), "--cc",$config->get('email_cc'), "--bcc",$config->get('email_bcc'), "--delay",$config->get('email_delay'), ); for(@{$config->get('email_attachment')}) { push @mailing_args,"--attach",$shortcuts->absolu($_); } commande('commande'=>["auto-multiple-choice","mailing", pack_args(@mailing_args, "--debug",debug_file(), "--progression-id",'mailing', "--progression",1, "--log",$shortcuts->absolu('mailing.log'), ), ], 'progres.id'=>'mailing', 'texte'=>__"Sending emails...", 'o'=>{'fh'=>$fh}, 'fin'=>sub { my ($c,%data)=@_; close($c->{'o'}->{'fh'}); my $ok=$c->variable('OK') || 0; my $failed=$c->variable('FAILED') || 0; my @message; push @message,"".(__"Cancelled.")."" if($data{cancelled}); push @message,"".(__"SMTP authentication failed: check SMTP configuration and password.")."" if($c->variable('failed_auth')); push @message,sprintf(__"%d message(s) has been sent.",$ok); if($failed>0) { push @message,"".sprintf("%d message(s) could not be sent.",$failed).""; } my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', ($failed>0 ? 'warning' : 'info'),'ok',''); $dialog->set_markup(join("\n",@message)); $dialog->run; $dialog->destroy; }, ); } } sub email_change_col { $config->set_local_keys('email_col'); $prefs->reprend_pref(prefix=>'email',container=>'local'); my $i=$emails_store->get_iter_first; my $ok=defined($i); while($ok) { my ($s)=$projet{_students_list}->data($email_key,$emails_store->get($i,EMAILS_ID),test_numeric=>1); $emails_store->set($i,EMAILS_EMAIL,$s->{$config->get('local:email_col')}); $ok=$emails_store->iter_next($i); } } sub mailing_select_failed { my $select=$w{'emails_list'}->get_selection; my $model=$w{'emails_list'}->get_model(); $select->unselect_all(); for my $id (@{$w{emails_failed}}) { $select->select_iter(model_id_to_iter($model,EMAILS_ID,$id)); } } sub mailing_set_project_name { my $dialog=Gtk3::Dialog ->new(__("Set exam name"),$w{''}, ['destroy-with-parent'],'gtk-cancel'=>'cancel','gtk-ok'=>'ok', ); $dialog->set_default_response ('ok'); my $t=Gtk3::Grid->new(); my $widget; $t->attach(Gtk3::Label->new(__"Examination name"),0,0,1,1); $widget=Gtk3::Entry->new(); $w{'set_name_x_nom_examen'}=$widget; $t->attach($widget,1,0,1,1); $t->attach(Gtk3::Label->new(__"Code (short name) for examination"),0,1,1,1); $widget=Gtk3::Entry->new(); $w{'set_name_x_code_examen'}=$widget; $t->attach($widget,1,1,1,1); $t->show_all; $dialog->get_content_area()->add ($t); $prefs->transmet_pref('',prefix=>'set_name',root=>'project:'); my $response = $dialog->run; if($response eq 'ok') { $prefs->reprend_pref(prefix=>'set_name'); $w{'label_name'}->set_text(project_email_name()); } $dialog->destroy; } ####################################### sub choose_columns { my ($type)=@_; my $l=$config->get('export_'.$type.'_columns'); my $i=1; my %selected=map { $_=>$i++ } (split(/,+/,$l)); my %order=(); @available=('student.copy','student.key','student.name', $projet{_students_list}->heads()); $i=0; for(@available) { if($selected{$_}) { $i=$selected{$_}; } else { $i.='1'; } $order{$_}=$i; } @available=sort { $order{$a} cmp $order{$b} } @available; my $gcol=read_glade('choose_columns', qw/columns_list columns_instructions/); my $columns_store=Gtk3::ListStore->new('Glib::String','Glib::String'); $w{'columns_list'}->set_model($columns_store); my $renderer=Gtk3::CellRendererText->new; # TRANSLATORS: This is the title of a column containing all columns names from the students list file, when choosing which columns has to be exported to the spreadsheets. my $column = Gtk3::TreeViewColumn->new_with_attributes (__"column", $renderer, text=> 0); $w{'columns_list'}->append_column ($column); my @selected_iters=(); for my $c (@available) { my $name=$c; $name=__("") if($c eq 'student.name'); $name=__("") if($c eq 'student.key'); $name=__("") if($c eq 'student.copy'); my $iter=$columns_store->append; $columns_store->set($iter, 0,$name, 1,$c); push @selected_iters,$iter if($selected{$c}); } $w{'columns_list'}->set_reorderable(1); $w{'columns_list'}->get_selection->set_mode(GTK_SELECTION_MULTIPLE); for(@selected_iters) { $w{'columns_list'}->get_selection->select_iter($_); } my $resp=$w{'choose_columns'}->run; if($resp==1) { my @k=(); my @s=$w{'columns_list'}->get_selection->get_selected_rows; for my $i (@{$s[0]}) { push @k,$columns_store->get($columns_store->get_iter($i),1) if($i); } $config->set('export_'.$type.'_columns',join(',',@k)); } $w{'choose_columns'}->destroy; } sub choose_columns_current { choose_columns(lc($config->get('format_export'))); } ####################################### # PLUGINS sub plugins_add { my $d=Gtk3::FileChooserDialog ->new(__("Install an AMC plugin"), $w{'main_window'},'open', 'gtk-cancel'=>'cancel', 'gtk-ok'=>'ok'); my $filter=Gtk3::FileFilter->new(); $filter->set_name(__"Plugins (zip, tgz)"); for my $ext (qw/ZIP zip TGZ tgz tar.gz TAR.GZ/) { $filter->add_pattern("*.$ext"); } $d->add_filter($filter); my $r=$d->run; if($r eq 'ok') { my $plugin=$d->get_filename; $d->destroy; # unzip in a temporary directory my ($temp_dir,$error)=unzip_to_temp($plugin); if($error) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok', sprintf(__("An error occured while trying to extract files from the plugin archive: %s."),$error)); $dialog->run; $dialog->destroy; return(); } # checks validity my ($nf,$main)=n_fich($temp_dir); if($nf<1) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok', __"Nothing extracted from the plugin archive. Check it."); $dialog->run; $dialog->destroy; return(); } if($nf>1 || !-d $main) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok', __"This is not a valid plugin, as it contains more than one directory at the first level."); $dialog->run; $dialog->destroy; return(); } if(!-d "$main/perl/AMC") { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok', __"This is not a valid plugin, as it does not contain a perl/AMC subdirectory."); $dialog->run; $dialog->destroy; return(); } my $name=$main; $name =~ s/.*\///; # already installed? if($name=~/[^.]/ && -e $config->subdir("plugins/$name")) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'question','yes-no',''); $dialog->set_markup( sprintf(__("A plugin is already installed with the same name (%s). Do you want to delete the old one and overwrite?"), "$name")); my $r=$dialog->run; $dialog->destroy; return if($r ne 'yes'); remove_tree($config->subdir("plugins/$name"),{'verbose'=>0,'safe'=>1,'keep_root'=>0}); } # go! debug "Installing plugin $name to ".$config->subdir("plugins"); if(system('mv',$main,$config->subdir("plugins"))!=0) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok', sprintf(__("Error while moving the plugin to the user plugin directory: %s"),$!)); my $r=$dialog->run; $dialog->destroy; return(); } my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'info','ok', __"Please restart AMC before using the new plugin..."); my $r=$dialog->run; $dialog->destroy; } else { $d->destroy; } } ####################################### sub file_size { my ($oo,@files)=@_; my $s=0; $oo->{recursive}--; FILE: for my $f (@files) { if(-f $f) { $s += -s $f; } elsif(-d $f) { if($oo->{recursive}>=0) { if(opendir(SDIR,$f)) { my @dir_files=map { "$f/$_"; } grep { !$oo->{pattern} || /$oo->{pattern}/ } grep { ! /^\.{1,2}$/ } readdir(SDIR); closedir(SDIR); $s += file_size({%$oo},@dir_files); } } } } return($s); } my @size_units=('k','M','G','T','P'); sub human_readable_size { my ($s)=@_; my $i=0; while($s>=1024) { $s /= 1024; $i++; } if($i==0) { return($s); } else { return(sprintf('%.3g%s',$s,$size_units[$i-1])); } } my @cleanup_components =( {id=>'zooms', short=>__("zooms"), text=>__("boxes images are extracted from the scans while processing automatic data capture. They can be removed if you don't plan to use the zooms dialog to check and correct boxes categorization. They can be recovered processing again automatic data capture from the same scans."), size=>sub { return(file_size({recursive=>5},$shortcuts->absolu('%PROJET/cr/zooms')) + $projet{'_capture'}->zooms_total_size_transaction()); }, action=>sub { return(remove_tree($shortcuts->absolu('%PROJET/cr/zooms'), {'verbose'=>0,'safe'=>1,'keep_root'=>1}) + $projet{'_capture'}->zooms_cleanup_transaction()); }, }, {id=>'matching_reports', short=>__("layout reports"), text=>__("these images are intended to show how the corner marks have been recognized and positioned on the scans. They can be safely removed once the scans are known to be well-recognized. They can be recovered processing again automatic data capture from the same scans."), size=>sub { return(file_size({pattern=>'^page-',recursive=>1}, $shortcuts->absolu('%PROJET/cr/'))); }, action=>sub { my $dir=$shortcuts->absolu('%PROJET/cr/'); if(opendir(CRDIR,$dir)) { my @files=map { "$dir/$_" } grep { /^page-/ } readdir(CRDIR); closedir(CRDIR); return(unlink(@files)); } else { return(0); } }, }, {id=>'annotated_pages', short=>__("annotated pages"), text=>__("jpeg annotated pages are made before beeing assembled to PDF annotated files. They can safely be removed, and will be recovered automatically the next time annotation will be requested."), size=>sub { return(file_size({recursive=>5},$shortcuts->absolu('%PROJET/cr/corrections/jpg'))); }, action=>sub { return(remove_tree($shortcuts->absolu('%PROJET/cr/corrections/jpg'), {'verbose'=>0,'safe'=>1,'keep_root'=>1})); }, }, ); sub table_sep { my ($t,$y,$x)=@_; my $sep=Gtk3::HSeparator->new(); $t->attach($sep,0,$x,$y,$y+1,["expand","fill"],[],0,0); } sub cleanup_dialog { my %files; my %cb; my $gap=read_glade('cleanup'); my $dialog=$gap->get_object('cleanup'); my $notebook=$gap->get_object('components'); for my $c (@cleanup_components) { my $t=$c->{text}; my $s=undef; if($c->{size}) { $s=&{$c->{size}}(); $t.= "\n".__("Total size of concerned files:")." ". human_readable_size($s); } my $label=Gtk3::Label->new($t); $label->set_justify('left'); $label->set_max_width_chars(50); $label->set_line_wrap(1); $label->set_line_wrap_mode('word'); my $check=Gtk3::CheckButton->new; $c->{check}=$check; my $short_label=Gtk3::Label->new($c->{short}); $short_label->set_justify('center'); $short_label->set_sensitive(!( defined($s) && $s==0)); my $hb=Gtk3::HBox->new(); $hb->pack_start($check,FALSE,FALSE,0); $hb->pack_start($short_label,TRUE,TRUE,0); $hb->show_all; $notebook->append_page_menu($label,$hb,undef); } $notebook->show_all; my $reponse=$dialog->run(); for my $c (@cleanup_components) { $c->{active}=$c->{check}->get_active(); } $dialog->destroy(); Gtk3::main_iteration while ( Gtk3::events_pending ); debug "RESPONSE=$reponse"; return() if($reponse!=10); my $n=0; for my $c (@cleanup_components) { if($c->{active}) { debug "Removing ".$c->{id}." ..."; $n+=&{$c->{action}}; } } $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'info','ok', __("%s files were removed."),$n); $dialog->run; $dialog->destroy; } ####################################### exit 0 if($do_nothing); ####################################### if($config->get('conserve_taille') && $config->get('taille_x_main') && $config->get('taille_y_main')) { $w{'main_window'}->resize($config->get('taille_x_main'),$config->get('taille_y_main')); } gui_no_project(); projet_ouvre($ARGV[0]); ####################################### # For MacPorts with latexfree variant, for example if("@/LATEX_FREE/@" =~ /(1|true|yes)/i) { my $message=''; if(!commande_accessible("kpsewhich")) { $message=sprintf(__("I don't find the command %s."),"kpsewhich") .__("Perhaps LaTeX is not installed?"); } else { if(!get_sty()) { # TRANSLATORS: Do not translate 'auto-multiple-choice latex-link', which is a command to be typed on MacOsX $message=__("The style file automultiplechoice.sty seems to be unreachable. Try to use command 'auto-multiple-choice latex-link' as root to fix this."); } } if($message) { my $dialog = Gtk3::MessageDialog ->new($w{'main_window'}, 'destroy-with-parent', 'error','ok',$message); $dialog->run; $dialog->destroy; } } my $css=Gtk3::CssProvider->new(); $css->load_from_data(' infobar.info, infobar.info button { background-color: #29A10F; background-image: none; } infobar.warning, infobar.warning button { background-color: #CD5600; background-image: none; } infobar.error, infobar.error button { background-color: #CD0500; background-image: none; } '); Gtk3::StyleContext::add_provider_for_screen ( $w{main_window}->get_screen(), $css, Gtk3::STYLE_PROVIDER_PRIORITY_APPLICATION); $config->connect_to_window($w{main_window}); test_debian_amc(); test_libnotify(); test_magick(); Gtk3->main(); 1; __END__ auto-multiple-choice-1.4.0/AMC-imprime.pl000077500000000000000000000151241341176102400201470ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use Getopt::Long; use File::Spec::Functions qw/tmpdir/; use File::Temp qw/ tempfile tempdir /; use File::Copy; use Module::Load; use Module::Load::Conditional qw/check_install/; use AMC::Basic; use AMC::Exec; use AMC::Data; use AMC::Gui::Avancement; my $data_dir=""; my $sujet=''; my $print_cmd='cupsdoprint %f'; my $progress=''; my $progress_id=''; my $debug=''; my $fich_nums=''; my $methode='CUPS'; my $imprimante=''; my $options='number-up=1'; my $output_file=''; my $output_answers_file=''; my $split=''; my $answer_first=''; my $extract_with='pdftk'; GetOptions( "data=s"=>\$data_dir, "sujet=s"=>\$sujet, "fich-numeros=s"=>\$fich_nums, "progression=s"=>\$progress, "progression-id=s"=>\$progress_id, "print-command=s"=>\$print_cmd, "methode=s"=>\$methode, "imprimante=s"=>\$imprimante, "output=s"=>\$output_file, "split!"=>\$split, "answer-first!"=>\$answer_first, "options=s"=>\$options, "debug=s"=>\$debug, "extract-with=s"=>\$extract_with, ); set_debug($debug); my $commandes=AMC::Exec::new('AMC-imprime'); $commandes->signalise(); die "Needs data directory" if(!$data_dir); die "Needs subject file" if(!$sujet); die "Needs print command" if($methode =~ /^command/i && !$print_cmd); die "Needs output file" if($methode =~ /^file/i && !$output_file); my @available_extracts=('pdftk','pdftk+NA','gs','qpdf'); die "Invalid value for extract_with: $extract_with" if(!grep(/^\Q$extract_with\E$/,@available_extracts)); @available_extracts=grep { my $c=$_; $c=~s/\+.*//; commande_accessible($c) } @available_extracts; die "No available extract engine" if(!@available_extracts); if(!grep(/^\Q$extract_with\E$/,@available_extracts)) { debug("Extract engines available: ".join(" ",@available_extracts)); $extract_with=$available_extracts[0]; debug("Switching to extract engine $extract_with"); } my $avance=AMC::Gui::Avancement::new($progress,'id'=>$progress_id); my $data=AMC::Data->new($data_dir); my $layout=$data->module('layout'); my @es; if($fich_nums) { open(NUMS,$fich_nums); while() { push @es,$1 if(/^([0-9]+)$/); } close(NUMS); } else { $layout->begin_read_transaction('prST'); @es=$layout->query_list('students'); $layout->end_transaction('prST'); } my $cups; if($methode =~ /^cups/i) { my $mod="AMC::Print::".lc($methode); load($mod); my $error=$mod->check_available(); if($error) { die $error; } $cups=$mod->new(); $cups->select_printer($imprimante); # record options (so that if given multiple times, the last value # is considered) my %opts=(); for my $o (split(/\s*,+\s*/,$options)) { my $on=$o; my $ov=1; if($o =~ /([^=]+)=(.*)/) { $on=$1; $ov=$2; } $opts{$on}=$ov; } for my $o (keys %opts) { debug "Option : $o=$opts{$o}"; $cups->set_option($o,$opts{$o}); } } sub process_pages { my ($slices,$f_dest,$elong)=@_; my $tmp = File::Temp->new( DIR=>tmpdir(),UNLINK => 1, SUFFIX => '.pdf' ); $fn=$tmp->filename(); my $n_slices=1+$#{$slices}; print "Student $elong : $n_slices slices to file $fn...\n"; return() if($n_slices==0); if($extract_with eq 'gs') { die "Can't use to build multiple-slices PDF file. Please switch to ." if($n_slices>1); $commandes->execute("gs","-dBATCH","-dNOPAUSE","-q","-sDEVICE=pdfwrite", "-sOutputFile=$fn", "-dFirstPage=".$slices->[0]->{first}, "-dLastPage=".$slices->[0]->{last}, $sujet); } elsif($extract_with eq 'pdftk') { $commandes->execute("pdftk",$sujet,"cat", (map { $_->{first}."-".$_->{last} } @$slices), "output",$fn); } elsif($extract_with eq 'pdftk+NA') { # Use pdftk with a workaround to keep PDF forms. # See https://bugs.debian.org/792168 my $fn_step="$fn.1.pdf"; $commandes->execute("pdftk",$sujet,"cat", (map { $_->{first}."-".$_->{last} } @$slices), "output",$fn_step); $commandes->execute("pdftk",$fn_step, "output",$fn,"need_appearances"); } elsif($extract_with eq "qpdf") { # Cmd: qpdf input.pdf --pages input.pdf 3,4-7,10 -- output.pdf $commandes->execute("qpdf", $sujet, "--pages", $sujet, join(",", map { $_->{first}."-".$_->{last} } @$slices), "--",$fn); } if($methode =~ /^cups/i) { $cups->print_file($fn,"QCM : sheet $elong"); } elsif($methode =~ /^file/i) { $f_dest.="-%e.pdf" if($f_dest !~ /[%]e/); $f_dest =~ s/[%]e/$elong/g; debug "Moving to $f_dest"; move($fn,$f_dest); } elsif($methode =~ /^command/i) { my @c=map { s/[%]f/$fn/g; s/[%]e/$elong/g; $_; } split(/\s+/,$print_cmd); #print STDERR join(' ',@c)."\n"; $commandes->execute(@c); } else { die "Unknown method: $methode"; } close($tmp); } for my $e (@es) { my $elong=sprintf("%04d",$e); my ($debut,$fin,$debutA,$finA); $layout->begin_read_transaction('prSP'); ($debut,$fin)=$layout->query_row('subjectpageForStudent',$e); ($debutA,$finA)=$layout->query_row('subjectpageForStudentA',$e) if($split||$answer_first); $layout->end_transaction('prSP'); my @sl_all=(); if($debut && $fin) { push @sl_all,{first=>$debut,last=>$fin}; } my @sl_answer=(); if($debutA && $finA) { push @sl_answer,{first=>$debutA,last=>$finA}; } my @sl_preanswer=(); if($debut && $debutA && $debut<$debutA) { push @sl_preanswer,{first=>$debut,last=>$debutA-1}; } my @sl_postanswer=(); if($fin && $finA && $fin>$finA) { push @sl_postanswer,{first=>$finA+1,last=>$fin}; } if($split) { process_pages(\@sl_preanswer,$output_file,$elong."-0S"); process_pages(\@sl_answer,$output_file,$elong."-1A"); process_pages(\@sl_postanswer,$output_file,$elong."-2S"); } else { if($answer_first) { process_pages([@sl_answer,@sl_postanswer,@sl_preanswer], $output_file,$elong); } else { process_pages(\@sl_all, $output_file,$elong); } } $avance->progres(1/(1+$#es)); } $avance->fin(); auto-multiple-choice-1.4.0/AMC-latex-link.pl.in000066400000000000000000000100551341176102400211550ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2011-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . ###################################################################### # # auto-multiple-choice latex-link : # # Tests if the style file automultiplechoice.sty is accessible for # LaTeX. If not, tries to make a link from a location inside texmf # directories to the installed style file, and calls mktexlsr # # auto-multiple-choice latex-link remove : # # remove the link. # ###################################################################### use AMC::Basic; for my $c (qw/kpsewhich texconfig-sys/) { if(!commande_accessible($c)) { print STDERR "ERROR: I don't find the command $c. Perhaps LaTeX is not installed?\n"; exit(1); } } if($> != 0) { print "WARNING: This command should be called by root!\n"; } sub get_tex_var { my ($k)=@_; my $v=''; open(SYS,"-|","texconfig-sys","conf") or die "Can't exec texconfig-sys: $!"; for() { chomp; $v=$1 if(/^$k=(.*)/); } close(SYS); return($v); } my $conf_dir="/etc/AMC"; my $link_file=$conf_dir."/latex-link"; my $link=''; if(-f $link_file) { open(LK,$link_file); while() { chomp; $link=$_; } close(LK); } my @styles=get_sty(); sub rehash { print "Calling mktexlsr to refresh LaTeX files list...\n"; open(LSR,"-|","mktexlsr", "--quiet"); while() { print $_; } close(LSR); @styles=get_sty(); } if($ARGV[0] =~ /^(remove|rm)$/i) { if(-l $link) { print "Removing link $link...\n"; unlink($link); if(-e $link) { die "ERROR: could not remove link $link.\n"; exit(2); } else { print("Done.\n"); } } else { print "No link to remove.\n"; } exit(0); } if(!@styles) { rehash(); } if(@styles) { print "The style file is already accessible:\n"; for(@styles) { print "$_\n"; } if(-l $link) { print "Use 'auto-multiple-choice latex-link remove' to remove the link\n"; } } else { my $loc=get_tex_var('TEXMFLOCAL'); if(! -d $loc) { print STDERR "WARNING: the directory TEXMFLOCAL does not exist ($loc).\n"; print STDERR "WARNING: trying to create $loc...\n"; mkdir("$loc"); } my $installed='@/TEXDIR/@/automultiplechoice.sty'; if(! -f $installed) { print STDERR "ERROR: I cannot find the installed style file $installed\n"; exit(2); } for my $dir (qw:tex tex/latex:) { if(! -d "$loc/$dir") { print "Creating directory $loc/$dir...\n"; mkdir("$loc/$dir"); } } $link="$loc/tex/latex/automultiplechoice.sty"; if(-l $link) { print "WARNING: removing a previously installed non-working symlink...\n"; unlink($link) or die "ERROR: Failed to remove previous symlink $link\n"; } print "Creating link to AMC style file...\n"; symlink($installed,$link) or die "ERROR: Failed to create symlink $link\n"; rehash(); if(@styles) { if(! -d $conf_dir) { mkdir($conf_dir); } print "Saving information about this 'latex-link' run in $link_file...\n"; open(LF,">$link_file") or die "Unable to write to $link_file: $!"; print LF "$link\n"; close(LF); print "Done, 'automultiplechoice.sty' is now reachable from latex.\n"; } else { die "ERROR: even though the symlink has been properly created, 'automultiplechoice.sty'\n\ cannot be found using 'kpsewhich -all automultiplechoice.sty'.\n"; } } auto-multiple-choice-1.4.0/AMC-mailing.pl000066400000000000000000000200771341176102400201250ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use Getopt::Long; use AMC::Basic; use AMC::NamesFile; use AMC::Data; use AMC::DataModule::report ':const'; use AMC::Gui::Avancement; use AMC::Substitute; use Module::Load; use Email::MIME; use Email::Address; use Email::Sender; use Email::Sender::Simple qw(sendmail); use Time::HiRes qw( usleep ); my $project_dir=''; my $data_dir=''; my $students_list=''; my $list_encoding='UTF-8'; my $csv_build_name=''; my $ids_file=''; my $email_column=''; my $sender=''; my $transport='sendmail'; my $sendmail_path='/usr/sbin/sendmail'; my $smtp_host='smtp'; my $smtp_port=25; my $smtp_ssl=''; my $smtp_user=''; my $smtp_passwd_file=''; my $text=''; my $text_content_type='text/plain'; my $subject=''; my $project_name=''; my $cc=''; my $bcc=''; my $log_file=''; my $delay_s=0; my @attach_files=(); @ARGV=unpack_args(@ARGV); @ARGV_ORIG=@ARGV; GetOptions("project=s"=>\$project_dir, "project-name=s"=>\$project_name, "data=s"=>\$data_dir, "students-list=s"=>\$students_list, "list-encoding=s"=>\$list_encoding, "csv-build-name=s"=>\$csv_build_name, "ids-file=s"=>\$ids_file, "email-column=s"=>\$email_column, "sender=s"=>\$sender, "text=s"=>\$text, "text-content-type:s"=>\$text_content_type, "subject=s"=>\$subject, "transport=s"=>\$transport, "sendmail-path=s"=>\$sendmail_path, "smtp-host=s"=>\$smtp_host, "smtp-port=s"=>\$smtp_port, "smtp-ssl=s"=>\$smtp_ssl, "smtp-user=s"=>\$smtp_user, "smtp-passwd-file=s"=>\$smtp_passwd_file, "debug=s"=>\$debug, "progression=s"=>\$progress, "progression-id=s"=>\$progress_id, "attach=s"=>\@attach_files, "delay=s"=>\$delay_s, "log=s"=>\$log_file, "cc=s"=>\$cc, "bcc=s"=>\$bcc, ); set_debug($debug); utf8::downgrade($students_list); utf8::downgrade($ids_file); debug "Parameters: ".join(" ",map { "<$_>" } @ARGV_ORIG); sub error { my ($text)=@_; debug "AMC-sendmail ERROR: $text"; print "ERROR: $text\n"; exit(1); } sub parse_add { my ($s)=@_; return(map { $_->address(); } (Email::Address->parse($s))); } $data_dir="$project_dir/data" if($project_dir && !$data_dir); utf8::downgrade($data_dir); error("students list not found:$students_list") if(!-f $students_list); my $students=AMC::NamesFile::new($students_list, 'encodage'=>$list_encoding, "identifiant"=>$csv_build_name); error("data directory not found: $data_dir") if(!-d $data_dir); my %ids=(); if(-f $ids_file) { debug "provided IDS:"; open(IDS,$ids_file); while() { chomp; debug "[$_]"; $ids{$_}=1; } close(IDS); } else { debug "IDS file $ids_file not found"; } if($log_file) { open(LOGF,">>",$log_file) or debug "Error opening log file $log_file: $!"; print LOGF localtime." Starting mailing...\n"; } my $avance=AMC::Gui::Avancement::new($progress,'id'=>$progress_id); my $data=AMC::Data->new($data_dir); my $report=$data->module('report'); my $assoc=$data->module('association'); my $scoring=$data->module('scoring'); my $subst=AMC::Substitute::new('assoc'=>$assoc,'scoring'=>$scoring, 'names'=>$students, 'name'=>$project_name); $data->begin_read_transaction('Mail'); my $subdir=$report->get_dir(REPORT_ANNOTATED_PDF); my $pdf_dir="$project_dir/$subdir"; utf8::downgrade($pdf_dir); error("PDF directory not found: $pdf_dir") if(!-d $pdf_dir); my $key=$assoc->variable('key_in_list'); my $r=$report->get_associated_type(REPORT_ANNOTATED_PDF); my $t; if($transport eq 'sendmail') { load Email::Sender::Transport::Sendmail; $t=Email::Sender::Transport::Sendmail->new({ sendmail => $sendmail_path });; } elsif($transport eq 'SMTP') { my $pass=''; if($smtp_user && -f $smtp_passwd_file) { $pass=file_content($smtp_passwd_file); $pass =~ s/\n.*//s; } load Email::Sender::Transport::SMTP; $t=Email::Sender::Transport::SMTP ->new({'host'=>$smtp_host, 'port'=>$smtp_port, 'ssl'=>$smtp_ssl, 'sasl_username'=>$smtp_user, 'sasl_password'=>$pass, }); } else { error("Unknown transport: $transport"); } my $nn=1+$#$r; if($ids_file) { my @i=(keys %ids); $nn=1+$#i; } my $delta=($nn>0 ? 1/$nn : 1); my @attachments=(); for my $f (@attach_files) { if(-f $f) { my $name=$f; $name =~ s/.*\///; my $body=''; open(ATT,$f); while() { $body.=$_; } close(ATT); push @attachments, Email::MIME->create(attributes=> {filename => $name, content_type => file_mimetype($f), encoding => "base64", name => $name, disposition => "attachment", }, body => $body, ); } else { debug "ERROR: Cannot attach inexistant file $f"; } } my $failed_auth=0; STUDENT: for my $i (@$r) { my ($s)=$students->data($key,$i->{'id'},test_numeric=>1); my $dest=$s->{$email_column}; debug "Loop: ID $i->{'id'} DEST [$dest]"; if($ids_file && !$ids{$i->{'id'}}) { debug "Skipped"; next STUDENT; } if($failed_auth) { print "FAILED: auth\n"; next STUDENT; } if($dest) { my $file=$i->{'file'}; utf8::encode($file); $file=$pdf_dir."/$file"; debug " FILE=$file"; if(-f $file) { my $body=''; open(PDF,$file); while() { $body.=$_; } close(PDF); my @sc=$assoc->real_back($i->{'id'}); my @parts= ( Email::MIME->create(attributes=> {content_type => $text_content_type, encoding => "base64", charset => "UTF-8", }, body_str => $subst->substitute($text,@sc), ), Email::MIME->create(attributes=> {filename => "corrected.pdf", content_type => "application/pdf", encoding => "base64", name => "corrected.pdf", disposition => "attachment", }, body => $body, ), ); my $email = Email::MIME ->create(header_str => [ From=>$sender, To=>$dest, Subject=>$subst->substitute($subject,@sc) ], parts => [ @parts,@attachments ], ); $email->header_str_set(Cc=>$cc) if($cc); my @all_dests=(parse_add($dest)); push @all_dests,parse_add($cc) if($cc); push @all_dests,parse_add($bcc) if($bcc); my $b=eval { sendmail($email,{'transport'=>$t,to=>\@all_dests}); } || $@; my $status; my $m=''; if($b->isa('Email::Sender::Failure')) { $status='FAILED'; $m=$b->message; $m =~ s/[\n\r]+/ | /g; } elsif($b->isa('Email::Sender::Success')) { $status='OK'; } else { $status='ERROR'; $m=$b; } # In case of failed authentication, cancel all sendings if($status eq 'FAILED' && $m =~ /failed auth/i) { debug "Failed authentication: cancel all sendings"; $failed_auth=1; } print "$status [$i->{'id'}] $m\n"; debug "$status [$i->{'id'}] $m"; print LOGF "$status [$i->{'id'} -> $dest] $m\n" if($log_file); next STUDENT if($failed_auth); $report->report_mailing(@sc, ($status eq 'OK' ? REPORT_MAIL_OK : REPORT_MAIL_FAILED), $m,'now'); } else { debug_and_stderr "No file: $file"; } usleep(int(1000000*$delay_s)); } else { debug "No dest"; } $avance->progres($delta); } $data->end_transaction('Mail'); $avance->fin(); print "VAR: failed_auth=$failed_auth\n"; if($log_file) { close(LOGF); } auto-multiple-choice-1.4.0/AMC-manuel.pl000077500000000000000000000024471341176102400177720ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use Getopt::Long; use AMC::Basic; use AMC::Gui::Manuel; my $mep_dir='points-mep'; my $cr_dir='points-cr'; my $liste='noms.txt'; my $sujet=''; my $etud=''; my $dpi=75; my $debug=''; my $seuil=0.1; GetOptions("sujet=s"=>\$sujet, "liste=s"=>\$liste, "copie=s"=>\$etud, "dpi=s"=>\$dpi, "debug=s"=>\$debug, ); set_debug($debug); my $g=AMC::Gui::Manuel::new('liste'=>$liste, 'sujet'=>$sujet, 'etud'=>$etud, 'dpi'=>$dpi, 'seuil'=>$seuil, 'global'=>1, ); Gtk3->main; auto-multiple-choice-1.4.0/AMC-meptex.pl000077500000000000000000000153541341176102400200140ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2011-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use Getopt::Long; use Encode; use AMC::Basic; use AMC::Gui::Avancement; use AMC::Data; use AMC::DataModule::layout ':flags'; my $src; my $data_dir; my $dpi=300; my $progress; my $progress_id; my $debug; GetOptions("src=s"=>\$src, "data=s"=>\$data_dir, "progression-id=s"=>\$progress_id, "progression=s"=>\$progress, "debug=s"=>\$debug, ); die "No src file $src" if(! -f $src); die "No data dir $data_dir" if(! -d $data_dir); set_debug($debug); my $avance=AMC::Gui::Avancement::new($progress,'id'=>$progress_id); my $data=AMC::Data->new($data_dir); my $layout=$data->module('layout'); my $capture=$data->module('capture'); my $timestamp=time(); # how much units in one inch ? %u_in_one_inch=('in'=>1, 'cm'=>2.54, 'mm'=>25.4, 'pt'=>72.27, 'sp'=>65536*72.27, ); # association code_in_amc_file => BOX_ROLE_* my %role=( 'case'=>BOX_ROLE_ANSWER, 'casequestion'=>BOX_ROLE_QUESTIONONLY, 'score'=>BOX_ROLE_SCORE, 'scorequestion'=>BOX_ROLE_SCOREQUESTION, ); sub read_inches { my ($dim)=@_; if($dim =~ /^\s*([+-]?[0-9]*\.?[0-9]*)\s*([a-zA-Z]+)\s*$/) { if($u_in_one_inch{$2}) { return($1 / $u_in_one_inch{$2}); } else { die "Unknown unity: $2 ($dim)"; } } else { die "Unknown dim: $dim"; } } sub ajoute { my ($ar,$val)=@_; if(@$ar) { $ar->[0]=$val if($ar->[0]>$val && $val); $ar->[1]=$val if($ar->[1]<$val && $val); } else { $ar->[0]=$val if($val); $ar->[1]=$val if($val); } } my @pages=(); my @flags=(); my @pre_assoc=(); my $cases; my $page_number=0; my %with_vars=(); sub add_flag { my ($x,$flag)=@_; if($x =~ /^([0-9]+),([0-9]+)$/) { my ($student,$question)=($1,$2); my $f; if(@flags) { my $lf=$flags[$#flags]; if($lf->{'student'}==$student && $lf->{'question'}==$question) { $lf->{'flags'} |= $flag; return; } } push @flags,{'student'=>$student,'question'=>$question,'flags'=>$flag}; } else { debug "ERROR: flag which question? <$x>"; } } debug "Reading $src..."; open(SRC,$src) or die "Unable to open $src : $!"; while() { if(/\\page\{([^\}]+)\}\{([^\}]+)\}\{([^\}]+)\}/) { my $id=$1; my $dx=$2; my $dy=$3; $page_number++; $cases={}; push @pages,{-id=>$id,-p=>$page_number, -dim_x=>read_inches($dx),-dim_y=>read_inches($dy), -cases=>$cases}; } if(/\\tracepos\{(.+?)\}\{([+-]?[0-9.]+[a-z]*)\}\{([+-]?[0-9.]+[a-z]*)\}(?:\{([a-zA-Z]*)\})?$/) { my $i=$1; my $x=read_inches($2); my $y=read_inches($3); my $shape=$4; $i =~ s/^[0-9]+\/[0-9]+://; $cases->{$i}={'bx'=>[],'by'=>[],'flags'=>0,'shape'=>''} if(!$cases->{$i}); ajoute($cases->{$i}->{'bx'},$x); ajoute($cases->{$i}->{'by'},$y); if($cases->{$i}->{'shape'} && $cases->{$i}->{'shape'} ne $shape) { debug "WARNING: different shapes for a single box ($i)"; } else { $cases->{$i}->{'shape'}=$shape; if($shape eq 'oval') { $cases->{$i}->{'flags'} |= BOX_FLAGS_SHAPE_OVAL; } } } if(/\\boxchar\{(.+)\}\{(.*)\}$/) { my $i=$1; my $char=$2; $i =~ s/^[0-9]+\/[0-9]+://; $cases->{$i}={'bx'=>[],'by'=>[],'flags'=>0,'shape'=>''} if(!$cases->{$i}); $cases->{$i}->{char}=$char; } if(/\\dontscan\{(.*)\}/) { add_flag($1,BOX_FLAGS_DONTSCAN); } if(/\\dontannotate\{(.*)\}/) { add_flag($1,BOX_FLAGS_DONTANNOTATE); } if(/\\association\{([0-9]+)\}\{(.*)\}/) { push @pre_assoc,[$1,$2]; } if(/\\with\{(.+?)=(.*)\}/) { $build_vars{$1}=$2; } } close(SRC); sub bbox { my ($c)=@_; return($c->{'bx'}->[0],$c->{'bx'}->[1], $c->{'by'}->[1],$c->{'by'}->[0]); } sub center { my ($c,$xy)=@_; return(($c->{$xy}->[0]+$c->{$xy}->[1])/2); } my $delta=(@pages ? 1/(1+$#pages) : 0); $layout->begin_transaction('MeTe'); $layout->clear_mep; $layout->clear_variables('build:%'); for my $k (keys %build_vars) { $layout->variable("build:$k",$build_vars{$k}); } annotate_source_change($capture); debug "Pre-association..."; for my $pa (@pre_assoc) { $layout->new_association(@$pa); } debug "Writing to database..."; PAGE: for my $p (@pages) { my $diametre_marque=0; my $dmn=0; KEY: for my $k (keys %{$p->{-cases}}) { for(0..1) { $p->{-cases}->{$k}->{'bx'}->[$_] *= $dpi; $p->{-cases}->{$k}->{'by'}->[$_] = $dpi*($p->{-dim_y} - $p->{-cases}->{$k}->{'by'}->[$_]); } if($k =~ /position[HB][GD]$/) { for my $dir ('bx','by') { $diametre_marque+=abs($p->{-cases}->{$k}->{$dir}->[1]-$p->{-cases}->{$k}->{$dir}->[0]); $dmn++; } } } $diametre_marque/=$dmn if($dmn); my @epc=get_epc($p->{-id}); my @ep=@epc[0,1]; $layout->statement('NEWLayout')->execute( @epc, $p->{-p}, $dpi,$dpi*$p->{-dim_x},$dpi*$p->{-dim_y}, $diametre_marque, $layout->source_id($src,$timestamp)); next PAGE if(!$dmn); for my $pos ('HG','HD','BD','BG') { die "Needs position$pos from page $p->{-id}" if(!$p->{-cases}->{'position'.$pos}); } my $c=$p->{-cases}; my $nc=0; for my $pos ('HG','HD','BD','BG') { $nc++; $layout->statement('NEWMark')->execute( @ep,$nc, center($c->{'position'.$pos},'bx'), center($c->{'position'.$pos},'by') ); } if($c->{'nom'}) { $layout->statement('NEWNameField')->execute( @ep,bbox($c->{'nom'})); } for my $k (sort { $a cmp $b } (keys %$c)) { if($k=~/chiffre:([0-9]+),([0-9]+)$/) { $layout->statement('NEWDigit') ->execute(@ep,$1,$2,bbox($c->{$k})); } if($k=~/(case|casequestion|score|scorequestion):(.*):([0-9]+),(-?[0-9]+)$/) { my ($type,$name,$q,$a)=($1,$2,$3,$4); debug "- Box $k"; $layout->question_name($q,$name) if($name ne ''); $layout->statement('NEWBox') ->execute(@ep,$role{$type}, $q,$a,bbox($c->{$k}),$c->{$k}->{'flags'},$c->{$k}->{char}); } } $avance->progres($delta); } debug "Flagging questions..."; for my $f (@flags) { $layout->add_question_flag($f->{'student'},$f->{'question'},BOX_ROLE_ANSWER,$f->{'flags'}); } debug "Ending transaction..."; $layout->end_transaction('MeTe'); $avance->fin(); auto-multiple-choice-1.4.0/AMC-note.pl000077500000000000000000000221171341176102400174520ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use Getopt::Long; use POSIX qw(ceil floor); use AMC::Basic; use AMC::Gui::Avancement; use AMC::Scoring; use AMC::Data; use utf8; my $darkness_threshold=0.1; my $darkness_threshold_up=1.0; my $floor_mark=''; my $null_mark=0; my $perfect_mark=20; my $ceiling=1; my $granularity='0.5'; my $rounding=''; my $data_dir=''; my $postcorrect_student=''; my $postcorrect_copy=''; my $postcorrect_set_multiple=''; my $progres=1; my $progres_id=''; my $debug=''; GetOptions("data=s"=>\$data_dir, "seuil=s"=>\$darkness_threshold, "seuil-up=s"=>\$darkness_threshold_up, "debug=s"=>\$debug, "grain=s"=>\$granularity, "arrondi=s"=>\$rounding_scheme, "notemax=s"=>\$perfect_mark, "plafond!"=>\$ceiling, "notemin=s"=>\$floor_mark, "notenull=s"=>\$null_mark, "postcorrect-student=s"=>\$postcorrect_student, "postcorrect-copy=s"=>\$postcorrect_copy, "postcorrect-set-multiple!"=>\$postcorrect_set_multiple, "progression-id=s"=>\$progres_id, "progression=s"=>\$progres, ); set_debug($debug); # fixes decimal separator ',' potential problem, replacing it with a # dot. for my $x (\$granularity,\$null_mark,\$floor_mark,\$perfect_mark) { $$x =~ s/,/./; $$x =~ s/\s+//; } # Implements the different possible rounding schemes. sub rounding_inf { my $x=shift; return(floor($x)); } sub rounding_central { my $x=shift; return(floor($x+0.5)); } sub rounding_sup { my $x=shift; return(ceil($x)); } my %rounding_function=('i'=>\&rounding_inf,'n'=>\&rounding_central,'s'=>\&rounding_sup); # sets the rounding scheme to use to compute students marks, from # parameter $rounding_scheme if($rounding_scheme) { for my $k (keys %rounding_function) { if($rounding_scheme =~ /^$k/i) { $rounding=$rounding_function{$k}; } } } # Parameter $data_dir is needed! if(! -d $data_dir) { attention("No DATA directory: $data_dir"); die "No DATA directory: $data_dir"; } # Parameter $granularity must be positive. If not, marks rounding is # cancelled. if($granularity<=0) { $granularity=1; $rounding=''; $rounding_scheme=''; debug("Nonpositive grain: rounding off"); } # Uses an AMC::Gui::Avancement object to tell regularly the calling # program how much work we have done so far. my $avance=AMC::Gui::Avancement::new($progres,'id'=>$progres_id); # Connects to the databases capture (to get the students sheets and to # know which boxes have been ticked) and scoring (to write the # computed scores!). my $data=AMC::Data->new($data_dir); my $capture=$data->module('capture'); my $scoring=$data->module('scoring'); my $layout=$data->module('layout'); # Uses an AMC::Scoring object to actually compute the questions # scores. my $score=AMC::Scoring::new('onerror'=>'die', 'data'=>$data, 'seuil'=>$darkness_threshold, 'seuil_up'=>$darkness_threshold_up, ); $avance->progres(0.05); # One only transaction for all the work: $data->begin_transaction('MARK'); # get some useful build variables my $code_digit_pattern=$layout->code_digit_pattern(); # Write the variables values in the database, so that they can be # retrieved later, and clears all the scores that could have been # already computed. annotate_source_change($capture); $scoring->clear_score; $scoring->variable('darkness_threshold',$darkness_threshold); $scoring->variable('darkness_threshold_up',$darkness_threshold_up); $scoring->variable('mark_null',$null_mark); $scoring->variable('mark_floor',$floor_mark); $scoring->variable('mark_max',$perfect_mark); $scoring->variable('ceiling',$ceiling); $scoring->variable('rounding',$rounding_scheme); $scoring->variable('granularity',$granularity); $scoring->variable('postcorrect_student',$postcorrect_student); $scoring->variable('postcorrect_copy',$postcorrect_copy); $scoring->variable('postcorrect_set_multiple',$postcorrect_set_multiple); # Gets the student/copy pairs that has been captured. Each element # from the array @captured_studentcopy is an arrayref containing a different # (student,copy) pair. my @captured_studentcopy=$capture->student_copies(); # We already said that 0.05 of the work has been made, so the # remaining ratio $delta per student/copy is: my $delta=0.95; $delta/=(1+$#captured_studentcopy) if($#captured_studentcopy>=0); # If postcorrect mode is requested, sets the correct answers from the # teacher's copy. if($postcorrect_student) { $scoring->postcorrect($postcorrect_student,$postcorrect_copy, $darkness_threshold,$darkness_threshold_up, $postcorrect_set_multiple); } # Processes each student/copy in turn for my $sc (@captured_studentcopy) { debug "MARK: --- SHEET ".studentids_string(@$sc); # The hash %codes collects the values of the AMCcodes. my %codes=(); # Gets the scoring strategy for current student/copy, including # which answers are correct, from the scoring database. my $ssb=$scoring->student_scoring_base_sorted(@$sc,$darkness_threshold,$darkness_threshold_up); # transmits the main strategy (default strategy options values for # all questions) to the scoring engine. $score->set_default_strategy($ssb->{'main_strategy'}); # The @question_scores collects scores for all questions my @question_scores=(); # Process each question in turn for my $q (@{$ssb->{'questions'}}) { my $question=$q->{question}; # $question is the question numerical ID, and # $q is the question scoring data (see AMC::DataModule::scoring) debug "MARK: QUESTION $question TITLE ".$q->{'title'}; # Uses the scoring engine to score the question... # # $xx is the student score for this question, # # $why will give the reason for this score ("V" means no box # were ticked, for exemple). # # $max_score is the maximum score (score for perfect answers) $score->prepare_question($q); $score->set_type(0); ($xx,$why)=$score->score_question($sc->[0],$q,0); $score->set_type(1); ($max_score)=$score->score_max_question($sc->[0],$q); # If the title of the question is 'codename[N]' (with a numerical # N), then this question represents a digit from a AMCcode, so we # collect the value in the %codes hash. if ($q->{'title'} =~ /^(.*)$code_digit_pattern$/) { my $code_name=$1; my $code_digit=$2; my $chars=$capture-> ticked_chars_pasted(@$sc,$question,$darkness_threshold,$darkness_threshold_up); $chars=$xx if(!defined($chars)); debug "- code($code_name,$code_digit) = '$chars'"; $codes{$code_name}->{$code_digit}=$chars; } if ($q->{'indicative'}) { # If the question is indicative, we don't collect the value in # the @question_scores array $max_score=1; } else { # Otherwise, we collect all scoring results to compute later the # overall aggregated score for the student. push @question_scores,{'score'=>$xx, 'raison'=>$why, 'notemax'=>$max_score, 'sc'=>[@$sc], 'question'=>$question, }; } # Write the scoring results in the scoring database. $scoring->new_score(@$sc,$question,$xx,$max_score,$why); } # Compute the final total score aggregating questions scores my ($total,$max_i)=$score->global_score($scoring,@question_scores); # Now apply rounding scheme my $x; if ($perfect_mark>0) { $x=($perfect_mark-$null_mark)/$granularity*$total/$max_i; } else { $x=$total/$granularity; } $x=&$rounding($x) if($rounding); $x*=$granularity; $x+=$null_mark; # Apply ceiling $x=$perfect_mark if($perfect_mark>0 && $ceiling && ($x-$perfect_mark)*($perfect_mark-$null_mark)>0); # Apply floor if ($floor_mark ne '' && $floor_mark !~ /[a-z]/i) { $x=$floor_mark if(($perfect_mark==0 && $x<$floor_mark) || ($x-$floor_mark)*($perfect_mark-$null_mark)<0); } # Writes the student's final mark in the scoring database $scoring->new_mark(@$sc,$total,$max_i,$x); # Build the AMCcodes values from their digits, and store them in the # scoring database for my $k (keys %codes) { my @i=(keys %{$codes{$k}}); if ($#i >= 0) { my $v=join('',map { $codes{$k}->{$_} } sort { $b <=> $a } (@i)); $scoring->new_code(@$sc,$k,$v); } } # Tell the calling program that we have finished scoring a student $avance->progres($delta); } $data->end_transaction('MARK'); $avance->fin(); auto-multiple-choice-1.4.0/AMC-perl/000077500000000000000000000000001341176102400171045ustar00rootroot00000000000000auto-multiple-choice-1.4.0/AMC-perl/AMC/000077500000000000000000000000001341176102400175045ustar00rootroot00000000000000auto-multiple-choice-1.4.0/AMC-perl/AMC/Annotate.pm000066400000000000000000000674751341176102400216360ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2013-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Annotate; use Gtk3; use List::Util qw(min max sum); use File::Copy; use Unicode::Normalize; use AMC::Path; use AMC::Basic; use AMC::Export; use AMC::Subprocess; use AMC::NamesFile; use AMC::Substitute; use AMC::DataModule::report ':const'; use AMC::DataModule::capture qw/:zone :position/; use AMC::DataModule::layout qw/:flags/; use AMC::Gui::Avancement; use utf8; sub new { my (%o)=(@_); my $self={ data_dir=>'', project_dir=>'', projects_dir=>'', pdf_dir=>'', single_output=>'', filename_model=>'(N)-(ID)', force_ascii=>'', pdf_subject=>'', names_file=>'', names_encoding=>'utf8', association_key=>'', csv_build_name=>'', significant_digits=>1, darkness_threshold=>'', darkness_threshold_up=>'', id_file=>'', sort=>'', annotate_indicatives=>'', position=>'marges', text_color=>'red', line_width=>1, font_name=>'Linux Libertine O 12', dist_to_box=>'1cm', dist_margin=>'5mm', dist_margin_globaltext=>'3mm', symbols=>{'0-0'=>{qw/type none/}, '0-1'=>{qw/type circle color red/}, '1-0'=>{qw/type mark color red/}, '1-1'=>{qw/type mark color blue/}, }, verdict=>'', verdict_question=>'', verdict_question_cancelled=>'', progress=>'', progress_id=>'', compose=>0, pdf_corrected=>'', changes_only=>'', embedded_max_size=>'', embedded_format=>'jpeg', embedded_jpeg_quality=>80, rtl=>'', debug=>(get_debug() ? 1 : 0), }; for my $k (keys %o) { $self->{$k}=$o{$k} if(defined($self->{$k})); } for my $k (grep { /_(dir|file)$/ || /^pdf_/ } (keys %$self)) { utf8::downgrade($self->{$k}); } $self->{type}=($self->{single_output} ? REPORT_SINGLE_ANNOTATED_PDF : REPORT_ANNOTATED_PDF ); # checks that the position option is available $self->{position}=lc($self->{position}); if($self->{position} !~ /^(marges?|case|zones|none)$/i) { debug "ERROR: invalid \: $self->{position}"; $self->{position}='none'; } # chacks that the embedded_format is ok $self->{embedded_format}=lc($self->{embedded_format}); if($self->{embedded_format} !~ /^(jpeg|png)$/i) { debug "ERROR: invalid : $self->{embedded_format}"; $self->{embedded_format}='jpeg'; } # checks that the pdf files exist for my $k (qw/subject corrected/) { if($self->{'pdf_'.$k} && ! -f $self->{'pdf_'.$k}) { debug "WARNING: PDF $k file not found: ".$self->{'pdf_'.$k}; $self->{'pdf_'.$k}=''; } } # force to default value when filename model is empty $self->{filename_model}='(N)-(ID)' if($self->{filename_model} eq ''); # adds pdf extension if not already there if($self->{filename_model} !~ /\.pdf$/i) { debug "Adding pdf extension to $self->{filename_model}"; $self->{filename_model}.='.pdf'; } # if the corrected answer sheet is not given, use the subject # instead. if($self->{compose}==2 && ! -f $self->{pdf_corrected}) { $self->{compose}=1; } # which pdf file will be used as a background when scans are not # available? if($self->{compose}==1) { $self->{pdf_background}=$self->{pdf_subject}; } elsif($self->{compose}==2) { $self->{pdf_background}=$self->{pdf_corrected}; } # set up the object to send progress to calling program $self->{avance}=AMC::Gui::Avancement::new($self->{progress}, 'id'=>$self->{progress_id}) if($self->{progress}); bless $self; return($self); } # units conversion my %units=( in=>1, ft=>12, yd=>36, pt=>1/72, cm=>1/2.54, mm=>1/25.4, m=>1000/25.4, ); sub dim2in { my ($d)=@_; UNITS: for my $u (keys %units) { if($d =~ /^(.*)(?{project_dir}) { $path=proj2abs({'%PROJET',$self->{project_dir}, '%PROJETS',$self->{projects_dir}, '%HOME'=>$ENV{'HOME'}, }, $path); } utf8::downgrade($path); return($path); } # Tests if the report that has already been made is still present and # up to date. If up-to-date, returns the filename. Otherwise, returns # the empty string. sub student_uptodate { my ($self,$student)=@_; my ($filename,$timestamp) =$self->{report}->get_student_report_time(REPORT_ANNOTATED_PDF,@$student); if($filename) { debug "Registered filename ".show_utf8($filename); utf8::encode($filename); my $source_change=$self->{capture}->variable('annotate_source_change'); debug "Registered answer sheet: updated at $timestamp, source change at $source_change"; # we say there is an up-to-date annotated answer sheet if the file # exists and has been built after the last time some result or # configuration variable were changed. debug "Directory ".show_utf8($self->{pdf_dir}); debug "Looking for filename ".show_utf8($filename); my $path="$self->{pdf_dir}/$filename"; if(-f $path && $timestamp>$source_change) { debug "Exists!"; return($filename); } else { debug "NOT up-to-date."; } } else { debug "No registered annotated answer sheet."; } return(''); } # Computes the filename to be used for the student annotated answer # sheet. Returns this filename, and, if there is already a up-to-date # annotated answer sheet, also returns the name of this one. sub pdf_output_filename { my ($self,$student)=@_; $self->needs_data; $self->needs_names; my $f=$self->{filename_model}; debug "F[0]=$f"; # computes student/copy four digits ID and substitutes (N) with it my $ex; if($student->[1]) { $ex=sprintf("%04d:%04d",@$student); } else { $ex=sprintf("%04d",$student->[0]); } $f =~ s/\(N\)/$ex/gi; debug "F[N]=".show_utf8($f); # get student data from the students list file, and substitutes # into filename if($self->{names}) { $self->{data}->begin_read_transaction('rAGN'); my $i=$self->{association}->get_real(@$student); $self->{data}->end_transaction('rAGN'); my $name='XXX'; my $n; debug "Association -> ID=$i"; if(defined($i)) { debug "Name found"; ($n)=$self->{names}->data($self->{association_key},$i,test_numeric=>1); if($n) { $f=$self->{names}->substitute($n,$f); } } debug "F[n]=".show_utf8($f); } else { $f =~ s/-?\(ID\)//gi; } # Substitute all spaces and non-ascii characters from the file name # if the user asked so. if($self->{force_ascii}) { $f=string_to_filename($f,'copy'); debug "F[a]=".show_utf8($f); } # The filename we would like to use id $f, but now we have to check # it is not already used for another annotated file... and register # it. $self->{data}->begin_transaction('rSST'); # check if there is already an up-to-date annotated answer sheet for # this student BEFORE removing the entry from the database (and # recall this filename). my $uptodate_filename=''; if($self->{changes_only}) { $uptodate_filename=$self->student_uptodate($student); } # delete the entry from the database, and build a filename that is # not already registered for another student (the same or similar to # $f). $self->{report}->delete_student_report($self->{type},@$student); $f=$self->{report}->free_student_report($self->{type},$f); $self->{report}->set_student_report($self->{type},@$student,$f,'now'); $self->{data}->end_transaction('rSST'); utf8::encode($f); debug "F[R]=".show_utf8($f); return($f,$uptodate_filename); } sub connects_to_database { my ($self)=@_; # Open connections to the SQLite databases that we will use. $self->{data}=AMC::Data->new($self->{data_dir}); for my $m (qw/layout capture association scoring report/) { $self->{$m}=$self->{data}->module($m); } # If they are not already given by the user, read association_key # and darkness_threshold from the variables in the database. $self->{association_key}=$self->{association}->variable_transaction('key_in_list'); $self->{darkness_threshold}=$self->{scoring} ->variable_transaction('darkness_threshold') if(!$self->{darkness_threshold}); $self->{darkness_threshold_up}=$self->{scoring} ->variable_transaction('darkness_threshold_up') if(!$self->{darkness_threshold_up}); # But darkness_threshold_up is not defined for old projects… set it # to an inactive value in this case $self->{darkness_threshold_up}=1.0 if(!$self->{darkness_threshold_up}); } sub error { my ($self,$message)=@_; debug_and_stderr("**ERROR** $message"); } sub needs_data { my ($self)=@_; if(!$self->{data}) { $self->connects_to_database; } } sub connects_students_list { my ($self)=@_; $self->needs_data(); # If given, opens the students list and read it. if(-f $self->{names_file}) { $self->{names}=AMC::NamesFile::new($self->{names_file}, "encodage"=>$self->{names_encoding}, "identifiant"=>$self->{csv_build_name}); debug "Keys in names file: ".join(", ",$self->{names}->heads()); } else { debug "Names file not found: $self->{names_file}"; } # Set up a AMC::Substitute object that will be used to substitute # marks, student name, and so on in the verdict strings for question # scores and global header. $self->{subst}=AMC::Substitute::new('names'=>$self->{names}, 'scoring'=>$self->{scoring}, 'assoc'=>$self->{association}, 'name'=>'', 'chsign'=>$self->{significant_digits}, ); } sub needs_names { my ($self)=@_; if(!$self->{subst}) { $self->connects_students_list; } } # get a sorted list of all students, using AMC::Export sub compute_sorted_students_list { my ($self)=@_; if(!$self->{sorted_students}) { # Use AMC::Export that can do the work for us... my $sorted_students=AMC::Export->new(); $sorted_students->set_options('fich', 'datadir'=>$self->{data_dir}, 'noms'=>$self->{names_file}); $sorted_students->set_options('noms', 'encodage'=>$self->{names_encoding}, 'useall'=>0); $sorted_students->set_options('sort', 'keys'=>$self->{sort}); $sorted_students->pre_process(); $self->{sorted_students}=$sorted_students; } } # sort the students so that they are ordered as in the sorted_students # list sub sort_students { my ($self)=@_; $self->compute_sorted_students_list(); my %include=map { studentids_string(@$_)=>1 } (@{$self->{students}}); $self->{students}=[ map { [ $_->{'student'},$_->{'copy'} ] } grep { $include{studentids_string($_->{'student'},$_->{'copy'})} } (@{$self->{sorted_students}->{'marks'}}) ]; } # get the students to process from a file and return the number of # students sub get_students_from_file { my ($self)=@_; my @students; # loads a list of students from a plain text file (one per line) if(-f $self->{id_file}) { my @students; open(NUMS,$self->{id_file}); while() { if(/^([0-9]+):([0-9]+)$/) { push @students,[$1,$2]; } elsif(/^([0-9]+)$/) { push @students,[$1,0]; } } close(NUMS); $self->{students}=\@students; return(1+$#students); } else { return(0); } } # get the students to process from capture data (all students that # have some data capture -- scan or manual -- on at least one page) sub get_students_from_data { my ($self)=@_; $self->needs_data; $self->{capture}->begin_read_transaction('gast'); $self->{students}=$self->{capture}->dbh ->selectall_arrayref($self->{capture}->statement('studentCopies')); $self->{capture}->end_transaction('gast'); return(1+$#{$self->{students}}); } # get the students to process sub get_students { my ($self)=@_; my $n=$self->get_students_from_file || $self->get_students_from_data; # sort this list if we are going to make an unique annotated # file with all the students' copies (and if a sort key is given) if($n>1 && $self->{single_output} && $self->{sort}) { $self->sort_students(); } debug "Number of students to process: $n"; return($n); } # get dimensions of a subject page sub get_dimensions { my ($self)=@_; $self->needs_data; # get width, height and DPI from a subject page (these values should # be the same for all pages). $self->{data}->begin_read_transaction("aDIM"); ($self->{width},$self->{height},undef,$self->{dpi}) =$self->{layout}->dims($self->{layout}->random_studentPage); $self->{data}->end_transaction("aDIM"); # Now, convert all dist_* lenghts to a number of points. if(!$self->{unit_pixels}) { for my $dd (map { \$self->{'dist_'.$_} } (qw/to_box margin margin_globaltext/)) { $$dd=dim2in($$dd); } $self->{unit_pixels}=1; } } sub needs_dims { my ($self)=@_; if(!$self->{dpi}) { $self->get_dimensions; } } # subprocess (call to AMC-buildpdf) initialisation sub process_start { my ($self)=@_; $self->needs_dims; $self->{process}=AMC::Subprocess::new(mode=>'buildpdf'); $self->{process}->set('args', ['-d',$self->{dpi}, '-w',$self->{width}, '-h',$self->{height}]); $self->command("embedded ".$self->{embedded_format}); if($self->{embedded_max_size} =~ /([0-9]*)x([0-9]*)/i) { my $width=$1; my $height=$2; $self->command("max width ".($width ? $width : 0)); $self->command("max height ".($height ? $height : 0)); } $self->command("jpeg quality ".$self->{embedded_jpeg_quality}); $self->command("margin ".$self->{dist_margin}); $self->command("debug") if($self->{debug}); } # send a command to the subprocess sub command { my ($self,@command)=@_; $self->{process}->commande(@command); } # Sends a (maybe multi-line) text to AMC-buildpdf to be used in the # following command. sub stext { my ($self,$text)=@_; utf8::encode($text); $self->command("stext begin\n$text\n__END__"); } # gets RGB values (from 0.0 to 1.0) from color text description sub color_rgb { my ($s)=@_; my $col=Gtk3::Gdk::Color::parse($s); if($col) { return($col->red/65535,$col->green/65535,$col->blue/65535); } else { debug "Color parse error: $col"; return(.5,.5,.5); } } # set color for drawing sub set_color { my ($self,$color_string)=@_; $self->command(join(' ', "color", color_rgb($color_string))); } # inserts a page from a pdf file sub insert_pdf_page { my ($self,$pdf_path,$page)=@_; if($pdf_path ne $self->{loaded_pdf}) { # If this PDF file is not already loaded by AMC-buildpdf, load it. $self->command("load pdf $pdf_path"); $self->{loaded_pdf}=$pdf_path; } $self->command("page pdf $page"); } # get a list of pages for a particular student sub student_pages { my ($self,$student)=@_; return($self->{layout}->pages_info_for_student($student->[0],enter_tag=>1)); } # Inserts the background for an annotated page. Returns: # # -1 if no page were inserted (without compose option, or when the # page from the subject is not available) # # 0 if a scan is used # # 1 if a subject page with no answer boxes is used # # 2 if a subject page with answer boxes is used sub page_background { my ($self,$student,$page)=@_; # First get the scan, if available... my $page_capture=$self->{capture}->get_page($student->[0],$page->{page},$student->[1]) || {}; my $scan=''; $scan=$self->absolute_path($page_capture->{src}) if($page_capture->{src}); if(-f $scan) { # If the scan is available, use it (with AMC-buildpdf "page png" # or "page img" command, depending on the file type). The matrix # that transforms coordinates from subject to scan has been # computed when automatic data capture was made. It is sent to # AMC-buildpdf. my $img_type='img'; if(AMC::Basic::file_mimetype($scan) eq 'image/png') { $img_type='png'; } $self->command("page $img_type $scan"); $self->command(join(' ', "matrix",map { $page_capture->{$_} } (qw/a b c d e f/))); return(0); } else { if($scan) { debug "WARNING: Registered scan \"$scan\" was not found."; } # If there is no scan, if($page->{enter} && -f $self->{pdf_subject}) { # If the page contains something to be filled by the student # (either name field or boxes), inserts the page from the PDF # subject. debug "Using subject page."; $self->insert_pdf_page($self->{pdf_subject},$page->{subjectpage}); $self->command("matrix identity"); return(2); } else { if(!$page->{enter}) { debug "Page without fields."; } # With option, pages without anything to be filled # (only subject) are added, from the corrected PDF if available # (then the student will see the correct answers easily on the # annotated answer sheet). if(-f $self->{pdf_background}) { $self->insert_pdf_page($self->{pdf_background},$page->{subjectpage}); return(1); } } return(-1); } } # draws one symbol. $b is one row from the capture:pageZones SQL query # (from which we use only the id_a=question, id_b=answer and role # attributes). When $tick is true, boxes are tickedas the student did # (this can be usefull for manual data capture for example, when the # background is not the scan but the PDF subject, and we want to # illustrate which boxes has been ticked by the student). sub draw_symbol { my ($self,$student,$b,$tick)=@_; my $p_strategy=$self->{scoring}->unalias($student->[0]); my $q=$b->{'id_a'}; # question number my $r=$b->{'id_b'}; # answer number my $indic=$self->{scoring}->indicative($p_strategy,$q); # is it an indicative question? # ticked on this scan? my $cochee=$self->{capture}->ticked(@$student, $q,$r, $self->{darkness_threshold}, $self->{darkness_threshold_up}); # get box position on subject my $box=$self->{layout}->get_box_info($student->[0],$q,$r,$b->{role}); # when the subject background is used instead of the scan, darken # boxes that have been ticked by the student if($tick && $cochee) { debug "Tick."; $self->set_color('black'); $self->command(join(' ',($self->{darkness_threshold_up}<1 ? 'mark' : 'fill'), map { $box->{$_} } (qw/xmin xmax ymin ymax/) )); } return if($indic && !$self->{annotate_indicatives}); # to be ticked? my $bonne=$self->{scoring}->correct_answer($p_strategy,$q,$r); debug "Q=$q R=$r $bonne-$cochee"; # get symbol to draw my $sy=$self->{symbols}->{"$bonne-$cochee"}; if ($box->{flags} & BOX_FLAGS_DONTANNOTATE) { debug "This box is flagged \"don't annotate\": skipping"; } else { if ($sy->{type} =~ /^(circle|mark|box)$/) { # tells AMC-buildpdf to draw the symbol with the right color $self->set_color($sy->{color}); $self->command(join(' ',$sy->{type}, map { $box->{$_} } (qw/xmin xmax ymin ymax/) )); } elsif ($sy->{type} eq 'none') { } else { debug "Unknown symbol type ($bonne-$cochee): $sy->{type}"; } } # records box position so that question scores can be # well-positioned $self->{question}->{$q}={} if(!$self->{question}->{$q}); push @{$self->{question}->{$q}->{'x'}},($box->{xmin}+$box->{xmax})/2; push @{$self->{question}->{$q}->{'y'}},($box->{ymin}+$box->{ymax})/2; } # draws symbols on one page sub page_symbols { my ($self,$student,$page,$tick)=@_; # clears boxes positions data for the page $self->{question}={}; # goes through all the boxes on the page # the question boxes (in separate answer sheet mode) if($self->{compose}==1) { my $sth=$self->{layout}->statement('pageQuestionBoxes'); $sth->execute($student->[0],$page); while(my $box=$sth->fetchrow_hashref) { $self->draw_symbol($student,$box,1); } } # the answer boxes that were captured my $sth=$self->{capture}->statement('pageZones'); $sth->execute($student->[0],$page,$student->[1],ZONE_BOX); while(my $box=$sth->fetchrow_hashref) { $self->draw_symbol($student,$box,$tick); } } # computes the score text for a particular question sub qtext { my ($self,$student,$question)=@_; my $result=$self->{scoring}->question_result(@$student,$question); my $text; # begins with the right verdict version depending on if the question # result was cancelled or not. if ($result->{'why'} =~ /c/i) { $text=$self->{verdict_question_cancelled}; } else { $text=$self->{verdict_question}; } # substitute scores values $text =~ s/\%[S]/$result->{'score'}/g; $text =~ s/\%[M]/$result->{'max'}/g; $text =~ s/\%[W]/$result->{'why'}/g; $text =~ s/\%[s]/$self->{subst}->format_note($result->{'score'})/ge; $text =~ s/\%[m]/$self->{subst}->format_note($result->{'max'})/ge; # evaluates the result my $te=eval($text); if ($@) { debug "Annotation: $text"; debug "Evaluation error $@"; } else { $text=$te; } return($text); } # mean of the y positions of the boxes for one question sub q_ymean { my ($self,$q)=@_; return(sum(@{$self->{question}->{$q}->{'y'}})/(1+$#{$self->{question}->{$q}->{'y'}})); } # where to write question status? # 1) scores written in the left margin sub qtext_position_marge { my ($self,$student,$page,$question)=@_; my $y=$self->q_ymean($question); if ($self->{rtl}) { return("stext margin 1 $y 1 0.5"); } else { return("stext margin 0 $y 0 0.5"); } } # 2) scores written in one of the margins (left or right), depending # on the position of the boxes. This mode is often used when the # subject is in a 2-column layout. sub qtext_position_marges { my ($self,$student,$page,$q)=@_; # fist extract the y coordinates of the boxes in the left column my $left=1; my @y=map { $self->{question}->{$q}->{'y'}->[$_] } grep { $self->{rtl} xor ( $self->{question}->{$q}->{'x'}->[$_] <= $self->{width}/2 ) } (0..$#{$self->{question}->{$q}->{'x'}} ); if (!@y) { # if empty, use the right column $left=0; @y=map { $self->{question}->{$q}->{'y'}->[$_] } grep { $self->{rtl} xor ( $self->{question}->{$q}->{'x'}->[$_] > $self->{width}/2 ) } (0..$#{$self->{question}->{$q}->{'x'}} ); } # set the x-position to the left or right margin my $jx=1; $jx=0 if($left xor $self->{rtl}); # set the y-position to the mean of y coordinates of the # boxes in the corresponding column my $y=sum(@y)/(1+$#y); return("stext margin $jx $y $jx 0.5"); } # 3) scores written at the side of all the boxes sub qtext_position_case { my ($self,$student,$page,$q)=@_; my $x=max(@{$self->{question}->{$q}->{'x'}}) + ($self->{rtl} ? 1: -1)*$self->{dist_to_box}*$self->{dpi}; my $y=$self->q_ymean($q); return("stext $x $y 0 0.5"); } # 4) scores written in the zone defined by the source file sub qtext_position_zones { my ($self,$student,$page,$q)=@_; my @c=(); for my $b ($self->{layout}->score_zones($student->[0],$page,$q)) { push @c,"stext rectangle ". join(" ",map { $b->{$_} } (qw/xmin xmax ymin ymax/)); } return(\@c); } # writes one question score sub write_qscore { my ($self,$student,$page,$question)=@_; return if($self->{position} eq 'none'); # no score to write for indicative questions if($self->{scoring}->indicative($p_strategy,$q)) { debug "Indicative question: no score to write"; return; } my $text=$self->qtext($student,$question); my $xy="qtext_position_".$self->{position}; my $command=$self->$xy($student,$page,$question); if(ref($command) eq 'ARRAY') { if($#$command>=0) { $self->stext($text); for my $c (@$command) { $self->command($c) if($c); } } } elsif($command) { $self->stext($text); $self->command($command); } } # writes question scores on one page sub page_qscores { my ($self,$student,$page)=@_; if ($self->{position} ne 'none') { $self->needs_names; $self->set_color($self->{text_color}); # go through all questions present on the page (recorded while # drawing symbols) for my $q (sort { $a cmp $b } (keys %{$self->{question}})) { $self->write_qscore($student,$page,$q); } } } # draws the page header (only on the first page) sub page_header { my ($self,$student)=@_; if(!$self->{header_drawn}) { $self->needs_names; $self->set_color($self->{text_color}); $self->command("matrix identity"); $self->stext($self->{subst}->substitute($self->{verdict},@$student)); $self->command("stext " .($self->{rtl} ? $self->{width}-$self->{dist_margin_globaltext}*$self->{dpi} :$self->{dist_margin_globaltext}*$self->{dpi}) ." ".($self->{dist_margin_globaltext}*$self->{dpi})." " .($self->{rtl}?"1.0":"0.0")." 0.0"); $self->{header_drawn}=1; } } # annotate a single page sub student_draw_page { my ($self,$student,$page)=@_; debug "Processing page $student->[0]:$student->[1] page $page->{page} ..."; my $draw=$self->page_background($student,$page); if($draw >= 0) { $self->command("line width $self->{line_width}"); $self->command("font name $self->{font_name}"); $self->page_symbols($student,$page->{page},$draw>0); $self->page_qscores($student,$page->{page}); $self->command("matrix identity"); $self->page_header($student); } else { debug "Nothing to draw for this page"; } } # process a student copy sub process_student { my ($self,$student)=@_; debug "Processing student $student->[0]:$student->[1]"; # Computes the filename to use, and check that there is no # up-to-date version of the annotated answer sheet (if so, simply # keep or rename the file). if(!$self->{single_output}) { my ($f,$f_ok)=$self->pdf_output_filename($student); debug "Directory ".show_utf8($self->{pdf_dir}); debug "Dest file ".show_utf8($f); debug "Existing ".show_utf8($f_ok); my $path=$self->{pdf_dir}."/$f"; if($f_ok ne '') { # we only need to move the file! debug "The file is up-to-date"; if($f ne $f_ok) { debug "... but has to be moved: $f_ok --> $f"; my $path_ok=$self->{pdf_dir}."/$f_ok"; move($path_ok,$path) || debug "ERROR: moving the annotated file in directory $self->{pdf_dir} from $f_ok to $f"; } return(); } $self->command("output $path"); } # Go through all the pages for the student. $self->{data}->begin_read_transaction('aOST'); $self->{header_drawn}=0; for my $page ($self->student_pages($student)) { $self->student_draw_page($student,$page); } $self->{data}->end_transaction('aOST'); } # All processing sub go { my ($self)=@_; my $n=$self->get_students(); debug "STUDENTS TO PROCESS: $n\n"; if($n>0) { $self->process_start; # With option , all annotated answer sheets are # made in a single PDF file. We open this file. $self->command("output ".$self->{pdf_dir}."/".$self->{single_output}) if($self->{single_output}); # Loop over students... for my $student (@{$self->{students}}) { $self->process_student($student); $self->{avance}->progres(1/$n) if($self->{avance}); } } } # quit! sub quit { my ($self)=@_; $self->{process}->ferme_commande if($self->{process}); $self->{avance}->fin() if($self->{avance}); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Basic.pm.in000066400000000000000000000464301341176102400214770ustar00rootroot00000000000000# -*- perl -*- # # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Basic; use Locale::gettext ':libintl_h'; use File::Temp; use File::Spec; use IO::File; use Fcntl qw(:flock :seek); use XML::Writer; use XML::Simple; use POSIX qw/strftime/; use Encode; use Module::Load; use Module::Load::Conditional qw/check_install can_load/; use Glib qw/TRUE FALSE/; use constant { COMBO_ID => 1, COMBO_TEXT => 0, }; BEGIN { use Exporter (); our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); @ISA = qw(Exporter); @EXPORT = qw( &perl_module_search &amc_specdir &get_sty &file2id &id2idf &get_ep &get_epo &get_epc &get_qr &file_triable &sort_from_columns &sort_string &sort_num &attention &model_id_to_iter &commande_accessible &magick_module &use_gm_command &magick_perl_module &debug &debug_raw &debug_and_stderr &debug_pm_version &set_debug &get_debug &debug_file &use_gettext &clear_old &new_filename &pack_args &unpack_args &__ &__p &translate_column_title &translate_id_name &pageids_string &studentids_string &studentids_string_filename &format_date &cb_model &get_active_id &COMBO_ID &COMBO_TEXT &check_fonts &amc_user_confdir &use_amc_plugins &find_latex_file &file_mimetype &file_content &amc_component &annotate_source_change &join_nonempty &string_to_usascii &string_to_filename &show_utf8 &path_to_filename &free_disk_mo); %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ], # your exported package globals go here, # as well as any optionally exported functions @EXPORT_OK = qw(); } # --------------------------------------------------- # for path guess with local installation my $amc_base_path; if($ENV{'AMCBASEDIR'}) { $amc_base_path=$ENV{'AMCBASEDIR'}; } else { $amc_base_path=__FILE__; $amc_base_path =~ s|/Basic\.pm$||; $amc_base_path =~ s|/AMC$||; $amc_base_path =~ s|/perl$||; } sub amc_adapt_path { my %oo=@_; my @p=(); my $r=''; push @p,$oo{'path'} if($oo{'path'}); push @p,map { "$amc_base_path/$_" } (@{$oo{'locals'}}) if($oo{'locals'}); push @p,@{$oo{'alt'}} if($oo{'alt'}); if($oo{'file'}) { TFILE: for(@p) { if( -f "$_/$oo{'file'}" ) { $r="$_/$oo{'file'}";last TFILE; } } } else { TDIR: for(@p) { if( -d ) { $r=$_;last TDIR; } } } return $r; } # --------------------------------------------------- %install_dirs=( 'lib'=>"@/MODSDIR/@", 'libexec'=>"@/MODSDIR/@/exec", 'libperl'=>"@/MODSDIR/@/perl", 'icons'=>"@/ICONSDIR/@", 'models'=>"@/MODELSDIR/@", 'doc/auto-multiple-choice'=>"@/DOCDIR/@", 'locale' => "@/LOCALEDIR/@", ); sub amc_specdir { my ($class)=@_; if($install_dirs{$class}) { return(amc_adapt_path( 'path'=>$install_dirs{$class}, 'locals'=>[$class,'.'], )); } else { die "Unknown class for amc_specdir: $class"; } } sub perl_module_search { my ($prefix)=@_; $prefix =~ s/::/\//g; my %mods=(); for my $r (@INC) { my $loc=$r.'/'.$prefix; if(-d $loc) { opendir(my $dh, $loc); for(grep { /\.pm$/i && -f "$loc/$_" } readdir($dh)) { s/\.pm$//i; $mods{$_}=1; } closedir $dh; } } return(sort { $a cmp $b } keys %mods); } # peut-on acceder a cette commande par exec ? sub commande_accessible { my $c=shift; if(ref($c) eq 'ARRAY') { for my $u (@$c) { return($u) if($u && commande_accessible($u)); } return(undef); } else { $c =~ s/(?<=[^\s])\s.*//; $c =~ s/^\s+//; if($c =~ /^\//) { return (-x $c); } else { $ok=''; for (split(/:/,$ENV{'PATH'})) { $ok=1 if(-x "$_/$c"); } return($ok); } } } my $gm_ok=commande_accessible('gm'); sub magick_module { my ($m)=@_; if($gm_ok) { return('gm',$m); } else { return($m); } } sub use_gm_command { return($gm_ok); } my $magick_pmodule=''; sub magick_perl_module { my ($dont_load_it)=@_; if(!$magick_pmodule) { TEST: for my $m (qw/Graphics::Magick Image::Magick/) { if(check_install(module=>$m)) { $magick_pmodule=$m; last TEST; } } if(!$magick_pmodule) { debug(("*" x 85), "ERROR: none of the perl modules Graphics::Magick and Image::Magick are available!", "AMC won't work properly.", ("*" x 85)); } if($magick_pmodule && !$dont_load_it) { load($magick_pmodule); debug_pm_version($magick_pmodule); } } return($magick_pmodule); } # gets style file location sub join_nonempty { my ($sep,@a)=@_; return(join($sep,grep { $_ } @a)); } sub get_sty { my @r=(); open(WH,"-|","kpsewhich","-all","automultiplechoice.sty") or die "Can't exec kpsewhich: $!"; while() { chomp; push @r,$_; } close WH; return(@r); } sub file2id { my $f=shift; if($f =~ /^[a-z]*-?([0-9]+)-([0-9]+)-([0-9]+)/) { return(sprintf("+%d/%d/%d+",$1,$2,$3)); } else { return($f); } } sub id2idf { my ($id,%oo)=@_; $id =~ s/[\+\/]+/-/g; $id =~ s/^-+//; $id =~ s/-+$//; $id =~ s/([0-9]+-[0-9]+)-.*/$1/ if($oo{'simple'}); return($id); } sub get_qr { my $k=shift; if($k =~ /([0-9]+)\.([0-9]+)/) { return($1,$2); } else { die "Unparsable Q/A key: $k"; } } sub get_epo { my $id=shift; if($id =~ /^\+?([0-9]+)\/([0-9]+)\/([0-9]+)\+?$/) { return($1,$2); } else { return(); } } sub get_epc { my $id=shift; if($id =~ /^\+?([0-9]+)\/([0-9]+)\/([0-9]+)\+?$/) { return($1,$2,$3); } else { return(); } } sub get_ep { my $id=shift; my @r=get_epo($id); if(@r) { return(@r); } else { die "Unparsable ID: $id"; } } sub file_triable { my $f=shift; if($f =~ /^[a-z]*-?([0-9]+)-([0-9]+)-([0-9]+)/) { return(sprintf("%50d-%30d-%40d",$1,$2,$3)); } else { return($f); } } sub sort_num { my ($liststore, $itera, $iterb, $sortkey) = @_; my $a = $liststore->get ($itera, $sortkey); my $b = $liststore->get ($iterb, $sortkey); $a='' if(!defined($a)); $b='' if(!defined($b)); my $para=$a =~ s/^\((.*)\)$/$1/; my $parb=$b =~ s/^\((.*)\)$/$1/; $a=0 if($a !~ /^-?[0-9.]+$/); $b=0 if($b !~ /^-?[0-9.]+$/); return($parb <=> $para || $a <=> $b); } sub sort_string { my ($liststore, $itera, $iterb, $sortkey) = @_; my $a = $liststore->get ($itera, $sortkey); my $b = $liststore->get ($iterb, $sortkey); $a='' if(!defined($a)); $b='' if(!defined($b)); return($a cmp $b); } sub sort_from_columns { my ($liststore, $itera, $iterb, $sortkeys) = @_; my $r=0; SK:for my $c (@$sortkeys) { my $a = $liststore->get ($itera, $c->{'col'}); my $b = $liststore->get ($iterb, $c->{'col'}); if($c->{'type'} =~ /^n/) { $a=0 if(!defined($a)); $b=0 if(!defined($b)); $r=$a <=> $b; } else { $a='' if(!defined($a)); $b='' if(!defined($b)); $r=$a cmp $b; } last SK if($r!=0); } return($r); } sub attention { my @l=(); my $lm=0; for my $u (@_) { push @l,split(/\n/,$u); } for my $u (@l) { $lm=length($u) if(length($u)>$lm); } print "\n"; print "*" x ($lm+4)."\n"; for my $u (@l) { print "* ".$u.(" " x ($lm-length($u)))." *\n"; } print "*" x ($lm+4)."\n"; print "\n"; } sub bon_id { #print join(" --- ",@_),"\n"; my ($l,$path,$iter,$data)=@_; my ($result,%constraints)=@$data; my $ok=1; for my $col (keys %constraints) { if($col =~ /^re:(.*)$/) { my $k=$1; $ok=0 if($l->get($iter,$k) !~ /$constraints{$col}/); } else { $ok=0 if($l->get($iter,$col) ne $constraints{$col}); } } if($ok) { $$result=$iter->copy; return(1); } else { return(0); } } sub model_id_to_iter { my ($cl,%constraints)=@_; my $result=undef; $cl->foreach(\&bon_id,[\$result,%constraints]); return($result); } # aide au debogage my $amc_debug=''; my $amc_debug_fh=''; my $amc_debug_filename=''; sub debug_general_info { print $amc_debug_fh "This is AutoMultipleChoice, version @/PACKAGE_V_DEB/@ (@/PACKAGE_V_VC/@)\n"; print $amc_debug_fh "Perl: $^X $^V\n"; print $amc_debug_fh "\n".("=" x 40)."\n\n"; if(commande_accessible('convert')) { open(VERS,"-|",'convert','-version'); while() { chomp; print $amc_debug_fh "$_\n"; } close(VERS); } else { print $amc_debug_fh "ImageMagick: not found\n"; } print $amc_debug_fh ("=" x 40)."\n\n"; if(commande_accessible('gm')) { open(VERS,"-|",'gm','-version'); while() { chomp; print $amc_debug_fh "$_\n"; } close(VERS); } else { print $amc_debug_fh "GraphicsMagick: not found\n"; } print $amc_debug_fh ("=" x 40)."\n\n"; } sub debug_file { return($amc_debug ? $amc_debug_filename : ''); } sub debug_raw { my @s=@_; return if(!$amc_debug); for my $l (@s) { $l=$l."\n" if($l !~ /\n$/); if($amc_debug_filename eq 'stderr' || $amc_debug_filename eq 'stdout') { print $amc_debug_fh $l; } else { flock($amc_debug_fh, LOCK_EX); $amc_debug_fh->sync; seek($amc_debug_fh, 0, SEEK_END); print $amc_debug_fh $l; flock($amc_debug_fh, LOCK_UN); } } } sub debug { my @s=@_; return if(!$amc_debug); for my $l (@s) { my @t = times(); debug_raw(sprintf("[%7d,%7.02f] ",$$,$t[0]+$t[1]+$t[2]+$t[3]).$l); } } sub debug_and_stderr { my @s=@_; debug(@s); if(!($amc_debug && $amc_debug_filename eq 'stderr')) { for(@s) { print STDERR "$_\n"; } } } sub debug_pm_version { my ($module)=@_; my $version; if (defined($version = $module->VERSION())) { debug "[VERSION] $module: $version"; } } my @debug_memory=(); sub next_debug { push @debug_memory,@_; } local *AMC_STDERR_BACKUP; sub set_debug { my ($debug)=@_; if($debug) { my $empty=0; *AMC_STDERR_BACKUP=*STDERR; if($debug =~ /^(1|yes)$/i) { # Continue with already used file $debug=$amc_debug_filename || 'new'; } if($debug eq 'stderr') { $amc_debug_fh=*STDERR; $amc_debug_filename='stderr'; } elsif($debug eq 'stdout') { $amc_debug_fh=*STDOUT; $amc_debug_filename='stdout'; } else { # Use a file for debug log if($debug =~ /^(new)$/i) { # Create new file $empty=1; $amc_debug_fh = new File::Temp(TEMPLATE =>'AMC-DEBUG-XXXXXXXX', SUFFIX => '.log', UNLINK=>0, DIR=>File::Spec->tmpdir); $amc_debug_filename=$amc_debug_fh->filename; } else { # Use file given as argument $empty = (!-s $debug); $amc_debug_fh=new IO::File; $amc_debug_filename=$debug; $amc_debug_fh->open($debug,">>"); } $amc_debug_fh->autoflush(1); } binmode $amc_debug_fh; *STDERR=$amc_debug_fh; $amc_debug=1; debug("[".$$."]>>"); debug_general_info() if($empty); debug(@debug_memory); @debug_memory=(); } else { # Leave debugging mode… *STDERR=*AMC_STDERR_BACKUP if($amc_debug); $amc_debug=0; } } sub get_debug { return($amc_debug); } # noms de fichiers absolus ou relatifs sub clear_old { my ($type,@f)=@_; for my $file (@f) { if(-f $file) { debug "Clearing old $type file: $file"; unlink($file); } elsif(-d $file) { debug "Clearing old $type directory: $file"; opendir(my $dh, $file) || debug "ERROR: can't opendir $file: $!"; my @content = grep { -f $_ } map { "$file/$_" } readdir($dh); closedir $dh; debug "Removing ".(1+$#content)." files."; unlink(@content); } } } sub new_filename_compose { my ($prefix,$suffix,$n)=@_; $suffix='' if(!$suffix); my $file; do { $n++; $file=$prefix."_".sprintf("%04d",$n).$suffix; utf8::downgrade($file); } while(-e $file); return($file); } sub new_filename { my ($file)=@_; utf8::downgrade($file); if(! -e $file) { return($file); } elsif($file =~ /^(.*?)_([0-9]+)(\.[a-z0-9]+)?$/i) { return(new_filename_compose($1,$3,$2)); } elsif($file =~ /^(.*?)(\.[a-z0-9]+)?$/i) { return(new_filename_compose($1,$2,0)); } else { return(new_filename_compose($file,'',0)); } } sub pack_args { my @args=@_; $pack_fh = new File::Temp(TEMPLATE =>'AMC-PACK-XXXXXXXX', SUFFIX => '.xml', UNLINK=>1, DIR=>File::Spec->tmpdir); binmode($pack_fh,':utf8'); my $writer = new XML::Writer(OUTPUT=>$pack_fh, ENCODING=>'UTF-8', DATA_MODE=>1, DATA_INDENT=>2); $writer->xmlDecl('UTF-8'); $writer->startTag('arguments'); for(@args) { $writer->dataElement('arg',$_); } $writer->endTag('arguments'); my $fn=$pack_fh->filename; $pack_fh->close; return('--xmlargs',$fn); } sub unpack_args { my @args=@_; if($args[0] eq '--xmlargs') { shift(@args); my $file=shift(@args); my $xa=XMLin($file,'ForceArray'=>1,'SuppressEmpty'=>'')->{'arg'}; unshift(@args,@$xa); next_debug("Unpacked args: ".join(' ',@args)); } return(@args); } my $localisation; my %titles=(); my %id_names=(); sub use_gettext { $localisation=Locale::gettext->domain("auto-multiple-choice"); # For portable installs if(! -f ($localisation->dir()."/fr/LC_MESSAGES/auto-multiple-choice.mo")) { $localisation->dir(amc_adapt_path( 'locals'=>['locale'], 'alt'=>[amc_specdir('locale'), $localisation->dir()], )); } init_translations(); } sub init_translations { %titles=( # TRANSLATORS: you can omit the [...] part, just here to explain context 'nom'=>__p("Name [name column title in exported spreadsheet]"), # TRANSLATORS: you can omit the [...] part, just here to explain context 'note'=>__p("Mark [mark column title in exported spreadsheet]"), # TRANSLATORS: you can omit the [...] part, just here to explain context 'copie'=>__p("Exam [exam number column title in exported spreadsheet]"), # TRANSLATORS: you can omit the [...] part, just here to explain context 'total'=>__p("Score [total score column title in exported spreadsheet]"), # TRANSLATORS: you can omit the [...] part, just here to explain context 'max'=>__p("Max [maximum score column title in exported spreadsheet]"), ); %id_names=( # TRANSLATORS: you can omit the [...] part, just here to explain context 'max'=>__p("max [maximum score row name in exported spreadsheet]"), # TRANSLATORS: you can omit the [...] part, just here to explain context 'moyenne'=>__p("mean [means of scores row name in exported spreadsheet]"), ); } sub translate_column_title { my ($k)=@_; return($titles{$k} ? $titles{$k} : $k); } sub translate_id_name { my ($k)=@_; return($id_names{$k} ? $id_names{$k} : $k); } sub format_date { my ($time)=@_; return(strftime("%x %X",localtime($time))); } sub pageids_string { my ($student,$page,$copy,%oo)=@_; my $s=$student.'/'.$page .($copy ? ':'.$copy : ''); $s =~ s/[^0-9]/-/g if($oo{'path'}); return($s); } sub studentids_string { my ($student,$copy)=@_; $student='' if(!defined($student)); return($student.($copy ? ':'.$copy : '')); } sub studentids_string_filename { my ($student,$copy)=@_; $student='' if(!defined($student)); return($student.($copy ? '-'.$copy : '')); } sub annotate_source_change { my ($capture,$transaction)=@_; my $t=time(); debug "Annotate source has changed! Time=$t"; $capture->begin_transaction('asCh') if($transaction); $capture->variable('annotate_source_change',$t); $capture->end_transaction('asCh') if($transaction); } sub __($) { return($localisation->get(shift)); } sub __p($) { my $str=$localisation->get(shift); $str =~ s/\s+\[.*\]\s*$//; return($str); } ### modeles combobox sub cb_model { my @texte=(@_); my $cs=Gtk3::ListStore->new ('Glib::String','Glib::String'); my $k; my $t; while(($k,$t)=splice(@texte,0,2)) { $cs->set($cs->append, COMBO_ID,$k, COMBO_TEXT,$t); } return($cs); } sub get_active_id { my ($combo_widget)=@_; my ($ok,$iter)=$combo_widget->get_active_iter; if($ok) { return($combo_widget->get_model->get($iter,COMBO_ID)); } else { return(''); } } sub check_fonts { my ($spec)=@_; if($spec->{'type'} =~ /fontconfig/i && @{$spec->{'family'}}) { if(commande_accessible("fc-list")) { my $ok=0; for my $f (@{$spec->{'family'}}) { open FC,"-|","fc-list",$f,"family"; while() { chomp();$ok=1 if(/./); } close FC; } if(!$ok) { my $re='('.join("|",map { quotemeta($_) } (@{$spec->{'family'}})).')'; open FC,"-|","fc-list",":","file"; FCL: while() { if(/$re:\s*$/) { $ok=1; last FCL; } } close FC; } return(0) if(!$ok); } } return(1); } sub amc_user_confdir { my $d=Glib::get_home_dir().'/.AMC.d'; utf8::downgrade($d); return($d); } sub use_amc_plugins { my $plugins_dir=amc_user_confdir.'/plugins'; if(opendir(my $dh,$plugins_dir)) { push @INC,grep { -d $_ } map { "$plugins_dir/$_/perl" } readdir($dh); closedir $dh; } else { debug "Can't open plugins dir $plugins_dir: $!"; } } sub find_latex_file { my ($file)=@_; return() if(!commande_accessible("kpsewhich")); open KW,"-|","kpsewhich","-all","$file"; chomp(my $p=); close(KW); return($p); } sub file_mimetype { my ($file)=@_; if(defined($file) && -f $file) { if(check_install(module=>"File::MimeInfo::Magic")) { load("File::MimeInfo::Magic"); return("File::MimeInfo::Magic"->mimetype($file)); } else { if($file =~ /\.pdf$/i) { return("application/pdf"); } else { return(''); } } } else { return(''); } } sub file_content { my ($file)=@_; my $c; local $/; open(FILE,$file); $c=; close(FILE); return($c); } sub string_to_usascii { my ($s)=@_; utf8::decode($s); if(check_install(module=>"Text::Unidecode")) { autoload("Text::Unidecode"); $s=unidecode($s); } elsif(check_install(module=>"Unicode::Normalize")) { autoload("Unicode::Normalize"); $s=NFKD($s); $s =~ s/\pM//g; } $s =~ s/[^\x{00}-\x{7f}]/_/g; return($s); } sub show_utf8 { my ($s)=@_; my $u=$s; utf8::upgrade($u); return($u . (utf8::is_utf8($s) ? " (utf8)" : "")); } sub string_to_filename { my ($s,$prefix)=@_; $prefix='f' if(!$prefix); $s=string_to_usascii($s); $s =~ s/[^a-zA-Z0-9.-]/_/g; $s =~ s/^[^a-zA-Z0-9]/$prefix_/; return($s); } sub path_to_filename { my ($volume,$directories,$file) = File::Spec->splitpath(@_); return($file); } sub amc_component { my ($name)=@_; $0="auto-multiple-choice $name"; } my @call=caller(); amc_component($1) if($call[0] eq 'main' && $call[1] =~ /AMC-([a-z0-9]+)\.pl$/i); sub free_disk_mo { my ($path)=@_; if(can_load(modules=>{"Filesys::Df"=>undef})) { my $d=Filesys::Df::df($path,1024**2); if(defined($d)) { return(int($d->{bavail})); } } return undef; } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Boite.pm000066400000000000000000000231521341176102400211070ustar00rootroot00000000000000# # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Boite; use AMC::Basic; BEGIN { use Exporter (); our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); # set the version for version checking $VERSION = 0.1.1; @ISA = qw(Exporter); @EXPORT = qw(); %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ], # your exported package globals go here, # as well as any optionally exported functions @EXPORT_OK = qw(&max &min); } sub new { my (%o)=(@_); my $self={'coins'=>[[],[],[],[]], 'droite'=>1, }; for my $k (keys %o) { $self->{$k}=$o{$k} if(defined($self->{$k})); } $self->{'point.actuel'}=0; bless $self; return($self); } sub clone { my ($self)=@_; my $s={'coins'=>[map { [@$_] ; } (@{$self->{'coins'}})], 'droite'=>$self->{'droite'}}; bless $s; return($s); } sub def_point_suivant { my ($self,$x,$y)=(@_); $self->{'coins'}->[$self->{'point.actuel'}++]=[$x,$y]; } # definit la boite (droite) a l'aide de point haut-gauche et des # tailles en x et y. sub def_droite_MD { my ($self,$x,$y,$dx,$dy)=(@_); $self->{'coins'}->[0]=[$x,$y]; $self->{'coins'}->[1]=[$x+$dx,$y]; $self->{'coins'}->[2]=[$x+$dx,$y+$dy]; $self->{'coins'}->[3]=[$x,$y+$dy]; $self->{'droite'}=1; return($self); } # definit la boite (droite) a l'aide de point haut-gauche et du point # bas-droit. sub def_droite_MN { my ($self,$x,$y,$xp,$yp)=(@_); $self->{'coins'}->[0]=[$x,$y]; $self->{'coins'}->[1]=[$xp,$y]; $self->{'coins'}->[2]=[$xp,$yp]; $self->{'coins'}->[3]=[$x,$yp]; $self->{'droite'}=1; return($self); } # definit la boite (droite) a l'aide d'une element XML (obtenu grace a # XML::Simple) qui comporte les elements xmin, xmax, ymin, ymax. sub def_droite_xml { my ($self,$x)=(@_); $self->def_droite_MN(map { $x->{$_}; } qw/xmin ymin xmax ymax/); return($self); } sub def_complete { my ($self,$xa,$ya,$xb,$yb,$xc,$yc,$xd,$yd)=(@_); $self->{'coins'}->[0]=[$xa,$ya]; $self->{'coins'}->[1]=[$xb,$yb]; $self->{'coins'}->[2]=[$xc,$yc]; $self->{'coins'}->[3]=[$xd,$yd]; $self->{'droite'}=0; return($self); } sub un_seul { my $x=shift; my $t=ref($x); if($t eq '') { return($x); } elsif($t eq 'SCALAR') { return($$x); } elsif($t eq 'ARRAY') { return($x->[0]); } elsif($t eq 'HASH') { my @k=keys %$x; return($x->{$k[0]}); } } # definit la boite a l'aide d'une element XML (obtenu grace a # XML::Simple) fabrique par AMC::Boite::xml. sub def_complete_xml { my ($self,$x)=(@_); $x=$x->{'coin'} if($x->{'coin'}); $self->def_complete(map { (un_seul($x->{$_}->{'x'}), un_seul($x->{$_}->{'y'})) } (1..4)); return($self); } sub new_MD { my (@o)=(@_); my $self=new(); $self->def_droite_MD(@o); return($self); } sub new_MN { my (@o)=(@_); my $self=new(); $self->def_droite_MN(@o); return($self); } sub new_xml { my (@o)=(@_); my $self=new(); $self->def_droite_xml(@o); return($self); } sub new_complete { my (@o)=(@_); my $self=new(); $self->def_complete(@o); return($self); } sub new_complete_xml { my (@o)=(@_); my $self=new(); $self->def_complete_xml(@o); return($self); } # renvoie une description textuelle de la boite. sub txt { my $self=shift; if($self->{'droite'}) { return(sprintf("(%.2f,%.2f)-(%.2f,%.2f) %.2f x %.2f", @{$self->{'coins'}->[0]}, @{$self->{'coins'}->[2]}, $self->{'coins'}->[2]->[0]-$self->{'coins'}->[0]->[0], $self->{'coins'}->[2]->[1]-$self->{'coins'}->[0]->[1], )); } else { return(sprintf("(%.2f,%.2f) (%.2f,%.2f) (%.2f,%.2f) (%.2f,%.2f)", @{$self->{'coins'}->[0]}, @{$self->{'coins'}->[1]}, @{$self->{'coins'}->[2]}, @{$self->{'coins'}->[3]}, )); } } # renvoie une commande draw pour tracer la boite grace a ImageMagick sub draw_list { my $self=shift; return("-draw","polygon ".$self->draw_points()); } sub draw_points { my $self=shift; return(sprintf("%.2f,%.2f %.2f,%.2f %.2f,%.2f %.2f,%.2f", @{$self->{'coins'}->[0]}, @{$self->{'coins'}->[1]}, @{$self->{'coins'}->[2]}, @{$self->{'coins'}->[3]}, ) ); } # renvoie une commande draw pour tracer la boite grace a ImageMagick sub draw { my $self=shift; return(' '.join(' ',map { '"'.$_.'"' } ($self->draw_list())).' '); } # renvoie une description XML des coins de la boite. sub xml { my ($self,$n)=(@_); my $x=''; my $pre=' ' x $n; for my $i (0..3) { $x.=sprintf($pre."%.4f%.4f\n", $i+1,@{$self->{'coins'}->[$i]}); } return($x); } sub to_data { my ($self,$capture,$zoneid,$type)=@_; for my $i (0..3) { $capture->set_corner($zoneid,$i+1,$type,@{$self->{'coins'}->[$i]}); } } # renvoie la commande a passer a AMC::Image pour mesurer le contenu de # la boite dans une image. sub commande_mesure { my ($self,$prop)=(@_); my $c="mesure $prop"; for my $i (0..4) { $c.=" ".join(" ",@{$self->{'coins'}->[$i]}); } return($c); } sub commande_mesure0 { my ($self,$prop,$shape)=(@_); my $c="mesure0 $prop $shape " .join(' ',$self->etendue_xy('xy')); return($c); } # renvoie les coordonnees du centre de la boite. sub centre { my $self=shift; my $x=0; my $y=0; for my $i (0..4) { $x+=$self->{'coins'}->[$i]->[0]; $y+=$self->{'coins'}->[$i]->[1]; } return($x/4,$y/4); } # renvoie la projection du centre de la boite sur une direction donnee. sub centre_projete { my ($self,$ux,$uy)=(@_); my ($x,$y)=$self->centre(); return($x*$ux+$y*$uy); } sub tri_dir { my ($x,$y,$bx)=(@_); @$bx=sort { $a->centre_projete($x,$y) <=> $b->centre_projete($x,$y) } @$bx; } # a partir d'une liste de boites, renvoie les quatres boites extremes # : HG, HD, BD, BG sub extremes { my (@liste)=(@_); my @r=(); if(@liste) { tri_dir(1,1,\@liste); push @r,$liste[0]; tri_dir(-1,1,\@liste); push @r,$liste[0]; tri_dir(-1,-1,\@liste); push @r,$liste[0]; tri_dir(1,-1,\@liste); push @r,$liste[0]; } else { debug "Warning: Empty list in [extremes] call"; } return(@r); } sub centres_extremes { my (@ex)=extremes(@_); return(map { $_->centre() } (@ex)); } # direction entre point i et point j sub direction { my ($self,$i,$j)=(@_); return(atan2($self->{'coins'}->[$j]->[1]-$self->{'coins'}->[$i]->[1], $self->{'coins'}->[$j]->[0]-$self->{'coins'}->[$i]->[0])); } # renvoie le rayon du cercle circonscrit, si la boite est un losange. sub rayon { my $self=shift; my ($x,$y)=$self->centre(); return(sqrt(($x-$self->{'coins'}->[0]->[0]) ** 2 + ($y-$self->{'coins'}->[0]->[1]) ** 2)); } sub max { my($max) = shift(@_); for my $temp (@_) { $max = $temp if($temp > $max); } return($max); } sub min { my($min) = shift(@_); for my $temp (@_) { $min = $temp if($temp < $min); } return($min); } sub pos_txt { my ($self,$ligne)=(@_); my ($xmin,$ymin,$xmax,$ymax)=$self->etendue_xy('4'); return(int($xmin-($xmax-$xmin) * 1.1), int($ymin+($ligne+1)*($ymax-$ymin)/3) ); } sub etendue_xy { my ($self,$mode,@o)=(@_); my ($xmin,$ymin,$xmax,$ymax)=(@{$self->{'coins'}->[0]},@{$self->{'coins'}->[0]}); my @r; for my $i (1..3) { my $x=$self->{'coins'}->[$i]->[0]; my $y=$self->{'coins'}->[$i]->[1]; $xmax=$x if($x>$xmax); $xmin=$x if($x<$xmin); $ymax=$y if($y>$ymax); $ymin=$y if($y<$ymin); } if($mode eq 'xml') { @r=sprintf("xmin=\"%.2f\" xmax=\"%.2f\" ymin=\"%.2f\" ymax=\"%.2f\"", $xmin,$xmax,$ymin,$ymax); } elsif($mode eq 'geometry') { my ($marge,$txt)=@o; ($xmin,$ymin)=$self->pos_txt(-1) if($txt); @r=sprintf("%.2fx%.2f+%.2f+%.2f", $xmax-$xmin+2*$marge,$ymax-$ymin+2*$marge, $xmin-$marge,$ymin-$marge); } elsif($mode eq '4') { @r=($xmin,$ymin,$xmax,$ymax); } elsif($mode eq 'xy') { @r=($xmin,$xmax,$ymin,$ymax); } elsif($mode eq 'xmin') { @r=$xmin; } elsif($mode eq 'xmax') { @r=$xmax; } elsif($mode eq 'ymin') { @r=$ymin; } elsif($mode eq 'ymax') { @r=$ymax; } else { @r=($xmax-$xmin,$ymax-$ymin); } return(wantarray ? @r : $r[0]); } sub coordonnees { my ($self,$i,$c)=(@_); my @r=(); push @r,$self->{'coins'}->[$i]->[0] if($c =~/x/i); push @r,$self->{'coins'}->[$i]->[1] if($c =~/y/i); return(wantarray ? @r : $r[0]); } sub diametre { my $self=shift; my ($dx,$dy)=$self->etendue_xy(); return(($dx+$dy)/2); } sub bonne_etendue { my ($self,$dmin,$dmax)=(@_); my ($dx,$dy)=$self->etendue_xy(); return( $dx >= $dmin && $dx <= $dmax && $dy >= $dmin && $dy <= $dmax); } sub transforme { # avec AMC::Calage my ($self,$transf)=(@_); for my $i (0..3) { $self->{'coins'}->[$i]=[$transf->transforme(@{$self->{'coins'}->[$i]})]; } $self->{'droite'}=0; return($self); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Calage.pm000066400000000000000000000141661341176102400212260ustar00rootroot00000000000000# # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Calage; use AMC::Basic; BEGIN { use Exporter (); our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); # set the version for version checking $VERSION = 0.1.1; @ISA = qw(Exporter); @EXPORT = qw(); %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ], # your exported package globals go here, # as well as any optionally exported functions @EXPORT_OK = qw(); } my $M_PI=atan2(1,1)*4; my $HUGE=32000; sub new { my (%o)=(@_); my $self={'type'=>'lineaire', 'log'=>1, 't_a'=>'', 't_b'=>'', 't_c'=>'', 't_d'=>'', 't_e'=>'', 't_f'=>'', 'MSE'=>'', }; for my $k (keys %o) { $self->{$k}=$o{$k} if(defined($self->{$k})); } bless $self; $self->identity(); $self->clear_min_max(); return($self); } sub mse { my ($self)=(@_); return($self->{'MSE'}); } sub identity { my ($self)=(@_); $self->{'type'}='lineaire'; $self->{'t_a'}=1; $self->{'t_b'}=0; $self->{'t_c'}=0; $self->{'t_d'}=1; $self->{'t_e'}=0; $self->{'t_f'}=0; $self->{'MSE'}=0; } ########################################################## # calcul vectoriel sub moyenne { my @a=(@_); my $s=0; for (@a) { $s+=$_; } return($s/($#a+1)); } sub crochet { my ($a,$b)=(@_); my $ma=moyenne(@$a); my $mb=moyenne(@$b); my $s=0; for(0..$#{$a}) { $s+=($a->[$_]-$ma)*($b->[$_]-$mb); } return($s/($#{$a}+1)); } sub resoud_22 { # resoud systeme 2x2 # ax+by=e # cx+dy=f my ($a,$b,$c,$d,$e,$f)=(@_); my $delta=$a*$d-$b*$c; return(($d*$e-$b*$f)/$delta,(-$c*$e+$a*$f)/$delta); } ############################################################# sub clear_min_max { my $self=shift; $self->{'t_x_min'}=$HUGE; $self->{'t_y_min'}=$HUGE; $self->{'t_x_max'}=0; $self->{'t_y_max'}=0; } sub transforme { my ($self,$x,$y,$nominmax)=(@_); my ($xp,$yp); if($self->{'type'} =~ /^[hl]/i) { $xp=$self->{'t_a'}*$x+$self->{'t_b'}*$y+$self->{'t_e'}; $yp=$self->{'t_c'}*$x+$self->{'t_d'}*$y+$self->{'t_f'}; } if(!$nominmax) { $self->{'t_x_min'}=$xp if($xp<$self->{'t_x_min'}); $self->{'t_y_min'}=$yp if($yp<$self->{'t_y_min'}); $self->{'t_x_max'}=$xp if($xp>$self->{'t_x_max'}); $self->{'t_y_max'}=$yp if($yp>$self->{'t_y_max'}); } return($xp,$yp); } sub calage { my ($self,$cx,$cy,$cxp,$cyp)=(@_); if($self->{'type'} =~ /^h/i) { ###################### HELMERT my $theta,$alpha; $theta=atan2(crochet($cx,$cyp)-crochet($cxp,$cy), crochet($cx,$cxp)+crochet($cy,$cyp)); debug sprintf("theta = %.3f\n",$theta*180/$M_PI); my $den=crochet($cx,$cx)+crochet($cy,$cy); if(abs(cos($theta))>abs(sin($theta))) { $alpha=(crochet($cx,$cxp)+crochet($cy,$cyp))/($den*cos($theta)); } else { $alpha=(crochet($cx,$cyp)-crochet($cxp,$cy))/($den*sin($theta)); } if($alpha<0) { $alpha=abs($alpha); $theta+=($theta>0 ? -1 : 1)*$M_PI; } $self->{'t_e'}=moyenne(@$cxp)-$alpha*(moyenne(@$cx)*cos($theta)-moyenne(@$cy)*sin($theta)); $self->{'t_f'}=moyenne(@$cyp)-$alpha*(moyenne(@$cx)*sin($theta)+moyenne(@$cy)*cos($theta)); debug "alpha = $alpha\n"; $self->{'t_a'}=$alpha*cos($theta); $self->{'t_b'}=-$alpha*sin($theta); $self->{'t_c'}=$alpha*sin($theta); $self->{'t_d'}=$alpha*cos($theta); } elsif($self->{'type'} =~ /^l/i) { ########################## LINEAIRE my $sxx=crochet($cx,$cx); my $sxy=crochet($cx,$cy); my $syy=crochet($cy,$cy); my $sxxp=crochet($cx,$cxp); my $syxp=crochet($cy,$cxp); my $sxyp=crochet($cx,$cyp); my $syyp=crochet($cy,$cyp); ($self->{'t_a'},$self->{'t_b'}) =resoud_22($sxx,$sxy,$sxy,$syy,$sxxp,$syxp); $self->{'t_e'}=moyenne(@$cxp)-($self->{'t_a'}*moyenne(@$cx)+$self->{'t_b'}*moyenne(@$cy)); ($self->{'t_c'},$self->{'t_d'}) =resoud_22($sxx,$sxy,$sxy,$syy,$sxyp,$syyp); $self->{'t_f'}=moyenne(@$cyp)-($self->{'t_c'}*moyenne(@$cx)+$self->{'t_d'}*moyenne(@$cy)); } else { debug "ERR: invalid type: $self->{'type'}\n"; } if($self->{'log'} && $self->{'type'} =~ /^[hl]/i) { debug "Linear transform:\n"; debug sprintf(" %7.3f %7.3f %10.3f\n %7.3f %7.3f %10.3f\n", $self->{'t_a'},$self->{'t_b'},$self->{'t_e'}, $self->{'t_c'},$self->{'t_d'},$self->{'t_f'}); } ############ evaluation de la qualite de l'ajustement my $sd=0; for my $i (0..$#{$cx}) { my ($x,$y)=$self->transforme($cx->[$i],$cy->[$i],1); $sd+=($x-$cxp->[$i])**2+($y-$cyp->[$i])**2; } $self->{'MSE'}=sqrt($sd/($#{$cx}+1)); debug(sprintf("MSE = %.3f\n",$self->{'MSE'})); printf("Adjust: MSE = %.3f\n",$self->{'MSE'}) if($self->{'log'}); return($self->{'MSE'}); } sub params { my ($self)=@_; return(map { $self->{$_} } (qw/t_a t_b t_c t_d t_e t_f MSE/)); } sub xml { my ($self,$i)=(@_); my $pre=" " x $i; my $r=$pre.sprintf("\n", $self->{'type'},$self->{'MSE'}); $r.=$pre." \n"; if($self->{'type'} =~ /^[hl]/i) { $r.=$pre." ".$self->{'t_a'}."\n"; $r.=$pre." ".$self->{'t_b'}."\n"; $r.=$pre." ".$self->{'t_c'}."\n"; $r.=$pre." ".$self->{'t_d'}."\n"; $r.=$pre." ".$self->{'t_e'}."\n"; $r.=$pre." ".$self->{'t_f'}."\n"; } $r.=$pre." \n"; $r.=$pre."\n"; return($r); } auto-multiple-choice-1.4.0/AMC-perl/AMC/Config.pm000066400000000000000000000562341341176102400212610ustar00rootroot00000000000000# -*- perl -*- # # Copyright (C) 2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Config; use AMC::Basic; use XML::Simple; use Module::Load; use Glib; # This package helps handling AMC configuration. # # Sources: global options file (from some profile), state file, # project options file, command-line options. use_gettext(); sub new { my (%o)=(@_); my $self={state=>{}, global=>{}, project=>{}, local=>{}, profile=>'', o_dir=>amc_user_confdir(), state_file=>'', system_encoding=>'UTF-8', shortcuts=>'', home_dir=>'', empty=>0, gui=>0, }; for my $k (keys %o) { $self->{$k}=$o{$k} if(defined($self->{$k})); } bless $self; if(!$empty) { $self->defaults(); $self->check_odir(); $self->load_state(); $self->load_profile(); } return($self); } sub connect_to_window { my ($self,$window)=@_; $self->{gui}=$window; } sub check_odir { my ($self)=@_; # Creates general options directory if not present if(! -d $self->{o_dir}) { mkdir($self->{o_dir}) or die "Error creating $self->{o_dir} : $!"; # gets older verions (<=0.254) main configuration file and move it # to the new location if(-f $self->{home_dir}.'/.AMC.xml') { debug "Moving old configuration file"; move($self->{home_dir}.'/.AMC.xml',$self->{o_dir}."/cf.default.xml"); } } for my $o_sub (qw/plugins/) { mkdir($self->{o_dir}."/$o_sub") if(! -d $self->{o_dir}."/$o_sub"); } } sub subdir { my ($self,$path)=@_; return($self->{o_dir}."/".$path); } sub set_local_keys { my ($self,@keys)=@_; $self->{local}={}; for my $k (@keys) { $self->{local}->{$k}=undef; } } # Handling passwords sub passwd_file { my ($self,$usage)=@_; my $file=$self->{o_dir}."/cf.".$self->{profile}.".p_$usage"; utf8::downgrade($file); return($file); } sub set_passwd { my ($self,$usage,$pass)=@_; my $file=$self->passwd_file($usage); if(open my $fh,">",$file) { chmod(0600,$file); print $fh $pass; print $fh "\n"; print $fh "*" x (64-length($pass)) if(length($pass)<64); close $fh; } else { debug "ERROR: Can't open file $file to save passwd"; } } sub get_passwd { my ($self,$usage)=@_; my $file=$self->passwd_file($usage); my $pass=''; if(-f $file) { $pass=file_content($file); $pass =~ s/\n.*//s; } return($pass); } # Read/write options XML files sub pref_xml_lit { my ($file)=@_; utf8::downgrade($file); if((! -f $file) || (! -r $file) || -z $file) { return(); } else { debug("Reading XML config file $file ..."); my $data=XMLin($file,SuppressEmpty => '', ForceArray=>['docs','email_attachment','printer']); return(%$data); } } sub pref_xml_ecrit { my ($data,$name,$file)=@_; utf8::downgrade($file); if(open my $fh,">:encoding(utf-8)",$file) { XMLout($data, "XMLDecl"=>'', "RootName"=>$name,'NoAttr'=>1, "OutputFile" => $fh, ); close $fh; return(0); } else { return(1); } } # state file sub load_state { my ($self)=@_; $self->{state_file}=$self->{o_dir}.'/state.xml' if(!$self->{state_file}); $self->{state}={ pref_xml_lit($self->{state_file}) }; $self->{state}->{apprentissage}={} if(!$self->{state}->{apprentissage}); # set profile from options, or from state file if($self->{profile}) { $self->{state}->{profile}=$self->{profile}; } else { $self->{profile}=$self->{state}->{profile} || 'default'; } } # profile global options sub defaults { my ($self)=@_; $self->{home_dir}=Glib::get_home_dir() if(!$self->{home_dir}); # perl -le 'use Gtk3 -init; print Gtk3::Gdk::Color::parse("blue")->to_string()' my $hex_black="#000000000000"; my $hex_red="#ffff00000000"; my $hex_blue="#00000000ffff"; $self->{o_default} = { pdf_viewer=>['command', 'evince','acroread','gpdf','okular','xpdf', ], img_viewer=>['command', 'eog','ristretto','gpicview','mirage','gwenview', ], csv_viewer=>['command', 'gnumeric','kspread','libreoffice','localc','oocalc', ], ods_viewer=>['command', 'libreoffice','localc','oocalc', ], xml_viewer=>['command', 'gedit','kedit','kwrite','mousepad','leafpad', ], tex_editor=>['command', 'texmaker','kile','gummi','emacs','gedit','kedit','kwrite','mousepad','leafpad', ], txt_editor=>['command', 'gedit','kedit','kwrite','mousepad','emacs','leafpad', ], html_browser=>['command', 'sensible-browser %u', 'firefox %u', 'galeon %u', 'konqueror %u', 'dillo %u', 'chromium %u', ], dir_opener=>['command', 'nautilus file://%d', 'pcmanfm %d', 'Thunar %d', 'konqueror file://%d', 'dolphin %d', ], print_command_pdf=>['command', 'cupsdoprint %f','lpr %f', ], print_extract_with=>['command','gs','pdftk','qpdf'], # TRANSLATORS: directory name for projects. This directory will be created (if needed) in the home directory of the user. Please use only alphanumeric characters, and - or _. No accentuated characters. rep_projets=>$self->{home_dir}.'/'.__"MC-Projects", projects_home=>$self->{home_dir}.'/'.__"MC-Projects", rep_modeles=>$self->{o_dir}."/Models", seuil_eqm=>3.0, seuil_sens=>8.0, saisie_dpi=>150, vector_scan_density=>250, force_convert=>'', n_procs=>0, delimiteur_decimal=>',', defaut_encodage_liste=>'UTF-8', encodage_interne=>'UTF-8', defaut_encodage_csv=>'UTF-8', encodage_latex=>'', defaut_moteur_latex_b=>'pdflatex', defaut_seuil=>0.15, defaut_seuil_up=>1.0, assoc_window_size=>'', mailing_window_size=>'', preferences_window_size=>'', checklayout_window_size=>'', manual_window_size=>'', marks_window_size=>'', conserve_taille=>1, methode_impression=>'CUPS', imprimante=>'', printer_useful_options=>'Staple Stapling StapleLocation StapleSet StapleOption', options_impression=>{sides=>'two-sided-long-edge', 'number-up'=>1, repertoire=>'/tmp', print_answersheet=>'', }, manuel_image_type=>'xpm', assoc_ncols=>4, tolerance_marque_inf=>0.2, tolerance_marque_sup=>0.2, box_size_proportion=>0.8, bw_threshold=>0.6, ignore_red=>0, try_three=>1, prepare_solution=>1, prepare_indiv_solution=>1, prepare_catalog=>1, symboles_trait=>2, symboles_indicatives=>'', symbole_0_0_type=>'none', symbole_0_0_color=>$hex_black, symbole_0_1_type=>'circle', symbole_0_1_color=>$hex_red, symbole_1_0_type=>'mark', symbole_1_0_color=>$hex_red, symbole_1_1_type=>'mark', symbole_1_1_color=>$hex_blue, annote_font_name=>'Linux Libertine O 12', annote_ecart=>5.5, annote_chsign=>4, nonascii_projectnames=>'', ascii_filenames=>1, defaut_note_null=>0, defaut_note_min=>'', defaut_note_max=>20, defaut_note_max_plafond=>1, defaut_note_grain=>"0.5", defaut_note_arrondi=>'inf', defaut_annote_rtl=>'', # TRANSLATORS: This is the default text to be written on the top of the first page of each paper when annotating. From this string, %s will be replaced with the student final mark, %m with the maximum mark he can obtain, %S with the student total score, and %M with the maximum score the student can obtain. defaut_verdict=>"%(ID)\n".__("Mark: %s/%m (total score: %S/%M)"), defaut_verdict_q=>"\"%"."s/%"."m\"", defaut_verdict_qc=>"\"X\"", embedded_max_size=>'1000x1500', embedded_format=>'jpeg', embedded_jpeg_quality=>75, zoom_window_height=>400, zoom_window_factor=>1.0, zooms_ncols=>4, zooms_edit_mode=>0, email_sender=>'', email_cc=>'', email_bcc=>'', email_transport=>'sendmail', email_sendmail_path=>['command', '/usr/sbin/sendmail','/usr/bin/sendmail', '/sbin/sendmail','/bin/sendmail'], email_smtp_host=>'smtp', email_smtp_port=>25, email_smtp_ssl=>0, email_smtp_user=>'', SMTP=>'', # TRANSLATORS: Subject of the emails which can be sent to the students to give them their annotated completed answer sheet. defaut_email_subject=>__"Exam result", # TRANSLATORS: Body text of the emails which can be sent to the students to give them their annotated completed answer sheet. defaut_email_text=>__"Please find enclosed your annotated completed answer sheet.\nRegards.", email_delay=>0, csv_surname_headers=>'', csv_name_headers=>'', notify_documents=>0, notify_capture=>1, notify_grading=>1, notify_annotation=>1, notify_desktop=>lc($^O) ne 'darwin', # macOS does not handle libnotify notify_command=>'', project_icon_size=>16, view_invalid_color=>"#FFEF3B", view_empty_color=>"#78FFED", }; $self->{project_default} = { texsrc=>'', data=>'data', cr=>'cr', listeetudiants=>'', notes=>'notes.xml', seuil=>'', seuil_up=>'', encodage_csv=>'', encodage_liste=>'', maj_bareme=>1, doc_question=>'DOC-sujet.pdf', doc_solution=>'DOC-corrige.pdf', doc_indiv_solution=>'DOC-indiv-solution.pdf', doc_setting=>'DOC-calage.xy', doc_catalog=>'DOC-catalog.pdf', filter=>'', filtered_source=>'DOC-filtered.tex', modele_regroupement=>'', regroupement_compose=>0, regroupement_type=>'STUDENTS', regroupement_copies=>'ALL', note_null=>0, note_min=>'', note_max=>20, note_max_plafond=>1, note_grain=>"0.5", note_arrondi=>'inf', liste_key=>'', assoc_code=>'', moteur_latex_b=>'', nom_examen=>'', code_examen=>'', nombre_copies=>0, postcorrect_student=>0, postcorrect_copy=>0, postcorrect_set_multiple=>'', format_export=>'ods', after_export=>'file', export_include_abs=>'', annote_position=>'marges', verdict=>'', verdict_q=>'', verdict_qc=>'', annote_rtl=>'', export_sort=>'n', auto_capture_mode=>-1, allocate_ids=>0, email_col=>'', email_subject=>"", email_text=>"", email_attachment=>[], email_use_html=>'', pdfform=>0, }; # MacOSX universal command to open files or directories : /usr/bin/open if(lc($^O) eq 'darwin') { for my $k (qw/pdf_viewer img_viewer csv_viewer ods_viewer xml_viewer tex_editor txt_editor dir_opener/) { $self->{o_default}->{$k}=['command','/usr/bin/open','open']; } $self->{o_default}->{html_browser}=['command','/usr/bin/open %u','open %u']; } # Add default project options for each export module: my @export_modules=perl_module_search('AMC::Export::register'); for my $m (@export_modules) { load("AMC::Export::register::$m"); my %d="AMC::Export::register::$m"->options_default; for(keys %d) { $self->{project_default}->{$_}=$d{$_}; } } $self->{export_modules}=[@export_modules]; } sub load_profile { my ($self)=@_; debug "Profile: $self->{profile}"; $self->{global_file}=$self->{o_dir}."/cf.".$self->{profile}.".xml"; $self->{global}={ pref_xml_lit($self->{global_file}) }; $self->set_global_options_to_default(); $self->test_commands(); } sub set_global_options_to_default { my ($self)=@_; for my $k (keys %{$self->{o_default}}) { $self->set_global_option_to_default($k); } # some options were renamed to defaut_* between 0.226 and 0.227 for(qw/encodage_liste encodage_csv/) { if($self->{global}->{$_} && ! $self->{global}->{"defaut_$_"}) { $self->{global}->{"defaut_$_"}=$self->{global}->{$_}; delete($self->{global}->{$_}); } } # Replace old (pre 0.280) rep_modeles value with new one if($self->{global}->{rep_modeles} eq '/usr/share/doc/auto-multiple-choice/exemples') { $self->{global}->{rep_modeles}=$self->{o_default}->{rep_modeles}; } } sub set_global_option_to_default { my ($self,$key,$subkey,$force)=@_; if($subkey) { if($force || ! exists($self->{global}->{$key}->{$subkey})) { $self->{global}->{$key}->{$subkey}=$self->{o_default}->{$key}->{$subkey}; debug "New sub-global parameter : $key/$subkey = $self->{global}->{$key}->{$subkey}"; } } else { if($force || ! exists($self->{global}->{$key})) { # set to default if(ref($self->{o_default}->{$key}) eq 'ARRAY') { my ($kind,@values)=@{$self->{o_default}->{$key}}; # [ 'command' , ] --> choose the first existing command if($kind eq 'command') { $self->{global}->{$key}=commande_accessible(\@values); if(!$self->{global}->{$key}) { debug "No available command for option $key: using the first one"; $self->{global}->{$key}=$values[0]; } } else { debug "ERR: unknown option kind : $kind"; } } elsif(ref($self->{o_default}->{$key}) eq 'HASH') { # HASH value: copy it $self->{global}->{$key}={ %{$self->{o_default}->{$key}} }; } else { $self->{global}->{$key}=$self->{o_default}->{$key}; # default value for encoding options: $self->{global}->{$key}=$self->{system_encoding} if($key =~ /^encodage_/ && !$self->{global}->{$key}); } debug "New global parameter : $key = $self->{global}->{$key}" if($self->{global}->{$key}); } else { # already defined option: go with sub-options if any if(ref($self->{o_default}->{$key}) eq 'HASH') { for my $kk (keys %{$self->{o_default}->{$key}}) { $self->set_global_option_to_default($key,$kk,$force); } } } } } sub set_project_options_to_default { my ($self)=@_; for my $k (keys %{$self->{project_default}}) { $self->set_project_option_to_default($k); } } sub set_project_option_to_default { my ($self,$key,$force)=@_; if($force || ! exists($self->{project}->{$key})) { if(exists($self->{global}->{"defaut_".$key})) { $self->{project}->{$key}=$self->{global}->{"defaut_".$key}; } elsif(exists($self->{o_default}->{"defaut_".$key})) { $self->{project}->{$key}=$self->{o_default}->{"defaut_".$key}; } else { $self->{project}->{$key}=$self->{project_default}->{$key}; } $self->{project}->{_changed} .= ",$key"; } } sub unavailable_commands_keys { my ($self)=@_; my @uc=(); for my $k (grep { /_(viewer|editor|opener)$/ } keys(%{$self->{global}})) { my $nc=$self->{global}->{$k}; $nc =~ s/^\s+//; $nc =~ s/\s.*//; if(!commande_accessible($nc)) { push @uc,$k; } } return(@uc); } sub test_commands { my ($self,$dont_warn)=@_; for my $k ($self->unavailable_commands_keys()) { set_global_option_to_default($k,'','FORCE'); } my @uc=$self->unavailable_commands_keys(); if(@uc && !$dont_warn) { if($self->{gui}) { my $dialog = Gtk3::MessageDialog ->new($self->{gui}, 'destroy-with-parent', 'warning','ok',''); $dialog->set_markup( # TRANSLATORS: Message (first part) when some of the commands that are given in the preferences cannot be found. __("Some commands allowing to open documents can't be found:") ." ".join(", ",map { "".$self->get($_).""; } @uc).". " # TRANSLATORS: Message (second part) when some of the commands that are given in the preferences cannot be found. .__("Please check its correct spelling and install missing software.")." " # TRANSLATORS: Message (third part) when some of the commands that are given in the preferences cannot be found. The %s will be replaced with the name of the menu entry "Preferences" and the name of the menu "Edit". .sprintf(__"You can change used commands following %s from menu %s.", # TRANSLATORS: "Preferences" menu __"Preferences", # TRANSLATORS: "Edit" menu __"Edit")); $dialog->run; $dialog->destroy; } else { debug "WARNING: Some commands allowing to open documents can't be found: " .join(", ",@uc); } } } # project options sub project_options_file { my ($self,$name,$dir)=@_; $dir=$self->{global}->{rep_projets} if(!$dir); return "$dir/$name/options.xml"; } sub open_project { my ($self,$name)=@_; $self->{project_file}=$self->project_options_file($name); $self->{project}={ pref_xml_lit($self->{project_file}) }; # Get old style working documents names if(ref($self->{project}->{docs}) eq 'ARRAY') { $self->{project}->{doc_question}=$self->{project}->{docs}->[0]; $self->{project}->{doc_solution}=$self->{project}->{docs}->[1]; $self->{project}->{doc_setting}=$self->{project}->{docs}->[2]; delete($self->{project}->{docs}); $self->{project}->{_changed}=1; } # clear deprecated bug-related stuff for(keys %{$self->{project}}) { delete($self->{project}->{$_}) if($_ !~ /^ext_/ && !exists($self->{project_default}->{$_})); $self->{project}->{_changed}=1; } # Convert old style CSV ticked option if($self->{project}->{cochees} && !$self->{project}->{ticked}) { $self->{project}->{ticked}='01'; delete($self->{project}->{cochees}); $self->{project}->{_changed}=1; } # Convert old style ODS group sum options if(!defined($self->{project}->{export_ods_group})) { $self->{project}->{export_ods_group} = ($self->{project}->{export_ods_groupsep} eq '' ? 0 : 1); $self->{project}->{export_ods_groupsep} = '.' if(!$self->{project}->{export_ods_groupsep}); } $self->{shortcuts}->set(project_name=>$name) if($self->{shortcuts}); $self->set_project_options_to_default(); $self->save(); } sub close_project { my ($self)=@_; $self->save(); $self->{project}={}; $self->{project_file}=''; } # get/set options sub path_end { my ($h,$create,@path)=@_; for my $k (@path) { if($create) { if(ref($h) eq 'HASH') { $h->{$k}={} if(!$h->{$k}); $h=$h->{$k}; } else { die "Unable to create path ".join('/',@path); } } else { if(ref($h) eq 'HASH' && exists($h->{$k})) { $h=$h->{$k}; } else { return(undef); } } } return($h); } sub parse_key { my ($self,$key,$create)=@_; my $k={}; if($key =~ /([a-z]+):(.*)/) { $k->{container}=$1; $key=$2; } $k->{path}=[]; $k->{length}=0; while($key =~ /(.*?)\/(.*)/) { my ($pre,$end)=($1,$2); push @{$k->{path}},$pre if($pre); $key=$end; $k->{length}++; } $k->{key}=$key; if(!$k->{container}) { CONT: for my $c (qw/project global state/) { my $e=path_end($self->{$c},'',@{$k->{path}}); if(defined($e) && ($k->{length}>0 || exists($e->{$k->{key}})) ) { $k->{container}=$c; last CONT; } } } if($k->{container}) { $k->{location}=path_end($self->{$k->{container}},$create,@{$k->{path}}); } return($k); } sub get { my ($self,$key,$value_if_not_found)=@_; my $k=$self->parse_key($key); if($k->{container} && defined($k->{location})) { return($k->{location}->{$k->{key}}); } else { return($value_if_not_found); } } sub get_absolute { my ($self,$key)=@_; return( $self->{shortcuts}->absolu($self->get($key)) ); } sub set { my ($self,$key,$value)=@_; my $k=$self->parse_key($key,'create'); my $old=''; if($k->{container}) { $old=$k->{location}->{$k->{key}}; $k->{location}->{$k->{key}}=$value; $self->{$k->{container}}->{_changed} .= ",".$k->{key} if(!defined($old) || ($old ne $value)); } else { die "Unknown container for key $key"; } } sub key_changed { my ($self,$key)=@_; my $k=$self->parse_key($key); if($k->{container}) { return($self->{$k->{container}}->{_changed} && $self->{$k->{container}}->{_changed} =~ /\b$k->{key}\b/); } else { return(0); } } sub changed_keys { my ($self,$container)=@_; if($container) { if($self->{$container}->{_changed}) { return(grep { $_ } split(/,/,$self->{$container}->{_changed})); } else { return(); } } else { my @r=(); for my $c (qw/global project state/) { push @r,$self->changed_keys($c); } return(@r); } } sub list_hash_keys { my ($e,$prefix)=@_; my @all=(); my $nonroot_prefix=($prefix && $prefix !~ /:$/); push @all,$prefix if($nonroot_prefix); if(ref($e) eq 'HASH') { for my $k (sort { $a cmp $b } (keys %$e)) { push @all,list_hash_keys($e->{$k}, ($nonroot_prefix ? "$prefix/$k" : $prefix ? $prefix.$k : $k)); } } return(@all); } sub list_keys_from_root { my ($self,$root)=@_; if($root) { my $k=$self->parse_key($root); return(list_hash_keys(($k->{key} ? $k->{location}->{$k->{key}} : $k->{location}),"")); } else { return($self->list_all_keys()); } } sub list_all_keys { my ($self,$container_prefix)=@_; my @all=(); for my $c (qw/state global project/) { push @all,list_hash_keys($self->{$c},($container_prefix ? "$c:" : "")); } return(@all); } # save back options sub save { my ($self,$dont_warn)=@_; for my $c (qw/project global state/) { if($self->{$c}->{_changed}) { my $file=$self->{$c."_file"}; if($file) { delete($self->{$c}->{_changed}); if(pref_xml_ecrit($self->{$c},$c,$file) && !$dont_warn) { if($self->{gui}) { my $dialog = Gtk3::MessageDialog ->new($self->{gui}, 'destroy-with-parent', 'error','ok', # TRANSLATORS: Error writing one of the configuration files (global or project). The first %s will be replaced with the path of that file, and the second with the error text. __"Error writing configuration file %s: %s", $file,$!); $dialog->run; $dialog->destroy; } else { debug "ERROR writing <$c> options file: $!"; } } } else { debug "ERROR: I don't know where to save <$c> options file!"; } } } } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Data.pm000066400000000000000000000170511341176102400207170ustar00rootroot00000000000000# -*- perl -*- # # Copyright (C) 2011-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Data; # AMC::Data handles data storage management for AMC. An AMC::Data can # load several "modules" which are SQLite database files in a common # directory $dir, with their associated methods to get/set data. use Module::Load; use AMC::Basic; use DBI; sub new { my ($class,$dir,%oo)=@_; my $self= { 'directory'=>$dir, 'timeout'=>300000, 'dbh'=>'', 'modules'=>{}, 'files'=>{}, 'on_error'=>'stdout,stderr,die', 'progress'=>'', }; for(keys %oo) { $self->{$_}=$oo{$_} if(exists($self->{$_})); } bless($self,$class); $self->connect; return $self; } # Connects to SQLite (first without any database: this will be done # when loading the modules), and renew all modules sub connect { my ($self)=@_; $self->{'dbh'}=DBI->connect("dbi:SQLite:",undef,undef, {AutoCommit => 0, RaiseError => 0, }); $self->{'dbh'}->sqlite_busy_timeout($self->{'timeout'}); $self->{'dbh'}->{sqlite_unicode}=1; $self->{'dbh'}->{HandleError}=sub { $self->sql_error(shift); }; my @mods=(keys %{$self->{'modules'}}); $self->{'modules'}={}; for(@mods) { $self->require_module($_); } } # Disconnects... sub disconnect { my ($self)=@_; if($self->{'dbh'}) { $self->{'dbh'}->disconnect; $self->{'dbh'}=''; } } # SQL errors... sub sql_error { my ($self,$e)=@_; my $s="SQL ERROR: $e\nSQL STATEMENT: ".$DBI::lasth->{Statement}; debug "$s"; print "$s\n" if($self->{'on_error'} =~ /\bstdout\b/); print STDERR "$s\n" if($self->{'on_error'} =~ /\bstderr\b/); die "*SQL*" if($self->{'on_error'} =~ /\bdie\b/); } # directory returns the directory where databases files are stored. sub directory { my ($self)=@_; return($self->{'directory'}); } # dbh returns the DBI object corresponding to the SQLite session with # required modules attached. sub dbh { my ($self)=@_; return($self->{'dbh'}); } # begin_transaction begins a transaction in immediate mode, to be used # to eventually write to the database. sub begin_transaction { my ($self,$key)=@_; $key='----' if(!$key); debug_and_stderr "WARNING: opened transaction $self->{'trans'}" if($self->{'trans'}); $self->sql_do("BEGIN IMMEDIATE"); $self->{'trans'}=$key; } # begin_read_transaction begins a transaction for reading data. sub begin_read_transaction { my ($self,$key)=@_; $key='----' if(!$key); debug_and_stderr "WARNING: opened transaction $self->{'trans'}" if($self->{'trans'}); $self->sql_do("BEGIN"); $self->{'trans'}=$key; } # end_transaction end the transaction. sub end_transaction { my ($self,$key)=@_; $key='----' if(!$key); debug_and_stderr "WARNING: closing transaction $self->{'trans'} declared as $key" if($self->{'trans'} ne $key); $self->sql_do("COMMIT"); $self->{'trans'}=''; } # sql_quote($string) can be used to quote a string before including it # in a SQL query. sub sql_quote { my ($self,$string)=@_; return $self->{'dbh'}->quote($string); } # sql_do($sql,@bind) executes the SQL query $sql, replacing ? by the # elements of @bind. sub sql_do { my ($self,$sql,@bind)=@_; debug_and_stderr "WARNING: sql_do with no transaction -- $sql" if($sql !~ /^\s*(attach|begin)/i && !$self->{'trans'}); $self->{'dbh'}->do($sql,{},@bind); } # sql_tables($tables) gets the list of tables matching pattern $tables. sub sql_tables { my ($self,$tables)=@_; return($self->{'dbh'}->tables('%','%',$tables)); } # require_module($module) loads the database file corresponding to # module $module (found in the data directory), and associated methods # defined in AMC::DataModule::$module perl package. sub require_module { my ($self,$module)=@_; if(!$self->{'modules'}->{$module}) { my $filename=$self->{'directory'}."/".$module.".sqlite"; utf8::downgrade($filename); if(! -f $filename) { debug("Creating unexistant database file for module $module..."); } debug "Connecting to database $module..."; $self->{'dbh'}->{AutoCommit}=1; $self->{'dbh'}->{sqlite_unicode}=0; $self->sql_do("ATTACH DATABASE ? AS $module",$filename); $self->{'dbh'}->{sqlite_unicode}=1; $self->{'dbh'}->{AutoCommit}=0; debug "Loading perl module $module..."; load("AMC::DataModule::$module"); $self->{'modules'}->{$module}="AMC::DataModule::$module"->new($self); $self->{'files'}->{$module}=$filename; debug "Module $module loaded."; } } # module($module) returns the module object associated to module # $module (call the methods from module $module from this object). sub module { my ($self,$module)=@_; $self->require_module($module); return($self->{'modules'}->{$module}); } # module_path($module) returns the path of the SQLite database # associated with this module, or undef if the module has not been # loaded. sub module_path { my ($self,$module)=@_; return($self->{'files'}->{$module}); } # progression is called by DataModule methods when long actions are # beeing executed, to show the user the progression of this action. sub progression { my ($self,$action,$argument)=@_; if(ref($self->{'progress'}) eq 'CODE') { &{$self->{'progress'}}($action,$argument); } elsif(ref($self->{'progress'}) eq 'HASH') { if($action eq 'begin') { $self->{'progress.lasttext'} =$self->{'progress'}->{'avancement'}->get_text(); $self->{'progress'}->{'avancement'}->set_text($argument); if($self->{'progress'}->{'annulation'}) { $self->{'progress.lastcancel'} =$self->{'progress'}->{'annulation'}->get_sensitive; $self->{'progress'}->{'annulation'}->set_sensitive(0); } $self->{'progress.lastfaction'} =$self->{'progress'}->{'avancement'}->get_fraction; $self->{'progress'}->{'avancement'}->set_fraction(0); $self->{'progress.lastvisible'} =$self->{'progress'}->{'commande'}->get_visible; $self->{'progress'}->{'commande'}->show(); $self->{'progress.time'}=0; Gtk3::main_iteration while ( Gtk3::events_pending ); } elsif($action eq 'end') { $self->{'progress'}->{'avancement'} ->set_fraction($self->{'progress.lastfaction'}); $self->{'progress'}->{'commande'} ->set_visible($self->{'progress.lastvisible'}); $self->{'progress'}->{'avancement'} ->set_text($self->{'progress.lasttext'}); if($self->{'progress'}->{'annulation'}) { $self->{'progress'}->{'annulation'} ->set_sensitive($self->{'progress.lastcancel'}); } Gtk3::main_iteration while ( Gtk3::events_pending ); } elsif($action eq 'fraction') { # Don't update progress bar more than once a second. if(time>$self->{'progress.time'}) { $self->{'progress.time'}=time; $self->{'progress'}->{'avancement'}->set_fraction($argument); Gtk3::main_iteration while ( Gtk3::events_pending ); } } } } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/DataModule.pm000066400000000000000000000313611341176102400220650ustar00rootroot00000000000000# -*- perl -*- # # Copyright (C) 2011-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::DataModule; # AMC::DataModule is the base class for modules written to be loaded # by AMC::Data. # A module XXX is a SQLite database that contains at least a # 'variable' table for internal use, associated with methods written # for a AMC::DataModule::XXX class. The tables version number is # stored in the variable table. use AMC::Basic; # a AMC::DataModule object is a branch of a AMC::Data object, and # stores its root in $self->{'data'} sub new { my ($class,$data,%oo)=@_; my $self= { 'data'=>$data, 'name'=>'', 'statements'=>{}, immutable=>{}, }; for(keys %oo) { $self->{$_}=$oo{$_} if(exists($self->{$_})); } if(!$self->{'name'} && $class =~ /::([^:]+)$/) { $self->{'name'}=$1; } bless($self,$class); $self->define_statements; debug "Checking database version..."; $self->version_check; return $self; } # dbh returns the DBI object corresponding to the SQLite session # associated with the module. sub dbh { my ($self)=@_; return $self->{'data'}->dbh; } # path() returns the path of the SQLite database associated with the # module. sub path { my ($self)=@_; return($self->{'data'}->module_path($self->{'name'})); } # module(name) returns another module from same data sub module { my ($self,$name)=@_; return($self->{data}->module($name)); } # require_module(name) loads the module for the same data sub require_module { my ($self,$name)=@_; return($self->{data}->require_module($name)); } # vacuum() loads the SQLite database separately, and asks for VACUUM # on it. sub vacuum { my ($self)=@_; my $dbh=DBI->connect("dbi:SQLite:dbname=".$self->path(),undef,undef, {AutoCommit => 1, RaiseError => 0, }); $dbh->{HandleError}=sub { debug "VACUUM statement: ".shift; }; $dbh->do("VACUUM"); $dbh->disconnect; } # disconnect disconnects from SQLite sub disconnect { my ($self)=@_; $self->{'data'}->disconnect; } # table($table_subname) gives a table name to use for some particular # module data. # # table($table_subname,$module_name) gives the table name # corresponding to another module sub table { my ($self,$table_subname,$module_name)=@_; if($module_name) { $module_name=$self->{'name'} if($module_name eq 'self'); return($module_name."_".$table_subname); } else { $module_name=$self->{'name'}; return($module_name.".".$module_name."_".$table_subname); } } sub index { my ($self,@args)=@_; return($self->table(@args)); } # sql_quote($string) can be used to quote a string before including it # in a SQL query. sub sql_quote { my ($self,$string)=@_; return($self->{'data'}->sql_quote($string)); } # sql_do($sql,@bind) executes the SQL query $sql, replacing ? by the # elements of @bind. sub sql_do { my ($self,$sql,@bind)=@_; $self->{'data'}->sql_do($sql,@bind); } # sql_single($sql,@bind) calls the SQL query $sql (SQL string or # statement prepared by DBI) and returns a single value answer. In the # query, ? are replaced by the values from @bind. sub sql_single { my ($self,$sql,@bind)=@_; debug_and_stderr "WARNING: sql_single with no transaction -- $sql" if(!$self->{'data'}->{'trans'}); my $x=$self->dbh->selectrow_arrayref($sql,{},@bind); if($x) { return($x->[0]); } else { return(undef); } } # same as sql_single, but returns an array with all the rows of the first # column (in fact there is often one only column in the query result) # of the result. sub sql_list { my ($self,$sql,@bind)=@_; debug_and_stderr "WARNING: sql_list with no transaction -- $sql" if(!$self->{'data'}->{'trans'}); my $x=$self->dbh->selectcol_arrayref($sql,{},@bind); if($x) { return(@$x); } else { return(undef); } } # same as sql_single, but returns an array with all the columns of the first # row of the result. sub sql_row { my ($self,$sql,@bind)=@_; debug_and_stderr "WARNING: sql_row with no transaction -- $sql" if(!$self->{'data'}->{'trans'}); my $x=$self->dbh->selectrow_arrayref($sql,{},@bind); if($x) { return(@$x); } else { return(undef); } } # _embedded versions of the last two methods embeds these methods in a # read transaction sub sql_single_embedded { my ($self,$sql,@bind)=@_; $self->begin_read_transaction; my $r=$self->sql_single($sql,@bind); $self->end_transaction; return($r); } sub sql_list_embedded { my ($self,$sql,@bind)=@_; $self->begin_read_transaction; my @r=$self->sql_list($sql,@bind); $self->end_transaction; return(@r); } # define_statements defines all the SQL statements often used by the # module - it is to be overloaded by inherited AMC::DataModule::XXX classes. sub define_statements { } # statement($sid) returns a prepared statement from the SQL string # named with ID $sid, defined by define_statements. The statement is # prepared only once, and only prepared if used. sub statement { my ($self,$sid)=@_; debug_and_stderr "WARNING: statement request with no transaction -- $sid" if(!$self->{'data'}->{'trans'}); my $s=$self->{'statements'}->{$sid}; if($s->{'s'}) { return($s->{'s'}); } elsif($s->{'sql'}) { debug "Preparing statement $sid"; $s->{'s'}=$self->dbh->prepare($s->{'sql'}); return($s->{'s'}); } else { debug_and_stderr("Undefined SQL statement: $sid"); } } # query($query,@bind) calls the SQL query named $query (see the # available query names in the define_statements function) and returns # a single value answer. In the query statement, ? are replaced by the # values from @bind. sub query { my ($self,$query,@bind)=@_; return($self->sql_single($self->statement($query),@bind)); } # same as query, but returns an array with all the rows of the first # column (in fact there is often one only column in the query result) # of the result. sub query_list { my ($self,$query,@bind)=@_; return($self->sql_list($self->statement($query),@bind)); } # same as query, but returns an array with all the values of the first # row of the result. sub query_row { my ($self,$query,@bind)=@_; return($self->sql_row($self->statement($query),@bind)); } # begin_transaction begins a transaction in immediate mode, to be used # to eventually write to the database. sub begin_transaction { my ($self,$key)=@_; my $time; $key='----' if(!defined($key)); debug "Opening RW transaction for $self->{'name'} [$key]..."; $time=time; $self->{'data'}->begin_transaction($key); $time=time-$time; debug "[$key] <-> $self->{'name'}"; if($time>1) { debug_and_stderr "[$key] Waited for database RW lock $time seconds"; } } # begin_read_transaction begins a transaction for reading data. sub begin_read_transaction { my ($self,$key)=@_; my $time; $key='----' if(!defined($key)); debug "Opening RO transaction for $self->{'name'} [$key]..."; $time=time; $self->{'data'}->begin_read_transaction($key); $time=time-$time; debug "[$key] <- $self->{'name'}"; if($time>1) { debug_and_stderr "[$key] Waited for database R lock $time seconds"; } } # end_transaction end the transaction. sub end_transaction { my ($self,$key)=@_; $key='----' if(!defined($key)); debug "Closing transaction for $self->{'name'} [$key]..."; $self->{'data'}->end_transaction($key); debug "[$key] X $self->{'name'}"; } # variable($name) returns the value of variable $name, stored in the # table variable in the module database. # # variable($name,$value) sets the value of variable $name. sub variable { my ($self,$name,$value)=@_; my $vt=$self->table("variables"); if(defined($value)) { $self->sql_do("INSERT OR REPLACE INTO $vt (name,value) VALUES (". $self->sql_quote($name).",". $self->sql_quote($value).")"); } else { my $x=$self->dbh->selectrow_arrayref("SELECT value FROM $vt WHERE name=". $self->sql_quote($name)); return($x->[0]); } } # The same, but embedded in a SQL transaction sub variable_transaction { my ($self,$name,$value)=@_; my $vt=$self->table("variables"); $self->begin_read_transaction('vTRS'); my $x=$self->dbh->selectrow_arrayref("SELECT value FROM $vt WHERE name=". $self->sql_quote($name)); $self->end_transaction('vTRS'); if(defined($value)) { if($value ne $x->[0]) { $self->begin_transaction('sTRS'); $self->sql_do("INSERT OR REPLACE INTO $vt (name,value) VALUES (". $self->sql_quote($name).",". $self->sql_quote($value).")"); $self->end_transaction('sTRS'); } } else { return($x->[0]); } } # clear_variables($pattern) clear all variables values that are not # used internally by the module (keeps the 'version' variable, for # exemple). If $pattern is given, only delete variables LIKE $pattern. sub clear_variables { my ($self,$pattern)=@_; if($pattern) { $self->sql_do("DELETE FROM ".$self->table("variables")." WHERE name != 'version'" ." AND name LIKE ?",$pattern); } else { $self->sql_do("DELETE FROM ".$self->table("variables")." WHERE name != 'version'"); } } # version_check upgrades the module database to the last version. sub version_check { my ($self)=@_; my $vt=$self->table("variables"); # First try with only a read transaction, so that the process is # not blocked if someone else is using the database. $self->begin_read_transaction('rVAR'); my @vt=$self->{'data'}->sql_tables("%".$self->{'name'}."_variables"); $self->end_transaction('rVAR'); if (!@vt) { # opens a RW transaction only if necessary $self->begin_transaction('tVAR'); my @vt=$self->{'data'}->sql_tables("%".$self->{'name'}."_variables"); if (@vt) { debug "variables table has just been created!"; } else { debug "Empty database: creating variables table"; $self->sql_do("CREATE TABLE $vt (name TEXT UNIQUE, value TEXT)"); $self->variable('version','0'); } $self->end_transaction('tVAR'); } else { debug "variables table present."; } my $cv=$self->version_current; if ($cv) { my $vu=$self->variable_transaction('version'); if ($vu < $cv) { # Database upgrade $self->begin_transaction('dbUG'); $vu=$self->variable('version'); my $v; debug "Database version: $vu, needs to upgrade (current $cv)"; do { $v=$vu; $vu=$self->version_upgrade($v); debug("Upgraded data module ".$self->{'name'} ." from version $v to $vu") if ($vu); } while ($vu); $self->variable('version',$v); $self->end_transaction('dbUG'); } elsif ($vu > $cv) { debug "WARNING: Database version ($vu) is higher than module current version ($cv)"; } } else { debug "WARNING: No module current version"; } # also get some specific database variables in memory my @ivs=$self->immutable_variables(); if(@ivs) { $self->begin_transaction('imtb'); for my $v (@ivs) { $self->{immutable}->{$v}=$self->variable($v); $self->{immutable}->{$v}='' if(!defined($self->{immutable}->{$v})); } $self->end_transaction('imtb'); } } # immutable_variables() returns the list of variables that has to be # read to the object when opening the database. There are none by # default, overload by AMC::DataModule::XXX if neaded. sub immutable_variables { return(); } # version_current($v) is to be overloaded by AMC::DataModule::XXX # classes. It returns the current version number for the module. If # the database version is less than this number, this means that the # database has to be upgraded. sub version_current { my ($self,$old_version)=@_; return(''); } # version_upgrade($v) is to be overloaded by AMC::DataModule::XXX # classes. Called with argument $v, it has to upgrade the database # from version $v and return the version number after upgrade. If $v # is the latest version, version_upgrade must return a false value. sub version_upgrade { my ($self,$old_version)=@_; return(''); } # see AMC::Data::progression sub progression { my ($self,@a)=@_; $self->{'data'}->progression(@a); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/DataModule/000077500000000000000000000000001341176102400215235ustar00rootroot00000000000000auto-multiple-choice-1.4.0/AMC-perl/AMC/DataModule/association.pm000066400000000000000000000325311341176102400244010ustar00rootroot00000000000000# -*- perl -*- # # Copyright (C) 2011-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::DataModule::association; # AMC associations management. # This module is used to store (in a SQLite database) and handle all # data concerning associations between completed answer sheets and # students (from the students list). # TABLES: # # association holds data concerning association between a student # completed answer sheet (identified by its student number and its # copy number) and the student name (in fact the student identifier # found in the students list file). # # * student is the student number of the completed answer sheet. # # * copy is the copy number (0 if the question sheet has not been # photocopied, and 1,2,... otherwise). # # * auto is the student ID (a primary key found in the students list # file) associated with the answer sheet by automatic association, # or NULL if no automatic association were made for this sheet. # # * manual is the student ID (a primary key found in the students list # file) associated with the answer sheet by manual association, # or NULL if no automatic association were made for this sheet. # VARIABLES: # # key_in_list is the column name from students list file where to find # the primary key that will be used in the association data to # identify a student. # # code is the code name in the LaTeX source file (first argument given # to the \AMCcode command) that is used for automatic association. use AMC::Basic; use AMC::DataModule; use IO::File; use XML::Simple; @ISA=("AMC::DataModule"); sub version_current { return(1); } sub immutable_variables { return("code_storage"); } sub version_upgrade { my ($self,$old_version)=@_; if($old_version==0) { $self->variable("code_storage","full"); # Upgrading from version 0 (empty database) to version 1 : # creates all the tables. debug "Creating scoring tables..."; $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("association") ." (student INTEGER, copy INTEGER, manual TEXT, auto TEXT, PRIMARY KEY (student,copy))"); $self->populate_from_xml; return(1); } return(''); } # populate_from_xml read the old format XML file (if any) and insert # it in the new SQLite database sub populate_from_xml { my ($self)=@_; my $assoc_file=$self->{'data'}->directory; $assoc_file =~ s:/[^/]+/?$:/association.xml:; return if(!-f $assoc_file); $self->progression('begin',__"Fetching association results from old format XML files..."); my $i=IO::File->new($assoc_file,"<:encoding(utf-8)"); my $a=XMLin($i,'ForceArray'=>1,'KeyAttr'=>['id']); $i->close(); $self->variable('key_in_list',$a->{'liste_key'}); $self->variable('code',$a->{'notes_id'}); my @s=(keys %{$a->{'copie'}}); my $frac=0; for my $student (@s) { my $s=$a->{'copie'}->{$student}; $self->statement('NEWAssoc') ->execute($student,0,$s->{'manuel'},$s->{'auto'}); $frac++; $self->progression('fraction',$frac/(1+$#s)); } $self->progression('end'); } # defines all the SQL statements that will be used sub define_statements { my ($self)=@_; my $at=$self->table("association"); my $t_page=$self->table("page","capture"); $self->{'statements'}= { 'NEWAssoc'=>{'sql'=>"INSERT INTO $at" ." (student,copy,manual,auto) VALUES (?,?,?,?)"}, 'insert'=>{'sql'=>"INSERT OR IGNORE INTO $at" ." (student,copy,manual,auto) VALUES (?,?,?,?)"}, 'getManual'=>{'sql'=>"SELECT manual FROM $at" ." WHERE student=? AND copy=?"}, 'getAuto'=>{'sql'=>"SELECT auto FROM $at" ." WHERE student=? AND copy=?"}, 'setManual'=>{'sql'=>"UPDATE $at" ." SET manual=? WHERE student=? AND copy=?"}, 'setAuto'=>{'sql'=>"UPDATE $at" ." SET auto=? WHERE student=? AND copy=?"}, 'getReal'=>{'sql'=>"SELECT CASE" ." WHEN manual IS NOT NULL THEN manual" ." ELSE auto END" ." FROM $at" ." WHERE student=? AND copy=?"}, 'realCount'=>{'sql'=>"SELECT COUNT(*) FROM ( SELECT CASE" ." WHEN manual IS NOT NULL THEN manual" ." ELSE auto END AS real" ." FROM $at" ." ) WHERE real=?||''"}, 'realCounts'=>{'sql'=> " SELECT t.student AS student,t.copy AS copy,t.real AS real,t.manual AS manual,t.auto AS auto,c.n AS n" ." FROM" ." ( SELECT CASE" ." WHEN manual IS NOT NULL THEN manual" ." ELSE auto END AS real,student,copy,manual,auto FROM $at" ." ) AS t," ." ( SELECT CASE" ." WHEN manual IS NOT NULL THEN manual" ." ELSE auto END AS real," ." COUNT(*) AS n FROM $at GROUP by real" ." ) AS c" ." ON t.real=c.real" }, 'realBack'=>{'sql'=>"SELECT student,copy FROM ( SELECT CASE" ." WHEN manual IS NOT NULL THEN manual" ." ELSE auto END AS real, student, copy" ." FROM $at" ." ) WHERE real=?||''"}, 'realBackInt'=>{'sql'=>"SELECT student,copy FROM ( SELECT CASE" ." WHEN manual IS NOT NULL THEN manual" ." ELSE auto END AS real, student, copy" ." FROM $at" ." ) WHERE CAST(real AS INTEGER)=?"}, 'counts'=>{'sql'=>"SELECT COUNT(auto),COUNT(manual)," ." SUM(CASE WHEN auto IS NOT NULL OR manual IS NOT NULL" ." THEN 1 ELSE 0 END)" ." FROM $at"}, 'clearAuto'=>{'sql'=>"UPDATE $at SET auto=NULL"}, 'findManual'=>{'sql'=>"SELECT student,copy FROM $at WHERE manual=?||''"}, 'unlink'=>{'sql'=>"UPDATE $at SET manual=" ." ( CASE WHEN manual IS NULL OR auto=?||'' THEN 'NONE' ELSE NULL END )" ." WHERE manual=? OR ( auto=?||'' AND manual IS NULL )"}, 'assocMissingCount'=>{'sql'=>"SELECT COUNT(*) FROM" ."(SELECT student,copy FROM $t_page" ." EXCEPT SELECT student,copy FROM $at" ." WHERE manual IS NOT NULL OR auto IS NOT NULL)"}, 'deleteAssociations'=>{'sql'=>"DELETE FROM $at" ." WHERE student=? AND copy=?"}, 'list'=>{'sql'=>"SELECT * FROM $at ORDER BY student,copy"}, }; } # get_manual($student,$copy) returns the manual association ID for the # given answer sheet. sub get_manual { my ($self,$student,$copy)=@_; return($self->sql_single($self->statement('getManual'), $student,$copy)); } # get_auto($student,$copy) returns the automatic association ID for the # given answer sheet. sub get_auto { my ($self,$student,$copy)=@_; return($self->sql_single($self->statement('getAuto'), $student,$copy)); } # get_real($student,$copy) returns the resulting association ID for the # given answer sheet (manual one if present, or automatic one). sub get_real { my ($self,$student,$copy)=@_; return($self->sql_single($self->statement('getReal'), $student,$copy)); } # with_association($student,$copy) returns TRUE if the copy is associated sub with_association { my ($self,$student,$copy)=@_; my $r=$self->get_real($student,$copy); return(defined($r) && $r ne ''); } # set_manual($student,$copy,$manual) sets the manual association ID for the # given answer sheet. sub set_manual { my ($self,$student,$copy,$manual)=@_; my $n=$self->statement('insert')->execute($student,$copy,$manual,undef); if($n<=0) { $self->statement('setManual')->execute($manual,$student,$copy); } } # set_auto($student,$copy,$manual) sets the automatic association ID for the # given answer sheet. sub set_auto { my ($self,$student,$copy,$auto)=@_; my $n=$self->statement('insert')->execute($student,$copy,undef,$auto); if($n<=0) { $self->statement('setAuto')->execute($auto,$student,$copy); } } # counts returns a list containing the number A of automatic # associations, the number M of manual associations, and the total # number T of answer sheets that are associated. T is not always equal # to A+M, as a particular answer sheet may have automatic AND manual # associations, for exemple when automatic association did not work # well and has been corrected by manual association. sub counts { my ($self)=@_; my $sth=$self->statement('counts'); $sth->execute; return(@{$sth->fetchrow_arrayref}); } # clear clears all association data. sub clear { my ($self)=@_; $self->sql_do("DELETE FROM ".$self->table('association')); } # clear_auto clears all automatic association data sub clear_auto { my ($self)=@_; $self->statement('clearAuto')->execute; } # check_keys($key_in_list,$code) checks that the value of the # variables 'key_in_list' and 'code' corresponds to the given # values. If not, association data is cleared. sub check_keys { my ($self,$key_in_list,$code)=@_; if($self->variable('key_in_list') ne $key_in_list) { debug "Association variable mismatch: clearing database"; $self->clear; $self->variable('key_in_list',$key_in_list); $self->variable('code',$code); } elsif($code ne '---' && $self->variable('code') ne $code) { debug "Association variable mismatch: clearing automatic association"; $self->clear_auto; $self->variable('code',$code); } } # real_back($code) returns the (student,copy) list corresponding to # the answer sheet that is currently associated with the student ID # $code. sub real_back { my ($self,$code)=@_; my @r=$self->sql_row($self->statement('realBack'),$code); # for backward compatibility, makes real_back work even if the # leading zeroes are givenn or not in the database or in # $code... but only for databases created with older versions or # with code_storage variable different from "full" if($self->{immutable}->{code_storage} ne "full" && $#r<1 && $code=~/^[0-9]*[1-9][0-9]*$/) { $code =~ s/^0+//; @r=$self->sql_row($self->statement('realBackInt'),$code); } return(@r); } # state($student,$copy) returns: # # 0 if this answer sheet has not been associated with a student name ; # # 1 if this answer sheet has been associated with a student name, and # no other sheet has been associated with the same student name ; # # 2 if this answer sheet has been associated with a student name, but # some other sheets has been associated with the same student name. sub state { my ($self,$student,$copy)=@_; my $r=$self->get_real($student,$copy); if(!defined($r) || !$r || $r eq 'NONE') { return(0); } else { my $nb=$self->sql_single($self->statement('realCount'),$r); return($nb==1 ? 1 : 2); } } # counts_hash() returns a hashref $r that can be used to get the # number of copies that has the same associated student as some copy. # # if $student,$copy is associated with a student, # $r->{studentids_string($student,$copy)} is a hashref with # manual -> student ID of manual association # auto -> student ID of auto association # real -> associated student ID # n -> number of copies with the sams associated student # state -> the same as state($student,$copy) # color -> color used in copies list sub counts_hash { my ($self)=@_; my $r={}; for my $l (@{$self->dbh->selectall_arrayref($self->statement('realCounts'), { Slice => {} })}) { my $etat=(!defined($l->{real}) || !$l->{real} || $l->{real} eq 'NONE' ? 0 : $l->{n}==1 ? 1 : 2); $r->{studentids_string($l->{student},$l->{copy})}= {%$l, etat=>$etat, color=>($etat==0 ? (defined($l->{manual}) && $l->{manual} eq 'NONE' ? 'salmon' : undef) : $etat==1 ? ($l->{manual} ? 'lightgreen' : 'lightblue') : 'salmon'), }; } return($r); } # delete_target($code) removes associations made with student ID $code # (manual associations with this ID are removed, and automatic # associations with this ID are overwritten with a manual association # with 'NONE'). This method also returns a reference to an array of # array references [,] with all the sheets # that were associated with this student name. sub delete_target { my ($self,$code)=@_; my $r=$self->dbh->selectall_arrayref($self->statement('realBack'),{},$code); $self->statement('unlink')->execute($code,$code,$code); return($r); } # missing_count returns the number of entered sheets without association sub missing_count { my ($self)=@_; $self->{'data'}->require_module('capture'); return($self->sql_single($self->statement('assocMissingCount'))); } # delete_association_data($student,$copy) deletes all association data # for this answer sheet. sub delete_association_data { my ($self,$student,$copy)=@_; for my $part (qw/Associations/) { $self->statement('delete'.$part)->execute($student,$copy); } } # list() returns all association data sub list { my ($self)=@_; return($self->dbh->selectall_arrayref($self->statement('list'),{Slice=>{}})); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/DataModule/capture.pm000066400000000000000000001536731341176102400235430ustar00rootroot00000000000000# -*- perl -*- # # Copyright (C) 2011-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::DataModule::capture; # AMC capture data management. # This module is used to store (in a SQLite database) and handle all # data concerning data capture (automatic and manual). # TABLES: # # page describes how a page scan fits with a question document page. # # * src is the scan file name (this is a raster image file, like # tiff. Usualy a each scan file contains only one page). This # filename is absolute, with some shortcuts for portability: %PROJET # is the project directory, %PROJETS is the directory where all # projects are stored, and %HOME is the user home directory. # # * student is the student number of the question page corresponding # to the scan # # * page is the page number of the question page corresponding # to the scan (the page number starts from 1 for eevery student) # # * copy is the copy number of this page. When each student has his # own student number (question paper is printed from AMC and not # photocopied), copy is null. When all the question papers are # photocopied from, say, the three first versions of the subject, # student is the number from 1 to 3 identifying the original # question paper student number, and copy is an integer used to # differentiate the completed answer sheets coming from the # photocopied answer sheets from the same question paper. # # * timestamp_auto is the time when the scan processing was done # (using time function: seconds from Jan 1 1970), or -1 if there is # no automatic data capture for this page. # # * timestamp_manual is the time when the last manual data capture was # done (set to -1 if none). # # * a,b,c,d,e,f are the 6 parameters describing the linear transform # that taked the positions from the question paper to the positions # from the scan. Thus, if (x,y) are coordinates of a point on the # question paper, the corresponding pixel on the scan file should be # near coordinates (x',y'), with # # x' = a*x + b*y + e # y' = c*x + d*y + f # # * mse is the mean square error for the four corner marks on the page # to be perfectly transported from the question paper to the scan by # the linear transform defined by (a,b,c,d,e,f). # # * layout_image is the filename of the scan image with added drawings # showing where boxes are detected. This is a relative filename; the # file should be in the %PROJET/cr directory (cr subdirectory of the # project directory). # # * annotated is the filename of the annotated jpeg of the page, when # available. This is a relative filename; the file should be in the # %PROJET/cr/corrections/jpg directory. # # * timestamp_annotate is the time the annotated page was produced. # # * overwritten is the number of times capture data has been # overwritten # zone describes the different objects that can be found on the scans # (corner marks, boxes, name field) # # * zoneid is an object identifier, also used for the position table. # # * student # * page # * copy are the same as for the page table # # * type is the object type: ZONE_FRAME for the zone made from the 4 # corner centers, ZONE_NAME for the name field zone, ZONE_DIGIT for # binary boxes at the top of the page identifying the page, ZONE_BOX # for the answers boxes to be filled (or not) by the students. The # constants ZONE_* are defined later. # # * id_a is the question number for ZONE_BOX, or the number id for # ZONE_DIGIT. It does not have any meaning for other objects. # # * id_b is the answer number for ZONE_BOX, and the digit number for # ZONE_DIGIT. # # * total is the total number of pixels from the scan inside the zone, # or -1 if not measured. # # * black is the number of black pixels from the scan inside the zone, # or -1 if not measured. # # * manual is 1 if the box is declared to be filled by a manual data # capture action, 0 if declared not to be filled, and -1 if no # manual data capture occured for this zone. # # * image is the name of the zone image file, extracted from the # scan. This filename is relative to the %PROJET/cr/zooms directory # (%PROJET is here the project directory). # position retains the position of the zones corners on the scan # # * zoneid is the zone identifier, as used in the zone table. # # * corner is the corner number (1=TL, 2=TR, 3=BR, 4=BL) # # * x # * y are the coordinates of the zone corner on the scan. # # * type is the type of the considered corner: POSITION_BOX if one # considers the corner of the box/zone, and POSITION_MEASURE if one # considers the corner of the measuring zone (a zone slightly # reduced from the box zone, so as not to consider box contours when # measuring the number of black pixels). # failed lists all the scans that could not be processed, as the page # numbers (student number, page number and check code, as binary # boxes) could not be read on the top of the page. # # * filename is the scan filename. # # * timestamp is the time when processing was done. use Exporter qw(import); use constant { ZONE_FRAME=>1, ZONE_NAME=>2, ZONE_DIGIT=>3, ZONE_BOX=>4, POSITION_BOX=>1, POSITION_MEASURE=>2, }; our @EXPORT_OK = qw(ZONE_FRAME ZONE_NAME ZONE_DIGIT ZONE_BOX POSITION_BOX POSITION_MEASURE); our %EXPORT_TAGS = ( 'zone' => [ qw/ZONE_FRAME ZONE_NAME ZONE_DIGIT ZONE_BOX/ ], 'position'=> [ qw/POSITION_BOX POSITION_MEASURE/ ], ); use DBI qw(:sql_types); use AMC::Basic; use AMC::DataModule; use AMC::DataModule::layout ':flags'; use XML::Simple; @ISA=("AMC::DataModule"); use_gettext(); sub version_current { return(5); } sub version_upgrade { my ($self,$old_version)=@_; if($old_version==0) { # Upgrading from version 0 (empty database) to version 1 : # creates all the tables. debug "Creating capture tables..."; $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("page") ." (src TEXT, student INTEGER, page INTEGER, copy INTEGER DEFAULT 0, timestamp_auto INTEGER DEFAULT 0, timestamp_manual INTEGER DEFAULT 0, a REAL, b REAL, c REAL, d REAL, e REAL, f REAL, mse REAL, layout_image TEXT, annotated TEXT, timestamp_annotate INTEGER, PRIMARY KEY (student,page,copy))"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("zone") ." (zoneid INTEGER PRIMARY KEY, student INTEGER, page INTEGER, copy INTEGER, type INTEGER, id_a INTEGER, id_b INTEGER, total INTEGER DEFAULT -1, black INTEGER DEFAULT -1, manual REAL DEFAULT -1, image TEXT)"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("position") ." (zoneid INTEGER, corner INTEGER, x REAL, y REAL, type INTEGER, PRIMARY KEY (zoneid,corner,type))"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("failed") ." (filename TEXT UNIQUE, timestamp INTEGER)"); $self->populate_from_xml; return(1); } elsif($old_version==1) { # Includes zoom files in the database debug "Including zoom files in the database..."; $self->sql_do("ALTER TABLE ".$self->table("zone") ." ADD COLUMN imagedata BLOB"); my $list=$self->get_image_paths(ZONE_BOX); my $nn=1+$#{$list}; if($nn>0) { $self->progression('begin',__"Including zooms in the database..."); my $ii=0; for my $i (@{$list}) { if($i->{image}) { my $f=$self->{'data'}->{'directory'}."/../cr/zooms/".$i->{image}; if(defined($f) && -f $f) { $self->set_image($i->{zoneid},file_content($f)); } } $ii++; $self->progression('fraction',$ii/$nn); } $self->progression('end'); } return(2) } elsif($old_version==2) { $self->progression('begin',__("Building capture database indexes...")); $self->sql_do("CREATE UNIQUE INDEX IF NOT EXISTS " .$self->index("index_zone")." ON " .$self->table("zone","self")." (student,page,copy,type,id_a,id_b)"); $self->progression('end'); return(3); } elsif($old_version==3) { $self->progression('begin',__("Building capture database indexes...")); $self->sql_do("CREATE INDEX IF NOT EXISTS " .$self->index("index_zone_nopage")." ON " .$self->table("zone","self")." (student,copy,type,id_a,id_b)"); $self->progression('end'); return(4); } elsif($old_version==4) { $self->sql_do("ALTER TABLE ".$self->table("page") ." ADD COLUMN overwritten INTEGER DEFAULT 0"); return(5); } return(''); } # Internal function used by populate_from_xml to put all corners # coordinates of a particular box sub populate_position { my ($self,$xml,$zoneid,$type)=@_; return if(!$xml); for my $corner (keys %$xml) { $self->statement('NEWPosition') ->execute($zoneid, $corner, $xml->{$corner}->{'x'}, $xml->{$corner}->{'y'}, $type); } } # populate_from_xml read the old format XML files (if any) and inserts # them in the new SQLite database sub populate_from_xml { my ($self)=@_; my $cr=$self->{'data'}->directory; $cr =~ s/\/[^\/]+\/?$/\/cr/; return if(!-d $cr); $self->progression('begin',__"Fetching data capture results from old format XML files..."); my $cordir="$cr/corrections/jpg/"; opendir(DIR, $cr) || die "can't opendir $cr: $!"; @xmls = grep { /\.xml$/ && -s "$cr/".$_ } readdir(DIR); closedir DIR; my $frac=0; XML: for my $f (@xmls) { my $anx=XMLin("$cr/".$f, ForceArray => ["analyse","chiffre","case","id"], KeepRoot=>1, KeyAttr=> [ 'id' ]); next XML if(!$anx->{'analyse'}); ID: for my $id (keys %{$anx->{'analyse'}}) { my $an=$anx->{'analyse'}->{$id}; my @ep=get_ep($id); my %oo; my @st=stat("$cr/".$f); $oo{'timestamp'}=$st[9]; if ($an->{'manuel'}) { # This is a XML description of a manual data capture: no # position information, only ticked-or-not for all # boxes $self->set_page_manual(@ep,0,$oo{'timestamp'}); for my $c (keys %{$an->{'case'}}) { my $case=$an->{'case'}->{$c}; $self->set_zone_manual(@ep,0,ZONE_BOX, $case->{'question'},$case->{'reponse'}, $case->{'r'}); } } else { # This is a XML description of an automatic data # capture: contains full information about darkness and # positions of the boxes $oo{'mse'}=$an->{'transformation'}->{'mse'}; for my $k (qw/a b c d e f/) { $oo{$k}=$an->{'transformation'}->{'parametres'}->{$k}; } $self->set_page_auto($an->{'src'},@ep,0, map { $oo{$_} } (qw/timestamp a b c d e f mse/)); if($an->{'cadre'}) { my $zoneid=$self->get_zoneid(@ep,0,ZONE_FRAME,0,0,1); $self->populate_position($an->{'cadre'}->{'coin'}, $zoneid,POSITION_BOX); } if($an->{'nom'}) { my $zoneid=$self->get_zoneid(@ep,0,ZONE_NAME,0,0,1); $self->populate_position($an->{'nom'}->{'coin'}, $zoneid,POSITION_BOX); # Look if the namefield image is present... my $nf="nom-".id2idf($id).".jpg"; if(-f "$cr/$nf") { $self->set_zone_auto_id_without_imagedata($zoneid,-1,-1,$nf); } } for my $c (keys %{$an->{'case'}}) { my $case=$an->{'case'}->{$c}; my $zoneid=$self->get_zoneid(@ep,0,ZONE_BOX, $case->{'question'},$case->{'reponse'},1); my $zf=sprintf("%d-%d/%d-%d.png", @ep, $case->{'question'},$case->{'reponse'}); $zf='' if(!-f "$cr/zooms/$zf"); $self->set_zone_auto_id_without_imagedata ($zoneid, $case->{'pixels'},$case->{'pixelsnoirs'}, $zf); $self->populate_position($case->{'coin'},$zoneid,POSITION_BOX); $self->populate_position($an->{'casetest'}->{$c}->{'coin'}, $zoneid,POSITION_MEASURE); } # Look if annotated scan is present... my $af="page-".id2idf($id).".jpg"; if(-f $cordir.$af) { my @sta=stat($cordir.$af); $self->set_annotated(@ep,0,$af,$sta[9]); } # Look if layout scan is present... if(-f $cr.'/'.$af) { my @sta=stat($cr.'/'.$af); $self->set_layout_image(@ep,0,$af,$sta[9]); } } } $frac++; $self->progression('fraction',$frac/($#xmls+1)); } $self->progression('end'); } # defines all the SQL statements that will be used sub define_statements { my ($self)=@_; my $t_page=$self->table("page"); my $t_zone=$self->table("zone"); my $t_position=$self->table("position"); my $t_failed=$self->table("failed"); my $t_box=$self->table("box","layout"); my $t_namefield=$self->table("namefield","layout"); my $t_layoutpage=$self->table("page","layout"); my $t_lnf=$self->table("namefield","layout"); $self->{'statements'}= { 'NEWPageAuto'=>{'sql'=>"INSERT INTO $t_page" ." (src,student,page,copy,timestamp_auto,a,b,c,d,e,f,mse)" ." VALUES (?,?,?,?,?,?,?,?,?,?,?,?)"}, 'NEWPageManual'=>{'sql'=>"INSERT INTO $t_page" ." (student,page,copy,timestamp_manual)" ." VALUES (?,?,?,?)"}, 'SetPageAuto'=>{'sql'=>"UPDATE $t_page" ." SET src=?, timestamp_auto=?, a=?, b=?, c=?, d=?, e=?, f=?, mse=?" ." WHERE student=? AND page=? AND copy=?"}, 'overwritePage'=>{sql=>"UPDATE ".$t_page ." SET overwritten=overwritten+1" ." WHERE student=? AND page=? AND copy=?"}, 'overwriteClear'=>{sql=>"UPDATE $t_page SET overwritten=0"}, 'SetPageManual'=>{'sql'=>"UPDATE $t_page" ." SET timestamp_manual=?" ." WHERE student=? AND page=? AND copy=?"}, 'NEWZone'=>{'sql'=>"INSERT INTO $t_zone" ." (student,page,copy,type,id_a,id_b)" ." VALUES (?,?,?,?,?,?)"}, 'getZoneID'=>{'sql'=>"SELECT zoneid FROM $t_zone" ." WHERE student=? AND page=? AND copy=? AND type=? AND id_a=? AND id_b=?"}, 'zonesCount'=>{'sql'=>"SELECT COUNT(*) FROM $t_zone" ." WHERE student=? AND page=? AND copy=? AND type=?"}, 'zone'=>{'sql'=>"SELECT COUNT(*) FROM $t_zone" ." WHERE student=? AND page=? AND copy=? AND type=?" ." AND id_a=? AND id_b=?"}, 'NEWPosition'=>{'sql'=>"INSERT OR REPLACE INTO $t_position" ." (zoneid,corner,x,y,type)" ." VALUES (?,?,?,?,?)"}, 'setPosition'=>{'sql'=>"UPDATE $t_position" ." SET x=?, y=? WHERE zoneid=? AND corner=? AND type=?"}, 'getPage'=>{'sql'=>"SELECT * FROM $t_page" ." WHERE student=? AND page=? AND copy=?"}, 'setZoneManual'=>{'sql'=>"UPDATE $t_zone" ." SET manual=? WHERE zoneid=?"}, 'setZoneAuto'=>{'sql'=>"UPDATE $t_zone" ." SET total=?, black=?, image=?, imagedata=? WHERE zoneid=?"}, 'setZoneAutoPrim'=>{'sql'=>"UPDATE $t_zone" ." SET total=?, black=?, image=? WHERE zoneid=?"}, 'nPages'=>{'sql'=>"SELECT COUNT(*) FROM $t_page" ." WHERE timestamp_auto>0 OR timestamp_manual>0"}, 'nPagesAuto'=>{'sql'=>"SELECT COUNT(*) FROM $t_page" ." WHERE timestamp_auto>0"}, 'students'=>{'sql'=>"SELECT student FROM $t_page" ." WHERE timestamp_auto>0 OR timestamp_manual>0" ." GROUP BY student ORDER BY student"}, 'nCopies'=>{'sql'=>"SELECT COUNT(*) FROM (SELECT student,copy FROM $t_page" ." WHERE timestamp_auto>0 OR timestamp_manual>0" ." GROUP BY student,copy)"}, 'nOverwritten'=>{sql=>"SELECT SUM(overwritten) FROM $t_page"}, 'overwrittenPages'=>{sql=>"SELECT student,page,copy,overwritten,timestamp_auto" ." FROM $t_page WHERE overwritten>0" ." ORDER BY timestamp_auto DESC, student ASC, page ASC, copy ASC"}, 'studentCopies'=>{'sql'=>"SELECT student,copy FROM $t_page" ." WHERE timestamp_auto>0 OR timestamp_manual>0" ." GROUP BY student,copy ORDER BY student,copy"}, 'maxCopy'=>{'sql'=>"SELECT MAX(copy) FROM $t_page"}, 'maxAnswer'=>{'sql'=>"SELECT MAX(id_b) FROM $t_zone WHERE type=?"}, 'pageCopies'=>{'sql'=>"SELECT copy FROM $t_page" ." WHERE student=? AND page=? AND copy>=?" ." ORDER BY copy"}, 'pageLastCopy'=>{'sql'=>"SELECT MAX(copy) FROM $t_page" ." WHERE student=? AND page=?"}, 'pagesChanged'=>{'sql'=>"SELECT student,page,copy FROM $t_page" ." WHERE timestamp_auto>? OR timestamp_manual>?"}, 'pagesSummary'=> {'sql'=>"SELECT student,page,copy,src,mse,timestamp_auto,timestamp_manual" .",CASE WHEN timestamp_auto>0 AND mse>? THEN ?" ." ELSE ?" ." END AS mse_color" .",CASE WHEN timestamp_manual>0 THEN ?" ." WHEN timestamp_auto>0 THEN ?" ." ELSE ?" ." END AS color" .",CASE WHEN timestamp_manual>0 THEN timestamp_manual" ." ELSE timestamp_auto" ." END AS timestamp" .",(SELECT MIN(ABS(1.0*black/total-?))" ." FROM $t_zone" ." WHERE $t_zone.student=$t_page.student" ." AND $t_zone.page=$t_page.page AND $t_zone.copy=$t_page.copy" ." AND $t_zone.type=? AND total>0) AS delta" .",(SELECT MIN(ABS(1.0*black/total-?))" ." FROM $t_zone" ." WHERE $t_zone.student=$t_page.student" ." AND $t_zone.page=$t_page.page AND $t_zone.copy=$t_page.copy" ." AND $t_zone.type=? AND total>0) AS delta_up" ." FROM $t_page"}, 'pages'=>{'sql'=>"SELECT * FROM $t_page" ." WHERE timestamp_auto>0 OR timestamp_manual>0"}, 'missingPages'=> {'sql'=>"SELECT enter.student AS student,enter.page AS page ,$t_page.copy AS copy" ." FROM (SELECT student,page FROM $t_box WHERE role=1" ." UNION SELECT student,page FROM $t_namefield) AS enter," ." $t_page" ." ON enter.student=$t_page.student" ." EXCEPT SELECT student,page,copy FROM $t_page" ." ORDER BY student,copy,page"}, 'questionOnlyPages'=> {'sql'=>"SELECT student,page,0 AS copy FROM $t_box WHERE role=2" ." EXCEPT SELECT student,page,0 AS copy FROM $t_box WHERE role=1"}, 'noCapturePages'=> {'sql'=>"SELECT student,page,0 AS copy FROM $t_box WHERE role=1" ." UNION SELECT student,page,0 AS copy FROM $t_namefield" ." EXCEPT SELECT student,page,copy FROM $t_page" ." WHERE timestamp_auto>0 OR timestamp_manual>0"}, 'pageNearRatio'=>{'sql'=>"SELECT MIN(ABS(1.0*black/total-?))" ." FROM $t_zone" ." WHERE student=? AND page=? AND copy=? AND total>0"}, 'pageZones'=>{'sql'=>"SELECT zoneid,id_a,id_b,total,black,manual,1 AS role FROM $t_zone" ." WHERE student=? AND page=? AND copy=? AND type=?"}, 'zonesImages'=>{'sql'=>"SELECT image FROM $t_zone" ." WHERE student=? AND page=? AND copy=? AND type=?"}, 'imagePaths'=>{'sql'=>"SELECT zoneid,image FROM $t_zone WHERE type=?"}, 'setImage'=>{'sql'=>"UPDATE $t_zone SET image='',imagedata=? WHERE zoneid=?"}, 'zoomsTotalSize'=>{'sql'=>"SELECT SUM(LENGTH(imagedata)) FROM $t_zone" ." WHERE type=?"}, 'zoomsCleanup'=>{'sql'=>"UPDATE $t_zone SET imagedata=NULL WHERE type=?"}, 'pageZonesAll'=>{'sql'=>"SELECT * FROM $t_zone" ." WHERE type=?"}, 'pageZonesAutoCount'=> {'sql'=>"SELECT COUNT(*) FROM $t_zone" ." WHERE student=? AND page=? AND copy=? AND type=?" ." AND total>0"}, 'pageZonesD'=>{'sql'=>"SELECT zoneid,id_a,id_b,total,black,manual" ." FROM $t_zone" ." WHERE student=? AND page=? AND copy=? AND type=?" ." AND total>0" ." ORDER BY 1.0*black/total"}, 'pageZonesDI'=>{'sql'=>"SELECT *" ." FROM $t_zone" ." WHERE student=? AND page=? AND copy=? AND type=?" ." AND total>0" ." ORDER BY 1.0*black/total"}, 'zoneDarkness'=>{'sql'=>"SELECT 1.0*black/total FROM $t_zone" ." WHERE zoneid=? AND total>0"}, 'zoneImage'=>{'sql'=>"SELECT image FROM $t_zone" ." WHERE student=? AND copy=? AND type=?"}, 'setManualPage'=>{'sql'=>"UPDATE $t_page" ." SET timestamp_manual=?" ." WHERE student=? AND page=? AND copy=?"}, 'setManual'=>{'sql'=>"UPDATE $t_zone" ." SET manual=?" ." WHERE student=? AND page=? AND copy=?" ." AND type=? AND id_a=? AND id_b=?"}, 'setManualPageZones'=>{'sql'=>"UPDATE $t_zone" ." SET manual=?" ." WHERE student=? AND page=? AND copy=?"}, 'ticked'=>{'sql'=>"SELECT CASE" ." WHEN manual >= 0 THEN manual" ." WHEN total<=0 THEN 0" ." WHEN black >= ? * total AND black <= ? * total THEN 1" ." ELSE 0" ." END FROM $t_zone" ." WHERE student=? AND copy=? AND type=? AND id_a=? AND id_b=?"}, 'tickedSums'=>{'sql'=> "SELECT * FROM (SELECT zone.id_a AS question,zone.id_b AS answer,SUM(CASE" ." WHEN why=\"V\" THEN 0" ." WHEN why=\"E\" THEN 0" ." WHEN zone.manual >= 0 THEN zone.manual" ." WHEN zone.total<=0 THEN 0" ." WHEN zone.black >= ? * zone.total AND zone.black <= ? * zone.total THEN 1" ." ELSE 0" ." END) AS nb" ." FROM $t_zone AS zone, scoring.scoring_score AS score" ." ON zone.student=score.student AND zone.copy=score.copy AND zone.id_a=score.question" ." WHERE zone.type=? GROUP BY zone.id_a,zone.id_b)" ." UNION" ." SELECT * FROM (SELECT question,\"invalid\" AS answer," ." COUNT(*)-COUNT(NULLIF(why,\"E\")) AS nb" ." FROM scoring.scoring_score" ." GROUP BY question)" ." UNION" ." SELECT * FROM (SELECT question,\"empty\" AS answer," ." COUNT(*)-COUNT(NULLIF(why,\"V\")) AS nb" ." FROM scoring.scoring_score" ." GROUP BY question)" ." UNION" ." SELECT * FROM (SELECT question,\"all\" AS answer,COUNT(*) AS nb" ." FROM scoring.scoring_score" ." GROUP BY question)" }, 'tickedList'=>{'sql'=>"SELECT CASE" ." WHEN manual >= 0 THEN manual" ." WHEN total<=0 THEN 0" ." WHEN black >= ? * total AND black <= ? * total THEN 1" ." ELSE 0" ." END FROM $t_zone" ." WHERE student=? AND copy=? AND type=? AND id_a=?" ." ORDER BY id_b"}, 'tickedChars'=>{sql=>"SELECT char FROM (SELECT id_b FROM $t_zone" ." WHERE student=? AND copy=? AND id_a=? AND type=?" ." AND (manual=1 OR (black >= ? * total AND black <= ? * total))" ." ),( SELECT answer,char FROM ".$self->table("box","layout") ." WHERE student=? AND question=? AND role=?)" ." ON id_b=answer ORDER BY id_b" }, 'tickedPage'=>{'sql'=>"SELECT CASE" ." WHEN manual >= 0 THEN manual" ." WHEN total<=0 THEN 0" ." WHEN black >= ? * total AND black <= ? * total THEN 1" ." ELSE 0" ." END,id_a,id_b FROM $t_zone" ." WHERE student=? AND page=? AND copy=? AND type=?"}, 'zoneCorner'=>{'sql'=>"SELECT x,y FROM $t_position" ." WHERE zoneid=? AND type=? AND corner=?"}, 'zoneCenter'=>{'sql'=>"SELECT AVG(x),AVG(y) FROM $t_position" ." WHERE zoneid=? AND type=?"}, 'zoneDist'=>{'sql'=>"SELECT AVG((x-?)*(x-?)+(y-?)*(y-?))" ." FROM $t_position" ." WHERE zoneid=? AND type=?"}, 'getAnnotated'=>{'sql'=>"SELECT annotated,timestamp_annotate,student,page,copy" ." FROM $t_page" ." WHERE timestamp_annotate>0" ." ORDER BY student,copy,page"}, 'getAnnotatedFiles'=>{'sql'=>"SELECT annotated" ." FROM $t_page" ." WHERE timestamp_auto>0" ." ORDER BY student,copy,page"}, 'getAnnotatedPage'=>{'sql'=>"SELECT annotated" ." FROM $t_page" ." WHERE timestamp_annotate>0" ." AND student=? AND page=? AND copy=?"}, 'annotatedCount'=>{'sql'=>"SELECT COUNT(*) FROM $t_page" ." WHERE timestamp_annotate>0 AND annotated NOT NULL"}, 'getScanPage'=>{'sql'=>"SELECT src" ." FROM $t_page" ." WHERE student=? AND page=? AND copy=?"}, 'setAnnotated'=>{'sql'=>"UPDATE $t_page" ." SET annotated=?, timestamp_annotate=?" ." WHERE student=? AND page=? AND copy=?"}, 'setAnnotatedPageOutdated'=>{'sql'=>"UPDATE $t_page" ." SET timestamp_annotate=0" ." WHERE student=? AND page=? AND copy=?"}, 'setAnnotatedCopyOutdated'=>{'sql'=>"UPDATE $t_page" ." SET timestamp_annotate=0" ." WHERE student=? AND copy=?"}, 'setLayout'=>{'sql'=>"UPDATE $t_page" ." SET layout_image=?" ." WHERE student=? AND page=? AND copy=?"}, 'getLayout'=>{'sql'=>"SELECT layout_image FROM $t_page" ." WHERE student=? AND page=? AND copy=?"}, 'questionHasZero'=>{'sql'=>"SELECT COUNT(*) FROM $t_zone" ." WHERE student=? AND copy=? AND type=? AND id_a=?" ." AND id_b=0"}, 'Failed'=>{'sql'=>"INSERT OR REPLACE INTO $t_failed" ." (filename,timestamp)" ." VALUES (?,?)"}, 'failedList'=>{'sql'=>"SELECT * FROM $t_failed"}, 'failedNb'=>{'sql'=>"SELECT COUNT(*) FROM $t_failed"}, 'deleteFailed'=>{'sql'=>"DELETE FROM $t_failed WHERE filename=?"}, 'deletePagePositions'=> {'sql'=>"DELETE FROM $t_position" ." WHERE zoneid IN" ." (SELECT zoneid FROM $t_zone WHERE student=? AND page=? AND copy=?)"}, 'deletePageZones'=>{'sql'=>"DELETE FROM $t_zone" ." WHERE student=? AND page=? AND copy=?"}, 'deletePage'=>{'sql'=>"DELETE FROM $t_page" ." WHERE student=? AND page=? AND copy=?"}, 'pagesStudent'=> {'sql'=>"SELECT a.page AS page,a.subjectpage AS subjectpage," ." b.annotated AS annotated" ." FROM (SELECT * FROM $t_layoutpage WHERE student=?) AS a" ." LEFT JOIN" ." (SELECT * FROM $t_page" ." WHERE student=? AND copy=? AND timestamp_annotate>0) AS b" ." ON a.page=b.page ORDER BY a.page" }, 'nameFields'=> {'sql'=>"SELECT a.student AS student,a.page AS page,a.copy AS copy," ." b.image AS image FROM" ." ( SELECT c.student,c.page,c.copy FROM" ." (SELECT * FROM $t_page WHERE timestamp_auto>0 OR timestamp_manual>0 )" ." AS c, $t_lnf AS l" ." ON c.student=l.student AND c.page=l.page ) AS a" ." LEFT OUTER JOIN" ." ( SELECT student,page,copy,image FROM $t_zone WHERE type=? ) AS b" ." ON a.student=b.student AND a.page=b.page AND a.copy=b.copy" }, 'photocopy'=>{'sql'=>"SELECT COUNT(*) FROM $t_page WHERE copy>0"}, 'zonesBBox'=>{'sql'=>"SELECT z.id_a AS question,z.id_b AS answer," ." min(p.x) AS xmin,max(p.x) AS xmax," ." min(p.y) AS ymin,max(p.y) AS ymax" ." FROM $t_zone AS z,$t_position as p" ." ON z.zoneid=p.zoneid" ." WHERE z.student=? AND z.page=? AND z.copy=?" ." AND z.type=? AND p.type=?" ." GROUP BY z.zoneid"}, 'zonesCorners'=>{'sql'=>"SELECT z.id_a AS question,z.id_b AS answer," ." p.x AS x,p.y AS y,p.corner AS corner" ." FROM $t_zone AS z,$t_position as p" ." ON z.zoneid=p.zoneid" ." WHERE z.student=? AND z.page=? AND z.copy=?" ." AND z.type=? AND p.type=?" ." ORDER BY z.zoneid,p.corner"}, }; $self->{'statements'}->{'pageSummary'}= {'sql'=>$self->{'statements'}->{'pagesSummary'}->{'sql'} ." WHERE student=? AND page=? AND copy=?"}; $self->{'statements'}->{'pagesSummary'}->{'sql'}.=" ORDER BY student,page,copy"; } # get_page($student,$page,$copy) returns all columns from the row with # given ($student,$page,$copy) in table capture_page. If such a row # exists, a hashref is returned. If not, undef is returned. sub get_page { my ($self,$student,$page,$copy)=@_; return($self->dbh->selectrow_hashref($self->statement('getPage'),{}, $student,$page,$copy)); } # set_page_auto(...) fills one row of the page table, and returns 1 if # some previous data has been overwritten. sub set_page_auto { my ($self,$src,$student,$page,$copy, $timestamp,$a,$b,$c,$d,$e,$f,$mse)=@_; if($self->get_page($student,$page,$copy)) { $self->statement('SetPageAuto')->execute($src, $timestamp,$a,$b,$c,$d,$e,$f, $mse, $student,$page,$copy); return(1); } else { $self->statement('NEWPageAuto')->execute($src,$student,$page,$copy, $timestamp,$a,$b,$c,$d,$e,$f, $mse); return(0); } } # tag_overwritten(...) tags a page data as overwritten sub tag_overwritten { my ($self,$student,$page,$copy)=@_; $self->statement('overwritePage')->execute($student,$page,$copy); } # sep_page_manual($student,$page,$copy,$timestamp) sets the timestamp # for a manual data capture for a particular page. With no $timestamp # argument, present time is used. sub set_page_manual { my ($self,$student,$page,$copy, $timestamp)=@_; $timestamp=time() if(!defined($timestamp)); if($self->get_page($student,$page,$copy)) { $self->statement('SetPageManual')->execute($timestamp, $student,$page,$copy); } else { $self->statement('NEWPageManual')->execute($student,$page,$copy, $timestamp); } } # get_zoneid($student,$page,$copy,$type,$id_a,$id_b,$create) gets the # zone identifier corresponding to a particular zone. If $create is # true, the identifier is created if not yet present in the database. sub get_zoneid { my ($self,$student,$page,$copy,$type,$id_a,$id_b,$create)=@_; my $r=$self->dbh->selectrow_arrayref($self->statement('getZoneID'),{}, $student,$page,$copy,$type,$id_a,$id_b); if($r) { return($r->[0]); } else { if($create) { $self->statement('NEWZone')->execute($student,$page,$copy,$type,$id_a,$id_b); return($self->dbh->sqlite_last_insert_rowid()); } else { return(undef); } } } # set_zone_manual($student,$page,$copy,$type,$id_a,$id_b,$manual) sets # the manual value (ticked or not) for a particular zone sub set_zone_manual { my ($self,$student,$page,$copy,$type,$id_a,$id_b,$manual)=@_; my $zoneid=$self->get_zoneid($student,$page,$copy,$type,$id_a,$id_b,1); $self->statement('setZoneManual')->execute($manual,$zoneid); } # set_zone_auto(...,$total,$black,$image,$image_data) sets automated # data capture results for a particular zone. sub set_zone_auto { my ($self,$student,$page,$copy,$type,$id_a,$id_b,$total,$black,$image,$image_data)=@_; $self->set_zone_auto_id($self->get_zoneid($student,$page,$copy,$type,$id_a,$id_b,1), $total,$black,$image,$image_data); } sub set_zone_auto_id { my ($self,$zoneid,$total,$black,$image,$image_data)=@_; my $sth=$self->statement('setZoneAuto'); $sth->bind_param(1,$total); $sth->bind_param(2,$black); $sth->bind_param(3,$image); $sth->bind_param(4,$image_data,SQL_BLOB); $sth->bind_param(5,$zoneid); $sth->execute(); } sub set_zone_auto_id_without_imagedata { my ($self,$zoneid,$total,$black,$image)=@_; my $sth=$self->statement('setZoneAutoPrim'); $sth->bind_param(1,$total); $sth->bind_param(2,$black); $sth->bind_param(3,$image); $sth->bind_param(4,$zoneid); $sth->execute(); } # n_pages returns the number of copies for which a data capture (manual # or auto) is declared. sub n_copies { my ($self)=@_; return($self->sql_single($self->statement('nCopies'))); } # n_overwritten returns the total number of overwritten pages sub n_overwritten { my ($self)=@_; return($self->sql_single($self->statement('nOverwritten'))); } # clear_overwritten clears overwritten status of all pages sub clear_overwritten { my ($self)=@_; $self->statement('overwriteClear')->execute(); } # overwritten_pages() returns an arrayref of hashrefs with all pages # which have some overwritten data sub overwritten_pages { my ($self)=@_; return($self->dbh->selectall_arrayref($self->statement('overwrittenPages'), { Slice=>{} })); } sub overwritten_pages_transaction { my ($self)=@_; $self->begin_read_transaction; my $r=$self->overwritten_pages; $self->end_transaction; return($r); } # n_pages returns the number of pages for which a data capture (manual # or auto) is declared. sub n_pages { my ($self)=@_; return($self->sql_single($self->statement('nPages'))); } # n_pages_transaction calls n_pages inside a SQLite transaction. sub n_pages_transaction { my ($self)=@_; $self->begin_read_transaction; my $n=$self->n_pages; $self->end_transaction; return($n); } # students returns the list of students numbers for which a data # capture is declared. sub students { my ($self)=@_; return($self->sql_list($self->statement('students'))); } # student_copies returns a list of [student,copy] for which a data # capture is declared. sub student_copies { my ($self)=@_; return(@{$self->dbh->selectall_arrayref($self->statement('studentCopies'))}); } # students_transaction calls students inside a SQLite transaction. sub students_transaction { my ($self)=@_; $self->begin_read_transaction; my @r=$self->students; $self->end_transaction; return(@r); } # n_pages_auto returns the number of pages for which a automated data # capture occured. sub n_pages_auto { my ($self)=@_; return($self->sql_list($self->statement('nPagesAuto'))); } # page_sensitivity($student,$page,$copy,$darkness_threshold,$darkness_threshold_up) # returns a sensitivity value for the page automated data # capture. When this value is low (near 0), black and white boxes have # darkness values far away from the threshold, and thus one can think # that it is well recognized if the boxes are ticked or not. With high # values of the sensitivity (the maximal value is 10), ticked boxes # are not robustly detected: if one changes a little the darkness # threshold, boxes can pass from the ticked to not-ticked state or # vice versa. sub sensitivity_down { my ($delta,$threshold)=@_; return(defined($delta) && $threshold>0 ? 10*($threshold-$delta)/$threshold : undef); } sub sensitivity_up { my ($delta,$threshold)=@_; return(defined($delta) && $threshold<1 ? sensitivity($delta,1-$threshold) : undef); } sub sensitivity { my ($delta,$threshold,$delta_up,$threshold_up)=@_; my $s=sensitivity_down($delta,$threshold); my $s_up=sensitivity_up($delta_up,$threshold_up); return(defined($s_up) && (!defined($s) || $s_up>$s) ? $s_up : $s); } sub page_sensitivity { my ($self,$student,$page,$copy,$darkness_threshold,$darkness_threshold_up)=@_; die "Missing parameters in pqge_sensitivity call" if(!defined($darkness_threshold_up)); my $delta=$self->sql_single($self->statement('pageNearRatio'), $darkness_threshold, $student,$page,$copy); my $delta_up=$self->sql_single($self->statement('pageNearRatio'), $darkness_threshold_up, $student,$page,$copy); return(sensitivity($delta,$darkness-threshold, $delta_up,$darkness_threshold_up)); } # page_summary($student,$page,$copy,%options) returns a hash %s giving # some summarized information about the page automated data capture # process: # # $s{'mse'} is the mean square error of the transform from question # paper coordinates to scan coordinates # # $s{'mse_color'} is 'red' if the MSE exceeds # $options{'mse_threshold'}, and undef otherwise # # $s{'color'} is blue if some automated data capture occured for this # page, green if some manual data capture occured, and undef # otherwise. # # $s{'update'} is a textual reprsentation of the date when the last # data capture occured. # # $s{'sensitivity'} is the sensitivity (see function page_sensitivity). # # $s{'sensitivity'} is 'red' is the sensitivity exceeds # $options{'sensitivity_threshold'}, undef otherwise. # # $s{'why'} (only available if $options{'why'} is true) collects all # 'why' attributes from all qeustions on the page (from the scoring table) # summaries returns a reference to an array containing the summaries # of all pages. sub compute_summaries { my ($self,$r,%oo)=@_; # compute some more variables from the SQL result for my $p (@$r) { $p->{'mse_string'}=($p->{'timestamp_auto'}>0 ? sprintf($p->{'timestamp_manual'}>0 ? "(%.01f)" : "%.01f", $p->{'mse'}) : "---"); $p->{'sensitivity'}=sensitivity($p->{'delta'},$oo{'darkness_threshold'}, $p->{'delta_up'},$oo{'darkness_threshold_up'}); $p->{'sensitivity_string'}=(defined($p->{'sensitivity'}) ? sprintf("%.1f",$p->{'sensitivity'}) : "---"); $p->{'sensitivity_color'}=(defined($p->{'sensitivity'}) ? ($p->{'sensitivity'} > $oo{'sensitivity_threshold'} ? 'red' : undef) : undef); } if($oo{why}) { $self->require_module("layout"); my %why=(); for my $w ($self->module("scoring")->pages_why()) { $why{pageids_string($w->{student},$w->{page},$w->{copy})}=$w->{why}; } for my $p (@$r) { $p->{why}=$why{pageids_string($p->{student},$p->{page},$p->{copy})}; } } return($r); } sub page_summary { my ($self,$student,$page,$copy,%oo)=@_; my $r=$self->dbh->selectall_arrayref($self->statement('pageSummary'), {Slice=>{}}, $oo{'mse_threshold'},'red',undef, 'lightblue','lightgreen',undef, $oo{'darkness_threshold'},ZONE_BOX, $oo{'darkness_threshold_up'},ZONE_BOX, $student,$page,$copy, ); if($r && $r->[0]) { $r=$self->compute_summaries($r,%oo); return(%{$r->[0]}); } else { return(); } } sub summaries { my ($self,%oo)=@_; my $r=$self->dbh->selectall_arrayref($self->statement('pagesSummary'), {Slice=>{}}, $oo{'mse_threshold'},'red',undef, 'lightblue','lightgreen',undef, $oo{'darkness_threshold'},ZONE_BOX, $oo{'darkness_threshold_up'},ZONE_BOX, ); return($self->compute_summaries($r,%oo)); } # zone_drakness($zoneid) return the darkness (from 0 to 1) for a # particular zone. sub zone_darkness { my ($self,$zoneid)=@_; return($self->sql_single($self->statement('zoneDarkness'), $zoneid)); } # ticked($student,$copy,$question,$answer,$darkness_threshold,$darkness_threshold_up) # returns 1 if the darkness of a particular zone exceeds # $darkness_threshold and is less than $darkness_threshold_up, and 0 # otherwise. If a manual data capture occured for this zone, the # darkness is not considered and the manual result is given instead. sub ticked { my ($self,$student,$copy,$question,$answer, $darkness_threshold,$darkness_threshold_up)=@_; die "Missing parameters in ticked call" if(!defined($darkness_threshold_up)); return($self->sql_single($self->statement('ticked'), $darkness_threshold,$darkness_threshold_up, $student,$copy,ZONE_BOX,$question,$answer)); } # ticked_sums($darkness_threshold,$darkness_threshold_up) returns a # ref to a list of hashrefs like # # [{'question=>1,'answer'=>1,nb=>4}, # {'question=>1,'answer'=>'invalid',nb=>1}, # {'question=>1,'answer'=>'empty',nb=>2}, # ] # # that gives, for each question, the number of times each answer was # ticked, and the number of sheets where this question was not # replied, and where this question got invalid answers. sub ticked_sums { my ($self,$darkness_threshold,$darkness_threshold_up)=@_; die "Missing parameters in ticked_sums call" if(!defined($darkness_threshold_up)); return($self->dbh->selectall_arrayref($self->statement('tickedSums'), { Slice=>{} }, $darkness_threshold,$darkness_threshold_up,ZONE_BOX) ); } # has_answer_zero($student,$copy,$question) returns true if the # requested question has an answer "none of the above are correct". sub has_answer_zero { my ($self,$student,$copy,$question)=@_; return($self->sql_single($self->statement('questionHasZero'), $student,$copy,ZONE_BOX,$question)); } # ticked_list($student,$copy,$question,$darkness_threshold,$darkness_threshold_up) # returns a list with the ticked results for all the answers boxes # from a particular question. Answers are ordered with the answer # number, so that the answer "None of the above" (if present), with # answer number 0, is placed at the beginning. sub ticked_list { my ($self,$student,$copy,$question,$darkness_threshold,$darkness_threshold_up)=@_; die "Missing parameters in ticked_list call" if(!defined($darkness_threshold_up)); return($self->sql_list($self->statement('tickedList'), $darkness_threshold,$darkness_threshold_up, $student,$copy,ZONE_BOX,$question)); } # ticked_chars($student,$copy,$question,$darkness_threshold,$darkness_threshold_up) # returns a list with all the box labels (characters written inside or # beside the box) from the ticked answers related to a particular # question. sub ticked_chars { my ($self,$student,$copy,$question,$darkness_threshold,$darkness_threshold_up)=@_; die "Missing parameters in ticked_chars call" if(!defined($darkness_threshold_up)); $self->{'data'}->require_module('layout'); return($self->sql_list($self->statement('tickedChars'), $student,$copy,$question,ZONE_BOX, $darkness_threshold,$darkness_threshold_up, $student,$question,BOX_ROLE_ANSWER)); } # Same as ticked_chars, but paste the chars if they all exist, and # return undef otherwise sub ticked_chars_pasted { my ($self,@args)=@_; my @c=$self->ticked_chars(@args); if(grep { !defined($_) } @c) { return(undef); } else { return(join("",@c)); } } # ticked_list_0 id the same as ticked_list, but answer 0 # (corresponding to "None of the above") is placed at the end of the # list. sub ticked_list_0 { my ($self,$student,$copy,$question,$darkness_threshold,$darkness_threshold_up)=@_; die "Missing parameters in ticked_list_0 call" if(!defined($darkness_threshold_up)); my @tl=$self->ticked_list($student,$copy,$question,$darkness_threshold,$darkness_threshold_up); if($self->has_answer_zero($student,$copy,$question)) { my $zero=shift @tl; push @tl,$zero; } return(@tl); } # zones_count($student,$page,$copy,$type) returns the number of zones # of type $type from a particular page. sub zones_count { my ($self,$student,$page,$copy,$type)=@_; $type=POSITION_BOX if(!$type); return($self->sql_single($self->statement('zonesCount'), $student,$page,$copy,$type)); } # zone_dist2($zoneid,$x,$y,$type) returns the mean of the square # distance from the point ($x,$y) to the corners of a particular zone. sub zone_dist2 { my ($self,$zoneid,$x,$y,$type)=@_; $type=POSITION_BOX if(!$type); return($self->sql_single($self->statement('zoneDist'), $x,$x,$y,$y,$zoneid,$type)); } # zone_corner($zoneid,$corner,$type) returns the coordinates of a zone # corner as a list (with two values). sub zone_corner { my ($self,$zoneid,$corner,$type)=@_; $type=POSITION_BOX if(!$type); return($self->sql_row($self->statement('zoneCorner'), $zoneid,$type,$corner)); } # set_corner($zoneid,$corner,$type,$x,$y) sets the coordinates of a # corner of a zone (or the corner measuring zone, reduced from the # original zone, depending on the $type parameter). sub set_corner { my ($self,$zoneid,$corner,$type,$x,$y)=@_; $self->statement('NEWPosition') ->execute($zoneid,$corner,$x,$y,$type); } # zone_images($student,$copy,$type) returns a list of the image values # of zones corresponding to $student,$value,$type. sub zone_images { my ($self,$student,$copy,$type)=@_; return($self->sql_list($self->statement('zoneImage'), $student,$copy,$type)); } # set_layout_image($student,$page,$copy,$file) sets the name of the # scan with drawings of the boxes image file. sub set_layout_image { my ($self,$student,$page,$copy,$file)=@_; $self->statement('setLayout') ->execute($file,$student,$page,$copy); } # get_layout_image($student,$page,$copy) gets the name of the # scan with drawings of the boxes image file. sub get_layout_image { my ($self,$student,$page,$copy)=@_; return($self->sql_single($self->statement('getLayout'), $student,$page,$copy)); } # get_zones_images($student,$page,$copy,$type) returns a list of the image # filenames extracted from the scan corresponding to the given page, # with the given zone type. sub get_zones_images { my ($self,$student,$page,$copy,$type)=@_; return($self->sql_list($self->statement('zonesImages'), $student,$page,$copy,$type)); } # set_annotated($student,$page,$copy,$file,$timestamp) sets the name # of the annotated image file, and the time when it wad made. sub set_annotated { my ($self,$student,$page,$copy,$file,$timestamp)=@_; $timestamp=time() if(!$timestamp); $self->statement('setAnnotated') ->execute($file,$timestamp,$student,$page,$copy); } # outdate_annotated_page($student,$page,$copy) sets the corresponding # annotated page as outdated (can be used for example if ticked data # has changed for this page). sub outdate_annotated_page { my ($self,$student,$page,$copy)=@_; $self->statement('setAnnotatedPageOutdated') ->execute($student,$page,$copy); } # outdate_annotated_copy($student,$copy) sets the corresponding # annotated copy as outdated (can be used for example if ticked data # has changed for this page). sub outdate_annotated_copy { my ($self,$student,$copy)=@_; $self->statement('setAnnotatedCopyOutdated') ->execute($student,$copy); } # annotated_all_there($directory) returns TRUE if all pages with a # automatic data capture have a JPEG annotated scan present in # $directory. sub annotated_all_there { my ($self,$directory)=@_; my @f=$self->sql_list($self->statement('getAnnotatedFiles')); my $ok=1; for(@f) { if($_) { $ok=0 if(!-f "$directory/$_"); } else { $ok=0; } } return($ok); } # get_annotated_page($student,$page,$copy) returns the annotated image # filename of a particular page. sub get_annotated_page { my ($self,$student,$page,$copy)=@_; my $f=$self->sql_single($self->statement('getAnnotatedPage'), $student,$page,$copy); return($f); } # annotated_count() returns the number of annotated sheets. sub annotated_count { my ($self)=@_; return($self->sql_single($self->statement('annotatedCount'))); } # get_scan_page($student,$page,$copy) returns the scan image # filename of a particular page. sub get_scan_page { my ($self,$student,$page,$copy)=@_; my $f=$self->sql_single($self->statement('getScanPage'), $student,$page,$copy); return($f); } # max_copy_number returns the maximum copy number for all pages sub max_copy_number { my ($self)=@_; return($self->sql_single($self->statement('maxCopy')) || 0); } # max_answer_number returns the maximum answer number for all questions sub max_answer_number { my ($self)=@_; return($self->sql_single($self->statement('maxAnswer'),ZONE_BOX) || 0); } # new_page_copy($student,$page,$allocate) creates a new (unused) copy # number for a given question page. If $allocate is positive, returns # $allocate if it is unused for this page, or the next unused number. sub new_page_copy { my ($self,$student,$page,$allocate)=@_; if($allocate) { my $a=$allocate; my @used=$self->sql_list($self->statement('pageCopies'), $student,$page,$allocate); while(@used && $a==$used[0]) { $a++; shift @used; } return($a); } else { my $c=$self->sql_single($self->statement('pageLastCopy'), $student,$page); if($c) { return($c+1); } else { return(1); } } } # set_manual(...,$type,$id_a,$id_b,$manual) sets the manual value for # a particular zone. sub set_manual { my ($self,$student,$page,$copy,$type,$id_a,$id_b,$manual)=@_; if(!$self->sql_single($self->statement('zone'), $student,$page,$copy,$type,$id_a,$id_b)) { $self->statement('NEWZone')->execute($student,$page,$copy,$type,$id_a,$id_b); } $self->statement('setManual')->execute($manual,$student,$page,$copy,$type,$id_a,$id_b); } # remove_manual($student,$page,$copy) deletes all manual data capture # information for a particular page. sub remove_manual { my ($self,$student,$page,$copy)=@_; $self->statement('setManualPage')->execute(-1,$student,$page,$copy); $self->statement('setManualPageZones')->execute(-1,$student,$page,$copy); if($self->page_zones_auto_count($student,$page,$copy)==0) { $self->delete_page_data($student,$page,$copy); } } # counts returns a hash %r giving the %r{'complete'} number of # complete sheets captured, and the %r{'incomplete'} number of student # sheets for which one part has been captured (with manual or # automated data capture), and one other part needs capturing. # Moreover, $r{'missing'} is a reference to an array containing # {'student'=>XXX,'page'=>XXX,'copy'=>XXX} for all missing pages. sub counts { my ($self)=@_; my %r=('incomplete'=>0,'complete'=>0); my %dup=(); $self->{'data'}->require_module('layout'); $r{'missing'}=$self->dbh ->selectall_arrayref($self->statement('missingPages'),{Slice=>{}}); for my $p (@{$r{'missing'}}) { my $k=$p->{'student'}."/".$p->{'copy'}; if(!$dup{$k}) { $r{'incomplete'}++; $dup{$k}=1; } } $r{'complete'}=$self->n_copies()-$r{'incomplete'}; return(%r); } # failed($filename,$timestamp) creates or updates a failed row for # file $filename. sub failed { my ($self,$filename,$timestamp)=@_; $timestamp=time if(! $timestamp); $self->statement('Failed')->execute($filename,$timestamp); } # no_capture_pages returns a reference to an array of elements # [student,page,copy] for pages from the question paper that have not # been captured (all with copy=0). sub no_capture_pages { my ($self)=@_; return($self->dbh->selectall_arrayref($self->statement('noCapturePages'))); } # no_capture_pages returns a reference to an array of elements # [student,page,copy] for pages from the question paper that has boxes # from the question but no boxes from the answer sheet (all with # copy=0). The result is empty if not in separate answer sheet mode. sub question_only_pages { my ($self)=@_; return($self->dbh->selectall_arrayref($self->statement('questionOnlyPages'))); } # delete_page_data($student,$page,$copy) deletes all data concerning # the given page (automatic and manual data capture) from the database. sub delete_page_data { my ($self,$student,$page,$copy)=@_; $self->statement('deletePagePositions')->execute($student,$page,$copy); $self->statement('deletePageZones')->execute($student,$page,$copy); $self->statement('deletePage')->execute($student,$page,$copy); } # page_zones_auto_count($student,$page,$copy) returns the number of # zones in page with automatic data capture. sub page_zones_auto_count { my ($self,$student,$page,$copy)=@_; return($self->sql_single($self->statement('pageZonesAutoCount'), $student,$page,$copy,ZONE_BOX)); } # get_student_pages($student,$copy) returns an arrayref giving some # information for all pages from sheet ($student,$copy). For example: # # [{'page'=>1,'annotated'=>'page-37-1.jpg','subjectpage'=>181}, # {'page'=>2,'annotated'=>undef,'subjectpage'=>182}, # ] # # For each page, a hashref contains: # * page for the page number, # * annotated for the filename of the annotated jpg, if present, # * subjectpage for the page number from complete subject PDF file sub get_student_pages { my ($self,$student,$copy)=@_; $self->{'data'}->require_module('layout'); return($self->dbh->selectall_arrayref($self->statement('pagesStudent'), { Slice => {} }, $student,$student,$copy)); } # get_namefields() returns an arrayref giving, for each page with a # namefield for which a capture has been made, the name of the # namefield image if it exists. # # For example: # # [{student=>1,page=>3,copy=>1,image=>'name-1.jpg'}, # {student=>1,page=>3,copy=>2,image=>undef}, # ] sub get_namefields { my ($self)=@_; $self->{'data'}->require_module('layout'); return($self->dbh->selectall_arrayref($self->statement('nameFields'), { Slice => {} },ZONE_NAME)); } # get_zones_bbox($student,$page,$copy,$zone_type) returns an arrayref # giving, for each zone with type $zone_type (defaulting to ZONE_BOX) # on scanned page ($student,$page,$copy), the bounding box on the scan. # # For example: # # [{question=>1,answer=>1, # xmin=>1646.92,xmax=>1684.57,ymin=>1608.12,ymax=>1645.38}, # {question=>1,answer=>2, # xmin=>1591.68,xmax=>1629.33,ymin=>1517.17,ymax=>1554.43}, # ] sub get_zones_bbox { my ($self,$student,$page,$copy,$zone_type)=@_; $zone_type=ZONE_BOX if(!defined($zone_type)); return($self->dbh->selectall_arrayref($self->statement('zonesBBox'), { Slice => {} }, $student,$page,$copy, $zone_type,POSITION_BOX)); } # get_zones_corners($student,$page,$copy,$zone_type) returns an # arrayref giving, for each zone with type $zone_type (defaulting to # ZONE_BOX) on scanned page ($student,$page,$copy), the corners on the # scan. In the resulting array, corners are ordered. # # For example: # # [{zoneid=>156,question=>1,answer=>1,x=>1646.92,y=>1608.12,corner=>1}, # {zoneid=>156,question=>1,answer=>1,x=>1667.12,y=>1610.43,corner=>2}, # ... # ] sub get_zones_corners { my ($self,$student,$page,$copy,$zone_type)=@_; $zone_type=ZONE_BOX if(!defined($zone_type)); return($self->dbh->selectall_arrayref($self->statement('zonesCorners'), { Slice => {} }, $student,$page,$copy, $zone_type,POSITION_BOX)); } # n_photocopy() returns the number of captures made on a photocopy of # the subject, that is made with mode 'Some sheets were photocopied' # (these captures are identified by a positive 'copy' value). sub n_photocopy { my ($self)=@_; return($self->sql_single($self->statement('photocopy'))); } # clear_all() clears all the layout data tables. sub clear_all { my ($self)=@_; for my $t (qw/page zone position failed/) { $self->sql_do("DELETE FROM ".$self->table($t)); } } # get_image_paths($type) returns an arrayref with image paths of all # zones of type $type, like # # [{zoneid=>153,image=>"zone-image-001.png"}, # ... # ] sub get_image_paths { my ($self,$type)=@_; return($self->dbh->selectall_arrayref($self->statement('imagePaths'), { Slice => {} },$type)); } # set_image($zoneid,$imagedata) sets the imagedata (the image content # as a blob) for zone $zoneid. sub set_image { my ($self,$zoneid,$imagedata)=@_; my $sth=$self->statement('setImage'); $sth->bind_param(1,$imagedata,SQL_BLOB); $sth->bind_param(2,$zoneid); $sth->execute(); } # zooms_total_size_transaction() returns the sum of all zooms # images stored in the database, in bytes. sub zooms_total_size_transaction { my ($self)=@_; $self->begin_read_transaction('ztsz'); my $s=$self->sql_single($self->statement('zoomsTotalSize'),ZONE_BOX); $self->end_transaction('ztsz'); return($s); } # zooms_cleanup_transaction() deletes all zooms images from the # database. sub zooms_cleanup_transaction { my ($self)=@_; $self->begin_transaction('zcln'); my $n=$self->statement('zoomsCleanup')->execute(ZONE_BOX); $self->end_transaction('zcln'); $self->vacuum(); return($n); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/DataModule/layout.pm000066400000000000000000001072441341176102400234060ustar00rootroot00000000000000# -*- perl -*- # # Copyright (C) 2011-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::DataModule::layout; # AMC layout data management. # This module is used to store (in a SQLite database) and handle all # pages layouts: locations of all boxes, name field, marks on the # pages. # All coordinates are given in pixels, with (0,0)=TopLeft. # TABLES: # # layout_page lists pages from the subject, with the following data: # # * student is the student number # # * page is the page number from the student copy (beginning from 1 # for each student) # # * checksum is a number that is used to check that the student and # page numbers are properly recognized frm the scan # # * sourceid is an ID to get from table source the source information # # * subjectpage is the page number from the subject.pdf file # containing all subjects # # * dpi is the DPI resolution of the page # # * height,width are the page dimensions in pixels # # * markdiameter is the diameter of the four marks in the corners, in pixels # # layout_mark lists the marks positions on all the pages: # # * student,page identifies the page # # * corner is the corner number, from 1..4 # (TopLeft=1, TopRight=2, BottomRight=3, BottomLeft=4) # # * x,y are the mark center coordinates (in pixels, (0,0)=TopLeft) # # layout_namefield lists the name fields on the pages: # # * student,page identifies the page # # * xmin,xmax,ymin,ymax give the box around the name field # # layout_box lists all the boxes to be ticked (and other # question/answer-related zones in the subject) on all the pages: # # * student,page identifies the page # # * role determines the role of this box (see BOX_ROLE_* constants below) # # * question is the question number. This is NOT the question number # that is printed on the question paper, but an internal question # number associated with question identifier from the LaTeX file # (strings used as the first argument of the \begin{question} or # \begin{questionmult} environment) as in table layout_question (see # next) # # * answer is the answer number for this question # # * xmin,xmax,ymin,ymax give the box coordinates # # * flags is an integer that contains the flags from BOX_FLAGS_* (see # below) # # * char is the character associated with the box (written inside or # beside the box) # # layout_digit lists all the binary boxes to read student/page number # and checksum from the scans (boxes white for digit 0, black for # digit 1): # # * student,page identifies the page # # * numberid is the ID of the number to be read (1=student number, # 2=page number, 3=checksum) # # * digitid is the digit ID (1 is the most significant bit) # # * xmin,xmax,ymin,ymax give the box coordinates # # layout_source describes where are all these information computed # from: # # * sourceid refers to the same field in the layout_page table # # * src describes the file from which layout is read # # * timestamp is the time when the src file were read to populate the # layout_* tables # # layout_question describes the questions: # # * question is the question ID (see explanation in layout_box) # # * name is the question identifier from the LaTeX file # # layout_association contains the pre-association data # # * student is the student sheet number # # * id is the association value (student id from the students list) # for the corresponding student sheet # # layout_char contains the chars written inside the answer boxes in catalog mode # # * question is the question ID (see explanation in layout_box) # # * answer is the answer number # # * char is the character written inside the box use Exporter qw(import); use constant { BOX_FLAGS_DONTSCAN => 0x1, BOX_FLAGS_DONTANNOTATE => 0x2, BOX_FLAGS_SHAPE_OVAL => 0x10, # Do not change these values as they are hard-coded elsewhere BOX_ROLE_ANSWER => 1, # Boxes to be ticked by the student BOX_ROLE_QUESTIONONLY => 2, # In separate answer sheet mode, boxes in the question section BOX_ROLE_SCORE => 100, # Zones to write scores when annotating answer sheets BOX_ROLE_SCOREQUESTION => 101, # The same but for question (in separate answer sheet mode) }; our @EXPORT_OK = qw(BOX_FLAGS_DONTSCAN BOX_FLAGS_DONTANNOTATE BOX_FLAGS_SHAPE_OVAL BOX_ROLE_ANSWER BOX_ROLE_QUESTIONONLY BOX_ROLE_SCORE BOX_ROLE_SCOREQUESTION); our %EXPORT_TAGS = ( 'flags' => [ qw/BOX_FLAGS_DONTSCAN BOX_FLAGS_DONTANNOTATE BOX_FLAGS_SHAPE_OVAL BOX_ROLE_ANSWER BOX_ROLE_QUESTIONONLY BOX_ROLE_SCORE BOX_ROLE_SCOREQUESTION/ ], ); use AMC::Basic; use AMC::DataModule; use XML::Simple; @ISA=("AMC::DataModule"); sub version_current { return(7); } sub drop_box_table { my ($self)=@_; $self->sql_do("DROP INDEX ".$self->index("index_box_studentpage")); $self->sql_do("DROP TABLE ".$self->table("box")); } sub create_box_table { my ($self,$tmp)=@_; $self->sql_do("CREATE ".($tmp ? "TEMPORARY ":"") ."TABLE IF NOT EXISTS ".($tmp ? "box_tmp" :$self->table("box")) ." (student INTEGER, page INTEGER, role INTEGER DEFAULT 1, question INTEGER, answer INTEGER, xmin REAL, xmax REAL, ymin REAL, ymax REAL, flags INTEGER DEFAULT 0, PRIMARY KEY (student,role,question,answer))"); if(!$tmp) { $self->sql_do("CREATE INDEX ".$self->index("index_box_studentpage")." ON " .$self->table("box","self")." (student,page,role)"); } } sub version_upgrade { my ($self,$old_version)=@_; if($old_version==0) { # Upgrading from version 0 (empty database) to version 4 : # creates all the tables. debug "Creating layout tables..."; $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("page") ." (student INTEGER, page INTEGER, checksum INTEGER, sourceid INTEGER, subjectpage INTEGER, dpi REAL, width REAL, height REAL, markdiameter REAL, PRIMARY KEY (student,page))"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("mark") ." (student INTEGER, page INTEGER, corner INTEGER, x REAL, y REAL, PRIMARY KEY (student,page,corner))"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("namefield") ." (student INTEGER, page INTEGER, xmin REAL, xmax REAL, ymin REAL, ymax REAL)"); $self->sql_do("CREATE INDEX ".$self->index("index_namefield")." ON " .$self->table("namefield","self")." (student,page)"); $self->create_box_table; $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("digit") ." (student INTEGER, page INTEGER, numberid INTEGER, digitid INTEGER, xmin REAL, xmax REAL, ymin REAL, ymax REAL, PRIMARY KEY(student,page,numberid,digitid))"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("source") ." (sourceid INTEGER PRIMARY KEY, src TEXT, timestamp INTEGER)"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("question") ." (question INTEGER PRIMARY KEY, name TEXT)"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("association") ." (student INTEGER PRIMARY KEY, id TEXT)"); $self->populate_from_xml; return(5); } if($old_version==1) { $self->sql_do("ALTER TABLE ".$self->table("box") ." ADD COLUMN flags DEFAULT 0"); return(2); } if($old_version==2) { $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("association") ." (student INTEGER, id TEXT)"); return(3); } if($old_version==3) { $self->progression('begin',__("Building layout database indexes...")); # replaces missing PRIMARY KEYS with INDEXs $self->sql_do("CREATE UNIQUE INDEX IF NOT EXISTS " .$self->index("index_box")." ON " .$self->table("box","self")." (student,question,answer)"); $self->progression('fraction',1/6); $self->sql_do("CREATE INDEX IF NOT EXISTS " .$self->index("index_box_studentpage")." ON " .$self->table("box","self")." (student,page)"); $self->progression('fraction',1/6); $self->sql_do("CREATE INDEX IF NOT EXISTS " .$self->index("index_namefield")." ON " .$self->table("namefield","self")." (student,page)"); $self->progression('fraction',1/6); $self->sql_do("CREATE UNIQUE INDEX IF NOT EXISTS " .$self->index("index_digit")." ON " .$self->table("digit","self")." (student,page,numberid,digitid)"); $self->progression('fraction',1/6); $self->sql_do("CREATE UNIQUE INDEX IF NOT EXISTS " .$self->index("index_mark")." ON " .$self->table("mark","self")." (student,page,corner)"); $self->progression('fraction',1/6); $self->sql_do("CREATE INDEX IF NOT EXISTS " .$self->index("index_association")." ON " .$self->table("association","self")." (student)"); $self->progression('end'); return(4); } if($old_version==4) { # To change the box table columns, primary key and index, use a # temporary table to transfer all rows $self->create_box_table(1); $self->sql_do("INSERT INTO box_tmp (student,page,question,answer,xmin,xmax,ymin,ymax,flags)" ." SELECT student,page,question,answer,xmin,xmax,ymin,ymax,flags FROM " .$self->table("box")); $self->drop_box_table; $self->create_box_table; $self->sql_do("INSERT INTO ".$self->table("box") ." SELECT * FROM box_tmp"); $self->sql_do("DROP TABLE box_tmp"); return(5); } if($old_version==5) { $self->sql_do("ALTER TABLE ".$self->table("box") ." ADD COLUMN char TEXT"); return(6); } if($old_version==6) { $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("char") ." (question INTEGER, answer INTEGER, char TEXT)"); $self->sql_do("CREATE UNIQUE INDEX IF NOT EXISTS " .$self->index("index_char")." ON " .$self->table("char","self")." (question,answer)"); return(7); } return(''); } # populate_from_xml read the old format XML files (if any) and inserts # them in the new SQLite database sub populate_from_xml { my ($self)=@_; my $mep=$self->{'data'}->directory; $mep =~ s/\/[^\/]+\/?$/\/mep/; if(-d $mep) { $self->progression('begin',__"Fetching layout data from old format XML files..."); opendir(DIR, $mep) || die "can't opendir $mep: $!"; @xmls = grep { /\.xml$/ && -s "$mep/".$_ } readdir(DIR); closedir DIR; my $frac=0; for my $f (@xmls) { my $lay=XMLin("$mep/".$f, ForceArray => 1,KeepRoot => 1, KeyAttr=> [ 'id' ]); if($lay->{'mep'}) { my @st=stat("$mep/".$f); debug "Populating data from $f..."; for my $laymep (keys %{$lay->{'mep'}}) { my $l=$lay->{'mep'}->{$laymep}; my @epc; if($laymep =~ /^\+([0-9]+)\/([0-9]+)\/([0-9]+)\+$/) { @epc=($1,$2,$3); $self->statement('NEWLayout')->execute( @epc, (map { $l->{$_} } (qw/page dpi tx ty diametremarque/)), $self->source_id($l->{'src'},$st[9])); } my @lid=($epc[0],$epc[1]); for my $n (@{$l->{'nom'}}) { $self->statement('NEWNameField')->execute( @lid,map { $n->{$_} } (qw/xmin xmax ymin ymax/) ); } for my $c (@{$l->{'case'}}) { $self->statement('NEWBox0')->execute( @lid,BOX_ROLE_ANSWER,(map { $c->{$_} } (qw/question reponse xmin xmax ymin ymax/)),0 ); } for my $d (@{$l->{'chiffre'}}) { $self->statement('NEWDigit')->execute( @lid,map { $d->{$_} } (qw/n i xmin xmax ymin ymax/) ); } my $marks=$l->{'coin'}; for my $i (keys %$marks) { $self->statement('NEWMark')->execute( @lid,$i,map { $marks->{$i}->{$_}->[0] } (qw/x y/) ); } } } $frac++; $self->progression('fraction',$frac/($#xmls+1)); } $self->progression('end'); } my $scoring_file=$self->{'data'}->directory; $scoring_file =~ s:/[^/]+/?$:/bareme.xml:; if(-f $scoring_file) { my $xml=XMLin($scoring_file,ForceArray => 1,KeyAttr=> [ 'id' ]); my @s=grep { /^[0-9]+$/ } (keys %{$xml->{'etudiant'}}); for my $i (@s) { my $student=$xml->{'etudiant'}->{$i}; for my $question (keys %{$student->{'question'}}) { my $q=$student->{'question'}->{$question}; $self->question_name($question,$q->{'titre'}); } } } } # defines all the SQL statements that will be used sub define_statements { my ($self)=@_; $self->{'statements'}= { 'CLEARPAGE'=>{'sql'=>"DELETE FROM ? WHERE student=? AND page=?"}, 'COUNT'=>{'sql'=>"SELECT COUNT(*) FROM ".$self->table("page")}, 'StudentsCount'=>{'sql'=>"SELECT COUNT(*) FROM" ." ( SELECT student FROM ".$self->table("page") ." GROUP BY student )"}, 'NEWLayout'=> {'sql'=>"INSERT INTO ".$self->table("page") ." (student,page,checksum,subjectpage,dpi,width,height,markdiameter,sourceid)" ." VALUES (?,?,?,?,?,?,?,?,?)" }, 'NEWMark'=>{'sql'=>"INSERT INTO ".$self->table("mark") ." (student,page,corner,x,y) VALUES (?,?,?,?,?)"}, 'NEWBox0'=>{'sql'=>"INSERT INTO ".$self->table("box") ." (student,page,role,question,answer,xmin,xmax,ymin,ymax,flags)" ." VALUES (?,?,?,?,?,?,?,?,?,?)"}, 'NEWBox'=>{'sql'=>"INSERT INTO ".$self->table("box") ." (student,page,role,question,answer,xmin,xmax,ymin,ymax,flags,char)" ." VALUES (?,?,?,?,?,?,?,?,?,?,?)"}, 'NEWDigit'=>{'sql'=>"INSERT INTO ".$self->table("digit") ." (student,page,numberid,digitid,xmin,xmax,ymin,ymax)" ." VALUES (?,?,?,?,?,?,?,?)"}, 'NEWNameField'=>{'sql'=>"INSERT INTO ".$self->table("namefield") ." (student,page,xmin,xmax,ymin,ymax) VALUES (?,?,?,?,?,?)"}, 'NEWQuestion'=>{'sql'=>"INSERT INTO ".$self->table("question") ." (question,name) VALUES (?,?)"}, 'NEWAssociation'=>{'sql'=>"INSERT INTO ".$self->table("association") ." (student,id) VALUES (?,?)"}, 'IDS'=>{'sql'=>"SELECT student || ',' || page FROM ".$self->table("page") ." ORDER BY student,page"}, 'FULLIDS'=>{'sql'=>"SELECT '+' || student || '/' || page || '/' || checksum || '+' FROM " .$self->table("page") ." ORDER BY student,page"}, 'PAGES_STUDENT_all'=>{'sql'=>"SELECT page FROM ".$self->table("page") ." WHERE student=? ORDER BY page"}, 'STUDENTS'=>{'sql'=>"SELECT student FROM ".$self->table("page") ." GROUP BY student ORDER BY student"}, 'pageQuestionBoxes'=> {'sql'=>"SELECT question AS id_a,answer AS id_b,role" ." FROM ".$self->table("box") ." WHERE role=2 AND student=? AND page=?"}, 'Q_Flag'=>{'sql'=>"UPDATE ".$self->table("box") ." SET flags=flags|? WHERE student=? AND question=? AND role=?"}, 'A_Flags'=>{'sql'=>"SELECT flags FROM ".$self->table("box") ." WHERE student=? AND question=? AND answer=? AND role=?"}, 'A_All'=>{'sql'=>"SELECT * FROM ".$self->table("box") ." WHERE student=? AND question=? AND answer=? AND role=?"}, 'PAGES_STUDENT_box'=>{'sql'=>"SELECT page FROM ".$self->table("box") ." WHERE student=? AND role=? GROUP BY student,page"}, 'PAGES_Q_box'=>{'sql'=>"SELECT student,page,min(ymin) as miny,max(ymax) as maxy FROM ".$self->table("box") ." WHERE role=? AND question=? GROUP BY student,page"}, 'PAGES_STUDENT_namefield'=>{'sql'=>"SELECT page FROM ".$self->table("namefield") ." WHERE student=? GROUP BY student,page"}, 'PAGES_STUDENT_enter'=> {'sql'=>"SELECT page FROM (" ."SELECT student,page FROM ".$self->table("box")." WHERE role=1 UNION " ."SELECT student,page FROM ".$self->table("namefield") .") AS enter WHERE student=? GROUP BY student,page"}, 'PAGES_enter'=> {'sql'=>"SELECT student,page FROM (" ."SELECT student,page FROM ".$self->table("box")." WHERE role=1 UNION " ."SELECT student,page FROM ".$self->table("namefield") .") AS enter GROUP BY student,page ORDER BY student,page"}, 'MAX_enter'=> {'sql'=>"SELECT MAX(n) FROM" ." ( SELECT COUNT(*) AS n FROM" ." ( SELECT student,page FROM ".$self->table("box")." WHERE role=1" ." UNION SELECT student,page FROM ".$self->table("namefield") ." ) GROUP BY student )"}, 'DEFECT_NO_BOX'=> {'sql'=>"SELECT student FROM (SELECT student FROM ".$self->table("page") ." GROUP BY student) AS list" ." WHERE student>0 AND" ." NOT EXISTS(SELECT * FROM ".$self->table("box")." AS local WHERE role=1 AND" ." local.student=list.student)"}, 'DEFECT_NO_NAME'=> {'sql'=>"SELECT student FROM (SELECT student FROM ".$self->table("page") ." GROUP BY student) AS list" ." WHERE student>0 AND" ." NOT EXISTS(SELECT * FROM ".$self->table("namefield")." AS local" ." WHERE local.student=list.student)"}, 'DEFECT_SEVERAL_NAMES'=> {'sql'=>"SELECT student FROM (SELECT student,COUNT(*) AS n FROM " .$self->table("namefield")." GROUP BY student) AS counts WHERE n>1"}, 'pageFilename'=>{'sql'=>"SELECT student || '-' || page || '-' || checksum FROM " .$self->table("page")." WHERE student=? AND page=?"}, 'pageSubjectPage'=>{'sql'=>"SELECT subjectpage FROM ".$self->table("page") ." WHERE student=? AND page=?"}, 'students'=>{'sql'=>"SELECT student FROM ".$self->table("page") ." GROUP BY student"}, 'DEFECT_OUT_OF_PAGE'=> {'sql'=>"SELECT student,page,count() as n FROM " ." (SELECT b.student,b.page,xmin,xmax,ymin,ymax,width,height FROM " .$self->table("box")." as b, " .$self->table("page")." as p " ." ON b.student==p.student AND b.page==p.page)" ." WHERE (xmin<0 OR ymin<0 OR xmax>width OR ymax>height)" ." GROUP BY student,page ORDER BY student,page"}, 'subjectpageForStudent'=> {'sql'=>"SELECT MIN(subjectpage),MAX(subjectpage) FROM ".$self->table("page") ." WHERE student=?"}, 'subjectpageForStudentA'=> {'sql'=>"SELECT MIN(p.subjectpage),MAX(p.subjectpage) FROM " .$self->table("page")." AS p" ." ,( SELECT student,page FROM ".$self->table("box")." WHERE role=1" ." UNION" ." SELECT student,page FROM ".$self->table("namefield")." ) AS a" ." ON p.student=a.student AND p.page=a.page" ." WHERE p.student=?"}, 'studentPage'=>{'sql'=>"SELECT student,page FROM ".$self->table("page") ." WHERE markdiameter>0" ." LIMIT 1"}, 'boxChar'=>{'sql'=>"SELECT char FROM ".$self->table("box") ." WHERE student=? AND question=? AND answer=? AND role=?"}, 'boxPage'=>{'sql'=>"SELECT page FROM ".$self->table("box") ." WHERE student=? AND question=? AND answer=? AND role=?"}, 'namefieldPage'=>{'sql'=>"SELECT page FROM ".$self->table("namefield") ." WHERE student=?"}, 'dims'=>{'sql'=>"SELECT width,height,markdiameter,dpi FROM " .$self->table("page") ." WHERE student=? AND page=?"}, 'mark'=>{'sql'=>"SELECT x,y FROM ".$self->table("mark") ." WHERE student=? AND page=? AND corner=?"}, 'pageInfo'=>{'sql'=>"SELECT * FROM ".$self->table("page") ." WHERE student=? AND page=?"}, 'studentPageInfo'=>{'sql'=>"SELECT * FROM ".$self->table("page") ." WHERE student=? ORDER BY page"}, 'digitInfo'=>{'sql'=>"SELECT * FROM ".$self->table("digit") ." WHERE student=? AND page=?"}, 'boxInfo'=>{'sql'=>"SELECT * FROM ".$self->table("box") ." WHERE student=? AND page=? AND role>=? AND role<=?"}, 'namefieldInfo'=>{'sql'=>"SELECT * FROM ".$self->table("namefield") ." WHERE student=? AND page=?"}, 'scoreZones'=>{'sql'=>"SELECT * FROM ".$self->table("box") ." WHERE student=? AND page=? AND question=?" ." AND role>=? AND role<=?"}, 'exists'=>{'sql'=>"SELECT COUNT(*) FROM ".$self->table("page") ." WHERE student=? AND page=? AND checksum=?"}, 'questionName'=>{'sql'=>"SELECT name FROM ".$self->table("question") ." WHERE question=?"}, 'sourceID'=>{'sql'=>"SELECT sourceid FROM ".$self->table("source") ." WHERE src=? AND timestamp=?"}, 'NEWsource'=>{'sql'=>"INSERT INTO ".$self->table("source") ." (src,timestamp) VALUES(?,?)"}, 'checkPosDigits'=> {'sql'=>"SELECT a.student AS student_a,b.student AS student_b," ." a.page AS page_a, b.page AS page_b,* FROM" ." (SELECT * FROM" ." (SELECT * FROM ".$self->table("digit") ." ORDER BY student DESC,page DESC)" ." GROUP BY numberid,digitid) AS a," ." ".$self->table("digit")." AS b" ." ON a.digitid=b.digitid AND a.numberid=b.numberid" ." AND (abs(a.xmin-b.xmin)>(?+0) OR abs(a.xmax-b.xmax)>(?+0)" ." OR abs(a.ymin-b.ymin)>(?+0) OR abs(a.ymax-b.ymax)>(?+0))" ." LIMIT 1"}, 'checkPosMarks'=> {'sql'=>"SELECT a.student AS student_a,b.student AS student_b," ." a.page AS page_a, b.page AS page_b,* FROM" ." (SELECT * FROM" ." (SELECT * FROM ".$self->table("mark") ." ORDER BY student DESC,page DESC)" ." GROUP BY corner) AS a," ." ".$self->table("mark")." AS b" ." ON a.corner=b.corner" ." AND (abs(a.x-b.x)>(?+0) OR abs(a.y-b.y)>(?+0))" ." LIMIT 1"}, 'AssocNumber'=>{'sql'=>"SELECT COUNT(*) FROM ".$self->table("association")}, 'orientation'=>{'sql'=>"SELECT MIN(ratio) AS minratio," ." MAX(ratio) AS maxratio FROM " ." (SELECT CASE WHEN ABS(width)<1 THEN 1" ." ELSE height/width END" ." AS ratio" ." FROM ".$self->table("page") ." )"}, 'MapQuestionPage'=> {'sql'=>"SELECT student, page, question " ." FROM ".$self->table("box")." WHERE answer=1" }, 'QuestionsList'=>{sql=>"SELECT * FROM ".$self->table("question")}, 'CharClear'=>{sql=>"DELETE FROM ".$self->table("char")}, 'CharSet'=> {sql=>"INSERT OR IGNORE INTO ".$self->table("char") ." (question,answer,char) VALUES (?,?,?)"}, 'CharGet'=> {sql=>"SELECT char FROM ".$self->table("char") ." WHERE question=? AND answer=?"}, 'CharNb'=>{sql=>"SELECT COUNT(*) FROM ".$self->table("char")}, }; } # clear_page_layout($student,$page) clears all the layout data for a # given page sub clear_page_layout { my ($self,$student,$page)=@_; for my $t (qw/page box namefield digit/) { $self->statement('CLEARPAGE')->execute($self->table($t),$student,$page); } } # random_studentPage returns an existing student,page couple sub random_studentPage { my ($self)=@_; return($self->dbh->selectrow_array($self->statement('studentPage'))); } # exists returns the number of pages with coresponding student, page # and checksum. The result should be 0 (no such page in the subject) # or 1. sub exists { my ($self,$student,$page,$checksum)=@_; return($self->sql_single($self->statement('exists'), $student,$page,$checksum)); } # dims($student,$page) returns a (width,height,markdiameter) array for the given # (student,page) page. sub dims { my ($self,$student,$page)=@_; return($self->dbh->selectrow_array($self->statement('dims'),{}, $student,$page)); } # all_marks returns x,y coordinates for the four corner marks on the # requested page: (x1,y1,x2,y2,x3,y3,x4,y4) sub all_marks { my ($self,$student,$page)=@_; my @r=(); for my $corner (1..4) { push @r,$self->dbh->selectrow_array($self->statement('mark'),{}, $student,$page,$corner); } return(@r); } # page_count returns the number of pages sub pages_count { my ($self)=@_; return($self->sql_single($self->statement('COUNT'))); } # page_count returns the number of different students sub students_count { my ($self)=@_; return($self->sql_single($self->statement('StudentsCount'))); } # ids returns student,page string for all pages sub ids { my ($self)=@_; return($self->sql_list($self->statement('IDS'))); } # full_ids returns +student/page/checksum+ string for all pages sub full_ids { my ($self)=@_; return($self->sql_list($self->statement('FULLIDS'))); } #Return list of student, page, question sub student_question_page{ my ($self)=@_; my @list = @{$self->dbh ->selectall_arrayref($self->statement('MapQuestionPage'))}; return(@list); } # page_info returns a HASH reference containing all fields in the # layout_page row corresponding to the student,page page. sub page_info { my ($self,$student,$page)=@_; return($self->dbh->selectrow_hashref( $self->statement('pageInfo'),{},$student,$page)); } # type_info($type,$student,$page,$role) returns an array of HASH # references containing all fiels in the $type table ($type may equal # digit, box or namefield) corresponding to the $student,$page # page. The $role argument (which defaults to BOX_ROLE_ANSWER) is only # needed when $type is 'box' (or you can use $type='questionbox' with # no $role). sub type_info { my ($self,$type,$student,$page,$role,$rolemax)=@_; my @args=($student,$page); if($type eq 'questionbox') { $type='box'; $role=BOX_ROLE_QUESTIONONLY; } if($type eq 'scorezone') { $type='box'; $role=BOX_ROLE_SCORE; $rolemax=BOX_ROLE_SCOREQUESTION; } if($type eq 'box') { $role=BOX_ROLE_ANSWER if(!$role); $rolemax=$role if(!$rolemax); push @args,$role,$rolemax; } return(@{$self->dbh ->selectall_arrayref($self->statement($type.'Info'), {Slice=>{}}, @args)}); } # score_zones($student,$page,$question) returns an array of HASH # references containing all the rows in the box table corresponding to # the given parameters. sub score_zones { my ($self,$student,$page,$question)=@_; return(@{$self->dbh ->selectall_arrayref($self->statement('scoreZones'), {Slice=>{}}, $student,$page,$question, BOX_ROLE_SCORE,BOX_ROLE_SCOREQUESTION)}); } # pages_for_student($student,[%options]) returns a list of the page # numbers on the subject (starting from 1 for each student) for this # student. With 'select'=>'box' as an option, restricts to the pages # where at least one box to be filled is present. With # 'select'=>'namefield', restricts to the pages where the name field # is. With 'select'=>'enter', restricts to the pages where the # students has to write something (where there are boxes or name # field). sub pages_for_student { my ($self,$student,%oo)=@_; $oo{'select'}='all' if(!$oo{'select'}); @args=($student); if($oo{select} eq 'box') { $oo{role}=BOX_ROLE_ANSWER if(!$oo{role}); push @args,$oo{role}; } return($self->sql_list($self->statement('PAGES_STUDENT_'.$oo{'select'}), @args)); } # pages_for_question($question_id) returns all the pages (in the form # {student=>xx,page=>xx}) where one can find boxes to be checked for # this particular question. sub pages_for_question { my ($self,$question_id)=@_; return(@{$self->dbh->selectall_arrayref($self->statement('PAGES_Q_box'), {Slice=>{}}, BOX_ROLE_ANSWER,$question_id)}); } # pages_info_for_student($student,[%options]) returns a list of # hashrefs with all data from the table page for each page concerning # student $student. With option enter_tag=>1, adds enter=>1 for each # page where something has to be entered by the student (boxes or # namefield). sub pages_info_for_student { my ($self,$student,%oo)=@_; my $r=$self->dbh ->selectall_arrayref($self->statement('studentPageInfo'), {Slice=>{}}, $student); if($oo{enter_tag}) { my %enter_pages=map { $_=>1 } ($self->pages_for_student($student,select=>'enter',role=>$oo{role})); for my $p (@$r) { $p->{enter}=1 if($enter_pages{$p->{page}}); } } return(@$r); } # students returns the list of the students numbers. sub students { my ($self)=@_; return($self->sql_list($self->statement('STUDENTS'))); } # defects($delta) returns a hash of the defects found in the subject: # # * {'NO_BOX} is a pointer on an array containing all the student # numbers for which there is no box to be filled in the subject # # * {'NO_NAME'} is a pointer on an array containing all the student # numbers for which there is no name field # # * {'SEVERAL_NAMES'} is a pointer on an array containing all the student # numbers for which there is more than one name field # # * {'OUT_OF_PAGE'} is a pointer on a array containing all pages where # some box is outside the page. # # * {'DIFFERENT_POSITIONS'} is a pointer to a hash returned by # check_positions($delta) sub defects { my ($self,$delta)=@_; $delta=0.1 if(!defined($delta)); my %r=(); for my $type (qw/NO_BOX NO_NAME SEVERAL_NAMES/) { my @s=$self->sql_list($self->statement('DEFECT_'.$type)); $r{$type}=[@s] if(@s); } for my $type (qw/OUT_OF_PAGE/) { my @s=@{$self->dbh->selectall_arrayref($self->statement('DEFECT_'.$type), {Slice=>{}})}; $r{$type}=[@s] if(@s); } my $pos=$self->check_positions($delta); $r{'DIFFERENT_POSITIONS'}=$pos if($pos); return(%r); } # source_id($src,$timestamp) looks in the table source if a row with # values ($src,$timestamp) already exists. If it does, source_id # returns the sourceid value for this row. If not, it creates a row # with these values and returns the primary key sourceid for this new # row. sub source_id { my ($self,$src,$timestamp)=@_; my $sid=$self->sql_single($self->statement('sourceID'),$src,$timestamp); if($sid) { return($sid); } else { $self->statement('NEWsource')->execute($src,$timestamp); return($self->dbh->sqlite_last_insert_rowid()); } } # question_name($question) returns the question name for question # number $question # # question_name($question,$name) sets the question name (identifier # string from LaTeX file) for question number $question. sub question_name { my ($self,$question,$name)=@_; if(defined($name)) { my $n=$self->question_name($question); if($n) { if($n ne $name) { debug "ERROR: question ID=$question with different names ($n/$name)"; } } else { $self->statement('NEWQuestion')->execute($question,$name); } } else { return($self->sql_single($self->statement('questionName'), $question)); } } # clear_all clears all the layout data tables. sub clear_mep { my ($self)=@_; for my $t (qw/page mark namefield box digit source question association/) { $self->sql_do("DELETE FROM ".$self->table($t)); } } sub clear_all { my ($self)=@_; $self->clear_mep; $self->clear_char; } # get_pages returns a reference to an array like # [[student_1,page_1],[student_2,page_2]] listing the pages where # something has to be entered by the students (either answers boxes or # name field). sub get_pages { my ($self,$add_copy)=@_; my $r=$self->dbh ->selectall_arrayref($self->statement('PAGES_enter')); if(defined($add_copy)) { for(@$r) { push @{$_},0 } } return $r; } # check_positions($delta) checks if all pages has the same positions # for marks and binary digits boxes. If this is the case (this SHOULD # allways be the case), check_positions returns undef. If not, # check_positions returns a hashref # {student_a=>S1,page_a=>P1,student_b=>S2,page_b=>P2} showing an # example for which (S1,P1) has not the same positions as (S2,P2) # (with difference over $delta for at least one coordinate). sub check_positions { my ($self,$delta)=@_; my $r=$self->dbh->selectrow_hashref($self->statement('checkPosDigits'),{}, $delta,$delta,$delta,$delta); return($r) if($r); $r=$self->dbh->selectrow_hashref($self->statement('checkPosMarks'),{}, $delta,$delta); return($r); } # max_enter() returns the maximum of enter pages (pages where the # students are to write something: either boxes to tick either name # field) per student. sub max_enter { my ($self)=@_; return($self->sql_single($self->statement("MAX_enter"))); } # add_question_flag($student,$question,$flag) adds the flag to all # answers boxes for a particular student and question. sub add_question_flag { my ($self,$student,$question,$role,$flag)=@_; $self->statement('Q_Flag')->execute($flag,$student,$question,$role); } # get_box_flags($student,$question,$answer) returns the flags for the # corresponding box. sub get_box_flags { my ($self,$student,$question,$answer,$role)=@_; return($self->sql_single($self->statement('A_Flags'), $student,$question,$answer,$role)); } # get_box_info($student,$question,$answer) returns all data from table # box for the corresponding box. sub get_box_info { my ($self,$student,$question,$answer,$role)=@_; return($self->dbh->selectrow_hashref($self->statement('A_All'),{}, $student,$question,$answer,$role)); } # new_association($student,$id) adds an association to the # pre-association data (associations made before the exam) sub new_association { my ($self,$student,$id)=@_; $self->statement('NEWAssociation')->execute($student,$id); } # pre_association() returns the number of pre-asociations sub pre_association { my ($self)=@_; return($self->sql_single($self->statement("AssocNumber"))); } # orientation() returns "portrait" or "landscape" if all pages have # the same orientation, and "" otherwise. In array context, # orientation() returns the min and max height/width ratio for all # pages. sub orientation { my ($self)=@_; my @ors=$self->sql_row($self->statement("orientation")); if(wantarray) { return(@ors); } else { if($ors[0] > 1.1) { return("portrait"); } elsif($ors[1] < 0.9) { return("landscape"); } else { return(""); } } } # code_digit_pattern() return the regular expression that can be used to # detect a code digit. sub code_digit_pattern { my ($self)=@_; my $type=$self->variable("build:codedigit"); if($type && $type eq 'squarebrackets') { # 'codename[N]' return("\\[(\\d+)\\]"); } else { # with older AMC version, look for 'codename.N' instead of # 'codename[N]' return("\\.(\\d+)"); } } # Get the page where we can find the box for a particular student, # question, box sub box_page { my ($self,$student,$question,$answer,$role)=@_; $role=BOX_ROLE_ANSWER if(!$role); return($self->sql_single($self->statement('boxPage'), $student,$question,$answer,$role)); } # Get the chararacter written inside or beside a box sub box_char { my ($self,$student,$question,$answer,$role)=@_; $role=BOX_ROLE_ANSWER if(!$role); return($self->sql_single($self->statement('boxChar'), $student,$question,$answer,$role)); } # Get the page where we can find the namefield for a particular student sub namefield_page { my ($self,$student)=@_; return($self->sql_single($self->statement('namefieldPage'), $student)); } # Get the list of all questions sub questions_list { my ($self)=@_; return @{$self->dbh->selectall_arrayref($self->statement('QuestionsList'), {Slice=>{}})}; } # clear_char() clears the char table sub clear_char { my ($self)=@_; $self->statement("CharClear")->execute(); } # char($question, $answer [,$char] ) gets or sets the character # associated with a particular answer. sub char { my ($self,$question,$answer,$char)=@_; if(defined($char)) { $self->statement("CharSet")->execute($question,$answer,$char); } else { return($self->sql_single($self->statement('CharGet'), $question,$answer)); } } # nb_chars_transaction() returns the number of characters stored in # the layout_char table. This is often used to know if the table is # empty or not. sub nb_chars_transaction { my ($self)=@_; $self->begin_read_transaction('nbCh'); my $n=$self->sql_single($self->statement('CharNb')); $self->end_transaction('nbCh'); return($n); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/DataModule/report.pm000066400000000000000000000214411341176102400233760ustar00rootroot00000000000000# -*- perl -*- # # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::DataModule::report; # AMC reports data management. # This module is used to store (in a SQLite database) and handle some # data concerning reports. # TABLES: # # student stores some student reports filenames. # # * type is the kind of report (see REPORT_* constants). # # * file is the filename of the report. # # * student # * copy identify the student sheet. # # * timestamp is the time when the report were generated. # # * mail_status, mail_timestamp, mail_message reports mailing feadback use Exporter qw(import); use constant { REPORT_ANNOTATED_PDF=>1, REPORT_SINGLE_ANNOTATED_PDF=>2, REPORT_MAIL_NO=>0, REPORT_MAIL_OK=>1, REPORT_MAIL_FAILED=>100, }; our @EXPORT_OK = qw(REPORT_ANNOTATED_PDF REPORT_SINGLE_ANNOTATED_PDF REPORT_MAIL_OK REPORT_MAIL_FAILED); our %EXPORT_TAGS = ( 'const' => [ qw/REPORT_ANNOTATED_PDF REPORT_SINGLE_ANNOTATED_PDF REPORT_MAIL_OK REPORT_MAIL_FAILED/ ], ); use AMC::Basic; use AMC::DataModule; @ISA=("AMC::DataModule"); sub version_current { return(2); } sub version_upgrade { my ($self,$old_version)=@_; if($old_version==0) { # Upgrading from version 0 (empty database) to version 1 : # creates all the tables. debug "Creating capture tables..."; $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("student") ." (type INTEGER, file TEXT, student INTEGER, copy INTEGER DEFAULT 0, timestamp INTEGER, PRIMARY KEY (type,student,copy))"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("directory") ." (type INTEGER PRIMARY KEY, directory TEXT)"); for(REPORT_ANNOTATED_PDF,REPORT_SINGLE_ANNOTATED_PDF) { $self->statement('addDirectory')->execute($_,'cr/corrections/pdf'); } return(1); } elsif($old_version==1) { # version 2 includes mail_* columns debug "Adding mailing data..."; $self->sql_do("ALTER TABLE ".$self->table("student") ." ADD COLUMN mail_status INTEGER DEFAULT 0"); $self->sql_do("ALTER TABLE ".$self->table("student") ." ADD COLUMN mail_timestamp INTEGER DEFAULT 0"); $self->sql_do("ALTER TABLE ".$self->table("student") ." ADD COLUMN mail_message TEXT"); return(2); } return(''); } # defines all the SQL statements that will be used sub define_statements { my ($self)=@_; my $t_student=$self->table("student"); my $t_directory=$self->table("directory"); my $t_assoc=$self->table("association","association"); $self->{'statements'}= { 'addDirectory'=>{'sql'=>"INSERT INTO $t_directory" ." (type,directory)" ." VALUES(?,?)"}, 'getDir'=>{'sql'=>"SELECT directory FROM $t_directory" ." WHERE type=?"}, 'numType'=>{'sql'=>"SELECT COUNT(*) FROM $t_student" ." WHERE type=?"}, 'allType'=>{'sql'=>"SELECT file FROM $t_student" ." WHERE type=?"}, 'filesWithType'=> {'sql'=>"SELECT file FROM $t_student" ." WHERE type IN" ." ( SELECT a.type FROM $t_directory AS a,$t_directory AS b" ." ON a.directory=b.directory AND b.type=? )"}, 'setStudent'=>{'sql'=>"INSERT OR REPLACE INTO $t_student" ." (file,timestamp,type,student,copy," ." mail_status,mail_message,mail_timestamp)" ." VALUES (?,?,?,?,?,?,?,?)"}, 'setMailing'=>{'sql'=>"UPDATE $t_student SET " ." mail_status=?, mail_message=?, mail_timestamp=?" ." WHERE type=? AND student=? AND copy=?"}, 'getStudent'=>{'sql'=>"SELECT file FROM $t_student" ." WHERE type=? AND student=? AND copy=?"}, 'getStudentTime'=>{'sql'=>"SELECT file,timestamp FROM $t_student" ." WHERE type=? AND student=? AND copy=?"}, 'deleteType'=>{'sql'=>"DELETE FROM $t_student" ." WHERE type=?"}, 'deleteReport'=>{'sql'=>"DELETE FROM $t_student" ." WHERE type=? AND student=? AND copy=?"}, 'getAssociatedType'=> {'sql'=>"SELECT CASE" ." WHEN a.manual IS NOT NULL THEN a.manual" ." ELSE a.auto END AS id,r.file AS file,r.mail_status AS mail_status" ." FROM $t_assoc AS a," ." (SELECT * FROM $t_student WHERE type=?) AS r" ." ON a.student=r.student AND a.copy=r.copy"}, }; } # files_with_type($type) returns all registered files that are located # in the same directory as files with type $type does (including files # with type $type). sub files_with_type { my ($self,$type)=@_; return($self->sql_list($self->statement('filesWithType'), $type)); } # delete_student_type($type) deletes all records for specified type. sub delete_student_type { my ($self,$type)=@_; $self->statement('deleteType')->execute($type); } # delete_student_report() deletes a student report record. sub delete_student_report { my ($self,$type,$student,$copy)=@_; $self->statement('deleteReport')->execute($type,$student,$copy); } # set_student_type($type,$student,$copy,$file,$timestamp) creates a # new record for a student report file, or replace data if this report # is already in the table. sub set_student_report { my ($self,$type,$student,$copy,$file,$timestamp)=@_; $timestamp=time() if($timestamp eq 'now'); $self->statement('setStudent') ->execute($file,$timestamp,$type,$student,$copy,0,"",0); } # report_mailing($student,$copy,$status,$message,$timestamp) records # mailing status for the report sub report_mailing { my ($self,$student,$copy,$status,$message,$timestamp)=@_; $timestamp=time() if($timestamp eq 'now'); $self->statement('setMailing') ->execute($status,$message,$timestamp,REPORT_ANNOTATED_PDF,$student,$copy); } # free_student_report($type,$file) returns a filename based on $file # that is not yet registered in the same directory as files with type # $type. sub free_student_report { my ($self,$type,$file,$basedir)=@_; my %registered=map { $_=>1 } ($self->files_with_type($type)); if($registered{$file}) { my $template=$file; if(!($template =~ s/(\.[a-z0-9]+)$/_%04d$1/i)) { $template.='_%04d'; } my $i=0; do { $i++; $file=sprintf($template,$i); } while($registered{$file}); } return($file); } # get_dir($type) returns subdirectory (in project directory) where # files for type $type are stored. sub get_dir { my ($self,$type)=@_; return($self->sql_single($self->statement('getDir'),$type)); } # get_student_report($type,$student,$copy) returns the filename of a # given report. sub get_student_report { my ($self,$type,$student,$copy)=@_; return($self->sql_single($self->statement('getStudent'), $type,$student,$copy)); } # get_student_report_time($type,$student,$copy) returns the filename of a # given report, and the corresponding timestamp. sub get_student_report_time { my ($self,$type,$student,$copy)=@_; return($self->sql_row($self->statement('getStudentTime'), $type,$student,$copy)); } # get_associated_type($type) returns a list of reports of a particular # type $type with the corresponding association IDs (primary key of # the student in the students list file), like # # [{'file'=>'001.pdf','id'=>'001234','mail_status'=>0, # {'file'=>'002.pdf','id'=>'001538','mail_status'=>1, # ] sub get_associated_type { my ($self,$type)=@_; $self->{'data'}->require_module('association'); return($self->dbh->selectall_arrayref($self->statement('getAssociatedType'), {Slice=>{}},$type)); } # type_count($type) returns the number of recorded reports of type # $type. sub type_count { my ($self,$type)=@_; return($self->sql_single($self->statement('numType'),$type)); } # all_type($type) returns all the report filenames for type $type sub all_type { my ($self,$type)=@_; return($self->sql_list($self->statement('allType'),$type)); } # all_there($type,$basedir) returns TRUE if all reports of type $type # are distinct present files. sub all_there { my ($self,$type,$basedir)=@_; my $dir=$basedir.'/'.$self->get_dir($type); my @f=$self->sql_list($self->statement('allType'),$type); my $n=$#f; my %f_here=(); for(@f) { $f_here{$_}=1 if( -f $dir.'/'.$_ ); } @f=(keys %f_here); return($#f==$n); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/DataModule/scoring.pm000066400000000000000000001133151341176102400235310ustar00rootroot00000000000000# -*- perl -*- # # Copyright (C) 2011-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::DataModule::scoring; # AMC scoring management. # This module is used to store (in a SQLite database) and handle all # data concerning data scoring (scoring strategies, scores and marks). # TERMINOLOGY NOTE: # # 'student' refers to the student number that is written at the top of # each page, in the format +//+ # # If the questions are printed from AMC, and not photocopied, each # physical student has a different student number on his sheet. # # If some questions are photocopied before beeing distributed to the # students, several students can have the same student number. To make # a difference between their completed answer sheets, a 'copy' number # is added. 'copy' is 1 for the first student using a given student # number sheet, then 2, and so on. # # Hence, a completed answer sheet is identified by the (student,copy) # couple, and a printed sheet (and correct answers, scoring # strategies) is identified by the student number only. # # 'question' is a number associated by LaTeX with every different # question (based on the small text given as XXX in the # \begin{question}{XXX} or \begin{questionmult}{XXX} commands). # # 'answer' is the answer number, starting from 1 for each question, # before beeing shuffled. # TABLES: # # title contains the titles (argument of the \begin{question} and # \begin{questionmult} commands) of all the questions # # * question is the question number, as created by LaTeX and used in # the databases , . # # * title id the title of the question. # # default holds the default scoring strategies, as specified with the # \scoringDefaultM and \scoringDefaultS commands in the LaTeX source # file. This table contains 2 rows. # # * type is the question type, either QUESTION_SIMPLE or QUESTION_MULT # (these constants are defined in this module). # # * strategy is the default strategy string for this question type. # # main holds scoring strategies defined outside question/questionmult # environments, either outside the onecopy/examcopy data (with # student=-1), or inside (student=current student number). # # * student is the student number. # # * strategy is the strategy string given in the LaTeX file as an # argument of the \scoring command. # # question holds scoring strategies for questions. # # * student is the student number. # # * question is the question number. # # * type is the question type, either QUESTION_SIMPLE or # QUESTION_MULT # # * indicative is 1 if the question is indicative (the score is not # taken into account when computing the student mark). # # * strategy is the question scoring strategy string, given in the # LaTeX file inside the question/questionmult environment (but # before \correctchoice and \wrongchoice commands). # # answer holds scoring strategies concerning answers. # # * student is the student number. # # * question is the question number. # # * answer is the answer number, starting from 1 for each question. # # * correct is 1 if this choice is correct (use of \correctchoice). # # * strategy is the answer scoring strategy string, given in the LaTeX # file after the corresponding correctchoice/wrongchoice commands. # # score holds the questions scores for each student. # # * student is the student number. # # * copy is the copy number. # # * question is the question number. # # * score is the score resulting from applying the scoring strategy to # the student's answers. # # * why is a small string that is used to know when special cases has # been encountered: # # E means syntax error (several boxes ticked for a simple # question, or " none of the above" AND another box ticked for a # multiple question). # # V means that no box are ticked. # # P means that a floor has been applied. # # * max is the question score associated to a copy where all answers # are correct (or 1 for indicative questions). # # mark holds global marks of the students. # # * student is the student number. # # * copy is the copy number. # # * total is the total score (sum of the questions scores). # # * max is the total score associated to a perfect copy. # # * mark is the student mark. # # code holds the codes entered by the students (see \AMCcode). # # * student is the student number. # # * copy is the copy number. # # * code is the code name. # # * value is the code value. # VARIABLES: # # postcorrect_flag is 1 if the postcorrect mode is supposed to be used # (correct answers are not indicated in the LaTeX source, but will be # set from a teacher completed answer sheet). # # postcorrect_student # postcorrect_copy identify the sheet completed by the teacher. # # postcorrect_set_multiple (see postcorrect function) # # --- the following values are supplied in the Preferences window # # darkness_threshold and darkness_threshold_up are the parameters used # for determining wether a box is ticked or not. # # mark_floor is the minimum mark to be given to a student. # # mark_max is the mark to be given to a perfect completed answer # sheet. # # ceiling is true if AMC should put a ceiling on the students marks # (this can be useful if the SUF global scoring strategy is used). # # rounding is the rounding type to be used for the marks. # # granularity is the granularity for the marks rounding. use Exporter qw(import); use constant { QUESTION_SIMPLE => 1, QUESTION_MULT => 2, }; our @EXPORT_OK = qw(QUESTION_SIMPLE QUESTION_MULT); our %EXPORT_TAGS = ( 'question' => [ qw/QUESTION_SIMPLE QUESTION_MULT/ ], ); use AMC::Basic; use AMC::DataModule; use AMC::DataModule::capture ':zone'; use AMC::DataModule::layout ':flags'; use XML::Simple; @ISA=("AMC::DataModule"); sub version_current { return(1); } sub version_upgrade { my ($self,$old_version)=@_; if($old_version==0) { # Upgrading from version 0 (empty database) to version 1 : # creates all the tables. debug "Creating scoring tables..."; $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("title") ." (question INTEGER, title TEXT)"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("default") ." (type INTEGER, strategy TEXT)"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("main") ." (student INTEGER, strategy TEXT)"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("question") ." (student INTEGER, question INTEGER, type INTEGER, indicative INTEGER DEFAULT 0, strategy TEXT, PRIMARY KEY (student,question))"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("answer") ." (student INTEGER, question INTEGER, answer INTEGER, correct INTEGER, strategy INTEGER, PRIMARY KEY (student,question,answer))"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("alias") ." (student INTEGER,see INTEGER)"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("score") ." (student INTEGER, copy INTEGER, question INTEGER, score REAL, why TEXT, max REAL, PRIMARY KEY (student,copy,question))"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("mark") ." (student INTEGER, copy INTEGER, total REAL, max REAL, mark REAL, PRIMARY KEY (student,copy))"); $self->sql_do("CREATE TABLE IF NOT EXISTS ".$self->table("code") ." (student INTEGER, copy INTEGER, code TEXT, value TEXT, PRIMARY KEY (student,copy,code))"); $self->statement('NEWdefault')->execute(QUESTION_SIMPLE,""); $self->statement('NEWdefault')->execute(QUESTION_MULT,""); $self->populate_from_xml; return(1); } return(''); } # populate_from_xml read the old format XML files (if any) and inserts # them in the new SQLite database sub populate_from_xml { my ($self)=@_; my $scoring_file=$self->{'data'}->directory; $scoring_file =~ s:/[^/]+/?$:/bareme.xml:; return if(!-f $scoring_file); $self->progression('begin',__"Fetching scoring data from old format XML files..."); my $xml=XMLin($scoring_file,ForceArray => 1,KeyAttr=> [ 'id' ]); $self->main_strategy(-1,$xml->{'main'}); my @s=(keys %{$xml->{'etudiant'}}); my $frac=0; for my $student (@s) { my $s=$xml->{'etudiant'}->{$student}; if($student eq 'defaut') { $self->default_strategy(QUESTION_SIMPLE, $s->{'question'}->{'S'}->{'bareme'}); $self->default_strategy(QUESTION_MULT, $s->{'question'}->{'M'}->{'bareme'}); } elsif($student =~ /^[0-9]+$/) { $self->main_strategy($student,$s->{'main'}); for my $question (keys %{$s->{'question'}}) { if($question =~ /^[0-9]+$/) { my $q=$s->{'question'}->{$question}; $self->question_title($question,$q->{'titre'}); $self->new_question ($student,$question, ($q->{'multiple'} ? QUESTION_MULT : QUESTION_SIMPLE), ($q->{'indicative'} ? 1 : 0),$q->{'bareme'}); if($q->{'reponse'}) { if(ref($q->{'reponse'}) eq 'HASH') { for my $answer (keys %{$q->{'reponse'}}) { my $a=$q->{'reponse'}->{$answer}; $self->new_answer($student,$question,$answer, $a->{'bonne'},$a->{'bareme'}); } } else { debug "WARNING: reponse is not a HASHREF for S=$student Q=$question"; } } } else { debug "Unknown question id: <$question>"; } } } else { debug "Unknown student id: <$student>"; } $frac++; $self->progression('fraction',0.5*$frac/($#s+1)); } $scoring_file=$self->{'data'}->directory; $scoring_file =~ s:/[^/]+/?$:/notes.xml:; return if(!-f $scoring_file); $frac=0; $xml=XMLin($scoring_file,ForceArray => 1,KeyAttr=> [ 'id' ]); $self->variable('darkness_threshold',$xml->{'seuil'}); $self->variable('darkness_threshold_up',1.0); $self->variable('mark_floor',$xml->{'notemin'}); $self->variable('mark_max',$xml->{'notemax'}); $self->variable('ceiling',$xml->{'plafond'}); $self->variable('rounding',$xml->{'arrondi'}); $self->variable('granularity',$xml->{'grain'}); @s=(keys %{$xml->{'copie'}}); for my $student (@s) { my $s=$xml->{'copie'}->{$student}; if($student =~ /^(moyenne|max)$/) { debug "Skipping student <$student>"; } elsif($student =~ /^[0-9]+$/) { $self->statement('NEWMark') ->execute($student,0, map { $s->{'total'}->[0]->{$_} } (qw/total max note/)); for my $title (keys %{$s->{'question'}}) { my $q=$s->{'question'}->{$title}; my $question=$self->question_number($title); $self->statement('NEWScore') ->execute($student,0,$question, $q->{'note'},$q->{'max'},$q->{'raison'}); } for my $code (keys %{$s->{'code'}}) { $self->statement('NEWCode')->execute($student,0,$code, $s->{'code'}->{$code}->{'content'}); } } else { debug "WARNING: Unknown student <$student> importing XML marks"; } $frac++; $self->progression('fraction',0.5*(1+$frac/($#s+1))); } $self->progression('end'); } # defines all the SQL statements that will be used sub define_statements { my ($self)=@_; my $t_answer=$self->table("answer"); my $t_default=$self->table("default"); my $t_zone=$self->table("zone","capture"); $self->{'statements'}= { 'NEWdefault'=>{'sql'=>"INSERT INTO $t_default" ." (type,strategy) VALUES (?,?)"}, 'getDefault'=>{'sql'=>"SELECT strategy FROM $t_default" ." WHERE type=?"}, 'setDefault'=>{'sql'=>"UPDATE $t_default" ." SET strategy=? WHERE type=?"}, 'noDefault'=>{'sql'=>"UPDATE $t_default" ." SET strategy=''"}, 'NEWMain'=>{'sql'=>"INSERT INTO ".$self->table("main") ." (student,strategy) VALUES (?,?)"}, 'getMain'=>{'sql'=>"SELECT strategy FROM ".$self->table("main") ." WHERE student=?"}, 'getAllMain'=>{'sql'=>"SELECT strategy FROM ".$self->table("main") ." WHERE student=? OR student=-1 OR student=0 ORDER BY student"}, 'setMain'=>{'sql'=>"UPDATE ".$self->table("main") ." SET strategy=? WHERE student=?"}, 'NEWTitle'=>{'sql'=>"INSERT INTO ".$self->table("title") ." (question,title) VALUES (?,?)"}, 'getTitle'=>{'sql'=>"SELECT title FROM ".$self->table("title") ." WHERE question=?"}, 'getQNumber'=>{'sql'=>"SELECT question FROM ".$self->table("title") ." WHERE title=?"}, 'setTitle'=>{'sql'=>"UPDATE ".$self->table("title") ." SET title=? WHERE question=?"}, 'NEWQuestion'=>{'sql'=>"INSERT OR REPLACE INTO ".$self->table("question") ." (student,question,type,indicative,strategy)" ." VALUES (?,?,?,?,?)"}, 'NEWAnswer'=>{'sql'=>"INSERT OR REPLACE INTO ".$self->table("answer") ." (student,question,answer,correct,strategy)" ." VALUES (?,?,?,?,?)"}, 'setAnswerStrat'=>{'sql'=>"UPDATE ".$self->table("answer") ." SET strategy=? WHERE student=? AND question=? AND answer=?"}, 'addAnswerStrat'=>{'sql'=>"UPDATE ".$self->table("answer") ." SET strategy=strategy||? WHERE student=? AND question=? AND answer=?"}, 'NEWAlias'=>{'sql'=>"INSERT INTO ".$self->table("alias") ." (student,see) VALUES (?,?)"}, 'getAlias'=>{'sql'=>"SELECT see FROM ".$self->table("alias") ." WHERE student=?"}, 'postCorrectNew'=>{'sql'=>"CREATE TEMPORARY TABLE IF NOT EXISTS" ." pc_temp (q INTEGER, a INTEGER, c REAL, PRIMARY KEY(q,a))"}, 'postCorrectClr'=>{'sql'=>"DELETE FROM pc_temp"}, 'postCorrectPop'=>{'sql'=>"INSERT INTO pc_temp (q,a,c) " ." SELECT id_a,id_b,CASE" ." WHEN manual >= 0 THEN manual" ." WHEN total<=0 THEN -1" ." WHEN black >= ? * total AND black <= ? * total THEN 1" ." ELSE 0" ." END" ." FROM ".$self->table("zone","capture") ." WHERE capture_zone.student=? AND capture_zone.copy=? AND capture_zone.type=?"}, 'postCorrectMul'=>{'sql'=>"UPDATE ".$self->table("question") ." SET type=CASE" ." WHEN (SELECT sum(c) FROM pc_temp" ." WHERE q=question)>1" ." THEN ?" ." ELSE ?" ." END" }, 'postCorrectSet'=>{'sql'=>"UPDATE ".$self->table("answer") ." SET correct=(SELECT c FROM pc_temp" ." WHERE q=question AND a=answer)"}, 'NEWScore'=>{'sql'=>"INSERT INTO ".$self->table("score") ." (student,copy,question,score,max,why)" ." VALUES (?,?,?,?,?,?)"}, 'cancelScore'=>{'sql'=>"UPDATE ".$self->table("score") ." SET why=? WHERE student=? AND copy=? AND question=?"}, 'NEWMark'=>{'sql'=>"INSERT INTO ".$self->table("mark") ." (student,copy,total,max,mark)" ." VALUES (?,?,?,?,?)"}, 'NEWCode'=>{'sql'=>"INSERT INTO ".$self->table("code") ." (student,copy,code,value)" ." VALUES (?,?,?,?)"}, 'studentMark'=>{'sql'=>"SELECT * FROM ".$self->table("mark") ." WHERE student=? AND copy=?"}, 'marks'=>{'sql'=>"SELECT * FROM ".$self->table("mark")}, 'marksCount'=>{'sql'=>"SELECT COUNT(*) FROM ".$self->table("mark")}, 'codes'=>{'sql'=>"SELECT code FROM ".$self->table("code") ." GROUP BY code ORDER BY code"}, 'qStrat'=>{'sql'=>"SELECT strategy FROM ".$self->table("question") ." WHERE student=? AND question=?"}, 'aStrat'=>{'sql'=>"SELECT strategy FROM ".$self->table("answer") ." WHERE student=? AND question=? AND answer=?"}, 'answers'=>{'sql'=>"SELECT answer FROM ".$self->table("answer") ." WHERE student=? AND question=?" ." ORDER BY answer"}, 'studentQuestions'=>{'sql'=>"SELECT question FROM ".$self->table("question") ." WHERE student=?"}, 'questions'=>{'sql'=>"SELECT question,title FROM ".$self->table("title") ." ORDER BY title"}, 'qMaxMax'=>{'sql'=>"SELECT MAX(max) FROM ".$self->table("score") ." WHERE question=?"}, 'correct'=>{'sql'=>"SELECT correct FROM ".$self->table("answer") ." WHERE student=? AND question=? AND answer=?"}, 'correctChars'=> {sql=>"SELECT char FROM " ." (SELECT answer FROM ".$self->table("answer") ." WHERE student=? AND question=? AND correct>0) AS correct," ." (SELECT answer,char FROM ".$self->table("box","layout") ." WHERE student=? AND question=? AND role=?) AS char" ." ON correct.answer=char.answer ORDER BY correct.answer"}, 'correctForAll'=>{'sql'=>"SELECT question,answer," ." MIN(correct) AS correct_min," ." MAX(correct) AS correct_max " ." FROM ".$self->table("answer") ." GROUP BY question,answer"}, 'multiple'=>{'sql'=>"SELECT type FROM ".$self->table("question") ." WHERE student=? AND question=?"}, 'indicative'=>{'sql'=>"SELECT indicative FROM ".$self->table("question") ." WHERE student=? AND question=?"}, 'numQIndic'=>{'sql'=>"SELECT COUNT(*) FROM" ." ( SELECT question FROM ".$self->table("question") ." WHERE indicatve=? GROUP BY question)"}, 'oneIndic'=>{'sql'=>"SELECT COUNT(*) FROM ".$self->table("question") ." WHERE question=? AND indicative=?"}, 'getScore'=>{'sql'=>"SELECT score FROM ".$self->table("score") ." WHERE student=? AND copy=? AND question=?"}, 'getScoreC'=>{'sql'=>"SELECT score,max,why FROM ".$self->table("score") ." WHERE student=? AND copy=? AND question=?"}, 'getCode'=>{'sql'=>"SELECT value FROM ".$self->table("code") ." WHERE student=? AND copy=? AND code=?"}, 'codesCounts'=>{'sql'=>"SELECT student,copy,value,COUNT(*) as nb" ." FROM ".$self->table("code") ." WHERE code=? GROUP BY value"}, 'preAssocCounts'=> {'sql'=>"SELECT m.student,m.copy,l.id AS value,COUNT(*) AS nb" ." FROM ".$self->table("mark")." AS m" ." , ".$self->table("association","layout")." AS l" ." ON m.student=l.student AND m.copy=0" ." GROUP BY l.id"}, 'avgMark'=>{'sql'=>"SELECT AVG(mark) FROM ".$self->table("mark") ." WHERE NOT (student=? AND copy=?)"}, 'avgQuest'=>{'sql'=>"SELECT CASE" ." WHEN SUM(max)>0 THEN 100*SUM(score)/SUM(max)" ." ELSE '-' END" ." FROM ".$self->table("score") ." WHERE question=?" ." AND NOT (student=? AND copy=?)"}, 'studentAnswersBase'=> {'sql'=>"SELECT question,answer" .",correct,strategy" .",(SELECT CASE" ." WHEN manual >= 0 THEN manual" ." WHEN total<=0 THEN -1" ." WHEN black >= ? * total AND black <= ? * total THEN 1" ." ELSE 0" ." END FROM $t_zone" ." WHERE $t_zone.student=? AND $t_zone.copy=? AND $t_zone.type=?" ." AND $t_zone.id_a=$t_answer.question AND $t_zone.id_b=$t_answer.answer" ." ) AS ticked" ." FROM ".$self->table("answer") ." WHERE student=?"}, 'studentQuestionsBase'=> {'sql'=>"SELECT q.question,q.type,q.indicative,q.strategy,t.title" .",d.strategy AS default_strategy" ." FROM ".$self->table("question"). " q" ." LEFT OUTER JOIN ".$self->table("default")." d" ." ON q.type=d.type" ." LEFT OUTER JOIN ".$self->table("title")." t" ." ON q.question=t.question" ." WHERE student=?"}, 'deleteScores'=>{'sql'=>"DELETE FROM ".$self->table('score') ." WHERE student=? AND copy=?"}, 'deleteMarks'=>{'sql'=>"DELETE FROM ".$self->table('mark') ." WHERE student=? AND copy=?"}, 'deleteCodes'=>{'sql'=>"DELETE FROM ".$self->table('code') ." WHERE student=? AND copy=?"}, 'pagesWhy'=>{'sql'=>"SELECT s.student,s.copy,GROUP_CONCAT(s.why) as why,b.page FROM " .$self->table('score')." s" ." JOIN " ." ( SELECT student,page,question FROM ".$self->table("box","layout") ." WHERE role=?" ." GROUP BY student,page,question )" . " b" ." ON s.student=b.student AND s.question=b.question" ." GROUP BY s.student,b.page,s.copy"}, }; } # page_why() returns a list of items like # {student=>1,copy=>0,page=>1,why=>',V,E,,'} # that collects all 'why' attributes for questions that are on each page. sub pages_why { my ($self)=@_; return(@{$self->dbh->selectall_arrayref($self->statement('pagesWhy'), {Slice=>{}}, BOX_ROLE_ANSWER )}); } # default_strategy($type) returns the default scoring strategy string # to be used for questions with type $type (QUESTION_SIMPLE or # QUESTION_MULT). # # default_strategy($type,$strategy) sets the default strategy string # for questions with type $type. sub default_strategy { my ($self,$type,$strategy)=@_; if(defined($strategy)) { $self->statement('setDefault')->execute($strategy,$type); } else { return($self->sql_single($self->statement('getDefault'),$type)); } } # main_strategy($student) returns the main scoring strategy string for # student $student. If $student<=0 (-1 in the database), this refers # to the argument of the \scoring command used outside the # onecopy/examcopy loop. If $student>0, this refers to the argument of # the \scoring command used inside the onecopy/examcopy loop, but # outside question/questionmult environments. # # main_strategy($student,$strategy) sets the main scoring strategy # string. sub main_strategy { my ($self,$student,$strategy)=@_; $student=-1 if($student<=0); if(defined($strategy)) { if(defined($self->main_strategy($student))) { $self->statement('setMain')->execute($strategy,$student); } else { $self->statement('NEWMain')->execute($student,$strategy); } } else { return($self->sql_single($self->statement('getMain'),$student)); } } #add_main_strategy($student,$strategy) adds the strategy string at the #end of the student's main strategy string. sub add_main_strategy { my ($self,$student,$strategy)=@_; $student=-1 if($student<=0); my $old=$self->main_strategy($student); if(defined($old)) { $self->statement('setMain')->execute($old.','.$strategy,$student); } else { $self->statement('NEWMain')->execute($student,$strategy); } } # main_strategy_all($student) returns a concatenation of the the main # strategies for student=-1, student=0 and student=$student. sub main_strategy_all { my ($self,$student)=@_; return(join(',',$self->sql_list($self->statement('getAllMain'),$student))); } # new_question($student,$question,$type,$indicative,$strategy) adds a # question in the database, giving its characteristics. If the # question already exists, it is updated with no error. sub new_question { my ($self,$student,$question,$type,$indicative,$strategy)=@_; $self->statement('NEWQuestion')->execute ($student,$question,$type,$indicative,$strategy); } # question_strategy($student,$question) returns the scoring strategy # string for a particlar question: argument of the \scoring command # used inside a question/questionmult environment, before the # \correctchoice and \wrongchoice commands. sub question_strategy { my ($self,$student,$question)=@_; return($self->sql_single($self->statement('qStrat'),$student,$question)); } # new_answer($student,$question,$answer,$correct,$strategy) adds an # answer in the database, giving its characteristics. If the answer # already exists, it is updated with no error. sub new_answer { my ($self,$student,$question,$answer,$correct,$strategy)=@_; $self->statement('NEWAnswer')->execute ($student,$question,$answer,$correct,$strategy); } # answer_strategy($student,$question,$answer) returns the scoring # strategy string for a particular answer: argument of the \scoring # command used after \correctchoice and \wrongchoice commands. sub answer_strategy { my ($self,$student,$question,$answer)=@_; return($self->sql_single($self->statement('aStrat'),$student,$question,$answer)); } # answers($student,$question) returns an ordered list of answers # numbers for a particular question. Answer number 0, placed at the # end, corresponds to the answer "None of the above", when present. sub answers { my ($self,$student,$question)=@_; my @a=$self->sql_list($self->statement('answers'),$student,$question); if($a[0]==0) { shift @a; push @a,0; } return(@a); } # correct_answer($student,$question,$answer) returns 1 if the # corresponding box has to be ticked (the answer is a correct one), # and 0 if not. sub correct_answer { my ($self,$student,$question,$answer)=@_; return($self->sql_single($self->statement('correct'), $student,$question,$answer)); } # correct_chars($student,$question) returns the list of the chars # written inside (or beside) the boxes corresponding to correct # answers for a particular question sub correct_chars { my ($self,$student,$question)=@_; $self->{'data'}->require_module('layout'); return($self->sql_list($self->statement('correctChars'), $student,$question, $student,$question,BOX_ROLE_ANSWER)); } # Same as correct_chars, but paste the chars if they all exist, and # return undef otherwise sub correct_chars_pasted { my ($self,@args)=@_; my @c=$self->correct_chars(@args); if(grep { !defined($_) } @c) { return(undef); } else { return(join("",@c)); } } # correct_for_all() returns a reference to an array like # # [{question=>1,answer=>1,correct_min=>0,correct_max=>0}, # {question=>1,answer=>2,correct_min=>1,correct_max=>1}, # ] # # This gives, for each question/answer, the minumum and maximum of the # column for all students. Usualy, minimum and maximum are # equal because the answer is either correct for all students either # not correct for all students, but one can also encounter # correct_min=0 and correct_max=1, in situations where the answers are # not the same for all students (for example for questions with random # numerical values). sub correct_for_all { my ($self,$question,$answer)=@_; return($self->dbh->selectall_arrayref($self->statement('correctForAll'), {Slice=>{}})); } # multiple($student,$question) returns 1 if the corresponding # question is multiple (type=QUESTION_MULT), and 0 if not. sub multiple { my ($self,$student,$question)=@_; return($self->sql_single($self->statement('multiple'), $student,$question) == QUESTION_MULT); } # correct_answer($student,$question) returns 1 if the corresponding # question is indicative (use of \QuestionIndicative), and 0 if not. sub indicative { my ($self,$student,$question)=@_; return($self->sql_single($self->statement('indicative'), $student,$question)); } # one_indicative($question,$indic) returns the number of students for # which the question has indicative=$indic. In fact, a single question # SHOULD be indicative for all students, or for none... sub one_indicative { my ($self,$question,$indic)=@_; $indic=1 if(!defined($indic)); return($self->sql_single($self->statement('oneIndic'),$question,$indic)); } # num_questions_indic($i) returns the number of questions that have # indicative=$i ($i is 0 or 1). sub num_questions_indic { my ($self,$indicative)=@_; return($self->sql_single($self->statement('numQIndic'),$indicative)); } # question_title($question) returns a question title. # # question_title($question,$title) sets a question title. sub question_title { my ($self,$question,$title)=@_; if(defined($title)) { if(defined($self->question_title($question))) { $self->statement('setTitle')->execute($title,$question); } else { $self->statement('NEWTitle')->execute($question,$title); } } else { return($self->sql_single($self->statement('getTitle'),$question)); } } # question_number($title) returns the question number corresponding to # the given title. sub question_number { my ($self,$title)=@_; return($self->sql_single($self->statement('getQNumber'),$title)); } # question_maxmax($question) returns the maximum of the max value for # question $question accross all students sheets sub question_maxmax { my ($self,$question)=@_; return($self->sql_single($self->statement('qMaxMax'),$question)); } # clear_strategy clears all data concerning the scoring strategy of # the exam. sub clear_strategy { my ($self)=@_; $self->clear_variables; $self->statement('noDefault')->execute; for my $t (qw/title main question answer alias/) { $self->sql_do("DELETE FROM ".$self->table($t)); } } # clear_score clears all data concerning the scores/marks of the # students. sub clear_score { my ($self)=@_; for my $t (qw/score mark code/) { $self->sql_do("DELETE FROM ".$self->table($t)); } } # set_answer_strategy($student,$question,$answer,$strategy) sets the # scoring strategy string associated to a particular answer. sub set_answer_strategy { my ($self,$student,$question,$answer,$strategy)=@_; $self->statement('setAnswerStrat')->execute($strategy,$student,$question,$answer); } # add_answer_strategy($student,$question,$answer,$strategy) adds the # scoring strategy string to a particular answer's one. sub add_answer_strategy { my ($self,$student,$question,$answer,$strategy)=@_; $self->statement('addAnswerStrat')->execute(",".$strategy, $student,$question,$answer); } # replicate($see,$student) tells that the scoring strategy used for # student $see has to be also used for student $student. This can be # used only when the questions/answers are not different from a sheet # to another (contrary to the use of random numerical values for # exemple). sub replicate { my ($self,$see,$student)=@_; $self->statement('NEWAlias')->execute($student,$see); } # unalias($student) gives the student number where to find scoring # strategy for student $student (following a replicate path if # present -- see previous method). sub unalias { my ($self,$student)=@_; my $s=$student; do { $student=$s; $s=$self->sql_single($self->statement('getAlias'),$student); } while(defined($s)); return($student); } # postcorrect($student,$copy,$darkness_threshold,$darkness_threshold_up,$set_multiple) # uses the ticked values from the copy ($student,$copy) (filled by a # teacher) to determine which answers are correct for all sheets. This # can be used only when the questions/answers are not different from a # sheet to another (contrary to the use of random numerical values for # exemple). # # If $set_multiple is true, postcorrect also sets the type of all # questions for which 2 or more answers are ticked on the # ($student,$copy) answer sheet to be QUESTION_MULT, ans the type of # all other questions to QUESTION_SIMPLE. sub postcorrect { my ($self,$student,$copy, $darkness_threshold,$darkness_threshold_up,$set_multiple)=@_; die "Missing parameters in postcorrect call" if(!defined($darkness_threshold_up)); $self->{'data'}->require_module('capture'); $self->statement('postCorrectNew')->execute(); $self->statement('postCorrectClr')->execute(); $self->statement('postCorrectPop') ->execute($darkness_threshold,$darkness_threshold_up,$student,$copy,ZONE_BOX); $self->statement('postCorrectMul')->execute(QUESTION_MULT,QUESTION_SIMPLE) if($set_multiple); $self->statement('postCorrectSet')->execute(); } # new_score($student,$copy,$question,$score,$score_max,$why) adds a # question score row. sub new_score { my ($self,$student,$copy,$question,$score,$score_max,$why)=@_; $self->statement('NEWScore') ->execute($student,$copy,$question,$score,$score_max,$why); } # cancel_score($student,$copy,$question) cancels scoring (sets the # score and maximum score to zero) for this question. sub cancel_score { my ($self,$student,$copy,$question)=@_; $self->statement('cancelScore') ->execute('C',$student,$copy,$question); } # new_mark($student,$copy,$total,$max,$mark) adds a mark row. sub new_mark { my ($self,$student,$copy,$total,$max,$mark)=@_; $self->statement('NEWMark') ->execute($student,$copy,$total,$max,$mark); } # new_code($student,$copy,$code,$value) adds a code row. sub new_code { my ($self,$student,$copy,$code,$value)=@_; $self->statement('NEWCode') ->execute($student,$copy,$code,$value); } # student_questions($student) returns a list of the question numbers # used in the sheets for student number $student. sub student_questions { my ($self,$student)=@_; return($self->sql_list($self->statement('studentQuestions'), $student)); } # questions returns an array of pointers (one for each question) to # hashes ('question'=>,'title'=>'question_title'). sub questions { my ($self)=@_; return(@{$self->dbh->selectall_arrayref($self->statement('questions'),{Slice=>{}})}); } # average_mark returns the average mark from all students marks. sub average_mark { my ($self)=@_; my @pc=$self->postcorrect_sc; return($self->sql_single($self->statement('avgMark'),@pc)); } # codes returns a list of codes names. sub codes { my ($self)=@_; return($self->sql_list($self->statement('codes'))); } # marks returns a pointer to an array of pointers (one for each # student) to hashes giving all information from the mark table. sub marks { my ($self)=@_; return(@{$self->dbh->selectall_arrayref($self->statement('marks'),{Slice=>{}})}); } # marks_count returns the nmber of marks computed. sub marks_count { my ($self)=@_; return($self->sql_single($self->statement('marksCount'))); } # question_score($student,$copy,$question) returns the score of a # particular student for a particular question. sub question_score { my ($self,$student,$copy,$question)=@_; return($self->sql_single($self->statement('getScore'), $student,$copy,$question)); } # question_result($student,$copy,$question) returns a pointer to a # hash ('score'=>XXX,'max'=>XXX,'why'=>XXX) extracted from the # question table. sub question_result { my ($self,$student,$copy,$question)=@_; my $sth=$self->statement('getScoreC'); $sth->execute($student,$copy,$question); return($sth->fetchrow_hashref); } # student_code($student,$copy,$code) returns the value of the code # named $code entered by a particular student. sub student_code { my ($self,$student,$copy,$code)=@_; return($self->sql_single($self->statement('getCode'), $student,$copy,$code)); } # postcorrect_sc returns (postcorrect_student,postcorrect_copy), or # (0,0) if not in postcorrect mode. sub postcorrect_sc { my ($self)=@_; return($self->variable('postcorrect_student') || 0, $self->variable('postcorrect_copy') || 0); } # question_average($question) returns the average (as a percentage of # the maximum score, from 0 to 100) of the scores for a particular # question. sub question_average { my ($self,$question)=@_; my @pc=$self->postcorrect_sc; return($self->sql_single($self->statement('avgQuest'),$question, @pc)); } # student_global($student,$copy) returns a pointer to a hash # ('student'=>XXX,'copy'=>XXX,'total'=>XXX,'max'=>XXX,'mark'=>XXX) # extracted from the mark table. sub student_global { my ($self,$student,$copy)=@_; my $sth=$self->statement('studentMark'); $sth->execute($student,$copy); return($x=$sth->fetchrow_hashref); } # student_scoring_base($student,$copy,$darkness_threshold,$darkness_threshold_up) # returns useful data to compute questions scores for a particular # student (identified by $student and $copy), as a reference to a hash # grouping questions and answers. For exemple : # # 'main_strategy'=>"", # 'questions'=> # { 1 =>{ 'question'=>1, # 'title' => 'questionID', # 'type'=>1, # 'indicative'=>0, # 'strategy'=>'', # 'answers'=>[ { 'question'=>1, 'answer'=>1, # 'correct'=>1, 'ticked'=>0, 'strategy'=>"b=2" }, # {'question'=>1, 'answer'=>2, # 'correct'=>0, 'ticked'=>0, 'strategy'=>"" }, # ], # }, # ... # } sub student_scoring_base { my ($self,$student,$copy,$darkness_threshold,$darkness_threshold_up)=@_; die "Missing parameters in student_scoring_base call" if(!defined($darkness_threshold_up)); $self->{'data'}->require_module('capture'); my $student_strategy=$self->unalias($student); my $r={'student_alias'=>$student_strategy, 'questions'=>{}, 'main_strategy'=>$self->main_strategy_all($student_strategy)}; my @sid=($student); push @sid,$student_strategy if($student != $student_strategy); for my $s (@sid) { my $sth; $sth=$self->statement('studentQuestionsBase'); $sth->execute($s); while(my $qa=$sth->fetchrow_hashref) { $r->{'questions'}->{$qa->{'question'}}=$qa; } $sth=$self->statement('studentAnswersBase'); $sth->execute($darkness_threshold,$darkness_threshold_up, $student,$copy,ZONE_BOX,$s); while(my $qa=$sth->fetchrow_hashref) { push @{$r->{'questions'}->{$qa->{'question'}}->{'answers'}},$qa; } } return($r); } # student_scoring_base_sorted(...) organizes the data from # student_scoring_base to get sorted questions, relative to their IDs # (lexicographic order) # # 'main_strategy'=>"", # 'questions'=> # [ { 'question'=>1, # 'title' => 'questionID', # 'type'=>1, # 'indicative'=>0, # 'strategy'=>'', # 'answers'=>[ { 'question'=>1, 'answer'=>1, # 'correct'=>1, 'ticked'=>0, 'strategy'=>"b=2" }, # {'question'=>1, 'answer'=>2, # 'correct'=>0, 'ticked'=>0, 'strategy'=>"" }, # ], # }, # ... # ] sub student_scoring_base_sorted { my ($self,@args)=@_; my $ssb=$self->student_scoring_base(@args); my @n=sort { $ssb->{questions}->{$a}->{title} cmp $ssb->{questions}->{$b}->{title} } (keys %{$ssb->{questions}}); my $sorted_q=[map { $ssb->{questions}->{$_} } (@n)]; $ssb->{questions}=$sorted_q; return($ssb); } # delete_scoring_data($student,$copy) deletes all scoring data # relative to a particular answer sheet. sub delete_scoring_data { my ($self,$student,$copy)=@_; for my $part (qw/Scores Marks Codes/) { $self->statement('delete'.$part)->execute($student,$copy); } } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Exec.pm000066400000000000000000000036041341176102400207310ustar00rootroot00000000000000# # Copyright (C) 2009-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Exec; use AMC::Basic; sub new { my ($nom)=@_; my $self={'pid'=>'', 'nom'=>$nom || 'AMC', }; bless($self); return($self); } sub catch_signal { my ($self,$signame)=@_; if($self->{'pid'}) { debug "*** $self->{'nom'} : signal $signame, killing $self->{'pid'}...\n"; kill 9,$self->{'pid'}; } die "$self->{'nom'} killed"; } sub signalise { my ($self)=@_; $SIG{INT} = sub { my $s=shift;$self->catch_signal($s); }; } sub execute { my ($self,@c)=@_; my $prg=$c[0]; if($prg) { if(!commande_accessible($prg)) { debug "*** WARNING: program \"$prg\" not found in PATH!"; } my $cmd_pid=fork(); my @t=times(); if($cmd_pid) { $self->{'pid'}=$cmd_pid; debug "Command [$cmd_pid] : ".join(' ',@c); waitpid($cmd_pid,0); my @tb=times(); debug "Cmd PID=$cmd_pid returns $?"; debug sprintf("Total parent exec times during $cmd_pid: [%7.02f,%7.02f]",$tb[0]+$tb[1]-$t[0]-$t[1],$tb[2]+$tb[3]-$t[2]-$t[3]); } else { exec(@c); die "Commande inexistante : $prg"; } } else { debug "Command: no executable! ".join(' ',@c); } } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Export.pm000066400000000000000000000163041341176102400213270ustar00rootroot00000000000000# # Copyright (C) 2009-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Export; use AMC::Basic; use AMC::Data; use AMC::NamesFile; use AMC::Messages; @ISA=("AMC::Messages"); use_gettext; my %sorting=('l'=>['n:student.line'], 'm'=>['n:mark','s:student.name','n:student.line'], 'i'=>['n:student','n:copy','n:student.line'], 'n'=>['s:student.name','n:student.line'], ); sub new { my $class = shift; my $self = { 'fich.datadir'=>'', 'fich.noms'=>'', 'noms'=>'', 'noms.encodage'=>'', 'noms.separateur'=>'', 'noms.useall'=>1, 'noms.postcorrect'=>'', 'noms.abs'=>'ABS', 'noms.identifiant'=>'', 'out.rtl'=>'', 'sort.keys'=>['s:student.name','n:student.line'], 'sort.cols'=>'smart', 'marks'=>[], 'messages'=>[], }; bless ($self, $class); return $self; } sub set_options { my ($self,$domaine,%f)=@_; for(keys %f) { my $k=$domaine.'.'.$_; if(defined($self->{$k})) { debug "Option $k = $f{$_}"; $self->{$k}=$f{$_}; utf8::downgrade($self->{$k}) if($domaine eq 'fich'); } else { debug "Unusable option <$domaine.$_>\n"; } } } sub opts_spec { my ($self,$domaine)=@_; my @o=(); for my $k (grep { /^$domaine/ } (keys %{$self})) { my $kk=$k; $kk =~ s/^$domaine\.//; push @o,$kk,$self->{$k} if($self->{$k}); } return(@o); } sub load { my ($self)=@_; die "Needs data directory" if(!-d $self->{'fich.datadir'}); $self->{'_data'}=AMC::Data->new($self->{'fich.datadir'}); $self->{'_scoring'}=$self->{'_data'}->module('scoring'); $self->{'_layout'}=$self->{'_data'}->module('layout'); $self->{'_assoc'}=$self->{'_data'}->module('association'); if($self->{'fich.noms'} && ! $self->{'noms'}) { $self->{'noms'}=AMC::NamesFile::new($self->{'fich.noms'}, $self->opts_spec('noms'), ); } } sub question_group { my ($self,$question)=@_; if($question->{title} =~ /^(.+?)\Q$self->{"out.groupsep"}\E/) { return($1); } else { return(undef); } } sub group_sum_q { my ($self,%g)=@_; return({question=>-1,%g, title=>"<".$g{group_sum}.">"}); } sub insert_groups_sum_headers { my ($self,@questions)=@_; if($self->{'out.groupsums'}) { my %group=(); my @r=(); for my $q (@questions) { my $g=$self->question_group($q); $q->{group}=$g if(defined($g)); if(defined($g) && $g eq $group{group_sum}) { $group{indic0}=1 if($q->{indic0}); $group{indic1}=1 if($q->{indic1}); $group{n}++; } else { push @r,$self->group_sum_q(%group) if(defined($group{group_sum})); %group=(group_sum=>$g,n=>1, indic0=>$q->{indic0},indic1=>$q->{indic1}); } push @r,$q; } push @r,$self->group_sum_q(%group) if(defined($group{group_sum})); return(@r); } else { return(@questions); } } sub test_indicative { my ($self,$question)=@_; for my $state (0,1) { $question->{'indic'.$state}=1 if($self->{'_scoring'}->one_indicative($question->{question},$state)); } } sub sort_cols { my ($self,@x)=@_; return(sort { $self->cols_cmp($a->{title},$b->{title}) } (@x)); } sub cols_cmp { my ($self,$a,$b)=@_; if($self->{'sort.cols'} eq 'smart') { if($a !~ /[^0-9\s]/ && $b !~ /[^0-9\s]/) { return($a <=> $b); } else { return($a cmp $b); } } else { return(0); } } sub codes_questions { my ($self,$codes,$questions,$plain)=@_; @$codes=$self->{'_scoring'}->codes(); my $code_digit_pattern=$self->{_layout}->code_digit_pattern(); if($plain) { my $codes_re="(".join("|",map { "\Q$_\E" } @$codes).")"; @$questions=$self->sort_cols(grep { $_->{'title'} !~ /^$codes_re$code_digit_pattern$/ } $self->{'_scoring'}->questions); } else { @$questions=$self->sort_cols($self->{'_scoring'}->questions); } for(@$questions) { $self->test_indicative($_); } @$questions=$self->insert_groups_sum_headers(@$questions); } sub pre_process { my ($self)=@_; $self->{'sort.keys'}=$sorting{lc($1)} if($self->{'sort.keys'} =~ /^\s*([lmin])/i); $self->{'sort.keys'}=[] if(!$self->{'sort.keys'}); $self->load(); $self->{'_scoring'}->begin_read_transaction('EXPP'); my $lk=$self->{'_assoc'}->variable('key_in_list'); my %keys=(); my @marks=(); my @post_correct=$self->{'_scoring'}->postcorrect_sc; # Get all students from the marks table my $sth=$self->{'_scoring'}->statement('marks'); $sth->execute; STUDENT: while(my $m=$sth->fetchrow_hashref) { next STUDENT if((!$self->{'noms.postcorrect'}) && $m->{student}==$post_correct[0] && $m->{'copy'}==$post_correct[1]); $m->{'abs'}=0; $m->{'student.copy'}=studentids_string($m->{'student'},$m->{'copy'}); # Association key for this sheet $m->{'student.key'}=$self->{'_assoc'}->get_real($m->{'student'},$m->{'copy'}); $keys{$m->{'student.key'}}=1; # find the corresponding name my ($n)=$self->{'noms'}->data($lk,$m->{'student.key'},test_numeric=>1); if($n) { $m->{'student.name'}=$n->{'_ID_'}; $m->{'student.line'}=$n->{'_LINE_'}; $m->{'student.all'}={%$n}; # $n->{$lk} should be equal to $m->{'student.key'}, but in # some cases (older versions), the code stored in the database # has leading zeroes removed... $keys{$n->{$lk}}=1; } else { for(qw/name line/) { $m->{"student.$_"}='?'; } } push @marks,$m; } # Now, add students with no mark (if requested) if($self->{'noms.useall'}) { for my $i ($self->{'noms'}->liste($lk)) { if(!$keys{$i}) { my ($name)=$self->{'noms'}->data($lk,$i,test_numeric=>1); push @marks, {'student'=>'', 'copy'=>'', 'student.copy'=>'', 'abs'=>1, 'student.key'=>$name->{$lk}, 'mark'=>$self->{'noms.abs'}, 'student.name'=>$name->{'_ID_'}, 'student.line'=>$name->{'_LINE_'}, 'student.all'=>{%$name}, }; } } } # sorting as requested debug "Sorting with keys ".join(", ",@{$self->{'sort.keys'}}); $self->{'marks'}=[sort { $self->compare($a,$b); } @marks]; $self->{'_scoring'}->end_transaction('EXPP'); } sub compare { my ($self,$xa,$xb)=@_; my $r=0; for my $k (@{$self->{'sort.keys'}}) { my $key=$k; my $mode='s'; if($k =~ /^([ns]):(.*)/) { $mode=$1; $key=$2; if($mode eq 'n') { $r=$r || ( $xa->{$key} <=> $xb->{$key} ); } else { $r=$r || ( $xa->{$key} cmp $xb->{$key} ); } } } return($r); } sub export { my ($self,$fichier)=@_; debug "WARNING: Base class export to $fichier\n"; } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Export/000077500000000000000000000000001341176102400207655ustar00rootroot00000000000000auto-multiple-choice-1.4.0/AMC-perl/AMC/Export/CSV.pm000066400000000000000000000112251341176102400217570ustar00rootroot00000000000000# # Copyright (C) 2009-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Export::CSV; use AMC::Basic; use AMC::Export; use Encode; @ISA=("AMC::Export"); sub new { my $class = shift; my $self = $class->SUPER::new(); $self->{'out.encodage'}='utf-8'; $self->{'out.separateur'}=","; $self->{'out.decimal'}=","; $self->{'out.entoure'}="\""; $self->{'out.ticked'}=""; $self->{'out.columns'}='student.copy,student.key,student.name'; bless ($self, $class); return $self; } sub load { my ($self)=@_; $self->SUPER::load(); $self->{'_capture'}=$self->{'_data'}->module('capture'); } sub parse_num { my ($self,$n)=@_; if($self->{'out.decimal'} ne '.') { $n =~ s/\./$self->{'out.decimal'}/; } return($self->parse_string($n)); } sub parse_string { my ($self,$s)=@_; if($self->{'out.entoure'}) { $s =~ s/$self->{'out.entoure'}/$self->{'out.entoure'}$self->{'out.entoure'}/g; $s=$self->{'out.entoure'}.$s.$self->{'out.entoure'}; } return($s); } sub i_to_a { my ($self,$i)=@_; if($i==0) { return('0'); } else { my $s=''; while($i>0) { $s = chr(ord('a')+(($i-1) % 26)) . $s; $i = int(($i-1)/26); } $s =~ s/^([a-z])/uc($1)/e; return($s); } } sub export { my ($self,$fichier)=@_; my $sep=$self->{'out.separateur'}; $sep="\t" if($sep =~ /^tab$/i); $self->{'noms.postcorrect'}=($self->{'out.ticked'} ne ''); $self->pre_process(); open(OUT,">:encoding(".$self->{'out.encodage'}.")",$fichier); $self->{'_scoring'}->begin_read_transaction('XCSV'); my $dt=$self->{'_scoring'}->variable('darkness_threshold'); my $dtu=$self->{'_scoring'}->variable('darkness_threshold_up'); $dtu=1 if(!defined($dtu)); my $lk=$self->{'_assoc'}->variable('key_in_list'); my @student_columns=split(/,+/,$self->{'out.columns'}); my @columns=(); for my $c (@student_columns) { if($c eq 'student.key') { push @columns,"A:".encode('utf-8',$lk); } elsif($c eq 'student.name') { push @columns,translate_column_title('nom'); } elsif($c eq 'student.copy') { push @columns,translate_column_title('copie'); } else { push @columns,encode('utf-8',$c); } } push @columns,map { translate_column_title($_); } ("note"); my @codes; my @questions; $self->codes_questions(\@codes,\@questions,!$self->{'out.ticked'}); if($self->{'out.ticked'}) { push @columns,map { ($_->{'title'},"TICKED:".$_->{'title'}) } @questions; $self->{'out.entoure'}="\"" if(!$self->{'out.entoure'}); } else { push @columns,map { $_->{'title'} } @questions; } push @columns,@codes; print OUT join($sep,map { $self->parse_string($_) } @columns)."\n"; for my $m (@{$self->{'marks'}}) { my @sc=($m->{'student'},$m->{'copy'}); @columns=(); for my $c (@student_columns) { push @columns,$self->parse_string($m->{$c} ? $m->{$c} : $m->{'student.all'}->{$c}); } push @columns,$self->parse_num($m->{'mark'}); for my $q (@questions) { push @columns,$self->parse_num($self->{'_scoring'}->question_score(@sc,$q->{'question'})); if($self->{'out.ticked'}) { if($self->{'out.ticked'} eq '01') { push @columns, $self->parse_string (join(';',$self->{'_capture'} ->ticked_list_0(@sc,$q->{'question'},$dt,$dtu))); } elsif($self->{'out.ticked'} eq 'AB') { my $t=''; my @tl=$self->{'_capture'} ->ticked_list(@sc,$q->{'question'},$dt,$dtu); if($self->{_capture}->has_answer_zero(@sc,$q->{'question'})) { if(shift @tl) { $t.='0'; } } for my $i (0..$#tl) { $t.=$self->i_to_a($i+1) if($tl[$i]); } push @columns,$self->parse_string($t); } else { push @columns,$self->parse_string('S?'); } } } for my $c (@codes) { push @columns,$self->{'_scoring'}->student_code(@sc,$c); } print OUT join($sep,@columns)."\n"; } close(OUT); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Export/List.pm000066400000000000000000000136351341176102400222460ustar00rootroot00000000000000# # Copyright (C) 2011-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Export::List; use File::Temp qw/ tempfile tempdir /; use Pango; use Cairo; use AMC::Basic; use AMC::Export; @ISA=("AMC::Export"); sub new { my $class = shift; my $self = $class->SUPER::new(); $self->{'out.encodage'}='utf-8'; $self->{'out.decimal'}=","; $self->{'out.pagesize'}="a4"; $self->{'out.ncols'}=2; $self->{'out.margin'}=30; $self->{'out.sep'}=10; $self->{'out.font'}="FreeSans 8"; $self->{'out.nom'}=""; $self->{'out.code'}=""; $self->{'icol'}=-1; bless ($self, $class); return $self; } sub parse_num { my ($self,$n)=@_; if($self->{'out.decimal'} ne '.') { $n =~ s/\./$self->{'out.decimal'}/; } return($n); } sub dims { my ($self)=@_; if(lc($self->{'out.pagesize'}) eq 'a3') { $self->{'page_x'}=841.88976; $self->{'page_y'}=1190.5512; } elsif(lc($self->{'out.pagesize'}) eq 'letter') { $self->{'page_x'}=612; $self->{'page_y'}=792; } elsif(lc($self->{'out.pagesize'}) eq 'legal') { $self->{'page_x'}=612; $self->{'page_y'}=1008; } else { # a4 $self->{'page_x'}=595.27559; $self->{'page_y'}=841.88976; } my $dispo=$self->{'page_x'}-2*$self->{'out.margin'}-($self->{'out.ncols'}-1)*$self->{'out.sep'}; $self->{'space'}=2; $self->{'cs_mark'}=50; $self->{'cs_name'}=$dispo/$self->{'out.ncols'}-$self->{'cs_mark'}; $self->{'y0'}=$self->{'out.margin'}; } sub show_title { my ($self)=@_; if($self->{'out.nom'}) { my $l0=Pango::Cairo::create_layout($self->{'context'}); $l0->set_font_description (Pango::FontDescription->from_string ($self->{'out.font'})); $l0->set_text($self->{'out.nom'}); ($text_x,$text_y)=$l0->get_pixel_size(); if($self->{'out.rtl'}) { $self->{'context'}->move_to($self->{'page_x'}-$text_x-$self->{'out.margin'}, $self->{'out.margin'}); } else { $self->{'context'}->move_to($self->{'out.margin'},$self->{'out.margin'}); } Pango::Cairo::show_layout($self->{'context'},$l0); $self->{'y0'}=$text_y+2*$self->{'out.margin'}; } } sub dx_dir { my ($self,$droite)=@_; return($self->{ (!$droite != !$self->{'out.rtl'} ? 'cs_mark' : 'cs_name' ) }); } sub debut_col { my ($self)=@_; $self->{'icol'}++; if($self->{'icol'}>=$self->{'out.ncols'}) { $self->{'icol'}=0 ; $self->{'context'}->show_page(); } $self->show_title if($self->{'icol'}==0); $self->{'x'}=$self->{'out.margin'}+$self->{'cs_name'}+ $self->{'icol'}*($self->{'cs_mark'}+$self->{'cs_name'}+$self->{'out.sep'}); $self->{'x'}=$self->{'page_x'}-$self->{'x'} if($self->{'out.rtl'}); $self->{'y'}=$self->{'y0'}; $self->{'context'}->move_to($self->{'x'}-$self->dx_dir(0),$self->{'y'}); $self->{'context'}->line_to($self->{'x'}+$self->dx_dir(1),$self->{'y'}); } sub export { my ($self,$fichier)=@_; $self->pre_process(); $self->dims(); $self->{'surface'}=Cairo::PdfSurface->create($fichier, $self->{'page_x'}, $self->{'page_y'}); $self->{'context'} = Cairo::Context->create ($self->{'surface'}); $self->{'layout'}=Pango::Cairo::create_layout($self->{'context'}); $self->{'layout'}->set_font_description (Pango::FontDescription->from_string ($self->{'out.font'})); $self->{'context'}->set_line_width(.5); my $text_x; my $text_y; my $y0; $self->debut_col(); for my $m (@{$self->{'marks'}}) { # strings to write in columns my $name=$m->{'student.name'}; my $mark=$m->{'mark'}; # prepares writting name $self->{'layout'}->set_text($name); ($text_x,$text_y)=$self->{'layout'}->get_pixel_size(); # remove end characters while string is too long while($name && $text_x > $self->{'cs_name'}-6*$self->{'space'}) { $name =~s/.$//; $self->{'layout'}->set_text($name); ($text_x,$text_y)=$self->{'layout'}->get_pixel_size(); } # go to next column if necessary if($self->{'y'}+2*$self->{'space'}+$text_y+$self->{'out.margin'} > $self->{'page_y'}) { $self->debut_col(); } $y0=$self->{'y'}; $self->{'y'}+=$self->{'space'}; if($self->{'out.rtl'}) { $self->{'context'}->move_to($self->{'x'}+$self->{'cs_name'} -3*$self->{'space'}-$text_x, $self->{'y'}); } else { $self->{'context'}->move_to($self->{'x'}-$text_x-3*$self->{'space'}, $self->{'y'}); } Pango::Cairo::show_layout($self->{'context'},$self->{'layout'}); # writes grade $self->{'layout'}->set_text($self->parse_num($mark)); ($text_x,$text_y)=$self->{'layout'}->get_pixel_size(); if($self->{'out.rtl'}) { $self->{'context'}->move_to($self->{'x'}-($self->{'cs_mark'}+$text_x)/2, $self->{'y'}); } else { $self->{'context'}->move_to($self->{'x'}+($self->{'cs_mark'}-$text_x)/2, $self->{'y'}); } Pango::Cairo::show_layout($self->{'context'},$self->{'layout'}); $self->{'y'}+=$text_y+$self->{'space'}; # lines $self->{'context'}->move_to($self->{'x'}-$self->dx_dir(0),$self->{'y'}); $self->{'context'}->line_to($self->{'x'}+$self->dx_dir(1),$self->{'y'}); for my $xx ($self->{'x'}, $self->{'x'}-$self->dx_dir(0), $self->{'x'}+$self->dx_dir(1)) { $self->{'context'}->move_to($xx,$self->{'y'}); $self->{'context'}->line_to($xx,$y0); } $self->{'context'}->stroke(); } $self->{'context'}->show_page(); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Export/ods.pm000066400000000000000000001227451341176102400221230ustar00rootroot00000000000000# # Copyright (C) 2009-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Export::ods; use AMC::Basic; use AMC::Export; use Encode; use File::Spec; use Module::Load::Conditional qw/can_load/; use OpenOffice::OODoc; @ISA=("AMC::Export"); sub new { my $class = shift; my $self = $class->SUPER::new(); $self->{'out.nom'}=""; $self->{'out.code'}=""; $self->{'out.columns'}='student.key,student.name'; $self->{'out.font'}="Arial"; $self->{'out.stats'}=''; $self->{'out.statsindic'}=''; $self->{'out.groupsums'}=0; $self->{'out.groupsep'}=':'; if(can_load(modules=>{'Pango'=>undef,'Cairo'=>undef})) { debug "Using Pango/Cairo to compute column width"; $self->{'calc.Cairo'}=1; } bless ($self, $class); return $self; } sub load { my ($self)=@_; $self->SUPER::load(); $self->{'_capture'}=$self->{'_data'}->module('capture'); $self->{'_layout'}=$self->{'_data'}->module('layout'); } # returns the column width (in cm) to use when including the given texts. sub text_width { my ($self,$size,$title,@t)=@_; my $width=0; my $height=0; if($self->{'calc.Cairo'}) { my $font=Pango::FontDescription->from_string($self->{'out.font'}." ".(10*$size)); $font->set_stretch('normal'); my $surface = Cairo::ImageSurface->create('argb32', 10,10); my $cr = Cairo::Context->create($surface); my $layout = Pango::Cairo::create_layout($cr); $font->set_weight('bold'); $layout->set_font_description($font); $layout->set_text($title); ($width,$height)=$layout->get_pixel_size(); $font->set_weight('normal'); $layout->set_font_description($font); for my $text (@t) { $layout->set_text($text); my ($text_x,$text_y)=$layout->get_pixel_size(); $width=$text_x if($text_x>$width); $height=$text_y if($text_y>$height); } return( 0.002772 * $width + 0.019891 + 0.3, 0.002772 * $height + 0.019891); } else { $width=length($title); for my $text (@t) { $width=length($text) if(length($text)>$width); } return(0.22*$width+0.3,0.5); } } sub parse_num { my ($self,$n)=@_; if($self->{'out.decimal'} ne '.') { $n =~ s/\./$self->{'out.decimal'}/; } return($self->parse_string($n)); } sub parse_string { my ($self,$s)=@_; if($self->{'out.entoure'}) { $s =~ s/$self->{'out.entoure'}/$self->{'out.entoure'}$self->{'out.entoure'}/g; $s=$self->{'out.entoure'}.$s.$self->{'out.entoure'}; } return($s); } sub x2ooo { my ($x)=@_; my $c=''; my $d=int($x/26); $x=$x % 26; $c.=chr(ord("A")+$d-1) if($d>0); $c.=chr(ord("A")+$x); return($c); } sub yx2ooo { my ($y,$x,$fy,$fx)=@_; return(($fx ? '$' : '').x2ooo($x).($fy ? '$' : '').($y+1)); } sub subcolumn_range { my ($column,$a,$b)=@_; if($a==$b) { return("[.".$column.($a+1)."]"); } else { return("[.".$column.($a+1).":".".".$column.($b+1)."]"); } } sub subrow_range { my ($row,$a,$b)=@_; if($a==$b) { return("[.".x2ooo($a).($row+1)."]"); } else { return("[.".x2ooo($a).($row+1).":".".".x2ooo($b).($row+1)."]"); } } sub condensed { my ($range,$column,@lines)=@_; my @l=sort { $a <=> $b } @lines; my $debut=''; my $fin=''; my @sets=(); for my $i (@l) { if($debut) { if($i == $fin+1) { $fin=$i; } else { push @sets,&$range($column,$debut,$fin); $debut=$i; $fin=$i; } } else { $debut=$i; $fin=$i; } } push @sets,&$range($column,$debut,$fin); return(join(";",@sets)); } sub subcolumn_condensed { my ($column,@rows)=@_; return(condensed(\&subcolumn_range,$column,@rows)); } sub subrow_condensed { my ($row,@columns)=@_; return(condensed(\&subrow_range,$row,@columns)); } my %largeurs=(qw/ASSOC 4cm note 1.5cm total 1.2cm max 1cm heads 3cm/); my %style_col=(qw/student.key CodeA NOM General NOTE NoteF student.copy NumCopie TOTAL NoteQ GS NoteGS GSp NoteGSp MAX NoteQ HEAD General /); my %style_col_abs=(qw/NOTE General ID NoteX TOTAL NoteX MAX NoteX /); my %fonction_arrondi=(qw/i ROUNDDOWN n ROUND s ROUNDUP /); sub set_cell { my ($doc,$feuille,$jj,$ii,$abs,$x,$value,%oo)=@_; $doc->cellStyle($feuille,$jj,$ii, ($abs && $style_col_abs{$x} ? $style_col_abs{$x} : ($style_col{$x} ? $style_col{$x} : $style_col{'HEAD'}))); $value=encode('utf-8',$value) if($oo{'utf8'}); $doc->cellValueType($feuille,$jj,$ii,'float') if($oo{'numeric'} && !$abs); $doc->cellValueType($feuille,$jj,$ii,'percentage') if($oo{'pc'} && !$abs); if($oo{'formula'}) { $doc->cellFormula($feuille,$jj,$ii,$oo{'formula'}); } else { $doc->cellValue($feuille,$jj,$ii,$value); } } sub build_stats_table { my ($self,$direction,$cts,$correct_data,$doc,$stats,@q)=@_; my $vertical_flow=$direction =~ /^v/i; my %y_item=('all'=>2,'empty'=>3,'invalid'=>4); # TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the total number of sheets. Please let this label short. my %y_name=('all'=>__"ALL", # TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the number of sheets for which the question did not get an answer. Please let this label short. 'empty'=>__"NA", # TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the number of sheets for which the question got an invalid answer. Please let this label short. 'invalid'=>__"INVALID"); my %y_style=('empty'=>'qidE','invalid'=>'qidI'); my $n_answers=1+$#{$cts}; my $n_questions=1+$#q; if($vertical_flow) { $doc->expandTable($stats,6*$n_questions+$n_answers,5); } else { $doc->expandTable($stats,50,5*$n_questions); } my $ybase=0; my $x=0; $self->{_layout}->begin_read_transaction('Xods'); for my $q (@q) { # QUESTION HEADERS $doc->cellSpan($stats,$ybase,$x,4); $doc->cellStyle($stats,$ybase,$x, 'StatsQName'.(!$correct_data ? 'I' :'S')); $doc->cellValue($stats,$ybase,$x,encode('utf-8',$q->{'title'})); $doc->cellStyle($stats,$ybase+1,$x,'statCol'); # TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains the reference of the boxes. Please let this name short. $doc->cellValue($stats,$ybase+1,$x,encode('utf-8',__("Box"))); $doc->cellStyle($stats,$ybase+1,$x+1,'statCol'); # TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains the number of items (ticked boxes, or invalid or empty questions). Please let this name short. $doc->cellValue($stats,$ybase+1,$x+1,encode('utf-8',__("Nb"))); $doc->cellStyle($stats,$ybase+1,$x+2,'statCol'); # TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains percentage of questions for which the corresponding box is ticked over all questions. Please let this name short. $doc->cellValue($stats,$ybase+1,$x+2,encode('utf-8',__("/all"))); $doc->cellStyle($stats,$ybase+1,$x+3,'statCol'); # TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains percentage of questions for which the corresponding box is ticked over the expressed questions (counting only questions that did not get empty or invalid answers). Please let this name short. $doc->cellValue($stats,$ybase+1,$x+3,encode('utf-8',__("/expr"))); $doc->columnStyle($stats,$x+4,"col.Space"); # ANSWERS DATA my $amax=0; for my $counts (sort { $a->{'answer'} eq "0" ? 1 : $b->{'answer'} eq "0" ? -1 : 0 } grep { $_->{question} eq $q->{question} } @$cts) { my $ya=$y_item{$counts->{'answer'}}; my $name=$y_name{$counts->{'answer'}}; my $style=$y_style{$counts->{'answer'}}; if(!$ya) { if($counts->{'answer'}>0) { $amax=$counts->{'answer'} if($counts->{'answer'}>$amax); $ya=4+$counts->{'answer'}; $name=$self->{_layout}->char($q->{question},$counts->{answer}); $name=chr(ord("A")+$counts->{'answer'}-1) if(!defined($name) || $name eq ''); } else { $amax++; $ya=4+$amax; # TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the number of sheets for which the question got the "none of the above are correct" answer. Please let this label short. $name=__"NONE"; } } $doc->cellStyle($stats,$ybase+$ya,$x+1,'NumCopie'); $doc->cellValueType($stats,$ybase+$ya,$x+1,'float'); $doc->cellValue($stats,$ybase+$ya,$x+1,$counts->{'nb'}); $doc->cellStyle($stats,$ybase+$ya,$x,($style ? $style : 'General')); $doc->cellValue($stats,$ybase+$ya,$x,encode('utf-8',$name)); } # FORMULAS FOR EMPTY/INVALID for my $ya (3,4) { $doc->cellStyle($stats,$ybase+$ya,$x+2,'Qpc'); $doc->cellValueType($stats,$ybase+$ya,$x+2,'percentage'); $doc->cellFormula($stats,$ybase+$ya,$x+2, "oooc:=[.".yx2ooo($ybase+$ya,$x+1)."]/[." .yx2ooo($ybase+2,$x+1)."]"); } # FORMULAS FOR STANDARD ANSWERS for my $i (1..$amax) { my $yy=$ybase+4+$i; $doc->cellValueType($stats,$yy,$x+2,'percentage'); $doc->cellFormula($stats,$yy,$x+2, "oooc:=[.".yx2ooo($yy,$x+1)."]/[." .yx2ooo($ybase+2,$x+1)."]"); $doc->cellStyle($stats,$yy,$x+2,'Qpc'); $doc->cellValueType($stats,$yy,$x+3,'percentage'); $doc->cellFormula($stats,$yy,$x+3, "oooc:=[.".yx2ooo($yy,$x+1)."]/([." .yx2ooo($ybase+2,$x+1)."]-[." .yx2ooo($ybase+3,$x+1)."]-[." .yx2ooo($ybase+4,$x+1)."])"); $doc->cellStyle($stats,$yy,$x+3,'Qpc'); } # SETS COLOR FOR CORRECT OR NOT ANSWERS for my $c (grep { $_->{question} eq $q->{question} } @$correct_data) { my $ya=4+$c->{'answer'}; $ya=4+$amax if($c->{'answer'}==0); $doc->cellStyle($stats,$ybase+$ya,$x, $c->{'correct_max'}==0 ? 'qidW' : $c->{'correct_min'}==1 ? 'qidC' : 'qidX'); } # TRANSLATION... if($vertical_flow) { $ybase+=4+$amax+2; } else { $x+=5; } } $self->{_layout}->end_transaction('Xods'); } sub ods_locked_file { my ($self,$fichier)=@_; $fichier =~ s:([^/]+)$:.~lock.$1\#:; return(-e $fichier); } sub export { my ($self,$fichier)=@_; $self->pre_process(); $self->{'_scoring'}->begin_read_transaction('XODS'); my $rd=$self->{'_scoring'}->variable('rounding'); my $arrondi=''; if($rd =~ /^([ins])/i) { $arrondi=$fonction_arrondi{$1}; } elsif($rd) { debug "Unknown rounding type: $rd"; } my $grain=$self->{'_scoring'}->variable('granularity'); my $ndg=0; $grain =~ s/,/./; if($grain <= 0) { debug "Invalid grain=$grain: cancel rounding"; $grain=1; $arrondi=''; $ndg=3; } elsif(! $rd) { $ndg=3; } elsif($grain =~ /[.,]([0-9]*[1-9])/) { $ndg=length($1); } my $lk=$self->{'_assoc'}->variable('key_in_list'); my $notemin=$self->{'_scoring'}->variable('mark_floor'); my $plafond=$self->{'_scoring'}->variable('ceiling'); $notemin='' if($notemin =~ /[a-z]/i); my $la_date = odfLocaltime(); my $archive = odfContainer($fichier, create => 'spreadsheet', work_dir => File::Spec->tmpdir); my $doc=odfConnector(container => $archive, part => 'content', ); my $styles=odfConnector(container => $archive, part => 'styles', ); my %col_styles=(); $doc->createStyle('col.notes', family=>'table-column', properties=>{ -area=>'table-column', 'column-width' => "1cm", }, ); $col_styles{'notes'}=1; for(keys %largeurs) { $doc->createStyle('col.'.$_, family=>'table-column', properties=>{ -area=>'table-column', 'column-width' => $largeurs{$_}, }, ); $col_styles{$_}=1; } $styles->createStyle('DeuxDecimales', namespace=>'number', type=>'number-style', properties=>{ 'number:decimal-places'=>"2", 'number:min-integer-digits'=>"1", 'number:grouping'=>'true', # espace tous les 3 chiffres 'number:decimal-replacement'=>"", # n'ecrit pas les decimales nulles }, ); my $pc=$styles->createStyle('Percentage', namespace=>'number', type=>'percentage-style', properties=>{ 'number:decimal-places'=>"0", 'number:min-integer-digits'=>"1", }, ); $styles->appendElement($pc,'number:text','text'=>'%'); $styles->createStyle('NombreVide', namespace=>'number', type=>'number-style', properties=>{ 'number:decimal-places'=>"0", 'number:min-integer-digits'=>"0", 'number:grouping'=>'true', # espace tous les 3 chiffres 'number:decimal-replacement'=>"", # n'ecrit pas les decimales nulles }, ); $styles->createStyle('numNote', namespace=>'number', type=>'number-style', properties=>{ 'number:decimal-places'=>$ndg, 'number:min-integer-digits'=>"1", 'number:grouping'=>'true', # espace tous les 3 chiffres }, ); $styles->createStyle('Tableau', parent=>'Default', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:border'=>"0.039cm solid \#000000", # epaisseur trait / solid|double / couleur }, ); # General $styles->createStyle('General', parent=>'Tableau', family=>'table-cell', properties=>{ -area => 'paragraph', 'fo:text-align' => "start", 'fo:margin-left' => "0.1cm", }, 'references'=>{'style:data-style-name' => 'Percentage'}, ); # Qpc : pourcentage de reussite global pour une question $styles->createStyle('Qpc', parent=>'Tableau', family=>'table-cell', properties=>{ -area => 'paragraph', 'fo:text-align' => "center", }, 'references'=>{'style:data-style-name' => 'Percentage'}, ); # QpcGS : pourcentage de reussite global pour un groupe $styles->createStyle('QpcGS', parent=>'Qpc', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#c4eeba", }, ); # StatsQName : nom de question $styles->createStyle('StatsQName', parent=>'Tableau', family=>'table-cell', properties=>{ -area => 'paragraph', 'fo:text-align' => "center", }, ); $styles->updateStyle('StatsQName', properties=>{ -area=>'text', 'fo:font-weight'=>'bold', 'fo:font-size'=>"14pt", }, ); $styles->createStyle('StatsQNameS', 'parent'=>'StatsQName', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#c4ddff", }, ); $styles->createStyle('StatsQNameM', 'parent'=>'StatsQName', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#f5c4ff", }, ); $styles->createStyle('StatsQNameI', 'parent'=>'StatsQName', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#e6e6ff", }, ); $styles->createStyle('statCol', parent=>'Tableau', family=>'table-cell', properties=>{ -area => 'paragraph', 'fo:text-align' => "center", }, ); $styles->updateStyle('statCol', properties=>{ -area=>'text', 'fo:font-weight'=>'bold', }, ); $styles->createStyle('qidW', 'parent'=>'General', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#ffc8a0", }, ); $styles->createStyle('qidC', 'parent'=>'General', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#c9ffd1", }, ); $styles->createStyle('qidX', 'parent'=>'General', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#e2e2e2", }, ); $styles->createStyle('qidI', 'parent'=>'General', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#ffbaba", }, ); $styles->createStyle('qidE', 'parent'=>'General', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#ffff99", }, ); $doc->createStyle("col.Space", family=>'table-column', properties=>{ -area=>'table-column', 'column-width' => "4mm", }, ); # NoteQbase $styles->createStyle('NoteQbase', parent=>'Tableau', family=>'table-cell', properties=>{ -area => 'paragraph', 'fo:text-align' => "center", }, ); # NoteQ : note pour une question $styles->createStyle('NoteQ', parent=>'NoteQbase', family=>'table-cell', 'references'=>{'style:data-style-name' => 'DeuxDecimales'}, ); # NoteQp : note pour une question, en pourcentage $styles->createStyle('NoteQp', parent=>'NoteQbase', family=>'table-cell', 'references'=>{'style:data-style-name' => 'Percentage'}, ); # NoteV : note car pas de reponse $styles->createStyle('NoteV', parent=>'NoteQ', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#ffff99", }, 'references'=>{'style:data-style-name' => 'NombreVide'}, ); # NoteC : question annulee (par un allowempty) $styles->createStyle('NoteC', parent=>'NoteQ', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#b1e3e9", }, 'references'=>{'style:data-style-name' => 'NombreVide'}, ); # NoteE : note car erreur "de syntaxe" $styles->createStyle('NoteE', parent=>'NoteQ', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#ffbaba", }, 'references'=>{'style:data-style-name' => 'NombreVide'}, ); # NoteGS : score total pour un groupe $styles->createStyle('NoteGS', parent=>'NoteQbase', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#c4eeba", }, 'references'=>{'style:data-style-name' => 'DeuxDecimales'}, ); # NoteGSp : pourcentage global pour un groupe $styles->createStyle('NoteGSp', parent=>'NoteQbase', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#c4eeba", }, 'references'=>{'style:data-style-name' => 'Percentage'}, ); # NoteGSx : pourcentage maximal = 100% $styles->createStyle('NoteGSx', parent=>'NoteGSp', family=>'table-cell', properties=>{ -area=>'text', 'fo:font-size'=>"6pt", }, ); # NoteX : pas de note car la question ne figure pas dans cette copie la $styles->createStyle('NoteX', parent=>'Tableau', family=>'table-cell', properties=>{ -area => 'paragraph', 'fo:text-align' => "center", }, 'references'=>{'style:data-style-name' => 'NombreVide'}, ); $styles->updateStyle('NoteX', properties=>{ -area=>'table-cell', 'fo:background-color'=>"#b3b3b3", }, ); # CodeV : entree de AMCcode $styles->createStyle('CodeV', parent=>'Tableau', family=>'table-cell', properties=>{ -area => 'paragraph', 'fo:text-align' => "center", }, ); $styles->updateStyle('CodeV', properties=>{ -area=>'table-cell', 'fo:background-color'=>"#e6e6ff", }, ); # CodeA : code d'association $styles->createStyle('CodeA', parent=>'Tableau', family=>'table-cell', properties=>{ -area => 'paragraph', 'fo:text-align' => "center", }, ); $styles->updateStyle('CodeA', properties=>{ -area=>'table-cell', 'fo:background-color'=>"#ffddc4", }, ); # NoteF : note finale pour la copie $styles->createStyle('NoteF', parent=>'Tableau', family=>'table-cell', properties=>{ -area => 'paragraph', 'fo:text-align' => "right", }, 'references'=>{'style:data-style-name' => 'numNote'}, ); $styles->updateStyle('NoteF', properties=>{ -area=>'table-cell', 'fo:padding-right'=>"0.2cm", }, ); $styles->createStyle('Titre', parent=>'Default', family=>'table-cell', properties=>{ -area => 'text', 'fo:font-weight'=>'bold', 'fo:font-size'=>"16pt", }, ); $styles->createStyle('NumCopie', parent=>'Tableau', family=>'table-cell', properties=>{ -area => 'paragraph', 'fo:text-align' => "center", }, ); $styles->createStyle('Entete', parent=>'Default', family=>'table-cell', properties=>{ -area => 'table-cell', 'vertical-align'=>"bottom", 'horizontal-align' => "middle", 'fo:padding'=>'1mm', # espace entourant le contenu 'fo:border'=>"0.039cm solid \#000000", # epaisseur trait / solid|double / couleur }, ); $styles->updateStyle('Entete', properties=>{ -area => 'text', 'fo:font-weight'=>'bold', }, ); $styles->updateStyle('Entete', properties=>{ -area => 'paragraph', 'fo:text-align'=>"center", }, ); # EnteteVertical : en-tete, ecrit verticalement $styles->createStyle('EnteteVertical', parent=>'Entete', family=>'table-cell', properties=>{ -area => 'table-cell', 'style:rotation-angle'=>"90", }, ); # EnteteIndic : en-tete d'une question indicative $styles->createStyle('EnteteIndic', parent=>'EnteteVertical', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#e6e6ff", }, ); # EnteteGS : en-tete pour les groupes $styles->createStyle('EnteteGS', parent=>'EnteteVertical', family=>'table-cell', properties=>{ -area => 'table-cell', 'fo:background-color'=>"#c4eeba", }, ); my @student_columns=split(/,+/,$self->{'out.columns'}); my @codes; my @questions; $self->codes_questions(\@codes,\@questions,1); my @questions_0=grep { $_->{indic0} } @questions; my @questions_1=grep { $_->{indic1} } @questions; debug "Questions: ".join(', ',map { $_->{'question'}.'='.$_->{'title'} } @questions); debug "Questions PLAIN: ".join(', ',map { $_->{'title'} } @questions_0); debug "Questions INDIC: ".join(', ',map { $_->{'title'} } @questions_1); my $nq=1+$#student_columns+1+$#questions_0+1+$#questions_1; my $dimx=3+$nq+1+$#codes; my $dimy=6+1+$#{$self->{'marks'}}; my $feuille=$doc->getTable(0,$dimy,$dimx); $doc->expandTable($feuille, $dimy, $dimx); $doc->renameTable($feuille,encode('utf-8',($self->{'out.code'} ? $self->{'out.code'} : # TRANSLATORS: table name in the exported ODS spreadsheet for the table that contains the marks. __("Marks") ))); if($self->{'out.nom'}) { $doc->cellStyle($feuille,0,0,'Titre'); $doc->cellValue($feuille,0,0,encode('utf-8',$self->{'out.nom'})); } my $x0=0; my $x1=0; my $y0=2; my $y1=0; my $ii; my %code_col=(); my %code_row=(); my %col_cells=(); my %col_content=(); my $notemax; my $notenull; my $jj=$y0; my @titles=(); sub get_title { my ($o)=@_; my $t; if(ref($o) eq 'HASH') { $t=encode('utf-8',$o->{'title'}); } else { $t=encode('utf-8',$o); } push @titles,$t; return $t; } ########################################################################## # first row: titles ########################################################################## $ii=$x0; for(@student_columns, qw/note total max/) { $doc->cellStyle($feuille,$y0,$ii,'Entete'); $code_col{$_}=$ii; my $name=$_; $name="A:".encode('utf-8',$lk) if($name eq 'student.key'); $name=translate_column_title('nom') if($name eq 'student.name'); $name=translate_column_title('copie') if($name eq 'student.copy'); $col_content{$_}=[$name]; $doc->cellValue($feuille,$y0,$ii, encode('utf-8',$name)); $ii++; } $x1=$ii; for(@questions_0) { $doc->columnStyle($feuille,$ii,'col.notes'); $doc->cellStyle($feuille,$y0,$ii, ($_->{group_sum} ? 'EnteteGS' : 'EnteteVertical')); $doc->cellValue($feuille,$y0,$ii++,get_title($_)); } for(@questions_1) { $doc->columnStyle($feuille,$ii,'col.notes'); $doc->cellStyle($feuille,$y0,$ii,'EnteteIndic'); $doc->cellValue($feuille,$y0,$ii++,get_title($_)); } for(@codes) { $doc->cellStyle($feuille,$y0,$ii,'EnteteIndic'); $doc->cellValue($feuille,$y0,$ii++,get_title($_)); } ########################################################################## # optional row: null score ########################################################################## if($self->{'_scoring'}->variable('mark_null')!=0) { $jj++; $doc->cellSpan($feuille,$jj,$code_col{'total'},2); $doc->cellStyle($feuille,$jj,$code_col{'total'},'General'); $doc->cellValue($feuille,$jj,$code_col{'total'}, encode('utf-8',translate_id_name('null'))); $doc->cellStyle($feuille,$jj,$code_col{'note'},'NoteF'); $doc->cellValueType($feuille,$jj,$code_col{'note'},'float'); $doc->cellValue($feuille,$jj,$code_col{'note'}, $self->{'_scoring'}->variable('mark_null')); $notenull='[.'.yx2ooo($jj,$code_col{'note'},1,1).']'; $code_row{'null'}=$jj; } else { $notenull=''; } ########################################################################## # second row: maximum ########################################################################## $jj++; $doc->cellSpan($feuille,$jj,$code_col{'total'},2); $doc->cellStyle($feuille,$jj,$code_col{'total'},'General'); $doc->cellValue($feuille,$jj,$code_col{'total'}, encode('utf-8',translate_id_name('max'))); $doc->cellStyle($feuille,$jj,$code_col{'note'},'NoteF'); $doc->cellValueType($feuille,$jj,$code_col{'note'},'float'); $doc->cellValue($feuille,$jj,$code_col{'note'}, $self->{'_scoring'}->variable('mark_max')); $notemax='[.'.yx2ooo($jj,$code_col{'note'},1,1).']'; $ii=$x1; for(@questions_0) { if(defined($_->{group_sum})) { $ii++; } else { $doc->cellStyle($feuille,$jj,$ii,'NoteQ'); $doc->cellValueType($feuille,$jj,$ii,'float'); $doc->cellValue($feuille,$jj,$ii++, $self->{'_scoring'}->question_maxmax($_->{'question'})); } } $code_row{'max'}=$jj; ########################################################################## # third row: mean ########################################################################## $jj++; $doc->cellSpan($feuille,$jj,$code_col{'total'},2); $doc->cellStyle($feuille,$jj,$code_col{'total'},'General'); $doc->cellValue($feuille,$jj,$code_col{'total'}, encode('utf-8',translate_id_name('moyenne'))); $code_row{'average'}=$jj; ########################################################################## # following rows: students sheets ########################################################################## my @presents=(); my %scores; my @scores_columns; my %group_single=(); my $y1=$jj+1; for my $m (@{$self->{'marks'}}) { $jj++; # @presents collects the indices of the rows corresponding to # students that where present at the exam. push @presents,$jj if(!$m->{'abs'}); # for current student sheet, @score_columns collects the # indices of the columns where questions scores (only those # that are to be summed up to get the total student score, not # those from indicative questions) # are. $scores{$question_number} is set to one when a question # score is added to this list. %scores=(); @scores_columns=(); # first: special columns (association key, name, mark, sheet # number, total score, max score) $ii=$x0; for(@student_columns) { my $value=($m->{$_} ? $m->{$_} : $m->{'student.all'}->{$_}); push @{$col_content{$_}},$value; set_cell($doc,$feuille,$jj,$ii++, $m->{'abs'},$_, $value,'utf8'=>1); } if($m->{'abs'}) { set_cell($doc,$feuille,$jj,$ii,1, 'NOTE',$m->{'mark'}); } else { set_cell($doc,$feuille,$jj,$ii,0, 'NOTE','','numeric'=>1, 'formula'=>"oooc:=IF($notemax>0;" .($notemin ne '' ? "MAX($notemin;" : "") .($plafond ? "MIN($notemax;" : "") .($notenull ? $notenull."+" : "") ."$arrondi([." .yx2ooo($jj,$code_col{'total'}) ."]/[." .yx2ooo($jj,$code_col{'max'}) ."]*".($notenull ? "(".$notemax."-".$notenull.")" : $notemax)."/$grain)*$grain" .($plafond ? ")" : "") .($notemin ne '' ? ")" : "") .";" .($notemin ne '' ? "MAX($notemin;" : "") .($notenull ? $notenull."+" : "") ."$arrondi([." .yx2ooo($jj,$code_col{'total'}) ."]/$grain)*$grain" .($notemin ne '' ? ")" : "") .")"); } $ii++; $ii++; # see later for SUM column value... set_cell($doc,$feuille,$jj,$ii++,$m->{'abs'}, 'MAX',$m->{'max'},'numeric'=>1); # second: columns for all questions scores my @group_columns=(); my $group_maxsum=0; for my $q (@questions_0,@questions_1) { if($m->{'abs'}) { $doc->cellStyle($feuille,$jj,$ii,'NoteX'); } else { if(defined($q->{group_sum})) { # this is a group total column... if(@group_columns) { if(defined($group_single{$q->{group_sum}})) { $group_single{$q->{group_sum}}->{ok}=0 if($group_maxsum != $group_single{$q->{group_sum}}->{maxsum}); } else { $group_single{$q->{group_sum}}= {ii=>$ii,maxsum=>$group_maxsum,ok=>1}; } if($self->{'out.groupsums'}==2) { # as a percentage set_cell($doc,$feuille,$jj,$ii,$m->{'abs'}, 'GSp','',pc=>1, 'formula'=>"oooc:=SUM(".subrow_condensed($jj,@group_columns).")/".$group_maxsum); } else { # value set_cell($doc,$feuille,$jj,$ii,$m->{'abs'}, 'GS','',numeric=>1, 'formula'=>"oooc:=SUM(".subrow_condensed($jj,@group_columns).")"); } push @{$col_cells{$ii}},$jj; } else { $doc->cellStyle($feuille,$jj,$ii,'NoteX'); } @group_columns=(); $group_maxsum=0; } else { my $r=$self->{'_scoring'} ->question_result($m->{'student'},$m->{'copy'},$q->{'question'}); $doc->cellValueType($feuille,$jj,$ii,'float'); if($self->{'_scoring'}->indicative($m->{'student'},$q->{'question'})) { $doc->cellStyle($feuille,$jj,$ii,'CodeV'); } else { if(defined($r->{'score'})) { if(!$scores{$q->{'question'}}) { $scores{$q->{'question'}}=1; push @scores_columns,$ii; push @{$col_cells{$ii}},$jj; if($q->{group}) { push @group_columns,$ii; $group_maxsum+=$r->{max}; } if($r->{'why'} =~ /c/i) { $doc->cellStyle($feuille,$jj,$ii,'NoteC'); } elsif($r->{'why'} =~ /v/i) { $doc->cellStyle($feuille,$jj,$ii,'NoteV'); } elsif($r->{'why'} =~ /e/i) { $doc->cellStyle($feuille,$jj,$ii,'NoteE'); } else { $doc->cellStyle($feuille,$jj,$ii,'NoteQ'); } } else { $doc->cellStyle($feuille,$jj,$ii,'NoteX'); } } else { $doc->cellStyle($feuille,$jj,$ii,'NoteX'); } } $doc->cellValue($feuille,$jj,$ii,$r->{'score'}); } } $ii++; } # third: codes values for(@codes) { $doc->cellStyle($feuille,$jj,$ii,'CodeV'); $doc->cellValue($feuille,$jj,$ii++, $self->{'_scoring'} ->student_code($m->{'student'},$m->{'copy'},$_)); } # come back to add sum of the scores set_cell($doc,$feuille,$jj,$code_col{'total'},$m->{'abs'}, 'TOTAL','','numeric'=>1, 'formula'=>"oooc:=SUM(".subrow_condensed($jj,@scores_columns).")"); } ########################################################################## # back to row for means ########################################################################## $ii=$x1; for my $q (@questions_0) { $doc->cellStyle($feuille,$code_row{'average'},$ii,'Qpc'); $doc->cellFormula($feuille,$code_row{'average'},$ii, "oooc:=AVERAGE(" .subcolumn_condensed(x2ooo($ii),@{$col_cells{$ii}}) .")/[.".yx2ooo($code_row{'max'},$ii)."]"); $ii++; } $doc->cellStyle($feuille,$code_row{'average'},$code_col{'note'},'NoteF'); $doc->cellFormula($feuille,$code_row{'average'},$code_col{'note'}, "oooc:=AVERAGE(" .subcolumn_condensed(x2ooo($code_col{'note'}),@presents).")"); $self->{'_scoring'}->end_transaction('XODS'); ########################################################################## # back to row for groups max ########################################################################## for my $g (keys %group_single) { my $j0=$code_row{'max'}; my $i0=$group_single{$g}->{ii}; if($self->{'out.groupsums'}==2) { # for each student, percentages are reported, so that maximal # value is 100% $doc->cellStyle($feuille,$j0,$i0,'NoteGSx'); $doc->cellValueType($feuille,$j0,$i0,'percentage'); $doc->cellValue($feuille,$j0,$i0,1); $doc->cellStyle($feuille,$code_row{'average'},$i0,'QpcGS'); } elsif($group_single{$g}->{ok}) { $doc->cellStyle($feuille,$j0,$i0,'NoteGS'); $doc->cellValueType($feuille,$j0,$i0,'float'); $doc->cellValue($feuille,$j0,$i0,$group_single{$g}->{maxsum}); $doc->cellStyle($feuille,$code_row{'average'},$i0,'QpcGS'); } else { $doc->cellStyle($feuille,$j0,$i0,'NoteX'); $doc->cellStyle($feuille,$code_row{'average'},$i0,'NoteX'); } } ########################################################################## # try to set right column width ########################################################################## for(@student_columns) { if($col_styles{$_}) { $doc->columnStyle($feuille,$code_col{$_},"col.".$col_styles{$_}); } else { my ($cm,$cmh)=$self->text_width(10,@{$col_content{$_}}); debug "Column width [$_] = $cm cm"; $doc->createStyle("col.X.$_", family=>'table-column', properties=>{ -area=>'table-column', 'column-width' => $cm."cm", }, ); $doc->columnStyle($feuille,$code_col{$_},"col.X.$_"); } } ########################################################################## # try to set right line height for titles ########################################################################## { my ($cm,$cmh)=$self->text_width(10,@titles); debug "Titles height = $cm cm"; $doc->createStyle("row.Titles", family=>'table-row', properties=>{ -area=>'table-row', 'row-height' => $cm."cm", 'use-optimal-row-height'=>"false", }, ); $doc->rowStyle($feuille,$y0,"row.Titles"); ($cm,$cmh)=$self->text_width(16,encode('utf-8',$self->{'out.nom'})); debug "Name height = $cmh cm"; $doc->createStyle("row.Head", family=>'table-row', properties=>{ -area=>'table-row', 'row-height' => $cmh."cm", 'use-optimal-row-height'=>"false", }, ); $doc->rowStyle($feuille,0,"row.Head"); } ########################################################################## # tables for questions basic statistics ########################################################################## my ($dt,$cts,$man,$correct_data); if($self->{'out.stats'} || $self->{'out.statsindic'}) { $self->{'_scoring'}->begin_read_transaction('XsLO'); $dt=$self->{'_scoring'}->variable('darkness_threshold'); $dtu=$self->{'_scoring'}->variable('darkness_threshold_up'); # comming back to old projects, the darkness_threshold_up was # not stored but now we need a value: use the default value 1 # (which produces the same behavior as when it was not defined). $dtu=1 if(!defined($dtu)); $cts=$self->{'_capture'}->ticked_sums($dt,$dtu); $man=$self->{'_capture'}->max_answer_number(); $correct_data=$self->{'_scoring'}->correct_for_all if($self->{'out.stats'}); $self->{'_scoring'}->end_transaction('XsLO'); } if($self->{'out.stats'}) { # TRANSLATORS: Label of the table with questions basic statistics in the exported ODS spreadsheet. my $stats_0=$doc->appendTable(encode('utf-8',__("Questions statistics"))); $self->build_stats_table($self->{'out.stats'},$cts,$correct_data,$doc,$stats_0,@questions_0); } if($self->{'out.statsindic'}) { # TRANSLATORS: Label of the table with indicative questions basic statistics in the exported ODS spreadsheet. my $stats_1=$doc->appendTable(encode('utf-8',__("Indicative questions statistics"))); $self->build_stats_table($self->{'out.statsindic'},$cts,0,$doc,$stats_1,@questions_1); } ########################################################################## # Legend table ########################################################################## # TRANSLATORS: Label of the table with a legend (explaination of the colors used) in the exported ODS spreadsheet. my $legend=$doc->appendTable(encode('utf-8',__("Legend")),9,2); $doc->cellSpan($legend,0,0,2); $doc->cellStyle($legend,0,0,'Titre'); $doc->cellValue($legend,0,0,encode('utf-8',__("Legend"))); $jj=2; $doc->cellStyle($legend,$jj,0,'NoteX'); # TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that have not been asked to some students. $doc->cellValue($legend,$jj,1,encode('utf-8',__("Non applicable"))); $jj++; $doc->cellStyle($legend,$jj,0,'NoteV'); # TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that have not been answered. $doc->cellValue($legend,$jj,1,encode('utf-8',__("No answer"))); $jj++; $doc->cellStyle($legend,$jj,0,'NoteC'); # TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that have not been answered, but are cancelled by the use of allowempty scoring strategy. $doc->cellValue($legend,$jj,1,encode('utf-8',__("Cancelled"))); $jj++; $doc->cellStyle($legend,$jj,0,'NoteE'); # TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that got an invalid answer. $doc->cellValue($legend,$jj,1,encode('utf-8',__("Invalid answer"))); $jj++; if($self->{'out.stats'}) { $doc->cellStyle($legend,$jj,0,'qidC'); # TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that got an invalid answer. $doc->cellValue($legend,$jj,1,encode('utf-8',__("Correct answer"))); $jj++; $doc->cellStyle($legend,$jj,0,'qidW'); # TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that got an invalid answer. $doc->cellValue($legend,$jj,1,encode('utf-8',__("Wrong answer"))); $jj++; } $doc->cellStyle($legend,$jj,0,'CodeV'); # TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the indicative questions. $doc->cellValue($legend,$jj,1,encode('utf-8',__("Indicative"))); $jj++; $doc->createStyle("col.X.legend", family=>'table-column', properties=>{ -area=>'table-column', 'column-width' => "6cm", }, ); $doc->columnStyle($legend,1,"col.X.legend"); ########################################################################## # set meta-data and write to file ########################################################################## my $meta = odfMeta(container => $archive); $meta->title(encode('utf-8',$self->{'out.nom'})); $meta->subject(''); $meta->creator($ENV{'USER'}); $meta->initial_creator($ENV{'USER'}); $meta->creation_date($la_date); $meta->date($la_date); $archive->save; if($self->ods_locked_file($fichier)) { $self->add_message('INFO',__("An old state of the exported file seems to be already opened. Use File/Reload from OpenOffice/LibreOffice to refresh.")); } } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Export/register.pm000066400000000000000000000026011341176102400231460ustar00rootroot00000000000000# # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Export::register; sub new { my $class = shift; my $self={}; bless ($self, $class); return $self; } sub name { return("empty"); } sub extension { return('.xxx'); } sub type { my ($self)=@_; my $ext=$self->extension(); $ext =~ s/^.*\.//; return($ext); } sub options_from_config { my ($self,$config)=@_; return(); } sub needs_catalog { my ($self,$config)=@_; return(0); } sub options_default { return(); } sub needs_module { return(); } sub build_config_gui { my ($self,$w,$prefs)=@_; } sub hide { return('standard_export_options'=>0); } sub weight { return(1); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Export/register/000077500000000000000000000000001341176102400226115ustar00rootroot00000000000000auto-multiple-choice-1.4.0/AMC-perl/AMC/Export/register/CSV.pm000066400000000000000000000055461341176102400236140ustar00rootroot00000000000000# # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Export::register::CSV; use AMC::Export::register; use AMC::Basic; use AMC::Gui::Prefs; @ISA=("AMC::Export::register"); sub new { my $class = shift; my $self = $class->SUPER::new(); bless ($self, $class); return $self; } sub name { return('CSV'); } sub extension { return('.csv'); } sub options_from_config { my ($self,$config)=@_; my $enc=$config->get("encodage_csv") || $config->get("defaut_encodage_csv") || "UTF-8"; return(encodage=>$enc, columns=>$config->get('export_csv_columns'), decimal=>$config->get('delimiteur_decimal'), separateur=>$config->get('export_csv_separateur'), ticked=>$config->get('export_csv_ticked'), ); } sub options_default { return(export_csv_separateur=>";", export_csv_ticked=>'', export_csv_columns=>'student.copy,student.key,student.name', ); } sub build_config_gui { my ($self,$w,$prefs)=@_; my $t=Gtk3::Grid->new(); my $widget; my $y=0; my $renderer; $t->attach(Gtk3::Label->new(__"Separator"), 0,$y,1,1); $widget=Gtk3::ComboBox->new(); $renderer = Gtk3::CellRendererText->new(); $widget->pack_start($renderer, TRUE); $widget->add_attribute($renderer,'text',COMBO_TEXT); $prefs->store_register('export_csv_separateur'=>cb_model("TAB"=>'', ";"=>";", ","=>",")); $w->{'export_c_export_csv_separateur'}=$widget; $t->attach($widget,1,$y,1,1); $y++; $t->attach(Gtk3::Label->new(__"Ticked boxes"), 0,$y,1,1); $widget=Gtk3::ComboBox->new(); $renderer = Gtk3::CellRendererText->new(); $widget->pack_start($renderer, TRUE); $widget->add_attribute($renderer,'text',COMBO_TEXT); $prefs->store_register('export_csv_ticked'=>cb_model(""=>__"No", "01"=>(__"Yes:")." 0;0;1;0", "AB"=>(__"Yes:")." AB", )); $w->{'export_c_export_csv_ticked'}=$widget; $t->attach($widget,1,$y,1,1); $y++; $widget=Gtk3::Button->new_with_label(__"Choose columns"); $widget->signal_connect(clicked => \&main::choose_columns_current); $t->attach($widget,0,$y,2,1); $y++; $t->show_all; return($t); } sub weight { return(.9); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Export/register/List.pm000066400000000000000000000047231341176102400240700ustar00rootroot00000000000000# # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Export::register::List; use AMC::Export::register; use AMC::Basic; use AMC::Gui::Prefs; @ISA=("AMC::Export::register"); sub new { my $class = shift; my $self = $class->SUPER::new(); bless ($self, $class); return $self; } sub name { # TRANSLATORS: List of students with their scores: one of the export formats. return(__("PDF list")); } sub extension { return('.pdf'); } sub options_from_config { my ($self,$config)=@_; return("nom"=>$config->get('nom_examen'), "code"=>$config->get('code_examen'), "decimal"=>$config->get('delimiteur_decimal'), "pagesize"=>$config->get('export_pagesize'), "ncols"=>$config->get('export_ncols'), ); } sub options_default { return('export_ncols'=>2, 'export_pagesize'=>'a4'); } sub build_config_gui { my ($self,$w,$prefs)=@_; my $t=Gtk3::Grid->new(); my $widget; my $y=0; $t->attach(Gtk3::Label->new(__"Number of columns"), 0,$y,1,1); $widget=Gtk3::SpinButton->new(Gtk3::Adjustment->new(1,1,5,1,1,0),0,0); $widget->set_tooltip_text(__"Long list is divided into this number of columns on each page."); $w->{'export_s_export_ncols'}=$widget; $t->attach($widget,1,$y,1,1); $y++; $t->attach(Gtk3::Label->new(__"Paper size"), 0,$y,1,1); $widget=Gtk3::ComboBox->new(); my $renderer = Gtk3::CellRendererText->new(); $widget->pack_start($renderer, TRUE); $widget->add_attribute($renderer,'text',COMBO_TEXT); $prefs->store_register('export_pagesize'=>cb_model("a3"=>"A3", "a4"=>"A4", "letter"=>"Letter", "legal"=>"Legal")); $w->{'export_c_export_pagesize'}=$widget; $t->attach($widget,1,$y,1,1); $y++; $t->show_all; return($t); } sub weight { return(.5); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Export/register/ods.pm000066400000000000000000000146541341176102400237460ustar00rootroot00000000000000# # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Export::register::ods; use AMC::Export::register; use AMC::Basic; use AMC::Gui::Prefs; @ISA=("AMC::Export::register"); sub new { my $class = shift; my $self = $class->SUPER::new(); bless ($self, $class); return $self; } sub name { return('OpenOffice'); } sub extension { return('.ods'); } sub options_from_config { my ($self,$config)=@_; return("columns"=>$config->get('export_ods_columns'), "nom"=>$config->get('nom_examen'), "code"=>$config->get('code_examen'), "stats"=>$config->get('export_ods_stats'), "statsindic"=>$config->get('export_ods_statsindic'), "groupsums"=>$config->get('export_ods_group'), "groupsep"=>$config->get('export_ods_groupsep'), ); } sub needs_catalog { my ($self,$config)=@_; return($config->get('export_ods_stats') || $config->get('export_ods_statsindic')); } sub options_default { return('export_ods_columns'=>'student.copy,student.key,student.name', 'export_ods_stats'=>'', 'export_ods_statsindic'=>'', 'export_ods_group'=>'0', 'export_ods_groupsep'=>':', ); } sub needs_module { return('OpenOffice::OODoc'); } sub build_config_gui { my ($self,$w,$prefs)=@_; my $t=Gtk3::Grid->new(); my $widget; my $renderer; my $y=0; # TRANSLATORS: Check button label in the exports tab. If checked, a table with questions basic statistics will be added to the ODS exported spreadsheet. $t->attach(Gtk3::Label->new(__"Stats table"), 0,$y,1,1); $widget=Gtk3::ComboBox->new(); $renderer = Gtk3::CellRendererText->new(); $widget->pack_start($renderer, TRUE); $widget->add_attribute($renderer,'text',COMBO_TEXT); # TRANSLATORS: Menu to export statistics table in the exports tab. The first menu entry means 'do not build a stats table' in the exported ODS file. You can omit the [...] part, that is here only to state the context. $prefs->store_register('export_ods_stats'=>cb_model(""=>__p("None [no stats table to export]"), # TRANSLATORS: Menu to export statistics table in the exports tab. The second menu entry means 'build a stats table, with a horizontal flow' in the exported ODS file. "h"=>__("Horizontal flow"), # TRANSLATORS: Menu to export statistics table in the exports tab. The second menu entry means 'build a stats table, with a vertical flow' in the exported ODS file. "v"=>__("Vertical flow"))); $w->{'export_c_export_ods_stats'}=$widget; $t->attach($widget,1,$y,1,1); $y++; # TRANSLATORS: Check button label in the exports tab. If checked, a table with indicative questions basic statistics will be added to the ODS exported spreadsheet. $t->attach(Gtk3::Label->new(__"Indicative stats table"), 0,$y,1,1); $widget=Gtk3::ComboBox->new(); $renderer = Gtk3::CellRendererText->new(); $widget->pack_start($renderer, TRUE); $widget->add_attribute($renderer,'text',COMBO_TEXT); $prefs->store_register('export_ods_statsindic'=>cb_model(""=>__"None", "h"=>__"Horizontal flow", "v"=>__"Vertical flow")); $w->{'export_c_export_ods_statsindic'}=$widget; $t->attach($widget,1,$y,1,1); $widget->set_tooltip_text(__"Create a table with basic statistics about answers for each indicative question?"); $y++; # TRANSLATORS: Check button label in the exports tab. If checked, sums of the scores for groups of questions will be added to the exported table. $t->attach(Gtk3::Label->new(__"Score groups"), 0,$y,1,1); my $w_groups=Gtk3::Grid->new(); $widget=Gtk3::ComboBox->new(); $renderer = Gtk3::CellRendererText->new(); $widget->pack_start($renderer, TRUE); $widget->add_attribute($renderer,'text',COMBO_TEXT); # TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'No, don't group questions by scope in the exported ODS file' $prefs->store_register('export_ods_group'=>cb_model("0"=>__"No", # TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'Yes, group questions by scope in the exported ODS file, and report total scores' "1"=>__"Yes (values)", # TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'Yes, group questions by scope in the exported ODS file, and report total scores as percentages.' "2"=>__"Yes (percentages)")); $w->{'export_c_export_ods_group'}=$widget; $widget->set_tooltip_text(__"Add sums of the scores for each question group?"); $w_groups->attach($widget,0,0,1,1); $w_groups->attach(Gtk3::Label->new(" ".(__"with scope separator")." "),1,0,1,1); $widget=Gtk3::ComboBox->new(); $renderer = Gtk3::CellRendererText->new(); $widget->pack_start($renderer, TRUE); $widget->add_attribute($renderer,'text',COMBO_TEXT); # TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'No, don't group questions by scope in the exported ODS file' $prefs->store_register('export_ods_groupsep'=>cb_model(":"=>__"':'", # TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'Yes, group questions by scope in the exported ODS file, and you can detect the scope from a question ID using the text before the separator .' "."=>__"'.'")); $w->{'export_c_export_ods_groupsep'}=$widget; $widget->set_tooltip_text(__"To define groups, use question ids in the form \"group:question\" or \"group.question\", depending on the scope separator."); $w_groups->attach($widget,2,0,1,1); $t->attach($w_groups,1,$y,1,1); $y++; my $b=Gtk3::Button->new_with_label(__"Choose columns"); $b->signal_connect(clicked => \&main::choose_columns_current); $t->attach($b,0,$y,2,1); $y++; $t->show_all; return($t); } sub weight { return(.2); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/FileMonitor.pm000066400000000000000000000050751341176102400223000ustar00rootroot00000000000000# -*- perl -*- # # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::FileMonitor; sub new { my ($class,%o)=(@_); my $self= { deltat=>1, }; for my $k (keys %o) { $self->{$k}=$o{$k} if(defined($self->{$k})); } $self->{files}=[]; $self->{timeout_id}=0; bless($self,$class); return($self); } sub add_file { my ($self,$path,$callout,%oo)=@_; push @{$self->{files}}, {path=>$path, callout=>$callout, time=>$self->get_change_time($path), %oo} if($path); $self->start(); } sub key_i { my ($self,$key,$value)=@_; if(@{$self->{files}}) { for my $i (0..$#{$self->{files}}) { return($i) if($self->{files}->[$i]->{$key} eq $value); } return(undef); } else { return(undef); } } sub remove_file { my ($self,$path)=@_; $self->remove_key('file',$path); } sub remove_key { my ($self,$key,$value)=@_; my $i=$self->key_i($key,$value); if(defined($i)) { splice(@{$self->{files}},$i,1); $self->stop if(!@{$self->{files}}); } } sub update_file { my ($self,$path)=@_; my $i=$self->file_i($path); if(defined($i)) { $self->{files}->[$i]->{time}=$self->get_change_time($path); } } sub get_change_time { my ($self,$path)=@_; if(-e $path) { my @st=stat($path); return($st[10]); } else { return(0); } } sub start { my ($self)=@_; if(@{$self->{files}}) { if(!$self->{timeout_id}) { $self->{timeout_id}=Glib::Timeout ->add_seconds($self->{deltat},\&monitor,$self); } } } sub stop { my ($self)=@_; Glib::Source->remove($self->{timeout_id}); $self->{timeout_id}=0; } sub monitor { my ($self)=@_; for my $f (@{$self->{files}}) { my $t=$self->get_change_time($f->{path}); if($t>$f->{time}) { $f->{time}=$t if(! $f->{repeat}); &{$f->{callout}}() if($f->{callout}); } } return(1); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Filter.pm000066400000000000000000000037641341176102400213010ustar00rootroot00000000000000# # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Filter; sub new { my ($class,%o) = @_; my $self={'errors'=>[], 'project_options'=>{}, 'filter_results'=>{}, 'jobname'=>'', 'jobspecific'=>'', }; for my $k (keys %o) { $self->{$k}=$o{$k} if(defined($self->{$k})); } bless ($self, $class); return $self; } sub clear { my ($self)=@_; $self->{'errors'}=[]; } sub error { my ($self,$error_text)=@_; push @{$self->{'errors'}},$error_text; } sub errors { my ($self)=@_; return(@{$self->{'errors'}}); } sub pre_filter { my ($self,$input_file)=@_; } sub filter { my ($self,$input_file,$output_file)=@_; } ##################################################################### # The following methods should NOT be overwritten ##################################################################### sub set_project_option { my ($self,$name,$value)=@_; $self->{'project_options'}->{$name}=$value; print "VAR: project:$name=$value\n"; } sub set_filter_result { my ($self,$name,$value)=@_; $self->{'filter_results'}->{$name}=$value; } sub get_filter_result { my ($self,$name)=@_; return($self->{'filter_results'}->{$name}); } sub unchanged { my ($self)=@_; return($self->get_filter_result('unchanged')); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Filter/000077500000000000000000000000001341176102400207315ustar00rootroot00000000000000auto-multiple-choice-1.4.0/AMC-perl/AMC/Filter/latex.pm000066400000000000000000000052241341176102400224070ustar00rootroot00000000000000# # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Filter::latex; use AMC::Basic; use AMC::Filter; use Cwd; use File::Spec::Functions qw/splitpath catpath splitdir catdir catfile rel2abs tmpdir/; use File::Copy; use Text::ParseWords; @ISA=("AMC::Filter"); sub new { my $class = shift; my $self = $class->SUPER::new(@_); bless ($self, $class); return $self; } sub pre_filter { my ($self,$input_file)=@_; # first of all, look in the source file header if there are some # AMC options $self->{options}={}; open(INPUT,$input_file); LINE: while() { if(/^[%]{2}AMC:\s*([a-zA-Z0-9_-]+)\s*=\s*(.*)/) { $self->{options}->{$1}=$2; } last LINE if(!/^%/); } close(INPUT); print STDERR "Options : ".join(' ',keys %{$self->{options}})."\n"; # pass some of these options to AMC project configuration $self->set_project_option('moteur_latex_b',$self->{options}->{'latex_engine'}) if($self->{options}->{'latex_engine'}); $self->set_filter_result('jobspecific',1) if($self->{options}->{jobspecific}); $self->set_filter_result('unchanged',1) if(!$self->{options}->{'preprocess_command'}); } sub filter { my ($self,$input_file,$output_file)=@_; # exec preprocess command if needed if($self->{options}->{'preprocess_command'}) { # copy the file, unchanged copy($input_file,$output_file); # exec preprocess command, that may modify this file my ($fxa,$fxb,$f) = splitpath($output_file); my @cmd=quotewords('\s+',0,$self->{options}->{'preprocess_command'}); $cmd[0]="./".$cmd[0] if($cmd[0] && $cmd[0] !~ m:/:); push @cmd,$f; my $cwd=getcwd; chdir(catpath($fxa,$fxb,'')); debug_and_stderr "Working directory: ".getcwd; debug_and_stderr "Calling preprocess command: ".join(' ',@cmd); $ENV{AMC_JOBNAME}=$self->{jobname}; if(system(@cmd)!=0) { debug_and_stderr("Preprocess command call failed: [$?] $!"); } chdir($cwd); } } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Filter/plain.pm000066400000000000000000001077731341176102400224110ustar00rootroot00000000000000# # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Filter::plain; use AMC::Filter; use AMC::Basic; use File::Spec; use Data::Dumper; use utf8; @ISA=("AMC::Filter"); use_gettext; sub new { my $class = shift; my $self = $class->SUPER::new(); # list of available global options: $self->{'options_names'}=[qw/Title Presentation Code Lang Font BoxColor PaperSize AnswerSheetTitle AnswerSheetPresentation AnswerSheetColumns CompleteMulti SeparateAnswerSheet AutoMarks DefaultScoringM DefaultScoringS L-Question L-None L-Name L-Student LaTeX LaTeX-Preambule LaTeX-BeginDocument LaTeXEngine xltxtra ShuffleQuestions Columns QuestionBlocks Arabic ArabicFont Disable ManualDuplex SingleSided L-OpenText L-OpenReserved CodeDigitsDirection PackageOptions NameFieldWidth NameFieldLines NameFieldLinespace TitleWidth Pages RandomSeed /]; # from these options, which ones are boolean valued? $self->{'options_boolean'}=[qw/LaTeX xltxtra ShuffleQuestions QuestionBlocks CompleteMulti SeparateAnswerSheet AutoMarks Arabic ManualDuplex SingleSided /]; # current groups list $self->{'groups'}=[]; # global LaTeX definitions $self->{latex_defs}=[]; # packages needed $self->{packages}={}; # maximum of digits that a hrizontal code can handle $self->{'maxhorizcode'}=6; # options values $self->{'options'}={}; # default values for options: $self->{'default_options'}= {'latexengine'=>'xelatex','xltxtra'=>1, 'questionblocks'=>1,'shufflequestions'=>1, 'completemulti'=>1, 'font'=>'Linux Libertine O', 'arabicfont'=>'Rasheeq', 'implicitdefaultscoringm'=>'haut=2', 'l-name'=>'', 'l-student'=>__("Please code your student number opposite, and write your name in the box below."), 'disable'=>'', 'manualduplex'=>'', 'singlesided'=>'', 'codedigitsdirection'=>'', 'namefieldwidth'=>'', 'namefieldlines'=>'', 'namefieldlinespace'=>'.5em', 'titlewidth'=>".47\\linewidth", 'randomseed'=>"1527384", }; # List of modules to be used when parsing (see parse_* # corresponding methods for implementation). Modules in the # Disable global option won't be used. $self->{'parse_modules'}=['verbatim','local_latex','images','embf','title','text']; # current question number among questions for which no ID is given # in the source $self->{'qid'}=0; bless ($self, $class); return $self; } # arabic default localisation texts my %l_arabic=('l-question'=>'السؤال', 'l-none'=>'لا توجد اجابة صحيحة', ); # arabic alphabet to replace letters ABCDEF... in the boxes my @alphabet_arabic=('أ','ب','ج','د','ه','و','ز','ح','ط','ي','ك','ل', 'م','ن','س','ع','ف','ص','ق','ر','ش','ت','ث','خ', 'ذ','ض','ظ','غ', ); # add a global LaTeX definition sub add_global_latex_def { my ($self,$tex)=@_; push @{$self->{latex_defs}},$tex; } # require a specific LaTeX package, with options in the form # needs_package("geometry","margins"=>'1cm',"noheadfoot"=>'') sub needs_package { my ($self,$package,%options)=@_; $self->{packages}->{$package}={} if(!defined($self->{packages}->{$package})); for my $o (keys %options) { $self->{packages}->{$package}->{$o}=$options{$o}; } } # parse boolean options to get 0 (from empty value, "NO" or " FALSE") # or 1 (from other values). sub parse_bool { my ($b)=@_; if($b =~ /^\s*(no|false|0)\s*$/i) { return(0); } else { return($b); } } sub first_defined { for(@_) { return($_) if(defined($_)); } } # transforms the list of current options values to make it coherent sub parse_options { my ($self)=@_; # boolean options are parsed to get 0 or 1 for my $n (@{$self->{'options_boolean'}}) { $self->{'options'}->{lc($n)}=parse_bool($self->{'options'}->{lc($n)}); } # if AR language is selected, apply default arabic localisation # options and set 'arabic' option to 1 if($self->{'options'}->{'lang'} eq 'AR') { for (keys %l_arabic) { $self->{'options'}->{$_}=$l_arabic{$_} if(!$self->{'options'}->{$_}); } $self->{'options'}->{'arabic'}=1; } # if JA language is selected, switch to 'platex+dvipdf' LaTeX # engine, remove default font and don't use xltxtra LaTeX package if($self->{'options'}->{'lang'} eq 'JA') { $self->{'default_options'}->{'latexengine'}='platex+dvipdf'; $self->{'default_options'}->{'font'}=''; $self->{'default_options'}->{'xltxtra'}=''; } # set options values to default if not defined in the source for my $k (keys %{$self->{'default_options'}}) { $self->{'options'}->{$k}=$self->{'default_options'}->{$k} if(!defined($self->{'options'}->{$k})); } # relay LaTeX engine option to the project itself $self->set_project_option('moteur_latex_b', $self->{'options'}->{'latexengine'}); # split Pages option to pages_question and/or pages_total if($self->{options}->{pages}) { if($self->{options}->{separateanswersheet} && $self->{options}->{pages} =~ /^\s*([0-9]*)\s*\+\s*([0-9]*)\s*$/) { my $a=$1 || 0; my $b=$2 || 0; $self->{options}->{pages_question}=$a; $self->{options}->{pages_total}=$a+$b; } elsif($self->{options}->{pages} =~ /^\s*([0-9]+)\s*$/) { $self->{options}->{pages_total}=$1; } else { # TRANSLATORS: Message when the Pages option used in AMC-TXT can't be parsed. %s will be replaced with the option value $self->error(sprintf(__"Pages option value can't be understood: %s",$self->{options}->{pages})); } } } # adds an object (hash) to a container (list) and returns the # corresponding new hashref sub add_object { my ($container,%object)=@_; push @$container,{%object}; return($container->[$#$container]); } # adds a group to current state sub add_group { my ($self,%g)=@_; add_object($self->{'groups'},%g); } # cleanup for text: removes leading and trailing spaces sub value_cleanup { my ($self,$v)=@_; $$v =~ s/^\s+//; $$v =~ s/\s+$//; } # issue an AMC-TXT (syntax) error to be shown by the GUI sub parse_error { my ($self,$text)=@_; $self->error("AMC-TXT(".sprintf(__('Line %d'),$.).") ".$text); } # check that a set of answers for a given question is coherent: one # need more than one answer, and a simple question needs one and only # one correct answer. sub check_answers { my ($self,$question)=@_; if($question) { if($#{$question->{'answers'}}<1) { # TRANSLATORS: Error text for AMC-TXT parsing, when opening a new question whereas the previous question has less than two choices $self->parse_error(__"Previous question has less than two choices"); } else { my $n_correct=0; for my $a (@{$question->{'answers'}}) { $n_correct++ if($a->{'correct'}); } if(!($question->{'multiple'} || $question->{'indicative'})) { if($n_correct!=1) { # TRANSLATORS: Error text for AMC-TXT parsing $self->parse_error(sprintf(__("Previous question is a simple question but has %d correct choice(s)"),$n_correct)); } } } } } sub group_by_id { my ($self,$id,%oo)=@_; my $group=''; if($id) { GROUPS: for(@{$self->{groups}}) { if($_->{id} eq $id) { $group=$_ ; last GROUPS; } } } else { $id='unnamed'.$self->unused_letter(); } if(!$group) { $group=$self->add_group('id'=>$id,'questions'=>[],%oo); if($id ne '_main_') { # calls newly created group from the 'main' one my $main=$self->group_by_id('_main_'); add_object($main->{'questions'}, textonly=>1, text=>{type=>'latex', string=>$self->group_insert_command_name($group)}, %oo, ); } } return($group); } sub read_options { my ($self,$options_string)=@_; my %oo=(); my @opts=split(/,+/,$options_string); for (@opts) { if(/^([^=]+)=(.*)/) { $oo{$1}=$2; } else { $oo{$_}=1; } } return(%oo); } # parse the whole source file to a data tree ($self->{'groups'}) sub read_source { my ($self,$input_file)=@_; $self->{reader_state}= { follow=>'', # variable where to add content comming from # following lines group=>$self->group_by_id('_main_'), # current group question=>'', # current question }; $self->read_file($input_file); $self->check_answers($self->{reader_state}->{question}); } sub read_file { my ($self,$input_file)=@_; # regexp that matches an option name: my $opt_re='('.join('|',@{$self->{'options_names'}}).')'; debug "Parsing $input_file"; open(my $infile,"<",$input_file); binmode($infile); LINE: while(<$infile>) { if(!utf8::decode($_)) { $self->parse_error(__"Invalid encoding: you must use UTF-8, but your source file was saved using another encoding"); last LINE; } chomp; debug ":> $_"; # removes comments if(/^\s*\#/) { debug "Comment"; next LINE; } # Insert other file... if(/^\s*IncludeFile:\s*(.*)/i) { my $filename=$1; $filename =~ s/\s+$//; my ($volume,$directories,$file) = File::Spec->splitpath( $input_file ); my $dir=File::Spec->catpath($volume,$directories,''); my $f=File::Spec->rel2abs($filename,$dir); debug "Include $f"; if(-f $f) { $self->read_file($f); } else { $self->parse_error(sprintf(__("File not found: %s"),$f)); } } # options if(/^\s*$opt_re:\s*(.*)/i) { debug "Option line ($1)"; $self->{options}->{lc($1)}=$2; $self->value_cleanup($self->{reader_state}->{follow}); $self->{reader_state}->{follow}=\$self->{'options'}->{lc($1)}; $self->check_answers($self->{reader_state}->{question}); $self->{reader_state}->{question}=''; next LINE; } if(/^([a-z0-9-]+):/i) { debug "Unknown option"; # TRANSLATORS: Error text for AMC-TXT parsing, when an unknown option is given a value $self->parse_error(sprintf(__("Unknown option: %s"),$1)); } # groups if(/^\s*\*([\(\)])(?:\[([^]]*)\])?\s*(.*)/) { my $action=$1; my $options=$2; my $text=$3; debug "Group A=$action O=$options"; my %oo=$self->read_options($options); if($action eq '(') { $self->needs_package('needspace') if($oo{needspace}); $self->{reader_state}->{group}= $self->group_by_id($oo{group}, parent=>$self->{reader_state}->{group}, header=>$text, %oo); $self->{reader_state}->{follow}=\$self->{reader_state}->{group}->{header}; } else { $self->{reader_state}->{group}->{footer}=$text; $self->{reader_state}->{follow}=\$self->{reader_state}->{group}->{footer}; $self->{reader_state}->{group}=$self->{reader_state}->{group}->{parent}; } next LINE; } # questions if(/^\s*(\*{1,2})(?:<([^>]*)>)?(?:\[([^]]*)\])?(?:\{([^\}]*)\})?\s*(.*)/) { $self->check_answers($self->{reader_state}->{question}); my $star=$1; my $angles=$2; my $options=$3; my $scoring=$4; my $text=$5; debug "Question S=$star A=$angles O=$options S=$scoring"; my %oo=$self->read_options($options); my $q_group=$self->{reader_state}->{group}; if($oo{group}) { $q_group=$self->group_by_id($oo{group}); } $self->{reader_state}->{question}= add_object($q_group->{'questions'}, 'multiple'=>length($star)==2, 'open'=>$angles, 'scoring'=>$scoring, 'text'=>$text,'answers'=>[],%oo); $self->value_cleanup($self->{reader_state}->{follow}); $self->{reader_state}->{follow}=\$self->{reader_state}->{question}->{'text'}; next LINE; } # answers if(/^\s*(\+|-)(?:\[([^]]*)\])?(?:\{([^\}]*)\})?\s*(.*)/) { if($self->{reader_state}->{question}) { my $sign=$1; my $letter=$2; my $scoring=$3; my $text=$4; debug "Choice G=$sign L=$letter S=$scoring"; my $a=add_object($self->{reader_state}->{question}->{answers}, 'text'=>$text,'correct'=>($sign eq '+'), 'letter'=>$letter, 'scoring'=>$scoring); $self->value_cleanup($self->{reader_state}->{follow}); $self->{reader_state}->{follow}=\$a->{'text'}; } else { debug "Choice outside question"; # TRANSLATORS: Error text for AMC-TXT parsing when a choice is given but no question were opened $self->parse_error(__"Choice outside question"); } next LINE; } # text following last line if($self->{reader_state}->{follow}) { debug "Follow..."; ${$self->{reader_state}->{follow}}.="\n".$_; } } debug "Cleanup..."; $self->value_cleanup($self->{reader_state}->{follow}); close($infile); } # bold font LaTeX command, not used in arabic language because there # is often no bold font arabic font. sub bf_or { my($self,$replace,$bf)=@_; return($self->{'options'}->{'arabic'} ? $replace : ($bf ? $bf : "\\bf")); } #################################################################### # PARSING METHODS # # ARGUMENT: list of components # RETURN VALUE: list of parsed components # # A component is a {type=>TYPE,string=>STRING} hashref, where # * TYPE is the component type: 'txt' for AMC-TXT text, 'latex' for # LaTeX code. # * STRING is the component string # # When all parsing methods has been applied, the result must be a list # of 'latex' components, that will be concatenated to get the LaTeX # code corresponding to the source file. # parse_images extracts an image specification (like '!image.jpg!') # from 'txt' components, and replaces the component with 3 components: # the preceding text, the LaTeX code that inserts the image, and the # following text sub parse_images { my ($self,@components)=@_; my @o=(); for my $c (@components) { if($c->{'type'} eq 'txt') { my $s=$c->{'string'}; while($s =~ /!(?:\{([^!\s]+)\})?(?:\[([^!\s]+)\])?([^!\s]+)!/p) { my $options=$1; my $ig_options=$2; my $path=$3; my $before=${^PREMATCH}; my $after=${^POSTMATCH}; push @o,{'type'=>'txt','string'=>$before}; my $l="\\includegraphics".($ig_options ? '['.$ig_options.']' : '') .'{'.$path.'}'; if($options =~ /\bcenter\b/) { $l="\\begin{center}$l\\end{center}"; } push @o,{'type'=>'latex','string'=>$l}; $s=$after; } push @o,{'type'=>'txt','string'=>$s}; } else { push @o,$c; } } return(@o); } # parse_local_latex extracts a local LaTeX specification (like # '[[$f(x)$]]') from 'txt' components sub parse_local_latex { my ($self,@components)=@_; my @o=(); for my $c (@components) { if($c->{'type'} eq 'txt') { my $s=$c->{'string'}; while($s =~ /\[\[(((?!\]\]).)+)\]\]/p) { my $latex=$1; my $before=${^PREMATCH}; my $after=${^POSTMATCH}; push @o,{'type'=>'txt','string'=>$before}; push @o,{'type'=>'latex','string'=>$latex}; $s=$after; } push @o,{'type'=>'txt','string'=>$s}; } else { push @o,$c; } } return(@o); } # generic code to parse '[xxx] ... [/xxx]' constructs sub parse_tags { my ($self,$name,$parse_content,@components)=@_; my @o=(); for my $c (@components) { if($c->{'type'} eq 'txt') { my $s=$c->{'string'}; while($s =~ /\[\Q$name\E\](.*?)\[\/\Q$name\E\]/sp) { my $content=$1; my $before=${^PREMATCH}; my $after=${^POSTMATCH}; push @o,{'type'=>'txt','string'=>$before}; push @o,&$parse_content($self,$content); $s=$after; } push @o,{'type'=>'txt','string'=>$s}; } else { push @o,$c; } } return(@o); } # insert LaTeX code to write verbatim texts sub verbatim_content { my ($self,$verb)=@_; my $letter=$self->unused_letter(); # adds linebreaks at the beginning and end of $verb, if they none already $verb = "\n".$verb if($verb !~ /^\n/); $verb = $verb."\n" if($verb !~ /\n$/); $self->add_global_latex_def("\\begin{SaveVerbatim}{AMCverb$letter}$verb\\end{SaveVerbatim}"); $self->needs_package('fancyvrb'); return({type=>'latex', string=>"\\UseVerbatim{AMCverb$letter}"}); } # parse [verbatim] ... [/verbatim] constructs sub parse_verbatim { my ($self,@components)=@_; return($self->parse_tags("verbatim",\&verbatim_content,@components)); } # generic code to parse '[xxx ... xxx]' constructs sub parse_brackets { my ($self,$modifier,$tex_open,$tex_close,@components)=@_; my @o=(); my $levels=0; my $tex; for my $c (@components) { if($c->{'type'} eq 'txt') { my $s=$c->{'string'}; while($s =~ /(\[\Q$modifier\E|\Q$modifier\E\])/p) { my $sep=$1; my $before=${^PREMATCH}; my $after=${^POSTMATCH}; if($sep=~/^\[/) { $tex=$tex_open; $levels++; } else { $tex=$tex_close; $levels--; } push @o,{'type'=>'txt','string'=>$before}; push @o,{'type'=>'latex','string'=>$tex}; $s=$after; } push @o,{'type'=>'txt','string'=>$s}; } else { push @o,$c; } } return(@o); } # parse_embf inserts LaTeX commands to switch to italic, bold or # typewriter font or underlined text when '[_ ... _]', '[* ... *]', # '[| ... |]' or '[/ ... /]' constructs are used in AMC-TXT, respectively. sub parse_embf { my ($self,@components)=@_; my @c=$self->parse_brackets('_',"\\textit{","}",@components); @c=$self->parse_brackets('*',"\\textbf{","}",@c); @c=$self->parse_brackets('/',"\\underline{","}",@c); @c=$self->parse_brackets('|',"\\texttt{","}",@c); return(@c); } # parse_title inserts LaTeX commands to build a title line from '[== # ... ==]' constructs. sub parse_title { my ($self,@components)=@_; return($self->parse_brackets('==',"\\AMCmakeTitle{","}",@components)); } # parse_text transforms plain text (with no special constructs) to # LaTeX code, escaping some characters that have special meaning for # LaTeX. sub parse_text { my ($self,@components)=@_; my @o=(); for my $c (@components) { if($c->{'type'} eq 'txt') { my $s=$c->{'string'}; if(! $self->{'options'}->{'latex'}) { $s =~ s/\\/\\(\\backslash\\)/g; $s =~ s/~/\\(\\sim\\)/g; $s =~ s/\*/\\(\\ast\\)/g; $s =~ s/([&{}\#_%])/\\\1/g; $s =~ s/-/-{}/g; $s =~ s/\$/\\textdollar{}/g; $s =~ s/\^/\\textasciicircum{}/g; } push @o,{'type'=>'latex','string'=>$s}; } else { push @o,$c; } } return(@o); } # parse_all calls all requested parse_* methods in turn (when they are # not disabled by the Disable global option). sub parse_all { my ($self,@components)=@_; for my $m (@{$self->{'parse_modules'}}) { my $mm='parse_'.$m; @components=$self->$mm(@components) if($self->{'options'}->{'disable'} !~ /\b$m\b/); } return(@components); } # Checks that the resulting components list has only 'latex' components sub check_latex { my ($self,@components)=@_; my @s=(); for my $c (@components) { if($c->{'type'} ne 'latex') { debug_and_stderr "ERR(FILTER): non-latex resulting component (". $c->{'type'}."): ".$c->{'string'}; } push @s,$c->{'string'}; } return(@s); } # converts AMC-TXT string to a LaTeX string: make a single 'txt' # component, apply parse_all and check_latex, and then concatenates # the components sub format_text { my ($self,$t)=@_; my $src; if(ref($t) eq 'HASH') { $src=$t; } else { $t =~ s/^\s+//; $t =~ s/\s+$//; $src={'type'=>'txt','string'=>$t}; } return(join('',$self->check_latex($self->parse_all($src)))); } # builds the LaTeX scoring command from the question's scoring # strategy (or the default scoring strategy) sub scoring_string { my ($self,$obj,$type)=@_; # manual scoring if some scoring was used, either for the question # or for one of the answers my $manual_scoring=(length $obj->{'scoring'} ? 1 : 0); if($obj->{answers}) { for my $a (@{$obj->{answers}}) { $manual_scoring=1 if(length $a->{scoring}); } } my $s=$obj->{'scoring'}; # set to explicit default (defined by DefaultScoringS or # DefaultScoringM): if(! length($s)) { $s=$self->{'options'}->{'defaultscoring'.$type}; } # if no manual scoring and no explicit default scoring, use the # implicit default scoring: if(!length($s) && !$manual_scoring) { $s=$self->{'options'}->{'implicitdefaultscoring'.$type}; } return(length($s) ? "\\scoring{$s}" : ""); } # builds the LaTeX code for an answer: \correctchoice or \wrongchoice, # followed by the scoring command sub format_answer { my ($self,$a)=@_; my $t='\\'.($a->{'correct'} ? 'correct' : 'wrong').'choice'; $t.='['.$a->{letter}.']' if($a->{letter} ne ''); $t.='{' .$self->format_text($a->{'text'})."}"; $t.=$self->scoring_string($a,'a'); $t.="\n"; return($t); } sub arabic_env { my ($self,$action)=@_; if($self->{'options'}->{'arabic'} && $self->bidi_year()<2011) { return("\\".$action."{arab}"); } else { return(""); } } # builds the LaTeX code for the question (including answers) sub format_question { my ($self,$q)=@_; my $t=''; if($q->{textonly}) { $t.=$self->arabic_env('begin'); $t.=$self->format_text($q->{'text'})."\n"; $t.=$self->arabic_env('end'); } else { my $qid=$q->{'id'}; $qid=$q->{'name'} if(!$qid); $qid=sprintf("Q%03d",++$self->{'qid'}) if(!$qid); my $mult=($q->{'multiple'} ? 'mult' : ''); my $ct=($q->{'horiz'} ? 'horiz' : ''); $t.=$self->arabic_env('begin'); $t.='\\begin{question'.$mult.'}{'.$qid."}"; $t.=$self->scoring_string($q,($q->{'multiple'} ? 'm' : 's')); $t.="\n"; $t.=$self->format_text($q->{'text'})."\n"; $t.="\\QuestionIndicative\n" if($q->{'indicative'}); if ($q->{open} ne '') { $t.="\\AMCOpen{".$q->{open}."}{"; } else { $t.="\\begin{multicols}{".$q->{'columns'}."}\n" if ($q->{'columns'}>1); $t.="\\begin{choices$ct}".($q->{'ordered'} ? "[o]" : "")."\n"; } for my $a (@{$q->{'answers'}}) { $t.=$self->format_answer($a); } if ($q->{open} ne '') { $t.="}\n"; } else { $t.="\\end{choices$ct}\n"; $t.="\\end{multicols}\n" if ($q->{'columns'}>1); } $t.="\\end{question".$mult."}"; $t.=$self->arabic_env('end'); $t.="\n"; } return($t); } sub int_to_letters { my ($self,$i)=@_; my $l=''; while($i>0) { $l=chr(ord("A")+($i % 26)).$l; $i=int($i/26); } return($l); } sub unused_letter { my ($self)=@_; $self->{'letter_i'}++; return($self->int_to_letters($self->{'letter_i'})); } # returns a new group name 'groupX' (where X is a letter beginnig at # A) sub create_group_name { my ($self)=@_; return( "gr".$self->unused_letter() ); } # returns the group name (creating one if necessary) sub group_name { my ($self,$group)=@_; if(!$group->{name}) { if($group->{id} =~ /^[a-z]+$/i) { $group->{name}=$group->{id}; } else { $group->{name}=$self->create_group_name(); } } return($group->{name}); } # gets the Year for the version of installed bidi.sty. This will be # used to adapt the LaTeX code to version before or after 2011 sub bidi_year { my ($self)=@_; if(!$self->{'bidiyear'}) { my $f=find_latex_file("bidi.sty"); if(-f $f) { open(BIDI,$f); BIDLIG: while() { if(/\\bididate\{([0-9]+)\//) { $self->{'bidiyear'}=$1; last BIDLIG; } } close(BIDI); } } return($self->{'bidiyear'}); } # builds and returns the LaTeX header sub file_header { my ($self)=@_; my $t=''; my @package_options=(); my $o=$self->{'options'}->{packageoptions}; $o =~ s/^\s+//; $o =~ s/\s+$//; if($o) { for my $oo (split(/,+/,$o)) { push @package_options,$oo; } } push @package_options,"bloc" if($self->{'options'}->{'questionblocks'}); for my $on (qw/completemulti separateanswersheet automarks/) { push @package_options,$on if($self->{'options'}->{$on}); } push @package_options,"lang=".uc($self->{'options'}->{'lang'}) if($self->{'options'}->{'lang'}); my $po=''; $po='['.join(',',@package_options).']' if(@package_options); if($self->{'options'}->{'arabic'}) { $t.="% bidi YEAR ".$self->bidi_year()."\n"; } $t .= "\\documentclass{article}\n"; $t .= "\\usepackage{bidi}\n" if($self->{'options'}->{'arabic'} && $self->bidi_year()<2011); $t .= "\\usepackage{xltxtra}\n" if($self->{'options'}->{'xltxtra'}); $t .= "\\usepackage{arabxetex}\n" if($self->{'options'}->{'arabic'} && $self->bidi_year()<2011); $t .= "\\usepackage".$po."{automultiplechoice}\n"; $t .= "\\usepackage{" .($self->{'options'}->{'arabic'} && $self->bidi_year()<2011 ? "fmultico" : "multicol")."}\n"; # packages for my $p (keys %{$self->{packages}}) { my @opts=(); for my $o (keys %{$self->{packages}->{$p}}) { push @opts,($o . ($self->{packages}->{$p}->{$o} eq '' ? '' : "=".$self->{packages}->{$p}->{$o})); } $t .= "\\usepackage".(@opts ? "[".join(",",@opts)."]" : "") ."{".$p."}\n"; } $t .= "\\setmainfont{".$self->{'options'}->{'font'}."}\n" if($self->{'options'}->{'font'}); $t .= "\\newfontfamily{\\arabicfont}[Script=Arabic,Scale=1]{".$self->{'options'}->{'arabicfont'}."}\n" if($self->{'options'}->{'arabicfont'} && $self->{'options'}->{'arabic'}); $t .= "\\geometry{paper=".lc($self->{'options'}->{'papersize'})."paper}\n" if($self->{'options'}->{'papersize'}); $t .= $self->{'options'}->{'latex-preambule'}; $t .= "\\usepackage{arabxetex}\n" if($self->{'options'}->{'arabic'} && $self->bidi_year()>=2011); $t .= "\\begin{document}\n"; $t .= "\\def\\AMCmakeTitle#1{\\par\\noindent\\hrule\\vspace{1ex}{\\hspace*{\\fill}\\Large\\bf #1\\hspace*{\\fill}}\\vspace{1ex}\\par\\noindent\\hrule\\par\\vspace{1ex}}\n"; $t .= "\\AMCrandomseed{".$self->{'options'}->{'randomseed'}."}\n"; if($self->{'options'}->{'boxcolor'}) { if($self->{'options'}->{'boxcolor'} =~ /^\\definecolor\{amcboxcolor\}/) { $t .= $self->{'options'}->{'boxcolor'}; } elsif($self->{'options'}->{'boxcolor'} =~ /^\#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i) { $t .= "\\definecolor{amcboxcolor}{rgb}{" .sprintf("%0.2f,%0.2f,%0.2f",map { hex($_)/256.0 } ($1,$2,$3))."}\n"; } else { $t .= "\\definecolor{amcboxcolor}{named}{" .$self->{'options'}->{'boxcolor'}."}\n"; } $t .= "\\AMCboxColor{amcboxcolor}\n"; } $t .= "\\AMCtext{none}{" .$self->format_text($self->{'options'}->{'l-none'})."}\n" if($self->{'options'}->{'l-none'}); $t .= "\\def\\AMCotextGoto{\\par ".$self->format_text($self->{'options'}->{'l-opentext'})."}\n" if($self->{'options'}->{'l-opentext'}); $t .= "\\def\\AMCotextReserved{".$self->format_text($self->{'options'}->{'l-openreserved'})."}\n" if($self->{'options'}->{'l-openreserved'}); $t.="\\def\\AMCbeginQuestion#1#2{\\noindent{" .$self->bf_or("\\Large")." " .$self->{'options'}->{'l-question'}." #1} #2\\hspace{1em}}\n" ."\\def\\AMCformQuestion#1{{" .$self->bf_or("\\Large")." " .$self->{'options'}->{'l-question'}." #1 :}}\n" if($self->{'options'}->{'l-question'}); if($self->{'options'}->{'arabic'}) { $t.="\\def\\AMCchoiceLabel#1{\\csname ArabicAlphabet\\Alph{#1}\\endcsname}\n"; my $letter="A"; for my $c (@alphabet_arabic) { $t.="\\def\\ArabicAlphabet$letter"."{$c}\n"; $letter++; } } $t .= $self->{'options'}->{'latex-begindocument'}; return($t); } # Builds and returns the question sheet head (or the answer sheet head # if $answersheet is true) sub page_header { my ($self,$answersheet)=@_; my $t=""; my $titlekey=''; if($self->{'options'}->{'separateanswersheet'}) { if($answersheet) { if($self->{'options'}->{'code'}>0) { $titlekey='answersheettitle'; } } else { $titlekey='title'; } } else { if($self->{'options'}->{'code'}>0) { $titlekey='title'; } } if($titlekey && $self->{'options'}->{$titlekey}) { $t.="\\begin{center}".$self->bf_or("\\Large","\\bf\\large")." " .$self->format_text($self->{'options'}->{$titlekey}) ."\\end{center}"; $t.="\n\n"; } return($t); } # Builds and returns the name field LaTeX code sub full_namefield { my ($self,$with_code)=@_; my $n_ligs; if($self->{'options'}->{'namefieldlines'}) { $n_ligs=$self->{'options'}->{'namefieldlines'}; } else { $n_ligs=($with_code ? 2 : 1); } my $t=''; $t.="\\namefield{\\fbox{"; $t.="\\begin{minipage}{.9\\linewidth}" .($self->{'options'}->{'l-name'} ? $self->{'options'}->{'l-name'} : '\\AMClocalized{namesurname}') .(("\n\n\\vspace*{".$self->{'options'}->{'namefieldlinespace'}."}\\dotfill") x $n_ligs) ."\n\\vspace*{1mm}" ."\n\\end{minipage}"; $t.="\n}}"; return($t); } # Builds and returns the student identification block LaTeX code (with # name field and AMCcode if requested) sub student_block { my ($self)=@_; my $t=''; if($self->{'options'}->{'code'}>0) { # Header layout with a code (student number) my $vertical=($self->{'options'}->{'code'}>$self->{'maxhorizcode'}); $vertical=1 if($self->{options}->{codedigitsdirection} =~ /^v/i); $vertical=0 if($self->{options}->{codedigitsdirection} =~ /^h/i); $t.="{\\setlength{\\parindent}{0pt}\\hspace*{\\fill}"; $t.=($vertical?"":"\\hbox{\\vtop{"); $t.= "\\LR{" if($self->{'options'}->{'arabic'} && $vertical); $t.="\\AMCcode".($vertical ? "" : "H")."{student.number}{". $self->{'options'}->{'code'}."}"; $t.= "}" if($self->{'options'}->{'arabic'} && $vertical); $t.=($vertical?"":"}}")."\\hspace*{\\fill}" ."\\begin{minipage}".($vertical?"[b]":"[t]")."{" .($self->{'options'}->{'namefieldwidth'} ? $self->{'options'}->{'namefieldwidth'} : '5.8cm') ."}" ."\$\\long".($self->{'options'}->{'arabic'} ? "right" : "left") ."arrow{}\$\\hspace{0pt plus 1cm}" .$self->{'options'}->{'l-student'} ."\\vspace{3ex}\n\n\\hfill" .$self->full_namefield(1) ."\\hfill\\vspace{5ex}\\end{minipage}\\hspace*{\\fill}" ."\n\n}"; $t.="\\vspace{4mm}\n"; } else { # header layout without code $t.= "\\begin{minipage}{" .$self->{'options'}->{'titlewidth'} ."}\n"; my $titlekey=($self->{'options'}->{'separateanswersheet'} ? 'answersheettitle' : 'title'); if($self->{'options'}->{$titlekey}) { $t.= "\\begin{center}".$self->bf_or("\\Large","\\bf\\large")." " .$self->format_text($self->{'options'}->{$titlekey}) ."\\end{center}\n\n"; } $t.= "\\end{minipage}\\hfill\n"; $t.= "\\begin{minipage}{". ($self->{'options'}->{'namefieldwidth'} ? $self->{'options'}->{'namefieldwidth'} : ".47\\linewidth") ."}\n"; $t.= $self->full_namefield(0); $t.= "\\end{minipage}\\vspace{4mm}\n\n"; } return($t); } sub group_insert_command_name { my ($self,$group)=@_; return("\\insertPlainGroup".$self->group_name($group)); } sub group_insert_command_def { my ($self,$group)=@_; my $t="\\def".$self->group_insert_command_name($group)."{"; $t.="\\needspace{".$group->{needspace}."}\n" if($group->{needspace}); if($group->{header}) { $t.="\\noindent ".$self->format_text($group->{header}); $t.="\\vspace{1.5ex}\\par\n" if(!$group->{custom} && $group->{columns}<=1); } $t.="\\begin{multicols}{".$group->{columns}."}" if($group->{columns}>1); for my $q (grep { $_->{first} } (@{$group->{questions}})) { $t.=$self->format_question($q)."\n"; } $t.="\\insertgroup"; $t.="[".$group->{numquestions}."]" if($group->{numquestions}); $t.="{".$self->group_name($group)."}"; for my $q (grep { $_->{last} } (@{$group->{questions}})) { $t.="\n".$self->format_question($q); } $t.="\\end{multicols}" if($group->{columns}>1); if($group->{footer}) { $t.=$self->format_text($group->{footer}); $t.="\\vspace{1.5ex}\\par\n" if(!$group->{custom} && !$group->{cut}); } $t.="}\n"; return($t); } # writes the LaTeX output file sub write_latex { my ($self,$output_file)=@_; my $tex=''; for my $group (@{$self->{'groups'}}) { # create group elements from the questions my @questions=grep { !($_->{first} || $_->{last}) } @{$group->{'questions'}}; my $q; while($q=shift @questions) { $tex .= "\\element{".$self->group_name($group)."}{\n"; $tex .= $self->format_question($q); while(@questions && $questions[0]->{'next'}) { $tex .= "\n"; $tex .= $self->format_question(shift @questions); } $tex .= "}\n"; } # command to print the group $tex .= $self->group_insert_command_def($group); } $tex .= "\\onecopy{5}{\n"; $tex .= "\\begin{arab}" if($self->{'options'}->{'arabic'}); $tex .= $self->page_header(0); $tex .= $self->student_block if(!$self->{'options'}->{'separateanswersheet'}); if($self->{'options'}->{'presentation'}) { $tex .= $self->format_text($self->{'options'}->{'presentation'})."\n\n"; } $tex .= "\\vspace{4mm}\\noindent\\hrule\n"; $tex .= "\\end{arab}" if($self->{'options'}->{'arabic'}); $tex .= "\n\n"; # shuffle groups... for my $g (@{$self->{groups}}) { $tex .= "\\shufflegroup{".$self->group_name($g)."}\n" if(parse_bool(first_defined($g->{shuffle},$self->{'options'}->{'shufflequestions'}))); } # print groups $tex .= "\\begin{arab}" if($self->{'options'}->{'arabic'} && $self->bidi_year()>=2011); if($self->{'options'}->{'columns'}>1) { $tex .= "\\begin{multicols}{".$self->{'options'}->{'columns'}."}\n"; } else { $tex .= "\\vspace{2ex}\n\n"; } $tex .= $self->group_insert_command_name($self->group_by_id('_main_'))."\n"; if($self->{'options'}->{'columns'}>1) { $tex .= "\\end{multicols}\n"; } $tex .= "\\end{arab}" if($self->{'options'}->{'arabic'} && $self->bidi_year()>=2011); # separate answer sheet if($self->{'options'}->{'separateanswersheet'}) { $tex .= "\n\\AMCaddpagesto{".$self->{options}->{pages_question}."}" if($self->{options}->{pages_question}); if($self->{'options'}->{'singlesided'}) { $tex .= "\n\\clearpage\n\n"; } else { $tex .= "\n\\AMCcleardoublepage\n\n"; } $tex .= "\\AMCformBegin\n"; $tex .= "\\begin{arab}" if($self->{'options'}->{'arabic'}); $tex .= $self->page_header(1); $tex .= $self->student_block; if($self->{'options'}->{'answersheetpresentation'}) { $tex .= $self->format_text($self->{'options'}->{'answersheetpresentation'})."\n\n"; } $tex .= "\\vspace{4mm}\\noindent\\hrule\n"; $tex .= "\\end{arab}" if($self->{'options'}->{'arabic'}); $tex .= "\n\n"; $tex .= "\\begin{arab}" if($self->{'options'}->{'arabic'}); $tex .= "\\begin{multicols}{".$self->{'options'}->{'answersheetcolumns'}."}\n" if($self->{'options'}->{'answersheetcolumns'}>1); $tex .= "\\AMCform\n"; $tex .= "\\end{multicols}\n" if($self->{'options'}->{'answersheetcolumns'}>1); $tex .= "\\end{arab}" if($self->{'options'}->{'arabic'}); } $tex .= "\n\n"; $tex .= "\\AMCaddpagesto{".$self->{options}->{pages_total}."}\n" if($self->{options}->{pages_total}); $tex .= "\\AMCcleardoublepage\n" if($self->{'options'}->{'manualduplex'}); $tex .= "}\n"; $tex .= "\\end{document}\n"; open(OUT,">:utf8",$output_file); print OUT $self->file_header(); print OUT join("\n",@{$self->{latex_defs}})."\n"; print OUT $tex; close(OUT); } # Checks that the requested prerequisites (in fact, fonts) are # installed on the system sub check { my ($self)=@_; my @cf=('font'); my @mf=(); push @cf,'arabicfont' if($self->{'options'}->{'arabic'}); for my $k (@cf) { if($self->{'options'}->{'font'}) { if(!check_fonts({'type'=>'fontconfig', 'family'=>[$self->{'options'}->{$k}]})) { push @mf,$self->{'options'}->{$k} } } } $self->error(sprintf(__("The following fonts does not seem to be installed on the system: %s."),join(', ',@mf))) if(@mf); } # Whole filter processing sub filter { my ($self,$input_file,$output_file)=@_; $self->read_source($input_file); $self->parse_options(); $self->check(); $self->write_latex($output_file); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Filter/register.pm000066400000000000000000000114131341176102400231130ustar00rootroot00000000000000# # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Filter::register; use Module::Load; use Module::Load::Conditional qw/check_install/; use AMC::Basic qw(!file_mimetype); use_gettext; ##################################################################### # These methods should be overwritten for derivated classes (that # describe file formats that AMC can handle) ##################################################################### sub new { my $class = shift; my $self={'project_options'=>''}; bless ($self, $class); return $self; } # short name of the file format sub name { return("empty"); } # default filename when creating a new one inside project directory sub default_filename { return("source"); } # create new empty file sub default_content { my ($self,$file)=@_; } # weight in the list of all available formats. 0 is at the top, 1 is # at the bottom line sub weight { return(1); } # function to set some project parameters for this format to work properly. # use method sub configure { my ($self,$options_project); } # this function returns a list of project options that are set # automatically by the filter. These options will be greyed out in the # Edit/Preferences window so that the user can not modify them. sub forced_options { return(); } # description of the format, that will be display in the window # showing details about file formats sub description { return(__"No description available."); } # list of file patterns (like "*.txt") that corresponds to source # files for this format sub file_patterns { return(); } # filetype to choose right editor. Currently, only "tex" and "txt" are # available. sub filetype { return(""); } # returns an URL where to find documentation about the syntax to be # used sub doc_url { return(""); } # list of required LaTeX packages sub needs_latex_package { return(); } # list of required commands sub needs_command { return(); } # list of required fonts sub needs_font { return([{'type'=>'fontconfig', 'family'=>[]}, # <-- needs one of the fonts in the list ]); } # returns a number that tells how likely the file is written for this # format. 1.0 means "yes, I'm sure this file is written for this # format", -1.0 means "I'm sure it is NOT written for this format", # and 0.0 means "I don't know". sub claim { my ($self,$file)=@_; return(0); } ##################################################################### # The following methods should NOT be overwritten ##################################################################### sub set_oo { my ($self,$config)=@_; $self->{'project_options'}=$config; } sub set_project_option { my ($self,$name,$value)=@_; $self->{'project_options'}->set("project:$name",$value); } sub missing_latex_packages { my ($self)=@_; return() if(!commande_accessible("kpsewhich")); my @mp=(); for my $p ($self->needs_latex_package()) { my $ok=0; open KW,"-|","kpsewhich","-all","$p.sty"; while() { chomp();$ok=1 if(/./); } close(KW); push @mp,$p if(!$ok); } return(@mp); } sub missing_commands { my ($self)=@_; my @mc=(); for my $c ($self->needs_command()) { push @mc,$c if(!commande_accessible($c)); } return(@mc); } sub missing_fonts { my ($self)=@_; my @mf=(); my $fonts=$self->needs_font; for my $spec (@$fonts) { push @mf,$spec if(!check_fonts($spec)); } return(@mf); } sub check_dependencies { my ($self)=@_; my %miss=('latex_packages'=>[$self->missing_latex_packages()], 'commands'=>[$self->missing_commands()], 'fonts'=>[$self->missing_fonts()], ); my $ok=1; for my $k (keys %miss) { $ok=0 if(@{$miss{$k}}); } $miss{'ok'}=$ok; return(\%miss); } sub file_head { my ($self,$file,$size)=@_; return('') if(!$file); my $h; my $n; my $fh; return if(!-f $file); if(open($fh,"<",$file)) { $n=read $fh,$h,$size; close($fh); } if(!defined($n)) { debug_and_stderr("Error reading from $file: $!"); } return($h); } sub file_mimetype { my ($self,$file)=@_; return(AMC::Basic::file_mimetype($file)); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Filter/register/000077500000000000000000000000001341176102400225555ustar00rootroot00000000000000auto-multiple-choice-1.4.0/AMC-perl/AMC/Filter/register/latex.pm000066400000000000000000000041671341176102400242400ustar00rootroot00000000000000# # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Filter::register::latex; use AMC::Filter::register; use AMC::Basic; @ISA=("AMC::Filter::register"); use_gettext; sub new { my $class = shift; my $self = $class->SUPER::new(); bless ($self, $class); return $self; } sub name { return("LaTeX"); } sub default_filename { return("source.tex"); } sub default_content { my ($self,$file)=@_; open(EMPTY,">",$file); print EMPTY "\\documentclass{article}\n"; print EMPTY "\\usepackage{automultiplechoice}\n"; print EMPTY "\\begin{document}\n\n\\end{document}\n"; close(EMPTY); } sub description { return(__"This is the native format for AMC. LaTeX is not so easy to use for unexperienced users, but the LaTeX power allows the user to build any multiple choice subject. As an example, the following is possible with LaTeX but not with other formats:\n* any kind of layout,\n* questions with random numerical values,\n* use of figures, mathematical formulas\n* and much more!"); } sub weight { return(0.1); } sub file_patterns { return("*.tex","*.TEX"); } sub filetype { return("tex"); } sub claim { my ($self,$file)=@_; my $h=$self->file_head($file,256); return(.8) if($h && ($h =~ /\\usepackage.*\{automultiplechoice\}/ || $h =~ /\\documentclass\{/)); return(.6) if($self->file_mimetype($file) eq 'text/x-tex'); return(.5) if($file =~ /\.tex$/i); return(0.0); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Filter/register/plain.pm000066400000000000000000000035411341176102400242210ustar00rootroot00000000000000# # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Filter::register::plain; use AMC::Filter::register; use AMC::Basic; @ISA=("AMC::Filter::register"); sub new { my $class = shift; my $self = $class->SUPER::new(); bless ($self, $class); return $self; } sub name { return("AMC-TXT"); } sub default_filename { return("source.txt"); } sub default_content { my ($self,$file)=@_; open(EMPTY,">",$file); print EMPTY "# AMC-TXT file\n"; print EMPTY "Title:\nPresentation:\n"; close(EMPTY); } sub description { return(__"This is a plain text format for easy question writting. See the following minimal example:\n\nTitle: Paper title\n\n* Which is the capital city of Cameroon?\n+ Yaounde\n- Douala\n- Kribi"); } sub weight { return(0.2); } sub forced_options { return('moteur_latex_b'); } sub file_patterns { return("*.txt","*.TXT"); } sub needs_latex_package { return("xltxtra","multicol"); } sub filetype { return("txt"); } sub claim { my ($self,$file)=@_; my $h=$self->file_head($file,256); return(.9) if($h && $h =~ /^\s*\#\s*AMC-TXT/); return(.3) if($file =~ /\.txt$/i); return(0.0); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Gui/000077500000000000000000000000001341176102400202305ustar00rootroot00000000000000auto-multiple-choice-1.4.0/AMC-perl/AMC/Gui/Association.glade000066400000000000000000000660011341176102400235050ustar00rootroot00000000000000 20 4 1 2 True False Manual association True False True False vertical True False False True 0 True True vertical 400 100 True False GDK_EXPOSURE_MASK | GDK_STRUCTURE_MASK False False True False vertical True False 10 True False True True False False True True 0 beginning False True True False Is auto-completion looking at the beginning of the names only? 0.5 True False False 1 True True 0 True False False True True True True False gtk-add False True end 0 False True True True True False gtk-remove False False end 1 Show all False True True True False False end 2 False False 1 False True 0 True True never 100 True False queue True False True True True 1 True True True True 1 True True 0 True False vertical False True 1 True False vertical True False gtk-go-back False True True True True False False 0 associated False True True False Unticking this box, you see only non-associated papers. Tick it to be able to check already associated papers. 0.5 True False False 1 gtk-go-forward False True True True True False False 2 False True 0 True False spread gtk-clear False True True True Remove manual association for this paper True False False 0 False True True True Tell the system that this papers does not correspond to any of the students from the list. True False True False gtk-dialog-error True True 0 True False Unknown True True 1 False False 1 False False 1 True True True True True True 2 True False spread gtk-quit False True True True Save associations. True False False 0 False True 4 False False 2 auto-multiple-choice-1.4.0/AMC-perl/AMC/Gui/Association.pm000066400000000000000000000530331341176102400230460ustar00rootroot00000000000000#! /usr/bin/perl -w # # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Gui::Association; use AMC::Basic; use AMC::Gui::PageArea; use AMC::Data; use AMC::DataModule::capture ':zone'; use AMC::NamesFile; use AMC::Gui::WindowSize; use Getopt::Long; use POSIX; use Gtk3 -init; use constant { COPIES_N => 0, COPIES_STUDENT => 1, COPIES_COPY => 2, COPIES_AUTO => 3, COPIES_MANUEL => 4, COPIES_BG => 5, COPIES_IIMAGE => 6, NAMES_NAME => 0, NAMES_I => 1, }; use_gettext; my $col_pris = Gtk3::Gdk::RGBA::parse("#FFD0A9"); my $col_actif = Gtk3::Gdk::RGBA::parse("#14933A"); my $col_actif_fond = Gtk3::Gdk::RGBA::parse("#5FD581"); sub new { my %o=(@_); my $self={'assoc-ncols'=>3, 'cr'=>'', 'namefield_dir'=>'', 'liste'=>'', 'liste_key'=>'', 'data_dir'=>'', 'data'=>'',assoc=>'','capture'=>'','layout'=>'', 'global'=>0, 'show_all'=>1, 'complete_beginning'=>1, 'encodage_liste'=>'UTF-8', 'separateur'=>"", 'identifiant'=>'', 'fin'=>'', 'size_prefs'=>'', 'rtl'=>'', }; for (keys %o) { $self->{$_}=$o{$_} if(defined($self->{$_})); } bless $self; $self->{'namefield_dir'}=$self->{'cr'} if(!$self->{'namefield_dir'}); # Open databases for association and capture $self->{'data'}=AMC::Data->new($self->{'data_dir'}) if(!$self->{'data'}); $self->{'assoc'}=$self->{'data'}->module('association') if(!$self->{'assoc'}); $self->{'capture'}=$self->{'data'}->module('capture') if(!$self->{'capture'}); $self->{'layout'}=$self->{'data'}->module('layout') if(!$self->{'layout'}); $self->{'assoc'}->begin_transaction('ALSK'); $self->{'assoc'}->check_keys($self->{'liste_key'},'---'); $self->{'assoc'}->end_transaction('ALSK'); # Read the names from the students list $self->{'liste'}=AMC::NamesFile::new($self->{'liste'}, 'encodage'=>$self->{'encodage_liste'}, 'separateur'=>$self->{'separateur'}, 'identifiant'=>$self->{'identifiant'}, ); debug "".$self->{'liste'}->taille()." names in list\n"; return($self) if(!$self->{'liste'}->taille()); # Find all name field images my @images=(); $self->{'capture'}->begin_read_transaction('AIMG'); my $nfs=$self->{'capture'}->get_namefields; $self->{'capture'}->end_transaction('AIMG'); for my $p (@$nfs) { my $file=$p->{image}; $file='' if(!defined($file)); if($file && $file !~ /^text:/) { $file=$self->{'namefield_dir'}."/".$file; utf8::downgrade($file); $file='' if(!-r $file); } push @images,{'file'=>$file,%$p}; } my $iimage=-1; if($#images<0) { debug "Can't find names images...\n"; $self->{'erreur'}=__("Names images not found... Maybe you forgot using \\namefield command in LaTeX source?"); return($self); } ### Open GUI my $glade_xml=__FILE__; $glade_xml =~ s/\.p[ml]$/.glade/i; $self->{'gui'}=Gtk3::Builder->new(); $self->{'gui'}->set_translation_domain('auto-multiple-choice'); $self->{'gui'}->add_from_file($glade_xml); for my $k (qw/general tableau titre photo associes_cb copies_tree bouton_effacer bouton_inconnu scrolled_tableau viewport_tableau button_show_all student_typein v_complete_beginning/) { $self->{$k}=$self->{'gui'}->get_object($k); } $self->{'button_show_all'}->set_active($self->{'show_all'}); $self->{'cursor_watch'}=Gtk3::Gdk::Cursor->new('GDK_WATCH'); AMC::Gui::PageArea::add_feuille($self->{'photo'}); $self->{'names_model'}=Gtk3::ListStore->new ('Glib::String', 'Glib::String', ); $self->initial_size; my @bouton_nom=(); my @bouton_eb=(); $self->{'boutons'}=\@bouton_nom; $self->{'boutons_eb'}=\@bouton_eb; $self->{'taken_list'}=[]; $self->{'assoc'}->begin_read_transaction('ABUT'); my ($x,$y)=(0,0); for my $i (0..($self->{'liste'}->taille()-1)) { my $eb=Gtk3::EventBox->new(); my $b=Gtk3::Button->new(); my $name=$self->{'liste'}->data_n($i,'_ID_'); my $l=Gtk3::Label->new($name); $self->{'names_model'}->insert_with_values($i, NAMES_NAME,$name, NAMES_I,$i); $b->add($l); $b->set_tooltip_text($name); $l->set_ellipsize("middle"); if($self->{'rtl'} && $self->{'general'}->get_direction() eq 'rtl') { $l->set_alignment(0,.5); } $eb->add($b); push @bouton_nom,$b; push @bouton_eb,$eb; $b->signal_connect (clicked => sub { $self->choisit($i) }); $b->set_focus_on_click(0); $self->style_bouton($i); } $self->{'assoc'}->end_transaction('ABUT'); $self->set_n_cols(); # vue arborescente my ($copies_store,$renderer,$column); $copies_store = Gtk3::ListStore->new ('Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', ); $self->{'copies_tree'}->set_model($copies_store); $renderer=Gtk3::CellRendererText->new; $column = Gtk3::TreeViewColumn->new_with_attributes ("copie", $renderer, text=> COPIES_N, 'background'=> COPIES_BG); $column->set_sort_column_id(COPIES_N); $self->{'copies_tree'}->append_column ($column); $renderer=Gtk3::CellRendererText->new; $column = Gtk3::TreeViewColumn->new_with_attributes ("auto", $renderer, text=> COPIES_AUTO, 'background'=> COPIES_BG); $column->set_sort_column_id(COPIES_AUTO); $self->{'copies_tree'}->append_column ($column); $renderer=Gtk3::CellRendererText->new; $column = Gtk3::TreeViewColumn->new_with_attributes ("manuel", $renderer, text=> COPIES_MANUEL, 'background'=> COPIES_BG); $column->set_sort_column_id(COPIES_MANUEL); $self->{'copies_tree'}->append_column ($column); $copies_store->set_sort_func(COPIES_N,\&sort_num,COPIES_N); $copies_store->set_sort_func(COPIES_AUTO,\&sort_num,COPIES_AUTO); $copies_store->set_sort_func(COPIES_MANUEL,\&sort_num,COPIES_MANUEL); $self->{'copies_store'}=$copies_store; # remplissage de la liste $self->{'assoc'}->begin_read_transaction('ALST'); my $ii=0; for my $i (@images) { my @sc=($i->{'student'},$i->{'copy'}); $copies_store->insert_with_values ($ii, COPIES_N,studentids_string(@sc), COPIES_STUDENT,$sc[0], COPIES_COPY,$sc[1], COPIES_AUTO,$self->{'assoc'}->get_auto(@sc), COPIES_MANUEL,$self->{'assoc'}->get_manual(@sc), COPIES_IIMAGE,$ii, ); $ii++; } $self->{'assoc'}->end_transaction('ALST'); # auto-completion $self->{'completion'}=Gtk3::EntryCompletion->new(); $self->{'completion'}->set_model($self->{'names_model'}); $self->{'completion'}->set_text_column(NAMES_NAME); $self->{'completion'}->set_minimum_key_length(2); $self->{'completion'}->set_match_func(\&compare_names,$self); $self->{'completion'}->signal_connect("match-selected",\&select_from_entry,$self); $self->{'student_typein'}->set_completion($self->{'completion'}); # retenir... $self->{'images'}=\@images; $self->{'gui'}->connect_signals(undef,$self); $self->{'iimage'}=-1; $self->image_suivante(); $self->{'assoc'}->begin_read_transaction('ANCL'); $self->maj_couleurs_liste(); $self->{'assoc'}->end_transaction('ANCL'); return($self); } # function used to look at a key from the names, for auto-completion # # {X:X} sub compare_names { my ($widget,$key,$iter,$self)=@_; my $name=$self->{'names_model'}->get($iter,NAMES_NAME); if($self->{'complete_beginning'}) { return($name =~ /^\Q$key\E/i); } else { return($name =~ /\Q$key\E/i); } } # callback when selecting a completion match from the entry # # {X:X} sub select_from_entry { my ($widget,$model,$iter,$self)=@_; my $i=$model->get($iter,NAMES_I); my $name=$model->get($iter,NAMES_NAME); debug "Selecting from entry auto-completion: I=$i NAME=$name"; $self->choisit($i); $self->{'student_typein'}->set_text(''); return(1); } # is "show all" button active? # # {X:X} sub get_show_all { my ($self)=@_; return($self->{'show_all'}); } # Resize the table with the requested number of columns, and put the # buttons where they has to be. # # {X:X} sub set_n_cols { my ($self)=@_; $self->{'general'}->get_window()->set_cursor($self->{'cursor_watch'}); $self->{'tableau'}->set_sensitive(0); # wait for GUI update before going on with the table Glib::Idle->add(\&set_n_cols_fill,$self,Glib::G_PRIORITY_LOW); } sub set_n_cols_fill { my ($self)=@_; $self->{'tableau'}->foreach(sub { $self->{'tableau'}->remove(shift); }); my $x=0; my $y=0; my $i=-1; NAME: for my $b (@{$self->{'boutons_eb'}}) { $i++; next NAME if(!$self->{'show_all'} && $self->{'taken_list'}->[$i]); $self->{'tableau'}->attach($b,$x,$y,1,1); $x++; if($x>=$self->{'assoc-ncols'}) { $y++; $x=0; } } $self->{'scrolled_tableau'}->set_policy('never','automatic'); $self->{'tableau'}->show_all(); $self->{'tableau'}->set_sensitive(1); $self->{'general'}->get_window()->set_cursor(undef); return(0); } # Add a column to the names table # # {X:X} sub assoc_add_column { my ($self)=@_; $self->{'assoc-ncols'}++; $self->set_n_cols(); } # Removes a column from the names table # # {X:X} sub assoc_del_column { my ($self)=@_; $self->{'assoc-ncols'}--; $self->{'assoc-ncols'}=1 if($self->{'assoc-ncols'}<1); $self->set_n_cols(); } # Gets state of "show all" button and redraw table. # # {X:X} sub set_show_all { my ($self)=@_; $self->{'show_all'}=$self->{'button_show_all'}->get_active(); $self->set_n_cols(); } # Gets state of "Beggining" checkbox # # {X:X} sub set_complete_beginning { my ($self)=@_; $self->{'complete_beginning'}=$self->{'v_complete_beginning'}->get_active(); } # Sets the window size to requested one (saved the last time the # window was used) # # {X:X} sub initial_size { my ($self)=@_; if($self->{'size_prefs'}) { AMC::Gui::WindowSize::size_monitor ($self->{'general'},{config=>$self->{'size_prefs'}, key=>'assoc_window_size'}); } } # Updates the content of the sheets list (associations already made) # for one give sheet. # # {IN:} sub maj_contenu_liste { my ($self,$ii,$iter,@sc)=@_; if($iter) { $self->{'copies_store'} ->set($iter, COPIES_AUTO,$self->{'assoc'}->get_auto(@sc), COPIES_MANUEL,$self->{'assoc'}->get_manual(@sc), ); } else { debug_and_stderr "*** [content] no iter for image $ii, sheet " .studentids_string(@sc)." ***\n"; } } # Updates the line $iimage of the sheets list. # # {X:IN} sub maj_contenu_liste_iimage { my ($self,$iimage)=@_; my $iter=model_id_to_iter($self->{'copies_store'},COPIES_IIMAGE,$ii); my @sc=map { $self->{'images'}->[$iimage]->{$_} } (qw/student copy/); $self->maj_contenu_liste($iimage,$iter,@sc); } # Updates the line corresponding to @sc=(student,copy) of the sheets # list # # {X:IN} sub maj_contenu_liste_sc { my ($self,@sc)=@_; my $iter=model_id_to_iter($self->{'copies_store'}, COPIES_STUDENT,$sc[0], COPIES_COPY,$sc[1]); my $iimage=$self->{'copies_store'}->get($iter,COPIES_IIMAGE); $self->maj_contenu_liste($iimage,$iter,@sc); } # Updates the colours of the sheets list. # # {IN:} sub maj_couleurs_liste { # mise a jour des couleurs la liste my ($self)=@_; my $counts=$self->{'assoc'}->counts_hash(); my $iter=$self->{'copies_store'}->get_iter_first(); my $ok=defined($iter); while($ok) { my @sc=$self->{'copies_store'}->get($iter,COPIES_STUDENT,COPIES_COPY); $self->{'copies_store'} ->set($iter, COPIES_BG, $counts->{studentids_string(@sc)}->{color}, ); $ok=$self->{'copies_store'}->iter_next($iter); } } # Quits. sub quitter { my ($self)=(@_); if($self->{'global'}) { Gtk3->main_quit; } else { $self->{'general'}->destroy; &{$self->{'fin'}}($self); } } sub enregistrer { my ($self)=(@_); $self->quitter(); } # inom2code($i) returns the primary key ID corresponding to student on # line $i from the students list file. # # {X:X} sub inom2code { my ($self,$inom)=@_; return($self->{'liste'}->data_n($inom,$self->{'liste_key'})); } # sc2inom($student,$copy) returns the line number where is the student # associated with sheet ($student,$copy) in the students list file. # # {IN:} sub sc2inom { my ($self,$student,$copy)=@_; my $code=$self->{'assoc'}->get_real($student,$copy); if($code) { return($self->{'liste'}->data($self->{'liste_key'}, $code, test_numeric=>1, 'all'=>1,'i'=>1)); } else { return(); } } # cancels association to the student at line number $inom in the # students list file. # # {IN:} sub delie { my ($self,$inom)=(@_); my $code=$self->inom2code($inom); # remove associations to $code, and update list for my $sc (@{$self->{'assoc'}->delete_target($code)}) { $self->maj_contenu_liste_sc(@$sc); } # also update buttons that corresponds to that $code $self->style_bouton_code($code); } # Associates sheet ($student,$copy) with student at line number $inom # in the students list file. # # {IN:} sub lie { my ($self,$inom,$student,$copy)=(@_); $self->delie($inom); my $oldcode=$self->{'assoc'}->get_real($student,$copy); $self->{'assoc'}->set_manual($student,$copy,$self->inom2code($inom)); # updates list $self->maj_contenu_liste_sc($student,$copy); $self->maj_couleurs_liste(); # updates buttons # - old one $self->style_bouton_code($oldcode); # - new one $self->style_bouton($inom,1); } # Cancels manual association of current sheet. # # {OUT:} sub efface_manuel { my ($self)=@_; my $i=$self->{'iimage'}; if($i>=0) { $self->{'assoc'}->begin_transaction('ADEL'); $self->{'capture'}->outdate_annotated_copy(@sc); my @sc=$self->image_sc($i); my @r=$self->sc2inom(@sc); $self->{'assoc'}->set_manual(@sc,undef); # update buttons # - old ones for(@r) { $self->style_bouton($_); } # - new one $self->style_bouton('IMAGE',1); $self->maj_contenu_liste_sc(@sc); $self->maj_couleurs_liste(); $self->set_n_cols() if(!$self->{'show_all'}); $self->{'assoc'}->end_transaction('ADEL'); } } # Tells that current sheet is not to be associated with any of the # students from the list. # # {OUT:} sub inconnu { my ($self)=@_; my $i=$self->{'iimage'}; if($i>=0) { $self->{'assoc'}->begin_transaction('AUNK'); $self->{'capture'}->outdate_annotated_copy(@sc); my @sc=$self->image_sc($i); my @r=$self->sc2inom(@sc); $self->{'assoc'}->set_manual(@sc,'NONE'); for(@r) { $self->style_bouton($_); } $self->maj_contenu_liste_sc(@sc); $self->maj_couleurs_liste(); $self->set_n_cols() if(!$self->{'show_all'}); $self->{'assoc'}->end_transaction('AUNK'); } } # Go to the sheet pointed with the mouse in the list. # # {OUT:} sub goto_from_list { my ($self,$widget, $event) = @_; my ($path,$focus)=$self->{'copies_tree'}->get_cursor(); if($path) { my $iter=$self->{'copies_store'}->get_iter($path); my $etu=$self->{'copies_store'}->get($iter,COPIES_N); my $i=$self->{'copies_store'}->get($iter,COPIES_IIMAGE); if(defined($i)) { $self->{'assoc'}->begin_read_transaction('AGFL'); $self->charge_image($i); $self->{'assoc'}->end_transaction('AGFL'); } } return TRUE; } # Go to line $i of the list. # # {OUT:} sub goto_image { my ($self,$i)=@_; debug "goto_image($i)"; if($i>=0) { my $iter=model_id_to_iter($self->{'copies_store'},COPIES_IIMAGE,$i); my $path=$self->{'copies_store'}->get_path($iter); $self->{'copies_tree'}->set_cursor($path,undef,FALSE); } else { my $sel=$self->{'copies_tree'}->get_selection; $sel->unselect_all(); $self->{'assoc'}->begin_read_transaction('ACHI'); $self->charge_image($i); $self->{'assoc'}->end_transaction('ACHI'); } } # Is a sheet selected? Activate buttons or not depending on that. # # {X:X} sub vraie_copie { my ($self,$oui)=@_; for(qw/bouton_effacer bouton_inconnu/) { $self->{$_}->set_sensitive($oui); } } # Returns the (student,copy) array corresponding to sheet at line $i # in the sheets list. # # {X:X} sub image_sc { my ($self,$i)=@_; return(map { $self->{'images'}->[$i]->{$_} } (qw/student copy/)); } # Returns (student,copy) as a single string, corresponding to sheet at # line $i in the sheets list. # # {X:X} sub image_sc_string { my ($self,$i)=@_; return((__"Sheet")." ".studentids_string($self->image_sc($i))); } # Returns the image file name corresponding to sheet at line $i in the # sheets list. # # {X:X} sub image_filename { my ($self,$i)=@_; return(undef) if ($i<0 || $i>$#{$self->{'images'}}); return( $self->{'images'}->[$i]->{'file'} ); } # Shows name field image corresponding to sheet at line $i in the # sheets list. # # {X:IN} sub charge_image { my ($self,$i)=(@_); $self->style_bouton('IMAGE',0); my $file=$self->image_filename($i); if(defined($file)) { if($file) { if($file =~ /^text:(.*)/) { $self->{'photo'}->set_content(text=>$1); } else { $self->{'photo'}->set_content(image=>$file); } } else { my $text=pageids_string(map { $self->{'images'}->[$i]->{$_} } (qw/student page copy/)); $self->{'photo'}->set_content(text=>$text); } $self->{'image_sc'} = [$self->image_sc($i)]; $self->vraie_copie(1); } else { $i=-1; $self->{'photo'}->set_image(background_color=>'#6CB9ED',text=>__"End"); $self->vraie_copie(0); } $self->{'iimage'}=$i; $self->style_bouton('IMAGE',1); $self->{'titre'}->set_text(($i>=0 ? $self->image_sc_string($i) : "---")); } # Returns the line number $i from sheets list adding $pas to it. # # {X:X} sub i_suivant { my ($self,$i,$pas)=(@_); $pas=1 if(!$pas); $i+=$pas; if($i<0) { $i=$#{$self->{'images'}}; } if($i>$#{$self->{'images'}}) { $i=0; } return($i); } # Move in the sheets list, adding $pas to current position. # # {OUT:} sub image_suivante { my ($self,$pas)=(@_); $pas=1 if(!$pas); my $i=$self->i_suivant($self->{'iimage'},$pas); $self->{'assoc'}->begin_read_transaction('ALIS'); while($i != $self->{'iimage'} && ($self->{'assoc'}->with_association($self->image_sc($i)) && ! $self->{'associes_cb'}->get_active()) ) { $i=$self->i_suivant($i,$pas); if($pas==1) { $i=-1 if($i==0 && $self->{'iimage'}==-1); } if($pas==-1) { $i=-1 if($i==$#{$self->{'images'}} && $self->{'iimage'}==-1); } } $self->{'assoc'}->end_transaction('ALIS'); if($self->{'iimage'} != $i) { $self->goto_image($i) ; } else { $self->goto_image(-1) ; } } # Go to next sheet. # # {X:OUT} sub va_suivant { my ($self)=(@_); $self->image_suivante(1); } # Go to previous sheet. # # {X:OUT} sub va_precedent { my ($self)=(@_); $self->image_suivante(-1); } # Sets the content and style of a button, according to the association # made with the student corresponding to the button. # # {IN:} sub style_bouton { my ($self,$i,$actif)=(@_); my @sc; if($i eq 'IMAGE') { return() if($self->{iimage}<0); my @sc=$self->image_sc($self->{iimage}); if(@sc) { ($i)=$self->sc2inom(@sc); return() if(!defined($i)); } else { return(); } } my $pris=studentids_string($self->{'assoc'}->real_back($self->inom2code($i))); $self->{'taken_list'}->[$i]=$pris; my $b=$self->{'boutons'}->[$i]; my $eb=$self->{'boutons_eb'}->[$i]; if($b) { if($pris) { $b->set_relief(GTK_RELIEF_NONE); $b->override_background_color('prelight',($actif ? $col_actif : $col_pris)); $b->get_child()->set_text($self->{'liste'}->data_n($i,'_ID_')." ($pris)"); } else { $b->set_relief(GTK_RELIEF_NORMAL); $b->override_background_color('prelight',undef); $b->get_child()->set_text($self->{'liste'}->data_n($i,'_ID_')); } if($eb) { my $col=undef; $col=$col_actif_fond if($actif); for(qw/normal active selected/) { $eb->override_background_color($_,$col); } } else { debug_and_stderr "*** no EventBox for $i ***\n"; } } else { debug_and_stderr "*** no button for $i ***\n"; } } # Calls style_button for the button of the student whose primary key # ID is $code. # # {X:IN} sub style_bouton_code { my ($self,$code,$actif)=@_; for($self->{'liste'}->data($self->{'liste_key'},$code, test_numeric=>1,'all'=>1,'i'=>1)) { $self->style_bouton($_,$actif); } } # Choose student at line $i in the students list file to be associated # with current sheet from the list. # # {OUT:} sub choisit { my ($self,$i)=(@_); if($self->{'iimage'}>=0) { $self->{'assoc'}->begin_transaction('ASWT'); $self->{'capture'}->outdate_annotated_copy(@{$self->{'image_sc'}}); $self->lie($i,@{$self->{'image_sc'}}); $self->{'assoc'}->end_transaction('ASWT'); $self->set_n_cols() if(!$self->{'show_all'}); $self->image_suivante(); } } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Gui/Avancement.pm000066400000000000000000000052161341176102400226530ustar00rootroot00000000000000# # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Gui::Avancement; use AMC::Basic; sub new { my ($entier,%o)=(@_); my $self={'entier'=>$entier, 'progres'=>0, 'debug'=>0, 'epsilon'=>0.02, 'lastshown'=>0, 'id'=>'', 'bar'=>'', }; for (keys %o) { $self->{$_}=$o{$_} if(defined($self->{$_})); } debug "Create progression pipe for <".$self->{id}."> up to $entier". ($self->{bar}?" (progress bar side)":""); bless $self; $|++ if($self->{'id'}); return($self); } sub progres { my ($self,$suite)=(@_); $suite *= $self->{'entier'}; $self->{'progres'}+=$suite; if($self->{'progres'}>$self->{'entier'}) { $suite-=$self->{'progres'}-$self->{'entier'}; $self->{'progres'}=$self->{'entier'}; } print "===<".$self->{'id'}.">=+$suite\n" if($self->{'id'}); } sub text { my ($self,$text)=(@_); print "===<".$self->{'id'}.">=T($text)\n" if($self->{'id'}); } sub progres_abs { my ($self,$suite)=(@_); $self->progres($suite-$self->{'progres'}); } sub fin { my ($self,$suite)=(@_); $self->progres_abs(1); } sub etat { my ($self)=@_; return($self->{'progres'}); } sub lit { my ($self,$s)=(@_); my $r=-1; if($s =~ /===<(.*)>=\+([0-9,.]+(?:e[+-]?[0-9]+)?)/) { my $id=$1; my $suite=$2; $suite =~ s/,/./; $self->{'progres'}+=$suite; if($self->{'progres'}<0) { debug("progres($id)=$self->{'progres'}"); $self->{'progres'}=0; } if($self->{'progres'}>1) { debug("progres($id)=$self->{'progres'}"); $self->{'progres'}=1; } $r=$self->{'progres'}; } if($s =~ /===<(.*)>=T\((.*)\)$/) { if($self->{'bar'}) { $self->{'bar'}->set_text($2); } $self->{'progres'}=0; $r=0; } if($r>=0 && $self->{'bar'}) { $self->{'bar'}->set_fraction($r); if($r==0 || $r>=$self->{'lastshown'}+$self->{'epsilon'}) { $self->{'lastshown'}=$r; } } return($r); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Gui/Commande.pm000066400000000000000000000124761341176102400223230ustar00rootroot00000000000000#! /usr/bin/perl -w # # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Gui::Commande; use Glib; use Encode; use AMC::Basic; use AMC::Gui::Avancement; use AMC::Messages; @ISA=("AMC::Messages"); sub new { my %o=(@_); my $self={ 'commande'=>'', 'log'=>'', 'avancement'=>'', 'texte'=>'', 'progres.id'=>'', 'progres.pulse'=>'', 'fin'=>'', 'finw'=>'', 'signal'=>9, 'o'=>{}, 'clear'=>1, 'output_to_debug'=>(debug_file() eq 'stdout'), 'messages'=>[], 'variables'=>{}, 'pid'=>'', 'avance'=>'', 'fh'=>'', 'tag'=>[], 'pid'=>'', }; for (keys %o) { $self->{$_}=$o{$_} if(defined($self->{$_}) || /^niveau/); } $self->{'commande'}=[$self->{'commande'}] if(!ref($self->{'commande'})); bless $self; return($self); } sub proc_pid { my ($self)=(@_); return($self->{'pid'}); } sub erreurs { my ($self)=(@_); return($self->get_messages('ERR')); } sub warnings { my ($self)=(@_); return($self->get_messages('WARN')); } sub variables { my ($self)=(@_); return(%{$self->{'variables'}}); } sub variable { my ($self,$k)=(@_); return $self->{'variables'}->{$k}; } sub quitte { my ($self)=(@_); $self->{closing}=1; $self->stop_watch(); my $pid=$self->proc_pid(); debug "Canceling command [".$self->{'signal'}."->".$pid."]."; kill $self->{'signal'},$pid if($pid =~ /^[0-9]+$/); $self->close(cancelled=>1); } sub open { my ($self)=@_; $self->{'times'}=[times()]; $self->{'pid'}=open($self->{'fh'},"-|",@{$self->{'commande'}}); if(defined($self->{'pid'})) { push @{$self->{'tag'}}, Glib::IO->add_watch( fileno( $self->{'fh'} ), in => sub { $self->get_output() }), Glib::IO->add_watch( fileno( $self->{'fh'} ), hup => sub { $self->get_output() }); debug "Command [".$self->{'pid'}."] : " .join(' ',map { /\s/ || ! $_ ? "\"$_\"" : $_ } @{$self->{'commande'}}); if($self->{'avancement'}) { $self->{'avancement'}->set_text($self->{'texte'}); $self->{'avancement'}->set_fraction(0); $self->{'avancement'}->set_pulse_step($self->{'progres.pulse'}) if($self->{'progres.pulse'}); } $self->{'avance'}=AMC::Gui::Avancement::new (0,'bar'=>$self->{'avancement'}); $self->{'log'}->get_buffer()->set_text('') if($self->{'clear'}); } else { print STDERR "ERROR execing command\n".join(' ',@{$self->{'commande'}})."\n"; } } sub stop_watch { my ($self)=@_; for my $t (@{$self->{tag}}) { Glib::Source->remove( $t ); } $self->{tag}=[]; } sub close { my ($self,%data)=@_; $self->stop_watch(); close($self->{'fh'}); debug "Command [".$self->{'pid'}."] : OK - ".($self->n_messages('ERR'))." erreur(s)\n"; my @tb=times(); debug sprintf("Total parent exec times during ".$self->{pid}.": [%7.02f,%7.02f]",$tb[0]+$tb[1]-$self->{'times'}->[0]-$self->{'times'}->[1],$tb[2]+$tb[3]-$self->{'times'}->[2]-$self->{'times'}->[3]); $self->{'pid'}=''; $self->{'tag'}=''; $self->{'fh'}=''; $self->{'avancement'}->set_text(''); &{$self->{'finw'}}($self,%data) if($self->{'finw'}); if($self->{'fin'}) { debug "Calling hook @".$self; &{$self->{'fin'}}($self,%data); } } sub get_output { my ($self)=@_; return if($self->{closing}); if( eof($self->{'fh'}) ) { debug "END of input"; $self->close(); } else { my $fh=$self->{'fh'}; my $line = <$fh>; utf8::decode($line); if($self->{output_to_debug}) { debug_raw($line); } if($self->{'avancement'}) { if($self->{'progres.pulse'}) { $self->{'avancement'}->pulse; } else { $self->{'avance'}->lit($line); } } my $log=$self->{'log'}; my $logbuff=$log->get_buffer(); $logbuff->insert($logbuff->get_end_iter(),$line); $logbuff->place_cursor($logbuff->get_end_iter()); $log->scroll_to_iter($logbuff->get_end_iter(),0,0,0,0); if($line =~ /^(ERR|INFO|WARN)/) { chomp(my $lc=$line); $lc =~ s/^(ERR|INFO|WARN)[:>]\s*//; my $type=$1; debug "Detected $type message"; $self->add_message($type,$lc); } if($line =~ /^VAR:\s*([^=]+)=(.*)/) { $self->{'variables'}->{$1}=$2; debug "Set variable @".$self." $1 to ".$self->{'variables'}->{$1}; } if($line =~ /^VAR\+:\s*(.*)/) { $self->{'variables'}->{$1}++; debug "Step variable @".$self." $1 to ".$self->{'variables'}->{$1}; } for my $k (qw/OK FAILED/) { if($line =~ /^$k/) { $self->{'variables'}->{$k}++; } } } return 1; } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Gui/Manuel.glade000066400000000000000000000667221341176102400224640ustar00rootroot00000000000000 True False gtk-copy 100 1 10 True False Paper data capture True False vertical 4 False vertical True False center True False Go to: False False 0 True True Enter paper number, or page number like 102/4 (page 4 from paper 102), then press enter. False False False False 1 False False 0 True False gtk-go-back False True True True True Go to the previous page. True False False 0 gtk-quit False True True True True Quit True False False 1 gtk-go-forward False True True True True Go to next page. True False False 2 True True 1 True False False True 2 False False 0 True False 2 True True scan_yadjust never True False 420 600 True False GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK True True 0 False True False vertical False True 0 True False vertical 2 True False 2 True False 0 0 True True 0 True False Go to: False False 1 True True Enter paper number, or page number like 102/4 (page 4 from paper 102), then press enter. False False True True 2 False False 0 True False gtk-go-back False True True True True Save this page modifications, then go to the previous page. True False False 0 True False Choose if you want to navigate through all pages, through pages with invalid answers, or through pages with invalid or empty answers. 0 False False 1 gtk-go-forward False True True True True Save this page modifications, then go to next page. True False False 2 False False 1 True False 5 True False Focus on question: False True 0 True False 0 True True 1 False True 2 True True True True True True 3 True False Add photocopy False True True True image1 False False 0 gtk-clear False True True True True Remove manual modifications for this page. Automatic data capture for this page, if any, won&apos; t be changed. Remove manual modifications for this page. Automatic data capture for this page, if any, won't be changed. True False False 1 False False 5 True False gtk-undo False True True True True Cancel modifications for this page True False False 0 gtk-quit False True True True True Save and quit True False False 1 False False 6 False False 1 False False 1 True True 1 auto-multiple-choice-1.4.0/AMC-perl/AMC/Gui/Manuel.pm000066400000000000000000000540301341176102400220110ustar00rootroot00000000000000#! /usr/bin/perl -w # # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Gui::Manuel; use Getopt::Long; use Gtk3 -init; use XML::Simple; use File::Spec::Functions qw/splitpath catpath splitdir catdir catfile rel2abs tmpdir/; use File::Temp qw/ tempfile tempdir /; use AMC::Path; use AMC::Basic; use AMC::Gui::PageArea; use AMC::Gui::WindowSize; use AMC::Data; use AMC::DataModule::capture qw/:zone/; use constant { MDIAG_ID => 0, MDIAG_ID_BACK => 1, MDIAG_EQM => 2, MDIAG_DELTA => 3, MDIAG_EQM_BACK => 4, MDIAG_DELTA_BACK => 5, MDIAG_I => 6, MDIAG_STUDENT => 7, MDIAG_PAGE => 8, MDIAG_COPY => 9, MDIAG_WHY => 10, }; use_gettext; sub new { my %o=(@_); my $self={'data-dir'=>'', 'project-dir'=>'', 'sujet'=>'', 'etud'=>'', 'dpi'=>75, 'seuil'=>0.1, 'seuil_up'=>1.0, 'seuil_sens'=>8.0, 'seuil_eqm'=>3.0, 'fact'=>1/4, 'iid'=>0, 'displayed_iid'=>-1, 'global'=>0, 'en_quittant'=>'', 'encodage_interne'=>'UTF-8', 'image_type'=>'xpm', 'editable'=>1, 'multiple'=>0, 'onscan'=>'', 'size_monitor'=>'', 'invalid_color_name'=>"#FFEF3B", 'empty_color_name'=>"#78FFED", 'navigate_q_id'=>-1, 'navigate_q_margin'=>10, }; for (keys %o) { $self->{$_}=$o{$_} if(defined($self->{$_})); } bless $self; # recupere la liste des fichiers MEP des pages qui correspondent $self->{'data'}=AMC::Data->new($self->{'data-dir'}); $self->{'layout'}=$self->{'data'}->module('layout'); $self->{'capture'}=$self->{'data'}->module('capture'); $self->{'scoring'}=$self->{'data'}->module('scoring'); $self->{'scoring'}=$self->{'data'}->module('scoring'); die "No PDF subject file" if(! $self->{'sujet'}); die "Subject file ".$self->{'sujet'}." not found" if(! -f $self->{'sujet'}); my $temp_loc=tmpdir(); $self->{'temp-dir'} = tempdir( DIR=>$temp_loc, CLEANUP => (!get_debug()) ); $self->{'tmp-image'}=$self->{'temp-dir'}."/page"; ## GUI my $glade_xml=__FILE__; $glade_xml =~ s/\.p[ml]$/.glade/i; $self->{'gui'}=Gtk3::Builder->new(); $self->{'gui'}->set_translation_domain('auto-multiple-choice'); $self->{'gui'}->add_from_file($glade_xml); for my $k (qw/general area navigation_h navigation_v goto goto_v diag_tree button_photocopy scan_view navigate navigate_question scan_yadjust/) { $self->{$k}=$self->{'gui'}->get_object($k); } $self->{'general'}->set_title(__"Page layout") if(!$self->{'editable'}); $self->{'button_photocopy'}->hide() if(!$self->{'multiple'}); if(!$self->{'editable'}) { $self->{'navigation_v'}->show(); } else { $self->{'scan_view_model'}=cb_model(0,__("Original"), 1,__("Scan")); $self->{'scan_view'}->set_model($self->{'scan_view_model'}); # TRANSLATORS: This is one of the choices for pages navigation in manual data capture window. Here, navigation goes through all pages. Please keep this text very short (say less than 5 letters) so that the window is not too large $self->{navigate_model}=cb_model(0,__("all"), # TRANSLATORS: This is one of the choices for pages navigation in manual data capture window. Here, navigation goes through pages with some invalid answers. Please keep this text very short (say less than 5 letters) so that the window is not too large 1,__("inv"), # TRANSLATORS: This is one of the choices for pages navigation in manual data capture window. Here, navigation goes through pages with empty or invalid answers. Please keep this text very short (say less than 5 letters) so that the window is not too large 2,__("i&e")); $self->{navigate}->set_model($self->{navigate_model}); $self->{navigate}->set_active_iter($self->{navigate_model}->get_iter_first); # get list of questions IDs $self->{'capture'}->begin_read_transaction; my @questions=sort { $a->{name} cmp $b->{name} } $self->{layout}->questions_list(); $self->{'capture'}->end_transaction; $self->{navigate_question_model}= cb_model(-1,__("all"),map { $_->{question}, $_->{name} } @questions); $self->{navigate_question}->set_model($self->{navigate_question_model}); $self->{navigate_question}-> set_active_iter($self->{navigate_question_model}-> get_iter_first); $self->{navigate_question}->signal_connect("changed",\&update_nav_question, $self); # show navigation tab $self->{'navigation_h'}->show(); } $self->{'cursor_watch'}=Gtk3::Gdk::Cursor->new('GDK_WATCH'); Gtk3::main_iteration while ( Gtk3::events_pending ); AMC::Gui::PageArea::add_feuille ($self->{'area'}, 'yfactor'=>2, invalid_color_name=>$self->{invalid_color_name}, empty_color_name=>$self->{empty_color_name}, 'editable'=>$self->{'editable'}, 'marks'=>($self->{'editable'} ? '' : 'blue')); AMC::Gui::WindowSize::size_monitor ($self->window,$self->{'size_monitor'}) if($self->{'size_monitor'}); Gtk3::main_iteration while ( Gtk3::events_pending ); ### modele DIAGNOSTIQUE SAISIE if($self->{'editable'}) { my ($renderer,$column); $renderer=Gtk3::CellRendererText->new; $column = Gtk3::TreeViewColumn->new_with_attributes (__"page", $renderer, text=> MDIAG_ID, 'background'=> MDIAG_ID_BACK); $column->set_sort_column_id(MDIAG_ID); $self->{'diag_tree'}->append_column ($column); $renderer=Gtk3::CellRendererText->new; $column = Gtk3::TreeViewColumn->new_with_attributes (__"MSE", $renderer, 'text'=> MDIAG_EQM, 'background'=> MDIAG_EQM_BACK); $column->set_sort_column_id(MDIAG_EQM); $self->{'diag_tree'}->append_column ($column); $renderer=Gtk3::CellRendererText->new; $column = Gtk3::TreeViewColumn->new_with_attributes (__"sensitivity", $renderer, 'text'=> MDIAG_DELTA, 'background'=> MDIAG_DELTA_BACK); $column->set_sort_column_id(MDIAG_DELTA); $self->{'diag_tree'}->append_column ($column); } $self->{'general'}->get_window()->set_cursor($self->{'cursor_watch'}); Gtk3::main_iteration while ( Gtk3::events_pending ); $self->maj_list_all; $self->{'general'}->get_window()->set_cursor(undef); $self->{'gui'}->connect_signals(undef,$self); $self->select_page(0); return($self); } sub new_diagstore { my ($self)=@_; $diag_store = Gtk3::ListStore->new ('Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', 'Glib::String', ); $diag_store->set_sort_func(MDIAG_EQM,\&sort_num,MDIAG_EQM); $diag_store->set_sort_func(MDIAG_DELTA,\&sort_num,MDIAG_DELTA); $diag_store->set_sort_func(MDIAG_ID,\&sort_from_columns, [{'type'=>'n','col'=>MDIAG_STUDENT}, {'type'=>'n','col'=>MDIAG_COPY}, {'type'=>'n','col'=>MDIAG_PAGE}, ]); $self->{'diag_store'}=$diag_store; return($diag_store); } sub sort_diagstore { my ($self)=@_; $self->{'diag_store'}->set_sort_column_id(MDIAG_ID,GTK_SORT_ASCENDING); } sub show_diagstore { my ($self)=@_; $self->{'diag_tree'}->set_model($self->{'diag_store'}); } sub window { my ($self)=@_; return($self->{'general'}); } ### sub scan_view_change { my ($self)=@_; $self->{'onscan'}=$self->{'scan_view'}->get_active(); $self->ecrit(); $self->{'area'}->{'onscan'}=$self->{'onscan'}; $self->charge_i(); } sub current_iter { my ($self)=@_; my @sel=$self->{'diag_tree'}->get_selection->get_selected_rows(); my $first_selected=$sel[0]->[0]; if(defined($first_selected)) { return( $self->{'diag_store'}->get_iter($first_selected) ); } else { return(); } } sub iter_to_spc { my ($self,$iter)=@_; if($iter) { return($self->{'diag_store'}->get($iter, MDIAG_STUDENT,MDIAG_PAGE,MDIAG_COPY)); } else { return(); } } sub current_spc { my ($self)=@_; return($self->iter_to_spc($self->current_iter)); } sub displayed_iter { my ($self)=@_; if(defined($self->{'displayed_iid'}) && $self->{'displayed_iid'}>=0) { return(model_id_to_iter($self->{'diag_store'},MDIAG_I,$self->{'displayed_iid'})); } } sub displayed_spc { my ($self)=@_; return($self->iter_to_spc($self->displayed_iter)); } sub page_selected { my ($self)=@_; my $current=$self->current_iter; if($current) { $self->ecrit(); $self->{'iid'}=$self->{'diag_store'}->get($current,MDIAG_I); $self->charge_i(); } return TRUE; } sub select_page_from_iter { my ($self,$iter)=@_; $self->{'diag_tree'}->set_cursor($self->{'diag_store'}->get_path($iter),undef,FALSE) if($iter); } sub select_page { my ($self,$iid)=@_; $self->select_page_from_iter(model_id_to_iter($self->{'diag_store'},MDIAG_I,$iid)); } sub maj_list_all { my ($self,$select_spc)=@_; $self->{'capture'}->begin_read_transaction; my $summary=$self->{'capture'} ->summaries('darkness_threshold'=>$self->{'seuil'}, 'darkness_threshold_up'=>$self->{'seuil_up'}, 'sensitivity_threshold'=>$self->{'seuil_sens'}, 'mse_threshold'=>$self->{'seuil_eqm'}, 'why'=>1); my $capture_free=[]; push @$capture_free,@{$self->{'capture'}->question_only_pages} if(!$self->{editable}); push @$capture_free,@{$self->{'capture'}->no_capture_pages}; $self->{'capture'}->end_transaction; $diag_store = $self->new_diagstore; debug "Adding ".(1+$#$summary)." summaries to list..."; my $select_iid=-1; my $i=0; for my $p (@$summary) { $diag_store ->insert_with_values($i, MDIAG_I,$i, MDIAG_ID,pageids_string($p->{'student'},$p->{'page'},$p->{'copy'}), MDIAG_STUDENT,$p->{'student'}, MDIAG_PAGE,$p->{'page'}, MDIAG_COPY,$p->{'copy'}, MDIAG_ID_BACK,$p->{'color'}, MDIAG_EQM,$p->{'mse_string'}, MDIAG_EQM_BACK,$p->{'mse_color'}, MDIAG_DELTA,$p->{'sensitivity_string'}, MDIAG_DELTA_BACK,$p->{'sensitivity_color'}, MDIAG_WHY,$p->{why}, ); $select_iid=$i if($select_spc && $select_spc->[0]==$p->{'student'} && $select_spc->[1]==$p->{'page'} && $select_spc->[2]==$p->{'copy'}); $i++; } debug "Adding ".(1+$#$capture_free)." free captures..."; for my $p (@$capture_free) { $diag_store ->insert_with_values($i, MDIAG_I,$i, MDIAG_ID,pageids_string(@$p), MDIAG_STUDENT,$p->[0], MDIAG_PAGE,$p->[1], MDIAG_COPY,$p->[2], MDIAG_ID_BACK,undef, MDIAG_EQM,'', MDIAG_EQM_BACK,undef, MDIAG_DELTA,'', MDIAG_DELTA_BACK,undef, MDIAG_WHY,'', ); $select_iid=$i if($select_spc && $select_spc->[0]==$p->[0] && $select_spc->[1]==$p->[1] && $select_spc->[2]==$p->[2]); $i++; } debug "Sorting..."; $self->sort_diagstore; debug "List complete."; $self->show_diagstore; $self->select_page($select_iid) if($select_iid); } sub maj_list_i { my ($self)=@_; return if(!$self->{'editable'}); my $iter=$self->displayed_iter; return if(!$iter); my @spc=$self->iter_to_spc($iter); return if(!@spc); debug "List update for SPC=".join(',',@spc); $self->{'capture'}->begin_read_transaction('lUPD'); my %ps=$self->{'capture'} ->page_summary(@spc, 'mse_threshold'=>$self->{'seuil_eqm'}, 'darkness_threshold'=>$self->{'seuil'}, 'darkness_threshold_up'=>$self->{'seuil_up'}, 'sensitivity_threshold'=>$self->{'seuil_sens'}, ); $self->{'capture'}->end_transaction('lUPD'); for my $k (keys %ps) { debug(" - $k = ".(defined($ps{$k}) ? $ps{$k} : '')); } $self->{'diag_store'}->set($iter, MDIAG_ID_BACK,$ps{'color'}, MDIAG_EQM,$ps{'mse_string'}, MDIAG_EQM_BACK,$ps{'mse_color'}, MDIAG_DELTA,$ps{'sensitivity_string'}, MDIAG_DELTA_BACK,$ps{'sensitivity_color'}, ); } sub choix { my ($self,$widget,$event)=(@_); $widget->choix($event); } sub une_modif { my ($self)=@_; $self->{'area'}->modif(); } sub page_id { my $i=shift; return("+".join('/',map { $i->{$_} } (qw/student page checksum/))."+"); } sub charge_i { my ($self)=@_; $self->{'layinfo'}={}; my $current_iter=$self->current_iter; my @spc=$self->iter_to_spc($current_iter); if(!@spc) { $self->{'area'}->set_content(); $self->{'displayed_iid'}=-1; return(); } $self->{'displayed_iid'}=$self->{'diag_store'}->get($current_iter,MDIAG_I); debug "ID ".pageids_string(@spc); $self->{'layout'}->begin_read_transaction; debug "page_info"; my @ep=@spc[0,1]; $self->{'info'}=$self->{'layout'}->page_info(@ep); my $page=$self->{'info'}->{'subjectpage'}; my $scan_file=proj2abs({'%PROJET'=>$self->{'project-dir'}}, $self->{'capture'}->get_scan_page(@spc)); utf8::downgrade($scan_file); debug "PAGE $page"; ################################ # fabrication du xpm ################################ my $display_image=''; my $tmp_image=''; my $tmp_ppm=''; debug "Making XPM"; if($self->{'onscan'} && -f $scan_file) { $display_image=$scan_file; } else { $self->{'general'}->get_window()->set_cursor($self->{'cursor_watch'}); Gtk3::main_iteration while ( Gtk3::events_pending ); system("pdftoppm","-f",$page,"-l",$page, "-r",$self->{'dpi'}, $self->{'sujet'}, $self->{'temp-dir'}."/page"); # recherche de ce qui a ete fabrique... opendir(TDIR,$self->{'temp-dir'}) || die "can't opendir $self->{'temp-dir'} : $!"; my @candidats = grep { /^page-.*\.ppm$/ && -f $self->{'temp-dir'}."/$_" } readdir(TDIR); closedir TDIR; debug "Candidates : ".join(' ',@candidats); $tmp_ppm=$self->{'temp-dir'}."/".$candidats[0]; $tmp_image=$tmp_ppm; if($self->{'image_type'} && $self->{'image_type'} ne 'ppm') { $tmp_image=$self->{'tmp-image'}.".".$self->{'image_type'}; debug "ppmto".$self->{'image_type'}." : $tmp_ppm -> $tmp_image"; system("ppmto".$self->{'image_type'}." \"$tmp_ppm\" > \"$tmp_image\""); } $display_image=$tmp_image; } ################################ # synchro variables ################################ if($spc[2]==0 && $self->{'multiple'} && $self->{'editable'}) { $self->{'layinfo'}->{'block_message'}=sprintf(__"This is a template exam that you cannot edit. To create a new exam from this one to be edited, use the '%s' button.",__"Add photocopy"); } else { debug "Getting layout info"; for (qw/box questionbox namefield digit scorezone/) { $self->{'layinfo'}->{$_}=[]; } if($self->{'onscan'}) { my %ci=(); for my $c (@{$self->{'capture'}->get_zones_corners(@spc)}) { %ci=(%$c,'xy'=>[], 'xmin'=>$c->{'x'},'xmax'=>$c->{'x'}, 'ymin'=>$c->{'y'},'ymax'=>$c->{'y'}, ) if($c->{'corner'}==1); push @{$ci{xy}},$c->{'x'},$c->{'y'}; $ci{'xmax'}=$c->{'x'} if($c->{'x'}>$ci{'xmax'}); $ci{'ymax'}=$c->{'y'} if($c->{'y'}>$ci{'ymax'}); $ci{'xmin'}=$c->{'x'} if($c->{'x'}<$ci{'xmin'}); $ci{'ymin'}=$c->{'y'} if($c->{'y'}<$ci{'ymin'}); push @{$self->{'layinfo'}->{'box'}},{%ci} if($c->{'corner'}==4); } } else { my $c; my $sth; for my $type (qw/box questionbox scorezone digit namefield/) { for my $c ($self->{'layout'}->type_info($type,@ep)) { push @{$self->{'layinfo'}->{$type}},{%$c}; } } $self->{'layinfo'}->{'page'}=$self->{'layout'}->page_info(@ep); } if($self->{editable}) { # gets scoring results to highlight empty and invalid answers for my $a (@{$self->{layinfo}->{box}}) { $a->{scoring}=$self->{scoring}->question_result(@spc[0,2],$a->{question}); } # mise a jour des cases suivant saisies deja presentes for my $i (@{$self->{'layinfo'}->{'box'}}) { my $id=$i->{'question'}."." .$i->{'answer'}; my $t=$self->{'capture'} ->ticked(@spc[0,2],$i->{'question'},$i->{'answer'}, $self->{'seuil'},$self->{'seuil_up'}); $t='' if(!defined($t)); debug "Q=$id R=$t"; $i->{'id'}=[@spc]; $i->{'ticked'}=$t; } } } $self->{'layout'}->end_transaction; # utilisation $self->{'area'}->set_content(image=>$display_image, layout_info=>$self->{'layinfo'}); unlink($tmp_ppm) if($tmp_ppm); unlink($tmp_image) if($tmp_image && ($tmp_ppm ne $tmp_image) && !get_debug()); # fin du traitement... $self->{'general'}->get_window()->set_cursor(undef); } sub ecrit { my ($self)=(@_); return if(!$self->{'editable'}); my @spc=$self->displayed_spc; return if(!@spc); if($self->{'area'}->modifs()) { debug "Saving ".pageids_string(@spc); $self->{'capture'}->begin_transaction('manw'); $self->{'capture'}->outdate_annotated_page(@spc); $self->{'capture'}->set_page_manual(@spc,time()); for my $i (@{$self->{'layinfo'}->{'box'}}) { $self->{'capture'} ->set_manual(@{$i->{'id'}}, ZONE_BOX,$i->{'question'},$i->{'answer'}, ($i->{'ticked'} ? 1 : 0)); } $self->{'capture'}->end_transaction('manw'); $self->synchronise(); } } sub synchronise { my ($self)=(@_); $self->{'area'}->sync(); $self->maj_list_i; } sub update_nav_question { my ($w,$self)=@_; $self->{navigate_q_id}=get_active_id($w); if($self->{navigate_q_id} >= 0) { $self->{layout}->begin_read_transaction; my @pages=$self->{layout}->pages_for_question($self->{navigate_q_id}); $self->{pages_ok}={map { pageids_string($_->{student},$_->{page}) => $_->{miny} } @pages}; $self->{layout}->end_transaction; debug "NAVQ_PAGES=".join(', ',keys %{$self->{pages_ok}}); $self->move_if_not_ok(); } } sub navigate_ok { my ($self,$nav_mode,$path)=@_; my $iter=$self->{diag_store}->get_iter($path); if($self->{navigate_q_id} >= 0) { my $student=$self->{diag_store}->get($iter,MDIAG_STUDENT); my $page=$self->{diag_store}->get($iter,MDIAG_PAGE); return(0) if(!exists($self->{pages_ok}->{pageids_string($student,$page)})); } return(1) if($nav_mode==0); my $why=$self->{diag_store}->get($iter,MDIAG_WHY); return(0) if($nav_mode==1 && $why !~ /E/); return(0) if($nav_mode==2 && $why !~ /[EV]/); return(1); } sub passe_precedent { my ($self)=@_; my $nav=$self->{navigate}->get_active(); my ($path)=$self->{'diag_tree'}->get_cursor(); if($path) { my $ok; do { $ok=$path->prev(); } while($ok && !$self->navigate_ok($nav,$path)); $self->{'diag_tree'}->set_cursor($path,undef,FALSE) if($ok); $self->focus(); } else { debug "Previous: no path"; } } sub passe_suivant { my ($self)=@_; my $nav=$self->{navigate}->get_active(); my ($path)=$self->{'diag_tree'}->get_cursor(); my $n=$self->{diag_store}->iter_n_children(undef); if($path) { do { $path->next(); } while($path->to_string<$n && !$self->navigate_ok($nav,$path)); $self->{'diag_tree'}->set_cursor($path,undef,FALSE) if($path->to_string<$n); $self->focus(); } else { debug "Next: no path"; } } sub focus { my ($self)=@_; if($self->{navigate_q_id} >= 0) { my $miny=$self->{area}->question_miny($self->{navigate_q_id})-$self->{navigate_q_margin}; $miny=0 if($miny<0); my $adj_upper=$miny+$self->{scan_yadjust}->get_page_size(); $adj_upper=$self->{area}->{ty} if($adj_upper<$self->{area}->{ty}); $self->{scan_yadjust}->set_upper($adj_upper); $self->{scan_yadjust}->set_value($miny); } else { $self->{scan_yadjust}->set_upper($self->{area}->{ty}); } } sub move_if_not_ok { my ($self)=@_; my $nav=$self->{navigate}->get_active(); my ($path)=$self->{'diag_tree'}->get_cursor(); if(!$self->navigate_ok($nav,$path)) { $self->passe_suivant(); } $self->focus(); } sub annule { my ($self)=(@_); $self->charge_i(); } sub efface_saisie { my ($self)=(@_); my @spc=$self->displayed_spc; return if(!@spc); debug "Ereasing manual data for SPC=".join(',',@spc); $self->{'capture'}->begin_transaction('manx'); $self->{'capture'}->outdate_annotated_page(@spc); $self->{'capture'}->remove_manual(@spc); $self->{'capture'}->end_transaction('manx'); $self->synchronise(); $self->charge_i(); } sub duplique_saisie { my ($self)=@_; my ($student,$page,$copy)=$self->displayed_spc; return if(!defined($student)); $self->{'capture'}->begin_transaction; $copy=$self->{'capture'}->new_page_copy($student,$page); annotate_source_change($self->{'capture'}); $self->{'capture'}->set_page_manual($student,$page,$copy,-1); $self->{'capture'}->end_transaction; $self->maj_list_all([$student,$page,$copy]); } sub ok_quitter { my ($self)=(@_); $self->ecrit(); $self->quitter(); } sub quitter { my ($self)=(@_); if($self->{'global'}) { Gtk3->main_quit; } else { $self->{'general'}->destroy; if($self->{'en_quittant'}) { &{$self->{'en_quittant'}}(); } } } sub goto_activate_cb { my ($self)=(@_); my $dest=$self->{($self->{'editable'} ? 'goto' : 'goto_v')}->get_text(); my $iid=-1; $self->ecrit(); debug "Go to $dest"; # recherche d'un ID correspondant $dest.='/' if($dest !~ m:/:); $self->select_page_from_iter(model_id_to_iter($self->{'diag_store'}, 're:'.MDIAG_ID,$dest)); } 1; __END__ auto-multiple-choice-1.4.0/AMC-perl/AMC/Gui/Notes.glade000066400000000000000000000055141341176102400223230ustar00rootroot00000000000000 True False Marks True False vertical True True 300 200 True True both True True 1 True False end gtk-close True True True True False False 0 False False 2 auto-multiple-choice-1.4.0/AMC-perl/AMC/Gui/Notes.pm000066400000000000000000000111661341176102400216630ustar00rootroot00000000000000#! /usr/bin/perl -w # # Copyright (C) 2009-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Gui::Notes; use AMC::Basic; use AMC::Gui::WindowSize; use Encode; use Gtk3 -init; use constant { TAB_ID => 0, TAB_NOTE => 1, TAB_COLOR => 2, TAB_DETAIL => 3, }; sub ajoute_colonne { my ($tree,$store,$titre,$i)=@_; my $renderer=Gtk3::CellRendererText->new; my $column = Gtk3::TreeViewColumn->new_with_attributes( $titre, $renderer, text=> $i, 'background'=>TAB_COLOR ); $column->set_sort_column_id($i); $tree->append_column($column); $store->set_sort_func($i,\&sort_num,$i); } sub formatte { my ($x)=@_; $x=(defined($x) ? sprintf("%.2f",$x) : ''); $x =~ s/0+$//; $x =~ s/\.$//; return($x); } sub new { my %o=(@_); my $self={ scoring=>'', layout=>'', size_prefs=>'', }; my $it; for (keys %o) { $self->{$_}=$o{$_} if(defined($self->{$_})); } bless $self; my $glade_xml=__FILE__; $glade_xml =~ s/\.p[ml]$/.glade/i; $self->{'gui'}=Gtk3::Builder->new(); $self->{'gui'}->set_translation_domain('auto-multiple-choice'); $self->{'gui'}->add_from_file($glade_xml); for my $k (qw/general tableau/) { $self->{$k}=$self->{'gui'}->get_object($k); } if($self->{'general'}->get_direction() eq 'rtl') { $self->{'tableau'}->set_grid_lines('horizontal'); } $self->{'gui'}->connect_signals(undef,$self); $self->{'scoring'}->begin_read_transaction; for (qw/student copy/) { $self->{'postcorrect_'.$_}= $self->{'scoring'}->variable('postcorrect_'.$_); $self->{'postcorrect_'.$_}=-1 if(!defined($self->{'postcorrect_'.$_}) || $self->{'postcorrect_'.$_} eq ''); } my $code_digit_pattern = $self->{layout}->code_digit_pattern(); my @codes=$self->{'scoring'}->codes; my @questions=sort { $a->{'title'} cmp $b->{'title'} } grep { $_->{'title'} !~ /$code_digit_pattern$/ } ($self->{'scoring'}->questions); my $store = Gtk3::ListStore->new ( map {'Glib::String' } (1..(3+1+$#codes+1+$#questions)) ); $self->{'tableau'}->set_model($store); ajoute_colonne($self->{'tableau'},$store, translate_column_title("copie"),TAB_ID); ajoute_colonne($self->{'tableau'},$store, translate_column_title("note"),TAB_NOTE); my $i=TAB_DETAIL ; for((map { $_->{'title'}} @questions),@codes) { ajoute_colonne($self->{'tableau'},$store,decode('utf-8',$_),$i++); } my $row=0; my @vv; COPIE:for my $m ($self->{'scoring'}->marks) { my @sc=($m->{'student'},$m->{'copy'}); @vv=(TAB_ID,studentids_string(@sc), TAB_NOTE,formatte($m->{'mark'}), TAB_COLOR,($sc[0]==$self->{'postcorrect_student'} && $sc[1]==$self->{'postcorrect_copy'} ? '#CAEC87' : undef) ); $i=TAB_DETAIL ; for(@questions) { push @vv,$i++, formatte($self->{'scoring'}->question_score(@sc,$_->{'question'})); } for(@codes) { push @vv,$i++,$self->{'scoring'}->student_code(@sc,$_); } $store->insert_with_values($row++,@vv); } # Average row @vv=(TAB_ID,translate_id_name('moyenne'), TAB_NOTE,formatte($self->{'scoring'}->average_mark), ); $i=TAB_DETAIL ; for(@questions) { my $p; if($self->{'scoring'}->one_indicative($_->{'question'})) { $p='-'; } else { $p=$self->{'scoring'}->question_average($_->{'question'}); if($p ne '-') { $p=sprintf("%.0f%%",$p); } else { $p='?'; } } push @vv,$i++,$p; } for(@codes) { push @vv,$i++,'---'; } $store->insert_with_values($row++,@vv); $self->{'scoring'}->end_transaction; AMC::Gui::WindowSize::size_monitor ($self->{general},{config=>$self->{size_prefs}, key=>'marks_window_size'}); return($self); } sub quitter { my ($self)=(@_); if($self->{'global'}) { Gtk3->main_quit; } else { $self->{'general'}->destroy; } } 1; __END__ auto-multiple-choice-1.4.0/AMC-perl/AMC/Gui/PageArea.pm000066400000000000000000000265411341176102400222430ustar00rootroot00000000000000#! /usr/bin/perl -w # # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Gui::PageArea; use Gtk3; use AMC::Basic; @ISA=("Gtk3::DrawingArea"); sub add_feuille { my ($self,%oo)=@_; bless($self,"AMC::Gui::PageArea"); $self->{image_file}=''; $self->{text}=''; $self->{background_color}=''; $self->{'marks'}=''; $self->{'i-src'}=''; $self->{'tx'}=1; $self->{'ty'}=1; $self->{'yfactor'}=1; $self->{'min_render_size'}=10; $self->{'case'}=''; $self->{'coches'}=''; $self->{'editable'}=1; $self->{'onscan'}=''; $self->{unticked_color_name}="#429DE5"; $self->{question_color_name}="#47D265"; $self->{scorezone_color_name}="#DE61E2"; $self->{empty_color_name}="#78FFED"; $self->{invalid_color_name}="#FFEF3B"; $self->{drawings_color_name}="red"; $self->{text_color_name}="black"; $self->{linewidth_zone}=1; $self->{linewidth_box}=1; $self->{linewidth_box_scan}=2; $self->{box_external}=4; $self->{linewidth_special}=4; $self->{'font'}=Pango::FontDescription::from_string("128"); for (keys %oo) { $self->{$_}=$oo{$_} if(defined($self->{$_})); } for my $type ('',qw/scorezone_ question_ unticked_ empty_ invalid_ drawings_ text_/) { $self->{$type.'color'}= Gtk3::Gdk::RGBA::parse($self->{$type.'color_name'}) if($type); } if($self->{'marks'}) { $self->{'colormark'}= Gtk3::Gdk::RGBA::parse($self->{'marks'}); } $self->signal_connect('size-allocate'=>\&allocate_drawing); $self->signal_connect('draw'=>\&draw); return($self); } sub set_background { my ($self,$color)=@_; if($color) { $self->{background_color}=Gtk3::Gdk::RGBA::parse($color); } else { $self->{background_color}=''; } } sub set_text { my ($self,$text)=@_; $self->{text}=$text; } sub set_image { my ($self,$image,$layinfo)=@_; $self->{image_file}=$image; if($image && -f $image) { eval { $self->{'i-src'} = Gtk3::Gdk::Pixbuf->new_from_file(Glib::filename_to_unicode($image)); }; if($@) { # Error loading scan... $self->{'i-src'}=''; } else { $layinfo->{'page'}->{'width'}=$self->{'i-src'}->get_width if(!$layinfo->{'page'}->{'width'}); $layinfo->{'page'}->{'height'}=$self->{'i-src'}->get_height if(!$layinfo->{'page'}->{'height'}); } } else { $self->{'i-src'}=''; } $self->{'layinfo'}=$layinfo; $self->{'modifs'}=0; $self->allocate_drawing(); $self->queue_draw(); } sub set_content { my ($self,%o)=@_; debug("PageArea content set to ".join(" ",%o)); $self->set_background($o{background_color}); $self->set_text($o{text}); $self->set_image($o{image},$o{layout_info}); } sub get_image { my ($self)=@_; return($self->{'i-src'}); } sub modifs { my $self=shift; return($self->{'modifs'}); } sub sync { my $self=shift; $self->{'modifs'}=0; } sub modif { my $self=shift; $self->{'modifs'}=1; } sub choix { my ($self,$event)=(@_); if(!$self->{'editable'}) { return TRUE; } if($self->{'layinfo'}->{'block_message'}) { my $dialog = Gtk3::MessageDialog ->new(undef, 'destroy-with-parent', 'error','ok',''); $dialog->set_markup($self->{'layinfo'}->{'block_message'}); $dialog->run; $dialog->destroy; return TRUE; } if($self->{'layinfo'}->{'box'}) { if ($event->button == 1) { my ($x,$y)=($event->x,$event->y); debug "Click $x $y\n"; for my $i (@{$self->{'layinfo'}->{'box'}}) { if($x<=$i->{'xmax'}*$self->{'rx'} && $x>=$i->{'xmin'}*$self->{'rx'} && $y<=$i->{'ymax'}*$self->{'ry'} && $y>=$i->{'ymin'}*$self->{'ry'}) { $self->{'modifs'}=1; debug " -> box $i\n"; $i->{'ticked'}=!$i->{'ticked'}; $self->queue_draw(); } } } } return TRUE; } sub extend { my ($external,@xy)=@_; return(@xy) if($external==0); # computes x and y means my $mx=0; my $my=0; for(my $ix = 0; $ix <= $#xy; $ix += 2) { $mx+=$xy[$ix]; $my+=$xy[$ix+1]; } my @centroid=($mx / ((1+$#xy)/2) , $my / ((1+$#xy)/2)); # extend from the centroid for(my $ix = 0; $ix <= $#xy; $ix += 2) { my $l=sqrt( ($xy[$ix]-$centroid[0])**2 + ($xy[$ix+1]-$centroid[1])**2 ); my $alpha=($l+$external)/$l; for my $i (0,1) { $xy[$ix+$i]=$centroid[$i]+$alpha*($xy[$ix+$i]-$centroid[$i]) } } return(@xy); } sub draw_box { my ($self,$context,$box,$fill,$external)=@_; $external=0 if(!$external); if($box->{'xy'}) { $context->new_path; $context->move_to($box->{'xy'}->[0]*$self->{'rx'}, $box->{'xy'}->[1]*$self->{'ry'}); for my $i (1..3) { $context->line_to($box->{'xy'}->[$i*2]*$self->{'rx'}, $box->{'xy'}->[$i*2+1]*$self->{'ry'}); } $context->close_path; if($fill) { $context->fill; } else { $context->stroke; } } else { $context->new_path(); $context->rectangle ( $box->{'xmin'}*$self->{'rx'}-$external, $box->{'ymin'}*$self->{'ry'}-$external, ($box->{'xmax'}-$box->{'xmin'})*$self->{'rx'}+2*$external, ($box->{'ymax'}-$box->{'ymin'})*$self->{'ry'}+2*$external ); if($fill) { $context->fill; } else { $context->stroke; } } } sub box_miny { my ($self,$box)=@_; my $miny=$self->{'ty'}; if($box->{'xy'}) { for my $i (0..3) { my $y=$box->{'xy'}->[$i*2+1]*$self->{'ry'}; $miny=$y if($y<$miny); } } else { $miny=$box->{'ymin'}*$self->{'ry'}; } return($miny); } sub question_miny { my ($self,$question)=@_; my $miny=$self->{'ty'}; for my $l (@{$self->{'layinfo'}->{'box'}}) { if($l->{question}==$question) { my $y=$self->box_miny($l); $miny=$y if($y<$miny); } } return($miny); } sub allocate_drawing { my ($self,$evenement,@donnees)=@_; my $r=$self->get_allocation(); if($self->{'i-src'}) { $self->{'tx'}=$r->{width}; $self->{'ty'}=$self->{'yfactor'}*$r->{height}; debug("Rendering target size: ".$self->{'tx'}."x".$self->{'ty'}); my $sx=$self->{'tx'}/$self->{'i-src'}->get_width; my $sy=$self->{'ty'}/$self->{'i-src'}->get_height; if($sx<$sy) { $self->{'ty'}=int($self->{'i-src'}->get_height*$sx); $sy=$self->{'ty'}/$self->{'i-src'}->get_height; } if($sx>$sy) { $self->{'tx'}=int($self->{'i-src'}->get_width*$sy); $sx=$self->{'tx'}/$self->{'i-src'}->get_width; } $self->{'sx'}=$sx; $self->{'sy'}=$sy; $self->set_size_request(-1,$self->{'ty'}) if($self->{'yfactor'}>1); } else { $self->{tx}=$r->{width}; $self->{ty}=$r->{height}; } 0; } sub context_color { my ($self,$context,$color_name)=@_; my $c=$self->{$color_name."_color"}; $context->set_source_rgb($c->red,$c->green,$c->blue); } sub draw { my ($self,$context)=@_; $self->allocate_drawing() if(!$self->{'sx'} || !$self->{'sy'}); return() if($self->{'tx'}<$self->{'min_render_size'} || $self->{'ty'}<$self->{'min_render_size'}); my $sx=$self->{'sx'}; my $sy=$self->{'sy'}; if($self->{background_color}) { debug("Background color"); $self->context_color($context,'background'); $context->paint(); } if($self->{text}) { $self->context_color($context,'text'); $context->set_font_size(20); my $ext=$context->text_extents($self->{text}); my $r=$self->{'tx'}/$ext->{width}; my $ry=$self->{'ty'}/$ext->{height}; $r=$ry if($ry<$r); $context->set_font_size(20*$r); $ext=$context->text_extents($self->{text}); $context->move_to(-$ext->{x_bearing}+int(($self->{tx}-$ext->{width})/2), -$ext->{y_bearing}); $context->show_text($self->{text}); $context->stroke(); } if($self->{'i-src'}) { my $sx=$self->{'sx'}; my $sy=$self->{'sy'}; debug("Rendering with SX=$sx SY=$sy"); my $i=Gtk3::Gdk::Pixbuf->new(GDK_COLORSPACE_RGB,1,8,$self->{'tx'},$self->{'ty'}); $self->{'i-src'}->scale($i,0,0,$self->{'tx'},$self->{'ty'},0,0, $sx,$sy, GDK_INTERP_BILINEAR); Gtk3::Gdk::cairo_set_source_pixbuf($context,$i,0,0); $context->paint(); debug "Done with rendering"; } if(($self->{'layinfo'}->{'box'} || $self->{'layinfo'}->{'namefield'}) && ($self->{'layinfo'}->{'page'}->{'width'})) { my $box; debug "Layout drawings..."; $self->{'rx'}=$self->{'tx'}/$self->{'layinfo'}->{'page'}->{'width'}; $self->{'ry'}=$self->{'ty'}/$self->{'layinfo'}->{'page'}->{'height'}; # layout drawings if($self->{'marks'}) { Gtk3::Gdk::cairo_set_source_rgba($context,$self->{'colormark'}); for $box (@{$self->{'layinfo'}->{'namefield'}}) { $self->draw_box($context,$box,'',0); } $box=$self->{'layinfo'}->{'mark'}; if($box) { $context->new_path; for my $i (0..3) { my $j=(($i+1) % 4); $context->move_to($box->[$i]->{'x'}*$self->{'rx'}, $box->[$i]->{'y'}*$self->{'ry'}); $context->line_to($box->[$j]->{'x'}*$self->{'rx'}, $box->[$j]->{'y'}*$self->{'ry'}); } $context->stroke; } for my $box (@{$self->{'layinfo'}->{'digit'}}) { $self->draw_box($context,$box,'',0); } } ## boxes drawings $context->set_line_width($self->{linewidth_special}); $self->context_color($context,'invalid'); for $box (grep { $_->{scoring}->{why} && $_->{scoring}->{why} =~ /E/ } @{$self->{'layinfo'}->{'box'}}) { $self->draw_box($context,$box,'',$self->{box_external}); } $self->context_color($context,'empty'); for $box (grep { $_->{scoring}->{why} && $_->{scoring}->{why} =~ /V/ } @{$self->{'layinfo'}->{'box'}}) { $self->draw_box($context,$box,'',$self->{box_external}); } if($self->{'onscan'}) { $context->set_line_width($self->{linewidth_box_scan}); $self->context_color($context,'drawings'); for $box (grep { $_->{'ticked'} } @{$self->{'layinfo'}->{'box'}}) { $self->draw_box($context,$box,''); } $self->context_color($context,'unticked'); for $box (grep { ! $_->{'ticked'} } @{$self->{'layinfo'}->{'box'}}) { $self->draw_box($context,$box,''); } } else { $context->set_line_width($self->{linewidth_box}); $self->context_color($context,'drawings'); for $box (@{$self->{'layinfo'}->{'box'}}) { $self->draw_box($context,$box,$box->{'ticked'}); } $context->set_line_width($self->{linewidth_zone}); $self->context_color($context,'question'); for $box (@{$self->{'layinfo'}->{'questionbox'}}) { $self->draw_box($context,$box,''); } } $context->set_line_width($self->{linewidth_zone}); $self->context_color($context,'scorezone'); for $box (@{$self->{'layinfo'}->{'scorezone'}}) { $self->draw_box($context,$box,''); } debug "Done."; } } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Gui/Prefs.pm000066400000000000000000000223201341176102400216440ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2014-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Gui::Prefs; use AMC::Basic; use Data::Dumper; sub new { my (%o)=(@_); my $self={stores=>{}, shortcuts=>'', config=>'', kinds=>[qw/c cb ce col f s t v x fb p/], w=>{}, alternate_w=>'', }; for my $k (keys %o) { $self->{$k}=$o{$k} if(defined($self->{$k})); } bless $self; return($self); } sub store_register { my ($self,%c)=@_; for my $key (keys %c) { $self->{stores}->{$key}=$c{$key}; } } sub store_get { my ($self,$key)=@_; return($self->{stores}->{$key}); } sub default_object_options { my ($self,$o)=@_; $o->{store}=$o->{prefix} if(!$o->{store}); $o->{store}='default' if(!$o->{store}); $o->{prefix}='pref_' if(!$o->{prefix}); $o->{keys}=[] if(!$o->{keys}); } sub widget_store_set { my ($self,$full_key,$key,$kind,$widget,%o)=@_; $self->default_object_options(\%o); $self->{w}->{$o{store}}->{$full_key}= { widget=>$widget, full_key=>$full_key, key=>$key, kind=>$kind, }; } sub widget_store_get { my ($self,$full_key,%o)=@_; $self->default_object_options(\%o); my $full_key_alt=$full_key; $full_key_alt =~ s+:+:/+ if($full_key_alt !~ s+:/+:+); my $ww=$self->{w}->{$o{store}}->{$full_key} || $self->{w}->{$o{store}}->{$full_key_alt}; if($ww) { if($ww->{widget} && ref($ww->{widget}) =~ /^Gtk/) { return($ww); } else { debug "Non-Gtk widget store element: $ww"; } } $Data::Dumper::Indent = 0; debug "STORE: ".Dumper($self->{w}->{$o{store}}) if($o{trace}); return(); } sub widget_store_clear { my ($self,%o)=@_; $self->{w}->{$o{store}}={}; } sub widget_store_delete { my ($self,$key,%o)=@_; $self->default_object_options(\%o); delete $self->{w}->{$o{store}}->{$key}; } sub widget_store_keys { my ($self,%o)=@_; $self->default_object_options(\%o); return(keys %{$self->{w}->{$o{store}}}); } sub find_object { my ($self,$gap,$full_key,%o)=@_; $self->default_object_options(\%o); my $key=$full_key; $key =~ s/.*[\/:]//; if(!$gap) { my $record=$self->widget_store_get($full_key,%o); return($record->{widget},$record->{kind}) if($record); } for my $kind (@{$self->{kinds}}) { my $ww; if($gap) { $ww=$gap->get_object($o{prefix}.'_'.$kind.'_'.$key); } if(!$ww) { my $alt=$self->{alternate_w}->{$o{prefix}.'_'.$kind.'_'.$key}; if($alt) { debug " :alt: ".ref($alt); $ww=$alt; } } if($ww && ref($ww) =~ '^Gtk') { $self->widget_store_set($full_key,$key,$kind,$ww,%o); return($ww,$kind); } } return(''); } # transmet les preferences vers les widgets correspondants # _c_ combo box (menu) # _cb_ check button # _ce_ combo box entry # _col_ color chooser # _f_ file name # _s_ spin button # _t_ text # _v_ check button # _x_ one line text # _fb_ font button # _p_ password (label) sub transmet_pref { my ($self,$gap,%o)=@_; #,$prefix,$root,$alias,$seulement,$update)=@_; my $wp; $Data::Dumper::Indent = 0; debug "Updating GUI with options ".Dumper(\%o); $self->default_object_options(\%o); push @{$o{keys}}, map { "$o{root}/$_" } $self->{config}->list_keys_from_root($o{root}) if($o{root}); $o{keys}=[keys %{$o{hash}}] if($o{hash} && !@{$o{keys}}); for my $full_key (@{$o{keys}}) { my $value; if($o{hash}) { $value=$o{hash}->{$full_key}; } else { $value=$self->{config}->get($full_key); } if($o{container}) { $full_key =~ s/^.*:/$o{container}:/; } my $key=$full_key; $key =~ s/.*[\/:]//; my ($w,$kind)=$self->find_object($gap,$full_key,%o); debug "Key $full_key --> " .($w ? "found widget ".ref($w) : "NONE") .($kind ? " {$kind}" : "") ." [$o{store}]"; if(defined($value)) { debug " gui <- $value" if($w); } else { debug_and_stderr "WARNING: undefined value for key $full_key\n"; } if($w) { if ($kind eq 't') { $w->get_buffer->set_text($value); } elsif ($kind eq 'x') { $w->set_text($value); } elsif ($kind eq 'f') { my $path=$value; if ($self->{shortcuts}) { if ($key =~ /^projects_/) { $path=$self->{shortcuts}->absolu($path,''); } elsif ($key !~ /^rep_/) { $path=$self->{shortcuts}->absolu($path); } } if ($w->get_action =~ /-folder$/i) { mkdir($path) if(!-e $path); $w->set_current_folder($path); } else { $w->set_filename($path); } } elsif ($kind eq 'v') { $w->set_active($value); } elsif ($kind eq 's') { $w->set_value($value); } elsif ($kind eq 'fb') { $w->set_font_name($value); } elsif ($kind eq 'col') { my $c=Gtk3::Gdk::Color::parse($value); $w->set_color($c); } elsif ($kind eq 'cb') { $w->set_active($value); } elsif ($kind eq 'c') { if ($self->store_get($key)) { debug "CB_STORE($key) modifie ($key=>$value)"; $w->set_model($self->store_get($key)); my $i=model_id_to_iter($w->get_model,COMBO_ID,$value); if ($i) { debug("[$key] find $i", " -> ".$self->store_get($key)->get($i,COMBO_TEXT)); $w->set_active_iter($i); } } else { $self->widget_store_delete($full_key,%o); debug "no CB_STORE for $key"; $w->set_active($value); } } elsif ($kind eq 'ce') { if ($self->store_get($key)) { debug "CB_STORE($key) changed"; $w->set_model($self->store_get($key)); } my @we=grep { my (undef,$pr)=$_->class_path();$pr =~ /(yrtnE|Entry)/ } ($w->get_children()); if (@we) { $we[0]->set_text($value); $self->widget_store_set($full_key,$key,'x',$we[0],%o); } else { print STDERR "$key/CE : cannot find text widget\n"; } } elsif($kind eq 'p') { $w->set_text($self->{config}->get_passwd($key)); } } } debug "End GUI update for <$o{prefix}>"; } # met a jour les preferences depuis les widgets correspondants sub reprend_pref { my ($self,%o)=@_; #$prefixe,$root,$oprefix,$seulement)=@_; $Data::Dumper::Indent = 0; debug "Update configuration from GUI with options ".Dumper(\%o); $self->default_object_options(\%o); $o{keys}=[$self->widget_store_keys(%o)] if(!@{$o{keys}}); for my $key (@{$o{keys}}) { my $s=$self->widget_store_get($key,%o); if($s) { debug "Key $s->{full_key}: kind $s->{kind}"; my $found=1; if ($s->{kind} eq 'x') { $n=$s->{widget}->get_text(); } elsif($s->{kind} eq 't') { my $buf=$s->{widget}->get_buffer; $n=$buf->get_text($buf->get_start_iter,$buf->get_end_iter,1); } elsif($s->{kind} eq 'f') { if ($s->{widget}->get_action =~ /-folder$/i) { if (-d $s->{widget}->get_filename()) { $n=$s->{widget}->get_filename(); } else { $n=$s->{widget}->get_current_folder(); } } else { $n=$s->{widget}->get_filename(); } if ($self->{shortcuts}) { if ($s->{key} =~ /^projects_/) { $n=$self->{shortcuts}->relatif($n,''); } elsif ($s->{key} !~ /^rep_/) { $n=$self->{shortcuts}->relatif($n); } } } elsif($s->{kind} eq 'v') { $n=$s->{widget}->get_active(); } elsif($s->{kind} eq 's') { $n=$s->{widget}->get_value(); } elsif($s->{kind} eq 'fb') { $n=$s->{widget}->get_font_name(); } elsif($s->{kind} eq 'col') { $n=$s->{widget}->get_color()->to_string(); } elsif($s->{kind} eq 'cb') { $n=$s->{widget}->get_active(); } elsif($s->{kind} eq 'c') { if (my $model=$s->{widget}->get_model) { my ($ok,$iter)=$s->{widget}->get_active_iter; if ($ok && $iter) { $n=$s->{widget}->get_model->get($iter,COMBO_ID); } else { debug "No active iter for combobox $key [$o{store}]"; $n=''; } } else { $n=$s->{widget}->get_active(); } } elsif($s->{kind} eq 'p') { $self->{config}->set_passwd($s->{key},$s->{widget}->get_text()); $found=0; } else { $found=0; } if($found) { debug " gui -> $n"; if($o{container}) { $key=$o{container}.":".$key if($key !~ s/.*:/$o{container}:/) } if($o{hash}) { $o{hash}->{$key}=$n; } else { $self->{config}->set($key,$n); } } } else { debug "Key $key: widget not found [$o{store}]"; } } debug "Update <$o{prefix}> finished / changed: " .join(', ',$self->{config}->changed_keys()); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Gui/WindowSize.pm000066400000000000000000000037701341176102400226770ustar00rootroot00000000000000# -*- perl -*- # # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Gui::WindowSize; sub constraints { my ($x0, $dx, $dxmax)=@_; my $over = $$x0 + $$dx - $dxmax; if($over > 0) { if($over > $$x0) { $$x0 = 0; $$dx = $dxmax; } else { $$x0 -= $over; } } } sub size_monitor { my ($window, $options)=@_; if($options->{config}) { if($options->{config}->get($options->{key}) =~ /^([0-9]+)x([0-9]+)(?:\+([0-9]+)\+([0-9]+))?$/) { my $target_w = $1; my $target_h = $2; my $x = $3; $x = 0 if(!defined($x)); my $y = $4; $y = 0 if(!defined($y)); my $screen = $window->get_screen(); my $max_w = $screen->get_width; my $max_h = $screen->get_height; constraints(\$x, \$target_w, $max_w); constraints(\$y, \$target_h, $max_h); $window->move($x, $y); $window->resize($target_w, $target_h); } $window->signal_connect('configure-event' => \&AMC::Gui::WindowSize::resize, $options); } } sub resize { my ($window, $event, $options)=@_; if($options->{config} && $event->type eq 'configure') { my $dims=join('x', $event->width, $event->height); my $pos=join('+', $event->window->get_root_origin); $options->{config}->set($options->{key}, $dims . "+" . $pos); } 0; } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Gui/Zooms.glade000066400000000000000000000363321341176102400223440ustar00rootroot00000000000000 False Zooms True False vertical True False gtk-go-back False True True True True False False 0 True False False False 1 gtk-go-forward False True True True True right False False 2 False False 0 True False 2 center gtk-zoom-out False True True True True False False 0 gtk-zoom-in False True True True True False False 1 False True 1 True True vertical True False vertical True False 4 Unchecked boxes True False True 0 True True never True False queue True False True False True True 1 False True True False vertical True False 4 Checked boxes True False True 0 True True never True False queue True False True False True True 1 True True True True 2 True False 4 end True False Toggle mode. With 'click', left-click to toggle and right-click to toggle a group. 0 0 False False 0 gtk-close False True True True True False False 1 gtk-apply False True True True True False False 2 False True 4 auto-multiple-choice-1.4.0/AMC-perl/AMC/Gui/Zooms.pm000066400000000000000000000443621341176102400217060ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Gui::Zooms; use File::Spec::Functions qw/tmpdir/; use AMC::Basic; use AMC::DataModule::capture ':zone'; use AMC::Gui::Prefs; use Gtk3 -init; use POSIX qw(ceil); use constant { ID_AMC_BOX => 100, ZOOMS_EDIT_DND => 0, ZOOMS_EDIT_CLICK => 1, }; my $col_manuel = Gtk3::Gdk::RGBA::parse("#DFE085"); my $col_modif = Gtk3::Gdk::RGBA::parse("#E2B8B2"); sub new { my %o=(@_); my $self={ 'n_cols'=>4, 'factor'=>0.75, 'seuil'=>0.15, 'seuil_up'=>1.0, 'prop_min'=>0.30, 'prop_max'=>0.60, 'global'=>0, 'zooms_dir'=>"", 'page_id'=>[], 'data'=>'', 'data-dir'=>'', 'size-prefs'=>'', 'encodage_interne'=>'UTF-8', 'list_view'=>'', 'zooms_edit_mode'=>ZOOMS_EDIT_DND, 'global_options'=>'', 'prefs'=>'', }; for (keys %o) { $self->{$_}=$o{$_} if(defined($self->{$_})); } if($self->{global_options}) { $self->{zooms_edit_mode}=$self->{global_options}->get('zooms_edit_mode'); } $self->{prefs}->store_register( # TRANSLATORS: One of the ways to change a box's ticked state in the zooms window 'zooms_edit_mode'=>cb_model(ZOOMS_EDIT_DND,__"drag and drop", # TRANSLATORS: One of the ways to change a box's ticked state in the zooms window ZOOMS_EDIT_CLICK,__"click"), ); $self->{'ids'}=[]; $self->{'pb_src'}={}; $self->{'real_src'}={}; $self->{'pb'}={}; $self->{'image'}={}; $self->{'label'}={}; $self->{'n_ligs'}={}; $self->{'position'}={}; $self->{'eb'}={}; $self->{'conforme'}=1; bless $self; if($self->{'data'}) { $self->{'_capture'}=$self->{'data'}; } else { debug "Connecting to database..."; $self->{'_capture'}=AMC::Data->new($self->{'data-dir'}) ->module('capture'); debug "ok"; } if($self->{'size-prefs'}) { $self->{'factor'}=$self->{'size-prefs'}->get('zoom_window_factor') if($self->{'size-prefs'}->get('zoom_window_factor')); } $self->{'factor'}=0.1 if($self->{'factor'}<0.1); $self->{'factor'}=5 if($self->{'factor'}>5); my $glade_xml=__FILE__; $glade_xml =~ s/\.p[ml]$/.glade/i; $self->{'gui'}=Gtk3::Builder->new(); $self->{'gui'}->set_translation_domain('auto-multiple-choice'); $self->{'gui'}->add_from_file($glade_xml); for(qw/main_window zooms_table_0 zooms_table_1 decoupage scrolled_0 scrolled_1 label_0 label_1 event_0 event_1 button_apply button_close info button_previous button_next /) { $self->{$_}=$self->{'gui'}->get_object($_); } $self->{prefs}->transmet_pref($self->{'gui'}, prefix=>'zooms',hash=>$self); $self->{'label_0'}->set_markup(''.$self->{'label_0'}->get_text.''); $self->{'label_1'}->set_markup(''.$self->{'label_1'}->get_text.''); $self->{'info'}->set_markup(''.sprintf(__("Boxes zooms for page %s"), pageids_string(@{$self->{'page_id'}})).''); for(0,1) { $self->{'event_'.$_}->drag_dest_set('all', [Gtk3::TargetEntry->new('STRING',0,ID_AMC_BOX)], [GDK_ACTION_MOVE], ); $self->{'event_'.$_}->signal_connect( 'drag-data-received' => \&target_drag_data_received,[$self,$_]); } $self->{'gui'}->connect_signals(undef,$self); if($self->{'size-prefs'}) { my @s=$self->{'main_window'}->get_size(); $s[1]=$self->{'size-prefs'}->get('zoom_window_height'); $s[1]=200 if($s[1]<200); $self->{'main_window'}->resize(@s); } $self->load_boxes(); return($self); } sub edit_mode_update { my ($self)=@_; $self->{prefs}->reprend_pref(prefix=>'zooms',hash=>$self); if($self->{global_options}) { $self->{global_options}->set('zooms_edit_mode',$self->{zooms_edit_mode}); } } sub dnd_mode { # drag and drop my ($self)=@_; return($self->{zooms_edit_mode} == ZOOMS_EDIT_DND); } sub clear_boxes { my ($self)=@_; for(0,1) { $self->vide($_); } $self->{'ids'}=[]; $self->{'pb_src'}={}; $self->{'real_src'}={}; $self->{'pb'}={}; $self->{'image'}={}; $self->{'label'}={}; $self->{'n_ligs'}={}; $self->{'position'}={}; $self->{'eb'}={}; $self->{'eff_pos'}={}; $self->{'auto_pos'}={}; $self->{'conforme'}=1; $self->{'button_apply'}->hide(); } sub scrolled_update { my ($self)=@_; for my $cat (0,1) { $self->{'scrolled_'.$cat}->set_policy('never','automatic'); } } sub get_page_info { my ($self)=@_; $self->{'page_info'} =$self->{'_capture'}->get_page(@{$self->{'page_id'}}); } sub affect_box { my ($self,$z)=@_; my $id=$z->{'id_a'}.'-'.$z->{'id_b'}; my $auto_pos=($z->{'black'} >= $z->{'total'}*$self->{'seuil'} && $z->{'black'} <= $z->{'total'}*$self->{'seuil_up'} ? 1 : 0); my $eff_pos=($self->{'page_info'}->{'timestamp_manual'} && $z->{'manual'}>=0 ? $z->{'manual'} : $auto_pos); $self->{'eff_pos'}->{$id}=$eff_pos; $self->{'auto_pos'}->{$id}=$auto_pos; } sub load_positions { my ($self)=@_; $self->{'_capture'}->begin_read_transaction; $self->get_page_info(); my $sth=$self->{'_capture'}->statement('pageZonesD'); $sth->execute(@{$self->{'page_id'}},ZONE_BOX); while (my $z = $sth->fetchrow_hashref) { $self->affect_box($z); } $self->{'_capture'}->end_transaction; } sub safe_pixbuf { my ($self,$image)=@_; my $p=''; if($image) { # first try with a PixbufLoader my $pxl=Gtk3::Gdk::PixbufLoader->new; $pxl->write([unpack 'C*', $image]); $pxl->close(); $p=$pxl->get_pixbuf(); return($p,1) if($p); # Then try using Graphics::Magick to convert to XPM my $i=magick_perl_module()->new(); $i->BlobToImage($image); if( ! $i[0]) { # Try using temporary file to do the same my $tf=tmpdir()."/AMC-tempzoom"; open TZ,">$tf";binmode TZ;print TZ $image;close TZ; $i->Read($tf); } my @b=$i->ImageToBlob("magick"=>'xpm'); if($b[0]) { $b[0] =~ s:/\*.*\*/::g; $b[0] =~ s:static char.*::; $b[0] =~ s:};::; my @xpm=grep { $_ ne '' } map { s/^\"//;s/\",?$//;$_; } split(/\n+/,$b[0]); eval { $p=Gtk3::Gdk::Pixbuf->new_from_xpm_data(@xpm); }; return($p,1) if($p); } } # No success at all: replace the zoom image by a question mark my $g=$self->{'main_window'}; my $layout=$g->create_pango_layout("?"); my $colormap =$g->get_colormap; $layout->set_font_description(Pango::FontDescription->from_string("128")); my ($text_x,$text_y)=$layout->get_pixel_size(); my $pixmap=Gtk3::Gdk::Pixmap->new(undef,$text_x,$text_y,$colormap->get_visual->depth); $pixmap->set_colormap($colormap); $pixmap->draw_rectangle($g->style->bg_gc(GTK_STATE_NORMAL),TRUE,0,0,$text_x,$text_y); $pixmap->draw_layout($g->style->fg_gc(GTK_STATE_NORMAL),0,0,$layout); $p=Gtk3::Gdk::Pixbuf->get_from_drawable($pixmap, $colormap,0,0,0,0, $text_x, $text_y); return($p,0); } sub buttons_availability { my ($self)=@_; if($self->{'conforme'}) { $self->{'button_apply'}->hide(); $self->{'button_previous'}->set_sensitive($self->list_prev ? 1 : 0); $self->{'button_next'}->set_sensitive($self->list_next ? 1 : 0); } else { $self->{'button_apply'}->show(); $self->{'button_previous'}->set_sensitive(0); $self->{'button_next'}->set_sensitive(0); } } sub load_boxes { my ($self)=@_; my @ids; $self->{'_capture'}->begin_read_transaction; $self->get_page_info(); my $sth=$self->{'_capture'}->statement('pageZonesDI'); $sth->execute(@{$self->{'page_id'}},ZONE_BOX); while (my $z = $sth->fetchrow_hashref) { $self->affect_box($z); my $id=$z->{'id_a'}.'-'.$z->{'id_b'}; if($z->{imagedata}) { ($self->{'pb_src'}->{$id},$self->{'real_src'}->{$id}) =$self->safe_pixbuf($z->{imagedata}); $self->{'image'}->{$id}=Gtk3::Image->new(); $self->{'label'}->{$id}= Gtk3::Label->new(sprintf("%.3f", $self->{'_capture'} ->zone_darkness($z->{'zoneid'}))); $self->{'label'}->{$id}->set_justify(GTK_JUSTIFY_LEFT); my $hb=Gtk3::HBox->new(); $self->{'eb'}->{$id}=Gtk3::EventBox->new(); $self->{'eb'}->{$id}->add($hb); $hb->add($self->{'image'}->{$id}); $hb->add($self->{'label'}->{$id}); $self->{'eb'}->{$id}->drag_source_set(GDK_BUTTON1_MASK, [Gtk3::TargetEntry->new('STRING',0,ID_AMC_BOX)], [GDK_ACTION_MOVE], ); $self->{'eb'}->{$id} ->signal_connect('drag-data-get' => \&source_drag_data_get, $id ); $self->{'eb'}->{$id} ->signal_connect('drag-begin'=>sub { if($self->dnd_mode) { $self->{'eb'}->{$id} ->drag_source_set_icon_pixbuf($self->{'image'}->{$id}->get_pixbuf); } }); $self->{'eb'}->{$id} ->signal_connect('button_press_event'=>sub { $self->{'button_event'}=$id; }); $self->{'eb'}->{$id} ->signal_connect('leave_notify_event'=>sub { $self->{'button_event'}=''; }); $self->{'eb'}->{$id} ->signal_connect('button_release_event'=>sub { my ($w,$event)=@_; $self->click_action($id,$event); }); $self->{'position'}->{$id}=$self->{'eff_pos'}->{$id}; push @ids,$id; } else { debug_and_stderr "No zoom image: $id"; } } $self->{'_capture'}->end_transaction; $self->{'ids'}=[@ids]; $self->{'conforme'}=1; $self->remplit(0); $self->remplit(1); $self->zoom_it(); $self->{'main_window'}->show_all(); $self->{'button_apply'}->hide(); Gtk3::main_iteration while ( Gtk3::events_pending ); $self->ajuste_sep(); my $va=$self->{'scrolled_0'}->get_vadjustment(); $va->clamp_page($va->get_upper(),$va->get_upper()); $va=$self->{'scrolled_1'}->get_vadjustment(); $va->clamp_page($va->get_lower(),$va->get_lower()); $self->buttons_availability; } sub refill { my ($self)=@_; $self->{'conforme'}=1; for(0,1) { $self->vide($_); } for(0,1) { $self->remplit($_); } $self->buttons_availability; $self->scrolled_update; } sub page { my ($self,$id,$zd,$forget_it)=@_; if(!$self->{'conforme'}) { return() if($forget_it); my $dialog = Gtk3::MessageDialog ->new($self->{'main_window'}, 'destroy-with-parent', 'warning','yes-no', __("You moved some boxes to correct automatic data query, but this work is not saved yet.")." ".__("Do you want to save these modifications before looking at another page?") ); my $reponse=$dialog->run; $dialog->destroy; if($reponse eq 'yes') { $self->apply; } } $self->clear_boxes; $self->{'page_id'}=$id; $self->{'zooms_dir'}=$zd; $self->{'info'}->set_markup(''.sprintf(__("Boxes zooms for page %s"), pageids_string(@{$self->{'page_id'}})).''); $self->load_boxes; } sub click_action { my ($self,$id,$event)=@_; if((!$self->dnd_mode) && ($self->{'button_event'} eq $id)) { if($event->button==1) { $self->toggle($id); } elsif($event->button==3) { my $cat=$self->{'position'}->{$id}; my @toggle_ids=(); my $t=$cat; for my $i (@{$self->{'ids'}}) { $t=1 if($cat==0 && $id eq $i); if($t && $self->{'position'}->{$i} == $cat) { push @toggle_ids,$i; } $t=0 if($cat==1 && $id eq $i); } for my $i (@toggle_ids) { $self->{'position'}->{$i}=1-$cat; } $self->refill; } } } sub toggle { my ($self,$id)=@_; $self->{'position'}->{$id}=1-$self->{'position'}->{$id}; $self->refill; } sub source_drag_data_get { my ($widget, $context, $data, $info, $time,$string) = @_; $data->set_text($string,-1); } sub target_drag_data_received { my ($widget, $context, $x, $y, $data, $info, $time,$args) = @_; my ($self,$cat)=@$args; my $id=$data->get_text(); if($self->dnd_mode()) { debug "Page ".pageids_string(@{$self->{'page_id'}}) .": move $id to category $cat\n"; if($self->{'position'}->{$id} != $cat) { $self->{'position'}->{$id}=$cat; $self->refill; } } else { debug "Drang and drop cancelled: CLICK mode"; } } sub vide { my ($self,$cat)=@_; for($self->{'zooms_table_'.$cat}->get_children) { $self->{'zooms_table_'.$cat}->remove($_); } } sub remplit { my ($self,$cat)=@_; my @good_ids=grep { $self->{'position'}->{$_} == $cat } (@{$self->{'ids'}}); my $n_ligs=ceil((@good_ids ? (1+$#good_ids)/$self->{'n_cols'} : 1)); $self->{'n_ligs'}->{$cat}=$n_ligs; for my $i (0..$#good_ids) { my $id=$good_ids[$i]; my $x=$i % $self->{'n_cols'}; my $y=int($i/$self->{'n_cols'}); if($self->{'eff_pos'}->{$id} != $cat) { $self->{'eb'}->{$id}->override_background_color(GTK_STATE_FLAG_NORMAL,$col_modif); $self->{'conforme'}=0; } else { if($self->{'auto_pos'}->{$id} == $cat) { $self->{'eb'}->{$id}->override_background_color(GTK_STATE_FLAG_NORMAL,undef); } else { $self->{'eb'}->{$id}->override_background_color(GTK_STATE_FLAG_NORMAL,$col_manuel); } } $self->{'zooms_table_'.$cat}->attach($self->{'eb'}->{$id}, $x,$y,1,1); } } sub ajuste_sep { my ($self)=@_; my $s=$self->{'decoupage'}->get_property('max-position'); my $prop=$self->{'n_ligs'}->{0}/($self->{'n_ligs'}->{0}+$self->{'n_ligs'}->{1}); $prop=$self->{'prop_min'} if($prop<$self->{'prop_min'}); $prop=$self->{'prop_max'} if($prop>$self->{'prop_max'}); $self->{'decoupage'}->set_position($prop*$s); } sub zoom_it { my ($self)=@_; my $x=0; my $y=0; my $n=0; # show all boxes with scale factor $self->{'factor'} for my $id (grep { $self->{'real_src'}->{$_} } (@{$self->{'ids'}})) { my $tx=int($self->{'pb_src'}->{$id}->get_width * $self->{'factor'}); my $ty=int($self->{'pb_src'}->{$id}->get_height * $self->{'factor'}); $x+=$tx;$y+=$ty;$n++; $self->{'pb'}->{$id}=$self->{'pb_src'}->{$id} ->scale_simple($tx,$ty,GDK_INTERP_BILINEAR); $self->{'image'}->{$id}->set_from_pixbuf($self->{'pb'}->{$id}); } # compute average size of the images if($n>0) { $x=int($x/$n);$y=int($y/$n); } else { $x=32;$y=32; } # show false zooms (question mark replacing the zooms when the # zoom file couldn't be loaded) at this average size for my $id (grep { ! $self->{'real_src'}->{$_} } (@{$self->{'ids'}})) { my $fx=$x/$self->{'pb_src'}->{$id}->get_width; my $fy=$y/$self->{'pb_src'}->{$id}->get_height; $fx=$fy if($fy<$fx); my $tx=int($self->{'pb_src'}->{$id}->get_width * $fx); my $ty=int($self->{'pb_src'}->{$id}->get_height * $fx); $self->{'pb'}->{$id}=$self->{'pb_src'}->{$id} ->scale_simple($tx,$ty,GDK_INTERP_BILINEAR); $self->{'image'}->{$id}->set_from_pixbuf($self->{'pb'}->{$id}); } # resize window $self->{'event_0'}->queue_resize(); $self->{'event_1'}->queue_resize(); my @size=$self->{'main_window'}->get_size(); $size[0]=1; $self->{'main_window'}->resize(@size); } sub zoom_avant { my ($self)=@_; $self->{'factor'} *= 1.25; $self->zoom_it(); } sub zoom_arriere { my ($self)=@_; $self->{'factor'} /= 1.25; $self->zoom_it(); } sub list_prev { my ($self)=@_; my ($path)=$self->{'list_view'}->get_cursor(); if($path) { if($path->prev) { return($path); } } } sub list_next { my ($self)=@_; my ($path)=$self->{'list_view'}->get_cursor(); if($path) { $path->next; my $next_iter=$self->{'list_view'}->get_model->get_iter($path); if($next_iter) { return($self->{'list_view'}->get_model->get_path($next_iter)); } } } sub zoom_list_previous { my ($self)=@_; my $path_prev=$self->list_prev; if($path_prev) { $self->{'list_view'}->set_cursor($path_prev,undef,FALSE); } } sub zoom_list_next { my ($self)=@_; my $path_next=$self->list_next; if($path_next) { $self->{'list_view'}->set_cursor($path_next,undef,FALSE); } } sub quit { my ($self)=@_; if($self->{'size-prefs'}) { my ($x,$y)=$self->{'main_window'}->get_size(); $self->{'size-prefs'}->set('zoom_window_factor',$self->{'factor'}); $self->{'size-prefs'}->set('zoom_window_height',$y); } if(!$self->{'conforme'}) { my $dialog = Gtk3::MessageDialog ->new($self->{'main_window'}, 'destroy-with-parent', 'warning','yes-no', __("You moved some boxes to correct automatic data query, but this work is not saved yet.")." ".__("Dou you really want to close and ignore these modifications?") ); my $reponse=$dialog->run; $dialog->destroy; return() if($reponse eq 'no'); } if($self->{'global'}) { Gtk3->main_quit; } else { $self->{'main_window'}->destroy; } } sub actif { my ($self)=@_; return($self->{'main_window'} && $self->{'main_window'}->get_realized); } sub checked { my ($self,$id)=@_; if(defined($self->{'position'}->{$id})) { return($self->{'position'}->{$id}); } else { $self->{'eff_pos'}->{$id}; } } sub apply { my ($self)=@_; # save modifications to manual analysis data $self->{'_capture'}->begin_transaction; $self->{'_capture'}->outdate_annotated_page(@{$self->{'page_id'}}); debug "Saving manual data for ".pageids_string(@{$self->{'page_id'}}); $self->{'_capture'} ->statement('setManualPage') ->execute(time(), @{$self->{'page_id'}}); my $sth=$self->{'_capture'}->statement('pageZonesD'); $sth->execute(@{$self->{'page_id'}},ZONE_BOX); while (my $z = $sth->fetchrow_hashref) { my $id=$z->{'id_a'}.'-'.$z->{'id_b'}; $self->{'_capture'} ->statement('setManual') ->execute($self->checked($id), @{$self->{'page_id'}}, ZONE_BOX,$z->{'id_a'},$z->{'id_b'}); } $self->{'_capture'}->end_transaction; $self->load_positions; $self->refill; } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Messages.pm000066400000000000000000000033211341176102400216100ustar00rootroot00000000000000# # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Messages; use AMC::Basic; # possible types: INFO, WARN, ERR my %message_type=('INFO'=>1, 'WARN'=>2, 'ERR'=>3, ); sub add_message { my ($self,$type,$message)=@_; if(!$message_type{$type}) { debug "WARNING: inexistant message type - $type"; } push @{$self->{'messages'}},{'type'=>$type,'message'=>$message}; } sub get_messages { my ($self,$type)=@_; return(map { $_->{'message'} } grep { $_->{'type'} eq $type } @{$self->{'messages'}}); } sub n_messages { my ($self,$type)=@_; my @m=$self->get_messages($type); return(1+$#m); } sub messages_as_string { my ($self)=@_; my $s=''; for(@{$self->{'messages'}}) { $s.= $_->{'type'} .": ".$_->{'message'} ."\n"; } return($s); } sub higher_message_type { my ($self)=@_; my $h=0; my $type=''; for(@{$self->{'messages'}}) { if($message_type{$_->{'type'}} > $h) { $type=$_->{'type'}; $h=$message_type{$type}; } } return($type); } auto-multiple-choice-1.4.0/AMC-perl/AMC/NamesFile.pm000066400000000000000000000207511341176102400217120ustar00rootroot00000000000000# # Copyright (C) 2009-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::NamesFile; use AMC::Basic; use Encode; use Text::CSV; sub new { my ($f,%o)=@_; my $self={'fichier'=>$f, 'encodage'=>'utf-8', 'separateur'=>'', 'identifiant'=>'', 'heads'=>[], 'problems'=>{}, 'numeric.content'=>{}, 'simple.content'=>{}, 'err'=>[0,0], }; for (keys %o) { $self->{$_}=$o{$_} if(defined($self->{$_})); } $self->{'separateur'}=":,;\t" if(!$self->{'separateur'}); $self->{'identifiant'}='(nom|surname) (prenom|name)' if(!$self->{'identifiant'}); bless $self; @{$self->{'err'}}=($self->load()); return($self); } sub errors { my ($self)=@_; return(@{$self->{'err'}}); } sub load { my ($self)=@_; my @heads=(); my %data=(); my $err=0; my $errlig=0; my $line; my $sep=$self->{'separateur'}; $self->{'noms'}=[]; if($self->{'fichier'} && -f $self->{'fichier'} && ! -z $self->{'fichier'}) { debug "Reading names file $self->{'fichier'}"; # First pass: detect the number of comment lines, and the # separator my $comment_lines=0; if(open(LISTE,"<:encoding(".$self->{'encodage'}.")", $self->{'fichier'})) { LINE: while() { if(/^\#/) { $comment_lines++; next LINE; } my $entetes=$_; if(length($self->{'separateur'})>1) { my $nn=-1; for my $s (split(//,$self->{'separateur'})) { my $k=0; while($entetes =~ /$s/g) { $k++; } if($k>$nn) { $nn=$k; $sep=$s; } } debug "Detected separator: ".($sep eq "\t" ? "" : "<".$sep.">"); } last LINE; } close LISTE; } debug "NamesFile $self->{'fichier'}: $comment_lines comments lines"; # Second pass: read the file with Text::CSV $self->{'numeric.content'}={}; $self->{'simple.content'}={}; $self->{duplicates}={}; my $io; if(open($io,"<:encoding(".$self->{'encodage'}.")", $self->{'fichier'})) { # skip comments lines if($comment_lines>0) { for (1..$comment_lines) { $_=<$io> } } my $csv=Text::CSV->new({binary => 1, sep_char=>$sep, allow_whitespace=>1, }); # first line: header $self->{'heads'}=$csv->getline ($io); if($self->{'heads'}) { for my $h (@{$self->{'heads'}}) { $self->{'numeric.content'}->{$h}=0; $self->{'simple.content'}->{$h}=0; } } else { debug("CSV [SEP=$sep]: Can't read headers"); return(1,$.); } $csv->column_names ($self->{'heads'}); # following lines my $csv_line=0; while (my $row = $csv->getline_hr ($io)) { if($row) { # ignore blank lines my $ok=''; KEY:for my $k (keys %$row) { if(defined($row->{$k}) && $row->{$k} ne '') { $ok=1; last KEY; } } if($ok) { $csv_line++; for my $k (keys %$row) { if(defined($data{$k}->{$row->{$k}}) && $data{$k}->{$row->{$k}}==1 && !$self->{duplicates}->{$k} ) { $self->{duplicates}->{$k}= {content=>$row->{$k},line=>$csv_line}; } $data{$k}->{$row->{$k}}++; $self->{'numeric.content'}->{$k} ++ if($row->{$k} =~ /^[ 0-9.+-]*$/i); $self->{'simple.content'}->{$k} ++ if($row->{$k} =~ /^[ a-z0-9.+-]*$/i); } $row->{'_LINE_'}=$csv_line; push @{$self->{'noms'}},$row; } else { debug "Blank line $. detected"; } } } if(!$csv->eof) { if($csv->error_diag()) { debug "CSV: ".$csv->error_diag(); $errlig=$. if(!$errlig); $err++; } } close $io; # find unique identifiers for my $h (@{$self->{'heads'}}) { my @lk=(keys %{$data{$h}}); $self->{duplicates}->{$h}->{n}=$#{$self->{'noms'}}-$#lk; } $self->{'keys'}=[grep { $self->{duplicates}->{$_}->{n} == 0 } @{$self->{'heads'}}]; # rajout identifiant $self->calc_identifiants(); $self->tri('_ID_'); return($err,$errlig); } else { return(-1,0); } } else { debug("Inexistant or empty names list file"); debug("(file=".$self->{'fichier'}.")") if(defined($self->{'fichier'})); $self->{'heads'}=[]; $self->{'keys'}=[]; $self->{'problems'}={'ID.dup'=>[],'ID.empty'=>0}; return(0,0); } } sub head_first_duplicate { my ($self,$key)=@_; return($self->{'duplicates'}->{$key}->{content}); } sub head_n_duplicates { my ($self,$key)=@_; return($self->{duplicates}->{$key}->{n}); } sub get_value { my ($self,$key,$vals)=@_; my $r=''; KEY: for my $k (split(/\|+/,$key)) { for my $h ($self->heads()) { if($k =~ /^$h:([0-9]+)$/i) { if(defined($vals->{$h})) { $r=sprintf("%0".$1."d",$vals->{$h}); } } elsif((lc($h) eq lc($k)) && defined($vals->{$h})) { $r=$vals->{$h}; } } last KEY if($r ne ''); } return($r); } sub calc_identifiants { my ($self)=@_; my %ids=(); $self->{'problems'}={'ID.dup'=>[],'ID.empty'=>0}; for my $n (@{$self->{'noms'}}) { my $i=$self->substitute($n,$self->{'identifiant'}); $n->{'_ID_'}=$i; if($i) { if($ids{$i}) { push @{$self->{'problems'}->{'ID.dup'}},$i; } else { $ids{$i}=1; } } else { $self->{'problems'}->{'ID.empty'}++; } } } sub problem { my ($self,$k)=@_; return($self->{'problems'}->{$k}); } sub tri { my ($self,$cle)=@_; $self->{'noms'}=[sort { $a->{$cle} cmp $b->{$cle} } @{$self->{'noms'}}]; } sub tri_num { my ($self,$cle)=@_; $self->{'noms'}=[sort { $a->{$cle} <=> $b->{$cle} } @{$self->{'noms'}}]; } sub taille { my ($self)=@_; return(1+$#{$self->{'noms'}}); } sub heads { # entetes my ($self)=@_; return(@{$self->{'heads'}}); } sub heads_count { my ($self,$check)=@_; my %h=map { $_=>0 } ($self->heads()); for my $n (@{$self->{'noms'}}) { for my $k (keys %h) { $h{$k}++ if(&$check($n->{$k})); } } return(%h); } sub keys { # entetes qui peuvent servir de cle unique my ($self)=@_; return(sort { $self->{'simple.content'}->{$b} <=> $self->{'simple.content'}->{$a} || $self->{'numeric.content'}->{$b} <=> $self->{'numeric.content'}->{$a} || $a cmp $b } @{$self->{'keys'}}); } sub heads_for_keys { # entetes qui peuvent servir de cle unique my ($self)=@_; return(sort { $self->{duplicates}->{$a}->{n} <=> $self->{duplicates}->{$b}->{n} || $self->{'simple.content'}->{$b} <=> $self->{'simple.content'}->{$a} || $self->{'numeric.content'}->{$b} <=> $self->{'numeric.content'}->{$a} || $a cmp $b } @{$self->{'heads'}}); } sub liste { my ($self,$head)=@_; return(map { $_->{$head} } @{$self->{'noms'}} ); } # use names fields from $n to subsitute (HEADER) substrings in $s sub substitute { my ($self,$n,$s,%oo)=@_; my $prefix=''; $prefix=$oo{'prefix'} if(defined($oo{'prefix'})); if(defined($n->{'_ID_'})) { my $nom=$n->{'_ID_'}; $nom =~ s/^\s+//; $nom =~ s/\s+$//; $nom =~ s/\s+/ /g; $s =~ s/$prefix\(ID\)/$nom/g; } else { $s =~ s/$prefix\(ID\)/X/g; } $s =~ s/$prefix\(([^\)]+)\)/get_value($self,$1,$n)/gei; $s =~ s/^\s+//; $s =~ s/\s+$//; return($s); } sub simple_numeric { my ($a)=@_; $a =~ s/^0+// if($a =~ /^\d+$/); return($a); } sub same_values { my ($a,$b,$test_numeric)=@_; return(1) if($a eq $b); return(1) if($test_numeric && (simple_numeric($a) eq simple_numeric($b))); return(0); } sub data { my ($self,$head,$c,%oo)=@_; return() if(!defined($c)); my @k=grep { defined($self->{'noms'}->[$_]->{$head}) && same_values($self->{'noms'}->[$_]->{$head},$c,$oo{test_numeric}) } (0..$#{$self->{'noms'}}); if(!$oo{'all'}) { if($#k!=0) { print STDERR "Error: non-unique name (".(1+$#k)." records)\n"; return(); } } if($oo{'i'}) { return(@k); } else { return(map { $self->{'noms'}->[$_] } @k); } } sub data_n { my ($self,$n,$cle)=@_; return($self->{'noms'}->[$n]->{$cle}); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Path.pm000066400000000000000000000057361341176102400207510ustar00rootroot00000000000000# -*- perl -*- # # Copyright (C) 2014-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Path; BEGIN { use Exporter (); our ($VERSION, @ISA, @EXPORT); @ISA = qw(Exporter); @EXPORT = qw( &proj2abs &abs2proj ); } sub abs2proj { my ($surnoms,$fich)=@_; if(defined($fich) && $fich) { $fich =~ s/\/{2,}/\//g; CLES:for my $s (sort { length($surnoms->{$b}) <=> length($surnoms->{$a}) } grep { $_ && $surnoms->{$_} } (keys %$surnoms)) { my $rep=$surnoms->{$s}; $rep.="/" if($rep !~ /\/$/); $rep =~ s/\/{2,}/\//g; if($fich =~ s/^\Q$rep\E\/*//) { $fich="$s/$fich"; last CLES; } } return($fich); } else { return(''); } } sub proj2abs { my ($surnoms,$fich)=@_; if(defined($fich)) { if($fich =~ /^\//) { return($fich); } else { $fich =~ s/^([^\/]*)//; my $code=$1; if(!$surnoms->{$code}) { $fich=$code.$fich; $code=$surnoms->{''}; } my $rep=$surnoms->{$code}; $rep.="/" if($rep !~ /\/$/); $rep.=$fich; $rep =~ s/\/{2,}/\//g; return($rep); } } else { return(''); } } sub new { my (%o)=(@_); my $self={'projects_path'=>'', 'project_name'=>'', 'home_dir'=>'', }; for my $k (keys %o) { $self->{$k}=$o{$k} if(defined($self->{$k})); } bless $self; return($self); } sub set { my ($self,%p)=@_; for my $key (keys %p) { $self->{$key}=$p{$key}; } } # builds a shorcuts list sub shortcuts { my ($self,$proj)=@_; my %s=(); $proj=$self->{project_name} if(!defined($proj)); $proj='' if(!defined($proj)); if($proj eq '') { %s=('%HOME',$self->{home_dir}); } else { %s=('%PROJETS'=>$self->{projects_path}, '%HOME',$self->{home_dir}, ''=>'%PROJETS', ); if($proj) { $s{'%PROJET'}=$self->{projects_path}."/".$proj; $s{''}='%PROJET'; } } return(\%s); } # expands shortcuts like %PROJET, %HOME from a file path sub absolu { my ($self,$f,$proj)=@_; return($f) if(!defined($f)); $f=proj2abs($self->shortcuts($proj),$f); utf8::downgrade($f); return($f); } # replaces some paths with their shortcuts in a file path sub relatif { my ($self,$f,$proj)=@_; return($f) if(!defined($f)); return(abs2proj($self->shortcuts($proj),$f)); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Print.pm000066400000000000000000000067041341176102400211450ustar00rootroot00000000000000# # Copyright (C) 2015-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Print; use AMC::Basic; sub new { my ($class,%o) = @_; my $self={method=>'none', useful_options=>'', error=>'', }; for my $k (keys %o) { $self->{$k}=$o{$k} if(defined($self->{$k})); } bless ($self, $class); return $self; } # printing-mode selection sub check_available { return(); } sub weight { return(0); } # PRINTING OPTIONS # returns a list of hashrefs # {name=>'printer short name', # description=>'printer description'} sub printers_list { my ($self)=@_; return(); } # returns the default printer name sub default_printer { my ($self)=@_; my @p=$self->printers_list(); return($p[0]->{name}); } # returns a list of hashrefs # {name=>'option name', # description=>'option description', # values=>[{name=>'value name', # description=>'value description'}, # ... # ], # default=>'default value name', # } sub printer_options_list { my ($self,$printer)=@_; return(); } sub printer_selected_options { my ($self,$printer)=@_; if($self->{useful_options} =~ /[^\s]/) { my $re="(".join("|",split(/\s+/,$self->{useful_options})).")"; return(grep { $_->{name} =~ /^$re$/i } ($self->printer_options_list($printer))); } else { return(); } } # Builds a Gtk table for printer options # $table = GtkTable to be modified # $w = widgets hashref for use with transmet_pref/reprend_pref # $prefs = AMC::Gui::Prefs object # $printer = printer name # $printer_options = current printer options hashref sub printer_options_table { my ($self,$table,$w,$prefs,$printer,$printer_options)=@_; my @options=$self->printer_selected_options($printer); for($table->get_children) { $_->destroy(); } my $y=0; my $widget; my $renderer; for my $o (@options) { $table->attach(Gtk3::Label->new($o->{description}), 0,$y,1,1); $widget=Gtk3::ComboBox->new(); $renderer = Gtk3::CellRendererText->new(); $widget->pack_start($renderer, TRUE); $widget->add_attribute($renderer,'text',COMBO_TEXT); $w->{'printer_c_'.$o->{name}}=$widget; $table->attach($widget,1,$y,1,1); $y++; my %opt_values=map { $_->{name}=>$_->{description} } @{$o->{values}}; $prefs->store_register($o->{name} => cb_model(map { ($_->{name},$_->{description}) } @{$o->{values}})); my $opt_value=$printer_options->{$o->{name}}; if(!$opt_value || !$opt_values{$opt_value}) { debug "Setting option $o->{name} to default: $o->{default}"; $printer_options->{$o->{name}}=$o->{default}; } } $table->show_all(); } # PRINTING sub select_printer { my ($self,$printer)=@_; } sub set_option { my ($self,$option,$value)=@_; } sub print_file { my ($self,$filename)=@_; } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Print/000077500000000000000000000000001341176102400206005ustar00rootroot00000000000000auto-multiple-choice-1.4.0/AMC-perl/AMC/Print/cups.pm000066400000000000000000000064711341176102400221200ustar00rootroot00000000000000# # Copyright (C) 2015-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Print::cups; use AMC::Print; use AMC::Basic; use Module::Load; use Module::Load::Conditional qw/check_install/; @ISA=("AMC::Print"); sub nonnul { my $s=shift; $s =~ s/\000//g; return($s); } sub new { my $class = shift; my $self = $class->SUPER::new(@_); my @manque=(); for my $m ("Net::CUPS","Net::CUPS::PPD") { if(check_install(module=>$m)) { load($m); } else { push @manque,$m; } } if(@manque) { die "Needs Net::CUPS and Net::CUPS::PPD perl modules for CUPS printing"; } else { debug_pm_version("Net::CUPS"); $self->{cups}=Net::CUPS->new(); } $self->{method}='cups'; return($self); } sub check_available { my @manque=(); for my $m ("Net::CUPS","Net::CUPS::PPD") { if(!check_install(module=>$m)) { push @manque,$m; } } if(@manque) { return(sprintf(__("Perl module(s) missing: %s"),join(' ',@manque))); } else { return(); } } sub weight { return(1.0); } sub printers_list { my ($self)=@_; return(map { {name=>$_->getName(), description=>$_->getDescription()||$_->getName()} } ($self->{cups}->getDestinations())); } sub default_printer { my ($self)=@_; # get default printer my $d=$self->{cups}->getDestination(); if($d) { return($d->getName()); } else { # if no default printer found, get printers list... my @d=$self->{cups}->getDestinations(); if(@d) { # ... and return the first one return($d[0]->getName()); } else { return(""); } } } sub printer_selected_options { my ($self,$printer)=@_; my @o=(); my $ppd=$self->{cups}->getPPD($printer); if($ppd) { for my $k (split(/\s+/,$self->{useful_options})) { my $option=$ppd->getOption($k); if(ref($option) eq 'HASH') { push @o,{name=>$k, description=>nonnul($option->{'text'}), default=>nonnul($option->{'defchoice'}), values=>[map { {name=>nonnul($_->{choice}), description=>nonnul($_->{text}) } } (@{$option->{choices}})], } } } } else { debug "WARNING: getPPD failed for printer $printer"; } return(@o); } # PRINTING sub select_printer { my ($self,$printer)=@_; $self->{dest}=$self->{cups}->getDestination($printer); } sub set_option { my ($self,$option,$value)=@_; if($self->{dest}) { $self->{dest}->addOption($option,$value); } else { debug "WARNING: set_option with no DEST"; } } sub print_file { my ($self,$filename,$label)=@_; if($self->{dest}) { $self->{dest}->printFile($filename,$label); } else { debug "ERROR: print_file with no DEST"; } } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Print/cupslp.pm000066400000000000000000000054251341176102400224520ustar00rootroot00000000000000# # Copyright (C) 2015-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Print::cupslp; use AMC::Print; use AMC::Basic; @ISA=("AMC::Print"); sub nonnul { my $s=shift; $s =~ s/\000//g; return($s); } sub new { my $class = shift; my $self = $class->SUPER::new(@_); $self->{method}='cupslp'; return($self); } sub check_available { my @missing=(); for my $command (qw/lp lpoptions lpstat/) { push @missing,$command if(!commande_accessible($command)); } if(@missing) { return(sprintf(__("The following commands are missing: %s."), join(' ',@missing))); } else { return(); } } sub weight { return(2.0); } sub printers_list { my ($self)=@_; my @list=(); open(PL,"-|","lpstat","-a") or die "Can't exec lpstat: $!"; while() { push @list,{name=>$1,description=>$1} if(/^([^\s]+)\s+accept/); } close PL; return(@list); } sub default_printer { my ($self)=@_; open(PL,"-|","lpstat","-d") or die "Can't exec lpstat: $!"; while() { return($1) if(/:\s*([^\s]+)/); } close PL; return(''); } sub printer_options_list { my ($self,$printer)=@_; my @o=(); open(OL,"-|","lpoptions","-p",$printer,"-l") or die "Can't exec lpoptions: $!"; while(
    ) { if(m!^([^\s]+)/([^:]+):\s*(.*)!) { my %option=(name=>$1,description=>$2,values=>[]); my $vals=$3; for my $k (split(/\s+/,$vals)) { if($k =~ s/^\*//) { $option{default}=$k; } push @{$option{values}}, {name=>$k,description=>$k}; } push @o,{%option}; } } close OL; return(@o); } # PRINTING sub select_printer { my ($self,$printer)=@_; $self->{printername}=$printer; $self->{printeroptions}={}; } sub set_option { my ($self,$option,$value)=@_; $self->{printeroptions}->{$option}=$value; } sub print_file { my ($self,$filename,$label)=@_; my @command=("lp","-d",$self->{printername}); for my $k (keys %{$self->{printeroptions}}) { push @command,"-o","$k=".$self->{printeroptions}->{$k}; } push @command,$filename; debug "Printing command: ".join(" ",@command); system(@command); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Queue.pm000066400000000000000000000060241341176102400211300ustar00rootroot00000000000000# # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Queue; use AMC::Basic; use Module::Load; use Module::Load::Conditional qw/check_install/; # recupere le nombre de CPU, avec Sys::CPU si ce module est installe sub get_ncpu { my $n=0; if(check_install(module=>"Sys::CPU")) { load("Sys::CPU"); debug_pm_version("Sys::CPU"); $n=Sys::CPU::cpu_count(); } else { open(CI,"/proc/cpuinfo"); while() { $n++ if(/^processor\s*:/); } close(CI); } $n=1 if($n<=0); return($n); } sub new { my (%o)=@_; my $self={'pids'=>[], 'queue'=>[], 'max.procs'=>0, }; for my $k (keys %o) { $self->{$k}=$o{$k} if(defined($self->{$k})); } if($self->{'max.procs'}<1) { $self->{'max.procs'}=get_ncpu(); debug "Max number of processes: ".$self->{'max.procs'}; } bless $self; return($self); } sub add_process { my ($self,@o)=@_; push @{$self->{'queue'}},[@o]; } sub maj { my ($self)=@_; my @p=(); for my $pid (@{$self->{'pids'}}) { push @p,$pid if(kill(0,$pid)); } @{$self->{'pids'}}=@p; debug "MAJ : ".join(' ',@p); return(1+$#{$self->{'pids'}}); } sub killall { my ($self)=@_; $self->{'queue'}=[]; print "Queue interruption\n"; for my $p (@{$self->{'pids'}}) { print "Queue: killing $p\n"; kill 9,$p; } } sub run { my ($self,$subsys)=@_; debug "Queue RUN"; while(@{$self->{'queue'}}) { while($self->maj() < $self->{'max.procs'} && @{$self->{'queue'}}) { my $cs=shift(@{$self->{'queue'}}); if($cs) { my $p=fork(); if($p) { debug "Fork : $p"; push @{$self->{'pids'}},$p; } else { if(ref($cs->[0]) eq 'ARRAY') { for my $c (@$cs) { debug "Command [$$] : ".join(' ',@$c); if(system(@$c)==0) { debug "Command [$$] OK"; } else { debug "Error [$$] : $?\n"; } } exit(0); } elsif(ref($cs->[0]) eq 'CODE') { my $c=shift @$cs; &$c(@$cs); exit(0); } else { debug "Command [$$] : ".join(' ',@$cs); exec(@$cs); debug "Bad exec $$ [".$cs->[0]."] unknown command"; die "Unknown command"; } } } else { debug "Queue empty"; } } waitpid(-1,0); } while($self->maj()) { debug("Waiting for all childs to end..."); waitpid(-1,0); } debug("Leaving queue."); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Scoring.pm000066400000000000000000000323231341176102400214510ustar00rootroot00000000000000# -*- perl -*- # # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Scoring; use AMC::Basic; use AMC::DataModule::scoring qw/:question/; use AMC::ScoringEnv; use Data::Dumper; sub new { my (%o)=(@_); my $self={'onerror'=>'stderr', 'seuil'=>0, 'seuil_up'=>1.0, 'data'=>'', 'default_strategy'=>'', 'default_strategy_plain'=>'', '_capture'=>'', '_scoring'=>'', }; for my $k (keys %o) { $self->{$k}=$o{$k} if(defined($self->{$k})); } bless $self; if($self->{'data'}) { $self->{'_capture'}=$self->{'data'}->module('capture'); $self->{'_scoring'}=$self->{'data'}->module('scoring'); } $self->set_default_strategy(); return($self); } sub error { my ($self,$t)=@_; debug $t; if($self->{'onerror'} =~ /\bstderr\b/i) { print STDERR "$t\n"; } if($self->{'onerror'} =~ /\bdie\b/i) { die $t; } } ########################### # get data from databases # ########################### sub ticked { my ($self,$student,$copy,$question,$answer)=@_; return($self->{'_capture'} ->ticked($student,$copy,$question,$answer, $self->{'seuil'},$self->{'seuil_up'})); } # tells if the answer given by the student is the correct one (ticked # if it has to be, or not ticked if it has not to be). sub answer_is_correct { my ($self,$student,$copy,$question,$answer)=@_; return($self->ticked($student,$copy,$question,$answer) == $self->{'_scoring'}->correct_answer($student,$question,$answer)); } ################# # score methods # ################# # make a ScoringEnv object to hold questionnary-wide default strategy sub set_default_strategy { my ($self,$strategy_string)=@_; $self->{'default_strategy_plain'}= AMC::ScoringEnv->new_from_directives_string($strategy_string); $self->{'default_strategy'}=AMC::ScoringEnv ->new_from_directives_string("e=0,b=1,m=0,v=0,d=0,auto=-1," .$strategy_string); } # prepares the ScoringEnv object that will be used for the current # question, processing question-wide directives sub prepare_question { my ($self,$question_data)=@_; debug "Question data is ".Dumper($question_data); $self->{env}=$self->{default_strategy}->clone(1); $self->{env}->process_directives($question_data->{default_strategy}); $self->{env}->process_directives($question_data->{strategy}); } # set variables values that depend on the data capture: number of # ticked answers, ... sub set_number_variables { my ($self,$question_data,$correct)=@_; my $vars={'NB'=>0,'NM'=>0,'NBC'=>0,'NMC'=>0}; my $n_ok=0; my $n_ticked=0; my $ticked_adata=''; my $n_all=0; my $n_plain=0; my $ticked_noneof=''; for my $a (@{$question_data->{'answers'}}) { my $c=$a->{'correct'}; my $t=($correct ? $c : $a->{'ticked'}); debug("[ Q ".$a->{'question'}." A ".$a->{'answer'}." ] ticked $t (correct $c) CORRECT=$correct\n"); $n_ok+=($c == $t ? 1 : 0); $n_ticked+=$t; $ticked_adata=$a if($t); $n_all++; if($a->{'answer'}==0) { $ticked_noneof=$a->{'ticked'}; } else { my $bn=($c ? 'B' : 'M'); my $co=($t ? 'C' : ''); $vars->{'N'.$bn}++; $vars->{'N'.$bn.$co}++ if($co); $n_plain++; } } $self->{env}->set_variables_from_hashref($vars,0); $self->{env}->set_variable("N",$n_plain,0); $self->{env}->set_variable("N_ALL",$n_all,0); $self->{env}->set_variable("N_RIGHT",$n_ok,0); $self->{env}->set_variable("N_TICKED",$n_ticked,0); $self->{env}->set_variable("NONEOF_TICKED",$ticked_noneof,0); $self->{env}->set_variable("IMULT", $question_data->{'type'}==QUESTION_MULT ? 1 : 0); $self->{env}->set_variable("IS", $question_data->{'type'}==QUESTION_SIMPLE ? 1 : 0); $self->{ticked_answer_data}=$ticked_adata; } # processes set.X directives from ticked answers sub process_ticked_answers_setx { my ($self,$question_data,$correct)=@_; for my $a (@{$question_data->{'answers'}}) { my $c=$a->{'correct'}; my $t=($correct ? $c : $a->{'ticked'}); $self->{env}->variables_from_directives_string($a->{strategy},set=>1,setx=>1,setglobal=>1) if($t); } } ####################################################### # small methods to relay to embedded ScoringEnv object sub set_type { my ($self,$type)=@_; return($self->{env}->set_type($type)); } sub variable { my ($self,$key)=@_; return($self->{env}->get_variable($key)); } sub directive { my ($self,$key)=@_; return($self->{env}->get_directive($key)); } sub directive_raw { my ($self,$key)=@_; return($self->{env}->get_directive_raw($key)); } sub set_directive { my ($self,$key,$value)=@_; return($self->{env}->set_directive($key,$value)); } sub defined_directive { my ($self,$key)=@_; return($self->{env}->defined_directive($key)); } sub evaluate { my ($self,$formula)=@_; return($self->{env}->evaluate($formula)); } ####################################################### # process some complex strategies for multiple questions (haut, mz) # and rewrite them in terms of core scoring strategy directives. sub expand_multiple_strategies { my ($self)=@_; if($self->directive("haut")) { $self->set_directive("d",$self->directive("haut").'-N'); $self->set_directive("p",0) if(!$self->defined_directive("p")); } elsif($self->directive("mz")) { $self->set_directive("d",$self->directive("mz")); $self->set_directive("p",0) if(!$self->defined_directive("p")); $self->set_directive("b",0); $self->set_directive("m",-( abs($self->directive("mz")) +abs($self->directive("p"))+1 )); } } # the same for simple strategies sub expand_simple_strategies { my ($self)=@_; if($self->defined_directive("mz")) { $self->set_directive("b",$self->directive("mz")); #cancels d directive value $self->set_directive("d",0); } } # detect syntax error for current question sub syntax_error { my ($self,$correct)=@_; return('') if($correct); if($self->variable("IMULT")) { if($self->variable("N_TICKED") != 1 && $self->variable("NONEOF_TICKED")) { # incompatible answers: the student has ticked one # plain answer AND the answer "none of the # above"... return("NONEOF & others"); } } else { if($self->variable("N_TICKED")>1) { # incompatible answers: there are more than one # ticked boxes return("more than one ticked box"); } } return(''); } # tests if a formula has been given. If so, set the score to the value # computed from this formula sub use_formula { my ($self,$score,$why)=@_; if($self->defined_directive("formula") && $self->directive_raw("formula") =~ /[^\s]/) { # a formula is given to compute the score directly debug "Using formula"; $$score=$self->directive("formula"); return(1); } else { return(0); } } # post-process for the score : forced value(force), shift(d), floor(p) sub post_process { my ($self,$score,$why)=@_; if($$why !~ /^[VE]/i) { if($self->defined_directive("force")) { $$score=$self->directive("force"); debug "FORCE: $$score"; $$why = 'F'; } else { # adds the 'd' shift value if($self->defined_directive("d")) { my $d=$self->directive("d"); debug "Shift: $d"; $$score+=$d; } # applies the 'p' floor value if($self->defined_directive("p")) { my $p=$self->directive("p"); if($$score<$p) { debug "Floor: $p"; $$score=$p; $$why='P'; } } } } } # adds answers scores for a multiple question sub multiple_standard_score { my ($self,$answers,$correct,$score,$why)=@_; for my $a (@$answers) { # process only plain answers, not the "none of the above" answer if($a->{'answer'} != 0) { my $code=($correct || ($a->{'ticked'}==$a->{'correct'}) ? "b" : "m"); my $answer_env=$self->{env}->clone; $answer_env->process_directives($a->{'strategy'}); my $code_val=$answer_env->get_directive($code); debug("Delta(".$a->{'answer'}."|$code)=$code_val"); $$score+=$code_val; # bforce|mforce directive for this answer: pass it to # the question force directive, so that the question score # will be set to this value. $self->set_directive("force",$answer_env->get_directive ($code."force")) if($answer_env->defined_directive($code."force")); } } } sub simple_standard_score { my ($self,$score,$why)=@_; my $sb=$self->{ticked_answer_data}->{'strategy'}; my $plain_directives=$self->{env}->parse_defs($sb,1); if(@$plain_directives) { # some value is given as a score for the # ticked answer debug "Scoring: plain value"; $$score=$self->evaluate(pop @$plain_directives); } else { # take into account the scoring strategy for # the question: 'auto', or 'b'/'m' if($self->directive("auto")>-1) { debug "Scoring: auto"; $$score=$self->{ticked_answer_data}->{'answer'} +$self->directive("auto")-1; } else { my $code=($self->variable("N_RIGHT")==$self->variable("N_ALL") ? "b" : "m"); debug "Scoring: code $code"; $$score=$self->directive($code); } } } # returns the score for a particular student-sheet/question, applying # the given scoring strategy. sub score_question { my ($self,$etu,$question_data,$correct)=@_; my $answers=$question_data->{'answers'}; my $xx=''; my $why=''; $self->{env}->clear_errors; $self->set_number_variables($question_data,$correct); $self->{env}->variables_from_directives(setglobal=>1); $self->process_ticked_answers_setx($question_data,$correct); $self->{env}->variables_from_directives(default=>1,set=>1,setx=>1,requires=>1); if($self->{env}->n_errors()) { $why="E"; $xx=$self->directive("e"); debug "Scoring errors: ".join(', ',$self->{env}->errors); } elsif($self->variable("N_TICKED")==0) { # no ticked boxes at all $xx=$self->directive("v"); $why='V'; } elsif(my $err=$self->syntax_error($correct)) { debug "Scoring syntax error: $err"; $xx=$self->directive("e"); $why='E'; } elsif($self->variable("INVALID")) { debug "INVALID variable is set"; $xx=$self->directive("e"); $why='E'; } if(!$why) { if($self->variable("IMULT")) { # MULTIPLE QUESTION $xx=0; $self->expand_multiple_strategies(); if(!$self->use_formula(\$xx,\$why)) { $self->multiple_standard_score($answers,$correct,\$xx,\$why); } $self->post_process(\$xx,\$why); } else { # SIMPLE QUESTION $self->expand_simple_strategies(); if(!$self->use_formula(\$xx,\$why)) { $self->simple_standard_score(\$xx,\$why); } } } debug "MARK: score=$xx ($why)"; return($xx,$why); } # returns the maximum score for a question: MAX parameter value, or, # if not present: # - for indicative questions, the student score # - for standard questions, the score for a perfect copy sub score_max_question { my ($self,$etu,$question_data)=@_; if($self->defined_directive("MAX")) { my $m=$self->directive("MAX"); debug "MARK: get MAX from scoring directives: $m"; return($m,'M'); } else { if($question_data->{indicative}) { debug "MARK: scoring STUDENT answers for MAX"; return($self->score_question($etu,$question_data,0)); } else { debug "MARK: scoring correct answers for MAX"; return($self->score_question($etu,$question_data,1)); } } } # sums up the questions scores and return the global score and max # score, handling global scoring parameters like SUF and allowempty. # # $scoring is the AMC::DataModule::scoring object to write to the # database. # # @questions is an array of elements like # {'score'=>xx,'raison'=>rr,'notemax'=>xxmax} for each question. sub global_score { my ($self,$scoring,@questions)=@_; my $total=0; my $max=0; # maybe global variables differ from a copy to another... $self->{'default_strategy_plain'}->unevaluate_directives(); my $skip=$self->{'default_strategy_plain'}->get_directive("allowempty"); if($skip>0) { @questions=sort { ($a->{'raison'} eq 'V' ? 0 : 1) <=> ($b->{'raison'} eq 'V' ? 0 : 1) || $b->{'notemax'} <=> $a->{'notemax'} } @questions; while($skip>0 && @questions && $questions[0]->{'raison'} eq 'V') { $skip--; $scoring->cancel_score(@{$questions[0]->{'sc'}}, $questions[0]->{'question'}) if($scoring); shift @questions; } } for my $q (@questions) { $total+=$q->{'score'}; $max+=$q->{'notemax'}; } $max=$self->{'default_strategy_plain'}->get_directive("SUF") if($self->{'default_strategy_plain'}->defined_directive("SUF")); if ($max<=0) { debug "Warning: Nonpositive value for MAX."; $max=1; } return($total,$max); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/ScoringEnv.pm000066400000000000000000000222571341176102400221270ustar00rootroot00000000000000# -*- perl -*- # # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::ScoringEnv; # AMC::ScoringEnv object handles directives used in scoring # strategies. Directives can be parsed from scoring strategy strings, # and their value can be computed with different sets of variables' # values (AMC-note uses one set of values for variables for the # student answer sheet, and one set of values for a perfect answer). use AMC::Basic; use Text::ParseWords; # The functions min and max will sometimes be used to evaluate the # formulas: don't cut them off sub min { my (@values)=@_; my $r=$values[0]; for(@values) { $r=$_ if($_<$r); } return($r); } sub max { my (@values)=@_; my $r=$values[0]; for(@values) { $r=$_ if($_>$r); } return($r); } sub new { my ($class,@objects)=(@_); my $self={error_hook=>'', variables=>{}, directives=>{}, type=>0, }; my $scalar_only=0; for my $obj (@objects) { if($obj->{scalar_only}) { $scalar_only=1; delete($obj->{scalar_only}); } for my $k (keys %$obj) { if(defined($self->{$k})) { if(ref($self->{$k}) eq 'HASH') { $self->{$k}={%{$obj->{$k}}} if(!$scalar_only); } else { $self->{$k}=$obj->{$k}; } } } } $self->{errors}=[]; $self->{globalvariables}=$self->{variables}; bless($self,$class); return($self); } sub new_from_directives_string { my ($class,$string)=@_; my $self=$class->new(); $self->process_directives($string); return($self); } sub error { my ($self,$text)=@_; debug $text; push @{$self->{errors}},$text; } sub errors { my ($self)=@_; return(@{$self->{errors}}); } sub n_errors { my ($self)=@_; return(1+$#{$self->{errors}}); } sub clear_errors { my ($self)=@_; $self->{errors}=[]; } sub clone { my ($self,$from_global)=@_; $c=AMC::ScoringEnv->new($self); if($from_global) { $c->{globalvariables}=$self->{variables}; } else { $c->{globalvariables}=$self->{globalvariables}; } return($c) } sub clone_directives { my ($self)=@_; return(AMC::ScoringEnv ->new({directives=>$self->{directives}}, {scalar_only=>1}, $self) ); } # set the type (a small integer) to be used for computations. Changing # the type will move to different values for all variables handled by # the object. All directives are kept unchanged, but their values will # be computed again next time get_directive will be called, with the # new values that will be set for all variables. sub set_type { my ($self,$type)=@_; $self->unevaluate_directives() if($self->{type} != $type); $self->{type}=$type; } # set variable value. sub set_variable { my ($self,$vv,$value,$rw,$unlock,$global)=@_; $vars=($global ? 'globalvariables' : 'variables'); $self->{$vars}->{$vv}=[] if(!$self->{$vars}->{$vv}); if((!$unlock) && $self->{$vars}->{$vv}->[$self->{type}] && !$self->{$vars}->{$vv}->[$self->{type}]->{rw}) { $self->error("Trying to set read-only variable $vv"); } else { $self->{$vars}->{$vv}->[$self->{type}]={value=>$value,rw=>$rw}; } } sub set_variables_from_hashref { my ($self,$hashref,$rw)=@_; for my $k (keys %$hashref) { $self->set_variable($k,$hashref->{$k},$rw); } } # is this variable defined? sub defined_variable { my ($self,$vv)=@_; return($self->{variables}->{$vv}->[$self->{type}] ? 1 : 0); } # get variable value. sub get_variable { my ($self,$vv)=@_; if($self->{variables}->{$vv} && $self->{variables}->{$vv}->[$self->{type}]) { return($self->{variables}->{$vv}->[$self->{type}]->{value}); } else { return(undef); } } # parse directives strings sub parse_defs { my ($self,$string,$plain_only)=@_; my @r=(); for my $def (quotewords(',+',0,$string)) { if(length($def)) { if($def =~ /^\s*([.a-zA-Z0-9_-]+)\s*=\s*(.*)/) { # "variable=value" case push @r,{key=>$1,value=>$2} if(!$plain_only); } else { # "value" case $def =~ s/^\s+//; $def =~ s/\s+$//; if($def ne '') { if($plain_only) { push @r,$def; } else { push @r,{key=>"_PLAIN_",value=>$def}; } } } } } return(\@r); } sub action_variable { my ($self,$action,$key,$value)=@_; if($action eq 'default') { if(!$self->defined_variable($key)) { debug "Default value for variable $key [$self->{type}] = $value"; $self->set_variable($key, $self->evaluate($value), 1); } else { debug "Variable $key [$self->{type}] already set"; } } elsif($action eq 'set') { debug "Setting variable $key [$self->{type}] = $value"; $self->set_variable($key, $self->evaluate($value), 0); } elsif($action eq 'setx') { debug "Overwriting variable $key [$self->{type}] = $value"; $self->set_variable($key, $self->evaluate($value), 0,1); } elsif($action eq 'setglobal') { debug "Setting global variable $key [$self->{type}] = $value"; $self->set_variable($key, $self->evaluate($value), 0,1,1); } elsif($action eq 'requires') { $self->error("Variable $key [$self->{type}] required") if(!$self->defined_variable($key)); } } sub action_variables_from_directives { my ($self,$action,$keys)=@_; $keys=[$self->sorted_directives_keys] if(!$keys); for my $key (@$keys) { if($key =~ /^$action\.(.*)/) { $self->action_variable($action,$1, $self->{directives}->{$key}->{def}); } } } sub variables_from_directives { my ($self,%oo)=@_; debug "Variables from internal directives"; my @keys=$self->sorted_directives_keys; for my $a (qw/default set setx setglobal requires/) { $self->action_variables_from_directives($a,\@keys) if($oo{$a}); } } sub action_variables_from_parse { my ($self,$parsed,$action)=@_; my @other=(); for my $d (@$parsed) { if($d->{key} =~ /^$action\.(.*)/) { $self->action_variable($action,$1,$d->{value}); } else { push @other,$d; } } @$parsed=@other; } sub variables_from_parsed_directives { my ($self,$parsed,%oo)=@_; for my $a (qw/default set setx setglobal requires/) { $self->action_variables_from_parse($parsed,$a) if($oo{$a}); } } sub variables_from_directives_string { my ($self,$string,%oo)=@_; debug "Variables from directives $string"; $self->variables_from_parsed_directives ($self->parse_defs($string),%oo); } sub process_variables { my ($self,$string)=@_; $self->variables_from_parse($self->parse_defs($string)); } sub unevaluate_directives { my ($self)=@_; for my $key (%{$self->{directives}}) { $self->{directives}->{$key}->{evaluated}=0; } } sub max_rank { my ($self)=@_; my $r=0; for(keys %{$self->{directives}}) { $r=$self->{directives}->{$_}->{rank} if($self->{directives}->{$_}->{rank}>$r); } return($r); } sub sorted_directives_keys { my ($self)=@_; return(sort { $self->{directives}->{$a}->{rank} <=> $self->{directives}->{$b}->{rank} } (keys %{$self->{directives}})); } sub set_directive { my ($self,$key,$value,$rank)=@_; $rank=$self->max_rank()+1 if(!defined($rank)); debug "Setting directive {$rank} $key = $value"; $self->{directives}->{$key}={def=>$value,rank=>$rank}; } sub directives_from_parse { my ($self,$parsed)=@_; my $rank=$self->max_rank()+1; for my $d (@$parsed) { $self->set_directive($d->{key},$d->{value},$rank++); } } sub process_directives { my ($self,$string)=@_; $self->directives_from_parse($self->parse_defs($string)); } sub evaluate { my ($self,$string)=@_; return(undef) if(!defined($string)); return('') if($string eq ''); my $string_orig=$string; for my $vv (keys %{$self->{variables}}) { $string =~ s/\b$vv\b/$self->{variables}->{$vv}->[$self->{type}]->{value}/g; } my $calc=eval($string); $self->error("Syntax error (evaluation) : $string") if(!defined($calc)); debug "Evaluation [$self->{type}] : $string_orig => $string => $calc" if($string_orig ne $calc); return($calc); } sub defined_directive { my ($self,$key)=@_; return($self->{directives}->{$key}); } sub get_directive_raw { my ($self,$key)=@_; if($self->{directives}->{$key}) { return($self->{directives}->{$key}->{def}); } else { return(undef); } } sub get_directive { my ($self,$key)=@_; if($self->{directives}->{$key}) { if(!$self->{directives}->{$key}->{evaluated}) { $self->{directives}->{$key}->{value} =$self->evaluate($self->{directives}->{$key}->{def}); $self->{directives}->{$key}->{evaluated}=1; } return($self->{directives}->{$key}->{value}); } else { return(undef); } } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/State.pm000066400000000000000000000162131341176102400211250ustar00rootroot00000000000000# -*- perl -*- # # Copyright (C) 2011-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::State; # This package helps storing state of important files after the user # has printed exam sheets. All requested files are stored in a archive # file, along with MD5 sum of each of these files and printing # information. When printing again, if all the files are unchanged, # only printing information is added. If some of the files has been # modified since the last print, a new ARCHIVE file is created. use AMC::Basic; use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); use Digest::MD5; use XML::Simple; sub new { my (%o)=(@_); my $self={'directory'=>'', 'archivefile'=>'', # absolute 'descfile'=>'state.xml', }; for my $k (keys %o) { $self->{$k}=$o{$k} if(defined($self->{$k})); } $self->{'archive'}=Archive::Zip->new(); $self->{'data'}={}; $self->{'directory'} =~ s/\/$//; bless $self; return($self); } sub archive { my ($self)=@_; return($self->{'archive'}); } # reads the ARCHIVE file. If no filename is given, looks for the last ARCHIVE # file created in given directory. sub read { my ($self,$archivefile)=@_; if(!$archivefile) { $archivefile=$self->{'archivefile'}; } if(!$archivefile) { # look for the last one in the directory opendir(my $dh, $self->{'directory'}) or debug "Error opening directory $directory: $!"; my @st = sort { $b cmp $a } grep { /^saved-[0-9-]+\.zip$/ && -f $self->{'directory'}."/$_" } readdir($dh); closedir $dh; if(@st) { debug "Archive file found: $st[0]"; $archivefile=$self->{'directory'}."/".$st[0]; } else { debug "No ARCHIVE file"; $archivefile=''; } } $self->{'data'}={'md5'=>{},'print'=>[]}; if(-f $archivefile) { # opens the ARCHIVE file to look at the content debug "Reading ARCHIVE $archivefile"; if( $self->{'archive'}->read($archivefile) != AZ_OK ) { debug "Error reading $archivefile"; } else { # look for XML description file, with MD5 sums and # printing information, and read it my $xml = $self->{'archive'}->contents($self->{'descfile'}); if($xml) { $self->{'data'}=XMLin($xml,ForceArray => 1,ContentKey=>'content',KeyAttr =>['file']); $self->{'archivefile'}=$archivefile; } } } else { debug "No file $archivefile"; $self->{'archivefile'}=''; } } # writes ARCHIVE file to disk, including XML file with MD5 sums and # printing information sub write { my ($self,$archivefile)=@_; if($archivefile) { $self->{'archivefile'}=$archivefile; } else { $archivefile=$self->{'archivefile'}; } if(!$archivefile) { # if no filename is given, create it from date and time my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $archivefile=$self->{'directory'}."/". sprintf("saved-%d-%02d-%02d-%02d-%02d-%02d.zip", $year+1900,$mon+1,$mday,$hour,$min,$sec); $self->{'archivefile'}=$archivefile; } # adds XML file to ARCHIVE my $xml=XMLout( $self->{'data'}, ContentKey=>'content',KeyAttr =>['file'], RootName=>'state', ); $self->{'archive'}->removeMember($self->{'descfile'}); $self->{'archive'}->addString($xml,$self->{'descfile'}); # writes to disk debug "Writing ARCHIVE to $archivefile ..."; unless ( $self->{'archive'}->overwriteAs($archivefile) == AZ_OK ) { debug "Error writing to $archivefile"; } } # adds printing information sub add_print { my ($self,%oo)=@_; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); push @{$self->{'data'}->{'print'}},{%oo,'date'=>sprintf("%d-%02d-%02d %02d:%02d:%02d",$year+1900,$mon+1,$mday,$hour,$min,$sec)}; } # clears all MD5 sums from current state sub clear_md5 { my ($self)=@_; $self->{'data'}->{'md5'}={}; } # returns MD5 sum stocked in the ARCHIVE state for a given file sub get_md5 { my ($self,$file)=@_; my $r=$self->{'data'}->{'md5'}->{$file}->{'content'}; return(defined($r) ? $r : ''); } # sets MD5 sum in current state sub set_md5 { my ($self,$file,$sum)=@_; $self->{'data'}->{'md5'}->{$file}->{'content'}=$sum; } # check if given files are all unchanged sub check_local_md5 { my ($self,@files)=@_; my $ok=1; FILE:for(@files) { if(!$self->check_md5($_)) { $ok=0; last FILE; } } return($ok); } # check if given file is unchanged. $localfile is the absolute path of # the on-disk file, and $file is the name of the in-ARCHIVE file. Un empty # $localfile is set to file $file in state directory (given when using # new) sub check_md5 { my ($self,$file,$localfile)=@_; if(!$localfile) { if($file =~ /^\//) { $localfile=$file; $file =~ s/.*\///; } else { $localfile=$self->{'directory'}."/".$file; } } my $z=$self->get_md5($file); debug "Archive MD5: $z"; if($z) { if(open(FILE, $localfile)) { binmode(FILE); my $md5_local=Digest::MD5->new->addfile(*FILE)->hexdigest; close(FILE); debug "Local MD5: $md5_local"; return($z eq $md5_local); } else { debug "Open failed for $localfile"; return(0); } } else { debug "No ARCHIVE MD5 for $file"; return(0); } } # adds MD5 sum of given on-disk file to current state sub add_md5 { my ($self,$file,$localfile)=@_; if(!$localfile) { if($file =~ /^\//) { $localfile=$file; $file =~ s/.*\///; } else { $localfile=$self->{'directory'}."/".$file; } } if(open(FILE, $localfile)) { binmode(FILE); my $md5_local=Digest::MD5->new->addfile(*FILE)->hexdigest; close(FILE); debug "Adding MD5: $md5_local"; $self->set_md5($file,$md5_local); } else { debug "Open failed for $localfile"; } } # adds file to ARCHIVE and sets corresponding MD5 sum in current state sub add_file { my ($self,$file,$localfile)=@_; if(!$localfile) { if($file =~ /^\//) { $localfile=$file; $file =~ s/.*\///; } else { $localfile=$self->{'directory'}."/".$file; } } if(-f $localfile) { debug "Adding $localfile [$file]..."; if($self->{'archive'}->addFile($localfile,$file)) { $self->add_md5($file,$localfile); debug "OK."; return(1); } else { debug "Error adding $localfile : $!"; return(0); } } else { debug "ARCHIVE: No file $localfile"; return(0); } } # adds a list of files all in the state sirectory sub add_local_files { my ($self,@files)=@_; my $i=0; for(@files) { $i+=$self->add_file($_); } return($i); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Subprocess.pm000066400000000000000000000053451341176102400222010ustar00rootroot00000000000000# # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Subprocess; use AMC::Basic; use IPC::Open2; sub new { my (%o)=(@_); my $self={'file'=>'', 'ipc_in'=>'', 'ipc_out'=>'', 'ipc'=>'', 'args'=>['%f'], 'mode'=>'detect', 'exec_file'=>'', }; for my $k (keys %o) { $self->{$k}=$o{$k} if(defined($self->{$k})); } if(! $self->{'exec_file'}) { if($self->{'mode'}) { $self->{'exec_file'}=amc_specdir('libexec').'/AMC-'.$self->{'mode'}; } } if(! -f $self->{'exec_file'}) { die "AMC::Subprocess: No program to execute"; } bless $self; return($self); } sub set { my ($self,%oo)=(@_); for my $k (keys %oo) { $self->{$k}=$oo{$k} if(defined($self->{$k})); } } sub commande { my ($self,@cmd)=(@_); my @r=(); if(!$self->{'ipc'}) { debug "Exec subprocess..."; my @a=map { ( $_ eq '%f' ? $self->{'file'} : $_ ) } (@{$self->{'args'}}); debug join(' ',$self->{'exec_file'},@a); $self->{'times'}=[times()]; $self->{'ipc'}=open2($self->{'ipc_out'},$self->{'ipc_in'}, $self->{'exec_file'},@a); binmode $self->{'ipc_out'}; binmode $self->{'ipc_in'}; debug "PID=".$self->{'ipc'}." : ".$self->{'ipc_in'}." --> ".$self->{'ipc_out'}; } my $s=join(' ',@cmd); debug "CMD : $s"; print { $self->{'ipc_in'} } "$s\n"; my $o; GETREPONSE: while($o=readline($self->{'ipc_out'})) { chomp($o); debug "|> $o"; last GETREPONSE if($o =~ /_{2}END_{2}/); push @r,$o; } return(@r); } sub ferme_commande { my ($self)=(@_); if($self->{'ipc'}) { debug "Image sending QUIT"; $self->commande("quit"); waitpid $self->{'ipc'},0; $self->{'ipc'}=''; $self->{'ipc_in'}=''; $self->{'ipc_out'}=''; my @tb=times(); debug sprintf("Image finished: parent times [%7.02f,%7.02f]", $tb[0]+$tb[1]-$self->{'times'}->[0]-$self->{'times'}->[1],$tb[2]+$tb[3]-$self->{'times'}->[2]-$self->{'times'}->[3]); } } sub DESTROY { my ($self)=(@_); $self->ferme_commande(); } 1; auto-multiple-choice-1.4.0/AMC-perl/AMC/Substitute.pm000066400000000000000000000043731341176102400222240ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . package AMC::Substitute; use AMC::Basic; sub new { my (%o)=@_; my $self={'names'=>'', 'scoring'=>'', 'assoc'=>'', 'name'=>'','chsign'=>4, 'lk'=>'', }; for (keys %o) { $self->{$_}=$o{$_} if(defined($self->{$_})); } bless $self; return($self); } sub format_note { my ($self,$mark)=@_; if($self->{'chsign'}) { $mark=sprintf("%.*g",$self->{'chsign'},$mark); } return($mark); } sub substitute { my ($self,$text,$student,$copy)=@_; if($self->{'scoring'}) { my $student_mark=$self->{'scoring'}->student_global($student,$copy); if($student_mark) { $text =~ s/\%[S]/$self->format_note($student_mark->{'total'})/ge; $text =~ s/\%[M]/$self->format_note($student_mark->{'max'})/ge; $text =~ s/\%[s]/$self->format_note($student_mark->{'mark'})/ge; $text =~ s/\%[m]/$self->format_note($self->{'scoring'}->variable('mark_max'))/ge; } else { debug "No marks found ! Copy=".studentids_string($student,$copy); } } $text =~ s/\%[n]/$self->{'name'}/ge; if($self->{'assoc'} && $self->{'names'}) { $self->{'lk'}=$self->{'assoc'}->variable('key_in_list') if(!$self->{'lk'}); my $i=$self->{'assoc'}->get_real($student,$copy); my $n; debug "Association -> ID=$i"; if(defined($i)) { ($n)=$self->{'names'}->data($self->{'lk'},$i,test_numeric=>1); if($n) { $text=$self->{'names'}->substitute($n,$text,'prefix'=>'%'); } } } return($text); } 1; auto-multiple-choice-1.4.0/AMC-prepare.pl000077500000000000000000000675311341176102400201540ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use utf8; use File::Copy; use File::Spec::Functions qw/splitpath catpath splitdir catdir catfile rel2abs tmpdir/; use File::Temp qw/ tempfile tempdir /; use Clone; use Module::Load; use Getopt::Long; use AMC::Basic; use AMC::Gui::Avancement; use AMC::Data; use AMC::DataModule::scoring ':question'; use_gettext; use_amc_plugins(); my $cmd_pid=''; my @output_files=(); sub catch_signal { my $signame = shift; debug "*** AMC-prepare : signal $signame, transfered to $cmd_pid..."; kill 9,$cmd_pid if($cmd_pid); if(@output_files) { debug "Removing files that are beeing built: ".join(" ",@output_files); unlink(@output_files); } die "Killed"; } $SIG{INT} = \&catch_signal; # PARAMETERS my $mode="mbs"; my $data_dir=""; my $calage=''; my $latex_engine='latex'; my @engine_args=(); my $engine_topdf=''; my $prefix=''; my $filter=''; my $filtered_source=''; my $debug=''; my $latex_stdout=''; my $n_procs=0; my $number_of_copies=0; my $progress=1; my $progress_id=''; my $out_calage=''; my $out_sujet=''; my $out_corrige=''; my $out_corrige_indiv=''; my $out_catalog=''; my $jobname="amc-compiled"; my $f_tex; my $epoch=''; @ARGV=unpack_args(@ARGV); GetOptions("mode=s"=>\$mode, "with=s"=>\$latex_engine, "data=s"=>\$data_dir, "calage=s"=>\$calage, "out-calage=s"=>\$out_calage, "out-sujet=s"=>\$out_sujet, "out-corrige=s"=>\$out_corrige, "out-corrige-indiv=s"=>\$out_corrige_indiv, "out-catalog=s"=>\$out_catalog, "convert-opts=s"=>\$convert_opts, "debug=s"=>\$debug, "latex-stdout!"=>\$latex_stdout, "progression=s"=>\$progress, "progression-id=s"=>\$progress_id, "prefix=s"=>\$prefix, "n-procs=s"=>\$n_procs, "n-copies=s"=>\$number_of_copies, "filter=s"=>\$filter, "filtered-source=s"=>\$filtered_source, "epoch=s"=>\$epoch, ); set_debug($debug); debug("AMC-prepare / DEBUG") if($debug); my %global_opts=(qw/NoWatermarkExterne 1 NoHyperRef 1/); # Split the LaTeX engine string, to get # # 1) the engine command $latex_engine (eg. pdflatex) # # 2) the engine arguments @engine_args to be passed to this command # # 3) the command used to make a PDF file from the engine output # (eg. dvipdfmx) # # The LaTeX engine string is on the form # [+] # # For exemple: # # pdflatex # latex+dvipdfmx # platex+dvipdfmx # lualatex --shell-escape # latex+dvipdfmx --shell-escape sub split_latex_engine { my ($engine)=@_; $latex_engine=$engine if($engine); if($latex_engine =~ /([^ ]+)\s+(.*)/) { $latex_engine=$1; @engine_args=split(/ +/,$2); } if($latex_engine =~ /(.*)\+(.*)/) { $latex_engine=$1; $engine_topdf=$2; } } split_latex_engine(); sub set_filtered_source { my ($filtered_source)=@_; # change directory where the $filtered_source is, and set $f_base to # the $filtered_source without path and without extension ($v,$d,$f_tex)=splitpath($filtered_source); chdir(catpath($v,$d,"")); $f_base=$f_tex; $f_base =~ s/\.tex$//i; # AMC usualy sets $prefix to "DOC-", but if $prefix is empty, uses # the base name $prefix=$f_base."-" if(!$prefix); } # Uses an AMC::Gui::Avancement object to tell regularly the calling # program how much work we have done so far. my $avance=AMC::Gui::Avancement::new($progress,'id'=>$progress_id); # Get and test the source file my $source=$ARGV[0]; die "Nonexistent source file: $source" if(! -f $source); # $base is the source file base name (with the path but without # extension). my $base=$source; $base =~ s/\.[a-zA-Z0-9]{1,4}$//gi; # $filtered_source is the LaTeX fil made from the source file by the # filter (for exemple, LaTeX or AMC-TXT). $filtered_source=$base.'_filtered.tex' if(!$filtered_source); # default $data_dir value (hardly ever used): $data_dir="$base-data" if(!$data_dir); # make these filenames global for(\$data_dir,\$source,\$filtered_source) { $$_=rel2abs($$_); } set_filtered_source($filtered_source); # set environment variables for reproducible output if($epoch) { $ENV{SOURCE_DATE_EPOCH}=$epoch; $ENV{SOURCE_DATE_EPOCH_TEX_PRIMITIVES}=1; $ENV{FORCE_SOURCE_DATE}=1; } # These variables are used to track errors from LaTeX compiling my $a_errors; # the number of errors my @errors_msg=(); # errors messages (questions specifications problems) my @latex_errors=(); # LaTeX compilation errors sub flush_errors { debug(@errors_msg); print join('',@errors_msg); @errors_msg=(); } # %info_vars collects the variables values that LaTeX wants to give us my %info_vars=(); sub relay_info_vars { # Relays variables to calling process print "Variables :\n"; for my $k (keys %info_vars) { print "VAR: $k=".$info_vars{$k}."\n"; } } sub exit_with_error { relay_info_vars(); exit(1); } # check_question checks that, if the question question is a simple # one, the number of correct answers is exactly one. sub check_question { my ($q,$t)=@_; # if postcorrection is used, this check cannot be made as we will # only know which answers are correct after having captured the # teacher's copy. return() if($info_vars{'postcorrect'}); if($q) { # For multiple questions, no problem. $q->{partial} means that # all the question answers have not yet been parsed (this can # happen when using AMCnumericChoices or AMCOpen, because the # answers are only given in the separate answer sheet). if(!($q->{'mult'} || $q->{'partial'})) { my $n_correct=0; my $n_total=0; for my $i (grep { /^R/ } (keys %$q)) { $n_total++; $n_correct++ if($q->{$i}); } if($n_correct!=1 && !$q->{'indicative'}) { $a_errors++; push @errors_msg,"ERR: " .sprintf(__("%d/%d good answers not coherent for a simple question")." [%s]\n",$n_correct,$n_total,$t); } } } } # analyse_cslog get the chars written in the boxes from the catalog # build, and updates the layout_char database accordingly sub analyse_cslog { my ($cslog_file)=@_; my $data=AMC::Data->new($data_dir); my $layout=$data->module('layout'); $layout->begin_transaction('Char'); $layout->clear_char(); open(CSLOG,$cslog_file) or die "Unable to open $cslog_file: $!"; while () { if(/\\answer\{.*:(\d+),(\d+)\}\{(.*)\}$/) { my $question=$1; my $answer=$2; my $char=$3; $layout->char($question,$answer,$char); } } close(CSLOG); $layout->end_transaction('Char'); } # analyse_amclog checks common errors in LaTeX about questions: # # * same question ID used multiple times for the same paper, or same # answer ID used multiple times for the same question # # * simple questions with number of good answers != 1 # # * answer given outside a question # # These errors can be detected parsing the *.amc log file produced by # LaTeX compilation, through AUTOQCM[...] messages. sub analyse_amclog { my ($amclog_file)=@_; my $analyse_data={etu=>0,qs=>{}}; my $analyse_data_s0={}; # backup for student 0 my %titres=(); @errors_msg=(); debug("Check AMC log : $amclog_file"); open(AMCLOG,$amclog_file) or die "Unable to open $amclog_file: $!"; while () { # AUTOQCM[Q=N] tells that we begin with question number N if (/AUTOQCM\[Q=([0-9]+)\]/) { # first check that the previous question is ok: check_question($analyse_data->{q},$analyse_data->{etu}.":".$analyse_data->{titre}); # then clear current question data: $analyse_data->{q}={}; # if this question has already be seen for current student... if ($analyse_data->{qs}->{$1}) { if ($analyse_data->{qs}->{$1}->{partial}) { # if the question was partial (answers was not given in the # question, but are now given in the answer sheet), it's # ok. Simply get back the data already processed, and clear # 'partial' and 'closed' flags: $analyse_data->{q}=$analyse_data->{qs}->{$1}; for my $flag (qw/partial closed/) { delete($analyse_data->{q}->{$flag}); } } else { # if the question was NOT partial, this is an error! $a_errors++; push @errors_msg,"ERR: " .sprintf(__("question ID used several times for the same paper: \"%s\"")." [%s]\n",$titres{$1},$analyse_data->{etu}); } } # register question data $analyse_data->{titre}=$titres{$1}; $analyse_data->{qs}->{$1}=$analyse_data->{q}; } # AUTOQCM[QPART] tells that we end with a question without having # given all the answers if (/AUTOQCM\[QPART\]/) { $analyse_data->{q}->{partial}=1; } # AUTOQCM[FQ] tells that we have finished with the current question if (/AUTOQCM\[FQ\]/) { $analyse_data->{q}->{closed}=1; } # AUTOQCM[ETU=N] tells that we begin with student number N. if (/AUTOQCM\[ETU=([0-9]+)\]/) { my $student=$1; # backup $analyse_data_s0=$analyse_data if($analyse_data->{etu}==0); # first check the last question from preceding student is ok: check_question($analyse_data->{q},$analyse_data->{etu}.":".$analyse_data->{titre}); # then clear all $analyse_data to begin with this student: $analyse_data={'etu'=>$student,'qs'=>{}}; } # AUTOQCM[BR=N] tells that this student is a replicate of student N if(/AUTOQCM\[BR=([0-9]+)\]/) { my $alias=$1; die "Unimplemented positive student alias" if($alias!=0); my $student=$analyse_data->{etu}; $analyse_data=Clone::clone($analyse_data_s0); $analyse_data->{etu}=$student; } # AUTOACM[NUM=N=ID] tells that question number N (internal # question number, not the question number shown on the sheet) # refers to ID (question name, string given as an argument to # question environment) if (/AUTOQCM\[NUM=([0-9]+)=(.+)\]/) { # stores this association (two-way) $titres{$1}=$2; $analyse_data->{titres}->{$2}=1; } # AUTOQCM[MULT] tells that current question is a multiple question if (/AUTOQCM\[MULT\]/) { $analyse_data->{q}->{mult}=1; } # AUTOQCM[INDIC] tells that current question is an indicative # question if (/AUTOQCM\[INDIC\]/) { $analyse_data->{q}->{indicative}=1; } # AUTOQCM[REP=N:S] tells that answer number N is S (S can be 'B' # for 'correct' or 'M' for wrong) if (/AUTOQCM\[REP=([0-9]+):([BM])\]/) { my $rep="R".$1; if ($analyse_data->{q}->{closed}) { # If current question is already closed, this is an error! $a_errors++; push @errors_msg,"ERR: " .sprintf(__("An answer appears to be given outside a question environment, after question \"%s\"")." [%s]\n", $analyse_data->{titre},$analyse_data->{etu}); } if (defined($analyse_data->{q}->{$rep})) { # if we already saw an answer with the same N, this is an error! $a_errors++; push @errors_msg,"ERR: " .sprintf(__("Answer number ID used several times for the same question: %s")." [%s]\n",$1,$analyse_data->{titre}); } # stores the answer's status $analyse_data->{q}->{$rep}=($2 eq 'B' ? 1 : 0); } # AUTOQCM[VAR:N=V] tells that variable named N has value V if (/AUTOQCM\[VAR:([0-9a-zA-Z.:-]+)=([^\]]+)\]/) { $info_vars{$1}=$2; } } close(AMCLOG); # check that the last question from the last student is ok: check_question($analyse_data->{q},$analyse_data->{etu}.":".$analyse_data->{titre}); # Send error messages to the calling program through STDOUT flush_errors(); debug("AMC log $amclog_file : $a_errors errors."); } # execute(%oo) launches the LaTeX engine with the right arguments, call it # again if needed (for exemple when a second run is necessary to get # references right), and then produces a PDF file from LaTeX output. # # $oo{command_opts} should be the options to be passed to latex_cmd, to # build the LaTeX command to run, with all necessary arguments my $filter_engine; sub execute { my %oo=(@_); my $errs=0; prepare_filter(); # gives the processing command to the filter $oo{command}=[latex_cmd(@{$oo{command_opts}})]; $ENV{AMC_CMD}=join(' ',@{$oo{command}}); if($filter) { if(!$filter_engine->get_filter_result('done') || $filter_engine->get_filter_result('jobspecific')) { $errs=do_filter(); $filter_engine->set_filter_result('done',1) if(!$errs); } } # first removes previous run's outputs for my $ext (qw/pdf dvi ps/) { if(-f "$jobname.$ext") { debug "Removing old $ext"; unlink("$jobname.$ext"); } } exit_with_error() if($errs); # the filter could have changed the latex engine, so update it $oo{command}=[latex_cmd(@{$oo{command_opts}})]; $ENV{AMC_CMD}=join(' ',@{$oo{command}}); check_engine(); my $min_runs=1; # minimum number of runs my $max_runs=2; # maximum number of runs my $n_run=0; # number of runs so far my $rerun=0; # has to re-run? my $format=''; # output format do { $n_run++; # clears errors from previous run $a_errors=0; @latex_errors=(); debug "%%% Compiling: pass $n_run"; # lauches the command debug "COMMAND: $ENV{AMC_CMD}"; $cmd_pid=open(EXEC,"-|",@{$oo{'command'}}); die "Can't exec ".join(' ',@{$oo{'command'}}) if(!$cmd_pid); # parses the output while() { # LaTeX Warning: Label(s) may have changed. Rerun to get # cross-references right. -> has to re-run $rerun=1 if(/^LaTeX Warning:.*Rerun to get cross-references right/); $min_runs=2 if(/Warning: .*run twice/); # Output written on jobname.pdf (10 pages) -> output # format is pdf $format=$1 if(/^Output written on .*\.([a-z]+) \(/); # Lines beginning with '!' are errors: collect them if(/^\!\s*(.*)$/) { my $e=$1; $e .= "..." if($e !~ /\.$/); push @latex_errors,$e; } # detect style file path if(m:\(([^\)]+/automultiplechoice.sty)(\)|$):) { $info_vars{stypath}=$1; } # detect style file version if(/^AMC version: (.*)/) { $info_vars{styversion}=$1; } # Relays LaTeX log to calling program print STDERR $_ if(/^.+$/); print $_ if($latex_stdout && /^.+$/); } close(EXEC); $cmd_pid=''; } while( (($n_run<$min_runs) || ($rerun && $n_run<$max_runs)) && ! $oo{'once'}); # For these engines, we already know what is the output format: # override detected one $format='dvi' if($latex_engine eq 'latex'); $format='pdf' if($latex_engine eq 'pdflatex'); $format='pdf' if($latex_engine eq 'xelatex'); print "Output format: $format\n"; debug "Output format: $format\n"; # Now converts output to PDF. Output format can be DVI or PDF. If # PDF, nothing has to be done... if($format eq 'dvi') { if(-f "$jobname.dvi") { # default DVI->PDF engine is dvipdfmx $engine_topdf='dvipdfm' if(!$engine_topdf); # if the choosend DVI->PDF engine is not present, try to get # another one if(!commande_accessible($engine_topdf)) { debug_and_stderr "WARNING: command $engine_topdf not available"; $engine_topdf=choose_command('dvipdfmx','dvipdfm','xdvipdfmx', 'dvipdf'); } if($engine_topdf) { # Now, convert DVI to PDF debug "Converting DVI to PDF with $engine_topdf ..."; if($engine_topdf eq 'dvipdf') { system($engine_topdf,"$jobname.dvi","$jobname.pdf"); } else { system($engine_topdf,"-o","$jobname.pdf","$jobname.dvi"); } debug_and_stderr "ERROR $engine_topdf: $?" if($?); } else { # No available DVI->PDF engine! debug_and_stderr "ERROR: I can't find dvipdf/dvipdfm/xdvipdfmx command !"; } } else { debug "No DVI"; } } } # do_filter() converts the source file to LaTeX format, using the # right AMC::Filter::* module sub prepare_filter { if($filter) { if(!$filter_engine) { load("AMC::Filter::$filter"); $filter_engine="AMC::Filter::$filter"->new(jobname=>$jobname); $filter_engine->pre_filter($source); # sometimes the filter says that the source file don't need to # be changed set_filtered_source($source) if($filter_engine->unchanged); } } else { # Empty filter: the source is already a LaTeX file set_filtered_source($source); } } sub do_filter { my $f_base; my $v; my $d; my $n_err=0; if($filter) { # Loads and call appropriate filter to convert $source to # $filtered_source prepare_filter(); $filter_engine->filter($source,$filtered_source); # show conversion errors for($filter_engine->errors()) { print "ERR: $_\n"; $n_err++; } # sometimes the filter asks to override the LaTeX engine split_latex_engine($filter_engine->{'project_options'}->{'moteur_latex_b'}) if($filter_engine->{'project_options'}->{'moteur_latex_b'}); } return($n_err); } # give_latex_errors($context) Relay suitably formatted LaTeX errors to # calling program (usualy AMC GUI). $context is the name of the # document we are building. sub give_latex_errors { my ($context)=@_; if(@latex_errors) { print "ERR: " .sprintf(__("%d errors during LaTeX compiling")." (%s)\n",(1+$#latex_errors),$context); for(@latex_errors) { print "ERR>$_\n"; } exit_with_error(); } } # transfer($orig,$dest) moves $orig to $dest, removing $dest if $orig # does not exist sub transfer { my ($orig,$dest)=@_; if(-f $orig) { debug "Moving $orig --> $dest"; move($orig,$dest); } else { debug "No source: removing $dest"; unlink($dest); } } # latex_reprocucible_commands($engine) returns commands suitable for # the given engine to get reproducible output. sub latex_reproducible_commands { my ($engine)=@_; if($engine eq 'pdflatex') { return("\\pdfsuppressptexinfo=-1\\pdftrailerid{}"); } else { return(""); } } # latex_cmd(%o) builds the LaTeX command and arguments to be passed to # the execute command, using the engine specifications and extra # options %o to pass to LaTeX: for each name=>value from %o, a LaTeX # command '\def\name{value}' is passed to LaTeX. This allows to relay # some options to LaTeX (number of copies, document needed for # exemple). sub latex_cmd { my (%o)=@_; $o{'AMCNombreCopies'}=$number_of_copies if($number_of_copies>0); return($latex_engine, "--jobname=".$jobname, @engine_args, "\\nonstopmode" .join('',map { "\\def\\".$_."{".$o{$_}."}"; } (keys %o) ) .($epoch ? latex_reproducible_commands($latex_engine) : "") ."\\input{\"$f_tex\"}"); } # check_engine() checks that the requeted LaTeX engine is available on # the system sub check_engine { if(!commande_accessible($latex_engine)) { print "ERR: ".sprintf(__("LaTeX command configured is not present (%s). Install it or change configuration, and then rerun."),$latex_engine)."\n"; exit_with_error(); } } # the $mode option passed to AMC-prepare contains characters that # explains what is to be prepared... my %to_do=(); while($mode =~ s/^[^a-z]*([a-z])(\[[a-z]*\])?//i) { $to_do{$1}=(defined($2) ? $2 : 1); } ############################################################################ # MODE f: filter source file to LaTeX format ############################################################################ if($to_do{f}) { # FILTER do_filter(); } ############################################################################ # MODE S: builds the solution ############################################################################ sub build_solution { execute('command_opts'=>[%global_opts,'CorrigeExterne'=>1]); transfer("$jobname.pdf",$out_corrige); give_latex_errors(__"solution"); } if($to_do{S}) { build_solution(); } ############################################################################ # MODE C: builds the catalog ############################################################################ sub build_catalog { execute('command_opts'=>[%global_opts,'CatalogExterne'=>1]); transfer("$jobname.pdf",$out_catalog); analyse_cslog("$jobname.cs"); give_latex_errors(__"catalog"); } if($to_do{C}) { build_catalog(); } ############################################################################ # MODE s: builds the subject and a solution (with all the answers for # questions, but with a different layout) ############################################################################ if($to_do{s}) { $to_do{s}='[sc]' if($to_do{s} eq '1'); @output_files=($out_sujet,$out_calage,$out_corrige,$out_catalog); $out_calage=$prefix."calage.xy" if(!$out_calage); $out_corrige=$prefix."corrige.pdf" if(!$out_corrige); $out_catalog=$prefix."catalog.pdf" if(!$out_catalog); $out_sujet=$prefix."sujet.pdf" if(!$out_sujet); for my $f ($out_calage,$out_corrige,$out_corrige_indiv,$out_sujet,$out_catalog) { if(-f $f) { debug "Removing already existing file: $f"; unlink($f); } } # 1) SUBJECT execute('command_opts'=>[%global_opts,'SujetExterne'=>1]); analyse_amclog("$jobname.amc"); give_latex_errors(__"question sheet"); if($a_errors>0) { debug("$a_errors errors detected: EXIT"); exit_with_error(); } transfer("$jobname.pdf",$out_sujet); transfer("$jobname.xy",$out_calage); # Looks for accents problems in question IDs... my %qids=(); my $unknown_qid=0; if(open(XYFILE,$out_calage)) { binmode(XYFILE); while() { if(!utf8::decode($_) || /\\IeC/) { if(/\\tracepos\{[^:]*:[^:]*:(.+):[^:]*\}\{([+-]?[0-9.]+[a-z]*)\}\{([+-]?[0-9.]+[a-z]*)\}(?:\{([a-zA-Z]*)\})?$/) { $qids{$1}=1; } else { $unknown_qid=1; } } } close(XYFILE); if(%qids) { push @errors_msg, map { "WARN: ".sprintf(__("please remove accentuated or non-standard characters from the following question ID: \"%s\""),$_)."\n" } (sort { $a cmp $b } (keys %qids)); } elsif($unknown_qid) { push @errors_msg,"WARN: ".__("some question IDs seems to have accentuated or non-standard characters. This may break future processings.")."\n"; } } flush_errors(); # 2) SOLUTION if($to_do{s}=~/s/) { build_solution(); } else { debug "Solution not requested: removing $out_corrige"; unlink($out_corrige); } # 3) CATALOG if($to_do{s}=~/c/) { build_catalog(); } else { debug "Catalog not requested: removing $out_catalog"; unlink($out_catalog); } } ############################################################################ # MODE k: builds individual corrected answer sheets (exactly the same # sheets as for the students, but with correct answers ticked). ############################################################################ if($to_do{k}) { my $of=$out_corrige_indiv; $of=$out_corrige if(!$of && !$to_do{s}); $of=$prefix."corrige.pdf" if(!$of); if(-f $of) { debug "Removing already existing file: $of"; unlink($of); } @output_files=($of); execute('command_opts'=>[%global_opts,qw/CorrigeIndivExterne 1/]); transfer("$jobname.pdf",$of); give_latex_errors(__"individual solution"); } ############################################################################ # MODE b: extracts the scoring strategy to the scoring database, # parsing the AUTOQCM[...] messages from the LaTeX output. ############################################################################ if($to_do{b}) { print "********** Making marks scale...\n"; my %bs=(); my %titres=(); my $quest=''; my $rep=''; my $outside_quest=''; my $etu=0; my $delta=0; # Launches the LaTeX engine execute('command_opts'=>[qw/ScoringExterne 1 NoHyperRef 1/], 'once'=>1); open(AMCLOG,"$jobname.amc") or die "Unable to open $jobname.amc : $!"; # Opens a connection with the database my $data=AMC::Data->new($data_dir); my $scoring=$data->module('scoring'); my $capture=$data->module('capture'); my $qs={}; my $qs0={}; # memory for student 0 (when using AMCformS) my $current_q={}; my $qs0_count=0; my $finished_with_student=0; # and parse the log... $scoring->begin_transaction('ScEx'); annotate_source_change($capture); $scoring->clear_strategy; PARSELOG: while() { debug($_) if($_); # AUTOQCM[TOTAL=N] tells that the total number of sheets is # N. This will allow us to relay the progression of the # process to the calling process. if(/AUTOQCM\[TOTAL=([\s0-9]+)\]/) { my $t=$1; $t =~ s/\s//g; if($t>0) { $delta=1/$t; } else { print "*** TOTAL=$t ***\n"; } } if(/AUTOQCM\[ETU=([0-9]+)\]/) { # save if student 0 $qs0=$qs if($etu==0); # beginning of student sheet $avance->progres($delta) if($etu ne ''); $etu=$1; print "Sheet $etu...\n"; debug "Sheet $etu...\n"; $qs={}; $finished_with_student=0; } next PARSELOG if($finished_with_student); if(/AUTOQCM\[FQ\]/) { # end of question: register it (or update it) $scoring->new_question($etu,$quest, ($current_q->{'multiple'} ? QUESTION_MULT : QUESTION_SIMPLE), $current_q->{'indicative'}, $current_q->{'strategy'}); $qs->{$quest}=$current_q; $outside_quest=$quest; $quest=''; $rep=''; } if(/AUTOQCM\[Q=([0-9]+)\]/) { # beginning of question $quest=$1; $rep=''; if($qs->{$quest}) { $current_q=$qs->{$quest}; } else { $current_q={'multiple'=>0, 'indicative'=>0, 'strategy'=>'', }; } } if(/AUTOQCM\[NUM=([0-9]+)=(.+)\]/) { # association question-number<->question-title $scoring->question_title($1,$2); } if(/AUTOQCM\[MULT\]/) { # this question is a multiple-style one $current_q->{'multiple'}=1; } if(/AUTOQCM\[INDIC\]/) { # this question is an indicative one $current_q->{'indicative'}=1; } if(/AUTOQCM\[REP=([0-9]+):([BM])\]/) { # answer $rep=$1; my $qq=$quest; if($outside_quest && !$qq) { $qq=$outside_quest; debug_and_stderr "WARNING: answer outside questions for student $etu (after question $qq)"; } $scoring->new_answer ($etu,$qq,$rep,($2 eq 'B' ? 1 : 0),''); } # AUTOQCM[BR=N] tells that this student is a replicate of student N if(/AUTOQCM\[BR=([0-9]+)\]/) { my $alias=$1; die "Unimplemented positive student alias" if($alias!=0); $scoring->replicate($alias,$etu); $etu=$alias; $qs=$qs0 if($etu==0); $finished_with_student=1 if($qs0_count>0); $qs0_count++; } if(/AUTOQCM\[B=([^\]]+)\]/) { # scoring strategy string if($quest) { if($rep) { # associated to an answer $scoring->add_answer_strategy($etu,$quest,$rep,$1); } else { # associated to a question $current_q->{'strategy'}= ($current_q->{'strategy'} ? $current_q->{'strategy'}.',' : '').$1; } } else { # global scoring strategy, associated to a student if # $etu>0, or to all students if $etu==0 $scoring->add_main_strategy($etu,$1); } } # AUTOQCM[BDS=string] gives us the default scoring stragety # for simple questions # AUTOQCM[BDM=string] gives us the default scoring stragety # for multiple questions if(/AUTOQCM\[BD(S|M)=([^\]]+)\]/) { $scoring->default_strategy(($1 eq 'S' ? QUESTION_SIMPLE : QUESTION_MULT), $2); } if(/AUTOQCM\[VAR:([0-9a-zA-Z.-]+)=([^\]]+)\]/) { # variables my $name=$1; my $value=$2; $name='postcorrect_flag' if ($name eq 'postcorrect'); $scoring->variable($name,$value); } } close(AMCLOG); $scoring->end_transaction('ScEx'); } relay_info_vars(); $avance->fin(); auto-multiple-choice-1.4.0/AMC-read-pdfform.pl000066400000000000000000000115511341176102400210500ustar00rootroot00000000000000#! /usr/bin/perl -w # # Copyright (C) 2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use AMC::Basic; use AMC::Gui::Avancement; use AMC::Data; use AMC::DataModule::capture qw/ :zone /; use Encode; use Getopt::Long; use Data::Dumper; use_gettext; binmode(STDOUT, ":utf8"); my $list_file=''; my $progress_id=''; my $debug=''; my $data_dir=''; my $multiple=''; GetOptions("list=s"=>\$list_file, "progression-id=s"=>\$progress_id, "debug=s"=>\$debug, "multiple!"=>\$multiple, "data=s"=>\$data_dir, ); die "data directory not found: $data_dir" if(!-d $data_dir); set_debug($debug); my $p=AMC::Gui::Avancement::new(1,'id'=>$progress_id) if($progress_id); my @forms=(@ARGV); if(-f $list_file) { open(LIST,$list_file); while() { chomp; push @forms,$_; } close(LIST); } my $data=AMC::Data->new($data_dir); my $layout=$data->module('layout'); my $capture=$data->module('capture'); sub value_is_true { my ($s)=@_; return($s =~ /yes/i || $s =~ /^on/i); } my $copy_id={}; my @pages=(); sub clear_copy_id { $copy_id={}; @pages=(); } sub get_copy_id { my ($student_id,$page)=@_; my $key="$student_id/$page"; if(!exists($copy_id->{$key})) { if($multiple) { $copy_id->{$key}=$capture->new_page_copy($student_id,$page); } else { $copy_id->{$key}=0; } push @pages,{student=>$student_id,page=>$page,copy=>$copy_id->{$key}}; if($capture->set_page_auto(undef,$student_id,$page,$copy_id->{$key},time(), undef,undef,undef,undef,undef,undef, 0)) { debug "Overwritten page data for [FORM] " .pageids_string($student_id,$page,$copy_id->{$key}); $capture->tag_overwritten($student_id,$page,$copy_id->{$key}); print "VAR+: overwritten\n"; } } return($copy_id->{$key}); } sub handle_field { my ($field)=@_; return(0) if(!$field->{Name}); if($field->{Name} =~ /^([0-9]+):case:(.*):([0-9]+),([0-9]+)$/) { my ($student_id,$q_name,$q_id,$a_id)=($1,$2,$3,$4); my $page=$layout->box_page($student_id,$q_id,$a_id); my $copy=get_copy_id($student_id,$page); debug("Field ".$field->{Name}." got PAGE=$page and COPY=$copy"); $capture->set_zone_auto($student_id,$page,$copy, ZONE_BOX,$q_id,$a_id, 100,(value_is_true($field->{Value}) ? 100 : 0), undef,undef); return(1); } if($field->{Name} =~ /^([0-9]+):namefield$/) { my $student_id=$1; my $page=$layout->namefield_page($student_id); my $copy=get_copy_id($student_id,$page); debug("Field ".$field->{Name}." got PAGE=$page and COPY=$copy"); my $zoneid=$capture->get_zoneid($student_id,$page,$copy,ZONE_NAME,0,0,1); my $value=decode_utf8($field->{Value}); $capture->set_zone_auto_id($zoneid,-1,-1,"text:".$value,undef); return(1); } return(0); } my @not_considered; if(@forms) { $p->text(__("Reading PDF forms...")) if($p); my $dp=1/(1+$#forms); for my $f (@forms) { my $n_fields=0; if($f =~ /\.pdf$/i) { if(-f $f) { # Extract form data with pdfformfields (before, we were using pdftk): open(FORM,"-|","auto-multiple-choice","pdfformfields",$f) or die "Error with pdfformfields: $!"; my $field={}; clear_copy_id(); $data->begin_transaction('PDFF'); while(
    ) { chomp; if(/^---/) { $n_fields += handle_field($field); $field={}; } if(/^Field([^\s]*):\s(.*)/) { $field->{$1}=$2; } } close FORM; $n_fields += handle_field($field); $data->end_transaction('PDFF'); debug "Read $n_fields fields from $f"; } else { debug "Skip file not found: $f"; } } else { debug "Skip file without PDF extension: $f"; } $p->progres($dp) if($p); push @not_considered,$f if($n_fields==0); } } # write back PDF files not used to files list if($list_file) { open(LIST,">",$list_file); for(@not_considered) { print LIST "$_\n"; } close(LIST); } else { debug "WARNING: no output list file requested"; } $p->text('') if($p); auto-multiple-choice-1.4.0/AMC-regroupe.pl000077500000000000000000000322751341176102400203430ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use Getopt::Long; use Encode; use Unicode::Normalize; use AMC::Basic; use AMC::Exec; use AMC::Gui::Avancement; use AMC::NamesFile; use AMC::Data; use AMC::DataModule::report ':const'; use AMC::Export; use File::Spec::Functions qw/tmpdir/; use File::Temp qw/ tempfile tempdir /; use File::Copy; @ARGV=unpack_args(@ARGV); my $debug=''; my $commandes=AMC::Exec::new('AMC-regroupe'); $commandes->signalise(); ################################################################ my $projet_dir=''; my $jpgdir=''; my $modele=""; my $progress=1; my $progress_id=''; my $fich_noms=''; my $noms_encodage='utf-8'; my $csv_build_name=''; my $an_saved=''; my $data_dir=''; my $single_output=''; my $id_file=''; my $compose=''; my $rename=''; my $sort=''; my $register=1; my $moteur_latex='pdflatex'; my $tex_src=''; my $filter=''; my $filtered_source=''; my $debug=''; my $nombre_copies=0; my $force_ascii=0; my $sujet=''; my $dest_size_x=21/2.54; my $dest_size_y=29.7/2.54; GetOptions("projet=s"=>\$projet_dir, "n-copies=s"=>\$nombre_copies, "sujet=s"=>\$sujet, "data=s"=>\$data_dir, "tex-src=s"=>\$tex_src, "with=s"=>\$moteur_latex, "filter=s"=>\$filter, "filtered-source=s"=>\$filtered_source, "modele=s"=>\$modele, "fich-noms=s"=>\$fich_noms, "noms-encodage=s"=>\$noms_encodage, "csv-build-name=s"=>\$csv_build_name, "progression=s"=>\$progress, "progression-id=s"=>\$progress_id, "compose!"=>\$compose, "rename!"=>\$rename, "id-file=s"=>\$id_file, "single-output=s"=>\$single_output, "debug=s"=>\$debug, "sort=s"=>\$sort, "register!"=>\$register, "force-ascii!"=>\$force_ascii, ); set_debug($debug); print (("*"x60)."\n"); print "* WARNING: AMC-regroupe is now obsolete\n* Please move to AMC-annotate\n"; print (("*"x60)."\n"); $projet_dir =~ s:/+$::; $temp_dir = tempdir( DIR=>tmpdir(), CLEANUP => (!get_debug()) ); debug "dir = $temp_dir"; $data_dir=$projet_dir."/data" if($projet_dir && !$data_dir); my $correc_indiv="$temp_dir/correc.pdf"; my $type=($single_output ? REPORT_SINGLE_ANNOTATED_PDF : REPORT_ANNOTATED_PDF ); my $jpgdir=$projet_dir."/cr/corrections/jpg"; my $pdfdir=""; my $avance=AMC::Gui::Avancement::new($progress * ($single_output ? 0.8 : 1), 'id'=>$progress_id); my $noms=''; if(-f $fich_noms) { $noms=AMC::NamesFile::new($fich_noms, "encodage"=>$noms_encodage, "identifiant"=>$csv_build_name); debug "Keys in names file: ".join(", ",$noms->heads()); } # check_correc prepares the corrected answer sheet for all # students. This file is used when option --compose is on, to take # sheets when the scaned sheet is not present (for example if there # are sheets with no answer boxes on it). This can be very useful to # produce a complete annotated answer sheet with subject *and* answers # when separate answer sheet layout is used. my $correc_indiv_ok=''; sub check_correc { if(!$correc_indiv_ok) { $correc_indiv_ok=1; debug "Building individual corrected sheet..."; print "Building individual corrected sheet...\n"; $commandes->execute("auto-multiple-choice","prepare", "--n-copies",$nombre_copies, "--with",$moteur_latex, "--filter",$filter, "--filtered-source",$filtered_source, "--mode","k", "--out-corrige",$correc_indiv, "--debug",debug_file(), $tex_src); } } # gets the dimensions of the page from the subject, if any. if($sujet) { if(-f $sujet) { my @c=("identify","-format","%w,%h",$sujet.'[0]'); debug "IDENT << ".join(' ',@c); if(open(IDENT,"-|",@c)) { while() { if(/^([0-9.]+),([0-9.]+)$/) { debug "Size from subject : $1 x $2"; $dest_size_x=$1/72; $dest_size_y=$2/72; } } close IDENT; } else { debug "Error execing: $!"; } } else { debug "No subject: $sujet"; } } # Convert image to PDF using the right page dimensions sub write_pdf { my ($img,$file)=@_; my ($h,$w)=$img->Get('height','width'); my $d_x=$w/$dest_size_x; my $d_y=$h/$dest_size_y; my $dens=($d_x > $d_y ? $d_x : $d_y); debug "GEOMETRY : $w x $h\n"; debug "DENSITY : $d_x x $d_y --> $dens\n"; debug "destination: $file"; my $w=$img->Write('filename'=>$file, 'page'=>($dens*$dest_size_x).'x'.($dens*$dest_size_y), 'adjoin'=>'True','units'=>'PixelsPerInch', 'compression'=>'jpeg','density'=>$dens.'x'.$dens); if($w) { print "Write error: $w\n"; debug "Write error: $w\n"; return(0); } else { return(1); } } ################################################################### # Connect to the database my $data=AMC::Data->new($data_dir); my $layout=$data->module('layout'); my $capture=$data->module('capture'); my $assoc=$data->module('association'); my $report=$data->module('report'); $lk=$assoc->variable_transaction('key_in_list'); ################################################################### # Get student/copy numbers to process. my @students=(); my $sorted_students=''; if($single_output) { # one single output file: students must be in the right order $sorted_students=AMC::Export->new(); $sorted_students->set_options('fich','datadir'=>$data_dir,'noms'=>$fich_noms); $sorted_students->set_options('noms','encodage'=>$noms_encodage,'useall'=>0); $sorted_students->set_options('sort','keys'=>$sort); $sorted_students->pre_process(); } # a) first case: these numbers are given by --id-file option if($id_file) { open(NUMS,$id_file); while() { if(/^([0-9]+):([0-9]+)$/) { push @students,[$1,$2]; } elsif(/^([0-9]+)$/) { push @students,[$1,0]; } } close(NUMS); if($single_output && $sort) { # sort students my %include=map { studentids_string(@$_)=>1 } (@students); @students= map { [ $_->{'student'},$_->{'copy'} ] } grep { $include{studentids_string($_->{'student'},$_->{'copy'})} } (@{$sorted_students->{'marks'}}); } } # b) second case: guess from data capture data else { if($rename && $single_output) { @students=([0,0]); } else { if($single_output) { # one single output file: students must be in the right order @students=map { [ $_->{'student'},$_->{'copy'} ] } (@{$sorted_students->{'marks'}}); } else { # one output file per student: order is not important. $capture->begin_read_transaction; @students=@{$capture->dbh ->selectall_arrayref($capture->statement('studentCopies'))}; $capture->end_transaction; } } } my $n_copies=1+$#students; if($n_copies<=0) { debug "No sheets to group."; print "* No sheets to group...\n"; exit 0; } ################################################################### # Processing # Stacks of PDF pages comming from the PDF corrected answer sheet or # the PPM annotated pages my $stk_ii; my @stk_pages=(); my $stk_type; sub stk_begin { $stk_ii=1; $stk_file="$temp_dir/$stk_ii.pdf"; $stk_type=''; @stk_pages=(); stk_pdf_begin(); stk_ppm_begin(); } sub stk_push { push @stk_pages,$stk_file; $stk_ii++; $stk_file="$temp_dir/$stk_ii.pdf"; } sub stk_go { stk_pdf_go() if($stk_type eq 'pdf'); stk_ppm_go() if($stk_type eq 'ppm'); $stk_type=''; } sub stk_add { my ($t)=@_; if($stk_type ne $t) { stk_go(); $stk_type=$t; } } # pdf my @stk_pdf_pages=(); sub stk_pdf_begin { @stk_pdf_pages=(); } sub stk_pdf_add { stk_add('pdf'); push @stk_pdf_pages,@_; } sub stk_pdf_go { debug "Page(s) ".join(',',@stk_pdf_pages)." form corrected sheet"; check_correc(); my @ps=sort { $a <=> $b } @stk_pdf_pages; my @morceaux=(); my $mii=0; while(@ps) { my $debut=shift @ps; my $fin=$debut; while($ps[0]==$fin+1) { $fin=shift @ps; } $mii++; my $un_morceau="$temp_dir/m.$mii.pdf"; debug "Slice $debut-$fin to $un_morceau"; $commandes->execute("gs","-dBATCH","-dNOPAUSE","-q", "-sDEVICE=pdfwrite", "-sOutputFile=$un_morceau", "-dFirstPage=$debut","-dLastPage=$fin", $correc_indiv); push @morceaux,$un_morceau; } if($#morceaux==0) { debug "Moving single slice to destination $stk_file"; move($morceaux[0],$stk_file); } else { debug "Joining slices..."; $commandes->execute("gs","-dBATCH","-dNOPAUSE","-q", "-sDEVICE=pdfwrite", "-sOutputFile=$stk_file", @morceaux); unlink @morceaux; } stk_push(); stk_pdf_begin(); } # ppm my $stk_ppm_im; sub stk_ppm_begin { $stk_ppm_im=magick_perl_module()->new(); } sub stk_ppm_add { stk_add('ppm'); $stk_ppm_im->ReadImage(shift); } sub stk_ppm_go { stk_push() if(write_pdf($stk_ppm_im,$stk_file)); stk_ppm_begin(); } sub process_output { my ($file)=@_; stk_go(); if($#stk_pages==0) { debug "Move $stk_pages[0] to $file"; move($stk_pages[0],$file); } elsif($#stk_pages>0) { debug "Join with gs to $file"; $commandes->execute("gs","-dBATCH","-dNOPAUSE","-q", "-sDEVICE=pdfwrite", "-sOutputFile=$file",@stk_pages); } } ################################################################### if($rename) { # In mode rename, move all old files to temp dir print "* Rename already built PDF files...\n"; $data->begin_transaction('grMV'); $pdfdir=$projet_dir.'/'.$report->get_dir($type); for my $e (@students) { my $t=join('_',@$e); my $old_name=$report->get_student_report($type,@$e); debug "Stock $pdfdir/$old_name --> $temp_dir/$t"; move($pdfdir.'/'.$old_name,$temp_dir.'/'.$t); } $report->delete_student_type($type); $data->end_transaction('grMV'); } else { # Else, free database with file names print "* Group annotated pages...\n"; $data->begin_transaction('rDELS'); $report->delete_student_type($type); $pdfdir=$projet_dir.'/'.$report->get_dir($type); $data->end_transaction('rDELS'); } ################################################################### # Going through the sheets to process... stk_begin() if($single_output && !$rename); for my $e (@students) { print "Pages for ID=".studentids_string(@$e)."...\n"; my $f=$modele; if(!$single_output) { $f='(N)-(ID)' if(!$f); $f.='.pdf' if($f !~ /\.pdf$/i); my $ex; if($e->[1]) { $ex=sprintf("%04d:%04d",@$e); } else { $ex=sprintf("%04d",$e->[0]); } $f =~ s/\(N\)/$ex/gi; if($noms) { $data->begin_read_transaction('rAGN'); my $i=$assoc->get_real(@$e); $data->end_transaction('rAGN'); my $nom='XXX'; my $n; debug "Association -> ID=$i"; if($i) { debug "Name found"; ($n)=$noms->data($lk,$i,test_numeric=>1); if($n) { $f=$noms->substitute($n,$f); } } } else { $f =~ s/-?\(ID\)//gi; } if($force_ascii) { $f=string_to_filename($f); } $data->begin_transaction('rSST'); $f=$report->free_student_report($type,$f); $report->set_student_report($type,@$e,$f,'now'); $data->end_transaction('rSST'); $f="$pdfdir/$f"; debug "Dest file: $f"; stk_begin() if(!$rename); } if($rename) { if(!$single_output) { my $t=join('_',@$e); debug "Moving back $temp_dir/$t --> $f"; move($temp_dir.'/'.$t,$f); } } else { $data->begin_read_transaction('rSDP'); my $pp=$capture->get_student_pages(@$e); $data->end_transaction('rSDP'); for my $p (@$pp) { my $f_j0=$p->{'annotated'}; my $f_j; if ($f_j0) { $f_j="$jpgdir/$f_j0"; if (!-f $f_j) { print "Annotated page $f_j not found\n"; debug("Annotated page $f_j not found"); $f_j=''; } } if ($f_j) { # correction JPG presente : on transforme en PDF debug "Page ".studentids_string(@$e)."/$p->{'page'} annotated ($f_j)"; stk_ppm_add($f_j); } elsif ($compose) { # pas de JPG annote : on prend la page corrigee debug "Page ".studentids_string(@$e)."/$p->{'page'} from corrected sheet"; stk_pdf_add($p->{'subjectpage'}); } } if (!$single_output) { print " -> $f\n"; process_output($f); } } $avance->progres(1/$n_copies); } if($single_output) { if($rename) { debug "Moving back $temp_dir/0_0 --> $pdfdir/$single_output"; move($temp_dir.'/0_0',$pdfdir.'/'.$single_output); } else { process_output($pdfdir.'/'.$single_output); } if($register) { $data->begin_transaction('rSST'); $report->set_student_report($type,0,0,$single_output,'now'); $data->end_transaction('rSST'); } } if($register) { $report->begin_transaction('Ereg'); $report->variable('last_group_type',$type); $report->variable('grouped_uptodate',1); $report->end_transaction('Ereg'); } $avance->fin(); auto-multiple-choice-1.4.0/COPYING000066400000000000000000000355651341176102400166150ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS auto-multiple-choice-1.4.0/ChangeLog000066400000000000000000000240041341176102400173160ustar00rootroot000000000000001.4.0 (2018-12-29) * Handle PDF files with ghostscript rather than imagemagick. 1.4.0~rc2 (2018-09-27) * Allows AMC codes to have only one digit/character. * Install process refinements 1.4.0~rc1 (2018-07-04) * GUI: store the size of the marks window. 1.4.0~beta2 (2018-05-30) * Bugfixes and translations updates. 1.4.0~beta1 (2018-05-02) * New \AMCformFilter macro to separate answers from different categories in the separate answer sheet. * Accept non-ascii project names and directories * AMCnumericChoices is rewritten using LaTeX3, with new options for scientific notation (exponent, Texponent, exposign, expovertical). * Warning when some data capture overwrites old data. * New \AMCcodeGrid and \AMCcodeGridInt LaTeX commands * Authenticated SMTP * Scoring: new setglobal.XXX directive * AMC-TXT: typewritter, underline, verbatim * New workflow with PDF forms instead of printed copies * Switch to Gtk3 * AMC-TXT: new group option 'needspace' * AMC-TXT: new option Pages, RandomSeed * New AMCopen option: lineuptext * Bugfixes 1.3.0 (2016-03-16) * New \AMCsetFoot LaTeX command * New package option asbox * New LaTeX commands AMCaddpagesto, insertgroupfrom, copygroupfrom * Mailing log, button tu select failed sendings for next mailing * New printing method CUPSlp * Handles multiple stapling (or other) printer options. * Option to get separate answer sheet first when printing. * Allows students to cancel their ticks by filling the boxes, using the upper darkness threshold parameter. * Adds AMC-TXT options NameField*, TitleWidth. * storebox package option * Warnings when using question IDs with accents. * Compatibility with cleveref. * Font can now be specified for annotations. * Adds \AMCsetScoreZone and \AMCsetScoreZoneAnswerSheet LaTeX commands * Allows to annotate question pages in separate answer sheet mode * New LaTeX command \setgroupmode * Can choose between drag and drop and click to toggle boxes state in zooms window * Adds null mark parameter, for example for swiss mark system (marks from 1 to 6) * New LaTeX commands \AMCboxOutsideLetter, \explain * New option set_multiple for postcorrection * New \AMCBoxOnly command * AMC-TXT IncludeFile * direct PDF drawings for annotation * can now process scans with 3 corner marks instead of 4 * AMC-TXT groups * set.INVALID special behavior * Stats (ODS) table can now be built with a vertical flow * New question/group options 'first', 'next', 'last' for AMC-TXT * New AMC-TXT global options CodeDigitsDirection and AutoMarks * Adds an index in capture database to get linear time for marking process * Adds indicative question option for AMC-TXT 1.2.0 (2013-04-17) * Catalog can now be built from GUI * New automarks package option * Open questions for AMC-TXT * Adds \AMCqlabel command * Manual association can now be driven from the keyboard * Desktop notifications at the end of long processings * Adds ManualDuplex and SingleSided AMC-TXT options * Adds \AMCchoiceLabelFormat LaTeX command * Database and GUI optimizations for large projects * Mew "significant" AMCOpen option * Groups scores in ODS export * Adds \AMCsection and \AMCsubsection LaTeX commands * New AMC-getimages.pl command 1.1.1198 (2012-10-31) * Manual data capture based on the scan images (when automatic data capture has already been made) * Adds a "choose directory" button in the projects list window. * AMC-association new options --list and --set * leading zeros in students IDs are removed for automatic association. * Attachments can be added to emails, and the user can set Cc and Bcc addresses * Images can be inserted with AMC-TXT. * Can now annotate . * Printing to files in a project subdir is easier. * JA I18N updated. * Spanish I18N, thanks to Andrés Alvarado. 1.1.1119 (2012-07-18) * Allows substitution in emails. * New allowempty scoring. * New shape available: ovals. * Can print separate answer sheets as separate files. 1.1.0 (2012-05-11) * New LaTeX commands AMCnumericChoices and AMCOpen * Configurable CSV headers for students names * Questions statistics in the ODS export * Basic plugins install menu * Japanese I18N and documentation, thanks to Hiroto Kagotani. * The sheets ID can be related to the pages of the scans (in the same order) * Boxes can be drawn in red, and red discarded from the scans * Select students is possible when annotating completed answer sheets * New file format available (besides LaTeX): AMC-TXT plain text, with support for Arabic and Japanese exams * During manual association, the names table is more practical * Legend for ODS export 1.0.815 (2012-02-15) * switch to SQLite databases for internal AMC data * Photocopying answer sheets allowed, only for one-page answer sheets * Unrecognized scans analysis window * Mailing the students annotated completed answer sheets is now possible * The user can now choose which columns from the students file to export 1.0.608 (2011-11-06) * Uses jobname argument to allow easy use of lualatex * Allows simple arguments for latex engine 1.0.605 (2011-11-03) * Bug fix with questions which are not in every subject. * Bug fix with global scoring strategies (such as SUF=x) * Bug fix with editable Combo Boxes in preferences window * Use pdftk to split PDF pages instead of ImageMagick, which uses too much memory * Upside down scans are detected and put up back 1.0.582 (2011-09-30) * Post-correction mode now available: correct answers are not given in the LaTeX file, but with the teacher completed answer sheet scan. * move from libglade (Gtk2::GladeXML) to builder (Gtk2::Builder) 1.0 (2011-09-18) * Arabic I18N and templates, thanks to Ali Hatim * single PDF with all annotated sheets is now available 0.541 (2011-07-19) * personnal templates can now be made easily * new marks export format: PDF list 0.523 (2011-07-09) * warnings for some current mistakes in LaTeX * AMCformS to get the same subject for everybody (to be photocopied) and print only the answer sheets. * diagnostic image for unrecognized scans * rewritten AMCcode. It is now more robust and customizable, but users will have to adapt their LaTeX sources to get the same layout * annotation text for each question can be customized 0.504 (2011-06-09) * PDF scans are now accepted * new options insidebox, outsidebox * Use Pango/Cairo for annotation (better for non-english characters) 0.492 (2011-06-01) * Fittings for MacPorts/BSD 0.487 (2011-05-30) * Fittings to be used with arabxetex 0.483 (2011-05-25) * Prepared for installation with MacPorts * spec file corrections * Small bug fixes 0.458 (2011-04-14) * New scoring parameter mz * Documentation update, with man pages for AMC-* commands * LaTeX style documentation and cleanup * rsvg replaces inkscape for building 0.426 (2011-02-08) * Automatic data capture new design, using OpenCV * Save important files state after each print 0.394 (2011-01-20) * Layout detection is now done directly from LaTeX (not using colored PDF) 0.376 (2011-01-11) * Switch to GPLv2+ license (GPLv3 was incompatible with poppler, as pointed out by Jakub Wilk) 0.375 (2011-01-08) * Annotated papers header improvement * Dialog when modifying only a default parameter 0.365 (2010-12-21) * New scoring parameter SUF * Annotated papers header customization * multi-page scans allowed * Bug fix and improvements reading names file (affected manual association) 0.355 (2010-11-27) * English documentation, thanks to J. Berard and G. Khaznadar * LaTeX commands now available in English * Bug fixes 0.340 (2010-10-19) * Bug fixes 0.326 (2010-06-25) * Exported marks file name changes * Bug fix for long marking rules 0.319 (2010-05-16) * new LaTeX option : catalog * using gs instead of pdftk * Changes within depedencies * minor improvements * spec file for RPM building 0.283 (2010-03-16) * Models are now TGZ archives 0.276 (2010-03-12) * Partial internationalization * Bug fixes 0.268 (2010-03-05) * GUI improvements * new boxes design in LaTeX style 0.250 (2010-02-16) * option for faster layout detection, in test * possible printing to PDF files * configurable papers annotation * Bug fixes 0.237 (2010-02-08) * Better support for option 'ensemble' * Bug fixes * possible project creation from zip file. * possible compilation with latex * some new configuration options 0.204 (2010-01-17) * xelatex compatibility * new LaTeX commands AMClabel and AMCref * using relative file names * variables within marking scale specification * important bug corrections 0.169 (2009-10-26) * LaTeX option for pre-svn:156 printed exams * debugging easier * changed number of binary boxes for greater number of copies 0.152 (2009-10-04) * Codes via AMCcode + automatic association * OpenOffice ODS Export * LaTeX : custumisable styles, AMCcode 0.87 (2009-06-15) * LaTeX package 'ensemble' option for one-page answers layout * Better page viewer for manual input 0.75 (2009-05-21) * Better charmaps support * Printing with CUPS * Parallelisation 0.61 (2009-04-06) * New interface for LaTeX source file * jpg size parameters for answers * Storable for MEPList et ANList 0.56 (2008-12-17) * Bugs with AMC-note * Watermarks when compiled out of AMC * LaTeX/QCM errors reported * Select pages to print * Choose existing command when not-defined in preferences file 0.44 (2008-12-10) * Bugs with marking * MEPList and ANList saved by gui * Possible different answers for different copies. * Added several checks that popup windows to inform or request additional information. * Better external commands calls. * Handle properly filenames with spaces. 0.9 (2008-10-29) * Initial SVN release. auto-multiple-choice-1.4.0/I18N/000077500000000000000000000000001341176102400162235ustar00rootroot00000000000000auto-multiple-choice-1.4.0/I18N/Makefile000066400000000000000000000044711341176102400176710ustar00rootroot00000000000000# # Copyright (C) 2010-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . SHELL=/bin/sh include ../Makefile-all.conf DOMAIN=auto-multiple-choice XGETTO= AMC=.. PERL=$(AMC)/*.pl $(AMC)/AMC-perl/AMC/*.pm $(AMC)/AMC-perl/AMC/**/*.pm $(AMC)/AMC-perl/AMC/**/**/*.pm GLADE=$(AMC)/AMC-*.glade $(AMC)/AMC-perl/AMC/**/*.glade POS=$(wildcard lang/*.po) MOS=$(POS:.po=.mo) LANGS=$(basename $(notdir $(POS))) all: $(MOS) clean: FORCE rm -f $(MOS) rm -f *.bpot rm -f *.po %.mo: %.po msgfmt $< -o $@ ############################################################### # The following targets are only for packaging : # not used for building or installing po-clean.pl: po-clean.pl.in ../Makefile.versions $(MAKE) -C .. I18N/po-clean.pl %.pot: %.bpot po-clean.pl $(PERLPATH) po-clean.pl $< $@ $(DOMAIN).bpot: $(PERL) $(GLADE) xgettext $(XGETTO) --from-code=UTF-8 --add-comments=TRANSLATORS: $(PERL) -k__ -k__p -k -o $@ xgettext $(XGETTO) -j $(GLADE) -L Glade -o $@ list: grep -lr __ $(AMC) |grep '\.\(pl\|pm\)$$' | grep -v 'debian' ; ls $(GLADE) %.merge: $(DOMAIN).pot msgmerge --no-wrap -U lang/$*.po $(DOMAIN).pot merge: $(addsuffix .merge,$(LANGS)) ; %.local: FORCE test -d $(LOCALEDIR)/$*/LC_MESSAGES || sudo mkdir -p $(LOCALEDIR)/$*/LC_MESSAGES sudo ln -s $(LOCALDIR)/I18N/lang/$*.mo $(LOCALEDIR)/$*/LC_MESSAGES/auto-multiple-choice.mo local: $(foreach l,$(LANGS),$(l).local) ; %.global: FORCE -sudo rm $(LOCALEDIR)/$*/LC_MESSAGES/auto-multiple-choice.mo global: $(foreach l,$(LANGS),$(l).global) ; ############################################################### FORCE: ; .PHONY: all clean list merge FORCE .INTERMEDIATE: $(DOMAIN).bpot auto-multiple-choice-1.4.0/I18N/auto-multiple-choice.pot000066400000000000000000003110101341176102400227740ustar00rootroot00000000000000# Auto Multiple Choice # Copyright 2008-2016 Alexis Bienvenue # This file is distributed under the same license as the AMC software #, fuzzy msgid "" msgstr "" "Project-Id-Version: 1.4.0~beta1 (r:a488cdb)\n" "Report-Msgid-Bugs-To: paamc@passoire.fr\n" "POT-Creation-Date: 2018-05-02 09:25 +0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit" #. TRANSLATORS: directory name for projects. This directory will be created (if needed) in the home directory of the user. Please use only alphanumeric characters, and - or _. No accentuated characters. #: ../AMC-annotate.pl:158 ../AMC-perl/AMC/Config.pm:247 #: ../AMC-perl/AMC/Config.pm:248 msgid "MC-Projects" msgstr "" #: ../AMC-getimages.pl:213 msgid "Splitting multi-page PDF files..." msgstr "" #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be converted. #: ../AMC-getimages.pl:390 #, perl-format msgid "Converting %s to bitmap..." msgstr "" #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be splitted to several images (one per page). #: ../AMC-getimages.pl:393 #, perl-format msgid "Splitting multi-page image %s..." msgstr "" #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be splitted to several images (one per page). #: ../AMC-getimages.pl:396 #, perl-format msgid "Processing image %s..." msgstr "" #: ../AMC-getimages.pl:469 msgid "Copying scans to project directory..." msgstr "" #: ../AMC-gui.pl:249 msgid "None of the perl modules Graphics::Magick and Image::Magick are installed: AMC won't work properly!" msgstr "" #: ../AMC-gui.pl:280 msgid "The package auto-multiple-choice-common is installed, but not auto-multiple-choice.\n" "AMC won't work properly until you install auto-multiple-choice package!" msgstr "" #: ../AMC-gui.pl:298 #, perl-format msgid "There is too little space left in the temporary disk directory (%s). Please clean this directory and try again." msgstr "" #: ../AMC-gui.pl:317 msgid "Several dialogs try to help you be at ease handling AMC." msgstr "" #: ../AMC-gui.pl:319 #, perl-format msgid "Unless you tick the \"%s\" box, they are shown only once." msgstr "" #: ../AMC-gui.pl:321 ../AMC-gui.pl:605 msgid "Show this message again next time" msgstr "" #: ../AMC-gui.pl:323 msgid "Do you want to forgot which dialogs you have already seen and ask to show all of them next time they should appear ?" msgstr "" #: ../AMC-gui.pl:357 msgid "Please install libnotify to make desktop notifications available." msgstr "" #. TRANSLATORS: Message when switching to debugging mode. #: ../AMC-gui.pl:552 msgid "Debugging mode." msgstr "" #. TRANSLATORS: Message when switching to debugging mode. %s will be replaced with the path of the log file. #: ../AMC-gui.pl:554 #, perl-format msgid "Debugging informations will be written in file %s." msgstr "" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:583 ../AMC-gui-main_window.glade:3131 msgid "French" msgstr "" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:585 ../AMC-gui-main_window.glade:3145 msgid "English" msgstr "" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:587 ../AMC-gui-main_window.glade:3159 msgid "Japanese" msgstr "" #. TRANSLATORS: This is the title of the column containing student/copy identifier in the table showing the results of data captures. #: ../AMC-gui.pl:703 msgid "identifier" msgstr "" #. TRANSLATORS: This is the title of the column containing data capture date/time in the table showing the results of data captures. #: ../AMC-gui.pl:712 msgid "updated" msgstr "" #. TRANSLATORS: This is the title of the column containing Mean Square Error Distance (some kind of mean distance between the location of the four corner marks on the scan and the location where they should be if the scan was not distorted at all) in the table showing the results of data captures. #: ../AMC-gui.pl:720 ../AMC-gui.pl:4992 ../AMC-perl/AMC/Gui/Manuel.pm:192 #: ../AMC-gui-main_window.glade:136 msgid "MSE" msgstr "" #. TRANSLATORS: This is the title of the column containing so-called "sensitivity" (an indicator telling the user if the darkness ratio of some boxes on the page are very near the threshold. A great value tells that some darkness ratios are very near the threshold, so that the capture is very sensitive to the threshold. A small value is a good thing) in the table showing the results of data captures. #: ../AMC-gui.pl:729 ../AMC-gui.pl:4994 ../AMC-perl/AMC/Gui/Manuel.pm:200 msgid "sensitivity" msgstr "" #: ../AMC-gui.pl:737 msgid "scan file" msgstr "" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:766 ../AMC-gui.pl:784 msgid "Western Europe" msgstr "" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:768 ../AMC-gui.pl:786 msgid "Central Europe" msgstr "" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:770 msgid "Southern Europe" msgstr "" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:772 msgid "Northern Europe" msgstr "" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:774 msgid "Cyrillic" msgstr "" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:776 msgid "Turkish" msgstr "" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:778 msgid "Northern" msgstr "" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:780 msgid "Unicode" msgstr "" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:804 ../AMC-gui.pl:3338 msgid "(none) [No primary key found in association list]" msgstr "" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:806 ../AMC-gui.pl:3976 msgid "(none) [No code found in LaTeX file]" msgstr "" #. TRANSLATORS: One of the printing methods: use a command (This is not the command name itself). This is a menu entry. #: ../AMC-gui.pl:835 msgid "command" msgstr "" #. TRANSLATORS: One of the printing methods: print to files. This is a menu entry. #: ../AMC-gui.pl:837 msgid "to files" msgstr "" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:841 msgid "floor" msgstr "" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:843 msgid "rounding" msgstr "" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:845 msgid "ceiling" msgstr "" #. TRANSLATORS: One option for decimal point: use a comma. This is a menu entry #: ../AMC-gui.pl:849 msgid ", (comma)" msgstr "" #. TRANSLATORS: One option for decimal point: use a point. This is a menu entry. #: ../AMC-gui.pl:851 msgid ". (dot)" msgstr "" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:856 msgid "one sided [No two-sided printing]" msgstr "" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:858 msgid "long edge" msgstr "" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:860 msgid "short edge" msgstr "" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:864 msgid "(none) [No transitional image type (direct processing)]" msgstr "" #. TRANSLATORS: One of the actions that can be done after exporting the marks. Here, do nothing more. This is a menu entry. #: ../AMC-gui.pl:872 msgid "that's all" msgstr "" #. TRANSLATORS: One of the actions that can be done after exporting the marks. Here, open the exported file. This is a menu entry. #: ../AMC-gui.pl:874 msgid "open the file" msgstr "" #. TRANSLATORS: One of the actions that can be done after exporting the marks. Here, open the directory where the file is. This is a menu entry. #: ../AMC-gui.pl:876 msgid "open the directory" msgstr "" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:879 msgid "(none) [No annotation position (do not write anything)]" msgstr "" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: in one margin. This is a menu entry. #: ../AMC-gui.pl:881 msgid "in one margin" msgstr "" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: in one of the two margins. This is a menu entry. #: ../AMC-gui.pl:883 msgid "in the margins" msgstr "" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: near the boxes. This is a menu entry. #: ../AMC-gui.pl:885 msgid "near boxes" msgstr "" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: in the zones defined in the source file #: ../AMC-gui.pl:887 msgid "where defined in the source" msgstr "" #. TRANSLATORS: One of the possible sorting criteria for students in the exported spreadsheet with scores: the student name. This is a menu entry. #. TRANSLATORS: This is the title of a column containing students names in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:890 ../AMC-gui.pl:6357 msgid "name" msgstr "" #. TRANSLATORS: One of the possible sorting criteria for students in the exported spreadsheet with scores: the student sheet number. This is a menu entry. #: ../AMC-gui.pl:892 msgid "exam copy number" msgstr "" #. TRANSLATORS: One of the possible sorting criteria for students in the exported spreadsheet with scores: the line where one can find this student in the students list file. This is a menu entry. #: ../AMC-gui.pl:894 msgid "line in students list" msgstr "" #. TRANSLATORS: you can omit the [...] part, just here to explain context #. One of the possible sorting criteria for students in the exported spreadsheet with scores: the student mark. This is a menu entry. #: ../AMC-gui.pl:897 msgid "mark [student mark, for sorting]" msgstr "" #. TRANSLATORS: One of the possible way to group annotated answer sheets together to PDF files: make one PDF file per student, with all his pages. This is a menu entry. #: ../AMC-gui.pl:902 msgid "One file per student" msgstr "" #. TRANSLATORS: One of the possible way to group annotated answer sheets together to PDF files: make only one PDF with all students sheets. This is a menu entry. #: ../AMC-gui.pl:904 msgid "One file for all students" msgstr "" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we only select pages where the student has written something (in separate answer sheet mode, these are the pages from the answer sheet and not the pages from the subject). #: ../AMC-gui.pl:907 msgid "Only pages with answers" msgstr "" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we take the pages were the students has nothing to write (often question pages from a subject with separate answer sheet option) from the subject. #: ../AMC-gui.pl:909 msgid "Question pages from subject" msgstr "" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we take the pages were the students has nothing to write (often question pages from a subject with separate answer sheet option) from the correction. #: ../AMC-gui.pl:911 msgid "Question pages from correction" msgstr "" #: ../AMC-gui.pl:914 msgid "All students" msgstr "" #: ../AMC-gui.pl:916 msgid "Selected students" msgstr "" #: ../AMC-gui.pl:918 msgid "Please select..." msgstr "" #. TRANSLATORS: One of the ways exam was made: each student has a different answer sheet with a different copy number - no photocopy was made. This is a menu entry. #. TRANSLATORS: This is a title for the AMC mode where the distributed exam papers are all different (different paper numbers at the top) -- photocopy is not used. #: ../AMC-gui.pl:920 ../AMC-gui.pl:2981 msgid "Different answer sheets" msgstr "" #. TRANSLATORS: One of the ways exam was made: some students have the same exam subject, as some photocopies were made before distributing the subjects. This is a menu entry. #. TRANSLATORS: This is a title for the AMC mode where some answer sheets have been photocopied before being distributed to the students. #: ../AMC-gui.pl:922 ../AMC-gui.pl:2986 msgid "Some answer sheets were photocopied" msgstr "" #. TRANSLATORS: One of the ways to send mail: use sendmail command. This is a menu entry. #: ../AMC-gui.pl:924 msgid "sendmail" msgstr "" #. TRANSLATORS: One of the ways to send mail: use a SMTP server. This is a menu entry. #: ../AMC-gui.pl:926 msgid "SMTP" msgstr "" #: ../AMC-gui.pl:927 msgid "None [SMTP security]" msgstr "" #: ../AMC-gui.pl:936 msgid "Standard" msgstr "" #: ../AMC-gui.pl:938 msgid "Separate answer sheet" msgstr "" #: ../AMC-gui.pl:940 ../AMC-gui.pl:2683 ../AMC-gui.pl:2701 msgid "Answer sheet first" msgstr "" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. #: ../AMC-gui.pl:944 msgid "nothing" msgstr "" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. #: ../AMC-gui.pl:946 msgid "circle" msgstr "" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. Here, a cross. #: ../AMC-gui.pl:948 msgid "mark" msgstr "" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. Here, the box outline. #: ../AMC-gui.pl:950 msgid "box" msgstr "" #: ../AMC-gui.pl:1045 #, perl-format msgid "Exporting to '%s' needs some perl modules that are not installed: %s. Please install these modules or switch to another export format." msgstr "" #: ../AMC-gui.pl:1068 msgid "When referring to a particular answer in the export, the letter used will be the one found in the catalog. However, the catalog has not yet been built. Do you want to build it now?" msgstr "" #: ../AMC-gui.pl:1104 msgid "Exporting marks..." msgstr "" #: ../AMC-gui.pl:1143 #, perl-format msgid "Export to %s did not work: file not created..." msgstr "" #. TRANSLATORS: One of the popup menu that appears when right-clicking on a page in the data capture diagnosis table. Choosing this entry, an image will be opened to see where the corner marks were detected. #: ../AMC-gui.pl:1152 ../AMC-gui.pl:4996 msgid "page adjustment" msgstr "" #. TRANSLATORS: One of the popup menu that appears when right-clicking on a page in the data capture diagnosis table. Choosing this entry, a window will be opened were the user can see all boxes on the scans and how they were filled by the students, and correct detection of ticked-or-not if needed. #: ../AMC-gui.pl:1154 ../AMC-gui.pl:4996 msgid "boxes zooms" msgstr "" #: ../AMC-gui.pl:1225 #, perl-format msgid "You requested to delete all data capture results for %d page(s)" msgstr "" #: ../AMC-gui.pl:1226 msgid "All data and image files related to these pages will be deleted." msgstr "" #: ../AMC-gui.pl:1227 msgid "Do you really want to continue?" msgstr "" #: ../AMC-gui.pl:1405 #, perl-format msgid "Following command could not be run: %s, perhaps due to a poor configuration?" msgstr "" #: ../AMC-gui.pl:1450 #, perl-format msgid "Current directory: %s" msgstr "" #: ../AMC-gui.pl:1509 msgid "Existing projects:" msgstr "" #. TRANSLATORS: Window title when creating a new project. #: ../AMC-gui.pl:1514 msgid "New AMC project" msgstr "" #: ../AMC-gui.pl:1519 msgid "Projects management:" msgstr "" #: ../AMC-gui.pl:1520 msgid "Change project name:" msgstr "" #: ../AMC-gui.pl:1525 msgid "Back" msgstr "" #. TRANSLATORS: Window title when managing projects. #: ../AMC-gui.pl:1528 msgid "AMC projects management" msgstr "" #: ../AMC-gui.pl:1550 #, perl-format msgid "You don't have any MC project in directory %s!" msgstr "" #: ../AMC-gui.pl:1559 ../AMC-gui-choix_projet.glade:260 msgid "Choose directory" msgstr "" #: ../AMC-gui.pl:1604 #, perl-format msgid "You can't change project %s since it's open." msgstr "" #: ../AMC-gui.pl:1626 #, perl-format msgid "This will clone project %s to a new project %s." msgstr "" #. TRANSLATORS: Message when you want to create an AMC project with name xxx, but there already exists a directory in the projects directory with this name! #: ../AMC-gui.pl:1697 #, perl-format msgid "Directory %s already exists, so you can't choose this name." msgstr "" #: ../AMC-gui.pl:1743 msgid "Destination project directory already exists" msgstr "" #: ../AMC-gui.pl:1755 msgid "Copying project..." msgstr "" #: ../AMC-gui.pl:1780 msgid "Your project has been copied" msgstr "" #: ../AMC-gui.pl:1781 #, perl-format msgid "(%d files out of %d)" msgstr "" #: ../AMC-gui.pl:1788 msgid "Source project directory not found" msgstr "" #: ../AMC-gui.pl:1796 #, perl-format msgid "An error occuried during project copy: %s." msgstr "" #: ../AMC-gui.pl:1817 #, perl-format msgid "You asked to remove project %s." msgstr "" #: ../AMC-gui.pl:1818 msgid "This will permanently erase all the files of this project, including the source file as well as all the files you put in the directory of this project, as the scans for example." msgstr "" #: ../AMC-gui.pl:1819 msgid "Is this really what you want?" msgstr "" #: ../AMC-gui.pl:1876 #, perl-format msgid "You selected directory %s as a project to open." msgstr "" #: ../AMC-gui.pl:1877 msgid "However, this directory does not seem to contain a project. Do you still want to try?" msgstr "" #: ../AMC-gui.pl:1894 #, perl-format msgid "You selected project %s from directory %s." msgstr "" #: ../AMC-gui.pl:1895 msgid "Do you want to copy this project to your projects directory before opening it?" msgstr "" #: ../AMC-gui.pl:1965 #, perl-format msgid "The name %s is already used in the projects directory." msgstr "" #: ../AMC-gui.pl:1966 msgid "You must choose another name to create a project." msgstr "" #: ../AMC-gui.pl:2005 msgid "LaTeX packages:" msgstr "" #: ../AMC-gui.pl:2006 msgid "Commands:" msgstr "" #: ../AMC-gui.pl:2007 msgid "Fonts:" msgstr "" #: ../AMC-gui.pl:2022 msgid "Your AMC version and LaTeX style file version differ. Even if the documents are properly generated, this can lead to many problems using AMC.\n" msgstr "" #: ../AMC-gui.pl:2023 msgid "Please check your installation to get matching AMC and LaTeX style file versions.\n" msgstr "" #: ../AMC-gui.pl:2024 #, perl-format msgid "" "AMC version: %s\n" "sty version: %s\n" "sty path: %s" msgstr "" #: ../AMC-gui.pl:2052 msgid "Documents update..." msgstr "" #: ../AMC-gui.pl:2076 msgid "Problems while preparing documents" msgstr "" #: ../AMC-gui.pl:2078 msgid "Problems while processing the source file." msgstr "" #: ../AMC-gui.pl:2081 msgid "You have to correct the source file and re-run documents update." msgstr "" #: ../AMC-gui.pl:2085 msgid "Errors" msgstr "" #: ../AMC-gui.pl:2086 msgid "Only first ten errors written" msgstr "" #: ../AMC-gui.pl:2089 msgid "Warnings" msgstr "" #: ../AMC-gui.pl:2090 msgid "Only first ten warnings written" msgstr "" #. TRANSLATORS: Here, %s will be replaced with the translation of "Command output details", and refers to the small expandable part at the bottom of AMC main window, where one can see the output of the commands lauched by AMC. #: ../AMC-gui.pl:2095 #, perl-format msgid "See also the processing log in '%s' below." msgstr "" #. TRANSLATORS: Title of the small expandable part at the bottom of AMC main window, where one can see the output of the commands lauched by AMC. #: ../AMC-gui.pl:2097 ../AMC-gui-main_window.glade:2570 msgid "Command output details" msgstr "" #: ../AMC-gui.pl:2098 msgid "Use LaTeX editor or latex command for a precise diagnosis." msgstr "" #: ../AMC-gui.pl:2113 msgid "Documents have been prepared" msgstr "" #: ../AMC-gui.pl:2143 msgid "Working documents successfully generated." msgstr "" #. TRANSLATORS: Here, "them" refers to the working documents. #: ../AMC-gui.pl:2145 msgid "You can take a look at them double-clicking on the list." msgstr "" #. TRANSLATORS: Here, "they" refers to the working documents. #: ../AMC-gui.pl:2147 msgid "If they are correct, proceed to layouts detection..." msgstr "" #: ../AMC-gui.pl:2169 msgid "Your question has a separate answers sheet." msgstr "" #: ../AMC-gui.pl:2170 msgid "In this case, letters are shown inside boxes." msgstr "" #: ../AMC-gui.pl:2171 msgid "Your question is set to present labels inside the boxes to be ticked." msgstr "" #. TRANSLATORS: Here, %s will be replaced with the translation of "darkness threshold". #: ../AMC-gui.pl:2174 #, perl-format msgid "For better ticking detection, ask students to fill out completely boxes, and choose parameter \"%s\" around 0.5 for this project." msgstr "" #: ../AMC-gui.pl:2175 #, perl-format msgid "At the moment, this parameter is set to %.02f." msgstr "" #: ../AMC-gui.pl:2176 msgid "Would you like to set it to 0.5?" msgstr "" #. TRANSLATORS: This parameter is the ratio of dark pixels number over total pixels number inside box above which a box is considered to be ticked. #: ../AMC-gui.pl:2178 msgid "darkness threshold" msgstr "" #: ../AMC-gui.pl:2199 msgid "Papers analysis was already made on the basis of the current working documents." msgstr "" #: ../AMC-gui.pl:2200 msgid "You already made the examination on the basis of these documents." msgstr "" #: ../AMC-gui.pl:2201 msgid "If you modify working documents, you will not be capable any more of analyzing the papers you have already distributed!" msgstr "" #: ../AMC-gui.pl:2202 ../AMC-gui.pl:2229 msgid "Do you wish to continue?" msgstr "" #: ../AMC-gui.pl:2203 ../AMC-gui.pl:2230 msgid "Click on OK to erase the former layouts and update working documents, or on Cancel to cancel this operation." msgstr "" #: ../AMC-gui.pl:2204 ../AMC-gui.pl:2231 msgid "To allow the use of an already printed question, cancel!" msgstr "" #: ../AMC-gui.pl:2227 msgid "Layouts are already calculated for the current documents." msgstr "" #: ../AMC-gui.pl:2228 msgid "Updating working documents, the layouts will become obsolete and will thus be erased." msgstr "" #: ../AMC-gui.pl:2258 #, perl-format msgid "To handle properly %s files, AMC needs the following components, that are currently missing:" msgstr "" #: ../AMC-gui.pl:2270 msgid "Install these components on your system and try again." msgstr "" #. TRANSLATORS: Message when the user required printing the question paper, but it is not present (probably the working documents have not been properly generated). #: ../AMC-gui.pl:2405 msgid "You don't have any question to print: please check your source file and update working documents first." msgstr "" #. TRANSLATORS: Message when AMC does not know about the subject pages that has been generated. Usualy this means that the layout computation step has not been made. #: ../AMC-gui.pl:2422 msgid "Question's pages are not detected." msgstr "" #: ../AMC-gui.pl:2423 msgid "Perhaps you forgot to compute layouts?" msgstr "" #: ../AMC-gui.pl:2445 #, perl-format msgid "You chose the printing method '%s' but it is not available (%s). Please install the missing dependencies or switch to another printing method." msgstr "" #: ../AMC-gui.pl:2466 msgid "You chose a printing method using CUPS but there are no configured printer in CUPS. Please configure some printer or switch to another printing method." msgstr "" #. TRANSLATORS: This is the title of the column containing the paper's numbers (1,2,3,...) in the table showing all available papers, from which the user will choose those he wants to print. #: ../AMC-gui.pl:2533 msgid "papers" msgstr "" #: ../AMC-gui.pl:2622 msgid "You did not select any exam to print..." msgstr "" #: ../AMC-gui.pl:2641 ../AMC-gui.pl:2657 msgid "You selected only a few sheets to print." msgstr "" #: ../AMC-gui.pl:2642 msgid "As students are requested to write on more than one page, you must create as many exam sheets as necessary for all your students, with different sheets numbers, and print them all." msgstr "" #: ../AMC-gui.pl:2643 msgid "If you print one or several sheets and photocopy them to have enough for all the students, you won't be able to continue with AMC!" msgstr "" #: ../AMC-gui.pl:2644 msgid "Do you want to print the selected sheets anyway?" msgstr "" #: ../AMC-gui.pl:2658 msgid "Are you going to photocopy some printed subjects before giving them to the students?" msgstr "" #: ../AMC-gui.pl:2659 msgid "If so, the corresponding option will be set for this project." msgstr "" #: ../AMC-gui.pl:2660 msgid "However, you will be able to change this when giving your first scans to AMC." msgstr "" #. TRANSLATORS: the two %s will be replaced by the translations of "Answer sheet first" and "Extracting method". #: ../AMC-gui.pl:2682 #, perl-format msgid "You selected the '%s' option, that uses '%s', so the %s has been set to '%s' for you." msgstr "" #: ../AMC-gui.pl:2684 ../AMC-gui-edit_preferences.glade:902 msgid "Extracting method" msgstr "" #: ../AMC-gui.pl:2700 #, perl-format msgid "You selected the '%s' option, but this option needs 'qpdf' or 'pdftk' to be installed on your system. Please install one of these and try again." msgstr "" #: ../AMC-gui.pl:2741 msgid "Print papers one by one..." msgstr "" #: ../AMC-gui.pl:2790 msgid "Working documents are in an old format, which is not supported anymore." msgstr "" #: ../AMC-gui.pl:2791 msgid "Please generate again the working documents!" msgstr "" #: ../AMC-gui.pl:2805 msgid "Detecting layouts..." msgstr "" #: ../AMC-gui.pl:2823 msgid "No layout detected." msgstr "" #: ../AMC-gui.pl:2824 msgid "Don't go through the examination before fixing this problem, otherwise you won't be able to use AMC for correction." msgstr "" #: ../AMC-gui.pl:2830 msgid "Layouts are detected." msgstr "" #: ../AMC-gui.pl:2831 #, perl-format msgid "You can check all is correct clicking on button %s and looking at question pages to see if red boxes are well positioned." msgstr "" #: ../AMC-gui.pl:2831 ../AMC-gui-main_window.glade:560 msgid "Check layouts" msgstr "" #: ../AMC-gui.pl:2832 msgid "Then you can proceed to printing and to examination." msgstr "" #: ../AMC-gui.pl:2905 msgid "No layout for this project." msgstr "" #. TRANSLATORS: Here, the first %s will be replaced with "Layout detection" (a button title), and the second %s with "Preparation" (the tab title where one can find this button). #: ../AMC-gui.pl:2907 #, perl-format msgid "Please use button %s in %s before manual data capture." msgstr "" #: ../AMC-gui.pl:2908 ../AMC-gui-main_window.glade:508 msgid "Layout detection" msgstr "" #: ../AMC-gui.pl:2909 ../AMC-gui-main_window.glade:684 msgid "Preparation" msgstr "" #: ../AMC-gui.pl:2947 #, perl-format msgid "Pre-allocate sheet ids from the page numbers, starting at %d" msgstr "" #: ../AMC-gui.pl:2978 msgid "Automatic data capture can be done in two different modes:" msgstr "" #: ../AMC-gui.pl:2983 msgid "In the most robust one, you give a different exam (with a different exam number) to every student. You must not photocopy subjects before distributing them." msgstr "" #: ../AMC-gui.pl:2988 msgid "In the second one (which can be used only if answer sheets to be scanned have one page per candidate) you can photocopy answer sheets and give the same subject to different students." msgstr "" #: ../AMC-gui.pl:2989 msgid "After the first automatic capture, you can't switch to the other mode." msgstr "" #: ../AMC-gui.pl:3163 msgid "Automatic data capture..." msgstr "" #: ../AMC-gui.pl:3174 msgid "Automatic data capture has been completed" msgstr "" #: ../AMC-gui.pl:3183 #, perl-format msgid "Some of the pages you submitted (%d of them) have already been processed before. Old data has been overwritten." msgstr "" #. TRANSLATORS: Names list file : (none) #: ../AMC-gui.pl:3271 msgid "(none)" msgstr "" #: ../AMC-gui.pl:3292 #, perl-format msgid "Unsuitable names file: %d errors, first on line %d." msgstr "" #. TRANSLATORS: Here, do not translate 'name' and 'surname' (except in french), as the column names in the students list file has to be named in english in order to be properly detected. #: ../AMC-gui.pl:3309 #, perl-format msgid "Found %d empty names in names file %s. Check that name or surname column is present, and always filled." msgstr "" #: ../AMC-gui.pl:3310 ../AMC-gui.pl:3326 msgid "Edit the names file to correct it, and re-read." msgstr "" #: ../AMC-gui.pl:3326 #, perl-format msgid "Found duplicate names: %s. Check that all names are different." msgstr "" #. TRANSLATORS: Here, %s will be replaced with the name of the tab "Data capture". #: ../AMC-gui.pl:3358 #, perl-format msgid "Before associating names to papers, you must choose a students list file in tab \"%s\"." msgstr "" #. One of the "notify the user at the end of the following actions" checkbox: for automatic data capture. #: ../AMC-gui.pl:3359 ../AMC-gui-edit_preferences.glade:1584 #: ../AMC-gui-main_window.glade:1286 msgid "Data capture" msgstr "" #: ../AMC-gui.pl:3368 msgid "Please choose a key from primary keys in students list before association." msgstr "" #: ../AMC-gui.pl:3377 msgid "Please choose a code (made with LaTeX command \\AMCcodeGrid or equivalent) before automatic association." msgstr "" #. TRANSLATORS: Here, %s will be replaced with "Students identification", which refers to a paragraph in the tab "Marking" from AMC main window. #: ../AMC-gui.pl:3422 #, perl-format msgid "Before associating names to papers, you must choose a students list file in paragraph \"%s\"." msgstr "" #: ../AMC-gui.pl:3423 msgid "Students identification" msgstr "" #: ../AMC-gui.pl:3446 msgid "Automatic association..." msgstr "" #: ../AMC-gui.pl:3468 #, perl-format msgid "Automatic association completed: %d students recognized." msgstr "" #. TRANSLATORS: Here %s and %s will be replaced with two parameters names: "Primary key from this list" and "Code name for automatic association". #: ../AMC-gui.pl:3470 #, perl-format msgid "Please check \"%s\" and \"%s\" values and try again." msgstr "" #: ../AMC-gui.pl:3471 msgid "Primary key from this list" msgstr "" #: ../AMC-gui.pl:3472 msgid "Code name for automatic association" msgstr "" #: ../AMC-gui.pl:3478 msgid "Automatic association is now finished. You can ask for manual association to check that all is fine and, if necessary, read manually students names which have not been automatically identified." msgstr "" #: ../AMC-gui.pl:3640 #, perl-format msgid "Some manual association data has be found, which will be lost if the primary key is changed. Do you want to switch back to the primary key \"%s\" and keep association data?" msgstr "" #: ../AMC-gui.pl:3666 #, perl-format msgid "The primary key from the students list has been set to \"%s\", which is not the value from the association data." msgstr "" #: ../AMC-gui.pl:3667 msgid "Automatic papers/students association will be re-run to update the association data." msgstr "" #: ../AMC-gui.pl:3693 #, perl-format msgid "Papers are not yet corrected: use button \"%s\"." msgstr "" #. TRANSLATORS: This is a button: "Mark" is here an action to be called by the user. When clicking this button, the user requests scores to be computed for all students. #: ../AMC-gui.pl:3695 ../AMC-gui-main_window.glade:1363 msgid "Mark" msgstr "" #: ../AMC-gui.pl:3736 msgid "Extracting marking scale..." msgstr "" #: ../AMC-gui.pl:3940 msgid "Computing marks..." msgstr "" #: ../AMC-gui.pl:3945 msgid "Grading has been completed" msgstr "" #. TRANSLATORS: This is the marks mean for all students. #: ../AMC-gui.pl:3961 #, perl-format msgid "Mean: %.2f" msgstr "" #: ../AMC-gui.pl:3964 msgid "No marks computed" msgstr "" #: ../AMC-gui.pl:3983 msgid "Pre-association" msgstr "" #: ../AMC-gui.pl:3997 msgid "No students list file" msgstr "" #: ../AMC-gui.pl:3999 msgid "No primary key from students list file" msgstr "" #: ../AMC-gui.pl:4005 #, perl-format msgid "Missing identification for %d answer sheets" msgstr "" #: ../AMC-gui.pl:4007 msgid "All completed answer sheets are associated with a student name" msgstr "" #: ../AMC-gui.pl:4061 msgid "exam ID" msgstr "" #: ../AMC-gui.pl:4076 msgid "student" msgstr "" #. TRANSLATORS: File name for single annotated answer sheets with only some selected students. Please use simple characters. #: ../AMC-gui.pl:4207 msgid "Selected_students" msgstr "" #. TRANSLATORS: File name for single annotated answer sheets with all students. Please use simple characters. #: ../AMC-gui.pl:4209 msgid "All_students" msgstr "" #: ../AMC-gui.pl:4257 msgid "Annotating papers..." msgstr "" #: ../AMC-gui.pl:4261 msgid "Annotations have been completed" msgstr "" #: ../AMC-gui.pl:4375 #, perl-format msgid "Project \"%s\" preferences" msgstr "" #: ../AMC-gui.pl:4378 msgid "Project preferences" msgstr "" #: ../AMC-gui.pl:4484 #, perl-format msgid "You modified \"%s\" value, which is the default value used when creating new projects. Do you want to change also \"%s\" for the opened %s project?" msgstr "" #: ../AMC-gui.pl:4600 msgid "Working documents are not readable" msgstr "" #: ../AMC-gui.pl:4603 msgid "No working documents" msgstr "" #: ../AMC-gui.pl:4606 msgid "Working documents last update:" msgstr "" #: ../AMC-gui.pl:4662 msgid "No layout" msgstr "" #: ../AMC-gui.pl:4665 #, perl-format msgid "Processed %d pages" msgstr "" #: ../AMC-gui.pl:4668 msgid "but some defects were detected." msgstr "" #: ../AMC-gui.pl:4680 msgid "The \\namefield command is not used. Writing subjects without name field is not recommended" msgstr "" #: ../AMC-gui.pl:4681 msgid "The \\namefield command is used several times for the same subject. This should not be the case, as each student should write his name only once" msgstr "" #: ../AMC-gui.pl:4682 msgid "No box to be ticked" msgstr "" #: ../AMC-gui.pl:4683 msgid "The corner marks and binary boxes are not at the same location on all pages" msgstr "" #: ../AMC-gui.pl:4684 msgid "Some material has been placed out of the page. This is often a result of a multiple columns question group starting too close from the page bottom. In such a case, use \"needspace\"." msgstr "" #: ../AMC-gui.pl:4705 msgid "Some potential defects were detected for this subject. Correct them in the source and update the working documents." msgstr "" #: ../AMC-gui.pl:4711 #, perl-format msgid "(See for example pages %s and %s)" msgstr "" #: ../AMC-gui.pl:4716 #, perl-format msgid "(Concerns %1$d pages, see for example page %2$s)" msgstr "" #: ../AMC-gui.pl:4723 #, perl-format msgid "(Concerns %1$d exams, see for example sheet %2$d)" msgstr "" #: ../AMC-gui.pl:4840 #, perl-format msgid "Data capture from %d complete papers and %d incomplete papers" msgstr "" #: ../AMC-gui.pl:4844 #, perl-format msgid "Data capture from %d complete papers" msgstr "" #. TRANSLATORS: this text points out that no data capture has been made yet. #: ../AMC-gui.pl:4849 msgid "No data" msgstr "" #: ../AMC-gui.pl:4856 #, perl-format msgid "Overwritten pages: %d" msgstr "" #: ../AMC-gui.pl:4864 msgid "All scans were properly recognized." msgstr "" #: ../AMC-gui.pl:4871 #, perl-format msgid "%d scans were not recognized." msgstr "" #. TRANSLATORS: column title for the list of overwritten pages. This refers to the page from the question #: ../AMC-gui.pl:4895 msgid "Page" msgstr "" #. TRANSLATORS: column title for the list of overwritten pages. This refers to the number of times the page has been overwritten. #: ../AMC-gui.pl:4900 msgid "count" msgstr "" #. TRANSLATORS: column title for the list of overwritten pages. This refers to the date of the last data capture for the page. #: ../AMC-gui.pl:4905 msgid "Date" msgstr "" #: ../AMC-gui.pl:4946 msgid "Looking for analysis..." msgstr "" #: ../AMC-gui.pl:4988 msgid "Automatic data capture now completed." msgstr "" #: ../AMC-gui.pl:4989 #, perl-format msgid "It is not complete (missing pages from %d papers)." msgstr "" #: ../AMC-gui.pl:4990 msgid "You can analyse data capture quality with some indicators values in analysis list:" msgstr "" #: ../AMC-gui.pl:4992 #, perl-format msgid "- %s represents positioning gap for the four corner marks. Great value means abnormal page distortion." msgstr "" #: ../AMC-gui.pl:4994 #, perl-format msgid "- great values of %s are seen when darkness ratio is very close to the threshold for some boxes." msgstr "" #: ../AMC-gui.pl:4996 #, perl-format msgid "You can also look at the scan adjustment (%s) and ticked and unticked boxes (%s) using right-click on lines from table %s." msgstr "" #: ../AMC-gui.pl:4996 msgid "Diagnosis" msgstr "" #: ../AMC-gui.pl:5024 msgid "Pages that miss data capture to complete students sheets:" msgstr "" #: ../AMC-gui.pl:5145 #, perl-format msgid "Error loading scan %s" msgstr "" #: ../AMC-gui.pl:5151 msgid "No scan selected" msgstr "" #: ../AMC-gui.pl:5156 msgid "No more unrecognized scans" msgstr "" #: ../AMC-gui.pl:5234 msgid "Making diagnostic image..." msgstr "" #: ../AMC-gui.pl:5304 msgid "(no description)" msgstr "" #. TRANSLATORS: This is a column title for the list of files to be included in a template being created. #. TRANSLATORS: This is the title of a column containing attachments file paths in a table showing all attachments, when sending them to the students by email. #: ../AMC-gui.pl:5389 ../AMC-gui.pl:6336 msgid "file" msgstr "" #: ../AMC-gui.pl:5469 msgid "Add files to template" msgstr "" #: ../AMC-gui.pl:5490 msgid "When making a template, you can only add files that are within the project directory." msgstr "" #. TRANSLATORS: This is a column name for the list of available templates, when creating a new project based on a template. #: ../AMC-gui.pl:5613 msgid "template" msgstr "" #: ../AMC-gui.pl:5658 msgid "All source files" msgstr "" #: ../AMC-gui.pl:5676 #, perl-format msgid "%s files" msgstr "" #: ../AMC-gui.pl:5710 msgid "Archive (zip, tgz)" msgstr "" #: ../AMC-gui.pl:5739 #, perl-format msgid "Nothing extracted from archive %s. Check it." msgstr "" #: ../AMC-gui.pl:5868 #, perl-format msgid "File %s already exists in project directory: do you want to replace it?" msgstr "" #: ../AMC-gui.pl:5869 msgid "Click yes to replace it and loose pre-existing contents, or No to cancel source file import." msgstr "" #: ../AMC-gui.pl:5885 msgid "The source file has been copied to project directory." msgstr "" #: ../AMC-gui.pl:5885 #, perl-format msgid "You can now edit it with button \"%s\" or with any editor." msgstr "" #: ../AMC-gui.pl:5885 ../AMC-gui-main_window.glade:241 msgid "Edit source file" msgstr "" #: ../AMC-gui.pl:5893 #, perl-format msgid "Error copying source file: %s" msgstr "" #: ../AMC-gui.pl:6078 msgid "In order to send a useful bug report, please attach the following documents:" msgstr "" #: ../AMC-gui.pl:6079 msgid "an archive (in some compressed format, like ZIP, 7Z, TGZ...) containing the project directory, scan files and configuration directory (.AMC.d in home directory), so as to reproduce and analyse this problem." msgstr "" #: ../AMC-gui.pl:6080 msgid "the log file produced when the debugging mode (in Help menu) is checked. Please try to reproduce the bug with this mode activated." msgstr "" #: ../AMC-gui.pl:6081 #, perl-format msgid "Bug reports can be filled at %s or sent to the address below." msgstr "" #: ../AMC-gui.pl:6082 ../AMC-gui.pl:6086 msgid "AMC community site" msgstr "" #: ../AMC-gui.pl:6149 msgid "Attach file" msgstr "" #: ../AMC-gui.pl:6183 msgid "There are no annotated corrected answer sheets to send." msgstr "" #: ../AMC-gui.pl:6186 msgid "Please group the annotated sheets to PDF files to be able to send them." msgstr "" #: ../AMC-gui.pl:6187 msgid "Please annotate answer sheets and group them to PDF files to be able to send them." msgstr "" #: ../AMC-gui.pl:6218 #, perl-format msgid "Sending emails requires some perl modules that are not installed: %s. Please install these modules and try again." msgstr "" #: ../AMC-gui.pl:6239 msgid "SMTP security mode \"STARTTLS\" is only available with Email::Sender version 1.300027 and over. Please install a newer version of this perl module or change SMTP security mode, and try again." msgstr "" #: ../AMC-gui.pl:6255 #, perl-format msgid "The email address you entered (%s) is not correct." msgstr "" #: ../AMC-gui.pl:6257 msgid "Please edit your preferences to correct your email address." msgstr "" #: ../AMC-gui.pl:6259 msgid "You did not enter your email address." msgstr "" #: ../AMC-gui.pl:6260 msgid "Please edit the preferences to set your email address." msgstr "" #: ../AMC-gui.pl:6283 #, perl-format msgid "The sendmail program cannot be found at the location you specified in the preferences (%s). Please update your configuration." msgstr "" #: ../AMC-gui.pl:6303 msgid "No email addresses has been found in the students list file. You need to write the students addresses in a column of this file." msgstr "" #. TRANSLATORS: This is the title of a column containing copy numbers in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:6351 msgid "copy" msgstr "" #. TRANSLATORS: This is the title of a column containing students email addresses in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:6363 msgid "email" msgstr "" #. TRANSLATORS: This is the title of a column containing mailing status (not sent, already sent, failed) in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:6369 msgid "status" msgstr "" #: ../AMC-gui.pl:6388 msgid "failed" msgstr "" #: ../AMC-gui.pl:6446 msgid "Some files you asked to be attached to the emails are missing:" msgstr "" #: ../AMC-gui.pl:6447 msgid "Please create them or remove them from the list of attached files." msgstr "" #: ../AMC-gui.pl:6499 msgid "Sending emails..." msgstr "" #: ../AMC-gui.pl:6508 msgid "Cancelled." msgstr "" #: ../AMC-gui.pl:6510 msgid "SMTP authentication failed: check SMTP configuration and password." msgstr "" #: ../AMC-gui.pl:6512 #, perl-format msgid "%d message(s) has been sent." msgstr "" #: ../AMC-gui.pl:6552 msgid "Set exam name" msgstr "" #: ../AMC-gui.pl:6559 ../AMC-gui-edit_preferences.glade:4154 msgid "Examination name" msgstr "" #: ../AMC-gui.pl:6563 ../AMC-gui-edit_preferences.glade:4165 msgid "Code (short name) for examination" msgstr "" #. TRANSLATORS: This is the title of a column containing all columns names from the students list file, when choosing which columns has to be exported to the spreadsheets. #: ../AMC-gui.pl:6613 msgid "column" msgstr "" #: ../AMC-gui.pl:6621 msgid "" msgstr "" #: ../AMC-gui.pl:6622 msgid "" msgstr "" #: ../AMC-gui.pl:6623 msgid "" msgstr "" #: ../AMC-gui.pl:6657 msgid "Install an AMC plugin" msgstr "" #: ../AMC-gui.pl:6662 msgid "Plugins (zip, tgz)" msgstr "" #: ../AMC-gui.pl:6682 #, perl-format msgid "An error occured while trying to extract files from the plugin archive: %s." msgstr "" #: ../AMC-gui.pl:6696 msgid "Nothing extracted from the plugin archive. Check it." msgstr "" #: ../AMC-gui.pl:6706 msgid "This is not a valid plugin, as it contains more than one directory at the first level." msgstr "" #: ../AMC-gui.pl:6717 msgid "This is not a valid plugin, as it does not contain a perl/AMC subdirectory." msgstr "" #: ../AMC-gui.pl:6734 #, perl-format msgid "A plugin is already installed with the same name (%s). Do you want to delete the old one and overwrite?" msgstr "" #: ../AMC-gui.pl:6752 #, perl-format msgid "Error while moving the plugin to the user plugin directory: %s" msgstr "" #: ../AMC-gui.pl:6762 msgid "Please restart AMC before using the new plugin..." msgstr "" #: ../AMC-gui.pl:6814 msgid "zooms" msgstr "" #: ../AMC-gui.pl:6815 msgid "boxes images are extracted from the scans while processing automatic data capture. They can be removed if you don't plan to use the zooms dialog to check and correct boxes categorization. They can be recovered processing again automatic data capture from the same scans." msgstr "" #: ../AMC-gui.pl:6827 msgid "layout reports" msgstr "" #: ../AMC-gui.pl:6828 msgid "these images are intended to show how the corner marks have been recognized and positioned on the scans. They can be safely removed once the scans are known to be well-recognized. They can be recovered processing again automatic data capture from the same scans." msgstr "" #: ../AMC-gui.pl:6843 msgid "annotated pages" msgstr "" #: ../AMC-gui.pl:6844 msgid "jpeg annotated pages are made before beeing assembled to PDF annotated files. They can safely be removed, and will be recovered automatically the next time annotation will be requested." msgstr "" #: ../AMC-gui.pl:6874 msgid "Total size of concerned files:" msgstr "" #: ../AMC-gui.pl:6923 #, perl-format msgid "%s files were removed." msgstr "" #: ../AMC-gui.pl:6949 #, perl-format msgid "I don't find the command %s." msgstr "" #: ../AMC-gui.pl:6950 msgid "Perhaps LaTeX is not installed?" msgstr "" #. TRANSLATORS: Do not translate 'auto-multiple-choice latex-link', which is a command to be typed on MacOsX #: ../AMC-gui.pl:6954 msgid "The style file automultiplechoice.sty seems to be unreachable. Try to use command 'auto-multiple-choice latex-link' as root to fix this." msgstr "" #: ../AMC-prepare.pl:274 #, perl-format msgid "%d/%d good answers not coherent for a simple question" msgstr "" #: ../AMC-prepare.pl:357 #, perl-format msgid "question ID used several times for the same paper: \"%s\"" msgstr "" #: ../AMC-prepare.pl:444 #, perl-format msgid "An answer appears to be given outside a question environment, after question \"%s\"" msgstr "" #: ../AMC-prepare.pl:453 #, perl-format msgid "Answer number ID used several times for the same question: %s" msgstr "" #: ../AMC-prepare.pl:708 #, perl-format msgid "%d errors during LaTeX compiling" msgstr "" #: ../AMC-prepare.pl:768 #, perl-format msgid "LaTeX command configured is not present (%s). Install it or change configuration, and then rerun." msgstr "" #: ../AMC-prepare.pl:797 msgid "solution" msgstr "" #: ../AMC-prepare.pl:812 msgid "catalog" msgstr "" #: ../AMC-prepare.pl:845 msgid "question sheet" msgstr "" #: ../AMC-prepare.pl:873 #, perl-format msgid "please remove accentuated or non-standard characters from the following question ID: \"%s\"" msgstr "" #: ../AMC-prepare.pl:875 msgid "some question IDs seems to have accentuated or non-standard characters. This may break future processings." msgstr "" #: ../AMC-read-pdfform.pl:136 msgid "Reading PDF forms..." msgstr "" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:592 msgid "Name [name column title in exported spreadsheet]" msgstr "" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:594 msgid "Mark [mark column title in exported spreadsheet]" msgstr "" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:596 msgid "Exam [exam number column title in exported spreadsheet]" msgstr "" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:598 msgid "Score [total score column title in exported spreadsheet]" msgstr "" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:600 msgid "Max [maximum score column title in exported spreadsheet]" msgstr "" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:604 msgid "max [maximum score row name in exported spreadsheet]" msgstr "" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:606 msgid "mean [means of scores row name in exported spreadsheet]" msgstr "" #. TRANSLATORS: This is the default text to be written on the top of the first page of each paper when annotating. From this string, %s will be replaced with the student final mark, %m with the maximum mark he can obtain, %S with the student total score, and %M with the maximum score the student can obtain. #: ../AMC-perl/AMC/Config.pm:319 msgid "Mark: %s/%m (total score: %S/%M)" msgstr "" #. TRANSLATORS: Subject of the emails which can be sent to the students to give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:344 msgid "Exam result" msgstr "" #. TRANSLATORS: Body text of the emails which can be sent to the students to give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:346 msgid "Please find enclosed your annotated completed answer sheet.\n" "Regards." msgstr "" #. TRANSLATORS: Message (first part) when some of the commands that are given in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:598 msgid "Some commands allowing to open documents can't be found:" msgstr "" #. TRANSLATORS: Message (second part) when some of the commands that are given in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:601 msgid "Please check its correct spelling and install missing software." msgstr "" #. TRANSLATORS: Message (third part) when some of the commands that are given in the preferences cannot be found. The %s will be replaced with the name of the menu entry "Preferences" and the name of the menu "Edit". #: ../AMC-perl/AMC/Config.pm:603 #, perl-format msgid "You can change used commands following %s from menu %s." msgstr "" #. TRANSLATORS: "Preferences" menu #: ../AMC-perl/AMC/Config.pm:605 ../AMC-gui-main_window.glade:2706 msgid "Preferences" msgstr "" #. TRANSLATORS: "Edit" menu #: ../AMC-perl/AMC/Config.pm:607 msgid "Edit" msgstr "" #. TRANSLATORS: Error writing one of the configuration files (global or project). The first %s will be replaced with the path of that file, and the second with the error text. #: ../AMC-perl/AMC/Config.pm:841 #, perl-format msgid "Error writing configuration file %s: %s" msgstr "" #: ../AMC-perl/AMC/DataModule/association.pm:103 msgid "Fetching association results from old format XML files..." msgstr "" #: ../AMC-perl/AMC/DataModule/capture.pm:210 msgid "Including zooms in the database..." msgstr "" #: ../AMC-perl/AMC/DataModule/capture.pm:229 #: ../AMC-perl/AMC/DataModule/capture.pm:237 msgid "Building capture database indexes..." msgstr "" #: ../AMC-perl/AMC/DataModule/capture.pm:279 msgid "Fetching data capture results from old format XML files..." msgstr "" #: ../AMC-perl/AMC/DataModule/layout.pm:222 msgid "Building layout database indexes..." msgstr "" #: ../AMC-perl/AMC/DataModule/layout.pm:288 msgid "Fetching layout data from old format XML files..." msgstr "" #: ../AMC-perl/AMC/DataModule/scoring.pm:256 msgid "Fetching scoring data from old format XML files..." msgstr "" #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the total number of sheets. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:236 msgid "ALL" msgstr "" #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the number of sheets for which the question did not get an answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:238 msgid "NA" msgstr "" #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the number of sheets for which the question got an invalid answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:240 msgid "INVALID" msgstr "" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains the reference of the boxes. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:268 msgid "Box" msgstr "" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains the number of items (ticked boxes, or invalid or empty questions). Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:271 msgid "Nb" msgstr "" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains percentage of questions for which the corresponding box is ticked over all questions. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:274 msgid "/all" msgstr "" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains percentage of questions for which the corresponding box is ticked over the expressed questions (counting only questions that did not get empty or invalid answers). Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:277 msgid "/expr" msgstr "" #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the number of sheets for which the question got the "none of the above are correct" answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:305 msgid "NONE" msgstr "" #. TRANSLATORS: table name in the exported ODS spreadsheet for the table that contains the marks. #: ../AMC-perl/AMC/Export/ods.pm:883 ../AMC-perl/AMC/Gui/Notes.glade:8 msgid "Marks" msgstr "" #. TRANSLATORS: Label of the table with questions basic statistics in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1310 msgid "Questions statistics" msgstr "" #. TRANSLATORS: Label of the table with indicative questions basic statistics in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1317 msgid "Indicative questions statistics" msgstr "" #. TRANSLATORS: Label of the table with a legend (explaination of the colors used) in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1327 ../AMC-perl/AMC/Export/ods.pm:1331 msgid "Legend" msgstr "" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that have not been asked to some students. #: ../AMC-perl/AMC/Export/ods.pm:1337 msgid "Non applicable" msgstr "" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that have not been answered. #: ../AMC-perl/AMC/Export/ods.pm:1341 msgid "No answer" msgstr "" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that have not been answered, but are cancelled by the use of allowempty scoring strategy. #: ../AMC-perl/AMC/Export/ods.pm:1345 msgid "Cancelled" msgstr "" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1349 msgid "Invalid answer" msgstr "" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1354 msgid "Correct answer" msgstr "" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1358 msgid "Wrong answer" msgstr "" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the indicative questions. #: ../AMC-perl/AMC/Export/ods.pm:1363 msgid "Indicative" msgstr "" #: ../AMC-perl/AMC/Export/ods.pm:1391 msgid "An old state of the exported file seems to be already opened. Use File/Reload from OpenOffice/LibreOffice to refresh." msgstr "" #: ../AMC-perl/AMC/Filter/plain.pm:92 msgid "Please code your student number opposite, and write your name in the box below." msgstr "" #. TRANSLATORS: Message when the Pages option used in AMC-TXT can't be parsed. %s will be replaced with the option value #: ../AMC-perl/AMC/Filter/plain.pm:209 #, perl-format msgid "Pages option value can't be understood: %s" msgstr "" #: ../AMC-perl/AMC/Filter/plain.pm:238 #, perl-format msgid "Line %d" msgstr "" #. TRANSLATORS: Error text for AMC-TXT parsing, when opening a new question whereas the previous question has less than two choices #: ../AMC-perl/AMC/Filter/plain.pm:249 msgid "Previous question has less than two choices" msgstr "" #. TRANSLATORS: Error text for AMC-TXT parsing #: ../AMC-perl/AMC/Filter/plain.pm:258 #, perl-format msgid "Previous question is a simple question but has %d correct choice(s)" msgstr "" #: ../AMC-perl/AMC/Filter/plain.pm:342 msgid "Invalid encoding: you must use UTF-8, but your source file was saved using another encoding" msgstr "" #: ../AMC-perl/AMC/Filter/plain.pm:368 #, perl-format msgid "File not found: %s" msgstr "" #. TRANSLATORS: Error text for AMC-TXT parsing, when an unknown option is given a value #: ../AMC-perl/AMC/Filter/plain.pm:386 #, perl-format msgid "Unknown option: %s" msgstr "" #. TRANSLATORS: Error text for AMC-TXT parsing when a choice is given but no question were opened #: ../AMC-perl/AMC/Filter/plain.pm:456 msgid "Choice outside question" msgstr "" #: ../AMC-perl/AMC/Filter/plain.pm:1240 #, perl-format msgid "The following fonts does not seem to be installed on the system: %s." msgstr "" #: ../AMC-perl/AMC/Filter/register.pm:78 msgid "No description available." msgstr "" #: ../AMC-perl/AMC/Gui/Association.pm:133 msgid "Names images not found... Maybe you forgot using \\namefield command in LaTeX source?" msgstr "" #: ../AMC-perl/AMC/Gui/Association.pm:690 msgid "Sheet" msgstr "" #: ../AMC-perl/AMC/Gui/Association.pm:728 msgid "End" msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.pm:117 msgid "Page layout" msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.pm:125 msgid "Original" msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.pm:126 ../AMC-gui-edit_preferences.glade:2138 msgid "Scan" msgstr "" #. TRANSLATORS: This is one of the choices for pages navigation in manual data capture window. Here, navigation goes through all pages. Please keep this text very short (say less than 5 letters) so that the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:130 ../AMC-perl/AMC/Gui/Manuel.pm:146 msgid "all" msgstr "" #. TRANSLATORS: This is one of the choices for pages navigation in manual data capture window. Here, navigation goes through pages with some invalid answers. Please keep this text very short (say less than 5 letters) so that the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:132 msgid "inv" msgstr "" #. TRANSLATORS: This is one of the choices for pages navigation in manual data capture window. Here, navigation goes through pages with empty or invalid answers. Please keep this text very short (say less than 5 letters) so that the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:134 msgid "i&e" msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.pm:184 msgid "page" msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.pm:531 #, perl-format msgid "This is a template exam that you cannot edit. To create a new exam from this one to be edited, use the '%s' button." msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.pm:531 ../AMC-perl/AMC/Gui/Manuel.glade:406 msgid "Add photocopy" msgstr "" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms window #: ../AMC-perl/AMC/Gui/Zooms.pm:76 msgid "drag and drop" msgstr "" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms window #: ../AMC-perl/AMC/Gui/Zooms.pm:78 msgid "click" msgstr "" #: ../AMC-perl/AMC/Gui/Zooms.pm:126 ../AMC-perl/AMC/Gui/Zooms.pm:413 #, perl-format msgid "Boxes zooms for page %s" msgstr "" #: ../AMC-perl/AMC/Gui/Zooms.pm:402 ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "You moved some boxes to correct automatic data query, but this work is not saved yet." msgstr "" #: ../AMC-perl/AMC/Gui/Zooms.pm:402 msgid "Do you want to save these modifications before looking at another page?" msgstr "" #: ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "Dou you really want to close and ignore these modifications?" msgstr "" #: ../AMC-perl/AMC/Print/cups.pm:71 #, perl-format msgid "Perl module(s) missing: %s" msgstr "" #: ../AMC-perl/AMC/Print/cupslp.pm:47 #, perl-format msgid "The following commands are missing: %s." msgstr "" #: ../AMC-perl/AMC/Export/register/CSV.pm:70 msgid "Separator" msgstr "" #: ../AMC-perl/AMC/Export/register/CSV.pm:83 msgid "Ticked boxes" msgstr "" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'No, don't group questions by scope in the exported ODS file' #: ../AMC-perl/AMC/Export/register/CSV.pm:89 #: ../AMC-perl/AMC/Export/register/ods.pm:124 msgid "No" msgstr "" #: ../AMC-perl/AMC/Export/register/CSV.pm:90 #: ../AMC-perl/AMC/Export/register/CSV.pm:91 msgid "Yes:" msgstr "" #: ../AMC-perl/AMC/Export/register/CSV.pm:97 #: ../AMC-perl/AMC/Export/register/ods.pm:152 msgid "Choose columns" msgstr "" #. TRANSLATORS: List of students with their scores: one of the export formats. #: ../AMC-perl/AMC/Export/register/List.pm:37 msgid "PDF list" msgstr "" #: ../AMC-perl/AMC/Export/register/List.pm:64 msgid "Number of columns" msgstr "" #: ../AMC-perl/AMC/Export/register/List.pm:67 msgid "Long list is divided into this number of columns on each page." msgstr "" #: ../AMC-perl/AMC/Export/register/List.pm:71 msgid "Paper size" msgstr "" #. TRANSLATORS: Check button label in the exports tab. If checked, a table with questions basic statistics will be added to the ODS exported spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:82 msgid "Stats table" msgstr "" #. TRANSLATORS: Menu to export statistics table in the exports tab. The first menu entry means 'do not build a stats table' in the exported ODS file. You can omit the [...] part, that is here only to state the context. #: ../AMC-perl/AMC/Export/register/ods.pm:89 msgid "None [no stats table to export]" msgstr "" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second menu entry means 'build a stats table, with a horizontal flow' in the exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:91 #: ../AMC-perl/AMC/Export/register/ods.pm:106 msgid "Horizontal flow" msgstr "" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second menu entry means 'build a stats table, with a vertical flow' in the exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:93 #: ../AMC-perl/AMC/Export/register/ods.pm:107 msgid "Vertical flow" msgstr "" #. TRANSLATORS: Check button label in the exports tab. If checked, a table with indicative questions basic statistics will be added to the ODS exported spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:99 msgid "Indicative stats table" msgstr "" #: ../AMC-perl/AMC/Export/register/ods.pm:105 msgid "None" msgstr "" #: ../AMC-perl/AMC/Export/register/ods.pm:110 msgid "Create a table with basic statistics about answers for each indicative question?" msgstr "" #. TRANSLATORS: Check button label in the exports tab. If checked, sums of the scores for groups of questions will be added to the exported table. #: ../AMC-perl/AMC/Export/register/ods.pm:114 msgid "Score groups" msgstr "" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'Yes, group questions by scope in the exported ODS file, and report total scores' #: ../AMC-perl/AMC/Export/register/ods.pm:126 msgid "Yes (values)" msgstr "" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'Yes, group questions by scope in the exported ODS file, and report total scores as percentages.' #: ../AMC-perl/AMC/Export/register/ods.pm:128 msgid "Yes (percentages)" msgstr "" #: ../AMC-perl/AMC/Export/register/ods.pm:131 msgid "Add sums of the scores for each question group?" msgstr "" #: ../AMC-perl/AMC/Export/register/ods.pm:134 msgid "with scope separator" msgstr "" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'No, don't group questions by scope in the exported ODS file' #: ../AMC-perl/AMC/Export/register/ods.pm:141 msgid "':'" msgstr "" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'Yes, group questions by scope in the exported ODS file, and you can detect the scope from a question ID using the text before the separator .' #: ../AMC-perl/AMC/Export/register/ods.pm:143 msgid "'.'" msgstr "" #: ../AMC-perl/AMC/Export/register/ods.pm:146 msgid "To define groups, use question ids in the form \"group:question\" or \"group.question\", depending on the scope separator." msgstr "" #: ../AMC-perl/AMC/Filter/register/latex.pm:54 msgid "" "This is the native format for AMC. LaTeX is not so easy to use for unexperienced users, but the LaTeX power allows the user to build any multiple choice subject. As an example, the following is possible with LaTeX but not with other formats:\n" "* any kind of layout,\n" "* questions with random numerical values,\n" "* use of figures, mathematical formulas\n" "* and much more!" msgstr "" #: ../AMC-perl/AMC/Filter/register/plain.pm:51 msgid "" "This is a plain text format for easy question writting. See the following minimal example:\n" "\n" "Title: Paper title\n" "\n" "* Which is the capital city of Cameroon?\n" "+ Yaounde\n" "- Douala\n" "- Kribi" msgstr "" #: ../AMC-gui-apropos.glade:8 msgid "AMC A propos" msgstr "" #: ../AMC-gui-apropos.glade:17 msgid "Copyright (C) 2008-2018\n" "Alexis Bienvenüe and the AMC development team" msgstr "" #: ../AMC-gui-apropos.glade:19 msgid "Automatic multiple choice questionnaires management" msgstr "" #: ../AMC-gui-apropos.glade:21 msgid "Visit the AMC website" msgstr "" #: ../AMC-gui-choix_pages_impression.glade:33 msgid "Papers printing" msgstr "" #: ../AMC-gui-choix_pages_impression.glade:98 msgid "Please select papers you wish to print:" msgstr "" #: ../AMC-gui-choix_pages_impression.glade:116 msgid "Select papers you wish to print (ctrl-a for all), then confirm..." msgstr "" #: ../AMC-gui-choix_pages_impression.glade:144 msgid "Answer sheet printing" msgstr "" #: ../AMC-gui-choix_pages_impression.glade:190 msgid "Printer:" msgstr "" #: ../AMC-gui-choix_pages_impression.glade:243 msgid "two-side printing" msgstr "" #: ../AMC-gui-choix_pages_impression.glade:319 msgid "printing options" msgstr "" #: ../AMC-gui-choix_pages_impression.glade:343 msgid "Destination directory" msgstr "" #: ../AMC-gui-choix_pages_impression.glade:356 msgid "Select destination directory for printable files" msgstr "" #: ../AMC-gui-choix_postcorrect.glade:20 msgid "Post-correction" msgstr "" #: ../AMC-gui-choix_postcorrect.glade:95 msgid "Please enter the teacher score sheet number and copy number to get the correct answers from:" msgstr "" #: ../AMC-gui-choix_postcorrect.glade:189 msgid "Guess simple/multiple status" msgstr "" #: ../AMC-gui-choix_postcorrect.glade:194 msgid "Sets type of all questions for which 2 or more answers are ticked on the teacher answer sheet to multiple" msgstr "" #: ../AMC-gui-choix_projet.glade:18 msgid "Open a MC project" msgstr "" #: ../AMC-gui-choix_projet.glade:61 ../AMC-gui-liste_dialog.glade:91 msgid "Cancel" msgstr "" #: ../AMC-gui-choix_projet.glade:104 ../AMC-gui-main_window.glade:2665 msgid "New project" msgstr "" #: ../AMC-gui-choix_projet.glade:163 msgid "Rename" msgstr "" #: ../AMC-gui-choix_projet.glade:182 msgid "Clone" msgstr "" #: ../AMC-gui-choix_projet.glade:278 msgid "Open an existing MC project:" msgstr "" #: ../AMC-gui-choix_projet.glade:345 msgid "Create an new project:" msgstr "" #: ../AMC-gui-choix_projet.glade:364 msgid "Project name:" msgstr "" #: ../AMC-gui-choix_projet.glade:398 msgid "Note : a project name can only contain alphanumeric characters, plus some simple characters (-_+.:)." msgstr "" #: ../AMC-gui-choose-mode.glade:10 msgid "Before starting data capture, please choose the mode corresponding to what you did with the printed questions." msgstr "" #: ../AMC-gui-choose_columns.glade:8 msgid "Choose columns to export" msgstr "" #: ../AMC-gui-choose_columns.glade:65 msgid "Order and select the columns to include in the exported file:" msgstr "" #: ../AMC-gui-choose_students.glade:13 msgid "Choose students" msgstr "" #: ../AMC-gui-choose_students.glade:70 msgid "Select the students for which you want to annotate the score sheet:" msgstr "" #: ../AMC-gui-choose_students.glade:114 msgid "Search:" msgstr "" #: ../AMC-gui-cleanup.glade:13 ../AMC-gui-main_window.glade:2939 msgid "Cleanup" msgstr "" #: ../AMC-gui-cleanup.glade:40 msgid "Remove selected files" msgstr "" #: ../AMC-gui-cleanup.glade:71 msgid "To save disk space, you can remove some intermediate files from your project directory." msgstr "" #: ../AMC-gui-edit_preferences.glade:230 ../AMC-gui-edit_preferences.glade:243 msgid "LaTeX models directory" msgstr "" #: ../AMC-gui-edit_preferences.glade:232 msgid "Please select a directory containing LaTeX models for AMC, with their descriptions" msgstr "" #: ../AMC-gui-edit_preferences.glade:255 msgid "Projects directory. May be modified only if there are no opened projects." msgstr "" #: ../AMC-gui-edit_preferences.glade:257 msgid "Please select the projects directory" msgstr "" #: ../AMC-gui-edit_preferences.glade:268 msgid "Projects directory" msgstr "" #: ../AMC-gui-edit_preferences.glade:283 msgid "Directories" msgstr "" #: ../AMC-gui-edit_preferences.glade:315 msgid "PDF files" msgstr "" #: ../AMC-gui-edit_preferences.glade:326 msgid "Images" msgstr "" #: ../AMC-gui-edit_preferences.glade:337 msgid "CSV data files" msgstr "" #: ../AMC-gui-edit_preferences.glade:348 msgid "OpenOffice files" msgstr "" #: ../AMC-gui-edit_preferences.glade:359 msgid "XML files" msgstr "" #: ../AMC-gui-edit_preferences.glade:370 msgid "Command to edit LaTeX files" msgstr "" #: ../AMC-gui-edit_preferences.glade:371 msgid "LaTeX editor" msgstr "" #: ../AMC-gui-edit_preferences.glade:382 msgid "Plain text editor" msgstr "" #: ../AMC-gui-edit_preferences.glade:393 msgid "Command for directory browsing (string %d will be replaced by the directory path before execution)" msgstr "" #: ../AMC-gui-edit_preferences.glade:394 msgid "File browser" msgstr "" #: ../AMC-gui-edit_preferences.glade:405 msgid "Web browser" msgstr "" #: ../AMC-gui-edit_preferences.glade:534 msgid "Visualisation commands" msgstr "" #: ../AMC-gui-edit_preferences.glade:565 msgid "Default LaTeX engine" msgstr "" #: ../AMC-gui-edit_preferences.glade:576 msgid "Default command to compile LaTeX file and make PDF, PS or DVI output (may be changed for each project)." msgstr "" #: ../AMC-gui-edit_preferences.glade:599 msgid "External programs" msgstr "" #: ../AMC-gui-edit_preferences.glade:631 ../AMC-gui-edit_preferences.glade:4238 msgid "Students list charset" msgstr "" #: ../AMC-gui-edit_preferences.glade:642 msgid "CSV charset" msgstr "" #: ../AMC-gui-edit_preferences.glade:653 msgctxt "option name. Refers to a list of headers that may contain surnames in the CSV names list" msgid "CSV surname headers" msgstr "" #: ../AMC-gui-edit_preferences.glade:664 msgctxt "option name. Refers to a list of headers that may contain names in the CSV names list." msgid "CSV name headers" msgstr "" #: ../AMC-gui-edit_preferences.glade:675 msgid "LaTeX files charset" msgstr "" #: ../AMC-gui-edit_preferences.glade:686 msgid "Default encoding for the students list file." msgstr "" #: ../AMC-gui-edit_preferences.glade:705 msgid "Default charset for AMC CSV output." msgstr "" #: ../AMC-gui-edit_preferences.glade:724 msgid "Comma separated list of CSV headers of columns that may contain the surnames of the students in the names list file." msgstr "" #: ../AMC-gui-edit_preferences.glade:738 msgid "Comma separated list of CSV headers of columns that may contain the names of the students in the names list file." msgstr "" #: ../AMC-gui-edit_preferences.glade:752 msgid "Charset used when producing LaTeX files from models." msgstr "" #: ../AMC-gui-edit_preferences.glade:769 msgid "Decimal delimiter" msgstr "" #: ../AMC-gui-edit_preferences.glade:797 msgid "ASCII filenames" msgstr "" #: ../AMC-gui-edit_preferences.glade:809 msgid "Force all annotated completed student sheets to have only ASCII characters in their file names. When set, all non-ASCII characters will be replaced by underscores." msgstr "" #: ../AMC-gui-edit_preferences.glade:821 msgid "Accept non-ASCII project names" msgstr "" #: ../AMC-gui-edit_preferences.glade:848 msgid "Internationalization" msgstr "" #: ../AMC-gui-edit_preferences.glade:880 msgid "Printing method" msgstr "" #: ../AMC-gui-edit_preferences.glade:891 msgid "Printing command" msgstr "" #: ../AMC-gui-edit_preferences.glade:913 msgid "Useful printing options" msgstr "" #: ../AMC-gui-edit_preferences.glade:941 msgid "Command to print one paper (with stapling). String %f will be replaced by the PDF file to be printed." msgstr "" #: ../AMC-gui-edit_preferences.glade:984 msgid "Printing" msgstr "" #: ../AMC-gui-edit_preferences.glade:1016 msgid "Number of processes" msgstr "" #: ../AMC-gui-edit_preferences.glade:1027 msgid "Number of processes to be run in parallel. Default value is 0, which allows to start as many processes as processors." msgstr "" #: ../AMC-gui-edit_preferences.glade:1044 msgid "System" msgstr "" #: ../AMC-gui-edit_preferences.glade:1065 msgid "Main" msgstr "" #: ../AMC-gui-edit_preferences.glade:1094 ../AMC-gui-main_window.glade:2771 msgid "Solution" msgstr "" #: ../AMC-gui-edit_preferences.glade:1110 ../AMC-gui-main_window.glade:2783 msgid "Individual solution" msgstr "" #: ../AMC-gui-edit_preferences.glade:1125 ../AMC-gui-main_window.glade:2759 msgid "Catalog" msgstr "" #: ../AMC-gui-edit_preferences.glade:1147 msgid "Optional working documents to build" msgstr "" #: ../AMC-gui-edit_preferences.glade:1170 ../AMC-gui-main_window.glade:394 msgid "Documents" msgstr "" #: ../AMC-gui-edit_preferences.glade:1213 msgid "Limit MSE" msgstr "" #: ../AMC-gui-edit_preferences.glade:1224 msgid "Limit sensitivity" msgstr "" #: ../AMC-gui-edit_preferences.glade:1265 msgid "Colouring thresholds" msgstr "" #: ../AMC-gui-edit_preferences.glade:1299 msgid "No answers color" msgstr "" #: ../AMC-gui-edit_preferences.glade:1310 msgid "Invalid answers color" msgstr "" #: ../AMC-gui-edit_preferences.glade:1347 msgid "Scan view" msgstr "" #: ../AMC-gui-edit_preferences.glade:1379 msgid "Maximum density for manual data capture question paper rendering (DPI)" msgstr "" #: ../AMC-gui-edit_preferences.glade:1380 msgid "Manual capture density (DPI)" msgstr "" #: ../AMC-gui-edit_preferences.glade:1391 msgid "Image type" msgstr "" #: ../AMC-gui-edit_preferences.glade:1402 msgid "Remember window size" msgstr "" #. Label in the preferences window, corresponding to "Starting number of columns for names in the manual association window". #: ../AMC-gui-edit_preferences.glade:1413 msgid "Number of columns for names" msgstr "" #. Label in the preferences window, corresponding to the "Number of columns for zoomed boxes in the zooms window (opened from the Diagnosis list in the Data capture tab)". #: ../AMC-gui-edit_preferences.glade:1424 msgid "Number of columns for zoomes boxes" msgstr "" #: ../AMC-gui-edit_preferences.glade:1448 msgid "Temporary file type used for manual data capture. Fastest choice is (none), but this seems to be problematic in some environments." msgstr "" #: ../AMC-gui-edit_preferences.glade:1467 msgid "Do you want to keep the same window size each time you start AMC?" msgstr "" #: ../AMC-gui-edit_preferences.glade:1480 msgid "Starting number of columns for names in the manual association window." msgstr "" #: ../AMC-gui-edit_preferences.glade:1497 msgid "Number of columns for zoomed boxes in the zooms window (opened from the Diagnosis list in the Data capture tab)." msgstr "" #: ../AMC-gui-edit_preferences.glade:1518 msgid "Miscellaneous" msgstr "" #: ../AMC-gui-edit_preferences.glade:1549 msgid "Notify the user at the end of the following actions:" msgstr "" #. One of the "notify the user at the end of the following actions" checkbox: for documents update. #: ../AMC-gui-edit_preferences.glade:1568 msgid "Documents update" msgstr "" #. One of the "notify the user at the end of the following actions" checkbox: for computing marks. #: ../AMC-gui-edit_preferences.glade:1600 msgid "Grading" msgstr "" #. One of the "notify the user at the end of the following actions" checkbox: for completed answer sheets annotation. #: ../AMC-gui-edit_preferences.glade:1616 #: ../AMC-gui-edit_preferences.glade:3137 msgid "Annotation" msgstr "" #: ../AMC-gui-edit_preferences.glade:1641 msgid "Notify using:" msgstr "" #: ../AMC-gui-edit_preferences.glade:1660 msgid "Desktop notifications" msgstr "" #: ../AMC-gui-edit_preferences.glade:1696 msgid "Command:" msgstr "" #: ../AMC-gui-edit_preferences.glade:1708 msgid "Command that will be called as a user notification. %m will be replaced by AMC's message, and %a by AMC completed action." msgstr "" #: ../AMC-gui-edit_preferences.glade:1737 msgid "Notifications" msgstr "" #: ../AMC-gui-edit_preferences.glade:1761 msgid "Display" msgstr "" #: ../AMC-gui-edit_preferences.glade:1804 msgid "Vector formats density (DPI)" msgstr "" #: ../AMC-gui-edit_preferences.glade:1815 msgid "Black&white conversion threshold" msgstr "" #: ../AMC-gui-edit_preferences.glade:1826 msgid "Erease red from scans" msgstr "" #: ../AMC-gui-edit_preferences.glade:1837 msgid "Force conversion" msgstr "" #: ../AMC-gui-edit_preferences.glade:1848 msgid "Density used when converting vector format scans (PDF, EPS) into bitmap." msgstr "" #: ../AMC-gui-edit_preferences.glade:1863 msgid "Threshold used when converting scans to black and white. Value 0.0 means all white, value 1.0 means all black." msgstr "" #: ../AMC-gui-edit_preferences.glade:1881 msgid "When set, AMC will erease red color from the color scans before automatic data capture. This can be useful if the boxes are drawn in red." msgstr "" #: ../AMC-gui-edit_preferences.glade:1896 msgid "With this option, all scan files will be converted with ImageMagick. This can slow down scans processing, but may allow some unusual file formats to be processed successfully." msgstr "" #: ../AMC-gui-edit_preferences.glade:1913 msgid "Scans conversion" msgstr "" #: ../AMC-gui-edit_preferences.glade:1945 msgid "Marks size max increase" msgstr "" #: ../AMC-gui-edit_preferences.glade:1956 msgid "Marks size max decrease" msgstr "" #: ../AMC-gui-edit_preferences.glade:1967 #: ../AMC-gui-edit_preferences.glade:2490 msgid "Can be customized on a per-project basis in the Project tab." msgstr "" #: ../AMC-gui-edit_preferences.glade:1968 msgid "Default darkness threshold" msgstr "" #: ../AMC-gui-edit_preferences.glade:1979 msgid "Default upper darkness threshold" msgstr "" #: ../AMC-gui-edit_preferences.glade:1990 msgid "Proportion of the box (on the scan) that is measured to compute its blackness." msgstr "" #: ../AMC-gui-edit_preferences.glade:1991 msgid "Measured box proportion" msgstr "" #: ../AMC-gui-edit_preferences.glade:2002 msgid "Process scans with 3 corner marks" msgstr "" #: ../AMC-gui-edit_preferences.glade:2013 msgid "Maximum increase (proportion: 0.1 means 10%) allowed for corner marks after printing/scanning process." msgstr "" #: ../AMC-gui-edit_preferences.glade:2030 msgid "Maximum decrease (proportion: 0.1 means 10%) allowed for corner marks after printing/scanning process." msgstr "" #: ../AMC-gui-edit_preferences.glade:2047 msgid "If black proportion is greater than this value, the box will be considered as beeing ticked. This is a default value, it can be changed in each project." msgstr "" #: ../AMC-gui-edit_preferences.glade:2093 msgid "Do you want to process scans with 3 corner circles only?" msgstr "" #: ../AMC-gui-edit_preferences.glade:2110 msgid "Detection parameters" msgstr "" #: ../AMC-gui-edit_preferences.glade:2166 msgid "These options are used when creating a new project. See the project tab for more details." msgstr "" #: ../AMC-gui-edit_preferences.glade:2173 #: ../AMC-gui-edit_preferences.glade:3760 msgid "Minimal mark" msgstr "" #: ../AMC-gui-edit_preferences.glade:2184 #: ../AMC-gui-edit_preferences.glade:3771 msgid "Floor mark" msgstr "" #: ../AMC-gui-edit_preferences.glade:2195 #: ../AMC-gui-edit_preferences.glade:3782 msgid "Maximal mark" msgstr "" #: ../AMC-gui-edit_preferences.glade:2206 #: ../AMC-gui-edit_preferences.glade:3793 msgid "Grain" msgstr "" #: ../AMC-gui-edit_preferences.glade:2217 #: ../AMC-gui-edit_preferences.glade:3804 msgid "Rounding type" msgstr "" #: ../AMC-gui-edit_preferences.glade:2272 #: ../AMC-gui-edit_preferences.glade:3891 msgid "ceil" msgstr "" #: ../AMC-gui-edit_preferences.glade:2312 msgid "Default marking options" msgstr "" #: ../AMC-gui-edit_preferences.glade:2329 ../AMC-gui-main_window.glade:1943 msgid "Marking" msgstr "" #: ../AMC-gui-edit_preferences.glade:2372 msgid "Max size" msgstr "" #: ../AMC-gui-edit_preferences.glade:2383 msgid "Image format" msgstr "" #: ../AMC-gui-edit_preferences.glade:2394 msgid "JPEG quality" msgstr "" #: ../AMC-gui-edit_preferences.glade:2454 msgid "Scans" msgstr "" #: ../AMC-gui-edit_preferences.glade:2492 msgid "Default header text" msgstr "" #: ../AMC-gui-edit_preferences.glade:2513 #: ../AMC-gui-edit_preferences.glade:3976 msgid "Text to be written on annotated sheets header. Use %S for score, %M for max score, %s for grade, %m for max grade, and %(col) for content of the column col in the students list file." msgstr "" #: ../AMC-gui-edit_preferences.glade:2553 msgid "Default writing direction" msgstr "" #: ../AMC-gui-edit_preferences.glade:2564 msgid "Default questions annotation" msgstr "" #: ../AMC-gui-edit_preferences.glade:2575 msgid "Default cancelled questions annotation" msgstr "" #: ../AMC-gui-edit_preferences.glade:2585 #: ../AMC-gui-edit_preferences.glade:4050 msgid "right to left" msgstr "" #: ../AMC-gui-edit_preferences.glade:2639 msgid "Header" msgstr "" #: ../AMC-gui-edit_preferences.glade:2671 msgid "Significant digits" msgstr "" #: ../AMC-gui-edit_preferences.glade:2682 msgid "Number of significant digits to display for marks when annotating papers." msgstr "" #: ../AMC-gui-edit_preferences.glade:2703 msgid "Marks" msgstr "" #: ../AMC-gui-edit_preferences.glade:2740 msgid "Line width" msgstr "" #: ../AMC-gui-edit_preferences.glade:2751 msgid "Font" msgstr "" #: ../AMC-gui-edit_preferences.glade:2762 msgid "Marks shift" msgstr "" #: ../AMC-gui-edit_preferences.glade:2803 msgid "When marks are written on annotated papers left to the boxes, shifts to the left marks by this value. You can use mm or in as a unit." msgstr "" #: ../AMC-gui-edit_preferences.glade:2832 msgid "To be ticked" msgstr "" #: ../AMC-gui-edit_preferences.glade:2844 msgid "Ticked" msgstr "" #: ../AMC-gui-edit_preferences.glade:2856 msgid "type" msgstr "" #: ../AMC-gui-edit_preferences.glade:2868 msgid "colour" msgstr "" #: ../AMC-gui-edit_preferences.glade:2880 #: ../AMC-gui-edit_preferences.glade:2891 #: ../AMC-gui-edit_preferences.glade:2924 #: ../AMC-gui-edit_preferences.glade:2946 msgid "no" msgstr "" #: ../AMC-gui-edit_preferences.glade:2902 #: ../AMC-gui-edit_preferences.glade:2913 #: ../AMC-gui-edit_preferences.glade:2935 #: ../AMC-gui-edit_preferences.glade:2957 msgid "yes" msgstr "" #: ../AMC-gui-edit_preferences.glade:3088 msgid "Also annotate informative questions" msgstr "" #: ../AMC-gui-edit_preferences.glade:3110 msgid "Symbols" msgstr "" #: ../AMC-gui-edit_preferences.glade:3185 msgid "Sender email" msgstr "" #: ../AMC-gui-edit_preferences.glade:3196 msgid "Carbon copy address" msgstr "" #: ../AMC-gui-edit_preferences.glade:3207 msgid "Blind Carbon copy address" msgstr "" #: ../AMC-gui-edit_preferences.glade:3260 msgid "Delay between sendings" msgstr "" #: ../AMC-gui-edit_preferences.glade:3295 msgid "Mail delivery method:" msgstr "" #: ../AMC-gui-edit_preferences.glade:3337 msgid "sendmail path" msgstr "" #: ../AMC-gui-edit_preferences.glade:3373 msgid "SMTP host" msgstr "" #: ../AMC-gui-edit_preferences.glade:3384 msgid "SMTP port" msgstr "" #: ../AMC-gui-edit_preferences.glade:3424 msgid "SMTP security" msgstr "" #: ../AMC-gui-edit_preferences.glade:3435 msgid "SMTP user" msgstr "" #: ../AMC-gui-edit_preferences.glade:3472 msgid "SMTP password" msgstr "" #: ../AMC-gui-edit_preferences.glade:3509 msgid "Sending emails" msgstr "" #: ../AMC-gui-edit_preferences.glade:3546 msgid "Default subject" msgstr "" #: ../AMC-gui-edit_preferences.glade:3588 msgid "Default content" msgstr "" #: ../AMC-gui-edit_preferences.glade:3612 msgid "Email" msgstr "" #: ../AMC-gui-edit_preferences.glade:3638 msgid "Project preferences" msgstr "" #: ../AMC-gui-edit_preferences.glade:3670 msgid "Darkness threshold" msgstr "" #: ../AMC-gui-edit_preferences.glade:3681 msgid "If black proportion is greater than this value, the box will be considered as beeing ticked. If students have been told to darken the boxes entirely, one can choose value 0.5. If students have been told to tick the boxes, values around 0.15 seems appropriate." msgstr "" #: ../AMC-gui-edit_preferences.glade:3697 msgid "Upper darkness threshold" msgstr "" #: ../AMC-gui-edit_preferences.glade:3708 msgid "If black proportion is greater than this value, the box is considered as not ticked. Setting this threshold to a value less than one allows the students to cancel ticked boxes by filling them completely." msgstr "" #: ../AMC-gui-edit_preferences.glade:3728 msgid "Automatic data capture" msgstr "" #: ../AMC-gui-edit_preferences.glade:3815 msgid "Mark associated with null score" msgstr "" #: ../AMC-gui-edit_preferences.glade:3829 msgid "Floor mark: any exam with a global mark less than this value will be given this mark. Let empty for no floor mark." msgstr "" #: ../AMC-gui-edit_preferences.glade:3879 msgid "Mark to be given to a perfect sheet with all good answers (scaling the marks). Value 0 meens that you don't want to scale the marks." msgstr "" #: ../AMC-gui-edit_preferences.glade:3896 msgid "When using SUF option in general grading scale, should marks be ceiled not to be larger than the maximum mark ?" msgstr "" #: ../AMC-gui-edit_preferences.glade:3920 msgid "Global mark rules" msgstr "" #: ../AMC-gui-edit_preferences.glade:3956 msgid "Header text" msgstr "" #: ../AMC-gui-edit_preferences.glade:4007 msgid "Writing direction" msgstr "" #: ../AMC-gui-edit_preferences.glade:4018 msgid "Questions marks position" msgstr "" #: ../AMC-gui-edit_preferences.glade:4029 msgid "Questions annotation text" msgstr "" #: ../AMC-gui-edit_preferences.glade:4040 msgid "Cancelled questions annotation text" msgstr "" #: ../AMC-gui-edit_preferences.glade:4083 msgid "Text to be written for each question. This will be evaluated by perl, so quote it to make a single string. Use %S for score, %M for max score, and %s and %m for these values truncated to the requested number of significant digits." msgstr "" #: ../AMC-gui-edit_preferences.glade:4097 msgid "Same as above, but for cancelled questions (when using allowempty)." msgstr "" #: ../AMC-gui-edit_preferences.glade:4122 msgid "Papers annotation" msgstr "" #: ../AMC-gui-edit_preferences.glade:4206 msgid "Examination description" msgstr "" #: ../AMC-gui-edit_preferences.glade:4249 msgid "CSV files charset" msgstr "" #: ../AMC-gui-edit_preferences.glade:4260 msgid "Charset used for the students list file" msgstr "" #: ../AMC-gui-edit_preferences.glade:4279 msgid "Charset for the CSV marks file produced by AMC." msgstr "" #: ../AMC-gui-edit_preferences.glade:4302 msgid "Internationnalization" msgstr "" #: ../AMC-gui-edit_preferences.glade:4334 msgid "LaTeX engine" msgstr "" #: ../AMC-gui-edit_preferences.glade:4345 msgid "Command to compile LaTeX file and make PDF, PS or DVI output." msgstr "" #: ../AMC-gui-edit_preferences.glade:4368 msgid "External commands" msgstr "" #: ../AMC-gui-edit_preferences.glade:4393 ../AMC-gui-main_window.glade:2923 #: ../AMC-gui-main_window.glade:3239 msgid "Project" msgstr "" #: ../AMC-gui-edit_preferences.glade:4413 msgid "AMC Preferences" msgstr "" #: ../AMC-gui-filter_details.glade:7 msgid "Formats details" msgstr "" #: ../AMC-gui-filter_details.glade:66 msgid "AMC supports different formats for the source file. Here are some details about each of them." msgstr "" #: ../AMC-gui-filter_details.glade:115 msgid "Description:" msgstr "" #: ../AMC-gui-liste_dialog.glade:48 msgid "No names list" msgstr "" #: ../AMC-gui-liste_dialog.glade:134 msgid "Apply" msgstr "" #: ../AMC-gui-liste_dialog.glade:163 msgid "Choose your students names list file" msgstr "" #: ../AMC-gui-mailing.glade:13 msgid "Mailing" msgstr "" #: ../AMC-gui-mailing.glade:40 msgid "Send" msgstr "" #: ../AMC-gui-mailing.glade:75 msgid "Current project name %n:" msgstr "" #: ../AMC-gui-mailing.glade:149 msgid "Emails column:" msgstr "" #: ../AMC-gui-mailing.glade:184 msgid "Select failed" msgstr "" #: ../AMC-gui-mailing.glade:237 msgid "Addressees" msgstr "" #: ../AMC-gui-mailing.glade:274 msgid "Subject" msgstr "" #: ../AMC-gui-mailing.glade:303 msgid "Enable HTML Tags" msgstr "" #: ../AMC-gui-mailing.glade:345 msgid "Body" msgstr "" #: ../AMC-gui-mailing.glade:437 msgid "Attachments" msgstr "" #: ../AMC-gui-main_window.glade:126 msgid "Updated" msgstr "" #: ../AMC-gui-main_window.glade:146 msgid "Sensitivity" msgstr "" #: ../AMC-gui-main_window.glade:156 msgid "Scan file" msgstr "" #: ../AMC-gui-main_window.glade:294 msgid "Number of papers:" msgstr "" #: ../AMC-gui-main_window.glade:308 msgid "Number of papers to produce. Zero means taking into account the number written in the LaTeX source file." msgstr "" #. TRANSLATORS: Use the character '_' before the key that can be used as a mnemonic (to activate documents update with Alt+key) #: ../AMC-gui-main_window.glade:343 msgid "_Update documents" msgstr "" #: ../AMC-gui-main_window.glade:377 msgid "Question" msgstr "" #: ../AMC-gui-main_window.glade:543 msgid "Warnings" msgstr "" #: ../AMC-gui-main_window.glade:654 msgid "Print papers" msgstr "" #: ../AMC-gui-main_window.glade:718 msgid "From papers' scans" msgstr "" #: ../AMC-gui-main_window.glade:740 ../AMC-gui-main_window.glade:1776 msgid "Automatic" msgstr "" #: ../AMC-gui-main_window.glade:762 msgid "On screen with mouse" msgstr "" #: ../AMC-gui-main_window.glade:784 ../AMC-gui-main_window.glade:1819 msgid "Manual" msgstr "" #: ../AMC-gui-main_window.glade:809 msgid "Data capture after examination" msgstr "" #: ../AMC-gui-main_window.glade:841 msgid "Missing pages" msgstr "" #: ../AMC-gui-main_window.glade:913 msgid "Look at scans" msgstr "" #: ../AMC-gui-main_window.glade:984 msgid "Forget" msgstr "" #: ../AMC-gui-main_window.glade:1001 msgid "Look at pages" msgstr "" #: ../AMC-gui-main_window.glade:1086 msgid "Pages:" msgstr "" #: ../AMC-gui-main_window.glade:1144 msgid "Columns" msgstr "" #. Label on the button used to open a window with the images of the boxes taken from the scan. This window can be used th check boxes categorization. #: ../AMC-gui-main_window.glade:1183 ../AMC-perl/AMC/Gui/Zooms.glade:13 msgid "Zooms" msgstr "" #: ../AMC-gui-main_window.glade:1188 msgid "Show images of the boxes from the scan, and check their categorization." msgstr "" #. Label of the button used to open a window showing a scan with the place where corner marks have been detected, and the position where the boxes are supposed to be. #: ../AMC-gui-main_window.glade:1202 msgid "Layout" msgstr "" #: ../AMC-gui-main_window.glade:1207 msgid "Show where corner marks have been detected on the scan, and where boxes are supposed to be." msgstr "" #. Label of the button used to delete data capture for selected pages. #: ../AMC-gui-main_window.glade:1221 msgid "Remove" msgstr "" #: ../AMC-gui-main_window.glade:1225 msgid "Remove data capture for selected pages." msgstr "" #: ../AMC-gui-main_window.glade:1266 msgid "Diagnosis" msgstr "" #: ../AMC-gui-main_window.glade:1323 msgid "Update marking scale" msgstr "" #: ../AMC-gui-main_window.glade:1327 msgid "Also update marking scale extraction from LaTeX source file" msgstr "" #: ../AMC-gui-main_window.glade:1341 msgid "Mark papers" msgstr "" #: ../AMC-gui-main_window.glade:1394 msgid "Marking" msgstr "" #: ../AMC-gui-main_window.glade:1419 msgid "Look at marks" msgstr "" #: ../AMC-gui-main_window.glade:1500 msgid "Students list:" msgstr "" #: ../AMC-gui-main_window.glade:1548 msgid "Set file" msgstr "" #: ../AMC-gui-main_window.glade:1596 msgid "Edit list" msgstr "" #: ../AMC-gui-main_window.glade:1638 msgid "Re-read" msgstr "" #: ../AMC-gui-main_window.glade:1704 msgid "Code name for automatic association:" msgstr "" #: ../AMC-gui-main_window.glade:1715 msgid "Primary key from this list:" msgstr "" #: ../AMC-gui-main_window.glade:1738 msgid "Papers/students association:" msgstr "" #: ../AMC-gui-main_window.glade:1858 msgid "Students identification" msgstr "" #: ../AMC-gui-main_window.glade:2020 msgid "Export" msgstr "" #: ../AMC-gui-main_window.glade:2041 msgid "and" msgstr "" #: ../AMC-gui-main_window.glade:2095 msgid "Sorting:" msgstr "" #: ../AMC-gui-main_window.glade:2121 msgid "include absentees" msgstr "" #: ../AMC-gui-main_window.glade:2127 msgid "Should exported data include absentees?" msgstr "" #: ../AMC-gui-main_window.glade:2207 msgid "Exports dir" msgstr "" #: ../AMC-gui-main_window.glade:2239 msgid "Marks export" msgstr "" #: ../AMC-gui-main_window.glade:2322 msgid "File name model:" msgstr "" #: ../AMC-gui-main_window.glade:2336 msgid "File name model used to make file names for PDF annotated papers, one by student. Keep empty in order to use student name." msgstr "" #: ../AMC-gui-main_window.glade:2382 msgid "Annotate papers' scans with marking details." msgstr "" #: ../AMC-gui-main_window.glade:2404 msgid "Annotate papers" msgstr "" #: ../AMC-gui-main_window.glade:2428 msgid "Look at grouped files" msgstr "" #: ../AMC-gui-main_window.glade:2451 msgid "Look" msgstr "" #: ../AMC-gui-main_window.glade:2482 msgid "Send..." msgstr "" #: ../AMC-gui-main_window.glade:2511 msgid "Annotated papers" msgstr "" #: ../AMC-gui-main_window.glade:2534 msgid "Reports" msgstr "" #: ../AMC-gui-main_window.glade:2650 msgid "Open project" msgstr "" #: ../AMC-gui-main_window.glade:2691 msgid "Save project" msgstr "" #: ../AMC-gui-main_window.glade:2721 msgid "Menu" msgstr "" #: ../AMC-gui-main_window.glade:2799 ../AMC-gui-main_window.glade:2838 #: ../AMC-gui-main_window.glade:2877 msgid "Update the document" msgstr "" #: ../AMC-gui-main_window.glade:2813 ../AMC-gui-main_window.glade:2852 #: ../AMC-gui-main_window.glade:2891 msgid "Open the document" msgstr "" #: ../AMC-gui-main_window.glade:2953 msgid "Export as template" msgstr "" #: ../AMC-gui-main_window.glade:2967 msgid "User templates" msgstr "" #: ../AMC-gui-main_window.glade:2992 msgid "Manage" msgstr "" #: ../AMC-gui-main_window.glade:3017 ../AMC-gui-main_window.glade:3267 msgid "Help" msgstr "" #: ../AMC-gui-main_window.glade:3033 msgid "About" msgstr "" #: ../AMC-gui-main_window.glade:3047 msgid "Cancel learning…" msgstr "" #: ../AMC-gui-main_window.glade:3058 msgid "Debugging" msgstr "" #: ../AMC-gui-main_window.glade:3076 msgid "Bug report" msgstr "" #: ../AMC-gui-main_window.glade:3090 ../AMC-gui-main_window.glade:3115 msgid "Documentation" msgstr "" #: ../AMC-gui-main_window.glade:3184 ../AMC-gui-main_window.glade:3253 msgid "Plugins" msgstr "" #: ../AMC-gui-main_window.glade:3200 msgid "Browse" msgstr "" #: ../AMC-gui-main_window.glade:3214 msgid "Install plugin" msgstr "" #: ../AMC-gui-make_template.glade:8 msgid "Save as a template" msgstr "" #: ../AMC-gui-make_template.glade:64 msgid "To make a new template from your project, describe it below:" msgstr "" #: ../AMC-gui-make_template.glade:86 msgid "File name:" msgstr "" #: ../AMC-gui-make_template.glade:117 msgid "Note: please use only alphanumeric characters and characters from \"-_+\" for the template file name." msgstr "" #: ../AMC-gui-make_template.glade:143 msgid "Short name:" msgstr "" #: ../AMC-gui-make_template.glade:202 msgid "Description:" msgstr "" #: ../AMC-gui-make_template.glade:304 msgid "Included files:" msgstr "" #: ../AMC-gui-overwritten.glade:49 msgid "List of pages with overwritten data:" msgstr "" #: ../AMC-gui-saisie_auto.glade:8 msgid "Please select all papers' scans" msgstr "" #: ../AMC-gui-saisie_auto.glade:10 msgid "Automatic data capture" msgstr "" #: ../AMC-gui-saisie_auto.glade:27 msgid "Proceed to data capture from scans with button OK" msgstr "" #: ../AMC-gui-saisie_auto.glade:82 msgid "Copy to project directory (recommended)" msgstr "" #: ../AMC-gui-saisie_auto.glade:88 ../AMC-gui-saisie_auto.glade:89 msgid "Copy all scans to scans sub-directory in project directory" msgstr "" #: ../AMC-gui-saisie_auto.glade:156 msgid "Use this setting to be sure that the exam copy IDs allocated to the pages of the scans you selected will be consecutive numbers, in the same order as the pages." msgstr "" #: ../AMC-gui-saisie_auto.glade:172 msgid "Options" msgstr "" #: ../AMC-gui-source_latex_choix.glade:8 msgid "Choose LaTeX source file" msgstr "" #: ../AMC-gui-source_latex_choix_zip.glade:8 msgid "ZIP file choice" msgstr "" #: ../AMC-gui-source_latex_dialog.glade:7 msgid "Choose LaTeX source" msgstr "" #: ../AMC-gui-source_latex_dialog.glade:62 msgid "A multiple choice project is mainly made of a source file, which describes the questionnaire.\n" "Please choose your situation:" msgstr "" #: ../AMC-gui-source_latex_dialog.glade:105 msgid "Template" msgstr "" #: ../AMC-gui-source_latex_dialog.glade:119 msgid "You did not write any description of the questionnaire, and want to start from a template." msgstr "" #: ../AMC-gui-source_latex_dialog.glade:171 msgid "File" msgstr "" #: ../AMC-gui-source_latex_dialog.glade:185 msgid "You already wrote a questionnaire description, and want to use it for this project." msgstr "" #: ../AMC-gui-source_latex_dialog.glade:237 msgid "Empty" msgstr "" #: ../AMC-gui-source_latex_dialog.glade:251 msgid "You want to write the description from zero." msgstr "" #: ../AMC-gui-source_latex_dialog.glade:303 msgid "Archive" msgstr "" #: ../AMC-gui-source_latex_dialog.glade:317 msgid "You have a .tgz or .zip file containing the questionnaire and other related stuff, coming from a third party software or a backup." msgstr "" #: ../AMC-gui-source_latex_modele.glade:8 msgid "Template selection" msgstr "" #: ../AMC-gui-unrecognized.glade:8 msgid "Preprocess" msgstr "" #: ../AMC-gui-unrecognized.glade:14 msgid "Delete" msgstr "" #: ../AMC-gui-unrecognized.glade:29 msgid "Unrecognized scans" msgstr "" #: ../AMC-gui-unrecognized.glade:71 msgid "Scans list" msgstr "" #: ../AMC-gui-unrecognized.glade:237 msgid "Original scan" msgstr "" #: ../AMC-gui-unrecognized.glade:266 msgid "Preprocessed" msgstr "" #: ../AMC-perl/AMC/Gui/Association.glade:14 msgid "Manual association" msgstr "" #. This is the label of the check button that controls wheter the auto-completion for students names will be made looking at the beginnig of the names or at the whole names. #: ../AMC-perl/AMC/Gui/Association.glade:84 msgid "beginning" msgstr "" #: ../AMC-perl/AMC/Gui/Association.glade:89 msgid "Is auto-completion looking at the beginning of the names only?" msgstr "" #: ../AMC-perl/AMC/Gui/Association.glade:157 msgid "Show all" msgstr "" #: ../AMC-perl/AMC/Gui/Association.glade:361 msgid "associated" msgstr "" #: ../AMC-perl/AMC/Gui/Association.glade:366 msgid "Unticking this box, you see only non-associated papers. Tick it to be able to check already associated papers." msgstr "" #: ../AMC-perl/AMC/Gui/Association.glade:411 msgid "Remove manual association for this paper" msgstr "" #: ../AMC-perl/AMC/Gui/Association.glade:427 msgid "Tell the system that this papers does not correspond to any of the students from the list." msgstr "" #: ../AMC-perl/AMC/Gui/Association.glade:449 msgid "Unknown" msgstr "" #: ../AMC-perl/AMC/Gui/Association.glade:509 msgid "Save associations." msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.glade:18 msgid "Paper data capture" msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.glade:39 ../AMC-perl/AMC/Gui/Manuel.glade:236 msgid "Go to:" msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.glade:51 ../AMC-perl/AMC/Gui/Manuel.glade:248 msgid "Enter paper number, or page number like 102/4 (page 4 from paper 102), then press enter." msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.glade:82 msgid "Go to the previous page." msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.glade:100 msgid "Quit" msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.glade:118 msgid "Go to next page." msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.glade:282 msgid "Save this page modifications, then go to the previous page." msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.glade:296 msgid "Choose if you want to navigate through all pages, through pages with invalid answers, or through pages with invalid or empty answers." msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.glade:318 msgid "Save this page modifications, then go to next page." msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.glade:344 msgid "Focus on question:" msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.glade:429 msgid "Remove manual modifications for this page. Automatic data capture for this page, if any, won't be changed." msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.glade:458 msgid "Cancel modifications for this page" msgstr "" #: ../AMC-perl/AMC/Gui/Manuel.glade:476 msgid "Save and quit" msgstr "" #: ../AMC-perl/AMC/Gui/Zooms.glade:135 msgid "Unchecked boxes" msgstr "" #: ../AMC-perl/AMC/Gui/Zooms.glade:203 msgid "Checked boxes" msgstr "" #: ../AMC-perl/AMC/Gui/Zooms.glade:281 msgid "Toggle mode. With 'click', left-click to toggle and right-click to toggle a group." msgstr "" auto-multiple-choice-1.4.0/I18N/lang/000077500000000000000000000000001341176102400171445ustar00rootroot00000000000000auto-multiple-choice-1.4.0/I18N/lang/ar.po000066400000000000000000004671121341176102400201210ustar00rootroot00000000000000# Auto Multiple Choice # Copyright 2008-2017 Alexis Bienvenüe # This file is distributed under the same license as the AMC software # Translators: # Hatim alahmadi , 2011 msgid "" msgstr "" "Project-Id-Version: Auto Multiple Choice\n" "Report-Msgid-Bugs-To: paamc@passoire.fr\n" "POT-Creation-Date: 2018-04-04 22:01 +0200\n" "PO-Revision-Date: 2016-12-25 12:18+0300\n" "Last-Translator: Alexis Bienvenüe \n" "Language-Team: Hatim Alahmadi \n" "Language: ar\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" "X-Generator: Poedit 1.8.11\n" #. TRANSLATORS: directory name for projects. This directory will be created (if needed) in the home directory of the user. Please use only alphanumeric characters, and - or _. No accentuated characters. #: ../AMC-annotate.pl:158 ../AMC-perl/AMC/Config.pm:247 #: ../AMC-perl/AMC/Config.pm:248 msgid "MC-Projects" msgstr "MC-Projects" #: ../AMC-getimages.pl:213 msgid "Splitting multi-page PDF files..." msgstr "تقسيم صفحات بي دي اف المتعددة ..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be converted. #: ../AMC-getimages.pl:390 #, perl-format msgid "Converting %s to bitmap..." msgstr "تحويل %s إلى صورة رقمية..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be splitted to several images (one per page). #: ../AMC-getimages.pl:393 #, perl-format msgid "Splitting multi-page image %s..." msgstr "تقسيم الصورة المتعددة %s..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be splitted to several images (one per page). #: ../AMC-getimages.pl:396 #, perl-format msgid "Processing image %s..." msgstr "معالجة الصورة %s..." #: ../AMC-getimages.pl:469 msgid "Copying scans to project directory..." msgstr "نسخ الأوراق الممسوحة لمجلد المشروع..." #: ../AMC-gui.pl:249 msgid "None of the perl modules Graphics::Magick and Image::Magick are installed: AMC won't work properly!" msgstr "بدون تركيب وحدات بيرل Graphics::Magick و Image::Magick : ا م سي سوف لن يعمل كما ينبغي!" #: ../AMC-gui.pl:280 msgid "" "The package auto-multiple-choice-common is installed, but not auto-multiple-choice.\n" "AMC won't work properly until you install auto-multiple-choice package!" msgstr "" "تم تركيب الحزمة auto-multiple-choice-common , لكن ليس auto-multiple-choice.\n" "آمسي لن يعمل بشكل صحيح قبل تركيب الحزمة auto-multiple-choice package!" #: ../AMC-gui.pl:298 #, perl-format msgid "There is too little space left in the temporary disk directory (%s). Please clean this directory and try again." msgstr "" #: ../AMC-gui.pl:317 msgid "Several dialogs try to help you be at ease handling AMC." msgstr "عدة نوافذ تساعد على سهولة التعامل مع برنامج أمسي." #: ../AMC-gui.pl:319 #, perl-format msgid "Unless you tick the \"%s\" box, they are shown only once." msgstr "إلا اذا وضعت علامة \"%s\" , فإنها تظهر مرة واحدة." #: ../AMC-gui.pl:321 ../AMC-gui.pl:605 msgid "Show this message again next time" msgstr "عرض هذه الرسالة مرة أخرى في وقت آخر" #: ../AMC-gui.pl:323 msgid "Do you want to forgot which dialogs you have already seen and ask to show all of them next time they should appear ?" msgstr "هل تود عرض هذه النافذة مرة أخرى؟" #: ../AMC-gui.pl:357 #, fuzzy msgid "Please install libnotify to make desktop notifications available." msgstr "فضلا ركب حزمة بيرل Gtk2::Notify لجعل إخطارات سطح المكتب متاحة." #. TRANSLATORS: Message when switching to debugging mode. #: ../AMC-gui.pl:552 msgid "Debugging mode." msgstr "نظام تتبع الاخطاء." #. TRANSLATORS: Message when switching to debugging mode. %s will be replaced with the path of the log file. #: ../AMC-gui.pl:554 #, perl-format msgid "Debugging informations will be written in file %s." msgstr "معلومات تتبع الأخطاء سيتم كتابتها في الملف %s ." #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:583 ../AMC-gui-main_window.glade:3131 msgid "French" msgstr "الفرنسية" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:585 ../AMC-gui-main_window.glade:3145 msgid "English" msgstr "الانجليزية" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:587 ../AMC-gui-main_window.glade:3159 msgid "Japanese" msgstr "لغة يابانية" #. TRANSLATORS: This is the title of the column containing student/copy identifier in the table showing the results of data captures. #: ../AMC-gui.pl:703 msgid "identifier" msgstr "المعرف" #. TRANSLATORS: This is the title of the column containing data capture date/time in the table showing the results of data captures. #: ../AMC-gui.pl:712 msgid "updated" msgstr "التحديث" #. TRANSLATORS: This is the title of the column containing Mean Square Error Distance (some kind of mean distance between the location of the four corner marks on the scan and the location where they should be if the scan was not distorted at all) in the table showing the results of data captures. #: ../AMC-gui.pl:720 ../AMC-gui.pl:4992 ../AMC-perl/AMC/Gui/Manuel.pm:192 #: ../AMC-gui-main_window.glade:136 msgid "MSE" msgstr "نسبة الخطأ" #. TRANSLATORS: This is the title of the column containing so-called "sensitivity" (an indicator telling the user if the darkness ratio of some boxes on the page are very near the threshold. A great value tells that some darkness ratios are very near the threshold, so that the capture is very sensitive to the threshold. A small value is a good thing) in the table showing the results of data captures. #: ../AMC-gui.pl:729 ../AMC-gui.pl:4994 ../AMC-perl/AMC/Gui/Manuel.pm:200 msgid "sensitivity" msgstr "الحساسية" #: ../AMC-gui.pl:737 #, fuzzy msgid "scan file" msgstr "%s ملفات" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:766 ../AMC-gui.pl:784 msgid "Western Europe" msgstr "غرب اوروبا" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:768 ../AMC-gui.pl:786 msgid "Central Europe" msgstr "وسط اوروبا" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:770 msgid "Southern Europe" msgstr "جنوب اوروبا" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:772 msgid "Northern Europe" msgstr "شمال اوروبا" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:774 msgid "Cyrillic" msgstr "السيريالية" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:776 msgid "Turkish" msgstr "التركية" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:778 msgid "Northern" msgstr "الشمالية" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:780 msgid "Unicode" msgstr "يونيكود" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:804 ../AMC-gui.pl:3338 msgid "(none) [No primary key found in association list]" msgstr "(لا شئ) [لا يوجد مفتاح رئيسي في قائمة الربط]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:806 ../AMC-gui.pl:3976 msgid "(none) [No code found in LaTeX file]" msgstr "(لا شئ) [لا يوجد كود في ملف لتيك]" #. TRANSLATORS: One of the printing methods: use a command (This is not the command name itself). This is a menu entry. #: ../AMC-gui.pl:835 msgid "command" msgstr "الامر" #. TRANSLATORS: One of the printing methods: print to files. This is a menu entry. #: ../AMC-gui.pl:837 msgid "to files" msgstr "إلى ملف" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:841 msgid "floor" msgstr "للأدنى" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:843 msgid "rounding" msgstr "للأقرب" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:845 msgid "ceiling" msgstr "للأعلى" #. TRANSLATORS: One option for decimal point: use a comma. This is a menu entry #: ../AMC-gui.pl:849 msgid ", (comma)" msgstr ", (فاصلة)" #. TRANSLATORS: One option for decimal point: use a point. This is a menu entry. #: ../AMC-gui.pl:851 msgid ". (dot)" msgstr ". (نقطة)" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:856 msgid "one sided [No two-sided printing]" msgstr "وجه واحد" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:858 msgid "long edge" msgstr "حافة طويلة" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:860 msgid "short edge" msgstr "حافة قصيرة" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:864 msgid "(none) [No transitional image type (direct processing)]" msgstr "(لا شئ) [لا يوجد نوع للصورة (المعالجة المباشرة)]" #. TRANSLATORS: One of the actions that can be done after exporting the marks. Here, do nothing more. This is a menu entry. #: ../AMC-gui.pl:872 msgid "that's all" msgstr "هذا كل شئ" #. TRANSLATORS: One of the actions that can be done after exporting the marks. Here, open the exported file. This is a menu entry. #: ../AMC-gui.pl:874 msgid "open the file" msgstr "فتح الملف" #. TRANSLATORS: One of the actions that can be done after exporting the marks. Here, open the directory where the file is. This is a menu entry. #: ../AMC-gui.pl:876 msgid "open the directory" msgstr "فتح المسار" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:879 msgid "(none) [No annotation position (do not write anything)]" msgstr "(لا شئ) [لا يوجد موقع للرصد (لا تكتب شئ)]" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: in one margin. This is a menu entry. #: ../AMC-gui.pl:881 msgid "in one margin" msgstr "في هامش واحد" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: in one of the two margins. This is a menu entry. #: ../AMC-gui.pl:883 msgid "in the margins" msgstr "في الهوامش" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: near the boxes. This is a menu entry. #: ../AMC-gui.pl:885 msgid "near boxes" msgstr "بجوار المربعات" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: in the zones defined in the source file #: ../AMC-gui.pl:887 msgid "where defined in the source" msgstr "أين يحدد في المصدر" #. TRANSLATORS: One of the possible sorting criteria for students in the exported spreadsheet with scores: the student name. This is a menu entry. #. TRANSLATORS: This is the title of a column containing students names in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:890 ../AMC-gui.pl:6357 msgid "name" msgstr "الاسم" #. TRANSLATORS: One of the possible sorting criteria for students in the exported spreadsheet with scores: the student sheet number. This is a menu entry. #: ../AMC-gui.pl:892 msgid "exam copy number" msgstr "رقم نسخة الاختبار" #. TRANSLATORS: One of the possible sorting criteria for students in the exported spreadsheet with scores: the line where one can find this student in the students list file. This is a menu entry. #: ../AMC-gui.pl:894 msgid "line in students list" msgstr "الخط في قائمة الطلاب" #. TRANSLATORS: you can omit the [...] part, just here to explain context #. One of the possible sorting criteria for students in the exported spreadsheet with scores: the student mark. This is a menu entry. #: ../AMC-gui.pl:897 msgid "mark [student mark, for sorting]" msgstr "الدرجة [درجة الطالب, للفرز]" #. TRANSLATORS: One of the possible way to group annotated answer sheets together to PDF files: make one PDF file per student, with all his pages. This is a menu entry. #: ../AMC-gui.pl:902 msgid "One file per student" msgstr "ملف لكل طالب" #. TRANSLATORS: One of the possible way to group annotated answer sheets together to PDF files: make only one PDF with all students sheets. This is a menu entry. #: ../AMC-gui.pl:904 msgid "One file for all students" msgstr "ملف واحد لكل الطلاب" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we only select pages where the student has written something (in separate answer sheet mode, these are the pages from the answer sheet and not the pages from the subject). #: ../AMC-gui.pl:907 msgid "Only pages with answers" msgstr "الصفحات مع الإجابات فقط" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we take the pages were the students has nothing to write (often question pages from a subject with separate answer sheet option) from the subject. #: ../AMC-gui.pl:909 msgid "Question pages from subject" msgstr "صفحات الأسئلة من المادة" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we take the pages were the students has nothing to write (often question pages from a subject with separate answer sheet option) from the correction. #: ../AMC-gui.pl:911 msgid "Question pages from correction" msgstr "صفحات الأسئلة من التصحيح" #: ../AMC-gui.pl:914 msgid "All students" msgstr "كل الطلاب" #: ../AMC-gui.pl:916 msgid "Selected students" msgstr "اختيار الطلاب" #: ../AMC-gui.pl:918 msgid "Please select..." msgstr "فضلا اختر..." #. TRANSLATORS: One of the ways exam was made: each student has a different answer sheet with a different copy number - no photocopy was made. This is a menu entry. #. TRANSLATORS: This is a title for the AMC mode where the distributed exam papers are all different (different paper numbers at the top) -- photocopy is not used. #: ../AMC-gui.pl:920 ../AMC-gui.pl:2981 msgid "Different answer sheets" msgstr "نموذج إجابة مختلف" #. TRANSLATORS: One of the ways exam was made: some students have the same exam subject, as some photocopies were made before distributing the subjects. This is a menu entry. #. TRANSLATORS: This is a title for the AMC mode where some answer sheets have been photocopied before being distributed to the students. #: ../AMC-gui.pl:922 ../AMC-gui.pl:2986 msgid "Some answer sheets were photocopied" msgstr "بعض أوراق الإجابة عبارة عن صور" #. TRANSLATORS: One of the ways to send mail: use sendmail command. This is a menu entry. #: ../AMC-gui.pl:924 msgid "sendmail" msgstr "خادم البريد" #. TRANSLATORS: One of the ways to send mail: use a SMTP server. This is a menu entry. #: ../AMC-gui.pl:926 msgid "SMTP" msgstr "SMTP" #: ../AMC-gui.pl:927 msgid "None [SMTP security]" msgstr "" #: ../AMC-gui.pl:936 msgid "Standard" msgstr "قياسي" #: ../AMC-gui.pl:938 msgid "Separate answer sheet" msgstr "ورقة إجابة مستقلة" #: ../AMC-gui.pl:940 ../AMC-gui.pl:2683 ../AMC-gui.pl:2701 msgid "Answer sheet first" msgstr "ورقة الإجابة أولا" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. #: ../AMC-gui.pl:944 msgid "nothing" msgstr "لا شئ" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. #: ../AMC-gui.pl:946 msgid "circle" msgstr "دائرة" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. Here, a cross. #: ../AMC-gui.pl:948 msgid "mark" msgstr "ضرب" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. Here, the box outline. #: ../AMC-gui.pl:950 msgid "box" msgstr "مربع" #: ../AMC-gui.pl:1045 #, perl-format msgid "Exporting to '%s' needs some perl modules that are not installed: %s. Please install these modules or switch to another export format." msgstr "للتصدير إلى الصيغة '%s' يجب وجود بعض إضافات بيرل غير المركبة: %s. فضلا ركب هذه الإضافات أو اختر صيغة أخرى." #: ../AMC-gui.pl:1068 msgid "When referring to a particular answer in the export, the letter used will be the one found in the catalog. However, the catalog has not yet been built. Do you want to build it now?" msgstr "" #: ../AMC-gui.pl:1104 msgid "Exporting marks..." msgstr "تصدير النقاط..." #: ../AMC-gui.pl:1143 #, perl-format msgid "Export to %s did not work: file not created..." msgstr "التصدير إلى الصيغة %s لا يعمل: لم ينشأ الملف..." #. TRANSLATORS: One of the popup menu that appears when right-clicking on a page in the data capture diagnosis table. Choosing this entry, an image will be opened to see where the corner marks were detected. #: ../AMC-gui.pl:1152 ../AMC-gui.pl:4996 msgid "page adjustment" msgstr "تخطيط الصفحة" #. TRANSLATORS: One of the popup menu that appears when right-clicking on a page in the data capture diagnosis table. Choosing this entry, a window will be opened were the user can see all boxes on the scans and how they were filled by the students, and correct detection of ticked-or-not if needed. #: ../AMC-gui.pl:1154 ../AMC-gui.pl:4996 msgid "boxes zooms" msgstr "تكبير المربعات" #: ../AMC-gui.pl:1225 #, perl-format msgid "You requested to delete all data capture results for %d page(s)" msgstr "طلبت حذف جميع نتائج البيانات المقروءة من الأوراق %d" #: ../AMC-gui.pl:1226 msgid "All data and image files related to these pages will be deleted." msgstr "جميع البيانات والصور المرتبطة بهذه الأوراق تم حذفها." #: ../AMC-gui.pl:1227 msgid "Do you really want to continue?" msgstr "هل تريد حقيقة الاستمرار؟" #: ../AMC-gui.pl:1405 #, perl-format msgid "Following command could not be run: %s, perhaps due to a poor configuration?" msgstr "لم يتم تنفيذ الأمر التالي: %s , ربما لأن إعداداته غير كاملة." #: ../AMC-gui.pl:1450 #, perl-format msgid "Current directory: %s" msgstr "المسار الحالي: %s" #: ../AMC-gui.pl:1509 msgid "Existing projects:" msgstr "المشاريع القائمة:" #. TRANSLATORS: Window title when creating a new project. #: ../AMC-gui.pl:1514 msgid "New AMC project" msgstr "مشروع آمسي جديد" #: ../AMC-gui.pl:1519 msgid "Projects management:" msgstr "ادارة المشاريع:" #: ../AMC-gui.pl:1520 msgid "Change project name:" msgstr "تعديل اسم المشروع:" #: ../AMC-gui.pl:1525 msgid "Back" msgstr "عودة" #. TRANSLATORS: Window title when managing projects. #: ../AMC-gui.pl:1528 msgid "AMC projects management" msgstr "إدارة مشاريع آمسي:" #: ../AMC-gui.pl:1550 #, perl-format msgid "You don't have any MC project in directory %s!" msgstr "لا توجد مشاريع اختبارات في المجلد %s!" #: ../AMC-gui.pl:1559 ../AMC-gui-choix_projet.glade:260 msgid "Choose directory" msgstr "اختر المسار" #: ../AMC-gui.pl:1604 #, perl-format msgid "You can't change project %s since it's open." msgstr "لا تستطيع تغيير المشروع %s اثناء فتحه." #: ../AMC-gui.pl:1626 #, perl-format msgid "This will clone project %s to a new project %s." msgstr "هذه نسخة المشروع %s لمشروع جديد %s." #. TRANSLATORS: Message when you want to create an AMC project with name xxx, but there already exists a directory in the projects directory with this name! #: ../AMC-gui.pl:1697 #, perl-format msgid "Directory %s already exists, so you can't choose this name." msgstr "المجلد %s موجود مسبقا, فضلا اختر اسم آخر." #: ../AMC-gui.pl:1743 msgid "Destination project directory already exists" msgstr "مسار المشروع موجود مسبقا" #: ../AMC-gui.pl:1755 msgid "Copying project..." msgstr "نسخ المشروع..." #: ../AMC-gui.pl:1780 msgid "Your project has been copied" msgstr "تم نسخ مشروعك" #: ../AMC-gui.pl:1781 #, perl-format msgid "(%d files out of %d)" msgstr "(%d ملفات من %d)" #: ../AMC-gui.pl:1788 msgid "Source project directory not found" msgstr "مسار مصدر المشروع غير موجود" #: ../AMC-gui.pl:1796 #, perl-format msgid "An error occuried during project copy: %s." msgstr "خطأ في التحديث أثناء نسخ المشروع: %s ." #: ../AMC-gui.pl:1817 #, perl-format msgid "You asked to remove project %s." msgstr "هل ترغب بحذف المشروع %s." #: ../AMC-gui.pl:1818 msgid "This will permanently erase all the files of this project, including the source file as well as all the files you put in the directory of this project, as the scans for example." msgstr "هذا سيمحو جميع ملفات المشروع بشكل دائم، بما في ذلك الملف المصدري و جميع الملفات التي وضعت في دليل هذا المشروع، الملفات الممسوحة بالسكنر على سبيل المثال." #: ../AMC-gui.pl:1819 msgid "Is this really what you want?" msgstr "هل هذا ما تريد؟" #: ../AMC-gui.pl:1876 #, perl-format msgid "You selected directory %s as a project to open." msgstr "اخترت المجلد %s كمشروع." #: ../AMC-gui.pl:1877 msgid "However, this directory does not seem to contain a project. Do you still want to try?" msgstr "ومع ذلك، هذا المسار لا يبدو أنه يحتوي على المشروع. هل ما زلت تريد أن تحاول؟" #: ../AMC-gui.pl:1894 #, perl-format msgid "You selected project %s from directory %s." msgstr "اخترت المشروع %s من المسار %s." #: ../AMC-gui.pl:1895 msgid "Do you want to copy this project to your projects directory before opening it?" msgstr "هل ترغب بحفظ هذا المشروع في مسار المشروعات قبل فتحه؟" #: ../AMC-gui.pl:1965 #, perl-format msgid "The name %s is already used in the projects directory." msgstr "الاسم %s مستخدم لمشروع في مجلد الاختبارات." #: ../AMC-gui.pl:1966 msgid "You must choose another name to create a project." msgstr "يجب عليك اختيار اسم آخر لإنشاء المشروع." #: ../AMC-gui.pl:2005 msgid "LaTeX packages:" msgstr "حزم لتيك:" #: ../AMC-gui.pl:2006 msgid "Commands:" msgstr "الأوامر:" #: ../AMC-gui.pl:2007 msgid "Fonts:" msgstr "الخطوط:" #: ../AMC-gui.pl:2022 msgid "Your AMC version and LaTeX style file version differ. Even if the documents are properly generated, this can lead to many problems using AMC.\n" msgstr "" #: ../AMC-gui.pl:2023 msgid "Please check your installation to get matching AMC and LaTeX style file versions.\n" msgstr "" #: ../AMC-gui.pl:2024 #, perl-format msgid "" "AMC version: %s\n" "sty version: %s\n" "sty path: %s" msgstr "" #: ../AMC-gui.pl:2052 msgid "Documents update..." msgstr "تحديث المستندات..." #: ../AMC-gui.pl:2076 msgid "Problems while preparing documents" msgstr "خطأ أثناء إعداد المستند" #: ../AMC-gui.pl:2078 msgid "Problems while processing the source file." msgstr "خطأ في معالجة الملف المصدري." #: ../AMC-gui.pl:2081 msgid "You have to correct the source file and re-run documents update." msgstr "يجب عليك تصحيح الكود المصدري ثم إعادة تحديث المستند." #: ../AMC-gui.pl:2085 msgid "Errors" msgstr "خطأ" #: ../AMC-gui.pl:2086 msgid "Only first ten errors written" msgstr "كتابة اول عشرة أخطاء فقط" #: ../AMC-gui.pl:2089 msgid "Warnings" msgstr "تحذير" #: ../AMC-gui.pl:2090 msgid "Only first ten warnings written" msgstr "كتابة أول عشرة أخطاء فقط" #. TRANSLATORS: Here, %s will be replaced with the translation of "Command output details", and refers to the small expandable part at the bottom of AMC main window, where one can see the output of the commands lauched by AMC. #: ../AMC-gui.pl:2095 #, perl-format msgid "See also the processing log in '%s' below." msgstr "انظر سجل المعالجة في الأسفل '%s' ." #. TRANSLATORS: Title of the small expandable part at the bottom of AMC main window, where one can see the output of the commands lauched by AMC. #: ../AMC-gui.pl:2097 ../AMC-gui-main_window.glade:2570 msgid "Command output details" msgstr "أوامر تفاصيل المخرجات" #: ../AMC-gui.pl:2098 msgid "Use LaTeX editor or latex command for a precise diagnosis." msgstr "استخدام محرر لتيك أو أوامر لتيك للتشخيص الدقيق." #: ../AMC-gui.pl:2113 msgid "Documents have been prepared" msgstr "تم إعداد الوثائق" #: ../AMC-gui.pl:2143 msgid "Working documents successfully generated." msgstr "تم انتاج المستندات." #. TRANSLATORS: Here, "them" refers to the working documents. #: ../AMC-gui.pl:2145 msgid "You can take a look at them double-clicking on the list." msgstr "يمكنك إلقاء نظرة عليها بالنقر المزدوج على القائمة." #. TRANSLATORS: Here, "they" refers to the working documents. #: ../AMC-gui.pl:2147 msgid "If they are correct, proceed to layouts detection..." msgstr "إذا كانت صحيح, انتقل إلى فحص التصميم..." #: ../AMC-gui.pl:2169 msgid "Your question has a separate answers sheet." msgstr "إجابة السؤال في صفحة الأجوبة المنفصلة." #: ../AMC-gui.pl:2170 msgid "In this case, letters are shown inside boxes." msgstr "في هذه الحالة, سيتم عرض الحروف داخل المربعات." #: ../AMC-gui.pl:2171 msgid "Your question is set to present labels inside the boxes to be ticked." msgstr "سؤالك معين بحيث تعلّم المربعات عند الإجابة." #. TRANSLATORS: Here, %s will be replaced with the translation of "darkness threshold". #: ../AMC-gui.pl:2174 #, perl-format msgid "For better ticking detection, ask students to fill out completely boxes, and choose parameter \"%s\" around 0.5 for this project." msgstr "لأفضل نتيجة اطلب من طلابك تظليل المربعات بالكامل, واجعل قيمة \"%s\" حول 0.5 لهذا المشروع." #: ../AMC-gui.pl:2175 #, perl-format msgid "At the moment, this parameter is set to %.02f." msgstr "في الوقت الحالي, هذه القيمة تساوي %.02f." #: ../AMC-gui.pl:2176 msgid "Would you like to set it to 0.5?" msgstr "هل ترغب بجعلها 0.5 ؟" #. TRANSLATORS: This parameter is the ratio of dark pixels number over total pixels number inside box above which a box is considered to be ticked. #: ../AMC-gui.pl:2178 msgid "darkness threshold" msgstr "عتبة الإظلام" #: ../AMC-gui.pl:2199 msgid "Papers analysis was already made on the basis of the current working documents." msgstr "تم تحليل الأوراق على أساس المستند الحالي." #: ../AMC-gui.pl:2200 msgid "You already made the examination on the basis of these documents." msgstr "لقد قمت بالفعل بإنتاج الاختبار على أساس المستند الحالي." #: ../AMC-gui.pl:2201 msgid "If you modify working documents, you will not be capable any more of analyzing the papers you have already distributed!" msgstr "إذا قمت بتعديل المستند, فلن تكون قادراً على تحليل أوراق الاختبار التي تم طبعتها سابقا." #: ../AMC-gui.pl:2202 ../AMC-gui.pl:2229 msgid "Do you wish to continue?" msgstr "هل ترغب بالاستمرار؟" #: ../AMC-gui.pl:2203 ../AMC-gui.pl:2230 msgid "Click on OK to erase the former layouts and update working documents, or on Cancel to cancel this operation." msgstr "انقر على موافق لمحو تصميم المستند وإعادة تحديثه, أو على زر إلغاء لإلغاء هذه العملية." #: ../AMC-gui.pl:2204 ../AMC-gui.pl:2231 msgid "To allow the use of an already printed question, cancel!" msgstr "والسماح باستخدام أوراق الاختبار التي سبق طباعتها!" #: ../AMC-gui.pl:2227 msgid "Layouts are already calculated for the current documents." msgstr "تم تنفيذ التصميم للمستند الحالي." #: ../AMC-gui.pl:2228 msgid "Updating working documents, the layouts will become obsolete and will thus be erased." msgstr "لتحديث المستند الحالي, التصميمات القديمة سوف تمحى." #: ../AMC-gui.pl:2258 #, perl-format msgid "To handle properly %s files, AMC needs the following components, that are currently missing:" msgstr "للتعامل بشكل صحيح مع الملفات %s , يحتاج آمسي لبعض المكونات, وهي حاليا مفقودة:" #: ../AMC-gui.pl:2270 msgid "Install these components on your system and try again." msgstr "ثبت هذه المكونات على النظام الخاص بك وحاول مرة أخرى." #. TRANSLATORS: Message when the user required printing the question paper, but it is not present (probably the working documents have not been properly generated). #: ../AMC-gui.pl:2405 msgid "You don't have any question to print: please check your source file and update working documents first." msgstr "لا توجد أسئلة لطباعتها: فضلا افحص الملف المصدري و حدّث المستندات أولا." #. TRANSLATORS: Message when AMC does not know about the subject pages that has been generated. Usualy this means that the layout computation step has not been made. #: ../AMC-gui.pl:2422 msgid "Question's pages are not detected." msgstr "لم يتم فحص أوراق الأسئلة." #: ../AMC-gui.pl:2423 msgid "Perhaps you forgot to compute layouts?" msgstr "ربما نسيت تنفيذ التصميم؟" #: ../AMC-gui.pl:2445 #, perl-format msgid "You chose the printing method '%s' but it is not available (%s). Please install the missing dependencies or switch to another printing method." msgstr "لقد اخترت جهاز الطباعة '%s' لكنها غير معدّة (%s). فضلا قم بإعدادها أو اختر طابعة أخرى." #: ../AMC-gui.pl:2466 msgid "You chose a printing method using CUPS but there are no configured printer in CUPS. Please configure some printer or switch to another printing method." msgstr "لقد اخترت جهاز طباعة يستخدم CUPS لكن لم يتم تكوين طابعة في CUPS . فضلا كون إعدادات الطابعة أو استخدم طابعة أخرى." #. TRANSLATORS: This is the title of the column containing the paper's numbers (1,2,3,...) in the table showing all available papers, from which the user will choose those he wants to print. #: ../AMC-gui.pl:2533 msgid "papers" msgstr "الاوراق" #: ../AMC-gui.pl:2622 msgid "You did not select any exam to print..." msgstr "لم يتم اختيار اختبار لطباعته..." #: ../AMC-gui.pl:2641 ../AMC-gui.pl:2657 msgid "You selected only a few sheets to print." msgstr "تم تحديد عدد قيل من الأوراق لطباعتها." #: ../AMC-gui.pl:2642 msgid "As students are requested to write on more than one page, you must create as many exam sheets as necessary for all your students, with different sheets numbers, and print them all." msgstr "عندما نريد من الطلاب أن يجيبوا على أكثر من صفحة واحدة ، يجب أن تكون كل ورقة برقم معرف مختلف، ثم يتم طباعتها كلها." #: ../AMC-gui.pl:2643 msgid "If you print one or several sheets and photocopy them to have enough for all the students, you won't be able to continue with AMC!" msgstr "لا يمكن طباعة ورقة واحدة ثم تصويرها بآلة التصوير لوجود معرف في أعلى كل ورقة, ولهذا فإن برنامج آمسي لن يتعرف عليها" #: ../AMC-gui.pl:2644 msgid "Do you want to print the selected sheets anyway?" msgstr "هل ترغب بطباعة الأوراق المحددة على أية حال؟" #: ../AMC-gui.pl:2658 msgid "Are you going to photocopy some printed subjects before giving them to the students?" msgstr "هل ستقوم بتصوير بعض أوراق الأسئلة قبل توزيعها على الطلاب؟" #: ../AMC-gui.pl:2659 msgid "If so, the corresponding option will be set for this project." msgstr "إذا كان الأمر كذلك، سيتم تعيين الخيار المقابل لهذا المشروع." #: ../AMC-gui.pl:2660 msgid "However, you will be able to change this when giving your first scans to AMC." msgstr "ومع ذلك، سوف تكون قادرة على تغيير هذا عند تنفيذ المسح لأول أوراق في AMC." #. TRANSLATORS: the two %s will be replaced by the translations of "Answer sheet first" and "Extracting method". #: ../AMC-gui.pl:2682 #, fuzzy, perl-format msgid "You selected the '%s' option, that uses '%s', so the %s has been set to '%s' for you." msgstr "لقد اخترت الخيار '%s' ، الذي يستخدم 'pdftk' ، لهذا %s تم إعداده ل 'pdftk' لك." #: ../AMC-gui.pl:2684 ../AMC-gui-edit_preferences.glade:902 msgid "Extracting method" msgstr "جهاز الخرج" #: ../AMC-gui.pl:2700 #, fuzzy, perl-format msgid "You selected the '%s' option, but this option needs 'qpdf' or 'pdftk' to be installed on your system. Please install one of these and try again." msgstr "لقد اخترت الخيار '%s' ، لكن هذا الخيار يحتاج تركيب 'pdftk' في نظامك، لفضلا قم بتركيبه ثم حاول مرة أخرى." #: ../AMC-gui.pl:2741 msgid "Print papers one by one..." msgstr "طباعة الاوراق ورقة ورقة..." #: ../AMC-gui.pl:2790 msgid "Working documents are in an old format, which is not supported anymore." msgstr "المستند مصمم بهيئة قديمة , والتي لم تعد مدعومة من البرنامج." #: ../AMC-gui.pl:2791 msgid "Please generate again the working documents!" msgstr "فضلا انتج المستند الحالي مرة أخرى!" #: ../AMC-gui.pl:2805 msgid "Detecting layouts..." msgstr "فحص التصميم..." #: ../AMC-gui.pl:2823 msgid "No layout detected." msgstr "لم يتم العثور على تصميم." #: ../AMC-gui.pl:2824 msgid "Don't go through the examination before fixing this problem, otherwise you won't be able to use AMC for correction." msgstr "لا تستمر في إعداد الاختبار قبل إصلاح المشكلة, لأن المشكلة ستعيق استخدام البرنامج في التصحيح." #: ../AMC-gui.pl:2830 msgid "Layouts are detected." msgstr "تم فحص التصميم." #: ../AMC-gui.pl:2831 #, perl-format msgid "You can check all is correct clicking on button %s and looking at question pages to see if red boxes are well positioned." msgstr "يمكنك التأكد بأن كل شيء صحيح بالنقر على زر %s وعرض صفحة الأسئلة وللتأكد من أن المربعات الحمراء في مكانها المطلوب." #: ../AMC-gui.pl:2831 ../AMC-gui-main_window.glade:560 msgid "Check layouts" msgstr "مشاهدة التصميم" #: ../AMC-gui.pl:2832 msgid "Then you can proceed to printing and to examination." msgstr "ثم يمكنك البدء بالطباعة وإجراء الاختبار." #: ../AMC-gui.pl:2905 msgid "No layout for this project." msgstr "لا يوجد تصميم لهذا المشروع." #. TRANSLATORS: Here, the first %s will be replaced with "Layout detection" (a button title), and the second %s with "Preparation" (the tab title where one can find this button). #: ../AMC-gui.pl:2907 #, perl-format msgid "Please use button %s in %s before manual data capture." msgstr "فضلا استخدم هذا الزر %s في %s قبل قراءة البيانات يدويا." #: ../AMC-gui.pl:2908 ../AMC-gui-main_window.glade:508 msgid "Layout detection" msgstr "فحص التصميم" #: ../AMC-gui.pl:2909 ../AMC-gui-main_window.glade:684 msgid "Preparation" msgstr "التجهيز" #: ../AMC-gui.pl:2947 #, perl-format msgid "Pre-allocate sheet ids from the page numbers, starting at %d" msgstr "إعادة تعيين معرفات أوراق الإجابة من أرقام الأوراق, البدء من %d" #: ../AMC-gui.pl:2978 msgid "Automatic data capture can be done in two different modes:" msgstr "يمكن قراءة البيانات آليا بطريقتين مختلفتين:" #: ../AMC-gui.pl:2983 msgid "In the most robust one, you give a different exam (with a different exam number) to every student. You must not photocopy subjects before distributing them." msgstr "من المهم, إعطاء ورقة مختلفة (في رقم تسلسلها) لكل طالب. يجب أن لا تقوم بتصوير أوراق الأسئلة قبل توزيعها." #: ../AMC-gui.pl:2988 msgid "In the second one (which can be used only if answer sheets to be scanned have one page per candidate) you can photocopy answer sheets and give the same subject to different students." msgstr "النقطة الثانية (في حالة كون نموذج الإجابة من ورقة واحدة) تستطيع تصوير نماذج الإجابة من ورقة واحدة وتوزيعها على الطلاب." #: ../AMC-gui.pl:2989 msgid "After the first automatic capture, you can't switch to the other mode." msgstr "بعد البدء بالقراءة الآلية لأول ورقة, ليس باستطاعتك التغيير للنظام الآخر." #: ../AMC-gui.pl:3163 msgid "Automatic data capture..." msgstr "قراءة البيانات آليا..." #: ../AMC-gui.pl:3174 msgid "Automatic data capture has been completed" msgstr "تمت قراءة البيانات آليا" #: ../AMC-gui.pl:3183 #, perl-format msgid "Some of the pages you submitted (%d of them) have already been processed before. Old data has been overwritten." msgstr "" #. TRANSLATORS: Names list file : (none) #: ../AMC-gui.pl:3271 msgid "(none)" msgstr "(لا شئ)" #: ../AMC-gui.pl:3292 #, perl-format msgid "Unsuitable names file: %d errors, first on line %d." msgstr "ملف الأسماء غير صالح: %d خطأ , بداية من السطر %d ." #. TRANSLATORS: Here, do not translate 'name' and 'surname' (except in french), as the column names in the students list file has to be named in english in order to be properly detected. #: ../AMC-gui.pl:3309 #, perl-format msgid "Found %d empty names in names file %s. Check that name or surname column is present, and always filled." msgstr "تم العثور على %d حقول أسماء فارغة في ملف الأسماء %s. تأكد من العمود الحالي لـ الاسم أو اللقب, واجعلها ممتلئه دائما." #: ../AMC-gui.pl:3310 ../AMC-gui.pl:3326 msgid "Edit the names file to correct it, and re-read." msgstr "حرر ملف الأسماء لتصحيحه, ثم أعد قراءته." #: ../AMC-gui.pl:3326 #, perl-format msgid "Found duplicate names: %s. Check that all names are different." msgstr "تم العثور على أسماء مكررة: %s. يجب أن تكون الأسماء مختلفة." #. TRANSLATORS: Here, %s will be replaced with the name of the tab "Data capture". #: ../AMC-gui.pl:3358 #, perl-format msgid "Before associating names to papers, you must choose a students list file in tab \"%s\"." msgstr "قبل ربط الأسماء بالأوراق , يجب اختيار ملف قائمة الأسماء من لسان التبويب \"%s\" ." #. One of the "notify the user at the end of the following actions" checkbox: for automatic data capture. #: ../AMC-gui.pl:3359 ../AMC-gui-edit_preferences.glade:1584 #: ../AMC-gui-main_window.glade:1286 msgid "Data capture" msgstr "قراءة البيانات" #: ../AMC-gui.pl:3368 msgid "Please choose a key from primary keys in students list before association." msgstr "فضلا حدد المفتاح الرئيسي في قائمة الطلاب قبل الربط." #: ../AMC-gui.pl:3377 #, fuzzy msgid "Please choose a code (made with LaTeX command \\AMCcodeGrid or equivalent) before automatic association." msgstr "فضلا اختر الكود (made with LaTeX command \\AMCcode) قبل الربط الآلي." #. TRANSLATORS: Here, %s will be replaced with "Students identification", which refers to a paragraph in the tab "Marking" from AMC main window. #: ../AMC-gui.pl:3422 #, perl-format msgid "Before associating names to papers, you must choose a students list file in paragraph \"%s\"." msgstr "قبل ربط الاسماء بالاوراق يجب اختيار ملف قائمة الطلاب في \"%s\"." #: ../AMC-gui.pl:3423 msgid "Students identification" msgstr "معرفات الطلاب" #: ../AMC-gui.pl:3446 msgid "Automatic association..." msgstr "الربط لآلي..." #: ../AMC-gui.pl:3468 #, perl-format msgid "Automatic association completed: %d students recognized." msgstr "انجز الربط الآلي: %d طالب تم التعرف عليه." #. TRANSLATORS: Here %s and %s will be replaced with two parameters names: "Primary key from this list" and "Code name for automatic association". #: ../AMC-gui.pl:3470 #, perl-format msgid "Please check \"%s\" and \"%s\" values and try again." msgstr "فضلا افحص القيمة \"%s\" و \"%s\" ثم اعد المحاولة." #: ../AMC-gui.pl:3471 msgid "Primary key from this list" msgstr "المفتاح الأساسي من هذه القائمة:" #: ../AMC-gui.pl:3472 msgid "Code name for automatic association" msgstr "اسم كود ربط أوراق الإجابة بالطلاب آليا" #: ../AMC-gui.pl:3478 msgid "Automatic association is now finished. You can ask for manual association to check that all is fine and, if necessary, read manually students names which have not been automatically identified." msgstr "تم إتمام الربط الآلي. تستطيع استخدام الربط اليدوي للتأكد من صحة الربط, وإذا كان ذلك ضروريا, اقرأ أسماء الطلاب الذين ليس لهم معرفات." #: ../AMC-gui.pl:3640 #, perl-format msgid "Some manual association data has be found, which will be lost if the primary key is changed. Do you want to switch back to the primary key \"%s\" and keep association data?" msgstr "بعض بيانات الربط اليدوي سيتم فقدها، اذا تم تغيير المفتاح الاساسي. هل تريد العودة لمفتاح الربط \"%s\" ثم حفظ؟" #: ../AMC-gui.pl:3666 #, perl-format msgid "The primary key from the students list has been set to \"%s\", which is not the value from the association data." msgstr "المفتاح الاساسي في قائمة الطلاب \"%s\" ، غير موجود في بيانات الربط." #: ../AMC-gui.pl:3667 msgid "Automatic papers/students association will be re-run to update the association data." msgstr "الربط الآلي للاوراق/الطلاب سيعاد لتحديث بيانات الربط." #: ../AMC-gui.pl:3693 #, perl-format msgid "Papers are not yet corrected: use button \"%s\"." msgstr "لم يتم تصحيح الأوراق: استخدم الزر \"%s\" ." #. TRANSLATORS: This is a button: "Mark" is here an action to be called by the user. When clicking this button, the user requests scores to be computed for all students. #: ../AMC-gui.pl:3695 ../AMC-gui-main_window.glade:1363 msgid "Mark" msgstr "التصحيح" #: ../AMC-gui.pl:3736 msgid "Extracting marking scale..." msgstr "استخراج مقياس الدرجات..." #: ../AMC-gui.pl:3940 msgid "Computing marks..." msgstr "حساب النقاط..." #: ../AMC-gui.pl:3945 msgid "Grading has been completed" msgstr "تم حساب الدرجات" #. TRANSLATORS: This is the marks mean for all students. #: ../AMC-gui.pl:3961 #, perl-format msgid "Mean: %.2f" msgstr "المتوسط: %.2f" #: ../AMC-gui.pl:3964 msgid "No marks computed" msgstr "لم يتم احتساب نقاط" #: ../AMC-gui.pl:3983 msgid "Pre-association" msgstr "اعادة الربط" #: ../AMC-gui.pl:3997 msgid "No students list file" msgstr "ملف قائمة الطلاب غير موجود" #: ../AMC-gui.pl:3999 msgid "No primary key from students list file" msgstr "لا يوجد مفتاح الأساسي في ملف قائمة الطلاب" #: ../AMC-gui.pl:4005 #, perl-format msgid "Missing identification for %d answer sheets" msgstr "فقد معرفات أوراق الإجابة %d " #: ../AMC-gui.pl:4007 msgid "All completed answer sheets are associated with a student name" msgstr "جميع أوراق الإجابة تم ربطها بأسماء الطلاب" #: ../AMC-gui.pl:4061 msgid "exam ID" msgstr "معرف الاختبار" #: ../AMC-gui.pl:4076 msgid "student" msgstr "الطالب" #. TRANSLATORS: File name for single annotated answer sheets with only some selected students. Please use simple characters. #: ../AMC-gui.pl:4207 msgid "Selected_students" msgstr "كل الطلاب" #. TRANSLATORS: File name for single annotated answer sheets with all students. Please use simple characters. #: ../AMC-gui.pl:4209 msgid "All_students" msgstr "كل_الطلاب" #: ../AMC-gui.pl:4257 msgid "Annotating papers..." msgstr "الرصد على الاوراق..." #: ../AMC-gui.pl:4261 msgid "Annotations have been completed" msgstr "تم الرصد" #: ../AMC-gui.pl:4375 #, perl-format msgid "Project \"%s\" preferences" msgstr "تفضيلات مشروع \"%s\" " #: ../AMC-gui.pl:4378 msgid "Project preferences" msgstr "تفضيلات المشروع" #: ../AMC-gui.pl:4484 #, perl-format msgid "You modified \"%s\" value, which is the default value used when creating new projects. Do you want to change also \"%s\" for the opened %s project?" msgstr "لقد عدلت \"%s\" , والتي تمثل الخيار الافتراضي لإنشاء مشروع جديد. هل تريد أيضا تغيير \"%s\" لفتح المشروع %s ؟" #: ../AMC-gui.pl:4600 msgid "Working documents are not readable" msgstr "المستند الحالي غير قابل للقراءة" #: ../AMC-gui.pl:4603 msgid "No working documents" msgstr "لا يوجد مستند للعمل" #: ../AMC-gui.pl:4606 msgid "Working documents last update:" msgstr "آخر تحديث للمستند الحالي:" #: ../AMC-gui.pl:4662 msgid "No layout" msgstr "لا يوجد تصميم" #: ../AMC-gui.pl:4665 #, perl-format msgid "Processed %d pages" msgstr "الصفحات المعالجة %d" #: ../AMC-gui.pl:4668 msgid "but some defects were detected." msgstr "تم الكشف عن بعض العيوب." #: ../AMC-gui.pl:4680 msgid "The \\namefield command is not used. Writing subjects without name field is not recommended" msgstr "الأمر \\nغير مستخدم. وكتابة مشروع بدون اسم الحقل غير مفضل." #: ../AMC-gui.pl:4681 msgid "The \\namefield command is used several times for the same subject. This should not be the case, as each student should write his name only once" msgstr "الأمر \\nمستخدم لأكثر من مرة في نفس المشروع. هذا غير مسموح به , كما أن الطالب لا يسمح له بكتابة اسمه إلا على ورقة إجابة واحدة." #: ../AMC-gui.pl:4682 msgid "No box to be ticked" msgstr "لا يوجد مربعات لتعليمها" #: ../AMC-gui.pl:4683 msgid "The corner marks and binary boxes are not at the same location on all pages" msgstr "علامات الأركان ومربعات المعرف ليست عند نفس المكان في كل الأوراق" #: ../AMC-gui.pl:4684 msgid "Some material has been placed out of the page. This is often a result of a multiple columns question group starting too close from the page bottom. In such a case, use \"needspace\"." msgstr "" #: ../AMC-gui.pl:4705 msgid "Some potential defects were detected for this subject. Correct them in the source and update the working documents." msgstr "تم الكشف عن بعض العيوب المحتملة في المشروع. فضلا صححها في الكود المصدري ثم حدثّ مستندات المشروع." #: ../AMC-gui.pl:4711 #, perl-format msgid "(See for example pages %s and %s)" msgstr "(كمثال أنظر الصفحات %s و %s )" #: ../AMC-gui.pl:4716 #, fuzzy, perl-format msgid "(Concerns %1$d pages, see for example page %2$s)" msgstr "(متعلقات الاختبار %1$d ، كمثال أنظر الورقة %2$d)" #: ../AMC-gui.pl:4723 #, perl-format msgid "(Concerns %1$d exams, see for example sheet %2$d)" msgstr "(متعلقات الاختبار %1$d ، كمثال أنظر الورقة %2$d)" #: ../AMC-gui.pl:4840 #, perl-format msgid "Data capture from %d complete papers and %d incomplete papers" msgstr "بيانات مستخرجة من %d ورقة مكتملة و %d ورقة غير مكتملة" #: ../AMC-gui.pl:4844 #, perl-format msgid "Data capture from %d complete papers" msgstr "بيانات مقروءة من %d ورقة أجابة كاملة" #. TRANSLATORS: this text points out that no data capture has been made yet. #: ../AMC-gui.pl:4849 msgid "No data" msgstr "لا توجد بيانات" #: ../AMC-gui.pl:4856 #, perl-format msgid "Overwritten pages: %d" msgstr "" #: ../AMC-gui.pl:4864 msgid "All scans were properly recognized." msgstr "تم التعرف على جميع الأوراق الممسوحة بشكل صحيح." #: ../AMC-gui.pl:4871 #, perl-format msgid "%d scans were not recognized." msgstr "الأوراق %d لم يتم التعرف عليها." #. TRANSLATORS: column title for the list of overwritten pages. This refers to the page from the question #: ../AMC-gui.pl:4895 #, fuzzy msgid "Page" msgstr "الصفحات:" #. TRANSLATORS: column title for the list of overwritten pages. This refers to the number of times the page has been overwritten. #: ../AMC-gui.pl:4900 msgid "count" msgstr "" #. TRANSLATORS: column title for the list of overwritten pages. This refers to the date of the last data capture for the page. #: ../AMC-gui.pl:4905 msgid "Date" msgstr "" #: ../AMC-gui.pl:4946 msgid "Looking for analysis..." msgstr "انتظار المعالجة..." #: ../AMC-gui.pl:4988 msgid "Automatic data capture now completed." msgstr "تمت قراءة البيانات آليا." #: ../AMC-gui.pl:4989 #, perl-format msgid "It is not complete (missing pages from %d papers)." msgstr "إنها غير مكتملة (أوراق مفقودة من %d )." #: ../AMC-gui.pl:4990 msgid "You can analyse data capture quality with some indicators values in analysis list:" msgstr "تستطيع التحكم في جودة قراءة وتحليل البيانات عن طريق بعض القيم في قائمة التحليل:" #: ../AMC-gui.pl:4992 #, perl-format msgid "- %s represents positioning gap for the four corner marks. Great value means abnormal page distortion." msgstr "- %s تمثل الفراغ بين مواقع العلامات في أركان الصفحة الأربعة . كلما كانت القيمة أكبر كلما كانت الصفحة مشوهة." #: ../AMC-gui.pl:4994 #, perl-format msgid "- great values of %s are seen when darkness ratio is very close to the threshold for some boxes." msgstr "- أفضل قيمة ل %s تكون عندما قريبة جداً من درجة إظلام أو تعتيم المربعات." #: ../AMC-gui.pl:4996 #, perl-format msgid "You can also look at the scan adjustment (%s) and ticked and unticked boxes (%s) using right-click on lines from table %s." msgstr "يمكنك أيضا الاستعراض في اداة ضبط المسح (%s) وتعليم أو عدم تعليم المربعات (%s) بالنقر على زر الفارة الأيمن في الجدول %s ." #: ../AMC-gui.pl:4996 msgid "Diagnosis" msgstr "الفحص" #: ../AMC-gui.pl:5024 msgid "Pages that miss data capture to complete students sheets:" msgstr "الأوراق التي تحتوي على بيانات مفقودة لإكمال أوراق الطلاب:" #: ../AMC-gui.pl:5145 #, perl-format msgid "Error loading scan %s" msgstr "فشل تحميل الأوراق الممسوحة %s" #: ../AMC-gui.pl:5151 msgid "No scan selected" msgstr "لا توجد اوراق ممسوحة" #: ../AMC-gui.pl:5156 #, fuzzy msgid "No more unrecognized scans" msgstr "أوراق غير معروفة" #: ../AMC-gui.pl:5234 msgid "Making diagnostic image..." msgstr "قراءة الصورة..." #: ../AMC-gui.pl:5304 msgid "(no description)" msgstr "(لا يوجد وصف)" #. TRANSLATORS: This is a column title for the list of files to be included in a template being created. #. TRANSLATORS: This is the title of a column containing attachments file paths in a table showing all attachments, when sending them to the students by email. #: ../AMC-gui.pl:5389 ../AMC-gui.pl:6336 msgid "file" msgstr "ملف" #: ../AMC-gui.pl:5469 msgid "Add files to template" msgstr "إضافة ملف للنموذج" #: ../AMC-gui.pl:5490 msgid "When making a template, you can only add files that are within the project directory." msgstr "عند عمل نموذج , يمكن إضافة الملفات الموجودة في مجلد المشروع فقط." #. TRANSLATORS: This is a column name for the list of available templates, when creating a new project based on a template. #: ../AMC-gui.pl:5613 msgid "template" msgstr "نموذج" #: ../AMC-gui.pl:5658 msgid "All source files" msgstr "كل الملفات المصدرية" #: ../AMC-gui.pl:5676 #, perl-format msgid "%s files" msgstr "%s ملفات" #: ../AMC-gui.pl:5710 msgid "Archive (zip, tgz)" msgstr "ارشيف (zip, tgz)" #: ../AMC-gui.pl:5739 #, perl-format msgid "Nothing extracted from archive %s. Check it." msgstr "لم يتم استخراج شئ من الأرشيف %s . فضلا افحص الملف." #: ../AMC-gui.pl:5868 #, perl-format msgid "File %s already exists in project directory: do you want to replace it?" msgstr "الملف %s موجود في مجلد المشروع: هل تريد استبداله؟" #: ../AMC-gui.pl:5869 msgid "Click yes to replace it and loose pre-existing contents, or No to cancel source file import." msgstr "انقر نعم لاستبداله, أو لا لإلغاء استيراد الملف المصدري." #: ../AMC-gui.pl:5885 msgid "The source file has been copied to project directory." msgstr "تم نسخ الملف المصدري إلى مجلد المشروع." #: ../AMC-gui.pl:5885 #, perl-format msgid "You can now edit it with button \"%s\" or with any editor." msgstr "يمكنك تحريره بالنقر على الزر \"%s\" أو أي محرر آخر." #: ../AMC-gui.pl:5885 ../AMC-gui-main_window.glade:241 msgid "Edit source file" msgstr "تحرير الملف المصدري" #: ../AMC-gui.pl:5893 #, perl-format msgid "Error copying source file: %s" msgstr "فشل نسخ الملف المصدري: %s" #: ../AMC-gui.pl:6078 msgid "In order to send a useful bug report, please attach the following documents:" msgstr "لإرسال تقرير تتبع الأخطاء , فضلا ارفق المستندات التالية:" #: ../AMC-gui.pl:6079 msgid "an archive (in some compressed format, like ZIP, 7Z, TGZ...) containing the project directory, scan files and configuration directory (.AMC.d in home directory), so as to reproduce and analyse this problem." msgstr "أرشيف (بأحد صيغ الملفات مثل ZIP, 7Z, TGZ...) وتحتوي مسار المشروع , الملفات الممسوحة و مسار الإعدادات , وذلك للاطلاع على المشكلة وتحليلها." #: ../AMC-gui.pl:6080 msgid "the log file produced when the debugging mode (in Help menu) is checked. Please try to reproduce the bug with this mode activated." msgstr "ملف السجل سيتم إنتاجه عندما يكون نظام التتبع مفعّل من قائمة المساعدة. فضلا حاول إعادة إنتاج الملف بعد تفعيل التتبع." #: ../AMC-gui.pl:6081 #, perl-format msgid "Bug reports can be filled at %s or sent to the address below." msgstr "تقرير تتبع الأخطاء سيتم حفظه في %s أو إرساله إلى العنوان في الأسفل." #: ../AMC-gui.pl:6082 ../AMC-gui.pl:6086 msgid "AMC community site" msgstr "موقع مجتمع آمسي" #: ../AMC-gui.pl:6149 msgid "Attach file" msgstr "ارفاق ملف" #: ../AMC-gui.pl:6183 msgid "There are no annotated corrected answer sheets to send." msgstr "لا توجد أوراق طلاب مرصودة ليتم إرسالها." #: ../AMC-gui.pl:6186 msgid "Please group the annotated sheets to PDF files to be able to send them." msgstr "فضلا جمع أوراق الطلاب المرصودة في ملفات pdf لكي تصبح قابلة للإرسال." #: ../AMC-gui.pl:6187 msgid "Please annotate answer sheets and group them to PDF files to be able to send them." msgstr "فضلا قم برصد أوراق الإجابة وصدرها على شكل pdf لكي تصبح قابلة للإرسال." #: ../AMC-gui.pl:6218 #, perl-format msgid "Sending emails requires some perl modules that are not installed: %s. Please install these modules and try again." msgstr "إرسال البريد يتطلب بعض وحدات لغة بيرل والتي لم يتم تركيبها: %s . فضلا قم بتركيبها ثم أعد المحاولة." #: ../AMC-gui.pl:6239 msgid "SMTP security mode \"STARTTLS\" is only available with Email::Sender version 1.300027 and over. Please install a newer version of this perl module or change SMTP security mode, and try again." msgstr "" #: ../AMC-gui.pl:6255 #, perl-format msgid "The email address you entered (%s) is not correct." msgstr "البريد الإلكتروني الذي أدخلته (%s) غير صحيح." #: ../AMC-gui.pl:6257 msgid "Please edit your preferences to correct your email address." msgstr "فضلا حرر خياراتك لتصحيح بريدك الإلكتروني." #: ../AMC-gui.pl:6259 msgid "You did not enter your email address." msgstr "لم تكتب بريدك الإلكتروني." #: ../AMC-gui.pl:6260 msgid "Please edit the preferences to set your email address." msgstr "فضلا حرر خياراتك لتعيين بريدك الإلكتروني." #: ../AMC-gui.pl:6283 #, perl-format msgid "The sendmail program cannot be found at the location you specified in the preferences (%s). Please update your configuration." msgstr "برنامج خادم البريد لم يتم العثور عليه في الموقع الذي حددته في التفضيلات (%s). فضلا حدث التكوين." #: ../AMC-gui.pl:6303 msgid "No email addresses has been found in the students list file. You need to write the students addresses in a column of this file." msgstr "لا يوجد بريد إلكتروني في ملف قائمة الطلاب. تحتاج إلى كتابة البرد الإلكترونية للطلاب في عمود داخل هذا الملف." #. TRANSLATORS: This is the title of a column containing copy numbers in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:6351 msgid "copy" msgstr "نسخ" #. TRANSLATORS: This is the title of a column containing students email addresses in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:6363 msgid "email" msgstr "البريد الإلكتروني" #. TRANSLATORS: This is the title of a column containing mailing status (not sent, already sent, failed) in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:6369 msgid "status" msgstr "الحالة" #: ../AMC-gui.pl:6388 msgid "failed" msgstr "فشل" #: ../AMC-gui.pl:6446 msgid "Some files you asked to be attached to the emails are missing:" msgstr "بعض الملفات التي طلبت إرفاقها بالبريد الالكتروني مفقودة:" #: ../AMC-gui.pl:6447 msgid "Please create them or remove them from the list of attached files." msgstr "فضلا عينها أو احذفها من قائمة الملفات المرفقة." #: ../AMC-gui.pl:6499 msgid "Sending emails..." msgstr "إرسال البرد الإلكترونية..." #: ../AMC-gui.pl:6508 msgid "Cancelled." msgstr "الغي." #: ../AMC-gui.pl:6510 msgid "SMTP authentication failed: check SMTP configuration and password." msgstr "" #: ../AMC-gui.pl:6512 #, perl-format msgid "%d message(s) has been sent." msgstr "تم إرسال الرسالة %d ." #: ../AMC-gui.pl:6552 msgid "Set exam name" msgstr "تعيين اسم الاختبار" #: ../AMC-gui.pl:6559 ../AMC-gui-edit_preferences.glade:4154 msgid "Examination name" msgstr "اسم الاختبار" #: ../AMC-gui.pl:6563 ../AMC-gui-edit_preferences.glade:4165 msgid "Code (short name) for examination" msgstr "رمز الاختبار" #. TRANSLATORS: This is the title of a column containing all columns names from the students list file, when choosing which columns has to be exported to the spreadsheets. #: ../AMC-gui.pl:6613 msgid "column" msgstr "العمود" #: ../AMC-gui.pl:6621 msgid "" msgstr "<الاسم الكامل>" #: ../AMC-gui.pl:6622 msgid "" msgstr "<معرفات الطلاب>" #: ../AMC-gui.pl:6623 msgid "" msgstr "<ورقة الطالب>" #: ../AMC-gui.pl:6657 msgid "Install an AMC plugin" msgstr "تركيب إضافة" #: ../AMC-gui.pl:6662 msgid "Plugins (zip, tgz)" msgstr "الإضافات (zip, tgz)" #: ../AMC-gui.pl:6682 #, perl-format msgid "An error occured while trying to extract files from the plugin archive: %s." msgstr "حدث خطأ أثناء محاولة لاستخراج الملفات من أرشيف الإضافة: %s." #: ../AMC-gui.pl:6696 msgid "Nothing extracted from the plugin archive. Check it." msgstr "لم يتم استخراج شيء من أرشيف الإضافة. فضلا افحص الملف." #: ../AMC-gui.pl:6706 msgid "This is not a valid plugin, as it contains more than one directory at the first level." msgstr "هذه الإضافة غير صالحة، حيث تحتوي على أكثر من مسار في المستوى الأول." #: ../AMC-gui.pl:6717 msgid "This is not a valid plugin, as it does not contain a perl/AMC subdirectory." msgstr "هذه الإضافة غير صالحة، كما أنه لا يحتوي على الدليل الفرعي Perl / AMC." #: ../AMC-gui.pl:6734 #, perl-format msgid "A plugin is already installed with the same name (%s). Do you want to delete the old one and overwrite?" msgstr "الإضافة موجودة مسبقاً بنفس الاسم (%s). هل ترغب بحذف القديمة والكتابة عليها؟" #: ../AMC-gui.pl:6752 #, perl-format msgid "Error while moving the plugin to the user plugin directory: %s" msgstr "خطأ أثناء نقل الإضافة إلى دليل الإضافة: %s" #: ../AMC-gui.pl:6762 msgid "Please restart AMC before using the new plugin..." msgstr "فضلا أعد تشغيل آمسي قبل استخدام الإضافة الجديدة..." #: ../AMC-gui.pl:6814 msgid "zooms" msgstr "الرصد" #: ../AMC-gui.pl:6815 msgid "boxes images are extracted from the scans while processing automatic data capture. They can be removed if you don't plan to use the zooms dialog to check and correct boxes categorization. They can be recovered processing again automatic data capture from the same scans." msgstr "صور المربعات يتم استخراجها عند القراءة التلقائية للبيانات. ويمكن حذفها إذا لم تكنن تخطط لمراجعة تصنيفها من نافذة التكبير. ويمكن استعادتها مجددا بالقراءة التلقائية للبيانات من الأوراق الممسوحة." #: ../AMC-gui.pl:6827 msgid "layout reports" msgstr "تقرير التصميم" #: ../AMC-gui.pl:6828 msgid "these images are intended to show how the corner marks have been recognized and positioned on the scans. They can be safely removed once the scans are known to be well-recognized. They can be recovered processing again automatic data capture from the same scans." msgstr "هذه الصور معدة لعرض علامات الأركان الخاصة بتحديد الصور الممسوحة. ويمكن إزالتها بأمان بعد قراءة البيانات. ويمكن استعادتها مرة أخرى بزر القراءة الآلية للبيانات." #: ../AMC-gui.pl:6843 msgid "annotated pages" msgstr "رصد الدرجات على الصفحات" #: ../AMC-gui.pl:6844 msgid "jpeg annotated pages are made before beeing assembled to PDF annotated files. They can safely be removed, and will be recovered automatically the next time annotation will be requested." msgstr "يتم صنع الأوراق المرصودة بهيئة jpeg قبل الأوراق المرصودة بهيئة pdf. ويمكن حذفها بأمان, وسوف يتم استعادتها تلقائيا عند القيام بالرصد مجددا." #: ../AMC-gui.pl:6874 msgid "Total size of concerned files:" msgstr "مجموع حجم الملفات المعنية:" #: ../AMC-gui.pl:6923 #, perl-format msgid "%s files were removed." msgstr "ملفات %s تم حذفها." #: ../AMC-gui.pl:6949 #, perl-format msgid "I don't find the command %s." msgstr "لم يتم العثور على الأمر %s." #: ../AMC-gui.pl:6950 msgid "Perhaps LaTeX is not installed?" msgstr "ربما لم يتم تركيب لتيك؟" #. TRANSLATORS: Do not translate 'auto-multiple-choice latex-link', which is a command to be typed on MacOsX #: ../AMC-gui.pl:6954 msgid "The style file automultiplechoice.sty seems to be unreachable. Try to use command 'auto-multiple-choice latex-link' as root to fix this." msgstr "لا يمكن الوصول لملف النمط automultiplechoice.sty . حاول استخدام الأمر 'auto-multiple-choice latex-link' وأنت جذر لإصلاح المشكلة." #: ../AMC-prepare.pl:274 #, perl-format msgid "%d/%d good answers not coherent for a simple question" msgstr "%d/%d الإجابة الجيدة غير متوافقة مع السؤال" #: ../AMC-prepare.pl:357 #, perl-format msgid "question ID used several times for the same paper: \"%s\"" msgstr "معرف الاسئلة مستخدم أكثر من مرة في نفس الورقة: \"%s\"" #: ../AMC-prepare.pl:444 #, perl-format msgid "An answer appears to be given outside a question environment, after question \"%s\"" msgstr "إحدى الإجابات خارج بيئة السؤال, بعد السؤال \"%s\"" #: ../AMC-prepare.pl:453 #, perl-format msgid "Answer number ID used several times for the same question: %s" msgstr "معرف الإجابة مستخدم أكثر من مرة لنفس السؤال: %s" #: ../AMC-prepare.pl:708 #, perl-format msgid "%d errors during LaTeX compiling" msgstr "%d خطأ أثناء تصيير لتيك" #: ../AMC-prepare.pl:768 #, perl-format msgid "LaTeX command configured is not present (%s). Install it or change configuration, and then rerun." msgstr "إعداد امر لتيك غير موجود (%s) . ركبه أو قم بإعادة إعداده, ثم اعد التشغيل." #: ../AMC-prepare.pl:797 msgid "solution" msgstr "الحل" #: ../AMC-prepare.pl:812 #, fuzzy msgid "catalog" msgstr "الفهرس" #: ../AMC-prepare.pl:845 msgid "question sheet" msgstr "الأسئلة" #: ../AMC-prepare.pl:873 #, perl-format msgid "please remove accentuated or non-standard characters from the following question ID: \"%s\"" msgstr "فضلا احذف الحد أو الحروف غير القياسية من معرف السؤال التالي: \"%s\"" #: ../AMC-prepare.pl:875 msgid "some question IDs seems to have accentuated or non-standard characters. This may break future processings." msgstr "يبدو أن بعض معرفات الأسئلة تحتوي حدود أو حروف غير قياسية. هذا ربما يوقف عملية المعالجة مستقبلا." #: ../AMC-read-pdfform.pl:136 #, fuzzy msgid "Reading PDF forms..." msgstr "اعادة استخراج التكبير..." #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:592 msgid "Name [name column title in exported spreadsheet]" msgstr "الاسم [عنوان عمود الاسم المصدر]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:594 msgid "Mark [mark column title in exported spreadsheet]" msgstr "الدرجة [عنوان عمود الدرجة المصدرة]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:596 msgid "Exam [exam number column title in exported spreadsheet]" msgstr "الاختبار [عنوان عمود رقم الاختبار]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:598 msgid "Score [total score column title in exported spreadsheet]" msgstr "الدرجة الكلية [عنوان عمود الدرجة الكلية المصدرة]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:600 msgid "Max [maximum score column title in exported spreadsheet]" msgstr "الدرجة الكاملة [عنوان عمود الدرجة الكاملة المصدرة]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:604 msgid "max [maximum score row name in exported spreadsheet]" msgstr "الدرجة الكاملة [عنوان صف الدرجة الكلية لكل فقرة]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:606 msgid "mean [means of scores row name in exported spreadsheet]" msgstr "المتوسط [عنوان عمود متوسط صف الدرجات المصدرة]" #. TRANSLATORS: This is the default text to be written on the top of the first page of each paper when annotating. From this string, %s will be replaced with the student final mark, %m with the maximum mark he can obtain, %S with the student total score, and %M with the maximum score the student can obtain. #: ../AMC-perl/AMC/Config.pm:319 msgid "Mark: %s/%m (total score: %S/%M)" msgstr "الدرجة: %s/%m (مجموع النقاط: %S/%M)" #. TRANSLATORS: Subject of the emails which can be sent to the students to give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:344 msgid "Exam result" msgstr "نتيجة الاختبار" #. TRANSLATORS: Body text of the emails which can be sent to the students to give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:346 msgid "" "Please find enclosed your annotated completed answer sheet.\n" "Regards." msgstr "" "يسعدنا تزويدكم بنتائج أوراق إجابتكم. \n" "احترامي" #. TRANSLATORS: Message (first part) when some of the commands that are given in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:598 msgid "Some commands allowing to open documents can't be found:" msgstr "بعض الأوامر التي تسمح بفتح المستندات غير موجودة:" #. TRANSLATORS: Message (second part) when some of the commands that are given in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:601 msgid "Please check its correct spelling and install missing software." msgstr "فضلا تأكد من صحة الإملاء و ركب البرنامج المفقود." #. TRANSLATORS: Message (third part) when some of the commands that are given in the preferences cannot be found. The %s will be replaced with the name of the menu entry "Preferences" and the name of the menu "Edit". #: ../AMC-perl/AMC/Config.pm:603 #, perl-format msgid "You can change used commands following %s from menu %s." msgstr "تستطيع تعديل الأوامر التالية %s من قائمة %s." #. TRANSLATORS: "Preferences" menu #: ../AMC-perl/AMC/Config.pm:605 ../AMC-gui-main_window.glade:2706 msgid "Preferences" msgstr "التفضيلات" #. TRANSLATORS: "Edit" menu #: ../AMC-perl/AMC/Config.pm:607 msgid "Edit" msgstr "تحرير" #. TRANSLATORS: Error writing one of the configuration files (global or project). The first %s will be replaced with the path of that file, and the second with the error text. #: ../AMC-perl/AMC/Config.pm:841 #, fuzzy, perl-format msgid "Error writing configuration file %s: %s" msgstr "تم كتابة الخطأ في الملف %s: %s" #: ../AMC-perl/AMC/DataModule/association.pm:103 msgid "Fetching association results from old format XML files..." msgstr "جلب نتائج الربط من ملف XML بهيئة قديمة..." #: ../AMC-perl/AMC/DataModule/capture.pm:210 msgid "Including zooms in the database..." msgstr "إضافة المكبرات لقاعدة البيانات..." #: ../AMC-perl/AMC/DataModule/capture.pm:229 #: ../AMC-perl/AMC/DataModule/capture.pm:237 msgid "Building capture database indexes..." msgstr "بناء فهارس قاعدة بيانات البيانات المقروءة ..." #: ../AMC-perl/AMC/DataModule/capture.pm:279 msgid "Fetching data capture results from old format XML files..." msgstr "جلب نتائج البيانات المقروءة من ملف XML بهيئة قديمة..." #: ../AMC-perl/AMC/DataModule/layout.pm:222 msgid "Building layout database indexes..." msgstr "بناء فهارس قاعدة بيانات التصميم ..." #: ../AMC-perl/AMC/DataModule/layout.pm:288 msgid "Fetching layout data from old format XML files..." msgstr "جلب بيانات التصميم من ملف XML بهيئة قديمة..." #: ../AMC-perl/AMC/DataModule/scoring.pm:256 msgid "Fetching scoring data from old format XML files..." msgstr "جلب بيانات التصحيح من ملف XML بهيئة قديمة..." #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the total number of sheets. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:236 msgid "ALL" msgstr "الكل" #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the number of sheets for which the question did not get an answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:238 msgid "NA" msgstr "متروكة" #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the number of sheets for which the question got an invalid answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:240 msgid "INVALID" msgstr "غير صالحة" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains the reference of the boxes. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:268 msgid "Box" msgstr "المربع" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains the number of items (ticked boxes, or invalid or empty questions). Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:271 msgid "Nb" msgstr "الطلاب" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains percentage of questions for which the corresponding box is ticked over all questions. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:274 msgid "/all" msgstr "الكل" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains percentage of questions for which the corresponding box is ticked over the expressed questions (counting only questions that did not get empty or invalid answers). Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:277 msgid "/expr" msgstr "الصافي" #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the number of sheets for which the question got the "none of the above are correct" answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:305 msgid "NONE" msgstr "لا شئ" #. TRANSLATORS: table name in the exported ODS spreadsheet for the table that contains the marks. #: ../AMC-perl/AMC/Export/ods.pm:883 ../AMC-perl/AMC/Gui/Notes.glade:8 msgid "Marks" msgstr "التقييم" #. TRANSLATORS: Label of the table with questions basic statistics in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1310 msgid "Questions statistics" msgstr "إحصاءات الأسئلة" #. TRANSLATORS: Label of the table with indicative questions basic statistics in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1317 msgid "Indicative questions statistics" msgstr "ملخص إحصاءات الأسئلة" #. TRANSLATORS: Label of the table with a legend (explaination of the colors used) in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1327 ../AMC-perl/AMC/Export/ods.pm:1331 msgid "Legend" msgstr "النقش" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that have not been asked to some students. #: ../AMC-perl/AMC/Export/ods.pm:1337 msgid "Non applicable" msgstr "غير سارية" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that have not been answered. #: ../AMC-perl/AMC/Export/ods.pm:1341 msgid "No answer" msgstr "لا اجابة" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that have not been answered, but are cancelled by the use of allowempty scoring strategy. #: ../AMC-perl/AMC/Export/ods.pm:1345 msgid "Cancelled" msgstr "الغي" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1349 msgid "Invalid answer" msgstr "إجابة غير صالحة" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1354 msgid "Correct answer" msgstr "إجابة صحيحة" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1358 msgid "Wrong answer" msgstr "إجابة خاطئة" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the indicative questions. #: ../AMC-perl/AMC/Export/ods.pm:1363 msgid "Indicative" msgstr "ارشادي" #: ../AMC-perl/AMC/Export/ods.pm:1391 msgid "An old state of the exported file seems to be already opened. Use File/Reload from OpenOffice/LibreOffice to refresh." msgstr "نسخة سابقة من الملف تم تصديرها ولا زالت مفتوحة. استخدم زر تحديث في اوبن اوفيس / ليبر اوفيس للتحديث." #: ../AMC-perl/AMC/Filter/plain.pm:92 msgid "Please code your student number opposite, and write your name in the box below." msgstr "فضلا ظلل رقم الطالب, واكتب اسمك في الصندوق السفلي." #. TRANSLATORS: Message when the Pages option used in AMC-TXT can't be parsed. %s will be replaced with the option value #: ../AMC-perl/AMC/Filter/plain.pm:209 #, perl-format msgid "Pages option value can't be understood: %s" msgstr "" #: ../AMC-perl/AMC/Filter/plain.pm:238 #, perl-format msgid "Line %d" msgstr "سطر %d" #. TRANSLATORS: Error text for AMC-TXT parsing, when opening a new question whereas the previous question has less than two choices #: ../AMC-perl/AMC/Filter/plain.pm:249 msgid "Previous question has less than two choices" msgstr "السؤال السابق له أقل من إجابتين" #. TRANSLATORS: Error text for AMC-TXT parsing #: ../AMC-perl/AMC/Filter/plain.pm:258 #, perl-format msgid "Previous question is a simple question but has %d correct choice(s)" msgstr "السؤال السابق بسيط لكن له %d إجابة صحيحة" #: ../AMC-perl/AMC/Filter/plain.pm:342 msgid "Invalid encoding: you must use UTF-8, but your source file was saved using another encoding" msgstr "ترميز غير صالح: يجب أن تستخدم UTF-8 ، لكن ملف الكود تم حفظه باستخدام ترميز آخر." #: ../AMC-perl/AMC/Filter/plain.pm:368 #, perl-format msgid "File not found: %s" msgstr "ملف غير موجود: %s" #. TRANSLATORS: Error text for AMC-TXT parsing, when an unknown option is given a value #: ../AMC-perl/AMC/Filter/plain.pm:386 #, perl-format msgid "Unknown option: %s" msgstr "خيار مجهول: %s" #. TRANSLATORS: Error text for AMC-TXT parsing when a choice is given but no question were opened #: ../AMC-perl/AMC/Filter/plain.pm:456 msgid "Choice outside question" msgstr "الاختيار خارج السؤال" #: ../AMC-perl/AMC/Filter/plain.pm:1240 #, perl-format msgid "The following fonts does not seem to be installed on the system: %s." msgstr "الخطوط التالية غير مركبة في النظام: %s." #: ../AMC-perl/AMC/Filter/register.pm:78 msgid "No description available." msgstr "لا توجد مواصفات متاحة." #: ../AMC-perl/AMC/Gui/Association.pm:133 msgid "Names images not found... Maybe you forgot using \\namefield command in LaTeX source?" msgstr "أسماء الأوراق الممسوحة غير موجودة... ربما نسيت استخدام \\nأمر لتيك في الكود؟" #: ../AMC-perl/AMC/Gui/Association.pm:690 msgid "Sheet" msgstr "الورقة" #: ../AMC-perl/AMC/Gui/Association.pm:728 msgid "End" msgstr "نهاية" #: ../AMC-perl/AMC/Gui/Manuel.pm:117 msgid "Page layout" msgstr "التصميم" #: ../AMC-perl/AMC/Gui/Manuel.pm:125 msgid "Original" msgstr "أصلي" #: ../AMC-perl/AMC/Gui/Manuel.pm:126 ../AMC-gui-edit_preferences.glade:2138 msgid "Scan" msgstr "المسح" #. TRANSLATORS: This is one of the choices for pages navigation in manual data capture window. Here, navigation goes through all pages. Please keep this text very short (say less than 5 letters) so that the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:130 ../AMC-perl/AMC/Gui/Manuel.pm:146 msgid "all" msgstr "الكل" #. TRANSLATORS: This is one of the choices for pages navigation in manual data capture window. Here, navigation goes through pages with some invalid answers. Please keep this text very short (say less than 5 letters) so that the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:132 msgid "inv" msgstr "لاغ" #. TRANSLATORS: This is one of the choices for pages navigation in manual data capture window. Here, navigation goes through pages with empty or invalid answers. Please keep this text very short (say less than 5 letters) so that the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:134 msgid "i&e" msgstr "لاغ&فارغ" #: ../AMC-perl/AMC/Gui/Manuel.pm:184 msgid "page" msgstr "الصفحة" #: ../AMC-perl/AMC/Gui/Manuel.pm:531 #, perl-format msgid "This is a template exam that you cannot edit. To create a new exam from this one to be edited, use the '%s' button." msgstr "هذا نموذج لا يمكن تعديله. لإنشاء نموذج قابل للتعديل, فضلا انقر على الزر '%s' ." #: ../AMC-perl/AMC/Gui/Manuel.pm:531 ../AMC-perl/AMC/Gui/Manuel.glade:406 msgid "Add photocopy" msgstr "إضافة ورقة مصورة" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms window #: ../AMC-perl/AMC/Gui/Zooms.pm:76 msgid "drag and drop" msgstr "حمل وإسقاط" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms window #: ../AMC-perl/AMC/Gui/Zooms.pm:78 msgid "click" msgstr "انقر" #: ../AMC-perl/AMC/Gui/Zooms.pm:126 ../AMC-perl/AMC/Gui/Zooms.pm:413 #, perl-format msgid "Boxes zooms for page %s" msgstr "تكبير المربعات للصفحة %s" #: ../AMC-perl/AMC/Gui/Zooms.pm:402 ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "You moved some boxes to correct automatic data query, but this work is not saved yet." msgstr "لقد تم تعديل مواقع المربعات مما سيؤثر على التصحيح، لكن لم يتم حفظ التعديلات." #: ../AMC-perl/AMC/Gui/Zooms.pm:402 msgid "Do you want to save these modifications before looking at another page?" msgstr "هل ترغب بحفظ التغييرات قبل عرض الصفحة التالية؟" #: ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "Dou you really want to close and ignore these modifications?" msgstr "هل ترغب بإغلاق المشروع وتجاهل التغييرات؟" #: ../AMC-perl/AMC/Print/cups.pm:71 #, perl-format msgid "Perl module(s) missing: %s" msgstr "وحدة بيرل مفقودة: %s" #: ../AMC-perl/AMC/Print/cupslp.pm:47 #, perl-format msgid "The following commands are missing: %s." msgstr "الأمر التالي مفقود: %s." #: ../AMC-perl/AMC/Export/register/CSV.pm:70 msgid "Separator" msgstr "الفاصلة" #: ../AMC-perl/AMC/Export/register/CSV.pm:83 msgid "Ticked boxes" msgstr "المربعات المعلمة" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'No, don't group questions by scope in the exported ODS file' #: ../AMC-perl/AMC/Export/register/CSV.pm:89 #: ../AMC-perl/AMC/Export/register/ods.pm:124 msgid "No" msgstr "لا" #: ../AMC-perl/AMC/Export/register/CSV.pm:90 #: ../AMC-perl/AMC/Export/register/CSV.pm:91 msgid "Yes:" msgstr "نعم:" #: ../AMC-perl/AMC/Export/register/CSV.pm:97 #: ../AMC-perl/AMC/Export/register/ods.pm:152 msgid "Choose columns" msgstr "اختيار العمود" #. TRANSLATORS: List of students with their scores: one of the export formats. #: ../AMC-perl/AMC/Export/register/List.pm:37 msgid "PDF list" msgstr "قائمة PDF" #: ../AMC-perl/AMC/Export/register/List.pm:64 msgid "Number of columns" msgstr "عدد الاعمدة" #: ../AMC-perl/AMC/Export/register/List.pm:67 msgid "Long list is divided into this number of columns on each page." msgstr "القائمة الطويلة تقسم إلى عدة أعمدة في كل صفحة." #: ../AMC-perl/AMC/Export/register/List.pm:71 msgid "Paper size" msgstr "حجم الورق" #. TRANSLATORS: Check button label in the exports tab. If checked, a table with questions basic statistics will be added to the ODS exported spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:82 msgid "Stats table" msgstr "الإحصاءات" #. TRANSLATORS: Menu to export statistics table in the exports tab. The first menu entry means 'do not build a stats table' in the exported ODS file. You can omit the [...] part, that is here only to state the context. #: ../AMC-perl/AMC/Export/register/ods.pm:89 msgid "None [no stats table to export]" msgstr "لا شيء [لا توجد إحصاءات لتصديرها]" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second menu entry means 'build a stats table, with a horizontal flow' in the exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:91 #: ../AMC-perl/AMC/Export/register/ods.pm:106 msgid "Horizontal flow" msgstr "تدفق أفقي" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second menu entry means 'build a stats table, with a vertical flow' in the exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:93 #: ../AMC-perl/AMC/Export/register/ods.pm:107 msgid "Vertical flow" msgstr "تدفق رأسي" #. TRANSLATORS: Check button label in the exports tab. If checked, a table with indicative questions basic statistics will be added to the ODS exported spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:99 msgid "Indicative stats table" msgstr "دليل جدول الإحصاءات" #: ../AMC-perl/AMC/Export/register/ods.pm:105 msgid "None" msgstr "بدون" #: ../AMC-perl/AMC/Export/register/ods.pm:110 msgid "Create a table with basic statistics about answers for each indicative question?" msgstr "إنشاء جدول مع الإحصاءات الأساسية عن إجابات كل سؤال؟" #. TRANSLATORS: Check button label in the exports tab. If checked, sums of the scores for groups of questions will be added to the exported table. #: ../AMC-perl/AMC/Export/register/ods.pm:114 msgid "Score groups" msgstr "درجة المجموعات" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'Yes, group questions by scope in the exported ODS file, and report total scores' #: ../AMC-perl/AMC/Export/register/ods.pm:126 msgid "Yes (values)" msgstr "" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'Yes, group questions by scope in the exported ODS file, and report total scores as percentages.' #: ../AMC-perl/AMC/Export/register/ods.pm:128 msgid "Yes (percentages)" msgstr "" #: ../AMC-perl/AMC/Export/register/ods.pm:131 msgid "Add sums of the scores for each question group?" msgstr "" #: ../AMC-perl/AMC/Export/register/ods.pm:134 #, fuzzy msgid "with scope separator" msgstr "نعم، مع نطاق فاصل ':'" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'No, don't group questions by scope in the exported ODS file' #: ../AMC-perl/AMC/Export/register/ods.pm:141 msgid "':'" msgstr "" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'Yes, group questions by scope in the exported ODS file, and you can detect the scope from a question ID using the text before the separator .' #: ../AMC-perl/AMC/Export/register/ods.pm:143 msgid "'.'" msgstr "" #: ../AMC-perl/AMC/Export/register/ods.pm:146 #, fuzzy msgid "To define groups, use question ids in the form \"group:question\" or \"group.question\", depending on the scope separator." msgstr "إضافة مجموع درجات لكل مجموعة أسئلة ؟ لتعيين المجموعات, استخدم معرفات الأسئلة في النموذج \"group:question\" أو \"group.question\" ، اعتمادا على نطاق فاصل." #: ../AMC-perl/AMC/Filter/register/latex.pm:54 msgid "" "This is the native format for AMC. LaTeX is not so easy to use for unexperienced users, but the LaTeX power allows the user to build any multiple choice subject. As an example, the following is possible with LaTeX but not with other formats:\n" "* any kind of layout,\n" "* questions with random numerical values,\n" "* use of figures, mathematical formulas\n" "* and much more!" msgstr "" "هذه هي الهيئة الأساسية لملفات آمسي. لتيك ليست سهلة الاستخدام من غير المتمرسين. لكن قوة لتيك تسمح للمستخدم ببناء أي مشروع اختبار, مثال, التالي ممكن بلتيك لكنه غير ممكن بهيئة أخرى:\n" "* أي نوع من التصاميم,\n" "*الترتيب العشوائي للأسئلة والإجابات,\n" "* استخدام الصور, والمعادلات الرياضية\n" "* ومميزات أخرى كثيرة!" #: ../AMC-perl/AMC/Filter/register/plain.pm:51 msgid "" "This is a plain text format for easy question writting. See the following minimal example:\n" "\n" "Title: Paper title\n" "\n" "* Which is the capital city of Cameroon?\n" "+ Yaounde\n" "- Douala\n" "- Kribi" msgstr "" "هذه الهيئة النصية لكتابة الاسئلة بشكل سهل. انظر المثال المبسط التالي:\n" "\n" "Title: عنوان الاختبار\n" "\n" "* ما هي عاصمة السعودية؟\n" "+ الرياض\n" "- جدة\n" "- الدمام" #: ../AMC-gui-apropos.glade:8 msgid "AMC A propos" msgstr "حول AMC" #: ../AMC-gui-apropos.glade:17 msgid "" "Copyright (C) 2008-2018\n" "Alexis Bienvenüe and the AMC development team" msgstr "" #: ../AMC-gui-apropos.glade:19 msgid "Automatic multiple choice questionnaires management" msgstr "إدارة تصحيح الأسئلة الموضوعية" #: ../AMC-gui-apropos.glade:21 msgid "Visit the AMC website" msgstr "" #: ../AMC-gui-choix_pages_impression.glade:33 msgid "Papers printing" msgstr "طباعة الاوراق" #: ../AMC-gui-choix_pages_impression.glade:98 msgid "Please select papers you wish to print:" msgstr "فضلا اختر الأوراق التي تود طباعتها:" #: ../AMC-gui-choix_pages_impression.glade:116 msgid "Select papers you wish to print (ctrl-a for all), then confirm..." msgstr "حدد الأوراق التي تود طباعتها (ctrl-a للكل), ثم انقر على تأكيد..." #: ../AMC-gui-choix_pages_impression.glade:144 msgid "Answer sheet printing" msgstr "طباعة ورقة الإجابة" #: ../AMC-gui-choix_pages_impression.glade:190 msgid "Printer:" msgstr "الطابعة:" #: ../AMC-gui-choix_pages_impression.glade:243 msgid "two-side printing" msgstr "طباعة على الوجهين" #: ../AMC-gui-choix_pages_impression.glade:319 msgid "printing options" msgstr "خيارات الطباعة" #: ../AMC-gui-choix_pages_impression.glade:343 msgid "Destination directory" msgstr "دليل الوجهة" #: ../AMC-gui-choix_pages_impression.glade:356 msgid "Select destination directory for printable files" msgstr "اختيار مجلد حفظ الملفات القابلة للطباعة" #: ../AMC-gui-choix_postcorrect.glade:20 msgid "Post-correction" msgstr "التصحيح" #: ../AMC-gui-choix_postcorrect.glade:95 msgid "Please enter the teacher score sheet number and copy number to get the correct answers from:" msgstr "فضلا ادخل رقم نموذج إجابة المدرس وعدد النسخ للحصول على الإجابات الصحيحة:" #: ../AMC-gui-choix_postcorrect.glade:189 msgid "Guess simple/multiple status" msgstr "" #: ../AMC-gui-choix_postcorrect.glade:194 msgid "Sets type of all questions for which 2 or more answers are ticked on the teacher answer sheet to multiple" msgstr "" #: ../AMC-gui-choix_projet.glade:18 msgid "Open a MC project" msgstr "فتح مشروع" #: ../AMC-gui-choix_projet.glade:61 ../AMC-gui-liste_dialog.glade:91 msgid "Cancel" msgstr "الغاء" #: ../AMC-gui-choix_projet.glade:104 ../AMC-gui-main_window.glade:2665 msgid "New project" msgstr "مشروع جديد" #: ../AMC-gui-choix_projet.glade:163 msgid "Rename" msgstr "تسمية" #: ../AMC-gui-choix_projet.glade:182 msgid "Clone" msgstr "استنساخ" #: ../AMC-gui-choix_projet.glade:278 msgid "Open an existing MC project:" msgstr "فتح مشروع موجود مسبقا:" #: ../AMC-gui-choix_projet.glade:345 msgid "Create an new project:" msgstr "انشاء مشروع جديد:" #: ../AMC-gui-choix_projet.glade:364 msgid "Project name:" msgstr "اسم المشروع:" #: ../AMC-gui-choix_projet.glade:398 msgid "Note : a project name can only contain alphanumeric characters, plus some simple characters (-_+.:)." msgstr "ملاحظة :اسم المشروع مكون من حروف, وبعض الرموز البسيطة (-_+.:)." #: ../AMC-gui-choose-mode.glade:10 msgid "Before starting data capture, please choose the mode corresponding to what you did with the printed questions." msgstr "قبل البدء بقراءة البيانات, فضلا حدد نظام المطابقة لكيفية التعامل مع الأسئلة المطبوعة." #: ../AMC-gui-choose_columns.glade:8 msgid "Choose columns to export" msgstr "اختر عمود لتصديره" #: ../AMC-gui-choose_columns.glade:65 msgid "Order and select the columns to include in the exported file:" msgstr "رتب وحدد الأعمدة التي ترغب بإرفاقها في ملف التصدير:" #: ../AMC-gui-choose_students.glade:13 msgid "Choose students" msgstr "اختيار الطالب" #: ../AMC-gui-choose_students.glade:70 msgid "Select the students for which you want to annotate the score sheet:" msgstr "اختيار الطلاب لرصد درجاتهم على الورقة:" #: ../AMC-gui-choose_students.glade:114 msgid "Search:" msgstr "بحث:" #: ../AMC-gui-cleanup.glade:13 ../AMC-gui-main_window.glade:2939 msgid "Cleanup" msgstr "تنظيف" #: ../AMC-gui-cleanup.glade:40 msgid "Remove selected files" msgstr "حذف الملفات المحددة" #: ../AMC-gui-cleanup.glade:71 msgid "To save disk space, you can remove some intermediate files from your project directory." msgstr "لحفظ مساحة القرص الصلب, يمكن حذف بعض الملفات الداخلية من مجلد المشروع." #: ../AMC-gui-edit_preferences.glade:230 ../AMC-gui-edit_preferences.glade:243 msgid "LaTeX models directory" msgstr "مسار نماذج لتيك" #: ../AMC-gui-edit_preferences.glade:232 msgid "Please select a directory containing LaTeX models for AMC, with their descriptions" msgstr "فضلا اختر المجلد الذي يحتوي نماذج لتيك الخاصة بأمسي, مع التوصيفات الخاصة بها" #: ../AMC-gui-edit_preferences.glade:255 msgid "Projects directory. May be modified only if there are no opened projects." msgstr "مسار المشاريع . يمكن تعديله فقط إذا كانت جميع المشاريع مغلقة." #: ../AMC-gui-edit_preferences.glade:257 msgid "Please select the projects directory" msgstr "فضلا اختر مسار المشاريع" #: ../AMC-gui-edit_preferences.glade:268 msgid "Projects directory" msgstr "مسار المشاريع" #: ../AMC-gui-edit_preferences.glade:283 msgid "Directories" msgstr "المسارات" #: ../AMC-gui-edit_preferences.glade:315 msgid "PDF files" msgstr "ملفات PDF" #: ../AMC-gui-edit_preferences.glade:326 msgid "Images" msgstr "الصور" #: ../AMC-gui-edit_preferences.glade:337 msgid "CSV data files" msgstr "ملفات بيانات CSV" #: ../AMC-gui-edit_preferences.glade:348 msgid "OpenOffice files" msgstr "ملفات اوبن اوفس" #: ../AMC-gui-edit_preferences.glade:359 msgid "XML files" msgstr "ملفات XML" #: ../AMC-gui-edit_preferences.glade:370 msgid "Command to edit LaTeX files" msgstr "أوامر تحرير ملفات لتيك" #: ../AMC-gui-edit_preferences.glade:371 msgid "LaTeX editor" msgstr "محرر لتيك" #: ../AMC-gui-edit_preferences.glade:382 msgid "Plain text editor" msgstr "محرر النصوص" #: ../AMC-gui-edit_preferences.glade:393 msgid "Command for directory browsing (string %d will be replaced by the directory path before execution)" msgstr "أمر استعراض المسار (سيتم استبدال مسار الدليل قبل التنفيذ بالقيمة %d )" #: ../AMC-gui-edit_preferences.glade:394 msgid "File browser" msgstr "ملف المتصفح" #: ../AMC-gui-edit_preferences.glade:405 msgid "Web browser" msgstr "المتصفح" #: ../AMC-gui-edit_preferences.glade:534 msgid "Visualisation commands" msgstr "أوامر التحكم" #: ../AMC-gui-edit_preferences.glade:565 msgid "Default LaTeX engine" msgstr "محرك لتيك الافتراضي" #: ../AMC-gui-edit_preferences.glade:576 msgid "Default command to compile LaTeX file and make PDF, PS or DVI output (may be changed for each project)." msgstr "الأمر الافتراضي لتصيير ملف لتيك إلى PDF, PS أو DVI (ربما يتم التعديل على كل المشروع)" #: ../AMC-gui-edit_preferences.glade:599 msgid "External programs" msgstr "البرامج الخارجية" #: ../AMC-gui-edit_preferences.glade:631 ../AMC-gui-edit_preferences.glade:4238 msgid "Students list charset" msgstr "محارف قائمة الطلاب" #: ../AMC-gui-edit_preferences.glade:642 msgid "CSV charset" msgstr "CSV محارف" #: ../AMC-gui-edit_preferences.glade:653 msgctxt "option name. Refers to a list of headers that may contain surnames in the CSV names list" msgid "CSV surname headers" msgstr "رأس اللقب CSV" #: ../AMC-gui-edit_preferences.glade:664 msgctxt "option name. Refers to a list of headers that may contain names in the CSV names list." msgid "CSV name headers" msgstr "رأس الاسم CSV" #: ../AMC-gui-edit_preferences.glade:675 msgid "LaTeX files charset" msgstr "محارف ملفات لتيك" #: ../AMC-gui-edit_preferences.glade:686 msgid "Default encoding for the students list file." msgstr "الترميز الافتراضي الخاص بملف قائمة الطلاب." #: ../AMC-gui-edit_preferences.glade:705 msgid "Default charset for AMC CSV output." msgstr "الترميز الافتراضي الخاصة بملفات CSV المنتجة." #: ../AMC-gui-edit_preferences.glade:724 msgid "Comma separated list of CSV headers of columns that may contain the surnames of the students in the names list file." msgstr "فاصلة فصل قائمة رؤوس CSV الأعمدة التي قد تحتوي على ألقاب الطلاب في ملف قائمة الأسماء." #: ../AMC-gui-edit_preferences.glade:738 msgid "Comma separated list of CSV headers of columns that may contain the names of the students in the names list file." msgstr "فاصلة فصل قائمة رؤوس CSV من الأعمدة التي قد تحتوي على أسماء الطلاب في ملف قائمة الأسماء." #: ../AMC-gui-edit_preferences.glade:752 msgid "Charset used when producing LaTeX files from models." msgstr "الترميز المستخدم لإنتاج ملفات لتيك المنتجة من النماذج." #: ../AMC-gui-edit_preferences.glade:769 msgid "Decimal delimiter" msgstr "الفاصلة العشرية" #: ../AMC-gui-edit_preferences.glade:797 msgid "ASCII filenames" msgstr "أسماء الملفات ASCII" #: ../AMC-gui-edit_preferences.glade:809 msgid "Force all annotated completed student sheets to have only ASCII characters in their file names. When set, all non-ASCII characters will be replaced by underscores." msgstr "تسمية ملفات رصد الدرجات بحروف كودية ASCII . وعند تعيينه, سيتم استبدال جميع الحروف التي تنتمي ل ASCII بشرطة تحتية, هذا الخيار لا يدعم العربية." #: ../AMC-gui-edit_preferences.glade:821 msgid "Accept non-ASCII project names" msgstr "" #: ../AMC-gui-edit_preferences.glade:848 msgid "Internationalization" msgstr "عالمي" #: ../AMC-gui-edit_preferences.glade:880 msgid "Printing method" msgstr "طريقة الطباعة" #: ../AMC-gui-edit_preferences.glade:891 msgid "Printing command" msgstr "أمر الطباعة" #: ../AMC-gui-edit_preferences.glade:913 msgid "Useful printing options" msgstr "خيارات الطباعة المستخدمة" #: ../AMC-gui-edit_preferences.glade:941 msgid "Command to print one paper (with stapling). String %f will be replaced by the PDF file to be printed." msgstr "أمر طباعة ورقة واحدة (مع التدبيس). السلسلة %f سوف تستبدل بملف PDF لطباعته." #: ../AMC-gui-edit_preferences.glade:984 msgid "Printing" msgstr "الطباعة" #: ../AMC-gui-edit_preferences.glade:1016 msgid "Number of processes" msgstr "عدد المعالجات" #: ../AMC-gui-edit_preferences.glade:1027 msgid "Number of processes to be run in parallel. Default value is 0, which allows to start as many processes as processors." msgstr "عدد المعالجات لتعمل بالتوازي لتسريع التصحيح. القيمة الافتراضية 0 , إذا وجد معالج واحد." #: ../AMC-gui-edit_preferences.glade:1044 msgid "System" msgstr "النظام" #: ../AMC-gui-edit_preferences.glade:1065 msgid "Main" msgstr "الرئيسية" #: ../AMC-gui-edit_preferences.glade:1094 ../AMC-gui-main_window.glade:2771 msgid "Solution" msgstr "الاجابة" #: ../AMC-gui-edit_preferences.glade:1110 ../AMC-gui-main_window.glade:2783 msgid "Individual solution" msgstr "حل فردي" #: ../AMC-gui-edit_preferences.glade:1125 ../AMC-gui-main_window.glade:2759 msgid "Catalog" msgstr "الفهرس" #: ../AMC-gui-edit_preferences.glade:1147 msgid "Optional working documents to build" msgstr "خيار بناء وثائق العمل" #: ../AMC-gui-edit_preferences.glade:1170 ../AMC-gui-main_window.glade:394 msgid "Documents" msgstr "المستندات" #: ../AMC-gui-edit_preferences.glade:1213 msgid "Limit MSE" msgstr "حد نسبة الخطأ" #: ../AMC-gui-edit_preferences.glade:1224 msgid "Limit sensitivity" msgstr "حد الحساسية" #: ../AMC-gui-edit_preferences.glade:1265 msgid "Colouring thresholds" msgstr "عتبات الالوان" #: ../AMC-gui-edit_preferences.glade:1299 msgid "No answers color" msgstr "لا لون إجابة" #: ../AMC-gui-edit_preferences.glade:1310 msgid "Invalid answers color" msgstr "لون الإجابة غير الصالحة" #: ../AMC-gui-edit_preferences.glade:1347 msgid "Scan view" msgstr "عرض المسح" #: ../AMC-gui-edit_preferences.glade:1379 msgid "Maximum density for manual data capture question paper rendering (DPI)" msgstr "الكثافة النقطية القصوى لتصيير أوراق الإجابة المقروءة يدويا (DPI)" #: ../AMC-gui-edit_preferences.glade:1380 msgid "Manual capture density (DPI)" msgstr "كثافة المقرؤة يدويا (DPI)" #: ../AMC-gui-edit_preferences.glade:1391 msgid "Image type" msgstr "نوع الصورة" #: ../AMC-gui-edit_preferences.glade:1402 msgid "Remember window size" msgstr "تذكر حجم النافذة" #. Label in the preferences window, corresponding to "Starting number of columns for names in the manual association window". #: ../AMC-gui-edit_preferences.glade:1413 msgid "Number of columns for names" msgstr "عدد أعمدة الأسماء" #. Label in the preferences window, corresponding to the "Number of columns for zoomed boxes in the zooms window (opened from the Diagnosis list in the Data capture tab)". #: ../AMC-gui-edit_preferences.glade:1424 msgid "Number of columns for zoomes boxes" msgstr "عدد أعمدة المربعات المكبرة" #: ../AMC-gui-edit_preferences.glade:1448 msgid "Temporary file type used for manual data capture. Fastest choice is (none), but this seems to be problematic in some environments." msgstr "نوع الملف المؤقت يستخدم لقراءة البيانات يدويا . أسرع خيار هو (لا شئ), لكن هذا سيسبب بعض المشاكل في بعض الحالات." #: ../AMC-gui-edit_preferences.glade:1467 msgid "Do you want to keep the same window size each time you start AMC?" msgstr "هل ترغب بحفظ حجم الشاشة الحالي في كل مرة تشغل فيها آمسي؟" #: ../AMC-gui-edit_preferences.glade:1480 msgid "Starting number of columns for names in the manual association window." msgstr "رقم عمود البدء لربط الأسماء في نافذة الربط اليدوي." #: ../AMC-gui-edit_preferences.glade:1497 msgid "Number of columns for zoomed boxes in the zooms window (opened from the Diagnosis list in the Data capture tab)." msgstr "عدد أعمدة المربعات المكبرة في نافذة التكبير ( التي تفتح بزر التكبير في لسان التبويب قراءة البيانات)." #: ../AMC-gui-edit_preferences.glade:1518 msgid "Miscellaneous" msgstr "أخرى" #: ../AMC-gui-edit_preferences.glade:1549 msgid "Notify the user at the end of the following actions:" msgstr "الإخطار المستخدم عند نهاية الإجراء التالي:" #. One of the "notify the user at the end of the following actions" checkbox: for documents update. #: ../AMC-gui-edit_preferences.glade:1568 msgid "Documents update" msgstr "تحديث المستندات" #. One of the "notify the user at the end of the following actions" checkbox: for computing marks. #: ../AMC-gui-edit_preferences.glade:1600 msgid "Grading" msgstr "الدرجات" #. One of the "notify the user at the end of the following actions" checkbox: for completed answer sheets annotation. #: ../AMC-gui-edit_preferences.glade:1616 #: ../AMC-gui-edit_preferences.glade:3137 msgid "Annotation" msgstr "الرصد" #: ../AMC-gui-edit_preferences.glade:1641 msgid "Notify using:" msgstr "الإخطار المستخدم:" #: ../AMC-gui-edit_preferences.glade:1660 msgid "Desktop notifications" msgstr "إخطارات سطح المكتب" #: ../AMC-gui-edit_preferences.glade:1696 msgid "Command:" msgstr "الأمر:" #: ../AMC-gui-edit_preferences.glade:1708 msgid "Command that will be called as a user notification. %m will be replaced by AMC's message, and %a by AMC completed action." msgstr "الأمر الذي سيستبدل بإخطار للمستخدم. %m سوف يستبدل برسالة البرنامج , و %a بإكمال الإجراء." #: ../AMC-gui-edit_preferences.glade:1737 msgid "Notifications" msgstr "الاخطارات" #: ../AMC-gui-edit_preferences.glade:1761 msgid "Display" msgstr "العرض" #: ../AMC-gui-edit_preferences.glade:1804 msgid "Vector formats density (DPI)" msgstr "كثافة الصورة المتجهية (DPI)" #: ../AMC-gui-edit_preferences.glade:1815 msgid "Black&white conversion threshold" msgstr "العتبة اللونية للأبيض والاسود" #: ../AMC-gui-edit_preferences.glade:1826 msgid "Erease red from scans" msgstr "إزالة الأحمر من الأوراق الممسوحة" #: ../AMC-gui-edit_preferences.glade:1837 msgid "Force conversion" msgstr "تحويل اجباري" #: ../AMC-gui-edit_preferences.glade:1848 msgid "Density used when converting vector format scans (PDF, EPS) into bitmap." msgstr "كثافة تستخدم عند التحويل من الصور الممسوحة بصيغة متجهية (PDF, EPS) إلى صيغة نقطية." #: ../AMC-gui-edit_preferences.glade:1863 msgid "Threshold used when converting scans to black and white. Value 0.0 means all white, value 1.0 means all black." msgstr "العتبة اللونية تستخدم عند تحويل الأوراق الممسوحة للأبيض والأسود. القيمة 0 تعني الكل ابيض, والقيمة 1 تعني الكل اسود." #: ../AMC-gui-edit_preferences.glade:1881 msgid "When set, AMC will erease red color from the color scans before automatic data capture. This can be useful if the boxes are drawn in red." msgstr "عند تعيينه, سيقوم البرنامج بمسح الصناديق والحروف الحمراء من الأوراق الممسوحة قبل القراءة الآلية للبيانات. هذا الخيار عملي إذا كانت المربعات بلون أحمر." #: ../AMC-gui-edit_preferences.glade:1896 msgid "With this option, all scan files will be converted with ImageMagick. This can slow down scans processing, but may allow some unusual file formats to be processed successfully." msgstr "مع هذا الخيار, كل الصور الممسوحة سيتم معالجتها ببرنامج اميج ماجيك. وهذا قد يسبب بعض البطء أثناء معالجة الصور الممسوحة, لكنها تسمح بمعالجة بعض صيغ الملفات بنجاح." #: ../AMC-gui-edit_preferences.glade:1913 msgid "Scans conversion" msgstr "تحويل الصور" #: ../AMC-gui-edit_preferences.glade:1945 msgid "Marks size max increase" msgstr "أقصى زيادة في حجم النقاط" #: ../AMC-gui-edit_preferences.glade:1956 msgid "Marks size max decrease" msgstr "أقصى نقصان في حجم النقاط" #: ../AMC-gui-edit_preferences.glade:1967 #: ../AMC-gui-edit_preferences.glade:2490 msgid "Can be customized on a per-project basis in the Project tab." msgstr "يمكنك تخصيص كل مشروع على حدة في لسان تبويب المشروع." #: ../AMC-gui-edit_preferences.glade:1968 msgid "Default darkness threshold" msgstr "عتبة الإظلام الافتراضية" #: ../AMC-gui-edit_preferences.glade:1979 msgid "Default upper darkness threshold" msgstr "عتبة الإظلام الافتراضية" #: ../AMC-gui-edit_preferences.glade:1990 msgid "Proportion of the box (on the scan) that is measured to compute its blackness." msgstr "قياس شدة سواد المربعات (في الأوراق الممسحة)." #: ../AMC-gui-edit_preferences.glade:1991 msgid "Measured box proportion" msgstr "قياس سواد المربعات" #: ../AMC-gui-edit_preferences.glade:2002 msgid "Process scans with 3 corner marks" msgstr "معالجة الصور الممسوحة ب 3 علامات ركنية" #: ../AMC-gui-edit_preferences.glade:2013 msgid "Maximum increase (proportion: 0.1 means 10%) allowed for corner marks after printing/scanning process." msgstr "زيادة الحد الأقصى (نسبة : 0،1 تعني 10 ٪) تسمح للعلامات الزاوية بعد عملية الطباعة / المسح." #: ../AMC-gui-edit_preferences.glade:2030 msgid "Maximum decrease (proportion: 0.1 means 10%) allowed for corner marks after printing/scanning process." msgstr "زيادة الحد الأدنى (نسبة : 0،1 تعني 10 ٪) تسمح للعلامات الزاوية بعد عملية الطباعة / المسح." #: ../AMC-gui-edit_preferences.glade:2047 msgid "If black proportion is greater than this value, the box will be considered as beeing ticked. This is a default value, it can be changed in each project." msgstr "اذا كانت نسبة التظليل أكبر من هذه القيمة, سيعتبر المربع معلّم . هذه هي القيمة الافتراضية , ويمكن تعديلها لكل مشروع على حده." #: ../AMC-gui-edit_preferences.glade:2093 msgid "Do you want to process scans with 3 corner circles only?" msgstr "هل ترغب بمعالجة الصور الممسوحة ب 3 دوائر ركنية فقط؟" #: ../AMC-gui-edit_preferences.glade:2110 msgid "Detection parameters" msgstr "معطيات الفحص" #: ../AMC-gui-edit_preferences.glade:2166 msgid "These options are used when creating a new project. See the project tab for more details." msgstr "" #: ../AMC-gui-edit_preferences.glade:2173 #: ../AMC-gui-edit_preferences.glade:3760 msgid "Minimal mark" msgstr "أدنى النقاط" #: ../AMC-gui-edit_preferences.glade:2184 #: ../AMC-gui-edit_preferences.glade:3771 msgid "Floor mark" msgstr "علامة ارضية" #: ../AMC-gui-edit_preferences.glade:2195 #: ../AMC-gui-edit_preferences.glade:3782 msgid "Maximal mark" msgstr "أعلى النقاط" #: ../AMC-gui-edit_preferences.glade:2206 #: ../AMC-gui-edit_preferences.glade:3793 msgid "Grain" msgstr "درجة السؤال" #: ../AMC-gui-edit_preferences.glade:2217 #: ../AMC-gui-edit_preferences.glade:3804 msgid "Rounding type" msgstr "تقريب الدرجة" #: ../AMC-gui-edit_preferences.glade:2272 #: ../AMC-gui-edit_preferences.glade:3891 msgid "ceil" msgstr "السقف" #: ../AMC-gui-edit_preferences.glade:2312 #, fuzzy msgid "Default marking options" msgstr "المحتوى الإفتراضي" #: ../AMC-gui-edit_preferences.glade:2329 ../AMC-gui-main_window.glade:1943 msgid "Marking" msgstr "تصحيح" #: ../AMC-gui-edit_preferences.glade:2372 msgid "Max size" msgstr "الحجم الأقصى" #: ../AMC-gui-edit_preferences.glade:2383 msgid "Image format" msgstr "هيئة الصورة" #: ../AMC-gui-edit_preferences.glade:2394 msgid "JPEG quality" msgstr "JPEG جودة" #: ../AMC-gui-edit_preferences.glade:2454 msgid "Scans" msgstr "الصور الممسوحة" #: ../AMC-gui-edit_preferences.glade:2492 msgid "Default header text" msgstr "نص الرأس الافتراضي" #: ../AMC-gui-edit_preferences.glade:2513 #: ../AMC-gui-edit_preferences.glade:3976 msgid "Text to be written on annotated sheets header. Use %S for score, %M for max score, %s for grade, %m for max grade, and %(col) for content of the column col in the students list file." msgstr "نص الرصد الذي يطبع أعلى الورقة. يستخدم %S للدرجة, و %M للنقاط, و %s للدرجة, و %m لاعلى درجة, و %(col) لعمود ملف قائمة اسماء الطلاب." #: ../AMC-gui-edit_preferences.glade:2553 msgid "Default writing direction" msgstr "الاتجاه الافتراضي للكتابة" #: ../AMC-gui-edit_preferences.glade:2564 msgid "Default questions annotation" msgstr "حاشية الأسئلة الافتراضية" #: ../AMC-gui-edit_preferences.glade:2575 #, fuzzy msgid "Default cancelled questions annotation" msgstr "حاشية الأسئلة الافتراضية" #: ../AMC-gui-edit_preferences.glade:2585 #: ../AMC-gui-edit_preferences.glade:4050 msgid "right to left" msgstr "محاذاة لليمين" #: ../AMC-gui-edit_preferences.glade:2639 msgid "Header" msgstr "الرأس" #: ../AMC-gui-edit_preferences.glade:2671 msgid "Significant digits" msgstr "عدد الخانات" #: ../AMC-gui-edit_preferences.glade:2682 msgid "Number of significant digits to display for marks when annotating papers." msgstr "عدد الخانات الرقمية عند رصد الدرجات على ورق الإجابة" #: ../AMC-gui-edit_preferences.glade:2703 msgid "Marks" msgstr "النقاط" #: ../AMC-gui-edit_preferences.glade:2740 msgid "Line width" msgstr "عرض الخط" #: ../AMC-gui-edit_preferences.glade:2751 msgid "Font" msgstr "الخط" #: ../AMC-gui-edit_preferences.glade:2762 msgid "Marks shift" msgstr "بعد النقاط" #: ../AMC-gui-edit_preferences.glade:2803 msgid "When marks are written on annotated papers left to the boxes, shifts to the left marks by this value. You can use mm or in as a unit." msgstr "بعد طباعة درجة رصد الدرجة يسار الإجابة, وزيادة القيمة تعني التحريك لليسار مسافة حرف واحد، ويمكن استخدام وحدة مم أو انش." #: ../AMC-gui-edit_preferences.glade:2832 msgid "To be ticked" msgstr "غير معلمّة" #: ../AMC-gui-edit_preferences.glade:2844 msgid "Ticked" msgstr "معلمّة" #: ../AMC-gui-edit_preferences.glade:2856 msgid "type" msgstr "النوع" #: ../AMC-gui-edit_preferences.glade:2868 msgid "colour" msgstr "اللون" #: ../AMC-gui-edit_preferences.glade:2880 #: ../AMC-gui-edit_preferences.glade:2891 #: ../AMC-gui-edit_preferences.glade:2924 #: ../AMC-gui-edit_preferences.glade:2946 msgid "no" msgstr "لا" #: ../AMC-gui-edit_preferences.glade:2902 #: ../AMC-gui-edit_preferences.glade:2913 #: ../AMC-gui-edit_preferences.glade:2935 #: ../AMC-gui-edit_preferences.glade:2957 msgid "yes" msgstr "نعم" #: ../AMC-gui-edit_preferences.glade:3088 msgid "Also annotate informative questions" msgstr "رصد بيانات الاسئلة" #: ../AMC-gui-edit_preferences.glade:3110 msgid "Symbols" msgstr "الرموز" #: ../AMC-gui-edit_preferences.glade:3185 msgid "Sender email" msgstr "مرسل البريد الالكتروني" #: ../AMC-gui-edit_preferences.glade:3196 msgid "Carbon copy address" msgstr "عنوان النسخة المطابقة" #: ../AMC-gui-edit_preferences.glade:3207 msgid "Blind Carbon copy address" msgstr "عنوان أعمى للنسخة المطابقة" #: ../AMC-gui-edit_preferences.glade:3260 msgid "Delay between sendings" msgstr "التأخير بين الإرسالات" #: ../AMC-gui-edit_preferences.glade:3295 msgid "Mail delivery method:" msgstr "طريقة إرسال البريد:" #: ../AMC-gui-edit_preferences.glade:3337 msgid "sendmail path" msgstr "مسار خادم البريد" #: ../AMC-gui-edit_preferences.glade:3373 msgid "SMTP host" msgstr "مضيف SMTP" #: ../AMC-gui-edit_preferences.glade:3384 msgid "SMTP port" msgstr "منفذ SMTP" #: ../AMC-gui-edit_preferences.glade:3424 #, fuzzy msgid "SMTP security" msgstr "مضيف SMTP" #: ../AMC-gui-edit_preferences.glade:3435 #, fuzzy msgid "SMTP user" msgstr "مضيف SMTP" #: ../AMC-gui-edit_preferences.glade:3472 #, fuzzy msgid "SMTP password" msgstr "منفذ SMTP" #: ../AMC-gui-edit_preferences.glade:3509 msgid "Sending emails" msgstr "إرسال البرد الإلكترونية" #: ../AMC-gui-edit_preferences.glade:3546 msgid "Default subject" msgstr "الموضوع الإفتراضي" #: ../AMC-gui-edit_preferences.glade:3588 msgid "Default content" msgstr "المحتوى الإفتراضي" #: ../AMC-gui-edit_preferences.glade:3612 msgid "Email" msgstr "البريد الالكتروني" #: ../AMC-gui-edit_preferences.glade:3638 msgid "Project preferences" msgstr "تفضيلات المشروع" #: ../AMC-gui-edit_preferences.glade:3670 msgid "Darkness threshold" msgstr "عتبة الإظلام" #: ../AMC-gui-edit_preferences.glade:3681 msgid "If black proportion is greater than this value, the box will be considered as beeing ticked. If students have been told to darken the boxes entirely, one can choose value 0.5. If students have been told to tick the boxes, values around 0.15 seems appropriate." msgstr "إذا كانت نسبة التظليل أكبر من هذه القيمة , سيعتبر المربع معلّم. إذا كانت تظليل الطلاب ضعيف يمكن استخدام قيمة 0.5 ، لكن في الغالب إن نسبة 0.15 تعتبر كافية." #: ../AMC-gui-edit_preferences.glade:3697 msgid "Upper darkness threshold" msgstr "عتبة الإظلام" #: ../AMC-gui-edit_preferences.glade:3708 #, fuzzy msgid "If black proportion is greater than this value, the box is considered as not ticked. Setting this threshold to a value less than one allows the students to cancel ticked boxes by filling them completely." msgstr "اذا كانت نسبة التظليل أكبر من هذه القيمة, سيعتبر المربع معلّم . هذه هي القيمة الافتراضية , ويمكن تعديلها لكل مشروع على حده." #: ../AMC-gui-edit_preferences.glade:3728 msgid "Automatic data capture" msgstr "قراءة الدرجات آليا" #: ../AMC-gui-edit_preferences.glade:3815 msgid "Mark associated with null score" msgstr "علامة مربوطة بدون درجة" #: ../AMC-gui-edit_preferences.glade:3829 msgid "Floor mark: any exam with a global mark less than this value will be given this mark. Let empty for no floor mark." msgstr "الدرجة الدنيا: أي ورقة تحصل على درجة أقل من هذه القيمة ستمنح هذه الدرجة. لإلغاء هذه الخاصية اتركها فارغة." #: ../AMC-gui-edit_preferences.glade:3879 msgid "Mark to be given to a perfect sheet with all good answers (scaling the marks). Value 0 meens that you don't want to scale the marks." msgstr "لتكون قراءة الدرجات بشكل دقيق (وزن الدرجات). القيمة 0 تعني أنك لا ترغب بوزن الدرجات." #: ../AMC-gui-edit_preferences.glade:3896 msgid "When using SUF option in general grading scale, should marks be ceiled not to be larger than the maximum mark ?" msgstr "عند استخدام الخيار SUF في مقياس الدرجات العام, لن يكون سقف الدرجات أعلى من الدرجة القصوى ؟" #: ../AMC-gui-edit_preferences.glade:3920 msgid "Global mark rules" msgstr "قواعد احتساب الدرجات" #: ../AMC-gui-edit_preferences.glade:3956 msgid "Header text" msgstr "نص الرأس" #: ../AMC-gui-edit_preferences.glade:4007 msgid "Writing direction" msgstr "اتجاه الكتابة" #: ../AMC-gui-edit_preferences.glade:4018 msgid "Questions marks position" msgstr "موقع طباعة الدرجات" #: ../AMC-gui-edit_preferences.glade:4029 msgid "Questions annotation text" msgstr "موقع درجات الاسئلة" #: ../AMC-gui-edit_preferences.glade:4040 #, fuzzy msgid "Cancelled questions annotation text" msgstr "موقع درجات الاسئلة" #: ../AMC-gui-edit_preferences.glade:4083 msgid "Text to be written for each question. This will be evaluated by perl, so quote it to make a single string. Use %S for score, %M for max score, and %s and %m for these values truncated to the requested number of significant digits." msgstr "الكود الذي نكتبه للأسئلة. سيتم معالجة بلغة بيرل، ولهذا يجب جعل كل متغير باسم مختلف. نستخدم %S للدرجة، و %M لأعلى درجة، و %s و %m لاظهار القيم الرقمية." #: ../AMC-gui-edit_preferences.glade:4097 msgid "Same as above, but for cancelled questions (when using allowempty)." msgstr "مثل الأعلى، لكن للأسئلة الملغية (عند السماح بالفارغ)." #: ../AMC-gui-edit_preferences.glade:4122 msgid "Papers annotation" msgstr "رصد الدرجات على اوراق الاجابة" #: ../AMC-gui-edit_preferences.glade:4206 msgid "Examination description" msgstr "وصف الاختبار" #: ../AMC-gui-edit_preferences.glade:4249 msgid "CSV files charset" msgstr "محارف ملفات CSV" #: ../AMC-gui-edit_preferences.glade:4260 msgid "Charset used for the students list file" msgstr "الترميز المستخدم لملف قائمة الطلاب" #: ../AMC-gui-edit_preferences.glade:4279 msgid "Charset for the CSV marks file produced by AMC." msgstr "الترميز المستخدم لملف الدرجات CSV ." #: ../AMC-gui-edit_preferences.glade:4302 msgid "Internationnalization" msgstr "الاعدادت الاقليمية" #: ../AMC-gui-edit_preferences.glade:4334 msgid "LaTeX engine" msgstr "محرك لتيك" #: ../AMC-gui-edit_preferences.glade:4345 msgid "Command to compile LaTeX file and make PDF, PS or DVI output." msgstr "امر تصيير ملفات لتيك إلى pdf , ps , dvi ." #: ../AMC-gui-edit_preferences.glade:4368 msgid "External commands" msgstr "أوامر خارجية" #: ../AMC-gui-edit_preferences.glade:4393 ../AMC-gui-main_window.glade:2923 #: ../AMC-gui-main_window.glade:3239 msgid "Project" msgstr "المشروع" #: ../AMC-gui-edit_preferences.glade:4413 msgid "AMC Preferences" msgstr "التفضيلات" #: ../AMC-gui-filter_details.glade:7 msgid "Formats details" msgstr "تفاصيل الهيئة" #: ../AMC-gui-filter_details.glade:66 msgid "AMC supports different formats for the source file. Here are some details about each of them." msgstr "آمسي يدعم هيئات مختلفة للملف المصدري. هنا بعض التفاصيل عن كل منها." #: ../AMC-gui-filter_details.glade:115 msgid "Description:" msgstr "الوصف:" #: ../AMC-gui-liste_dialog.glade:48 msgid "No names list" msgstr "لا توجد أسماء قوائم" #: ../AMC-gui-liste_dialog.glade:134 msgid "Apply" msgstr "تطبيق" #: ../AMC-gui-liste_dialog.glade:163 msgid "Choose your students names list file" msgstr "اختر ملف قائمة أسماء الطلاب" #: ../AMC-gui-mailing.glade:13 msgid "Mailing" msgstr "البريد" #: ../AMC-gui-mailing.glade:40 msgid "Send" msgstr "ارسال" #: ../AMC-gui-mailing.glade:75 msgid "Current project name %n:" msgstr "اسم المشروع الحالي %n:" #: ../AMC-gui-mailing.glade:149 msgid "Emails column:" msgstr "عمود البريد الإلكتروني:" #: ../AMC-gui-mailing.glade:184 msgid "Select failed" msgstr "فشل الاختيار" #: ../AMC-gui-mailing.glade:237 msgid "Addressees" msgstr "العناوين" #: ../AMC-gui-mailing.glade:274 msgid "Subject" msgstr "الموضوع" #: ../AMC-gui-mailing.glade:303 msgid "Enable HTML Tags" msgstr "تفعيل وسوم HTML ." #: ../AMC-gui-mailing.glade:345 msgid "Body" msgstr "الجسم" #: ../AMC-gui-mailing.glade:437 msgid "Attachments" msgstr "المرفقات" #: ../AMC-gui-main_window.glade:126 msgid "Updated" msgstr "التحديث" #: ../AMC-gui-main_window.glade:146 #, fuzzy msgid "Sensitivity" msgstr "الحساسية" #: ../AMC-gui-main_window.glade:156 #, fuzzy msgid "Scan file" msgstr "تعيين ملف" #: ../AMC-gui-main_window.glade:294 msgid "Number of papers:" msgstr "عدد الاوراق:" #: ../AMC-gui-main_window.glade:308 msgid "Number of papers to produce. Zero means taking into account the number written in the LaTeX source file." msgstr "عدد الاوراق المنتجة. صفر تعني الالتزام بالعدد المحدد في كود لتيك داخل الملف." #. TRANSLATORS: Use the character '_' before the key that can be used as a mnemonic (to activate documents update with Alt+key) #: ../AMC-gui-main_window.glade:343 #, fuzzy msgid "_Update documents" msgstr "تحديث المستندات" #: ../AMC-gui-main_window.glade:377 msgid "Question" msgstr "السؤال" #: ../AMC-gui-main_window.glade:543 msgid "Warnings" msgstr "تحذير" #: ../AMC-gui-main_window.glade:654 msgid "Print papers" msgstr "طباعة الاوراق" #: ../AMC-gui-main_window.glade:718 msgid "From papers' scans" msgstr "من الاوراق الممسوحة" #: ../AMC-gui-main_window.glade:740 ../AMC-gui-main_window.glade:1776 msgid "Automatic" msgstr "آلي" #: ../AMC-gui-main_window.glade:762 msgid "On screen with mouse" msgstr "على الشاشة بالفارة" #: ../AMC-gui-main_window.glade:784 ../AMC-gui-main_window.glade:1819 msgid "Manual" msgstr "يدوي" #: ../AMC-gui-main_window.glade:809 msgid "Data capture after examination" msgstr "قراءة البيانات بعد الاختبار" #: ../AMC-gui-main_window.glade:841 msgid "Missing pages" msgstr "أوراق مفقودة" #: ../AMC-gui-main_window.glade:913 msgid "Look at scans" msgstr "استعراض الأوراق الممسوحة" #: ../AMC-gui-main_window.glade:984 msgid "Forget" msgstr "" #: ../AMC-gui-main_window.glade:1001 #, fuzzy msgid "Look at pages" msgstr "استعراض الأوراق الممسوحة" #: ../AMC-gui-main_window.glade:1086 msgid "Pages:" msgstr "الصفحات:" #: ../AMC-gui-main_window.glade:1144 #, fuzzy msgid "Columns" msgstr "العمود" #. Label on the button used to open a window with the images of the boxes taken from the scan. This window can be used th check boxes categorization. #: ../AMC-gui-main_window.glade:1183 ../AMC-perl/AMC/Gui/Zooms.glade:13 msgid "Zooms" msgstr "التكبير" #: ../AMC-gui-main_window.glade:1188 msgid "Show images of the boxes from the scan, and check their categorization." msgstr "عرض صور المربعات من الأوراق الممسوحة, وتصنيفها." #. Label of the button used to open a window showing a scan with the place where corner marks have been detected, and the position where the boxes are supposed to be. #: ../AMC-gui-main_window.glade:1202 msgid "Layout" msgstr "التصميم" #: ../AMC-gui-main_window.glade:1207 msgid "Show where corner marks have been detected on the scan, and where boxes are supposed to be." msgstr "عرض المكان الذي سيتم فيه وضع علامات الأركان, وأين يفترض وضع مربعات المعرف." #. Label of the button used to delete data capture for selected pages. #: ../AMC-gui-main_window.glade:1221 msgid "Remove" msgstr "حذف" #: ../AMC-gui-main_window.glade:1225 msgid "Remove data capture for selected pages." msgstr "حذف البيانات المقروءة من الأوراق المحددة." #: ../AMC-gui-main_window.glade:1266 msgid "Diagnosis" msgstr "الفحص" #: ../AMC-gui-main_window.glade:1323 msgid "Update marking scale" msgstr "تحديث وزن الاسئلة" #: ../AMC-gui-main_window.glade:1327 msgid "Also update marking scale extraction from LaTeX source file" msgstr "أيضا تحديث مقياس استخراج الدرجات من ملف لتيك المصدري" #: ../AMC-gui-main_window.glade:1341 msgid "Mark papers" msgstr "تصحيح الاوراق" #: ../AMC-gui-main_window.glade:1394 msgid "Marking" msgstr "التصحيح" #: ../AMC-gui-main_window.glade:1419 msgid "Look at marks" msgstr "استعراض الدرجات" #: ../AMC-gui-main_window.glade:1500 msgid "Students list:" msgstr "قائمة الطلاب:" #: ../AMC-gui-main_window.glade:1548 msgid "Set file" msgstr "تعيين ملف" #: ../AMC-gui-main_window.glade:1596 msgid "Edit list" msgstr "تحرير قائمة" #: ../AMC-gui-main_window.glade:1638 msgid "Re-read" msgstr "اعادة القراءة" #: ../AMC-gui-main_window.glade:1704 msgid "Code name for automatic association:" msgstr "اسم الكود المستخدم لربط أوراق الإجابة بالطلاب آليا" #: ../AMC-gui-main_window.glade:1715 msgid "Primary key from this list:" msgstr "المفتاح الأساسي من هذه القائمة:" #: ../AMC-gui-main_window.glade:1738 msgid "Papers/students association:" msgstr "ربط أوراق الإجابة بالطلاب:" #: ../AMC-gui-main_window.glade:1858 msgid "Students identification" msgstr "معرفات الطلاب" #: ../AMC-gui-main_window.glade:2020 msgid "Export" msgstr "تصدير" #: ../AMC-gui-main_window.glade:2041 msgid "and" msgstr "و" #: ../AMC-gui-main_window.glade:2095 msgid "Sorting:" msgstr "فرز:" #: ../AMC-gui-main_window.glade:2121 msgid "include absentees" msgstr "إدراج الغائبين" #: ../AMC-gui-main_window.glade:2127 msgid "Should exported data include absentees?" msgstr "تأكيد تصدير البيانات متضمنة الغائبين؟" #: ../AMC-gui-main_window.glade:2207 msgid "Exports dir" msgstr "مسار التصدير" #: ../AMC-gui-main_window.glade:2239 msgid "Marks export" msgstr "تصدير النقاط" #: ../AMC-gui-main_window.glade:2322 msgid "File name model:" msgstr "اسم ملف النموذج:" #: ../AMC-gui-main_window.glade:2336 msgid "File name model used to make file names for PDF annotated papers, one by student. Keep empty in order to use student name." msgstr "حقل تسمية ملفات pdf , ولتسمية الملفات بأسماء الطلاب في حالة إتمام الربط, اترك هذا الحقل فارغ." #: ../AMC-gui-main_window.glade:2382 msgid "Annotate papers' scans with marking details." msgstr "رصد الدرجات على اوراق الطلاب" #: ../AMC-gui-main_window.glade:2404 msgid "Annotate papers" msgstr "رصد الدرجات" #: ../AMC-gui-main_window.glade:2428 msgid "Look at grouped files" msgstr "استعرض مجلد ملفات المجموعات" #: ../AMC-gui-main_window.glade:2451 msgid "Look" msgstr "استعراض" #: ../AMC-gui-main_window.glade:2482 msgid "Send..." msgstr "إرسال..." #: ../AMC-gui-main_window.glade:2511 msgid "Annotated papers" msgstr "الرصد على الاوراق" #: ../AMC-gui-main_window.glade:2534 msgid "Reports" msgstr "التقارير" #: ../AMC-gui-main_window.glade:2650 #, fuzzy msgid "Open project" msgstr "فتح مشروع" #: ../AMC-gui-main_window.glade:2691 #, fuzzy msgid "Save project" msgstr "مشروع جديد" #: ../AMC-gui-main_window.glade:2721 msgid "Menu" msgstr "" #: ../AMC-gui-main_window.glade:2799 ../AMC-gui-main_window.glade:2838 #: ../AMC-gui-main_window.glade:2877 #, fuzzy msgid "Update the document" msgstr "تحديث المستندات" #: ../AMC-gui-main_window.glade:2813 ../AMC-gui-main_window.glade:2852 #: ../AMC-gui-main_window.glade:2891 #, fuzzy msgid "Open the document" msgstr "تحديث المستندات" #: ../AMC-gui-main_window.glade:2953 msgid "Export as template" msgstr "تصدير كنموذج" #: ../AMC-gui-main_window.glade:2967 msgid "User templates" msgstr "نماذج المستخدم" #: ../AMC-gui-main_window.glade:2992 msgid "Manage" msgstr "ادارة" #: ../AMC-gui-main_window.glade:3017 ../AMC-gui-main_window.glade:3267 #, fuzzy msgid "Help" msgstr "_مساعدة" #: ../AMC-gui-main_window.glade:3033 msgid "About" msgstr "" #: ../AMC-gui-main_window.glade:3047 #, fuzzy msgid "Cancel learning…" msgstr "الغاء التدريب..." #: ../AMC-gui-main_window.glade:3058 msgid "Debugging" msgstr "التتبع" #: ../AMC-gui-main_window.glade:3076 msgid "Bug report" msgstr "تقرير الاخطاء" #: ../AMC-gui-main_window.glade:3090 ../AMC-gui-main_window.glade:3115 msgid "Documentation" msgstr "التوثيق" #: ../AMC-gui-main_window.glade:3184 ../AMC-gui-main_window.glade:3253 msgid "Plugins" msgstr "الإضافات" #: ../AMC-gui-main_window.glade:3200 msgid "Browse" msgstr "" #: ../AMC-gui-main_window.glade:3214 #, fuzzy msgid "Install plugin" msgstr "تركيب إضافة." #: ../AMC-gui-make_template.glade:8 msgid "Save as a template" msgstr "حفظ كنموذج" #: ../AMC-gui-make_template.glade:64 msgid "To make a new template from your project, describe it below:" msgstr "إنشاء نموذج من مشروعك، اكتب الوصف هنا:" #: ../AMC-gui-make_template.glade:86 msgid "File name:" msgstr "اسم الملف:" #: ../AMC-gui-make_template.glade:117 msgid "Note: please use only alphanumeric characters and characters from \"-_+\" for the template file name." msgstr "ملاحظة :فضلا سم المشروع المصدر باسم مكون من حروف و رمز من الرموز التالية \"-_+\" ." #: ../AMC-gui-make_template.glade:143 msgid "Short name:" msgstr "الاسم المختصر:" #: ../AMC-gui-make_template.glade:202 msgid "Description:" msgstr "الوصف:" #: ../AMC-gui-make_template.glade:304 msgid "Included files:" msgstr "الملفات المدرجة:" #: ../AMC-gui-overwritten.glade:49 msgid "List of pages with overwritten data:" msgstr "" #: ../AMC-gui-saisie_auto.glade:8 msgid "Please select all papers' scans" msgstr "فضلا اختر كل الأوراق الممسوحة" #: ../AMC-gui-saisie_auto.glade:10 msgid "Automatic data capture" msgstr "قراءة البيانات آليا" #: ../AMC-gui-saisie_auto.glade:27 msgid "Proceed to data capture from scans with button OK" msgstr "للبدء في قراءة البيانات من الأوراق الممسوحة فضلا انقر الزر" #: ../AMC-gui-saisie_auto.glade:82 msgid "Copy to project directory (recommended)" msgstr "نسخ إلى مسار المشروع (مفضل)" #: ../AMC-gui-saisie_auto.glade:88 ../AMC-gui-saisie_auto.glade:89 msgid "Copy all scans to scans sub-directory in project directory" msgstr "نسخ كل الأوراق الممسوحة للمجلد الفرعي في مجلد المشروع" #: ../AMC-gui-saisie_auto.glade:156 msgid "Use this setting to be sure that the exam copy IDs allocated to the pages of the scans you selected will be consecutive numbers, in the same order as the pages." msgstr "سيتم استخدام هذا الإعداد للتأكد من أن معرفات أوراق الإجابة الممسوحة التي حددتها مرتبة بشكل متتالي, بنفس الترتيب كما في الأوراق." #: ../AMC-gui-saisie_auto.glade:172 msgid "Options" msgstr "الإعدادات" #: ../AMC-gui-source_latex_choix.glade:8 msgid "Choose LaTeX source file" msgstr "اختيار ملف لتيك المصدري" #: ../AMC-gui-source_latex_choix_zip.glade:8 msgid "ZIP file choice" msgstr "ملف مضغوط" #: ../AMC-gui-source_latex_dialog.glade:7 msgid "Choose LaTeX source" msgstr "اختر مصدر لتيك" #: ../AMC-gui-source_latex_dialog.glade:62 msgid "" "A multiple choice project is mainly made of a source file, which describes the questionnaire.\n" "Please choose your situation:" msgstr "" "ملفات برنامج AMC مبنية بشكل أساسي من ملف مصدري, يحتوي مواصفات الأسئلة. \n" "فضلا اختر نوع الملف:" #: ../AMC-gui-source_latex_dialog.glade:105 msgid "Template" msgstr "النموذج" #: ../AMC-gui-source_latex_dialog.glade:119 msgid "You did not write any description of the questionnaire, and want to start from a template." msgstr "لم يتم كتابة أي وصف للأسئلة، وترغب في البدء بنموذج." #: ../AMC-gui-source_latex_dialog.glade:171 msgid "File" msgstr "ملف" #: ../AMC-gui-source_latex_dialog.glade:185 msgid "You already wrote a questionnaire description, and want to use it for this project." msgstr "لقد قمت بكتابات مواصفات الأسئلة, وتريد استخدامها في هذا المشروع." #: ../AMC-gui-source_latex_dialog.glade:237 msgid "Empty" msgstr "فارغ" #: ../AMC-gui-source_latex_dialog.glade:251 msgid "You want to write the description from zero." msgstr "تريد كتابة التصميم من الصفر." #: ../AMC-gui-source_latex_dialog.glade:303 msgid "Archive" msgstr "الارشيف" #: ../AMC-gui-source_latex_dialog.glade:317 msgid "You have a .tgz or .zip file containing the questionnaire and other related stuff, coming from a third party software or a backup." msgstr "لديك ملف مضغوط بصيغة tgz أو zip ويحتوي على ملفات مشروع أو نسخة احتياطية." #: ../AMC-gui-source_latex_modele.glade:8 msgid "Template selection" msgstr "النموذج المختار" #: ../AMC-gui-unrecognized.glade:8 msgid "Preprocess" msgstr "قبل المعالجة" #: ../AMC-gui-unrecognized.glade:14 msgid "Delete" msgstr "" #: ../AMC-gui-unrecognized.glade:29 msgid "Unrecognized scans" msgstr "أوراق غير معروفة" #: ../AMC-gui-unrecognized.glade:71 msgid "Scans list" msgstr "قائمة الأوراق الممسوحة:" #: ../AMC-gui-unrecognized.glade:237 msgid "Original scan" msgstr "المسح الأصلي" #: ../AMC-gui-unrecognized.glade:266 msgid "Preprocessed" msgstr "قبل المعالجة" #: ../AMC-perl/AMC/Gui/Association.glade:14 msgid "Manual association" msgstr "ربط يدوي" #. This is the label of the check button that controls wheter the auto-completion for students names will be made looking at the beginnig of the names or at the whole names. #: ../AMC-perl/AMC/Gui/Association.glade:84 msgid "beginning" msgstr "بداية" #: ../AMC-perl/AMC/Gui/Association.glade:89 msgid "Is auto-completion looking at the beginning of the names only?" msgstr "هل يبحث الإكمال التلقائي في بدايات الأسماء فقط ؟" #: ../AMC-perl/AMC/Gui/Association.glade:157 msgid "Show all" msgstr "عرض الكل" #: ../AMC-perl/AMC/Gui/Association.glade:361 msgid "associated" msgstr "ربط" #: ../AMC-perl/AMC/Gui/Association.glade:366 msgid "Unticking this box, you see only non-associated papers. Tick it to be able to check already associated papers." msgstr "مسح العلامة, يظهر الأوراق غير المربوطة فقط. ووضع العلامة لتفعيل الربط." #: ../AMC-perl/AMC/Gui/Association.glade:411 msgid "Remove manual association for this paper" msgstr "حذف الربط يدويا لهذه الورقة" #: ../AMC-perl/AMC/Gui/Association.glade:427 msgid "Tell the system that this papers does not correspond to any of the students from the list." msgstr "إخبار النظام بأن هذه الورقة لا تخص أي من الطلاب في القائمة." #: ../AMC-perl/AMC/Gui/Association.glade:449 msgid "Unknown" msgstr "مجهول" #: ../AMC-perl/AMC/Gui/Association.glade:509 msgid "Save associations." msgstr "حفظ الربط." #: ../AMC-perl/AMC/Gui/Manuel.glade:18 msgid "Paper data capture" msgstr "قراءة بيانات الاوراق" #: ../AMC-perl/AMC/Gui/Manuel.glade:39 ../AMC-perl/AMC/Gui/Manuel.glade:236 msgid "Go to:" msgstr "الذهاب إلى:" #: ../AMC-perl/AMC/Gui/Manuel.glade:51 ../AMC-perl/AMC/Gui/Manuel.glade:248 msgid "Enter paper number, or page number like 102/4 (page 4 from paper 102), then press enter." msgstr "اكتب رقم ورقة الإجابة مثل 102/4(صفحة 4 من 102 صفحة) , ثم انقر على زر إدخال." #: ../AMC-perl/AMC/Gui/Manuel.glade:82 msgid "Go to the previous page." msgstr "العودة للصفحة السابقة" #: ../AMC-perl/AMC/Gui/Manuel.glade:100 msgid "Quit" msgstr "اغلاق" #: ../AMC-perl/AMC/Gui/Manuel.glade:118 msgid "Go to next page." msgstr "الذهاب للصفحة التالية" #: ../AMC-perl/AMC/Gui/Manuel.glade:282 msgid "Save this page modifications, then go to the previous page." msgstr "حفظ التعديلات في هذه الورقة, ثم الانتقال للورقة السابقة." #: ../AMC-perl/AMC/Gui/Manuel.glade:296 msgid "Choose if you want to navigate through all pages, through pages with invalid answers, or through pages with invalid or empty answers." msgstr "اختر إذا اردت العبور خلال كل الصفحات، أو خلال صفحات بإجابات غير صالحة، أو خلال صفحات بإجابات فارغة." #: ../AMC-perl/AMC/Gui/Manuel.glade:318 msgid "Save this page modifications, then go to next page." msgstr "حفظ التعديلات في هذه الصفحة, ثم الانتقال للورقة التالية." #: ../AMC-perl/AMC/Gui/Manuel.glade:344 #, fuzzy msgid "Focus on question:" msgstr "الاختيار خارج السؤال" #: ../AMC-perl/AMC/Gui/Manuel.glade:429 msgid "Remove manual modifications for this page. Automatic data capture for this page, if any, won't be changed." msgstr "حذف التعديلات اليدوية في هذه الصفحة. أو التعديل على القراءة الآلية للصفحة , أو للتعديل." #: ../AMC-perl/AMC/Gui/Manuel.glade:458 msgid "Cancel modifications for this page" msgstr "إلغاء التعديلات على هذه الصفحة" #: ../AMC-perl/AMC/Gui/Manuel.glade:476 msgid "Save and quit" msgstr "حفظ ثم اغلاق" #: ../AMC-perl/AMC/Gui/Zooms.glade:135 msgid "Unchecked boxes" msgstr "المربعات غير المعلّمة" #: ../AMC-perl/AMC/Gui/Zooms.glade:203 msgid "Checked boxes" msgstr "المربعات المعلّمة" #: ../AMC-perl/AMC/Gui/Zooms.glade:281 msgid "Toggle mode. With 'click', left-click to toggle and right-click to toggle a group." msgstr "وضع التبديل، مع النقر, بالزر الأيسر أو وضع المجموعة بالنقر بالزر الأيمن." #~ msgid "" #~ "Names list file for this project is:\n" #~ "%s" #~ msgstr "" #~ "ملف قائمة الاسماء لهذا المشروع:\n" #~ "%s" #~ msgid "(no file)" #~ msgstr "(لا يوجد ملف)" #~ msgid "Path" #~ msgstr "المسار" #~ msgid "Yes, with scope separator '.'" #~ msgstr "نعم، مع نطاق فاصل '.'" #~ msgid "_Project" #~ msgstr "_مشروع" #~ msgid "Open personal templates directory" #~ msgstr "فتح مسار النماذج الشخصية" #~ msgid "_Edit" #~ msgstr "_تحرير" #~ msgid "_Tools" #~ msgstr "_ادوات" #~ msgid "Cleanup..." #~ msgstr "تنظيف..." #~ msgid "Installed plugins" #~ msgstr "الإضافات المركبة" #~ msgid "Open the installed plugins directory." #~ msgstr "فتح مسار تركيب الإضافات." #~ msgid "Get debugging information in a file" #~ msgstr "احصل على معلومات تتبع الأخطاء في الملف" #~ msgid "Error writing state file %s: %s" #~ msgstr "خطأ في كتابة ملف الحالة %s: %s" #~ msgid "The working documents are already prepared with the current file format. If you change the file format, working documents and all other data for this project will be ereased." #~ msgstr "المستند الحالي معد مسبقا بهذه الهيئة. إذا قمت بتغيير هيئة الملف, سيتم مسح المستند وجميع البيانات الخاصة بالمشروع." #~ msgid "Click on Ok to erease old working documents and change file format, and on Cancel to get back to the same file format." #~ msgstr "انقر على موافق لمسح المستند القديم وتغيير هيئة الملف, أو على إلغاء للعودة للهيئة السابقة للملف." #~ msgid "The working documents are already prepared with the current file format. If you change the file format, working documents will be ereased." #~ msgstr "المستند الحالي معد مسبقا بهذه الهيئة. إذا قمت بتغيير هيئة الملف, سيتم مسح المستند." #~ msgid "You can't choose column '%s' as a key in the students list, as it contains duplicates (value '%s')" #~ msgstr "لا تستطيع اختيار العمود '%s' كمفتاح أساسي في قائمة الطلاب,تحتوي على التكرارات (القيمة '%s')" #~ msgid "You did not save project %s options, which have been modified: do you want to save them before leaving?" #~ msgstr "لم تقم بحفظ خيارات المشروع %s, التي قمت بتعديلها: هل ترغب بحفظها قبل الخروج؟" #~ msgid "You did not save main options, which have been modified: do you want to save them before leaving?" #~ msgstr "لم تقم بحفظ الخيارات الرئيسية التي قمت بتعديلها: هل ترغب بحفظها؟" #~ msgid "empty" #~ msgstr "فارغ" #~ msgid "archive" #~ msgstr "ارشيف" #~ msgid "You chose printing method '%s' but there are no configured printer in CUPS. Please configure some printer or switch to another printing method." #~ msgstr "لقد اخترت جهاز الطباعة '%s' لكنها غير معدّة. فضلا قم بإعدادها أو اختر طابعة أخرى." #~ msgid "Add sums of the scores for each question group? To define groups, use question ids in the form \"group:question\"." #~ msgstr "إضافة مجموع درجات كل مجموعة أسئلة ؟ لتعيين المجموعات, استخدم معرفات الأسئلة في النموذج \"group:question\"." #~ msgid "(not supported)" #~ msgstr "(غير مدعوم)" #~ msgid "Printing with method '%s' needs some perl modules that are not installed: %s. Please install these modules or switch to another printing method." #~ msgstr "استخدام هذه الطابعة '%s' يتطلب بعض ملفات بيرل غير المركبة: %s. فضلا قم بتركيبها أو اختر طابعة أخرى." #~ msgid "CUPS" #~ msgstr "CUPS" #~ msgid "Print separate answer sheet separately" #~ msgstr "طباعة إجابات الأسئلة في صفحة منفصلة" #~ msgid "Stapling" #~ msgstr "تدبيس" #~ msgid "Grouping students annotated pages together..." #~ msgstr "تجميع أوراق الطلاب المرصودة..." #~ msgid "Renaming annotated files with new model..." #~ msgstr "إعادة تسمية ملفات الرصد مع نموذج جديد ..." #~ msgid "Name and surname" #~ msgstr "الاسم واللقب" #~ msgid "Previous group was empty" #~ msgstr "المجموعة السابقة فارغة" #~ msgid "Create a table with basic statistics about answers for each question?" #~ msgstr "إنشاء جدول بالإحصاءات الأساسية عن الإجابات لكل سؤال؟" #~ msgid "PDF" #~ msgstr "PDF" #~ msgid "Size, in the form \"width\"x\"height\", for exemple 1000x1500" #~ msgstr "الحجم, في أبعاد النموذج \"العرض\"x\"الإرتفاع\", مثلا 1000x1500" #~ msgid "Maximum size in pixels" #~ msgstr "الحجم الأقصى بالبكسل" #~ msgid "JPEG quality for annotated papers" #~ msgstr "JPEG جودة ملفات الرصد " #~ msgid "Value 60, for exemple, means that text size is chosen so that page height is 60 lines of text." #~ msgstr "القيمة 60 , على سبيل المثال, تعني أن الصفحة تحتوي على 60 سطر." #~ msgid "compose" #~ msgstr "جمّع" #~ msgid "Find pages in solution if scan is not present? Useful with question with separated answers page." #~ msgstr "تحديد الحلول إذا لم توجد ورقة ممسوحة؟ وتكون مفيدة خصوصا إذا كانت الإجابات في صفحة مستقلة." #~ msgid "sheet number" #~ msgstr "رقم ورقة الاجابة" #~ msgid "sheet ID" #~ msgstr "معرف الورقة" #~ msgid "Sheet [sheet number column title in exported spreadsheet]" #~ msgstr "الورقة [عنوان عمود رقم ورقة الاجابة المصدر]" #~ msgid "Add a column" #~ msgstr "إضافة عمود" #~ msgid "Remove a column" #~ msgstr "حذف عمود" #~ msgid "Annotate papers' scans with marking details." #~ msgstr "تعليقات الأوراق ' الممسوحة مع تفاصيل الدرجات." #~ msgid "Remove manual modifications for this page. Automatic data capture for this page, if any, won't be changed." #~ msgstr "حذف التعديلات اليدوية في هذه الصفحة. القراءة الآلية لهذه الورقة, إذا لم ' يتم أي تغيير." #~ msgid "Confirm changes" #~ msgstr "تأكيد التعديلات" #, fuzzy #~ msgid "Process" #~ msgstr "قبل المعالجة" #~ msgid "project %s" #~ msgstr "المشروع %s" #~ msgid "Automatic Multiple Choice" #~ msgstr "برنامج التصحيح الآلي" #~ msgid "Proceed" #~ msgstr "ابدأ" #~ msgid "Edit LaTeX file" #~ msgstr "تحرير ملف لتيك" #~ msgid "ID" #~ msgstr "المعرف" #~ msgid "LaTeX file (*.tex)" #~ msgstr "ملف لتيك (*.tex)" #~ msgid "Group annotated pages to one PDF file by student" #~ msgstr "جمع أوراق الطلاب المرصودة في ملف pdf واحد" #~ msgid "Group" #~ msgstr "تجميع" #~ msgid "Choose which columns from the students list to include in the exported file." #~ msgstr "من قائمة الطلاب حدد الأعمدة التي ترغب بإدراجها في ملف التصدير." #~ msgid "Compute layouts" #~ msgstr "تطبيق التصميم" #~ msgid "Unreadable marks" #~ msgstr "غير قابل للقراءة" #~ msgid "No automatic data capture: no zoom to build..." #~ msgstr "لا قراءة آلية للبيانات: لا تكبير للمربعات..." #~ msgid "You changed parameter \"%s\"." #~ msgstr "قمت بتغيير المعطيات \"%s\"." #~ msgid "If you already captured data from scans, boxes zooms are no longer correctly grouped." #~ msgstr "إذا كنت قد قمت بقراءة بيانات الأوراق الممسوحة مسبقا, فغنك لن تصبح قادرا على قرائتها مرة أخرى بشكل صحيح." #~ msgid "Do you want to re-build them?" #~ msgstr "هل تريد إعادة بناءه؟" #~ msgid "It will take some time." #~ msgstr "سيأخذ بعض الوقت." #~ msgid "You will be able to build them later with %s in menu %s." #~ msgstr "تستطيع بنائهم لاحقا عن طريق %s في قائمة %s ." #~ msgid "Re-extract zooms" #~ msgstr "إعادة التكبير" #~ msgid "Tools" #~ msgstr "الأدوات" #~ msgid "unticked boxes" #~ msgstr "مربع غير معلمّ" #~ msgid "ticked boxes" #~ msgstr "مربع معلمّ" #~ msgid "For both two latest cases, you can use graphical interface for manual data caption." #~ msgstr "لآخر حالتين , تستطيع استخدام الواجهة الرسومية لقراءة البيانات يدويا." #~ msgid "Error saving to %s: %s" #~ msgstr "تم حفظ الأخطاء في %s: %s" #~ msgid "Shall AMC include in the marks file details about which boxes are ticked on the completed answer sheets?" #~ msgstr "سوف يدرج AMC في ملف الدرجات تفاصيل الإجابات الموجودة في ورقة الإجابة ؟" #~ msgid "Cancel all associations made this time." #~ msgstr "إلغاء كل الربط الذي تم في هذه الجلسة." #, fuzzy #~ msgid "Working documents are not present" #~ msgstr "تم انتاج المستندات." #~ msgid "" #~ "LaTeX source file for this project is:\n" #~ "%s" #~ msgstr "" #~ "ملف كود لتيك لهذا المشروع:\n" #~ "%s" #~ msgid "Path:" #~ msgstr "المسار:" #~ msgid "Click here to know where project LaTeX source file is" #~ msgstr "انقر هنا لتعرف مكان ملف لتيك المصدر" #~ msgid "adjustment" #~ msgstr "التخطيط" #~ msgid "unreadable" #~ msgstr "غير قابل للقراءة" #~ msgid "Looking for detected layouts..." #~ msgstr "انتظار فحص التصميم..." #~ msgid "Detect layouts from adjustment document." #~ msgstr "فحص التصميم من تخطيط المستند." #~ msgid "Print papers, one by one" #~ msgstr "طباعة الاوراق، ورقة ورقة" #~ msgid "Enter the student name written on this page." #~ msgstr "إدخال اسم الطالب المكتوب في هذه الورقة" #~ msgid "File source.tex already exists in project directory %s. It has not been removed, and will be used as the project source file." #~ msgstr "ملف source.tex مستخدم في المشروع %s . ولم يتم حذفه, وسيستخدم ككود مصدري للمشروع." #~ msgid "model" #~ msgstr "نموذج" #~ msgid "Questionnaire model choice" #~ msgstr "نموذج اسئلة" #~ msgid "state" #~ msgstr "الحالة" auto-multiple-choice-1.4.0/I18N/lang/de.po000066400000000000000000004321401341176102400201000ustar00rootroot00000000000000# Auto Multiple Choice # Copyright 2008-2016 Alexis Bienvenue # This file is distributed under the same license as the AMC software #, fuzzy msgid "" msgstr "" "Project-Id-Version: 1.4.0~beta1 (r:a488cdb)\n" "Report-Msgid-Bugs-To: paamc@passoire.fr\n" "POT-Creation-Date: 2018-05-02 09:25 +0200\n" "PO-Revision-Date: 2018-05-10 09:00 +0200\n" "Last-Translator: Florian Schöngassner , 2018\n" "Language-Team: German (https://www.transifex.com/jojoboulix/teams/10701/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. TRANSLATORS: directory name for projects. This directory will be created #. (if needed) in the home directory of the user. Please use only alphanumeric #. characters, and - or _. No accentuated characters. #: ../AMC-annotate.pl:158 ../AMC-perl/AMC/Config.pm:247 #: ../AMC-perl/AMC/Config.pm:248 msgid "MC-Projects" msgstr "MC-Projekte" #: ../AMC-getimages.pl:213 msgid "Splitting multi-page PDF files..." msgstr "Aufteilen von mehrseitigen PDF-Dateien" #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be #. converted. #: ../AMC-getimages.pl:390 #, perl-format msgid "Converting %s to bitmap..." msgstr "Umwandlung von %s in Bitmap..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be #. splitted to several images (one per page). #: ../AMC-getimages.pl:393 #, perl-format msgid "Splitting multi-page image %s..." msgstr "Aufteilen eines mehrseitigen Bildes %s..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be #. splitted to several images (one per page). #: ../AMC-getimages.pl:396 #, perl-format msgid "Processing image %s..." msgstr "Bearbeitung des Bildes %s..." #: ../AMC-getimages.pl:469 msgid "Copying scans to project directory..." msgstr "Kopieren der Scans in das Projektverzeichnis..." #: ../AMC-gui.pl:249 msgid "" "None of the perl modules Graphics::Magick and Image::Magick " "are installed: AMC won't work properly!" msgstr "" "Keines der Perl Module Graphics::Magick oder Image::Magick ist" " installiert: AMC arbeitet nicht richtig!" #: ../AMC-gui.pl:280 msgid "" "The package auto-multiple-choice-common is installed, but not auto-multiple-choice.\n" "AMC won't work properly until you install auto-multiple-choice package!" msgstr "" "Das Paket auto-multiple-choice-common ist installiert, aber auto-multiple-choice wurde nicht installiert.\n" "AMC wird nicht vollständig funktionstüchtig sein bis das auto-multiple-choice Paket installiert worden ist!" #: ../AMC-gui.pl:298 #, perl-format msgid "" "There is too little space left in the temporary disk directory (%s). " "Please clean this directory and try again." msgstr "" "Im Verzeichnis der temporären Dateien (%s) ist zu wenig Platz. Bitte " "bereinigen Sie das Verzeichnis und versuchen es erneut." #: ../AMC-gui.pl:317 msgid "Several dialogs try to help you be at ease handling AMC." msgstr "" "Verschiedene Dialoge versuchen Ihnen bei der Bedienung von AMC zu helfen." #: ../AMC-gui.pl:319 #, perl-format msgid "Unless you tick the \"%s\" box, they are shown only once." msgstr "" "Sofern Sie die Box \"%s\" nicht markiert haben, wird diese nur einmal " "angezeigt." #: ../AMC-gui.pl:321 ../AMC-gui.pl:605 msgid "Show this message again next time" msgstr "Diese Nachricht beim nächsten Mal wieder anzeigen" #: ../AMC-gui.pl:323 msgid "" "Do you want to forgot which dialogs you have already seen and ask to show " "all of them next time they should appear ?" msgstr "" "Möchten Sie die Dialoge, welche Sie bereits gesehen haben, zurücksetzen und " "diese beim nächsten Mal, wenn sie erscheinen, wieder sehen?" #: ../AMC-gui.pl:357 msgid "" "Please install libnotify to make desktop notifications available." msgstr "" "Bitte installieren Sie libnotify um Desktopnachrichten anzeigen zu " "können." #. TRANSLATORS: Message when switching to debugging mode. #: ../AMC-gui.pl:552 msgid "Debugging mode." msgstr "Debugmodus" #. TRANSLATORS: Message when switching to debugging mode. %s will be replaced #. with the path of the log file. #: ../AMC-gui.pl:554 #, perl-format msgid "Debugging informations will be written in file %s." msgstr "Debug-Informationen werden in die Datei %s geschrieben." #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:583 ../AMC-gui-main_window.glade:3131 msgid "French" msgstr "Französisch" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:585 ../AMC-gui-main_window.glade:3145 msgid "English" msgstr "Englisch" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:587 ../AMC-gui-main_window.glade:3159 msgid "Japanese" msgstr "Japanisch" #. TRANSLATORS: This is the title of the column containing student/copy #. identifier in the table showing the results of data captures. #: ../AMC-gui.pl:703 msgid "identifier" msgstr "Bezeichner" #. TRANSLATORS: This is the title of the column containing data capture #. date/time in the table showing the results of data captures. #: ../AMC-gui.pl:712 msgid "updated" msgstr "aktualisiert" #. TRANSLATORS: This is the title of the column containing Mean Square Error #. Distance (some kind of mean distance between the location of the four #. corner marks on the scan and the location where they should be if the scan #. was not distorted at all) in the table showing the results of data #. captures. #: ../AMC-gui.pl:720 ../AMC-gui.pl:4992 ../AMC-perl/AMC/Gui/Manuel.pm:192 #: ../AMC-gui-main_window.glade:136 msgid "MSE" msgstr "MSE" #. TRANSLATORS: This is the title of the column containing so-called #. "sensitivity" (an indicator telling the user if the darkness ratio of some #. boxes on the page are very near the threshold. A great value tells that #. some darkness ratios are very near the threshold, so that the capture is #. very sensitive to the threshold. A small value is a good thing) in the #. table showing the results of data captures. #: ../AMC-gui.pl:729 ../AMC-gui.pl:4994 ../AMC-perl/AMC/Gui/Manuel.pm:200 msgid "sensitivity" msgstr "Empfindlichkeit" #: ../AMC-gui.pl:737 msgid "scan file" msgstr "gescannte Datei" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:766 ../AMC-gui.pl:784 msgid "Western Europe" msgstr "Westeuropa" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:768 ../AMC-gui.pl:786 msgid "Central Europe" msgstr "Mitteleuropa" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:770 msgid "Southern Europe" msgstr "Südeuropa" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:772 msgid "Northern Europe" msgstr "Nordeuropa" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:774 msgid "Cyrillic" msgstr "Kyrillisch" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:776 msgid "Turkish" msgstr "Türkisch" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:778 msgid "Northern" msgstr "Nördlich" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:780 msgid "Unicode" msgstr "Unicode" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:804 ../AMC-gui.pl:3338 msgid "(none) [No primary key found in association list]" msgstr "(keine) [Kein primärer Schlüssel in der Zuordnungsliste gefunden]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:806 ../AMC-gui.pl:3976 msgid "(none) [No code found in LaTeX file]" msgstr "(keine) [Kein Code in der LaTeX Datei gefunden]" #. TRANSLATORS: One of the printing methods: use a command (This is not the #. command name itself). This is a menu entry. #: ../AMC-gui.pl:835 msgid "command" msgstr "Befehl" #. TRANSLATORS: One of the printing methods: print to files. This is a menu #. entry. #: ../AMC-gui.pl:837 msgid "to files" msgstr "in Dateien" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:841 msgid "floor" msgstr "abrunden" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:843 msgid "rounding" msgstr "Runden" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:845 msgid "ceiling" msgstr "aufrunden" #. TRANSLATORS: One option for decimal point: use a comma. This is a menu #. entry #: ../AMC-gui.pl:849 msgid ", (comma)" msgstr ", (Komma)" #. TRANSLATORS: One option for decimal point: use a point. This is a menu #. entry. #: ../AMC-gui.pl:851 msgid ". (dot)" msgstr ". (Punkt)" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:856 msgid "one sided [No two-sided printing]" msgstr "einseitig" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:858 msgid "long edge" msgstr "Lange Seite" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:860 msgid "short edge" msgstr "Kurze Seite" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:864 msgid "(none) [No transitional image type (direct processing)]" msgstr "(keine)" #. TRANSLATORS: One of the actions that can be done after exporting the marks. #. Here, do nothing more. This is a menu entry. #: ../AMC-gui.pl:872 msgid "that's all" msgstr "Das ist alles" #. TRANSLATORS: One of the actions that can be done after exporting the marks. #. Here, open the exported file. This is a menu entry. #: ../AMC-gui.pl:874 msgid "open the file" msgstr "Öffne die Datei" #. TRANSLATORS: One of the actions that can be done after exporting the marks. #. Here, open the directory where the file is. This is a menu entry. #: ../AMC-gui.pl:876 msgid "open the directory" msgstr "Öffne das Verzeichnis" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:879 msgid "(none) [No annotation position (do not write anything)]" msgstr "(keine)" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: in one margin. This is a menu entry. #: ../AMC-gui.pl:881 msgid "in one margin" msgstr "in einem Rand" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: in one of the two margins. This is a menu entry. #: ../AMC-gui.pl:883 msgid "in the margins" msgstr "am Rand" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: near the boxes. This is a menu entry. #: ../AMC-gui.pl:885 msgid "near boxes" msgstr "nahe der Kästen" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: in the zones defined in the source file #: ../AMC-gui.pl:887 msgid "where defined in the source" msgstr "wie in der Quelle beschrieben" #. TRANSLATORS: One of the possible sorting criteria for students in the #. exported spreadsheet with scores: the student name. This is a menu entry. #. TRANSLATORS: This is the title of a column containing students names in a #. table showing all annotated answer sheets, when sending them to the #. students by email. #: ../AMC-gui.pl:890 ../AMC-gui.pl:6357 msgid "name" msgstr "Name" #. TRANSLATORS: One of the possible sorting criteria for students in the #. exported spreadsheet with scores: the student sheet number. This is a menu #. entry. #: ../AMC-gui.pl:892 msgid "exam copy number" msgstr "überprüfe die Durchschlagsnummer" #. TRANSLATORS: One of the possible sorting criteria for students in the #. exported spreadsheet with scores: the line where one can find this student #. in the students list file. This is a menu entry. #: ../AMC-gui.pl:894 msgid "line in students list" msgstr "Zeile aus der Liste der Prüflinge" #. TRANSLATORS: you can omit the [...] part, just here to explain context #. One of the possible sorting criteria for students in the exported #. spreadsheet with scores: the student mark. This is a menu entry. #: ../AMC-gui.pl:897 msgid "mark [student mark, for sorting]" msgstr "Note [Prüflingsnote, zum Sortieren]" #. TRANSLATORS: One of the possible way to group annotated answer sheets #. together to PDF files: make one PDF file per student, with all his pages. #. This is a menu entry. #: ../AMC-gui.pl:902 msgid "One file per student" msgstr "Eine Datei je Prüfling" #. TRANSLATORS: One of the possible way to group annotated answer sheets #. together to PDF files: make only one PDF with all students sheets. This is #. a menu entry. #: ../AMC-gui.pl:904 msgid "One file for all students" msgstr "Eine Datei für alle Prüflinge" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we #. only select pages where the student has written something (in separate #. answer sheet mode, these are the pages from the answer sheet and not the #. pages from the subject). #: ../AMC-gui.pl:907 msgid "Only pages with answers" msgstr "Nur Seiten mit Antworten" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we #. take the pages were the students has nothing to write (often question pages #. from a subject with separate answer sheet option) from the subject. #: ../AMC-gui.pl:909 msgid "Question pages from subject" msgstr "Fragebogen des Bearbeiters" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we #. take the pages were the students has nothing to write (often question pages #. from a subject with separate answer sheet option) from the correction. #: ../AMC-gui.pl:911 msgid "Question pages from correction" msgstr "Die Frageseiten wurden nicht erkannt." #: ../AMC-gui.pl:914 msgid "All students" msgstr "Alle Prüflinge" #: ../AMC-gui.pl:916 msgid "Selected students" msgstr "Ausgewählte Prüflinge" #: ../AMC-gui.pl:918 msgid "Please select..." msgstr "Bitte auswählen..." #. TRANSLATORS: One of the ways exam was made: each student has a different #. answer sheet with a different copy number - no photocopy was made. This is #. a menu entry. #. TRANSLATORS: This is a title for the AMC mode where the distributed exam #. papers are all different (different paper numbers at the top) -- photocopy #. is not used. #: ../AMC-gui.pl:920 ../AMC-gui.pl:2981 msgid "Different answer sheets" msgstr "anderer Antwortbogen" #. TRANSLATORS: One of the ways exam was made: some students have the same #. exam subject, as some photocopies were made before distributing the #. subjects. This is a menu entry. #. TRANSLATORS: This is a title for the AMC mode where some answer sheets have #. been photocopied before being distributed to the students. #: ../AMC-gui.pl:922 ../AMC-gui.pl:2986 msgid "Some answer sheets were photocopied" msgstr "Einige Antwortbögen wurden fotokopiert" #. TRANSLATORS: One of the ways to send mail: use sendmail command. This is a #. menu entry. #: ../AMC-gui.pl:924 msgid "sendmail" msgstr "Sendmail" #. TRANSLATORS: One of the ways to send mail: use a SMTP server. This is a #. menu entry. #: ../AMC-gui.pl:926 msgid "SMTP" msgstr "SMTP" #: ../AMC-gui.pl:927 msgid "None [SMTP security]" msgstr "Keine [SMTP Sicherheit]" #: ../AMC-gui.pl:936 msgid "Standard" msgstr "Standard" #: ../AMC-gui.pl:938 msgid "Separate answer sheet" msgstr "eigener Antwortbogen" #: ../AMC-gui.pl:940 ../AMC-gui.pl:2683 ../AMC-gui.pl:2701 msgid "Answer sheet first" msgstr "Antwortbogen zuerst" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. #: ../AMC-gui.pl:944 msgid "nothing" msgstr "nichts" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. #: ../AMC-gui.pl:946 msgid "circle" msgstr "Kreis" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. Here, a cross. #: ../AMC-gui.pl:948 msgid "mark" msgstr "Note" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. Here, the box outline. #: ../AMC-gui.pl:950 msgid "box" msgstr "Kästchen" #: ../AMC-gui.pl:1045 #, perl-format msgid "" "Exporting to '%s' needs some perl modules that are not installed: %s. Please" " install these modules or switch to another export format." msgstr "" "Exportieren nach '%s' benötigt einige Perl-Module, die nicht installiert " "sind: %s. Bitte installieren Sie diese Module oder wechseln Sie das " "Ausgabeformat." #: ../AMC-gui.pl:1068 msgid "" "When referring to a particular answer in the export, the letter used will be" " the one found in the catalog. However, the catalog has not yet been built. " "Do you want to build it now?" msgstr "" "Beim Beziehen auf eine spezifische Antwort im Export wird der Buchstabe " "verwendet, der im Katalog gesetzt ist. Jedoch ist der Katalog noch gar nicht" " erstellt worden. Möchten Sie diesen nun erstellen?" #: ../AMC-gui.pl:1104 msgid "Exporting marks..." msgstr "Exportieren der Noten.." #: ../AMC-gui.pl:1143 #, perl-format msgid "Export to %s did not work: file not created..." msgstr "Exportieren nach %s fehlgeschlagen: Datei nicht erzeugt..." #. TRANSLATORS: One of the popup menu that appears when right-clicking on a #. page in the data capture diagnosis table. Choosing this entry, an image #. will be opened to see where the corner marks were detected. #: ../AMC-gui.pl:1152 ../AMC-gui.pl:4996 msgid "page adjustment" msgstr "Seitenanpassung" #. TRANSLATORS: One of the popup menu that appears when right-clicking on a #. page in the data capture diagnosis table. Choosing this entry, a window #. will be opened were the user can see all boxes on the scans and how they #. were filled by the students, and correct detection of ticked-or-not if #. needed. #: ../AMC-gui.pl:1154 ../AMC-gui.pl:4996 msgid "boxes zooms" msgstr "Vergrößerung der Boxen" #: ../AMC-gui.pl:1225 #, perl-format msgid "You requested to delete all data capture results for %d page(s)" msgstr "" "Sie möchten alle Ergebnisse der Datenerfassung für %d Seite(n) löschen" #: ../AMC-gui.pl:1226 msgid "All data and image files related to these pages will be deleted." msgstr "" "Alle Daten und Bilddateien die zu diesen Seiten gehören werden gelöscht" #: ../AMC-gui.pl:1227 msgid "Do you really want to continue?" msgstr "Möchten Sie wirklich fortfahren?" #: ../AMC-gui.pl:1405 #, perl-format msgid "" "Following command could not be run: %s, perhaps due to a poor " "configuration?" msgstr "" "Folgender Befehl konnte nicht ausgeführt werden: %s, vielleicht wegen" " einer fehlerhaften Konfiguration?" #: ../AMC-gui.pl:1450 #, perl-format msgid "Current directory: %s" msgstr "aktuelles Verzeichnis: %s " #: ../AMC-gui.pl:1509 msgid "Existing projects:" msgstr "Bestehende Projekte:" #. TRANSLATORS: Window title when creating a new project. #: ../AMC-gui.pl:1514 msgid "New AMC project" msgstr "Neues AMC-Projekt" #: ../AMC-gui.pl:1519 msgid "Projects management:" msgstr "Projektverwaltung:" #: ../AMC-gui.pl:1520 msgid "Change project name:" msgstr "Ändern des Projektnamens:" #: ../AMC-gui.pl:1525 msgid "Back" msgstr "Zurück" #. TRANSLATORS: Window title when managing projects. #: ../AMC-gui.pl:1528 msgid "AMC projects management" msgstr "AMC Projektverwaltung" #: ../AMC-gui.pl:1550 #, perl-format msgid "You don't have any MC project in directory %s!" msgstr "Es gibt kein MC-Projekt in Verzeichnis %s!" #: ../AMC-gui.pl:1559 ../AMC-gui-choix_projet.glade:260 msgid "Choose directory" msgstr "Wähle das Verzeichnis" #: ../AMC-gui.pl:1604 #, perl-format msgid "You can't change project %s since it's open." msgstr "" "Sie können das Projekt %s nicht verändern, da es bereits geöffnet ist." #: ../AMC-gui.pl:1626 #, perl-format msgid "This will clone project %s to a new project %s." msgstr "" "Dieser Prozess wird das Projekt %s zu einem neuem Projekt %s" " verduplizieren." #. TRANSLATORS: Message when you want to create an AMC project with name xxx, #. but there already exists a directory in the projects directory with this #. name! #: ../AMC-gui.pl:1697 #, perl-format msgid "Directory %s already exists, so you can't choose this name." msgstr "" "Das Verzeichnis %s existiert bereits, wählen Sie bitte einen anderen " "Namen." #: ../AMC-gui.pl:1743 msgid "Destination project directory already exists" msgstr "Zielprojektverzeichnis existiert bereits" #: ../AMC-gui.pl:1755 msgid "Copying project..." msgstr "Projekt kopieren..." #: ../AMC-gui.pl:1780 msgid "Your project has been copied" msgstr "Ihr Projekt wurde kopiert" #: ../AMC-gui.pl:1781 #, perl-format msgid "(%d files out of %d)" msgstr "(%d Dateien von %d)" #: ../AMC-gui.pl:1788 msgid "Source project directory not found" msgstr "Quellenprojektverzeichnis wurde nicht gefunden" #: ../AMC-gui.pl:1796 #, perl-format msgid "An error occuried during project copy: %s." msgstr "Es ist ein Fehler aufgetreten während des Projektkopiervorganges: %s." #: ../AMC-gui.pl:1817 #, perl-format msgid "You asked to remove project %s." msgstr "Sie möchten das Projekt %s entfernen." #: ../AMC-gui.pl:1818 msgid "" "This will permanently erase all the files of this project, including the " "source file as well as all the files you put in the directory of this " "project, as the scans for example." msgstr "" "Dies wird alle Dateien dieses Projekts dauerhaft löschen, inklusive der " "Quelldateien, sowie alle Dateien, die Sie in diesem Verzeichnis abgelegt " "haben, wie z.B. Scans." #: ../AMC-gui.pl:1819 msgid "Is this really what you want?" msgstr "Möchten Sie damit wirklich fortfahren?" #: ../AMC-gui.pl:1876 #, perl-format msgid "You selected directory %s as a project to open." msgstr "" "Sie haben das Verzeichnis %s als Projekt zum Öffnen ausgewählt." #: ../AMC-gui.pl:1877 msgid "" "However, this directory does not seem to contain a project. Do you still " "want to try?" msgstr "" "Dieses Verzeichnis enthält dennoch nicht ein Projekt. Möchten Sie trotzdem " "fortfahren?" #: ../AMC-gui.pl:1894 #, perl-format msgid "You selected project %s from directory %s." msgstr "" "Sie haben das Projekt %s vom Verzeichnis zum Öffnen ausgewählt " "%s." #: ../AMC-gui.pl:1895 msgid "" "Do you want to copy this project to your projects directory before opening " "it?" msgstr "" "Möchten Sie das Projekt in Ihr Projektverzeichnis kopieren bevor sie es " "öffnen?" #: ../AMC-gui.pl:1965 #, perl-format msgid "The name %s is already used in the projects directory." msgstr "Der Name %s ist bereits im Projektverzeichnis vorhanden." #: ../AMC-gui.pl:1966 msgid "You must choose another name to create a project." msgstr "Sie müssen einen anderen Namen wählen, um das Projekt zu erstellen." #: ../AMC-gui.pl:2005 msgid "LaTeX packages:" msgstr "LaTeX Pakete:" #: ../AMC-gui.pl:2006 msgid "Commands:" msgstr "Befehle:" #: ../AMC-gui.pl:2007 msgid "Fonts:" msgstr "Schriften:" #: ../AMC-gui.pl:2022 msgid "" "Your AMC version and LaTeX style file version differ. Even if the documents " "are properly generated, this can lead to many problems using AMC.\n" msgstr "" "Ihre AMC Version und die die LaTeX style Dateiversion sind unterschiedlich. " "Auch wenn die Dokumente richtig erstellt werden kann dies zu vielen " "unterschiedlichen Problemen mit AMC führen.\n" #: ../AMC-gui.pl:2023 msgid "" "Please check your installation to get matching AMC and LaTeX style file " "versions.\n" msgstr "" "Bitte überprüfen Sie Ihre Installation um zusammenpassende AMC und LaTeX " "style Dateiversionen zu erhalten.\n" #: ../AMC-gui.pl:2024 #, perl-format msgid "" "AMC version: %s\n" "sty version: %s\n" "sty path: %s" msgstr "" "AMC Version: %s\n" "sty Version: %s\n" "sty Pfad: %s" #: ../AMC-gui.pl:2052 msgid "Documents update..." msgstr "Dokumente werden aktualisiert..." #: ../AMC-gui.pl:2076 msgid "Problems while preparing documents" msgstr "Probleme während der Vorbereitung der Dokumente" #: ../AMC-gui.pl:2078 msgid "Problems while processing the source file." msgstr "Probleme während der Verarbeitung der Quelldatei." #: ../AMC-gui.pl:2081 msgid "You have to correct the source file and re-run documents update." msgstr "" "Sie müssen die Quelldatei korrigieren und die Dokumentenaktualisierung " "erneut durchführen." #: ../AMC-gui.pl:2085 msgid "Errors" msgstr "Fehler" #: ../AMC-gui.pl:2086 msgid "Only first ten errors written" msgstr "Nur die ersten zehn Fehler werden dargestellt" #: ../AMC-gui.pl:2089 msgid "Warnings" msgstr "Warnung" #: ../AMC-gui.pl:2090 msgid "Only first ten warnings written" msgstr "Nur die ersten zehn Fehler werden dargestellt" #. TRANSLATORS: Here, %s will be replaced with the translation of "Command #. output details", and refers to the small expandable part at the bottom of #. AMC main window, where one can see the output of the commands lauched by #. AMC. #: ../AMC-gui.pl:2095 #, perl-format msgid "See also the processing log in '%s' below." msgstr "Sehen Sie auch den Verarbeitungslog untenstehend '%s'. " #. TRANSLATORS: Title of the small expandable part at the bottom of AMC main #. window, where one can see the output of the commands lauched by AMC. #: ../AMC-gui.pl:2097 ../AMC-gui-main_window.glade:2570 msgid "Command output details" msgstr "Details der Kommandozeilenausgabe" #: ../AMC-gui.pl:2098 msgid "Use LaTeX editor or latex command for a precise diagnosis." msgstr "" "Benutzen Sie einen LaTeX-Editor oder LaTeX in der Kommandozeile für eine " "genaue Diagnose." #: ../AMC-gui.pl:2113 msgid "Documents have been prepared" msgstr "Dokumente wurden vorbereitet" #: ../AMC-gui.pl:2143 msgid "Working documents successfully generated." msgstr "Arbeitsdokumente wurden erfolgreich erstellt." #. TRANSLATORS: Here, "them" refers to the working documents. #: ../AMC-gui.pl:2145 msgid "You can take a look at them double-clicking on the list." msgstr "Sie können diese mit einem Doppelklick auf der Liste betrachten." #. TRANSLATORS: Here, "they" refers to the working documents. #: ../AMC-gui.pl:2147 msgid "If they are correct, proceed to layouts detection..." msgstr "Wenn diese korrekt sind, fahren Sie mit der Layouterkennung fort..." #: ../AMC-gui.pl:2169 msgid "Your question has a separate answers sheet." msgstr "Ihre Frage hat einen separaten Antwortbogen." #: ../AMC-gui.pl:2170 msgid "In this case, letters are shown inside boxes." msgstr "In diesem Fall werden Buchstaben in den Feldern angezeigt." #: ../AMC-gui.pl:2171 msgid "Your question is set to present labels inside the boxes to be ticked." msgstr "" "Ihre Frage wurde so eingestellt, dass Markierungen innerhalb der Felder " "angezeigt werden und die angekreuzt werden sollen." #. TRANSLATORS: Here, %s will be replaced with the translation of "darkness #. threshold". #: ../AMC-gui.pl:2174 #, perl-format msgid "" "For better ticking detection, ask students to fill out completely boxes, and" " choose parameter \"%s\" around 0.5 for this project." msgstr "" "Für eine bessere Erkennung von angekreuzten Feldern, bitten Sie Ihre " "Prüflunge die Felder komplett auszufüllen und setzen Sie den Parameter " "\"%s\" auf etwa 0.5 für dieses Projekt." #: ../AMC-gui.pl:2175 #, perl-format msgid "At the moment, this parameter is set to %.02f." msgstr "Im Moment ist dieser Parameter auf %.02f eingestellt." #: ../AMC-gui.pl:2176 msgid "Would you like to set it to 0.5?" msgstr "Möchten Sie ihn auf 0,5 einstellen?" #. TRANSLATORS: This parameter is the ratio of dark pixels number over total #. pixels number inside box above which a box is considered to be ticked. #: ../AMC-gui.pl:2178 msgid "darkness threshold" msgstr "Dunkelheitsschwelle" #: ../AMC-gui.pl:2199 msgid "" "Papers analysis was already made on the basis of the current working " "documents." msgstr "" "Die Seitenanalyse wurde bereits auf Basis der aktuellen Dokumente " "durchgeführt." #: ../AMC-gui.pl:2200 msgid "You already made the examination on the basis of these documents." msgstr "" "Sie haben die Prüfung bereits auf Basis dieser Dokumente durchgeführt." #: ../AMC-gui.pl:2201 msgid "" "If you modify working documents, you will not be capable any more of " "analyzing the papers you have already distributed!" msgstr "" "Wenn Sie die Arbeitsdokumente verändern, werden Sie nicht mehr in der Lage " "sein die Analyse der Dokumente durchzuführen, die Sie bereits ausgehändigt " "haben!" #: ../AMC-gui.pl:2202 ../AMC-gui.pl:2229 msgid "Do you wish to continue?" msgstr "Wollen Sie fortfahren?" #: ../AMC-gui.pl:2203 ../AMC-gui.pl:2230 msgid "" "Click on OK to erase the former layouts and update working documents, or on " "Cancel to cancel this operation." msgstr "" "Klicken Sie auf Bestätigen um die vorherigen Layouts zu löschen und die " "Arbeitsdokumente zu aktualisieren, oder auf Abbrechen um diese Arbeit " "abzubrechen." #: ../AMC-gui.pl:2204 ../AMC-gui.pl:2231 msgid "To allow the use of an already printed question, cancel!" msgstr "" "Um die Benutzung einer bereits gedruckten Frage zu erlauben, brechen Sie ab!" #: ../AMC-gui.pl:2227 msgid "Layouts are already calculated for the current documents." msgstr "Die Layouts wurden für das aktuelle Dokument bereits berechnet." #: ../AMC-gui.pl:2228 msgid "" "Updating working documents, the layouts will become obsolete and will thus " "be erased." msgstr "" "Durch das Erneuern der Dokumente wird das Layout veraltet und somit " "gelöscht." #: ../AMC-gui.pl:2258 #, perl-format msgid "" "To handle properly %s files, AMC needs the following components, that" " are currently missing:" msgstr "" "Um mit %s-Dateien arbeiten zu können, benötigt AMC die folgenden im " "Augenblick fehlenden Komponenten:" #: ../AMC-gui.pl:2270 msgid "Install these components on your system and try again." msgstr "" "Installieren Sie diese Komponenten auf Ihrem System und versuchen es erneut." #. TRANSLATORS: Message when the user required printing the question paper, #. but it is not present (probably the working documents have not been #. properly generated). #: ../AMC-gui.pl:2405 msgid "" "You don't have any question to print: please check your source file and " "update working documents first." msgstr "" "Sie haben keine Frage zum Drucken: Bitte überprüfen Sie die Quelldatei und " "aktualisieren Sie zunächst die Dokumente." #. TRANSLATORS: Message when AMC does not know about the subject pages that #. has been generated. Usualy this means that the layout computation step has #. not been made. #: ../AMC-gui.pl:2422 msgid "Question's pages are not detected." msgstr "Die Frageseite wurde nicht erkannt." #: ../AMC-gui.pl:2423 msgid "Perhaps you forgot to compute layouts?" msgstr "Haben Sie vielleicht vergessen die Layouts zu berechnen?" #: ../AMC-gui.pl:2445 #, perl-format msgid "" "You chose the printing method '%s' but it is not available (%s). Please " "install the missing dependencies or switch to another printing method." msgstr "" "Sie haben die Druckmethode '%s' ausgewählt, welche aber nicht verfügbar ist " "(%s). Bitte installieren Sie die fehlenden Abhängigkeiten oder wechseln Sie " "zu einer anderen Druckmethode." #: ../AMC-gui.pl:2466 msgid "" "You chose a printing method using CUPS but there are no configured printer " "in CUPS. Please configure some printer or switch to another printing method." msgstr "" "Sie haben eine Druckmethode ausgewählt, die CUPS verwendet, es gibt aber " "keine konfigurierten Drucker in CUPS. Bitte konfigurieren Sie einen Drucker " "oder wechseln Sie zu einer anderen Druckmethode." #. TRANSLATORS: This is the title of the column containing the paper's numbers #. (1,2,3,...) in the table showing all available papers, from which the user #. will choose those he wants to print. #: ../AMC-gui.pl:2533 msgid "papers" msgstr "Bögen" #: ../AMC-gui.pl:2622 msgid "You did not select any exam to print..." msgstr "Sie haben keinen Test zum Drucken ausgewählt..." #: ../AMC-gui.pl:2641 ../AMC-gui.pl:2657 msgid "You selected only a few sheets to print." msgstr "Sie haben nur wenige Bögen zum Drucken ausgewählt." #: ../AMC-gui.pl:2642 msgid "" "As students are requested to write on more than one page, you must create as" " many exam sheets as necessary for all your students, with different sheets " "numbers, and print them all." msgstr "" "Wenn Studenten gebeten werden auf mehr als eine Seite zu schreiben, müssen " "Sie so viele Bögen erzeugen wie für alle Studenten benötigt werden mit " "verschiedenen Bogennummern und diese ausdrucken." #: ../AMC-gui.pl:2643 msgid "" "If you print one or several sheets and photocopy them to have enough for all" " the students, you won't be able to continue with AMC!" msgstr "" "Wenn Sie einen oder mehrere Bögen fotokopieren um genug Exemplare für alle " "Studenten zu haben, werden Sie nicht in der Lage sein mit AMC " "fortzufahren!" #: ../AMC-gui.pl:2644 msgid "Do you want to print the selected sheets anyway?" msgstr "Wollen Sie die ausgewählten Bögen dennoch drucken?" #: ../AMC-gui.pl:2658 msgid "" "Are you going to photocopy some printed subjects before giving them to the " "students?" msgstr "" "Werden Sie Bögen fotokopiert, bevor Sie den Prüflingen ausgehändigt werden?" #: ../AMC-gui.pl:2659 msgid "If so, the corresponding option will be set for this project." msgstr "" "Wenn dem so ist, wird die entsprechende Option für dieses Projekt gesetzt." #: ../AMC-gui.pl:2660 msgid "" "However, you will be able to change this when giving your first scans to " "AMC." msgstr "" "Allerdings haben Sie die Möglichkeit, dies zu ändern wenn Sie die ersten " "Scans in AMC laden." #. TRANSLATORS: the two %s will be replaced by the translations of "Answer #. sheet first" and "Extracting method". #: ../AMC-gui.pl:2682 #, perl-format msgid "" "You selected the '%s' option, that uses '%s', so the %s has been set to '%s'" " for you." msgstr "" "Sie haben die Option '%s' gewählt, welche jedoch '%s' benötigt. Daher wurde " "%s für Sie auf '%s' gesetzt." #: ../AMC-gui.pl:2684 ../AMC-gui-edit_preferences.glade:902 msgid "Extracting method" msgstr "Extrahiermethode" #: ../AMC-gui.pl:2700 #, perl-format msgid "" "You selected the '%s' option, but this option needs 'qpdf' or 'pdftk' to be " "installed on your system. Please install one of these and try again." msgstr "" "Sie haben die Option '%s' gewählt, welche jedoch 'qpdf' oder 'pdftk' " "benötigt. Bitte installieren Sie eines der beiden und versuchen Sie es noch " "einmal." #: ../AMC-gui.pl:2741 msgid "Print papers one by one..." msgstr "Eine Seite nach der anderen drucken..." #: ../AMC-gui.pl:2790 msgid "" "Working documents are in an old format, which is not supported anymore." msgstr "" "Dokumente sind in einem alten Format, welches nicht mehr unterstützt wird." #: ../AMC-gui.pl:2791 msgid "Please generate again the working documents!" msgstr "Bitte erstellen Sie die Arbeitsdokumente erneut!" #: ../AMC-gui.pl:2805 msgid "Detecting layouts..." msgstr "Erkenne Layouts..." #: ../AMC-gui.pl:2823 msgid "No layout detected." msgstr "Kein Layout erkannt." #: ../AMC-gui.pl:2824 msgid "" "Don't go through the examination before fixing this problem, " "otherwise you won't be able to use AMC for correction." msgstr "" "Beginnen Sie nicht mit der Prüfung bevor dieses Problem behoben " "wurde, andernfalls werden Sie AMC nicht für die Korrektur der Arbeit " "verwenden können." #: ../AMC-gui.pl:2830 msgid "Layouts are detected." msgstr "Layouts wurden erkannt." #: ../AMC-gui.pl:2831 #, perl-format msgid "" "You can check all is correct clicking on button %s and looking at " "question pages to see if red boxes are well positioned." msgstr "" "Sie können überprüfen ob alles korrekt ist indem Sie die Schaltfläche " "%s betätigen und die Fragenseiten begutachten ob die roten Boxen gut " "positioniert sind." #: ../AMC-gui.pl:2831 ../AMC-gui-main_window.glade:560 msgid "Check layouts" msgstr "Überprüfen des Layouts" #: ../AMC-gui.pl:2832 msgid "Then you can proceed to printing and to examination." msgstr "Danach können Sie mit dem Drucken und der Prüfung fortfahren." #: ../AMC-gui.pl:2905 msgid "No layout for this project." msgstr "Kein Layout für dieses Projekt." #. TRANSLATORS: Here, the first %s will be replaced with "Layout detection" (a #. button title), and the second %s with "Preparation" (the tab title where #. one can find this button). #: ../AMC-gui.pl:2907 #, perl-format msgid "Please use button %s in %s before manual data capture." msgstr "" "Bitte benutzen Sie die Schaltfläche %s in %s vor der manuellen" " Datenerfassung." #: ../AMC-gui.pl:2908 ../AMC-gui-main_window.glade:508 msgid "Layout detection" msgstr "Layouterkennung" #: ../AMC-gui.pl:2909 ../AMC-gui-main_window.glade:684 msgid "Preparation" msgstr "Vorbereitung" #: ../AMC-gui.pl:2947 #, perl-format msgid "Pre-allocate sheet ids from the page numbers, starting at %d" msgstr "" "Bitte belegen Sie die Seiten-ID aus den Seitenzahlen vorher, beginnend mit " "%d " #: ../AMC-gui.pl:2978 msgid "Automatic data capture can be done in two different modes:" msgstr "" "Die automatische Datenerfassung kann in zwei verschiedenen Modi erfolgen:" #: ../AMC-gui.pl:2983 msgid "" "In the most robust one, you give a different exam (with a different exam " "number) to every student. You must not photocopy subjects before " "distributing them." msgstr "" "Im robusten Fall wird jedem Prüfling ein anderer Arbeitsbogen (mit einer " "anderen Blattnummer) ausgeteilt. Die Bögen dürfen vor dem Verteilen nicht " "fotokopiert werden!" #: ../AMC-gui.pl:2988 msgid "" "In the second one (which can be used only if answer sheets to be scanned " "have one page per candidate) you can photocopy answer sheets and give the " "same subject to different students." msgstr "" "Im zweiten Fall (welcher nur verwendet werden kann, wenn der Antwortbogen " "nur eine Seite hat) können die Antwortbögen fotokopiert und an verschiedene " "Prüflinge verteilt werden." #: ../AMC-gui.pl:2989 msgid "After the first automatic capture, you can't switch to the other mode." msgstr "" "Nach der ersten automatischen Erfassung können Sie nicht mehr zum anderen " "Modus wechseln." #: ../AMC-gui.pl:3163 msgid "Automatic data capture..." msgstr "Automatische Datenerfassung..." #: ../AMC-gui.pl:3174 msgid "Automatic data capture has been completed" msgstr "Die automatische Datenerfassung ist abgeschlossen." #: ../AMC-gui.pl:3183 #, perl-format msgid "" "Some of the pages you submitted (%d of them) have already been processed " "before. Old data has been overwritten." msgstr "" "Einige der übermittelten Seiten (%d von diesen) sind bereits vorher " "verarbeitet gewesen. Alte Daten sind überschrieben worden." #. TRANSLATORS: Names list file : (none) #: ../AMC-gui.pl:3271 msgid "(none)" msgstr "(kein)" #: ../AMC-gui.pl:3292 #, perl-format msgid "Unsuitable names file: %d errors, first on line %d." msgstr "Ungeeignete Namensdatei: %d Fehler, erster Fehler in Zeile %d." #. TRANSLATORS: Here, do not translate 'name' and 'surname' (except in #. french), as the column names in the students list file has to be named in #. english in order to be properly detected. #: ../AMC-gui.pl:3309 #, perl-format msgid "" "Found %d empty names in names file %s. Check that name or " "surname column is present, and always filled." msgstr "" "Leere %d Namen in Namensdatei %s gefunden. Überprüfen Sie, dass " "name oder surname da und immer ausgefüllt ist." #: ../AMC-gui.pl:3310 ../AMC-gui.pl:3326 msgid "Edit the names file to correct it, and re-read." msgstr "" "Bearbeiten Sie die Namensdatei um dies zu korrigieren und lesen Sie sie " "erneut ein." #: ../AMC-gui.pl:3326 #, perl-format msgid "Found duplicate names: %s. Check that all names are different." msgstr "" "Namensduplikat gefunden: %s. Überprüfen Sie, dass alle Namen " "unterschiedlich sind." #. TRANSLATORS: Here, %s will be replaced with the name of the tab "Data #. capture". #: ../AMC-gui.pl:3358 #, perl-format msgid "" "Before associating names to papers, you must choose a students list file in " "tab \"%s\"." msgstr "" "Vor der Zuordnung von Namen zu Seiten, müssen Sie eine Prüflingsliste im " "Abschnitt \"%s\" auswählen." #. One of the "notify the user at the end of the following actions" checkbox: #. for automatic data capture. #: ../AMC-gui.pl:3359 ../AMC-gui-edit_preferences.glade:1584 #: ../AMC-gui-main_window.glade:1286 msgid "Data capture" msgstr "Datenerfassung" #: ../AMC-gui.pl:3368 msgid "" "Please choose a key from primary keys in students list before association." msgstr "" "Bitte wählen Sie einen Primärschlüssel aus der Prüflingsliste vor der " "Zuordnung." #: ../AMC-gui.pl:3377 msgid "" "Please choose a code (made with LaTeX command \\AMCcodeGrid or equivalent) " "before automatic association." msgstr "" "Bitte wählen Sie einen Code (erstellt mit dem LaTeX-Befehl \\AMCcodeGrid " "oder gleichwertigem) vor der automatischen Zuordnung." #. TRANSLATORS: Here, %s will be replaced with "Students identification", #. which refers to a paragraph in the tab "Marking" from AMC main window. #: ../AMC-gui.pl:3422 #, perl-format msgid "" "Before associating names to papers, you must choose a students list file in " "paragraph \"%s\"." msgstr "" "Vor der Zuordung von Namen zu Seiten, müssen Sie eine Prüflingsliste im " "Abschnitt \"%s\" auswählen." #: ../AMC-gui.pl:3423 msgid "Students identification" msgstr "Prüflingsidentifikation" #: ../AMC-gui.pl:3446 msgid "Automatic association..." msgstr "Automatische Zuordnung..." #: ../AMC-gui.pl:3468 #, perl-format msgid "Automatic association completed: %d students recognized." msgstr "Automatische Zuordnung beendet: %d Prüflinge erkannt." #. TRANSLATORS: Here %s and %s will be replaced with two parameters names: #. "Primary key from this list" and "Code name for automatic association". #: ../AMC-gui.pl:3470 #, perl-format msgid "Please check \"%s\" and \"%s\" values and try again." msgstr "Bitte prüfen Sie die Werte \"%s\" und \"%s\" und versuchen es erneut." #: ../AMC-gui.pl:3471 msgid "Primary key from this list" msgstr "Primärschlüssel aus dieser Liste" #: ../AMC-gui.pl:3472 msgid "Code name for automatic association" msgstr "Codename für automatische Zuordnung" #: ../AMC-gui.pl:3478 msgid "" "Automatic association is now finished. You can ask for manual association to" " check that all is fine and, if necessary, read manually students names " "which have not been automatically identified." msgstr "" "Die automatische Zuweisung ist nun beendet. Sie können nun mit der manuellen" " Zuweisung fortfahren um zu überprüfen ob alles korrekt vorliegt und falls " "notwendig Prüflingsnamen manuell zuzuweisen, wenn diese nicht automatisch " "gefunden wurden." #: ../AMC-gui.pl:3640 #, perl-format msgid "" "Some manual association data has be found, which will be lost if the primary" " key is changed. Do you want to switch back to the primary key \"%s\" and " "keep association data?" msgstr "" "Einige manuelle Datenzuweisungen wurden gefunden, diese werden verloren " "gehen wenn der Primärschlüssel verändert wird. Möchten Sie zurück zum " "Primärschlüssel \"%s\" kehren und die Zuordnung behalten?" #: ../AMC-gui.pl:3666 #, perl-format msgid "" "The primary key from the students list has been set to \"%s\", which is not " "the value from the association data." msgstr "" "Der Primärschlüssel aus der Prüflingsliste wurde auf \"%s\" gesetzt, welches" " nicht der Wert aus den zugeordneten Daten ist." #: ../AMC-gui.pl:3667 msgid "" "Automatic papers/students association will be re-run to update the " "association data." msgstr "" "Die automatische Bögen/Prüflings-Zuordnung wird neu geladen um die " "Zuordnungsdaten zu aktualisieren." #: ../AMC-gui.pl:3693 #, perl-format msgid "Papers are not yet corrected: use button \"%s\"." msgstr "" "Die Bögen wurden noch nicht korrigiert: Benutzen Sie die Schaltfläche " "\"%s\"." #. TRANSLATORS: This is a button: "Mark" is here an action to be called by the #. user. When clicking this button, the user requests scores to be computed #. for all students. #: ../AMC-gui.pl:3695 ../AMC-gui-main_window.glade:1363 msgid "Mark" msgstr "Note" #: ../AMC-gui.pl:3736 msgid "Extracting marking scale..." msgstr "Extrahiere Benotungsskala..." #: ../AMC-gui.pl:3940 msgid "Computing marks..." msgstr "Berechne Noten..." #: ../AMC-gui.pl:3945 msgid "Grading has been completed" msgstr "Die Benotung wurde abgeschlossen" #. TRANSLATORS: This is the marks mean for all students. #: ../AMC-gui.pl:3961 #, perl-format msgid "Mean: %.2f" msgstr "Mittelwert: %.2f" #: ../AMC-gui.pl:3964 msgid "No marks computed" msgstr "Keine Noten berechnet" #: ../AMC-gui.pl:3983 msgid "Pre-association" msgstr "Automatische Zuordnung..." #: ../AMC-gui.pl:3997 msgid "No students list file" msgstr "Fehlende Prüflingsliste " #: ../AMC-gui.pl:3999 msgid "No primary key from students list file" msgstr "Kein Primärschlüssel in der Prüflingslistendatei" #: ../AMC-gui.pl:4005 #, perl-format msgid "Missing identification for %d answer sheets" msgstr "Fehlende Identifikation für %d Antwortbögen" #: ../AMC-gui.pl:4007 msgid "All completed answer sheets are associated with a student name" msgstr "" "Alle ausgefüllten Antwortbögen sind mit einem Prüflingsnamen verknüpft" #: ../AMC-gui.pl:4061 msgid "exam ID" msgstr "Prüfungs-ID" #: ../AMC-gui.pl:4076 msgid "student" msgstr "Prüfling" #. TRANSLATORS: File name for single annotated answer sheets with only some #. selected students. Please use simple characters. #: ../AMC-gui.pl:4207 msgid "Selected_students" msgstr "Ausgewaehlte_Prueflinge" #. TRANSLATORS: File name for single annotated answer sheets with all #. students. Please use simple characters. #: ../AMC-gui.pl:4209 msgid "All_students" msgstr "Alle_Prueflinge" #: ../AMC-gui.pl:4257 msgid "Annotating papers..." msgstr "Schreibe Anmerkungen in Bögen..." #: ../AMC-gui.pl:4261 msgid "Annotations have been completed" msgstr "Die Anmerkungen wurden abgeschlossen" #: ../AMC-gui.pl:4375 #, perl-format msgid "Project \"%s\" preferences" msgstr "Einstellungen für Projekt \"%s\"" #: ../AMC-gui.pl:4378 msgid "Project preferences" msgstr "Projekteinstellungen" #: ../AMC-gui.pl:4484 #, perl-format msgid "" "You modified \"%s\" value, which is the default value used when " "creating new projects. Do you want to change also \"%s\" for the " "opened %s project?" msgstr "" "Sie haben den Wert \"%s\" verändert, welches der Standardwert für neu" " angelegte Projekte ist. Wollen Sie auch \"%s\" für das geöffnete " "Projekt %s ändern?" #: ../AMC-gui.pl:4600 msgid "Working documents are not readable" msgstr "Arbeitsdokumente sind nicht lesbar" #: ../AMC-gui.pl:4603 msgid "No working documents" msgstr "Keine Arbeitsdokumente" #: ../AMC-gui.pl:4606 msgid "Working documents last update:" msgstr "Letzte Erneuerung der Arbeitsdokumente:" #: ../AMC-gui.pl:4662 msgid "No layout" msgstr "Kein Layout" #: ../AMC-gui.pl:4665 #, perl-format msgid "Processed %d pages" msgstr "%d Seiten verarbeitet" #: ../AMC-gui.pl:4668 msgid "but some defects were detected." msgstr "aber einige Probleme wurden erkannt." #: ../AMC-gui.pl:4680 msgid "" "The \\namefield command is not used. Writing subjects without name field is " "not recommended" msgstr "" "Der \\namefield Befehl wurde nicht verwendet. Das Durchführen einer Prüfung " "ohne Namensfeld wird nicht empfohlen." #: ../AMC-gui.pl:4681 msgid "" "The \\namefield command is used several times for the same subject. This " "should not be the case, as each student should write his name only once" msgstr "" "Der \\namefield Befehl wurde mehrfach im selben Projekt verwendet. Das " "sollte nicht der Fall sein, da jede/r Prüfling seinen Namen nur einmal " "schreiben sollte." #: ../AMC-gui.pl:4682 msgid "No box to be ticked" msgstr "Keine Box zum Ankreuzen" #: ../AMC-gui.pl:4683 msgid "" "The corner marks and binary boxes are not at the same location on all pages" msgstr "" "Die Eckmarkierungen sowie die Binärboxen sind nicht auf allen Seiten an der " "selben Stelle" #: ../AMC-gui.pl:4684 msgid "" "Some material has been placed out of the page. This is often a result of a " "multiple columns question group starting too close from the page bottom. In " "such a case, use \"needspace\"." msgstr "" "Manche Dinge wurden außerhalb der Seite platziert. Dies ist oft ein Ergebnis" " von mehrspaltigen Fragengruppen, welche zu nah am Seitenende beginnen. In " "einem solchen Fall verwenden Sie bitte \"needspace\"." #: ../AMC-gui.pl:4705 msgid "" "Some potential defects were detected for this subject. Correct them in the " "source and update the working documents." msgstr "" "Einige mögliche Defekte wurden in dieser Klausur erkannt. Korrigieren Sie " "diese in der Quelldatei und erneuern anschließend die Arbeitsdokumente." #: ../AMC-gui.pl:4711 #, perl-format msgid "(See for example pages %s and %s)" msgstr "(Sehen Die die Beispiel auf den Seiten %s und %s)" #: ../AMC-gui.pl:4716 #, perl-format msgid "(Concerns %1$d pages, see for example page %2$s)" msgstr "(Betrifft %1$d Seiten, zum Beispiel Seite %2$s)" #: ../AMC-gui.pl:4723 #, perl-format msgid "(Concerns %1$d exams, see for example sheet %2$d)" msgstr "(Betrifft %1$d Prüfungen, zum Beispiel Bogen %2$d)" #: ../AMC-gui.pl:4840 #, perl-format msgid "Data capture from %d complete papers and %d incomplete papers" msgstr "Datenerfassung von %d vollständigen und %d unvollständigen Bögen" #: ../AMC-gui.pl:4844 #, perl-format msgid "Data capture from %d complete papers" msgstr "Datenerfassung von %d vollständigen Bögen" #. TRANSLATORS: this text points out that no data capture has been made yet. #: ../AMC-gui.pl:4849 msgid "No data" msgstr "Keine Daten" #: ../AMC-gui.pl:4856 #, perl-format msgid "Overwritten pages: %d" msgstr "Überschriebene Seiten: %d" #: ../AMC-gui.pl:4864 msgid "All scans were properly recognized." msgstr "Alle Scans wurden erfolgreich erkannt." #: ../AMC-gui.pl:4871 #, perl-format msgid "%d scans were not recognized." msgstr "%d Scans wurden nicht erkannt." #. TRANSLATORS: column title for the list of overwritten pages. This refers to #. the page from the question #: ../AMC-gui.pl:4895 msgid "Page" msgstr "Seite" #. TRANSLATORS: column title for the list of overwritten pages. This refers to #. the number of times the page has been overwritten. #: ../AMC-gui.pl:4900 msgid "count" msgstr "Anzahl" #. TRANSLATORS: column title for the list of overwritten pages. This refers to #. the date of the last data capture for the page. #: ../AMC-gui.pl:4905 msgid "Date" msgstr "Datum" #: ../AMC-gui.pl:4946 msgid "Looking for analysis..." msgstr "Warten auf Analyse..." #: ../AMC-gui.pl:4988 msgid "Automatic data capture now completed." msgstr "Automatische Datenerfassung ist nun abgeschlossen." #: ../AMC-gui.pl:4989 #, perl-format msgid "It is not complete (missing pages from %d papers)." msgstr "Es ist unvollständig (fehlende Seiten von %d Bögen)." #: ../AMC-gui.pl:4990 msgid "" "You can analyse data capture quality with some indicators values in analysis" " list:" msgstr "" "Sie können die Datenerfassungsqualität analysieren mit den Wertindikatoren " "in der Analyseliste:" #: ../AMC-gui.pl:4992 #, perl-format msgid "" "- %s represents positioning gap for the four corner marks. Great " "value means abnormal page distortion." msgstr "" "- %s steht für die Positionierungslücke der vier Eckpunkte. Großer " "Wert bedeutet abnormale Seitenverzerrung. " #: ../AMC-gui.pl:4994 #, perl-format msgid "" "- great values of %s are seen when darkness ratio is very close to " "the threshold for some boxes." msgstr "" "- große Werte von %s sind sichtbar wenn das Dunkelheitsverhältnis zu " "nah an der Schwelle ist für einige Kästchen." #: ../AMC-gui.pl:4996 #, perl-format msgid "" "You can also look at the scan adjustment (%s) and ticked and unticked" " boxes (%s) using right-click on lines from table %s." msgstr "" "Sie können auch die Scaneinstellung (%s) sowie die markierten und " "unmarkierten Kästchen (%s) ansehen, wenn sie mit der rechten " "Maustaste auf den Linien der Tabelle %s klicken. " #: ../AMC-gui.pl:4996 msgid "Diagnosis" msgstr "Diagnose" #: ../AMC-gui.pl:5024 msgid "Pages that miss data capture to complete students sheets:" msgstr "" "Seiten, die fehlende Datenerfassung haben im Gegensatz zu vollständigen " "Prüflingsseiten." #: ../AMC-gui.pl:5145 #, perl-format msgid "Error loading scan %s" msgstr "Fehler beim Laden von Scan %s" #: ../AMC-gui.pl:5151 msgid "No scan selected" msgstr "Kein Scan ausgewählt" #: ../AMC-gui.pl:5156 msgid "No more unrecognized scans" msgstr "Keine unerkannten Scans mehr" #: ../AMC-gui.pl:5234 msgid "Making diagnostic image..." msgstr "Erstelle Diagnosebild" #: ../AMC-gui.pl:5304 msgid "(no description)" msgstr "(keine Beschreibung)" #. TRANSLATORS: This is a column title for the list of files to be included in #. a template being created. #. TRANSLATORS: This is the title of a column containing attachments file #. paths in a table showing all attachments, when sending them to the students #. by email. #: ../AMC-gui.pl:5389 ../AMC-gui.pl:6336 msgid "file" msgstr "Datei" #: ../AMC-gui.pl:5469 msgid "Add files to template" msgstr "Füge Datei zur Vorlage hinzu" #: ../AMC-gui.pl:5490 msgid "" "When making a template, you can only add files that are within the project " "directory." msgstr "" "Beim Erstellen einer Vorlage können nur Dateien hinzugefügt werden die im " "Projektverzeichnis abgelegt sind." #. TRANSLATORS: This is a column name for the list of available templates, #. when creating a new project based on a template. #: ../AMC-gui.pl:5613 msgid "template" msgstr "Vorlage" #: ../AMC-gui.pl:5658 msgid "All source files" msgstr "Alle Quelldateien" #: ../AMC-gui.pl:5676 #, perl-format msgid "%s files" msgstr "%s Dateien" #: ../AMC-gui.pl:5710 msgid "Archive (zip, tgz)" msgstr "Archiv (zip, tgz)" #: ../AMC-gui.pl:5739 #, perl-format msgid "Nothing extracted from archive %s. Check it." msgstr "Nichts aus dem Archiv %s extrahiert. Bitte prüfen Sie das." #: ../AMC-gui.pl:5868 #, perl-format msgid "" "File %s already exists in project directory: do you want to replace it?" msgstr "" "Datei %s existiert bereits im Projektverzeichnis: möchten Sie diese " "ersetzen?" #: ../AMC-gui.pl:5869 msgid "" "Click yes to replace it and loose pre-existing contents, or No to cancel " "source file import." msgstr "" "Bestätigen Sie um es zu ersetzen und um vorherige Inhalte zu löschen, oder, " "klicken Sie auf Abrechen um den Quelldatei-Import abzubrechen." #: ../AMC-gui.pl:5885 msgid "The source file has been copied to project directory." msgstr "Die Quelldatei wurde in das Projektverzeichnis kopiert." #: ../AMC-gui.pl:5885 #, perl-format msgid "You can now edit it with button \"%s\" or with any editor." msgstr "" "Sie können es nun mit der Schaltfläche \"%s\" or mit einem Editor " "bearbeiten." #: ../AMC-gui.pl:5885 ../AMC-gui-main_window.glade:241 msgid "Edit source file" msgstr "Bearbeiten der Quelldatei" #: ../AMC-gui.pl:5893 #, perl-format msgid "Error copying source file: %s" msgstr "Fehler beim Kopieren der Quelldatei: %s" #: ../AMC-gui.pl:6078 msgid "" "In order to send a useful bug report, please attach the following documents:" msgstr "" "Um einen geeigneten Fehlerbericht zu senden, fügen Sie bitte die folgenden " "Dokumente hinzu:" #: ../AMC-gui.pl:6079 msgid "" "an archive (in some compressed format, like ZIP, 7Z, TGZ...) containing the " "project directory, scan files and configuration " "directory (.AMC.d in home directory), so as to reproduce and analyse " "this problem." msgstr "" "Ein Archiv ( in einem komprimierten Format, wie z.B. ZIP, 7Z, TGZ...), " "welches das Projektverzeichnis, die gescannte Dateien und das " "Konfigurationsverzeichnis (.AMC.d im Home-Verzeichnis) enthält, damit" " das Problem reproduziert und analysiert werden kann." #: ../AMC-gui.pl:6080 msgid "" "the log file produced when the debugging mode (in Help menu) is " "checked. Please try to reproduce the bug with this mode activated." msgstr "" "Der log filewird erstellt wenn der Fehlermodus ( im Hilfe Menü) " "überprüft wird. Bitte versuchen Sie den Fehler zu reproduzieren wenn dieser " "Modus aktiviert ist." #: ../AMC-gui.pl:6081 #, perl-format msgid "Bug reports can be filled at %s or sent to the address below." msgstr "" "Fehlerberichte können gespeichert werden in %s oder an unten stehende " "Adresse geschickt werden." #: ../AMC-gui.pl:6082 ../AMC-gui.pl:6086 msgid "AMC community site" msgstr "AMC Community Webseite" #: ../AMC-gui.pl:6149 msgid "Attach file" msgstr "Datei anhängen" #: ../AMC-gui.pl:6183 msgid "There are no annotated corrected answer sheets to send." msgstr "Es gibt keine korrigierten Bögen mit Anmerkungen zum Versenden." #: ../AMC-gui.pl:6186 msgid "" "Please group the annotated sheets to PDF files to be able to send them." msgstr "" "Bitte gruppieren Sie die Bögen mit Anmerkungen zu PDF-Dateien, um diese " "senden zu können." #: ../AMC-gui.pl:6187 msgid "" "Please annotate answer sheets and group them to PDF files to be able to send" " them." msgstr "" "Bitte gruppieren Sie die Bögen mit Anmerkungen zu PDF-Dateien, um diese " "senden zu können." #: ../AMC-gui.pl:6218 #, perl-format msgid "" "Sending emails requires some perl modules that are not installed: %s. Please" " install these modules and try again." msgstr "" "Das Versenden von E-Mails benötigt einige perl Module, die nicht installiert" " sind: %s. Bitte installieren Sie diese Module und wiederholen Sie den " "Vorgang." #: ../AMC-gui.pl:6239 msgid "" "SMTP security mode \"STARTTLS\" is only available with Email::Sender version" " 1.300027 and over. Please install a newer version of this perl module or " "change SMTP security mode, and try again." msgstr "" "Der SMTP Sicherheitsmodus \"STARTTLS\" ist nur mit Email::Sender Version " "1.300027 und neuer verfügbar. Bitte installieren Sie eine neuere Version des" " Perl Moduls oder ändern Sie den SMTP Sicherheitsmodus und versuchen es " "erneut." #: ../AMC-gui.pl:6255 #, perl-format msgid "The email address you entered (%s) is not correct." msgstr "Die eingegebene E-Mail-Adresse (%s) ist nicht korrekt." #: ../AMC-gui.pl:6257 msgid "Please edit your preferences to correct your email address." msgstr "" "Bitte bearbeiten Sie Ihre Einstellungen, um die E-Mailadresse ändern zu " "können" #: ../AMC-gui.pl:6259 msgid "You did not enter your email address." msgstr "Sie haben keine E-Mail-Adresse angegeben." #: ../AMC-gui.pl:6260 msgid "Please edit the preferences to set your email address." msgstr "" "Bitte bearbeiten Sie die Einstellungen um Ihre E-Mail-Adresse einzugeben." #: ../AMC-gui.pl:6283 #, perl-format msgid "" "The sendmail program cannot be found at the location you specified in" " the preferences (%s). Please update your configuration." msgstr "" "Das Programm sendmail konnte nicht an der in den Einstellungen " "angegebenen Stelle (%s) gefunden werden. Bitte ändern Sie die Konfiguration." #: ../AMC-gui.pl:6303 msgid "" "No email addresses has been found in the students list file. You need to " "write the students addresses in a column of this file." msgstr "" "Es konnten keine E-Mail-Adressen gefunden werden in der " "Prüflingslistendatei. Sie müssen die Prüflingsadressen in eine Spalte in " "dieser Datei schreiben." #. TRANSLATORS: This is the title of a column containing copy numbers in a #. table showing all annotated answer sheets, when sending them to the #. students by email. #: ../AMC-gui.pl:6351 msgid "copy" msgstr "kopieren" #. TRANSLATORS: This is the title of a column containing students email #. addresses in a table showing all annotated answer sheets, when sending them #. to the students by email. #: ../AMC-gui.pl:6363 msgid "email" msgstr "E-Mail" #. TRANSLATORS: This is the title of a column containing mailing status (not #. sent, already sent, failed) in a table showing all annotated answer sheets, #. when sending them to the students by email. #: ../AMC-gui.pl:6369 msgid "status" msgstr "Status" #: ../AMC-gui.pl:6388 msgid "failed" msgstr "fehlgeschlagen" #: ../AMC-gui.pl:6446 msgid "Some files you asked to be attached to the emails are missing:" msgstr "Einige Dateien, die Sie zu den E-Mails anhängen möchten, fehlen:" #: ../AMC-gui.pl:6447 msgid "Please create them or remove them from the list of attached files." msgstr "" "Bitte erstellen Sie diese oder entfernen Sie diese von der Liste der " "angehängten Dateien." #: ../AMC-gui.pl:6499 msgid "Sending emails..." msgstr "Senden der E-Mails..." #: ../AMC-gui.pl:6508 msgid "Cancelled." msgstr "Vorgang abgebrochen." #: ../AMC-gui.pl:6510 msgid "SMTP authentication failed: check SMTP configuration and password." msgstr "" "SMTP Authentifizierung fehlgeschlagen: überprüfen Sie die SMTP Konfiguration" " und das Passwort." #: ../AMC-gui.pl:6512 #, perl-format msgid "%d message(s) has been sent." msgstr "%d Nachricht(en) wurde(n) gesendet." #: ../AMC-gui.pl:6552 msgid "Set exam name" msgstr "festgelegter Prüfungsname" #: ../AMC-gui.pl:6559 ../AMC-gui-edit_preferences.glade:4154 msgid "Examination name" msgstr "Prüfungsname" #: ../AMC-gui.pl:6563 ../AMC-gui-edit_preferences.glade:4165 msgid "Code (short name) for examination" msgstr "Code (Kurzbezeichnung) für Prüfung" #. TRANSLATORS: This is the title of a column containing all columns names #. from the students list file, when choosing which columns has to be exported #. to the spreadsheets. #: ../AMC-gui.pl:6613 msgid "column" msgstr "Spalte" #: ../AMC-gui.pl:6621 msgid "" msgstr "" #: ../AMC-gui.pl:6622 msgid "" msgstr "" #: ../AMC-gui.pl:6623 msgid "" msgstr "" #: ../AMC-gui.pl:6657 msgid "Install an AMC plugin" msgstr "Installieren Sie ein AMC-Plugin" #: ../AMC-gui.pl:6662 msgid "Plugins (zip, tgz)" msgstr "Plugins (zip, tgz)" #: ../AMC-gui.pl:6682 #, perl-format msgid "" "An error occured while trying to extract files from the plugin archive: %s." msgstr "" "Während des Entpackens aus dem Pluginverzeichnis trat ein Fehler auf: %s." #: ../AMC-gui.pl:6696 msgid "Nothing extracted from the plugin archive. Check it." msgstr "Keine Daten aus dem Pluginverzeichnis extrahiert. Bitte überprüfen." #: ../AMC-gui.pl:6706 msgid "" "This is not a valid plugin, as it contains more than one directory at the " "first level." msgstr "" "Dies ist ein ungültiges Plugin, da es mehr als ein Verzeichnis auf der " "ersten Ebene enthält." #: ../AMC-gui.pl:6717 msgid "" "This is not a valid plugin, as it does not contain a perl/AMC subdirectory." msgstr "" "Dies ist kein gültiges Plugin, da es kein Perl/AMC Unterverzeichnis enthält." #: ../AMC-gui.pl:6734 #, perl-format msgid "" "A plugin is already installed with the same name (%s). Do you want to delete" " the old one and overwrite?" msgstr "" "Ein Plugin mit diesem Namen (%s) existiert bereits. Wollen Sie das alte " "Löschen und mit diesem Überschreiben?" #: ../AMC-gui.pl:6752 #, perl-format msgid "Error while moving the plugin to the user plugin directory: %s" msgstr "" "Fehler beim Verschieben des Plugins in das Benutzerpluginverzeichnis: %s" #: ../AMC-gui.pl:6762 msgid "Please restart AMC before using the new plugin..." msgstr "Bitte starten Sie AMC neu, bevor Sie das neue Plugin verwenden..." #: ../AMC-gui.pl:6814 msgid "zooms" msgstr "Vergrößerungen" #: ../AMC-gui.pl:6815 msgid "" "boxes images are extracted from the scans while processing automatic data " "capture. They can be removed if you don't plan to use the zooms dialog to " "check and correct boxes categorization. They can be recovered processing " "again automatic data capture from the same scans." msgstr "" "Bilder der Kästchen werden von den Scans extrahiert während der " "automatischen Verarbeitung der Datenerfassung. Sie können entfernt werden, " "wenn Sie nicht vorhaben, die Vergrößerung des Dialogs zu verwenden, um die " "Kategorisierung der Kästchen zu überprüfen und zu korrigieren. Sie können " "wiederhergestellt werden aus der erneuten Verarbeitung der automatischen " "Datenerfassung des gleichen Scans." #: ../AMC-gui.pl:6827 msgid "layout reports" msgstr "Anordnungsbericht" #: ../AMC-gui.pl:6828 msgid "" "these images are intended to show how the corner marks have been recognized " "and positioned on the scans. They can be safely removed once the scans are " "known to be well-recognized. They can be recovered processing again " "automatic data capture from the same scans." msgstr "" "Diese Bilder sollen zeigen wie die Eckpunkte erkannt wurden und auf den " "Scans positioniert sind. Sie können sicher entfernt werden wenn die Scans " "gut erkannt worden sind. Sie können wiederhergestellt werden bei der " "automatischen Datenerfassung des gleichen Scans." #: ../AMC-gui.pl:6843 msgid "annotated pages" msgstr "mit Anmerkung versehene Seiten" #: ../AMC-gui.pl:6844 msgid "" "jpeg annotated pages are made before beeing assembled to PDF annotated " "files. They can safely be removed, and will be recovered automatically the " "next time annotation will be requested." msgstr "" "jpeg kommentierte Seiten werden zuerst erstellt bevor sie zusammengefügt " "werden zu kommentierten PDF Dateien. Sie können sicher entfernt werden und " "können automatisch wiederhergestellt werden bei der nächsten Anmerkung." #: ../AMC-gui.pl:6874 msgid "Total size of concerned files:" msgstr "Gesamtgröße der betreffenden Dateien:" #: ../AMC-gui.pl:6923 #, perl-format msgid "%s files were removed." msgstr "%s Dateien wurden entfernt." #: ../AMC-gui.pl:6949 #, perl-format msgid "I don't find the command %s." msgstr "Ich kann das Kommando %s nicht finden." #: ../AMC-gui.pl:6950 msgid "Perhaps LaTeX is not installed?" msgstr "Vielleicht ist LaTeX nicht installiert?" #. TRANSLATORS: Do not translate 'auto-multiple-choice latex-link', which is a #. command to be typed on MacOsX #: ../AMC-gui.pl:6954 msgid "" "The style file automultiplechoice.sty seems to be unreachable. Try to use " "command 'auto-multiple-choice latex-link' as root to fix this." msgstr "" "Die Style-Datei automultiplechoice.sty ist nicht erreichbar. Versuchen Sie " "den Befehl 'auto-multiple-choice latex-link' als Wurzel um das Problem " "zulösen " #: ../AMC-prepare.pl:274 #, perl-format msgid "%d/%d good answers not coherent for a simple question" msgstr "%d/%d gute Antworten nicht einheitlich für eine einfache Frage" #: ../AMC-prepare.pl:357 #, perl-format msgid "question ID used several times for the same paper: \"%s\"" msgstr "Frage-ID mehrfach für die selbe Prüfung verwendet: \"%s\"" #: ../AMC-prepare.pl:444 #, perl-format msgid "" "An answer appears to be given outside a question environment, after question" " \"%s\"" msgstr "" "Eine Antwort wurde außerhalb der Fragen-Umgebung gegeben, nach Frage \"%s\" " #: ../AMC-prepare.pl:453 #, perl-format msgid "Answer number ID used several times for the same question: %s" msgstr "Die Fragenummer-ID wurde mehrfach für die gleiche Frage benutzt: %s" #: ../AMC-prepare.pl:708 #, perl-format msgid "%d errors during LaTeX compiling" msgstr "%d Fehler während der LaTeX-Zusammenstellung" #: ../AMC-prepare.pl:768 #, perl-format msgid "" "LaTeX command configured is not present (%s). Install it or change " "configuration, and then rerun." msgstr "" "Der konfigurierte LaTeX Befehl ist nicht da (%s), Bitte installieren Sie es " "oder ändern Sie die Konfiguration, danach versuchen Sie es erneut." #: ../AMC-prepare.pl:797 msgid "solution" msgstr "Lösung" #: ../AMC-prepare.pl:812 msgid "catalog" msgstr "Katalog" #: ../AMC-prepare.pl:845 msgid "question sheet" msgstr "Fragebogen" #: ../AMC-prepare.pl:873 #, perl-format msgid "" "please remove accentuated or non-standard characters from the following " "question ID: \"%s\"" msgstr "" "Bitte entfernen sie das hervorgehobene oder nicht-standardisierte Zeichen " "aus der folgenden Frage-ID: \"%s\"" #: ../AMC-prepare.pl:875 msgid "" "some question IDs seems to have accentuated or non-standard characters. This" " may break future processings." msgstr "" "Einige Frage-ID's scheinen ein hervorgehobenes oder nicht-standardisiertes " "Zeichen zu haben. Dies kann zukünftige Vorgänge verhindern." #: ../AMC-read-pdfform.pl:136 msgid "Reading PDF forms..." msgstr "PDF forms lesen..." #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:592 msgid "Name [name column title in exported spreadsheet]" msgstr "Name" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:594 msgid "Mark [mark column title in exported spreadsheet]" msgstr "Note" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:596 msgid "Exam [exam number column title in exported spreadsheet]" msgstr "Prüfung" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:598 msgid "Score [total score column title in exported spreadsheet]" msgstr "Ergebnis" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:600 msgid "Max [maximum score column title in exported spreadsheet]" msgstr "Maximum" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:604 msgid "max [maximum score row name in exported spreadsheet]" msgstr "Maximum" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:606 msgid "mean [means of scores row name in exported spreadsheet]" msgstr "Mittelwert" #. TRANSLATORS: This is the default text to be written on the top of the first #. page of each paper when annotating. From this string, %s will be replaced #. with the student final mark, %m with the maximum mark he can obtain, %S #. with the student total score, and %M with the maximum score the student can #. obtain. #: ../AMC-perl/AMC/Config.pm:319 msgid "Mark: %s/%m (total score: %S/%M)" msgstr "Note: %s/%m (Gesamtpunktzahl:%S/%M)" #. TRANSLATORS: Subject of the emails which can be sent to the students to #. give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:344 msgid "Exam result" msgstr "Prüfungsergebnis" #. TRANSLATORS: Body text of the emails which can be sent to the students to #. give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:346 msgid "" "Please find enclosed your annotated completed answer sheet.\n" "Regards." msgstr "" "Anbei finden Sie Ihren Antwortbogen mit Erläuterungen.\n" "Mit freundlichen Grüßen" #. TRANSLATORS: Message (first part) when some of the commands that are given #. in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:598 msgid "Some commands allowing to open documents can't be found:" msgstr "" "Einige Befehle zum Öffnen von Dokumenten konnten nicht gefunden werden:" #. TRANSLATORS: Message (second part) when some of the commands that are given #. in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:601 msgid "Please check its correct spelling and install missing software." msgstr "" "Bitte überprüfen Sie die korrekte Schreibweise und installieren Sie fehlende" " Software." #. TRANSLATORS: Message (third part) when some of the commands that are given #. in the preferences cannot be found. The %s will be replaced with the name #. of the menu entry "Preferences" and the name of the menu "Edit". #: ../AMC-perl/AMC/Config.pm:603 #, perl-format msgid "You can change used commands following %s from menu %s." msgstr "" "Sie können die benutzten Kommandos (%s) im Menü verändern %s." #. TRANSLATORS: "Preferences" menu #: ../AMC-perl/AMC/Config.pm:605 ../AMC-gui-main_window.glade:2706 msgid "Preferences" msgstr "Einstellungen" #. TRANSLATORS: "Edit" menu #: ../AMC-perl/AMC/Config.pm:607 msgid "Edit" msgstr "Bearbeiten" #. TRANSLATORS: Error writing one of the configuration files (global or #. project). The first %s will be replaced with the path of that file, and the #. second with the error text. #: ../AMC-perl/AMC/Config.pm:841 #, perl-format msgid "Error writing configuration file %s: %s" msgstr "Fehler beim Schreiben der Konfigurationsdatei %s: %s" #: ../AMC-perl/AMC/DataModule/association.pm:103 msgid "Fetching association results from old format XML files..." msgstr "Holen von Verbindungsergebnisen vom alten Format XML Dateien" #: ../AMC-perl/AMC/DataModule/capture.pm:210 msgid "Including zooms in the database..." msgstr "Vergrößerungen in die Datenbank hinzufügen..." #: ../AMC-perl/AMC/DataModule/capture.pm:229 #: ../AMC-perl/AMC/DataModule/capture.pm:237 msgid "Building capture database indexes..." msgstr "Erstellen des Datenbankverfassungsindexes..." #: ../AMC-perl/AMC/DataModule/capture.pm:279 msgid "Fetching data capture results from old format XML files..." msgstr "Holen von Datenerfassungsergebnissen aus alten Format XML Dateien..." #: ../AMC-perl/AMC/DataModule/layout.pm:222 msgid "Building layout database indexes..." msgstr "Erstellen der Aufmachung des Dankenbankindexes..." #: ../AMC-perl/AMC/DataModule/layout.pm:288 msgid "Fetching layout data from old format XML files..." msgstr "Holen von Anordnungsdaten von alten Format XML Dateien..." #: ../AMC-perl/AMC/DataModule/scoring.pm:256 msgid "Fetching scoring data from old format XML files..." msgstr "Holen von Ergebnisdaten von alten Format XML Dateien..." #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the total number of sheets. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:236 msgid "ALL" msgstr "GESAMT" #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the number of sheets for which the question did not get an answer. Please #. let this label short. #: ../AMC-perl/AMC/Export/ods.pm:238 msgid "NA" msgstr "NICHT GEANTWORTET" #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the number of sheets for which the question got an invalid answer. Please #. let this label short. #: ../AMC-perl/AMC/Export/ods.pm:240 msgid "INVALID" msgstr "UNGÜLTIG" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains the reference of the boxes. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:268 msgid "Box" msgstr "Box" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains the number of items (ticked boxes, or invalid or empty questions). #. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:271 msgid "Nb" msgstr "Anzahl" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains percentage of questions for which the corresponding box is ticked #. over all questions. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:274 msgid "/all" msgstr "% gesamt" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains percentage of questions for which the corresponding box is ticked #. over the expressed questions (counting only questions that did not get #. empty or invalid answers). Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:277 msgid "/expr" msgstr "% angekreuzt" #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the number of sheets for which the question got the "none of the above are #. correct" answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:305 msgid "NONE" msgstr "KEINE" #. TRANSLATORS: table name in the exported ODS spreadsheet for the table that #. contains the marks. #: ../AMC-perl/AMC/Export/ods.pm:883 ../AMC-perl/AMC/Gui/Notes.glade:8 msgid "Marks" msgstr "Noten" #. TRANSLATORS: Label of the table with questions basic statistics in the #. exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1310 msgid "Questions statistics" msgstr "Fragenstatistik" #. TRANSLATORS: Label of the table with indicative questions basic statistics #. in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1317 msgid "Indicative questions statistics" msgstr "bezeichnende Fragenstatistik" #. TRANSLATORS: Label of the table with a legend (explaination of the colors #. used) in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1327 ../AMC-perl/AMC/Export/ods.pm:1331 msgid "Legend" msgstr "Legende" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that have not been asked to some students. #: ../AMC-perl/AMC/Export/ods.pm:1337 msgid "Non applicable" msgstr "Nicht zutreffend" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that have not been answered. #: ../AMC-perl/AMC/Export/ods.pm:1341 msgid "No answer" msgstr "Keine Antwort" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that have not been answered, but are cancelled by the use #. of allowempty scoring strategy. #: ../AMC-perl/AMC/Export/ods.pm:1345 msgid "Cancelled" msgstr "Vorgang abgebrochen" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1349 msgid "Invalid answer" msgstr "Ungültige Antwort" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1354 msgid "Correct answer" msgstr "Richtige Antwort" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1358 msgid "Wrong answer" msgstr "Falsche Antwort" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the indicative questions. #: ../AMC-perl/AMC/Export/ods.pm:1363 msgid "Indicative" msgstr "Bezeichnend" #: ../AMC-perl/AMC/Export/ods.pm:1391 msgid "" "An old state of the exported file seems to be already opened. Use " "File/Reload from OpenOffice/LibreOffice to refresh." msgstr "" "Eine alte Version der exportierten Datei ist bereits geöffnet. Bitte klicken" " Sie auf File/Reload in OpenOffice/LibreOffice um zu aktualisieren." #: ../AMC-perl/AMC/Filter/plain.pm:92 msgid "" "Please code your student number opposite, and write your name in the box " "below." msgstr "" "Bitte kodieren Sie gegenüber die Matrikelnummer/Prüflingsnummer und " "schreiben Sie Ihren Namen in das untenstehende Feld." #. TRANSLATORS: Message when the Pages option used in AMC-TXT can't be parsed. #. %s will be replaced with the option value #: ../AMC-perl/AMC/Filter/plain.pm:209 #, perl-format msgid "Pages option value can't be understood: %s" msgstr "Wert der Seitenkonfiguration wird nicht verstanden: %s" #: ../AMC-perl/AMC/Filter/plain.pm:238 #, perl-format msgid "Line %d" msgstr "Zeile %d" #. TRANSLATORS: Error text for AMC-TXT parsing, when opening a new question #. whereas the previous question has less than two choices #: ../AMC-perl/AMC/Filter/plain.pm:249 msgid "Previous question has less than two choices" msgstr "Vorangehende Frage hat weniger als zwei Antwortmöglichkeiten" #. TRANSLATORS: Error text for AMC-TXT parsing #: ../AMC-perl/AMC/Filter/plain.pm:258 #, perl-format msgid "Previous question is a simple question but has %d correct choice(s)" msgstr "" "Vorangehende Frage ist eine einfache Frage, hat aber %d korrekte " "Antwortmöglichkeit(en)." #: ../AMC-perl/AMC/Filter/plain.pm:342 msgid "" "Invalid encoding: you must use UTF-8, but your source file was saved using " "another encoding" msgstr "" "Ungültige Codierung: Sie müssen UTF-8 verwenden, aber die Quelldatei wurde " "mit einer anderen Kodierung gespeichert." #: ../AMC-perl/AMC/Filter/plain.pm:368 #, perl-format msgid "File not found: %s" msgstr "Datei wurde nicht gefunden: %s" #. TRANSLATORS: Error text for AMC-TXT parsing, when an unknown option is #. given a value #: ../AMC-perl/AMC/Filter/plain.pm:386 #, perl-format msgid "Unknown option: %s" msgstr "Unbekannte Option: %s" #. TRANSLATORS: Error text for AMC-TXT parsing when a choice is given but no #. question were opened #: ../AMC-perl/AMC/Filter/plain.pm:456 msgid "Choice outside question" msgstr "Auswahl außerhalb der Frage" #: ../AMC-perl/AMC/Filter/plain.pm:1240 #, perl-format msgid "" "The following fonts does not seem to be installed on the system: %s." msgstr "" "Die folgenden Schriftarten sind nicht auf dem System installiert: %s." #: ../AMC-perl/AMC/Filter/register.pm:78 msgid "No description available." msgstr "Keine Beschreibung verfügbar." #: ../AMC-perl/AMC/Gui/Association.pm:133 msgid "" "Names images not found... Maybe you forgot using \\namefield command in " "LaTeX source?" msgstr "" "Bildernamen wurden nicht gefunden... Vielleicht haben Sie den \\namefield " "Befehl in der LaTeX Quelle vergessen?" #: ../AMC-perl/AMC/Gui/Association.pm:690 msgid "Sheet" msgstr "Bogen" #: ../AMC-perl/AMC/Gui/Association.pm:728 msgid "End" msgstr "Ende" #: ../AMC-perl/AMC/Gui/Manuel.pm:117 msgid "Page layout" msgstr "Seitenlayout" #: ../AMC-perl/AMC/Gui/Manuel.pm:125 msgid "Original" msgstr "Original" #: ../AMC-perl/AMC/Gui/Manuel.pm:126 ../AMC-gui-edit_preferences.glade:2138 msgid "Scan" msgstr "Scan" #. TRANSLATORS: This is one of the choices for pages navigation in manual data #. capture window. Here, navigation goes through all pages. Please keep this #. text very short (say less than 5 letters) so that the window is not too #. large #: ../AMC-perl/AMC/Gui/Manuel.pm:130 ../AMC-perl/AMC/Gui/Manuel.pm:146 msgid "all" msgstr "alle" #. TRANSLATORS: This is one of the choices for pages navigation in manual data #. capture window. Here, navigation goes through pages with some invalid #. answers. Please keep this text very short (say less than 5 letters) so that #. the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:132 msgid "inv" msgstr "inv" #. TRANSLATORS: This is one of the choices for pages navigation in manual data #. capture window. Here, navigation goes through pages with empty or invalid #. answers. Please keep this text very short (say less than 5 letters) so that #. the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:134 msgid "i&e" msgstr "i&l" #: ../AMC-perl/AMC/Gui/Manuel.pm:184 msgid "page" msgstr "Seite" #: ../AMC-perl/AMC/Gui/Manuel.pm:531 #, perl-format msgid "" "This is a template exam that you cannot edit. To create a new exam from this" " one to be edited, use the '%s' button." msgstr "" "Dies ist eine Vorlage und kann nicht bearbeitet werden. Um eine neue Prüfung" " zu erstellen mit Hilfe dieser Vorlage, klicken Sie bitte auf '%s'. " #: ../AMC-perl/AMC/Gui/Manuel.pm:531 ../AMC-perl/AMC/Gui/Manuel.glade:406 msgid "Add photocopy" msgstr "Kopie hinzufügen" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms #. window #: ../AMC-perl/AMC/Gui/Zooms.pm:76 msgid "drag and drop" msgstr "Ziehen und fallen lassen" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms #. window #: ../AMC-perl/AMC/Gui/Zooms.pm:78 msgid "click" msgstr "Klicken" #: ../AMC-perl/AMC/Gui/Zooms.pm:126 ../AMC-perl/AMC/Gui/Zooms.pm:413 #, perl-format msgid "Boxes zooms for page %s" msgstr "Vergrößerung der Boxen für Seite %s" #: ../AMC-perl/AMC/Gui/Zooms.pm:402 ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "" "You moved some boxes to correct automatic data query, but this work is not " "saved yet." msgstr "" "Sie haben einige Kästchen bewegt um die automatsche Datenabfrage zu " "korrigieren, dies wurde aber noch nicht gespeichert." #: ../AMC-perl/AMC/Gui/Zooms.pm:402 msgid "" "Do you want to save these modifications before looking at another page?" msgstr "" "Möchten Sie die Änderungen speichern bevor sie sich eine andere Seiten " "ansehen?" #: ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "Dou you really want to close and ignore these modifications?" msgstr "" "Möchten Sie das Programm wirklich beenden und die Änderungen ignorieren?" #: ../AMC-perl/AMC/Print/cups.pm:71 #, perl-format msgid "Perl module(s) missing: %s" msgstr "Fehlende(s) Perl Modul(e): %s" #: ../AMC-perl/AMC/Print/cupslp.pm:47 #, perl-format msgid "The following commands are missing: %s." msgstr "Es fehlen die folgenden Befehle: %s." #: ../AMC-perl/AMC/Export/register/CSV.pm:70 msgid "Separator" msgstr "Trennzeichen" #: ../AMC-perl/AMC/Export/register/CSV.pm:83 msgid "Ticked boxes" msgstr "Angekreuzte Kästchen" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'No, don't group questions by scope in the exported ODS #. file' #: ../AMC-perl/AMC/Export/register/CSV.pm:89 #: ../AMC-perl/AMC/Export/register/ods.pm:124 msgid "No" msgstr "Nein" #: ../AMC-perl/AMC/Export/register/CSV.pm:90 #: ../AMC-perl/AMC/Export/register/CSV.pm:91 msgid "Yes:" msgstr "Ja:" #: ../AMC-perl/AMC/Export/register/CSV.pm:97 #: ../AMC-perl/AMC/Export/register/ods.pm:152 msgid "Choose columns" msgstr "Wähle Spalten" #. TRANSLATORS: List of students with their scores: one of the export formats. #: ../AMC-perl/AMC/Export/register/List.pm:37 msgid "PDF list" msgstr "PDF Liste" #: ../AMC-perl/AMC/Export/register/List.pm:64 msgid "Number of columns" msgstr "Anzahl der Spalten" #: ../AMC-perl/AMC/Export/register/List.pm:67 msgid "Long list is divided into this number of columns on each page." msgstr "" "Die Lange Liste ist geteilt in diese Anzahl von Spalten auf jeder Seite." #: ../AMC-perl/AMC/Export/register/List.pm:71 msgid "Paper size" msgstr "Papiergröße" #. TRANSLATORS: Check button label in the exports tab. If checked, a table #. with questions basic statistics will be added to the ODS exported #. spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:82 msgid "Stats table" msgstr "Statistik Tabelle" #. TRANSLATORS: Menu to export statistics table in the exports tab. The first #. menu entry means 'do not build a stats table' in the exported ODS file. You #. can omit the [...] part, that is here only to state the context. #: ../AMC-perl/AMC/Export/register/ods.pm:89 msgid "None [no stats table to export]" msgstr "Keine [keine Statistiktabelle zu exportieren]" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second #. menu entry means 'build a stats table, with a horizontal flow' in the #. exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:91 #: ../AMC-perl/AMC/Export/register/ods.pm:106 msgid "Horizontal flow" msgstr "Horizontaler Fluss" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second #. menu entry means 'build a stats table, with a vertical flow' in the #. exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:93 #: ../AMC-perl/AMC/Export/register/ods.pm:107 msgid "Vertical flow" msgstr "Vertikaler Fluss" #. TRANSLATORS: Check button label in the exports tab. If checked, a table #. with indicative questions basic statistics will be added to the ODS #. exported spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:99 msgid "Indicative stats table" msgstr "Indikative Statistiktabelle" #: ../AMC-perl/AMC/Export/register/ods.pm:105 msgid "None" msgstr "keine" #: ../AMC-perl/AMC/Export/register/ods.pm:110 msgid "" "Create a table with basic statistics about answers for each indicative " "question?" msgstr "" "Kreieren Sie eine Tabelle mit den Grundstatistiken mit den Antworten für " "jede indikative Frage." #. TRANSLATORS: Check button label in the exports tab. If checked, sums of the #. scores for groups of questions will be added to the exported table. #: ../AMC-perl/AMC/Export/register/ods.pm:114 msgid "Score groups" msgstr "Ergebnisgruppen" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'Yes, group questions by scope in the exported ODS file, and #. report total scores' #: ../AMC-perl/AMC/Export/register/ods.pm:126 msgid "Yes (values)" msgstr "Ja (Werte)" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'Yes, group questions by scope in the exported ODS file, and #. report total scores as percentages.' #: ../AMC-perl/AMC/Export/register/ods.pm:128 msgid "Yes (percentages)" msgstr "Ja (Prozente)" #: ../AMC-perl/AMC/Export/register/ods.pm:131 msgid "Add sums of the scores for each question group?" msgstr "Summer der Ergebnisse jeder Fragengruppe hinzufügen?" #: ../AMC-perl/AMC/Export/register/ods.pm:134 msgid "with scope separator" msgstr "mit Trennzeichen" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'No, don't group questions by scope in the exported ODS #. file' #: ../AMC-perl/AMC/Export/register/ods.pm:141 msgid "':'" msgstr "':'" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'Yes, group questions by scope in the exported ODS file, and #. you can detect the scope from a question ID using the text before the #. separator .' #: ../AMC-perl/AMC/Export/register/ods.pm:143 msgid "'.'" msgstr "'.'" #: ../AMC-perl/AMC/Export/register/ods.pm:146 msgid "" "To define groups, use question ids in the form \"group:question\" or " "\"group.question\", depending on the scope separator." msgstr "" "Um die Gruppen zu definieren, benutzen Sie die Frage-ID's in der Form " "\"Gruppe:Frage\" oder \"Gruppe.Frage\" abhängig vom Trennzeichen." #: ../AMC-perl/AMC/Filter/register/latex.pm:54 msgid "" "This is the native format for AMC. LaTeX is not so easy to use for unexperienced users, but the LaTeX power allows the user to build any multiple choice subject. As an example, the following is possible with LaTeX but not with other formats:\n" "* any kind of layout,\n" "* questions with random numerical values,\n" "* use of figures, mathematical formulas\n" "* and much more!" msgstr "" "Dies ist das native Format von AMC. LaTeX ist nicht gerade einfach für unerfahrene Benutzer, aber LaTeX ermöglicht dem Benutzer jegliche 'multiple choice' Frage zu gestalten. Das Folgende ist z.B. nur möglich mit LaTeX aber nicht mit anderen Formaten:\n" "* jedes mögliche Layout,\n" "* Fragen mit zufälligen numerischen Werten,\n" "* die Benutzung von Symbolen, numerischen Formeln\n" "* und vieles mehr!" #: ../AMC-perl/AMC/Filter/register/plain.pm:51 msgid "" "This is a plain text format for easy question writting. See the following minimal example:\n" "\n" "Title: Paper title\n" "\n" "* Which is the capital city of Cameroon?\n" "+ Yaounde\n" "- Douala\n" "- Kribi" msgstr "" "Das ist ein sehr einfaches Textformat um Fragen zu schreiben. Es folgt ein kleines Beispiel:\n" "\n" "Title: Aufsatztitel\n" "\n" "* Welche ist die Hauptstadt von Kamerun?\n" "+ Yoiunde\n" "- Duoala\n" "- Kribi" #: ../AMC-gui-apropos.glade:8 msgid "AMC A propos" msgstr "Über AMC" #: ../AMC-gui-apropos.glade:17 msgid "" "Copyright (C) 2008-2018\n" "Alexis Bienvenüe and the AMC development team" msgstr "" "Copyright (C) 2008-2018\n" "Alexis Bienvenüe und das AMC Entwicklungsteam" #: ../AMC-gui-apropos.glade:19 msgid "Automatic multiple choice questionnaires management" msgstr "Automatisches multiple-choice Fragebogenmanagement" #: ../AMC-gui-apropos.glade:21 msgid "Visit the AMC website" msgstr "Die AMC Webseite besuchen" #: ../AMC-gui-choix_pages_impression.glade:33 msgid "Papers printing" msgstr "Drucken von Bögen" #: ../AMC-gui-choix_pages_impression.glade:98 msgid "Please select papers you wish to print:" msgstr "Bitte wählen Sie die Bögen aus, die gedruckt werden sollen:" #: ../AMC-gui-choix_pages_impression.glade:116 msgid "Select papers you wish to print (ctrl-a for all), then confirm..." msgstr "" "Bitte wählen Sie die Bögen für den Druck aus (Strg-A für alle), dann " "bestätigen Sie..." #: ../AMC-gui-choix_pages_impression.glade:144 msgid "Answer sheet printing" msgstr "Antwortbogen drucken" #: ../AMC-gui-choix_pages_impression.glade:190 msgid "Printer:" msgstr "Drucker:" #: ../AMC-gui-choix_pages_impression.glade:243 msgid "two-side printing" msgstr "Doppelseitiger Druck" #: ../AMC-gui-choix_pages_impression.glade:319 msgid "printing options" msgstr "Druckoptionen" #: ../AMC-gui-choix_pages_impression.glade:343 msgid "Destination directory" msgstr "Zielverzeichnis" #: ../AMC-gui-choix_pages_impression.glade:356 msgid "Select destination directory for printable files" msgstr "Wählen Sie ein Zielverzeichnis für druckbare Dateien" #: ../AMC-gui-choix_postcorrect.glade:20 msgid "Post-correction" msgstr "Nachbearbeitung" #: ../AMC-gui-choix_postcorrect.glade:95 msgid "" "Please enter the teacher score sheet number and copy number to get the " "correct answers from:" msgstr "" "Bitte geben Sie die Lehrer-Ergebnisseitennummer ein und die Kopien-nummer um" " die richtigen Antworten zu bekommen von:" #: ../AMC-gui-choix_postcorrect.glade:189 msgid "Guess simple/multiple status" msgstr "Rate einfach/mehrfach Status" #: ../AMC-gui-choix_postcorrect.glade:194 msgid "" "Sets type of all questions for which 2 or more answers are ticked on the " "teacher answer sheet to multiple" msgstr "" "Setzen Sie alle Fragetypen für die es mehr als zwei richtige Antworten auf " "dem Lehrerbogen gibt zu Mehrfach" #: ../AMC-gui-choix_projet.glade:18 msgid "Open a MC project" msgstr "Öffne ein MC-Projekts" #: ../AMC-gui-choix_projet.glade:61 ../AMC-gui-liste_dialog.glade:91 msgid "Cancel" msgstr "Abbrechen" #: ../AMC-gui-choix_projet.glade:104 ../AMC-gui-main_window.glade:2665 msgid "New project" msgstr "Neues Projekt" #: ../AMC-gui-choix_projet.glade:163 msgid "Rename" msgstr "Umbenennen" #: ../AMC-gui-choix_projet.glade:182 msgid "Clone" msgstr "Duplizieren" #: ../AMC-gui-choix_projet.glade:278 msgid "Open an existing MC project:" msgstr "Öffnen eines bestehenden MC-Projekts:" #: ../AMC-gui-choix_projet.glade:345 msgid "Create an new project:" msgstr "Erstellen eines neuen Projekts:" #: ../AMC-gui-choix_projet.glade:364 msgid "Project name:" msgstr "Projektname:" #: ../AMC-gui-choix_projet.glade:398 msgid "" "Note : a project name can only contain alphanumeric characters, plus " "some simple characters (-_+.:)." msgstr "" "Hinweis: Ein Projektname kann nur alphanumerische Zeichen und einige " "einfache Zeichen (-_+.:) beinhalten." #: ../AMC-gui-choose-mode.glade:10 msgid "" "Before starting data capture, please choose the mode corresponding to what " "you did with the printed questions." msgstr "" "Bevor Sie die Datenerfassung starten, wählen Sie bitte den dazugehörigen " "Modus mit dem Sie die Fragen ausgedruckt haben." #: ../AMC-gui-choose_columns.glade:8 msgid "Choose columns to export" msgstr "Spalten für Export auswählen" #: ../AMC-gui-choose_columns.glade:65 msgid "Order and select the columns to include in the exported file:" msgstr "" "Ordnen und selektieren Sie die Spalten um sie in die Exportdatei zu " "inkludieren:" #: ../AMC-gui-choose_students.glade:13 msgid "Choose students" msgstr "Wähle Prüfling" #: ../AMC-gui-choose_students.glade:70 msgid "Select the students for which you want to annotate the score sheet:" msgstr "" "Wählen Sie die Prüflinge aus für die Sie eine Anmerkung auf dem " "Ergebnisbogen machen wollen:" #: ../AMC-gui-choose_students.glade:114 msgid "Search:" msgstr "Suche:" #: ../AMC-gui-cleanup.glade:13 ../AMC-gui-main_window.glade:2939 msgid "Cleanup" msgstr "Aufräumen" #: ../AMC-gui-cleanup.glade:40 msgid "Remove selected files" msgstr "Entferne ausgewählte Dateien" #: ../AMC-gui-cleanup.glade:71 msgid "" "To save disk space, you can remove some intermediate files from your project" " directory." msgstr "" "Um Speicherplatz zu sparen können Sie einige temporäre Dateien aus Ihrem " "Projektverzeichnis entfernen." #: ../AMC-gui-edit_preferences.glade:230 ../AMC-gui-edit_preferences.glade:243 msgid "LaTeX models directory" msgstr "LaTeX Vorlagenverzeichnis" #: ../AMC-gui-edit_preferences.glade:232 msgid "" "Please select a directory containing LaTeX models for AMC, with their " "descriptions" msgstr "" "Bitte wählen Sie ein Verzeichnis, welches LaTeX Vorlagen für AMC enthält " "(inkl. deren Beschreibungen)" #: ../AMC-gui-edit_preferences.glade:255 msgid "" "Projects directory. May be modified only if there are no opened projects." msgstr "" "Projektverzeichnis. Darf nur verändert werden, wenn keine Projekte geöffnet " "sind." #: ../AMC-gui-edit_preferences.glade:257 msgid "Please select the projects directory" msgstr "Bitte wählen Sie das Projektverzeichnis" #: ../AMC-gui-edit_preferences.glade:268 msgid "Projects directory" msgstr "Projektverzeichnis" #: ../AMC-gui-edit_preferences.glade:283 msgid "Directories" msgstr "Verzeichnisse" #: ../AMC-gui-edit_preferences.glade:315 msgid "PDF files" msgstr "PDF-Dateien" #: ../AMC-gui-edit_preferences.glade:326 msgid "Images" msgstr "Bilder" #: ../AMC-gui-edit_preferences.glade:337 msgid "CSV data files" msgstr "CSV-Dateien" #: ../AMC-gui-edit_preferences.glade:348 msgid "OpenOffice files" msgstr "OpenOffice Dateien" #: ../AMC-gui-edit_preferences.glade:359 msgid "XML files" msgstr "XML-Dateien" #: ../AMC-gui-edit_preferences.glade:370 msgid "Command to edit LaTeX files" msgstr "Befehl zum Bearbeiten von LaTeX-Dateien" #: ../AMC-gui-edit_preferences.glade:371 msgid "LaTeX editor" msgstr "LaTeX-Editor" #: ../AMC-gui-edit_preferences.glade:382 msgid "Plain text editor" msgstr "Texteditor" #: ../AMC-gui-edit_preferences.glade:393 msgid "" "Command for directory browsing (string %d will be replaced by the directory " "path before execution)" msgstr "" "Befehl für das Durchsuchen des Verzeichnisses (string %d wird ersetzt durch " "den Verzeichnispfad vor der Ausführung)" #: ../AMC-gui-edit_preferences.glade:394 msgid "File browser" msgstr "Dateimanager" #: ../AMC-gui-edit_preferences.glade:405 msgid "Web browser" msgstr "Webbrowser" #: ../AMC-gui-edit_preferences.glade:534 msgid "Visualisation commands" msgstr "Visualisierungsbefehle" #: ../AMC-gui-edit_preferences.glade:565 msgid "Default LaTeX engine" msgstr "Standard LaTeX-System" #: ../AMC-gui-edit_preferences.glade:576 msgid "" "Default command to compile LaTeX file and make PDF, PS or DVI output (may be" " changed for each project)." msgstr "" "Standardbefehl zum Kompilieren von LaTeX-Dateien zum Erstellen von PDF-, PS-" " oder DVI-Dateien (Kann für jedes Projekt geändert werden)." #: ../AMC-gui-edit_preferences.glade:599 msgid "External programs" msgstr "Externe Programme" #: ../AMC-gui-edit_preferences.glade:631 #: ../AMC-gui-edit_preferences.glade:4238 msgid "Students list charset" msgstr "Codierung der Prüflingsliste" #: ../AMC-gui-edit_preferences.glade:642 msgid "CSV charset" msgstr "Codierung der CSV-Datei" #: ../AMC-gui-edit_preferences.glade:653 msgctxt "" "option name. Refers to a list of headers that may contain surnames in the " "CSV names list" msgid "CSV surname headers" msgstr "CSV Überschrift: Familienname" #: ../AMC-gui-edit_preferences.glade:664 msgctxt "" "option name. Refers to a list of headers that may contain names in the CSV " "names list." msgid "CSV name headers" msgstr "CSV Überschrift: Vorname" #: ../AMC-gui-edit_preferences.glade:675 msgid "LaTeX files charset" msgstr "Codierung der LaTeX-Datei" #: ../AMC-gui-edit_preferences.glade:686 msgid "Default encoding for the students list file." msgstr "Standardencoding für die Datei mit der Prüflingsliste" #: ../AMC-gui-edit_preferences.glade:705 msgid "Default charset for AMC CSV output." msgstr "Standard-Codierung für AMC CSV Ausgabe" #: ../AMC-gui-edit_preferences.glade:724 msgid "" "Comma separated list of CSV headers of columns that may contain the surnames" " of the students in the names list file." msgstr "" "Komma getrennte Listen der CSV-Spaltenüberschriften die eventuell Nachnamen " "der Prüflinge in der Namenslistendatei enthalten" #: ../AMC-gui-edit_preferences.glade:738 msgid "" "Comma separated list of CSV headers of columns that may contain the names of" " the students in the names list file." msgstr "" "Komma getrennte Listen der CSV-Spaltenüberschriften die eventuell Vornamen " "der Prüflinge in der Namenslistendatei enthalten" #: ../AMC-gui-edit_preferences.glade:752 msgid "Charset used when producing LaTeX files from models." msgstr "" "Codierung, welche bei der Erstellung von LaTeX-Dateien aus Modellen genutzt " "wird." #: ../AMC-gui-edit_preferences.glade:769 msgid "Decimal delimiter" msgstr "Dezimaltrennzeichen" #: ../AMC-gui-edit_preferences.glade:797 msgid "ASCII filenames" msgstr "ASCII Dateinamen" #: ../AMC-gui-edit_preferences.glade:809 msgid "" "Force all annotated completed student sheets to have only ASCII characters " "in their file names. When set, all non-ASCII characters will be replaced by " "underscores." msgstr "" "Erzwingt alle kommentierten und fertig gestellten Prüflingsbögen, dass diese" " nur ein ASCII Zeichen in ihren Dateinamen haben. Wenn dem nicht so ist, " "werden alle ohne ASCII Zeichen durch Unterstriche ersetzt." #: ../AMC-gui-edit_preferences.glade:821 msgid "Accept non-ASCII project names" msgstr "non-ASCII Projektnamen akzeptieren" #: ../AMC-gui-edit_preferences.glade:848 msgid "Internationalization" msgstr "Internationalisierung" #: ../AMC-gui-edit_preferences.glade:880 msgid "Printing method" msgstr "Druckmethode" #: ../AMC-gui-edit_preferences.glade:891 msgid "Printing command" msgstr "Druckbefehl" #: ../AMC-gui-edit_preferences.glade:913 msgid "Useful printing options" msgstr "Sinnvolle Druckoptionen" #: ../AMC-gui-edit_preferences.glade:941 msgid "" "Command to print one paper (with stapling). String %f will be replaced by " "the PDF file to be printed." msgstr "" "Befehl vom Drucken einer Seite (mit Klammer). String %f wird ersetzt durch " "die PDF-Dateien beim Drucken." #: ../AMC-gui-edit_preferences.glade:984 msgid "Printing" msgstr "Drucken" #: ../AMC-gui-edit_preferences.glade:1016 msgid "Number of processes" msgstr "Anzahl der Prozesse" #: ../AMC-gui-edit_preferences.glade:1027 msgid "" "Number of processes to be run in parallel. Default value is 0, which allows " "to start as many processes as processors." msgstr "" "Anzahl der Prozesse die gleichzeitig gestartet werden sollen. Der " "Standardwert ist 0, was bedeutet es werden so viele Prozesse wie Prozessoren" " gestartet." #: ../AMC-gui-edit_preferences.glade:1044 msgid "System" msgstr "System" #: ../AMC-gui-edit_preferences.glade:1065 msgid "Main" msgstr "Haupt" #: ../AMC-gui-edit_preferences.glade:1094 ../AMC-gui-main_window.glade:2771 msgid "Solution" msgstr "Lösung" #: ../AMC-gui-edit_preferences.glade:1110 ../AMC-gui-main_window.glade:2783 msgid "Individual solution" msgstr "individuelle Lösung" #: ../AMC-gui-edit_preferences.glade:1125 ../AMC-gui-main_window.glade:2759 msgid "Catalog" msgstr "Katalog" #: ../AMC-gui-edit_preferences.glade:1147 msgid "Optional working documents to build" msgstr "Optionale Arbeitsdokumente zu bauen" #: ../AMC-gui-edit_preferences.glade:1170 ../AMC-gui-main_window.glade:394 msgid "Documents" msgstr "Dokumente" #: ../AMC-gui-edit_preferences.glade:1213 msgid "Limit MSE" msgstr "Grenze MSE" #: ../AMC-gui-edit_preferences.glade:1224 msgid "Limit sensitivity" msgstr "Empfindlichkeitsgrenze" #: ../AMC-gui-edit_preferences.glade:1265 msgid "Colouring thresholds" msgstr "Schwellwerte für Farben" #: ../AMC-gui-edit_preferences.glade:1299 msgid "No answers color" msgstr "Farbe für \"keine Antwort\"" #: ../AMC-gui-edit_preferences.glade:1310 msgid "Invalid answers color" msgstr "Farbe für falsche Antworten" #: ../AMC-gui-edit_preferences.glade:1347 msgid "Scan view" msgstr "Scans" #: ../AMC-gui-edit_preferences.glade:1379 msgid "Maximum density for manual data capture question paper rendering (DPI)" msgstr "" "Maximale Dichte für die manuelle Datenerfassung für die Fragebögen-Renderung" " (DPI)" #: ../AMC-gui-edit_preferences.glade:1380 msgid "Manual capture density (DPI)" msgstr "manuelle Erfassungsdichte (DPI)" #: ../AMC-gui-edit_preferences.glade:1391 msgid "Image type" msgstr "Bildformat" #: ../AMC-gui-edit_preferences.glade:1402 msgid "Remember window size" msgstr "Speichere Fenstergröße" #. Label in the preferences window, corresponding to "Starting number of #. columns for names in the manual association window". #: ../AMC-gui-edit_preferences.glade:1413 msgid "Number of columns for names" msgstr "Anzahl von Spalten für Namen" #. Label in the preferences window, corresponding to the "Number of columns #. for zoomed boxes in the zooms window (opened from the Diagnosis list in the #. Data capture tab)". #: ../AMC-gui-edit_preferences.glade:1424 msgid "Number of columns for zoomes boxes" msgstr "Anzahl der Spalten für vergrößerte Kästchen" #: ../AMC-gui-edit_preferences.glade:1448 msgid "" "Temporary file type used for manual data capture. Fastest choice is (none), " "but this seems to be problematic in some environments." msgstr "" "Temporärer Dateityp für manuelle Datenerfassung. Die schnellste Wahl ist " "(keine), aber es scheint problematisch zu sein in einigen Einstellungen." #: ../AMC-gui-edit_preferences.glade:1467 msgid "Do you want to keep the same window size each time you start AMC?" msgstr "" "Möchten Sie die Fenstergröße bei jedem Programmstart von AMC beibehalten?" #: ../AMC-gui-edit_preferences.glade:1480 msgid "Starting number of columns for names in the manual association window." msgstr "Startnummer der Namensspalten in der manuellen Fensterverbindung" #: ../AMC-gui-edit_preferences.glade:1497 msgid "" "Number of columns for zoomed boxes in the zooms window (opened from the " "Diagnosis list in the Data capture tab)." msgstr "" "Anzahl der Spalten für vergrößerte Kästchen im Vergrößerungsfenster " "(geöffnet in der Diagnoseliste im Datenerfassungs-tab)." #: ../AMC-gui-edit_preferences.glade:1518 msgid "Miscellaneous" msgstr "Verschiedenes" #: ../AMC-gui-edit_preferences.glade:1549 msgid "Notify the user at the end of the following actions:" msgstr "Benachrichtigen Sie den Benutzer nach den folgenden Aktionen:" #. One of the "notify the user at the end of the following actions" checkbox: #. for documents update. #: ../AMC-gui-edit_preferences.glade:1568 msgid "Documents update" msgstr "Dokumente werden aktualisiert..." #. One of the "notify the user at the end of the following actions" checkbox: #. for computing marks. #: ../AMC-gui-edit_preferences.glade:1600 msgid "Grading" msgstr "Benotung" #. One of the "notify the user at the end of the following actions" checkbox: #. for completed answer sheets annotation. #: ../AMC-gui-edit_preferences.glade:1616 #: ../AMC-gui-edit_preferences.glade:3137 msgid "Annotation" msgstr "Anmerkungen" #: ../AMC-gui-edit_preferences.glade:1641 msgid "Notify using:" msgstr "Benachrichtigen mit:" #: ../AMC-gui-edit_preferences.glade:1660 msgid "Desktop notifications" msgstr "Desktop-Benachrichtigungen" #: ../AMC-gui-edit_preferences.glade:1696 msgid "Command:" msgstr "Befehl:" #: ../AMC-gui-edit_preferences.glade:1708 msgid "" "Command that will be called as a user notification. %m will be replaced by " "AMC's message, and %a by AMC completed action." msgstr "" "Befehl, der benannt wird als Benutzernotifikation. %m werden ersetzt durch " "AMC Nachricht, und %a durch eine vollendete AMC Aktion." #: ../AMC-gui-edit_preferences.glade:1737 msgid "Notifications" msgstr "Benachrichtigungen" #: ../AMC-gui-edit_preferences.glade:1761 msgid "Display" msgstr "Anzeige" #: ../AMC-gui-edit_preferences.glade:1804 msgid "Vector formats density (DPI)" msgstr "Vektorformat Dichte (DPI)" #: ../AMC-gui-edit_preferences.glade:1815 msgid "Black&white conversion threshold" msgstr "Schwarz & Weiß Umwandlungsschwelle" #: ../AMC-gui-edit_preferences.glade:1826 msgid "Erease red from scans" msgstr "Lösche rot aus den Scans" #: ../AMC-gui-edit_preferences.glade:1837 msgid "Force conversion" msgstr "(Zwangs)Umwandlung der Scans" #: ../AMC-gui-edit_preferences.glade:1848 msgid "" "Density used when converting vector format scans (PDF, EPS) into bitmap." msgstr "" "Dichte benutzt bei der Umwandlung von Vektorenformatscans (PDF, EPS) in " "Bitmap." #: ../AMC-gui-edit_preferences.glade:1863 msgid "" "Threshold used when converting scans to black and white. Value 0.0 means all" " white, value 1.0 means all black." msgstr "" "Schwelle benutzt bei der Umwandlung von Scans in schwarz und weiß. Wert 0.0 " "bedeutet weiß, Wert 1.0 bedeutet schwarz. " #: ../AMC-gui-edit_preferences.glade:1881 msgid "" "When set, AMC will erease red color from the color scans before automatic " "data capture. This can be useful if the boxes are drawn in red." msgstr "" "Wenn ausgewählt, wird AMC alle Rottöne vor der automatischen Datenerfassung " "aus den Farbscans löschen. Dies kann hilfreich sein wenn die Kästchen in rot" " sind." #: ../AMC-gui-edit_preferences.glade:1896 msgid "" "With this option, all scan files will be converted with ImageMagick. This " "can slow down scans processing, but may allow some unusual file formats to " "be processed successfully." msgstr "" "Mit dieser Einstellung werden alle Scan-Dateien mit ImageMagick umgewandelt " ". Dies verlangsamt den Scan-Vorgang, aber ermöglicht auch das Umwandeln " "ungewöhnlicher Datei-Formate." #: ../AMC-gui-edit_preferences.glade:1913 msgid "Scans conversion" msgstr "Umwandlung der Scans" #: ../AMC-gui-edit_preferences.glade:1945 msgid "Marks size max increase" msgstr "Benotungsgröße max Ansteigung" #: ../AMC-gui-edit_preferences.glade:1956 msgid "Marks size max decrease" msgstr "Benotungsgröße max Verminderung" #: ../AMC-gui-edit_preferences.glade:1967 #: ../AMC-gui-edit_preferences.glade:2490 msgid "Can be customized on a per-project basis in the Project tab." msgstr "Kann für jedes Projekt einzeln angepasst werden über den Tab Projekt." #: ../AMC-gui-edit_preferences.glade:1968 msgid "Default darkness threshold" msgstr "Standarddunkelkeitsschwelle" #: ../AMC-gui-edit_preferences.glade:1979 msgid "Default upper darkness threshold" msgstr "Obere Dunkelheitsschwelle - Standard" #: ../AMC-gui-edit_preferences.glade:1990 msgid "" "Proportion of the box (on the scan) that is measured to compute its " "blackness." msgstr "" "Anteil der Box (auf dem Scan), der gemessen wird, um seine Schwärze zu " "berechnen." #: ../AMC-gui-edit_preferences.glade:1991 msgid "Measured box proportion" msgstr "gemessener Kästchen-Anteil" #: ../AMC-gui-edit_preferences.glade:2002 msgid "Process scans with 3 corner marks" msgstr "Verarbeitun von Scans mit 3 Randnoten" #: ../AMC-gui-edit_preferences.glade:2013 msgid "" "Maximum increase (proportion: 0.1 means 10%) allowed for corner marks after " "printing/scanning process." msgstr "" "Maximal Anstieg ( Verhältnis: 0.1 bedeutet 10%) erlaubt für Randnoten nach " "dem Druck-/Scanvorgang." #: ../AMC-gui-edit_preferences.glade:2030 msgid "" "Maximum decrease (proportion: 0.1 means 10%) allowed for corner marks after " "printing/scanning process." msgstr "" "Maximale Verminderung ( Verhältnis: 0.1 bedeutet 10%) erlaubt für Randnoten " "nach dem Druck-/Scanvorgang." #: ../AMC-gui-edit_preferences.glade:2047 msgid "" "If black proportion is greater than this value, the box will be considered " "as beeing ticked. This is a default value, it can be changed in each " "project." msgstr "" "Wenn der schwarze Anteil größer als dieser Wert ist, wird das Kästchen als " "abgehakt betrachtet. Dies ist ein Voreinstellungswert, es kann in jedem " "Projekt geändert werden." #: ../AMC-gui-edit_preferences.glade:2093 msgid "Do you want to process scans with 3 corner circles only?" msgstr "Möchten Sie nur mit Scans fortfahren mit nur 3 Randkreisen?" #: ../AMC-gui-edit_preferences.glade:2110 msgid "Detection parameters" msgstr "Erkennungsparameter" #: ../AMC-gui-edit_preferences.glade:2166 msgid "" "These options are used when creating a new project. See the project tab for " "more details." msgstr "" "Diese Einstellungen werden beim Erstellen eines neuen Projekts verwendet. " "Mehr Details hierzu im Projekte Tab." #: ../AMC-gui-edit_preferences.glade:2173 #: ../AMC-gui-edit_preferences.glade:3760 msgid "Minimal mark" msgstr "Minimale Note" #: ../AMC-gui-edit_preferences.glade:2184 #: ../AMC-gui-edit_preferences.glade:3771 msgid "Floor mark" msgstr "Untergrenze Benotung" #: ../AMC-gui-edit_preferences.glade:2195 #: ../AMC-gui-edit_preferences.glade:3782 msgid "Maximal mark" msgstr "Maximale Note" #: ../AMC-gui-edit_preferences.glade:2206 #: ../AMC-gui-edit_preferences.glade:3793 msgid "Grain" msgstr "Abstufung" #: ../AMC-gui-edit_preferences.glade:2217 #: ../AMC-gui-edit_preferences.glade:3804 msgid "Rounding type" msgstr "Rundungsart" #: ../AMC-gui-edit_preferences.glade:2272 #: ../AMC-gui-edit_preferences.glade:3891 msgid "ceil" msgstr "Obergrenze" #: ../AMC-gui-edit_preferences.glade:2312 msgid "Default marking options" msgstr "Standard-Benotungsoption" #: ../AMC-gui-edit_preferences.glade:2329 ../AMC-gui-main_window.glade:1943 msgid "Marking" msgstr "Benotung" #: ../AMC-gui-edit_preferences.glade:2372 msgid "Max size" msgstr "maximale Größe" #: ../AMC-gui-edit_preferences.glade:2383 msgid "Image format" msgstr "Bildformat" #: ../AMC-gui-edit_preferences.glade:2394 msgid "JPEG quality" msgstr "JPEG-Qualität" #: ../AMC-gui-edit_preferences.glade:2454 msgid "Scans" msgstr "Scans" #: ../AMC-gui-edit_preferences.glade:2492 msgid "Default header text" msgstr "Standard-Kopfzeilentext" #: ../AMC-gui-edit_preferences.glade:2513 #: ../AMC-gui-edit_preferences.glade:3976 msgid "" "Text to be written on annotated sheets header. Use %S for score, %M for max " "score, %s for grade, %m for max grade, and %(col) for content of the column " "col in the students list file." msgstr "" "Text der in der Kopfzeile der kommentierten Bögen sein soll. Benutze %S für " "Ergebnis, %M für max Ergebnis, %s für Noe, %m für beste Note, und %(col) für" " Spalteninhalt col in derPrüflingslistendatei." #: ../AMC-gui-edit_preferences.glade:2553 msgid "Default writing direction" msgstr "Standardschreibrichtung" #: ../AMC-gui-edit_preferences.glade:2564 msgid "Default questions annotation" msgstr "Standardfragenanmerkung" #: ../AMC-gui-edit_preferences.glade:2575 msgid "Default cancelled questions annotation" msgstr "Standard der abgebrochenen Bemerkung" #: ../AMC-gui-edit_preferences.glade:2585 #: ../AMC-gui-edit_preferences.glade:4050 msgid "right to left" msgstr "rechts nach links" #: ../AMC-gui-edit_preferences.glade:2639 msgid "Header" msgstr "Kopfzeile" #: ../AMC-gui-edit_preferences.glade:2671 msgid "Significant digits" msgstr "signifikante Zahlen" #: ../AMC-gui-edit_preferences.glade:2682 msgid "" "Number of significant digits to display for marks when annotating papers." msgstr "" "Anzahl der signifikanten Stellen, die die Noten anzeigen wenn die Arbeiten " "kommentiert werden." #: ../AMC-gui-edit_preferences.glade:2703 msgid "Marks" msgstr "Noten" #: ../AMC-gui-edit_preferences.glade:2740 msgid "Line width" msgstr "Linienstärke" #: ../AMC-gui-edit_preferences.glade:2751 msgid "Font" msgstr "Schrift" #: ../AMC-gui-edit_preferences.glade:2762 msgid "Marks shift" msgstr "Notenverschiebung" #: ../AMC-gui-edit_preferences.glade:2803 msgid "" "When marks are written on annotated papers left to the boxes, shifts to the " "left marks by this value. You can use mm or in as a unit." msgstr "" "Wenn Noten auf angemerkten Bögen links vom Kästchen geschrieben werden, " "verändert sich die linke Note um diesen Wert. Sie können mm oder in als " "Einheit verwenden." #: ../AMC-gui-edit_preferences.glade:2832 msgid "To be ticked" msgstr "Zum Ankreuzen" #: ../AMC-gui-edit_preferences.glade:2844 msgid "Ticked" msgstr "Angekreuzt" #: ../AMC-gui-edit_preferences.glade:2856 msgid "type" msgstr "Typ" #: ../AMC-gui-edit_preferences.glade:2868 msgid "colour" msgstr "Farbe" #: ../AMC-gui-edit_preferences.glade:2880 #: ../AMC-gui-edit_preferences.glade:2891 #: ../AMC-gui-edit_preferences.glade:2924 #: ../AMC-gui-edit_preferences.glade:2946 msgid "no" msgstr "Nein" #: ../AMC-gui-edit_preferences.glade:2902 #: ../AMC-gui-edit_preferences.glade:2913 #: ../AMC-gui-edit_preferences.glade:2935 #: ../AMC-gui-edit_preferences.glade:2957 msgid "yes" msgstr "Ja" #: ../AMC-gui-edit_preferences.glade:3088 msgid "Also annotate informative questions" msgstr "Kommentieren Sie auch informative Fragen" #: ../AMC-gui-edit_preferences.glade:3110 msgid "Symbols" msgstr "Symbole" #: ../AMC-gui-edit_preferences.glade:3185 msgid "Sender email" msgstr "E-Mail Adresse des Absenders" #: ../AMC-gui-edit_preferences.glade:3196 msgid "Carbon copy address" msgstr "Kopie (cc)" #: ../AMC-gui-edit_preferences.glade:3207 msgid "Blind Carbon copy address" msgstr "Kopie (bcc)" #: ../AMC-gui-edit_preferences.glade:3260 msgid "Delay between sendings" msgstr "Verzögerung zwischen dem Absenden" #: ../AMC-gui-edit_preferences.glade:3295 msgid "Mail delivery method:" msgstr "E-Mail Versandmethode:" #: ../AMC-gui-edit_preferences.glade:3337 msgid "sendmail path" msgstr "sendmail Pfad" #: ../AMC-gui-edit_preferences.glade:3373 msgid "SMTP host" msgstr "SMTP-Server" #: ../AMC-gui-edit_preferences.glade:3384 msgid "SMTP port" msgstr "SMTP-Port" #: ../AMC-gui-edit_preferences.glade:3424 msgid "SMTP security" msgstr "SMTP-Sicherheit" #: ../AMC-gui-edit_preferences.glade:3435 msgid "SMTP user" msgstr "SMTP-Benutzer" #: ../AMC-gui-edit_preferences.glade:3472 msgid "SMTP password" msgstr "SMTP-Passwort" #: ../AMC-gui-edit_preferences.glade:3509 msgid "Sending emails" msgstr "Sende E-Mails" #: ../AMC-gui-edit_preferences.glade:3546 msgid "Default subject" msgstr "Standardbetreff" #: ../AMC-gui-edit_preferences.glade:3588 msgid "Default content" msgstr "Standardinhalt" #: ../AMC-gui-edit_preferences.glade:3612 msgid "Email" msgstr "E-Mail" #: ../AMC-gui-edit_preferences.glade:3638 msgid "Project preferences" msgstr "Projekteinstellungen" #: ../AMC-gui-edit_preferences.glade:3670 msgid "Darkness threshold" msgstr "Dunkelheitsschwelle" #: ../AMC-gui-edit_preferences.glade:3681 msgid "" "If black proportion is greater than this value, the box will be considered " "as beeing ticked. If students have been told to darken the boxes entirely, " "one can choose value 0.5. If students have been told to tick the boxes, " "values around 0.15 seems appropriate." msgstr "" "Wenn der schwarze Anteil größer als dieser Wert ist, wird das Kästchen als " "abgehakt betrachtet. Wenn den Prüflingen gesagt wurde, dass die Felder " "vollständig ausgemalt werden sollen, so kann man einen Wert von 0,5 wählen." " Wenn den Studierenden gesagt wurde die Felder sind anzukreuzen, dann sind " "Werte um 0,15 angemessen." #: ../AMC-gui-edit_preferences.glade:3697 msgid "Upper darkness threshold" msgstr "Obere Dunkelheitsschwelle" #: ../AMC-gui-edit_preferences.glade:3708 msgid "" "If black proportion is greater than this value, the box is considered as not" " ticked. Setting this threshold to a value less than one allows the students" " to cancel ticked boxes by filling them completely." msgstr "" "Wenn der schwarze Anteil größer als dieser Wert ist, wird das Kästchen als " "nicht abgehakt betrachtet. Ein Wert kleiner als eins erlaubt den Prüflingen," " eine ausgewählte Box durch ausmalen zu streichen." #: ../AMC-gui-edit_preferences.glade:3728 msgid "Automatic data capture" msgstr "Automatische Datenerfassung" #: ../AMC-gui-edit_preferences.glade:3815 msgid "Mark associated with null score" msgstr "Noten in Verbindung mit Null-Ergebnis" #: ../AMC-gui-edit_preferences.glade:3829 msgid "" "Floor mark: any exam with a global mark less than this value will be given " "this mark. Let empty for no floor mark." msgstr "" "Untergrenze: jede Prüfung mit einer globalen Note unter diesem Wert wird " "diese Note bekommen. Lassen Sie es frei für keine Untergrenze" #: ../AMC-gui-edit_preferences.glade:3879 msgid "" "Mark to be given to a perfect sheet with all good answers (scaling the " "marks). Value 0 meens that you don't want to scale the marks." msgstr "" "Benotung zu einem perfekten Bogen mit allen richtigen Antworten (Skalierung " "der Noten). Wert 0 heisst, dass Sie die Noten nicht skalieren möchten." #: ../AMC-gui-edit_preferences.glade:3896 msgid "" "When using SUF option in general grading scale, should marks be ceiled not " "to be larger than the maximum mark ?" msgstr "" "Wenn Sie die SUF Einstellung der allgemeinen Benotungsskala nehmen, sollen " "die Noten nicht größer sein als die maximal zu erreichende Note?" #: ../AMC-gui-edit_preferences.glade:3920 msgid "Global mark rules" msgstr "allgemeine Benotungsregeln" #: ../AMC-gui-edit_preferences.glade:3956 msgid "Header text" msgstr "Kopfzeilentext" #: ../AMC-gui-edit_preferences.glade:4007 msgid "Writing direction" msgstr "Schreibrichtung" #: ../AMC-gui-edit_preferences.glade:4018 msgid "Questions marks position" msgstr "Position des Fragezeichens" #: ../AMC-gui-edit_preferences.glade:4029 msgid "Questions annotation text" msgstr "Anmerkungstext zur Frage" #: ../AMC-gui-edit_preferences.glade:4040 msgid "Cancelled questions annotation text" msgstr "Standardbemerkung der abgebrochenen Bemerkung" #: ../AMC-gui-edit_preferences.glade:4083 msgid "" "Text to be written for each question. This will be evaluated by perl, so " "quote it to make a single string. Use %S for score, %M for max score, and %s" " and %m for these values truncated to the requested number of significant " "digits." msgstr "" "Text muss für jede Frage geschrieben werden. Dies wird von Perl überprüft, " "deshalb zitieren Sie es bitte in einen Einzelstring. Benutzen Sie %S für " "Ergebnis, %M für max. Ergebnis, und %s und %m für diese gekürzten Werte zu " "den aufgeforderten Nummern der signifikanten Stellen." #: ../AMC-gui-edit_preferences.glade:4097 msgid "Same as above, but for cancelled questions (when using allowempty)." msgstr "" "Gleich wie oben, aber für abgebrochene Fragen ( wenn freilassen erlaubt ist)" #: ../AMC-gui-edit_preferences.glade:4122 msgid "Papers annotation" msgstr "Anmerkungen der Bögen" #: ../AMC-gui-edit_preferences.glade:4206 msgid "Examination description" msgstr "Prüfungsbeschreibung" #: ../AMC-gui-edit_preferences.glade:4249 msgid "CSV files charset" msgstr "Codierung der CSV-Dateien" #: ../AMC-gui-edit_preferences.glade:4260 msgid "Charset used for the students list file" msgstr "Charset, welches für die Datei mit der Prüflingsliste verwendet wird" #: ../AMC-gui-edit_preferences.glade:4279 msgid "Charset for the CSV marks file produced by AMC." msgstr "Charset für die CSV Notendatei produziert von AMC" #: ../AMC-gui-edit_preferences.glade:4302 msgid "Internationnalization" msgstr "Internationalisierung" #: ../AMC-gui-edit_preferences.glade:4334 msgid "LaTeX engine" msgstr "LaTeX System" #: ../AMC-gui-edit_preferences.glade:4345 msgid "Command to compile LaTeX file and make PDF, PS or DVI output." msgstr "" "Befehl zum Kompilieren von LaTeX-Dateien und Erstellung von PDF, PS oder DVI" " Ausgaben." #: ../AMC-gui-edit_preferences.glade:4368 msgid "External commands" msgstr "Externe Befehle" #: ../AMC-gui-edit_preferences.glade:4393 ../AMC-gui-main_window.glade:2923 #: ../AMC-gui-main_window.glade:3239 msgid "Project" msgstr "Projekt" #: ../AMC-gui-edit_preferences.glade:4413 msgid "AMC Preferences" msgstr "AMC Einstellungen" #: ../AMC-gui-filter_details.glade:7 msgid "Formats details" msgstr "Formatdetails" #: ../AMC-gui-filter_details.glade:66 msgid "" "AMC supports different formats for the source file. Here are some details " "about each of them." msgstr "" "AMC unterstützt verschiedene Formate für Quelldateien. Hier finden Sie " "einige Details darüber." #: ../AMC-gui-filter_details.glade:115 msgid "Description:" msgstr "Beschreibung:" #: ../AMC-gui-liste_dialog.glade:48 msgid "No names list" msgstr "Keine Namensliste" #: ../AMC-gui-liste_dialog.glade:134 msgid "Apply" msgstr "Anwenden" #: ../AMC-gui-liste_dialog.glade:163 msgid "Choose your students names list file" msgstr "Wählen Sie ihre Prüflingsnamensliste" #: ../AMC-gui-mailing.glade:13 msgid "Mailing" msgstr "Versenden" #: ../AMC-gui-mailing.glade:40 msgid "Send" msgstr "Senden" #: ../AMC-gui-mailing.glade:75 msgid "Current project name %n:" msgstr "Aktueller Projektname %n:" #: ../AMC-gui-mailing.glade:149 msgid "Emails column:" msgstr "E-Mail Spalte:" #: ../AMC-gui-mailing.glade:184 msgid "Select failed" msgstr "Auswahl fehlgeschlagen" #: ../AMC-gui-mailing.glade:237 msgid "Addressees" msgstr "Addressaten" #: ../AMC-gui-mailing.glade:274 msgid "Subject" msgstr "Betreff" #: ../AMC-gui-mailing.glade:303 msgid "Enable HTML Tags" msgstr "Ermögliche HTML Tags" #: ../AMC-gui-mailing.glade:345 msgid "Body" msgstr "Inhalt" #: ../AMC-gui-mailing.glade:437 msgid "Attachments" msgstr "Anhänge" #: ../AMC-gui-main_window.glade:126 msgid "Updated" msgstr "aktualisiert" #: ../AMC-gui-main_window.glade:146 msgid "Sensitivity" msgstr "Empfindlichkeitsgrenze" #: ../AMC-gui-main_window.glade:156 msgid "Scan file" msgstr "Scan" #: ../AMC-gui-main_window.glade:294 msgid "Number of papers:" msgstr "Anzahl der Bögen:" #: ../AMC-gui-main_window.glade:308 msgid "" "Number of papers to produce. Zero means taking into account the number " "written in the LaTeX source file." msgstr "" "Anzahl der zu erstellenden Prüfungsbögen. \"0\" übernimmt die Voreinstellung" " aus der LaTeX-Quelldatei." #. TRANSLATORS: Use the character '_' before the key that can be used as a #. mnemonic (to activate documents update with Alt+key) #: ../AMC-gui-main_window.glade:343 msgid "_Update documents" msgstr "Dok_umente aktualisieren" #: ../AMC-gui-main_window.glade:377 msgid "Question" msgstr "Frage" #: ../AMC-gui-main_window.glade:543 msgid "Warnings" msgstr "Warnungen" #: ../AMC-gui-main_window.glade:654 msgid "Print papers" msgstr "Drucken der Bögen" #: ../AMC-gui-main_window.glade:718 msgid "From papers' scans" msgstr "Von den Scans der Bögen" #: ../AMC-gui-main_window.glade:740 ../AMC-gui-main_window.glade:1776 msgid "Automatic" msgstr "Automatisch" #: ../AMC-gui-main_window.glade:762 msgid "On screen with mouse" msgstr "Mit der Maus auf dem Bildschirm" #: ../AMC-gui-main_window.glade:784 ../AMC-gui-main_window.glade:1819 msgid "Manual" msgstr "Manuell" #: ../AMC-gui-main_window.glade:809 msgid "Data capture after examination" msgstr "Datenerfassung nach der Prüfung" #: ../AMC-gui-main_window.glade:841 msgid "Missing pages" msgstr "Fehlende Seiten" #: ../AMC-gui-main_window.glade:913 msgid "Look at scans" msgstr "Betrachten der Scans" #: ../AMC-gui-main_window.glade:984 msgid "Forget" msgstr "Vergessen" #: ../AMC-gui-main_window.glade:1001 msgid "Look at pages" msgstr "Seiten ansehen" #: ../AMC-gui-main_window.glade:1086 msgid "Pages:" msgstr "Seiten:" #: ../AMC-gui-main_window.glade:1144 msgid "Columns" msgstr "Spalten" #. Label on the button used to open a window with the images of the boxes #. taken from the scan. This window can be used th check boxes categorization. #: ../AMC-gui-main_window.glade:1183 ../AMC-perl/AMC/Gui/Zooms.glade:13 msgid "Zooms" msgstr "Vergrößerungen" #: ../AMC-gui-main_window.glade:1188 msgid "" "Show images of the boxes from the scan, and check their categorization." msgstr "" "Zeigen der Bilder der Boxen aus dem Scan und überprüfe deren Kategorisierung" #. Label of the button used to open a window showing a scan with the place #. where corner marks have been detected, and the position where the boxes are #. supposed to be. #: ../AMC-gui-main_window.glade:1202 msgid "Layout" msgstr "Layout" #: ../AMC-gui-main_window.glade:1207 msgid "" "Show where corner marks have been detected on the scan, and where boxes are " "supposed to be." msgstr "" "Zeigen Sie, wo Randnoten auf dem Scan erkannt worden sind und wo die " "Kästchen sein sollten." #. Label of the button used to delete data capture for selected pages. #: ../AMC-gui-main_window.glade:1221 msgid "Remove" msgstr "Entfernen" #: ../AMC-gui-main_window.glade:1225 msgid "Remove data capture for selected pages." msgstr "Entferne Datenerfassung für ausgewählte Seiten." #: ../AMC-gui-main_window.glade:1266 msgid "Diagnosis" msgstr "Diagnose" #: ../AMC-gui-main_window.glade:1323 msgid "Update marking scale" msgstr "Aktualisieren der Notenskala" #: ../AMC-gui-main_window.glade:1327 msgid "Also update marking scale extraction from LaTeX source file" msgstr "" "Aktualisieren Sie außerdem die Notenskala, welche aus der LaTeX-Datei " "extrahiert wurde" #: ../AMC-gui-main_window.glade:1341 msgid "Mark papers" msgstr "Benoten der Bögen" #: ../AMC-gui-main_window.glade:1394 msgid "Marking" msgstr "Benotung" #: ../AMC-gui-main_window.glade:1419 msgid "Look at marks" msgstr "Betrachten Sie die Noten" #: ../AMC-gui-main_window.glade:1500 msgid "Students list:" msgstr "Liste der Prüflinge:" #: ../AMC-gui-main_window.glade:1548 msgid "Set file" msgstr "festlegen der Datei" #: ../AMC-gui-main_window.glade:1596 msgid "Edit list" msgstr "Bearbeiten der Liste" #: ../AMC-gui-main_window.glade:1638 msgid "Re-read" msgstr "Erneutes Einlesen" #: ../AMC-gui-main_window.glade:1704 msgid "Code name for automatic association:" msgstr "Codename für automatische Zuordnung/Verbindung:" #: ../AMC-gui-main_window.glade:1715 msgid "Primary key from this list:" msgstr "Primärschlüssel aus dieser Liste:" #: ../AMC-gui-main_window.glade:1738 msgid "Papers/students association:" msgstr "Bogen/Prüflingsverknüpfung:" #: ../AMC-gui-main_window.glade:1858 msgid "Students identification" msgstr "Prüflingsidentifikation" #: ../AMC-gui-main_window.glade:2020 msgid "Export" msgstr "Exportieren" #: ../AMC-gui-main_window.glade:2041 msgid "and" msgstr "und" #: ../AMC-gui-main_window.glade:2095 msgid "Sorting:" msgstr "Sortierung:" #: ../AMC-gui-main_window.glade:2121 msgid "include absentees" msgstr "Inkludieren Sie Abwesende" #: ../AMC-gui-main_window.glade:2127 msgid "Should exported data include absentees?" msgstr "Sollen die exportierten Daten abwesende Prüflinge beinhalten?" #: ../AMC-gui-main_window.glade:2207 msgid "Exports dir" msgstr "Exportverzeichnis" #: ../AMC-gui-main_window.glade:2239 msgid "Marks export" msgstr "Exportieren der Noten" #: ../AMC-gui-main_window.glade:2322 msgid "File name model:" msgstr "Dateinamenmodell:" #: ../AMC-gui-main_window.glade:2336 msgid "" "File name model used to make file names for PDF annotated papers, one by " "student. Keep empty in order to use student name." msgstr "" "Dateinamenmodell wurde verwendet um Dateinamen für kommentierte PDF Bögen " "zu erstellen, 1/Prüfling. Bitte freihalten um Namen des Prüflings zu " "verwenden." #: ../AMC-gui-main_window.glade:2382 msgid "Annotate papers' scans with marking details." msgstr "Scans mit benoteten Prüfungen inkl. Benotungsdetails" #: ../AMC-gui-main_window.glade:2404 msgid "Annotate papers" msgstr "Benotung der Bögen" #: ../AMC-gui-main_window.glade:2428 msgid "Look at grouped files" msgstr "Betrachte gruppierte Dateien" #: ../AMC-gui-main_window.glade:2451 msgid "Look" msgstr "Betrachte" #: ../AMC-gui-main_window.glade:2482 msgid "Send..." msgstr "Senden..." #: ../AMC-gui-main_window.glade:2511 msgid "Annotated papers" msgstr "Kommentierte Blätter" #: ../AMC-gui-main_window.glade:2534 msgid "Reports" msgstr "Berichte" #: ../AMC-gui-main_window.glade:2650 msgid "Open project" msgstr "Projekt öffnen" #: ../AMC-gui-main_window.glade:2691 msgid "Save project" msgstr "Projekt speichern" #: ../AMC-gui-main_window.glade:2721 msgid "Menu" msgstr "Menü" #: ../AMC-gui-main_window.glade:2799 ../AMC-gui-main_window.glade:2838 #: ../AMC-gui-main_window.glade:2877 msgid "Update the document" msgstr "Dokument aktualisieren" #: ../AMC-gui-main_window.glade:2813 ../AMC-gui-main_window.glade:2852 #: ../AMC-gui-main_window.glade:2891 msgid "Open the document" msgstr "Dokument öffnen" #: ../AMC-gui-main_window.glade:2953 msgid "Export as template" msgstr "Exportiere als Vorlage" #: ../AMC-gui-main_window.glade:2967 msgid "User templates" msgstr "Benutzervorlagen" #: ../AMC-gui-main_window.glade:2992 msgid "Manage" msgstr "Verwalten" #: ../AMC-gui-main_window.glade:3017 ../AMC-gui-main_window.glade:3267 msgid "Help" msgstr "_Hilfe" #: ../AMC-gui-main_window.glade:3033 msgid "About" msgstr "Über" #: ../AMC-gui-main_window.glade:3047 msgid "Cancel learning…" msgstr "Hilfsdialoge deaktivieren..." #: ../AMC-gui-main_window.glade:3058 msgid "Debugging" msgstr "Debuggen" #: ../AMC-gui-main_window.glade:3076 msgid "Bug report" msgstr "Fehlerbericht" #: ../AMC-gui-main_window.glade:3090 ../AMC-gui-main_window.glade:3115 msgid "Documentation" msgstr "Dokumentation" #: ../AMC-gui-main_window.glade:3184 ../AMC-gui-main_window.glade:3253 msgid "Plugins" msgstr "Plugins" #: ../AMC-gui-main_window.glade:3200 msgid "Browse" msgstr "Suchen" #: ../AMC-gui-main_window.glade:3214 msgid "Install plugin" msgstr "Plugin installieren" #: ../AMC-gui-make_template.glade:8 msgid "Save as a template" msgstr "Als Vorlage speichern" #: ../AMC-gui-make_template.glade:64 msgid "To make a new template from your project, describe it below:" msgstr "" "Um eine Vorlage aus Ihrem Projekt zu machen, beschreiben Sie es bitte wie " "folgt:" #: ../AMC-gui-make_template.glade:86 msgid "File name:" msgstr "Dateiname:" #: ../AMC-gui-make_template.glade:117 msgid "" "Note: please use only alphanumeric characters and characters from " "\"-_+\" for the template file name." msgstr "" "Hinweis: Bitte benutzen Sie nur alphanumerische Zeichen und Zeichen " "wie \"-_+\" für den Namen der Vorlagendatei." #: ../AMC-gui-make_template.glade:143 msgid "Short name:" msgstr "Kurzbezeichnung:" #: ../AMC-gui-make_template.glade:202 msgid "Description:" msgstr "Beschreibung:" #: ../AMC-gui-make_template.glade:304 msgid "Included files:" msgstr "inkludierte Dateien:" #: ../AMC-gui-overwritten.glade:49 msgid "List of pages with overwritten data:" msgstr "Liste der Seiten mit überschriebenen Daten:" #: ../AMC-gui-saisie_auto.glade:8 msgid "Please select all papers' scans" msgstr "Bitte wählen Sie alle Scans der Bögen aus" #: ../AMC-gui-saisie_auto.glade:10 msgid "Automatic data capture" msgstr "Automatische Datenerfassung" #: ../AMC-gui-saisie_auto.glade:27 msgid "Proceed to data capture from scans with button OK" msgstr "Gehen Sie zur Datenerfassung aus den Scans mit der OK Taste" #: ../AMC-gui-saisie_auto.glade:82 msgid "Copy to project directory (recommended)" msgstr "Kopieren in das Projektverzeichnis (empfohlen)" #: ../AMC-gui-saisie_auto.glade:88 ../AMC-gui-saisie_auto.glade:89 msgid "Copy all scans to scans sub-directory in project directory" msgstr "" "Kopieren Sie alle Scans in das Scan-Unterverzeichnis im Projektverzeichnis" #: ../AMC-gui-saisie_auto.glade:156 msgid "" "Use this setting to be sure that the exam copy IDs allocated to the pages of" " the scans you selected will be consecutive numbers, in the same " "order as the pages." msgstr "" "Benutzen Sie diese Einstellung um sicher zu gehen, dass die Prüfungskopie-ID" " zugeordnet ist zu den Seiten der Scans mit fortlaufenden Zahlen, in der " "gleichen Reihenfolge ist wie die Seiten." #: ../AMC-gui-saisie_auto.glade:172 msgid "Options" msgstr "Optionen" #: ../AMC-gui-source_latex_choix.glade:8 msgid "Choose LaTeX source file" msgstr "Wählen einer LaTeX-Quelldatei" #: ../AMC-gui-source_latex_choix_zip.glade:8 msgid "ZIP file choice" msgstr "ZIP Datei-Auswahl" #: ../AMC-gui-source_latex_dialog.glade:7 msgid "Choose LaTeX source" msgstr "Auswählen der LaTeX-Quelle" #: ../AMC-gui-source_latex_dialog.glade:62 msgid "" "A multiple choice project is mainly made of a source file, which describes the questionnaire.\n" "Please choose your situation:" msgstr "" "Ein Multiple-Choice Projekt besteht hauptsächlich aus einer Quelldatei, die den Fragebogen beschreibt.\n" "Bitte wählen Sie ihr Situation:" #: ../AMC-gui-source_latex_dialog.glade:105 msgid "Template" msgstr "Vorlage" #: ../AMC-gui-source_latex_dialog.glade:119 msgid "" "You did not write any description of the questionnaire, and want to start " "from a template." msgstr "" "Sie haben keine Beschreibung zum Fragebogen angegeben, und möchte mit einer " "Vorlage beginnen." #: ../AMC-gui-source_latex_dialog.glade:171 msgid "File" msgstr "Datei" #: ../AMC-gui-source_latex_dialog.glade:185 msgid "" "You already wrote a questionnaire description, and want to use it for this " "project." msgstr "" "Sie haben schon eine Fragebogenbeschreibung eingegeben und möchte Sie für " "dieses Projekt verwenden." #: ../AMC-gui-source_latex_dialog.glade:237 msgid "Empty" msgstr "Leer" #: ../AMC-gui-source_latex_dialog.glade:251 msgid "You want to write the description from zero." msgstr "Sie möchten die Beschreibung bei Null beginnen." #: ../AMC-gui-source_latex_dialog.glade:303 msgid "Archive" msgstr "Archiv" #: ../AMC-gui-source_latex_dialog.glade:317 msgid "" "You have a .tgz or .zip file containing the questionnaire and " "other related stuff, coming from a third party software or a backup." msgstr "" "Sie haben eine tgz oder zip Datei, die den Fragebogen oder anderes enthält, " "was von einer Dritt-Software oder einem Backup kommt." #: ../AMC-gui-source_latex_modele.glade:8 msgid "Template selection" msgstr "Vorlagenauswahl" #: ../AMC-gui-unrecognized.glade:8 msgid "Preprocess" msgstr "vorbereitender Prozess" #: ../AMC-gui-unrecognized.glade:14 msgid "Delete" msgstr "löschen" #: ../AMC-gui-unrecognized.glade:29 msgid "Unrecognized scans" msgstr "Nicht erkannte Scans" #: ../AMC-gui-unrecognized.glade:71 msgid "Scans list" msgstr "Liste der Scans" #: ../AMC-gui-unrecognized.glade:237 msgid "Original scan" msgstr "Original Scan" #: ../AMC-gui-unrecognized.glade:266 msgid "Preprocessed" msgstr "Vorverarbeitet" #: ../AMC-perl/AMC/Gui/Association.glade:14 msgid "Manual association" msgstr "Manuelle Verbindung" #. This is the label of the check button that controls wheter the auto- #. completion for students names will be made looking at the beginnig of the #. names or at the whole names. #: ../AMC-perl/AMC/Gui/Association.glade:84 msgid "beginning" msgstr "anfangen" #: ../AMC-perl/AMC/Gui/Association.glade:89 msgid "Is auto-completion looking at the beginning of the names only?" msgstr "Sieht auto-completion nur den Anfang der Namen?" #: ../AMC-perl/AMC/Gui/Association.glade:157 msgid "Show all" msgstr "Zeige alle" #: ../AMC-perl/AMC/Gui/Association.glade:361 msgid "associated" msgstr "verknüpft" #: ../AMC-perl/AMC/Gui/Association.glade:366 msgid "" "Unticking this box, you see only non-associated papers. Tick it to be able " "to check already associated papers." msgstr "" "Wenn sie diese Box abwählen, sehen Sie nur nicht-verknüpfte Bögen. Wählen " "Sie es aus um bereits verknüpfte Bögen zu kontrollieren." #: ../AMC-perl/AMC/Gui/Association.glade:411 msgid "Remove manual association for this paper" msgstr "Entfernen der manuellen Verbindung für diesen Bogen" #: ../AMC-perl/AMC/Gui/Association.glade:427 msgid "" "Tell the system that this papers does not correspond to any of the students " "from the list." msgstr "" "Sagen Sie dem System, dass die Bögen überhaupt nicht übereinstimmen mit der " "Prüflingsliste." #: ../AMC-perl/AMC/Gui/Association.glade:449 msgid "Unknown" msgstr "Unbekannt" #: ../AMC-perl/AMC/Gui/Association.glade:509 msgid "Save associations." msgstr "Speichere Zuordnungen." #: ../AMC-perl/AMC/Gui/Manuel.glade:18 msgid "Paper data capture" msgstr "Datenerfassung der Bögen" #: ../AMC-perl/AMC/Gui/Manuel.glade:39 ../AMC-perl/AMC/Gui/Manuel.glade:236 msgid "Go to:" msgstr "Gehe zu:" #: ../AMC-perl/AMC/Gui/Manuel.glade:51 ../AMC-perl/AMC/Gui/Manuel.glade:248 msgid "" "Enter paper number, or page number like 102/4 (page 4 from paper 102), then " "press enter." msgstr "" "Geben Sie die Bogennummer, oder Seitenzahl ein wie z.B. 102/4 (Seite 4 von " "Bogen 102), drücken Sie auf bestätigen." #: ../AMC-perl/AMC/Gui/Manuel.glade:82 msgid "Go to the previous page." msgstr "Gehe zur voherigen Seite." #: ../AMC-perl/AMC/Gui/Manuel.glade:100 msgid "Quit" msgstr "Verlassen" #: ../AMC-perl/AMC/Gui/Manuel.glade:118 msgid "Go to next page." msgstr "Gehe zur nächsten Seite." #: ../AMC-perl/AMC/Gui/Manuel.glade:282 msgid "Save this page modifications, then go to the previous page." msgstr "" "Speichen Sie diese Seitenänderungen, gehen Sie dann zur vorherigen Seite" #: ../AMC-perl/AMC/Gui/Manuel.glade:296 msgid "" "Choose if you want to navigate through all pages, through pages with invalid" " answers, or through pages with invalid or empty answers." msgstr "" "Wählen Sie, ob Sie durch alle Seiten, durch alle Seiten mit falschen " "Antworten oder durch alle Seiten mit falschen oder leeren Antworten " "navigieren wollen." #: ../AMC-perl/AMC/Gui/Manuel.glade:318 msgid "Save this page modifications, then go to next page." msgstr "" "Speichen Sie diese Seitenänderungen, gehen Sie dann zur nächsten Seite" #: ../AMC-perl/AMC/Gui/Manuel.glade:344 msgid "Focus on question:" msgstr "Fokussieren auf Frage:" #: ../AMC-perl/AMC/Gui/Manuel.glade:429 msgid "" "Remove manual modifications for this page. Automatic data capture for this " "page, if any, won't be changed." msgstr "" "Entfernen Sie die manuellen Änderungen für diese Seite. Die Automatische " "Datenerfassung für diese Seite wird, wenn überhaupt, nicht verändert " #: ../AMC-perl/AMC/Gui/Manuel.glade:458 msgid "Cancel modifications for this page" msgstr "Brechen Sie die Änderungen für diese Seiten ab." #: ../AMC-perl/AMC/Gui/Manuel.glade:476 msgid "Save and quit" msgstr "Speichern und Schließen" #: ../AMC-perl/AMC/Gui/Zooms.glade:135 msgid "Unchecked boxes" msgstr "Nicht angekreuzte Felder" #: ../AMC-perl/AMC/Gui/Zooms.glade:203 msgid "Checked boxes" msgstr "Angekreuzte Felder" #: ../AMC-perl/AMC/Gui/Zooms.glade:281 msgid "" "Toggle mode. With 'click', left-click to toggle and right-click to toggle a " "group." msgstr "" "Umschalte-Modus. Mit \"Klick\", die linke Maustaste zum Umschalten und mit " "der rechten Maustaste um in eine Gruppe zu wechseln." auto-multiple-choice-1.4.0/I18N/lang/es.po000066400000000000000000004326261341176102400201300ustar00rootroot00000000000000# Auto Multiple Choice # Copyright 2008-2018 Alexis Bienvenue # This file is distributed under the same license as the AMC software #, fuzzy msgid "" msgstr "" "Project-Id-Version: 1.4.0~beta1 (r:a488cdb)\n" "Report-Msgid-Bugs-To: paamc@passoire.fr\n" "POT-Creation-Date: 2018-05-02 09:25 +0200\n" "PO-Revision-Date: 2018-05-05 14:00 +0200\n" "Last-Translator: Rafael Rodriguez , 2018\n" "Language-Team: Spanish (https://www.transifex.com/jojoboulix/teams/10701/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. TRANSLATORS: directory name for projects. This directory will be created #. (if needed) in the home directory of the user. Please use only alphanumeric #. characters, and - or _. No accentuated characters. #: ../AMC-annotate.pl:158 ../AMC-perl/AMC/Config.pm:247 #: ../AMC-perl/AMC/Config.pm:248 msgid "MC-Projects" msgstr "Proyectos-MC" #: ../AMC-getimages.pl:213 msgid "Splitting multi-page PDF files..." msgstr "Separando los archivos PDF múlti-páginas..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be #. converted. #: ../AMC-getimages.pl:390 #, perl-format msgid "Converting %s to bitmap..." msgstr "Convirtiendo %s a un bitmap..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be #. splitted to several images (one per page). #: ../AMC-getimages.pl:393 #, perl-format msgid "Splitting multi-page image %s..." msgstr "Separando imágenes multi-páginas %s..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be #. splitted to several images (one per page). #: ../AMC-getimages.pl:396 #, perl-format msgid "Processing image %s..." msgstr "Procesando imagen %s..." #: ../AMC-getimages.pl:469 msgid "Copying scans to project directory..." msgstr "Copiando páginas escaneadas al directorio del proyecto..." #: ../AMC-gui.pl:249 msgid "" "None of the perl modules Graphics::Magick and Image::Magick " "are installed: AMC won't work properly!" msgstr "" "Los módulos de perl Graphics::Magick y Image::Magick no están " "instalados: ¡AMC no funcionará correctamente! " #: ../AMC-gui.pl:280 msgid "" "The package auto-multiple-choice-common is installed, but not auto-multiple-choice.\n" "AMC won't work properly until you install auto-multiple-choice package!" msgstr "" "El paquete auto-multiple-choice-common está instalado pero auto-multiple-choice no.\n" "¡AMC no funcionará adecuadamente hasta que instale el paquete auto-multiple-choice!" #: ../AMC-gui.pl:298 #, perl-format msgid "" "There is too little space left in the temporary disk directory (%s). " "Please clean this directory and try again." msgstr "" "Hay muy poco espacio disponible en el directorio temporal (%s). Por favor" " libere espacio y pruebe otra vez." #: ../AMC-gui.pl:317 msgid "Several dialogs try to help you be at ease handling AMC." msgstr "Varios dialogos intentan ayudarte a usar AMC con facilidad." #: ../AMC-gui.pl:319 #, perl-format msgid "Unless you tick the \"%s\" box, they are shown only once." msgstr "A menos que marques la casilla \"%s\", se muestran sólo una vez." #: ../AMC-gui.pl:321 ../AMC-gui.pl:605 msgid "Show this message again next time" msgstr "Mostrar este mensaje la próxima vez" #: ../AMC-gui.pl:323 msgid "" "Do you want to forgot which dialogs you have already seen and ask to show " "all of them next time they should appear ?" msgstr "" "¿Desea olvidar qué diálogos ha visto ya y que la próxima vez se le pregunte " "si desea ver todos?" #: ../AMC-gui.pl:357 msgid "" "Please install libnotify to make desktop notifications available." msgstr "" "Por favor, instale libnotify para que estén disponibles las " "notificaciones en el escritorio. " #. TRANSLATORS: Message when switching to debugging mode. #: ../AMC-gui.pl:552 msgid "Debugging mode." msgstr "Modo de depuración." #. TRANSLATORS: Message when switching to debugging mode. %s will be replaced #. with the path of the log file. #: ../AMC-gui.pl:554 #, perl-format msgid "Debugging informations will be written in file %s." msgstr "La información de depuración se escribirá en el archivo %s." #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:583 ../AMC-gui-main_window.glade:3131 msgid "French" msgstr "Francés" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:585 ../AMC-gui-main_window.glade:3145 msgid "English" msgstr "Inglés" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:587 ../AMC-gui-main_window.glade:3159 msgid "Japanese" msgstr "Japonés" #. TRANSLATORS: This is the title of the column containing student/copy #. identifier in the table showing the results of data captures. #: ../AMC-gui.pl:703 msgid "identifier" msgstr "identificador" #. TRANSLATORS: This is the title of the column containing data capture #. date/time in the table showing the results of data captures. #: ../AMC-gui.pl:712 msgid "updated" msgstr "actualizado" #. TRANSLATORS: This is the title of the column containing Mean Square Error #. Distance (some kind of mean distance between the location of the four #. corner marks on the scan and the location where they should be if the scan #. was not distorted at all) in the table showing the results of data #. captures. #: ../AMC-gui.pl:720 ../AMC-gui.pl:4992 ../AMC-perl/AMC/Gui/Manuel.pm:192 #: ../AMC-gui-main_window.glade:136 msgid "MSE" msgstr "ECM (Error cuadrático medio)" #. TRANSLATORS: This is the title of the column containing so-called #. "sensitivity" (an indicator telling the user if the darkness ratio of some #. boxes on the page are very near the threshold. A great value tells that #. some darkness ratios are very near the threshold, so that the capture is #. very sensitive to the threshold. A small value is a good thing) in the #. table showing the results of data captures. #: ../AMC-gui.pl:729 ../AMC-gui.pl:4994 ../AMC-perl/AMC/Gui/Manuel.pm:200 msgid "sensitivity" msgstr "sensibilidad" #: ../AMC-gui.pl:737 msgid "scan file" msgstr "fichero escaneado" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:766 ../AMC-gui.pl:784 msgid "Western Europe" msgstr "Europa Occidental" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:768 ../AMC-gui.pl:786 msgid "Central Europe" msgstr "Europa Central" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:770 msgid "Southern Europe" msgstr "Sur de Europa " #. TRANSLATORS: for encodings #: ../AMC-gui.pl:772 msgid "Northern Europe" msgstr "Norte de Europa" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:774 msgid "Cyrillic" msgstr "Cirílico" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:776 msgid "Turkish" msgstr "Turco" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:778 msgid "Northern" msgstr "Norte" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:780 msgid "Unicode" msgstr "Unicode" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:804 ../AMC-gui.pl:3338 msgid "(none) [No primary key found in association list]" msgstr "(ninguno) [No se encontró la clave primaria en la lista]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:806 ../AMC-gui.pl:3976 msgid "(none) [No code found in LaTeX file]" msgstr "(ninguno) [No se encontró código en el archivo LaTeX]" #. TRANSLATORS: One of the printing methods: use a command (This is not the #. command name itself). This is a menu entry. #: ../AMC-gui.pl:835 msgid "command" msgstr "comando " #. TRANSLATORS: One of the printing methods: print to files. This is a menu #. entry. #: ../AMC-gui.pl:837 msgid "to files" msgstr "a archivos" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:841 msgid "floor" msgstr "redondear hacia abajo" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:843 msgid "rounding" msgstr "redondear" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:845 msgid "ceiling" msgstr "redondear hacia arriba" #. TRANSLATORS: One option for decimal point: use a comma. This is a menu #. entry #: ../AMC-gui.pl:849 msgid ", (comma)" msgstr ", (coma)" #. TRANSLATORS: One option for decimal point: use a point. This is a menu #. entry. #: ../AMC-gui.pl:851 msgid ". (dot)" msgstr ". (punto)" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:856 msgid "one sided [No two-sided printing]" msgstr "una cara [No imprimir en dos caras]" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:858 msgid "long edge" msgstr "borde largo" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:860 msgid "short edge" msgstr "borde corto" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:864 msgid "(none) [No transitional image type (direct processing)]" msgstr "(ninguno) [No hay imagen de transición (procesado directo)]" #. TRANSLATORS: One of the actions that can be done after exporting the marks. #. Here, do nothing more. This is a menu entry. #: ../AMC-gui.pl:872 msgid "that's all" msgstr "eso es todo" #. TRANSLATORS: One of the actions that can be done after exporting the marks. #. Here, open the exported file. This is a menu entry. #: ../AMC-gui.pl:874 msgid "open the file" msgstr "abrir el archivo" #. TRANSLATORS: One of the actions that can be done after exporting the marks. #. Here, open the directory where the file is. This is a menu entry. #: ../AMC-gui.pl:876 msgid "open the directory" msgstr "abrir el directorio" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:879 msgid "(none) [No annotation position (do not write anything)]" msgstr "(ninguno) [No hay posición de anotación (no escriba nada)]" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: in one margin. This is a menu entry. #: ../AMC-gui.pl:881 msgid "in one margin" msgstr "en un margen" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: in one of the two margins. This is a menu entry. #: ../AMC-gui.pl:883 msgid "in the margins" msgstr "en los márgenes." #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: near the boxes. This is a menu entry. #: ../AMC-gui.pl:885 msgid "near boxes" msgstr "casillas cercanas" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: in the zones defined in the source file #: ../AMC-gui.pl:887 msgid "where defined in the source" msgstr "donde está definido en el código fuente" #. TRANSLATORS: One of the possible sorting criteria for students in the #. exported spreadsheet with scores: the student name. This is a menu entry. #. TRANSLATORS: This is the title of a column containing students names in a #. table showing all annotated answer sheets, when sending them to the #. students by email. #: ../AMC-gui.pl:890 ../AMC-gui.pl:6357 msgid "name" msgstr "nombre" #. TRANSLATORS: One of the possible sorting criteria for students in the #. exported spreadsheet with scores: the student sheet number. This is a menu #. entry. #: ../AMC-gui.pl:892 msgid "exam copy number" msgstr "número de copia del examen" #. TRANSLATORS: One of the possible sorting criteria for students in the #. exported spreadsheet with scores: the line where one can find this student #. in the students list file. This is a menu entry. #: ../AMC-gui.pl:894 msgid "line in students list" msgstr "línea en lista de estudiantes" #. TRANSLATORS: you can omit the [...] part, just here to explain context #. One of the possible sorting criteria for students in the exported #. spreadsheet with scores: the student mark. This is a menu entry. #: ../AMC-gui.pl:897 msgid "mark [student mark, for sorting]" msgstr "Calificación [calificación del estudiante, para clasificar]" #. TRANSLATORS: One of the possible way to group annotated answer sheets #. together to PDF files: make one PDF file per student, with all his pages. #. This is a menu entry. #: ../AMC-gui.pl:902 msgid "One file per student" msgstr "Un archivo por alumno " #. TRANSLATORS: One of the possible way to group annotated answer sheets #. together to PDF files: make only one PDF with all students sheets. This is #. a menu entry. #: ../AMC-gui.pl:904 msgid "One file for all students" msgstr "Un archivo para todos los alumnos" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we #. only select pages where the student has written something (in separate #. answer sheet mode, these are the pages from the answer sheet and not the #. pages from the subject). #: ../AMC-gui.pl:907 msgid "Only pages with answers" msgstr "Sólo páginas con respuestas" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we #. take the pages were the students has nothing to write (often question pages #. from a subject with separate answer sheet option) from the subject. #: ../AMC-gui.pl:909 msgid "Question pages from subject" msgstr "Páginas de cuestiones para tema" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we #. take the pages were the students has nothing to write (often question pages #. from a subject with separate answer sheet option) from the correction. #: ../AMC-gui.pl:911 msgid "Question pages from correction" msgstr "Páginas de cuestiones para corrección" #: ../AMC-gui.pl:914 msgid "All students" msgstr "Todos los alumnos" #: ../AMC-gui.pl:916 msgid "Selected students" msgstr "Alumnos seleccionados" #: ../AMC-gui.pl:918 msgid "Please select..." msgstr "Por favor elija..." #. TRANSLATORS: One of the ways exam was made: each student has a different #. answer sheet with a different copy number - no photocopy was made. This is #. a menu entry. #. TRANSLATORS: This is a title for the AMC mode where the distributed exam #. papers are all different (different paper numbers at the top) -- photocopy #. is not used. #: ../AMC-gui.pl:920 ../AMC-gui.pl:2981 msgid "Different answer sheets" msgstr "Hoja de respuestas diferentes" #. TRANSLATORS: One of the ways exam was made: some students have the same #. exam subject, as some photocopies were made before distributing the #. subjects. This is a menu entry. #. TRANSLATORS: This is a title for the AMC mode where some answer sheets have #. been photocopied before being distributed to the students. #: ../AMC-gui.pl:922 ../AMC-gui.pl:2986 msgid "Some answer sheets were photocopied" msgstr "Algunas hojas de respuestas fueron fotocopiadas" #. TRANSLATORS: One of the ways to send mail: use sendmail command. This is a #. menu entry. #: ../AMC-gui.pl:924 msgid "sendmail" msgstr "sendmail" #. TRANSLATORS: One of the ways to send mail: use a SMTP server. This is a #. menu entry. #: ../AMC-gui.pl:926 msgid "SMTP" msgstr "SMTP" #: ../AMC-gui.pl:927 msgid "None [SMTP security]" msgstr "Ninguna [Seguridad SMTP]" #: ../AMC-gui.pl:936 msgid "Standard" msgstr "Estándar" #: ../AMC-gui.pl:938 msgid "Separate answer sheet" msgstr "Hoja de respuestas aparte" #: ../AMC-gui.pl:940 ../AMC-gui.pl:2683 ../AMC-gui.pl:2701 msgid "Answer sheet first" msgstr "Hoja de respuestas al principio" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. #: ../AMC-gui.pl:944 msgid "nothing" msgstr "nada" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. #: ../AMC-gui.pl:946 msgid "circle" msgstr "círculo" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. Here, a cross. #: ../AMC-gui.pl:948 msgid "mark" msgstr "calificación" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. Here, the box outline. #: ../AMC-gui.pl:950 msgid "box" msgstr "casilla" #: ../AMC-gui.pl:1045 #, perl-format msgid "" "Exporting to '%s' needs some perl modules that are not installed: %s. Please" " install these modules or switch to another export format." msgstr "" "Exportar a '%s' requiere algunos módulos de Perl que no están instalados: " "%s. Por favor instalar estos módulos o cambiar el formato de exportación." #: ../AMC-gui.pl:1068 msgid "" "When referring to a particular answer in the export, the letter used will be" " the one found in the catalog. However, the catalog has not yet been built. " "Do you want to build it now?" msgstr "" "Cuando se refiera a una respuesta concreta en la exportación, se usará la " "letra que se encuentre en el catálog. Sin embargo, el catálogo no se ha " "creado todavía. ¿Quiere que lo cree ahora?" #: ../AMC-gui.pl:1104 msgid "Exporting marks..." msgstr "Exportando calificaciones..." #: ../AMC-gui.pl:1143 #, perl-format msgid "Export to %s did not work: file not created..." msgstr "Exportar a %s no funciona: el archivo no fue creado..." #. TRANSLATORS: One of the popup menu that appears when right-clicking on a #. page in the data capture diagnosis table. Choosing this entry, an image #. will be opened to see where the corner marks were detected. #: ../AMC-gui.pl:1152 ../AMC-gui.pl:4996 msgid "page adjustment" msgstr "ajuste de página" #. TRANSLATORS: One of the popup menu that appears when right-clicking on a #. page in the data capture diagnosis table. Choosing this entry, a window #. will be opened were the user can see all boxes on the scans and how they #. were filled by the students, and correct detection of ticked-or-not if #. needed. #: ../AMC-gui.pl:1154 ../AMC-gui.pl:4996 msgid "boxes zooms" msgstr "enfoque de casillas" #: ../AMC-gui.pl:1225 #, perl-format msgid "You requested to delete all data capture results for %d page(s)" msgstr "" "Usted ha pedido que se borren todos los resultados de captura para %d " "página(s)" #: ../AMC-gui.pl:1226 msgid "All data and image files related to these pages will be deleted." msgstr "" "Todos los datos e imágenes relacionadas con estas páginas serán borradas." #: ../AMC-gui.pl:1227 msgid "Do you really want to continue?" msgstr "¿Realmente desea continuar?" #: ../AMC-gui.pl:1405 #, perl-format msgid "" "Following command could not be run: %s, perhaps due to a poor " "configuration?" msgstr "" "El siguiente comando no pudo ser ejecutado: %s ¿podría ser un fallo " "de configuración?" #: ../AMC-gui.pl:1450 #, perl-format msgid "Current directory: %s" msgstr "Directorio actual: %s" #: ../AMC-gui.pl:1509 msgid "Existing projects:" msgstr "Proyectos existentes:" #. TRANSLATORS: Window title when creating a new project. #: ../AMC-gui.pl:1514 msgid "New AMC project" msgstr "Nuevo proyecto AMC" #: ../AMC-gui.pl:1519 msgid "Projects management:" msgstr "Administración de proyectos" #: ../AMC-gui.pl:1520 msgid "Change project name:" msgstr "Cambiar nombre del proyecto:" #: ../AMC-gui.pl:1525 msgid "Back" msgstr "Atrás" #. TRANSLATORS: Window title when managing projects. #: ../AMC-gui.pl:1528 msgid "AMC projects management" msgstr "Administración de proyectos AMC" #: ../AMC-gui.pl:1550 #, perl-format msgid "You don't have any MC project in directory %s!" msgstr "¡Usted no tiene ningún proyecto MC en el directorio %s!" #: ../AMC-gui.pl:1559 ../AMC-gui-choix_projet.glade:260 msgid "Choose directory" msgstr "Elija directorio" #: ../AMC-gui.pl:1604 #, perl-format msgid "You can't change project %s since it's open." msgstr "Usted no puede cambiar el proyecto %s mientras esté abierto." #: ../AMC-gui.pl:1626 #, perl-format msgid "This will clone project %s to a new project %s." msgstr "Se clonará el proyecto%s al nuevo proyecto%s." #. TRANSLATORS: Message when you want to create an AMC project with name xxx, #. but there already exists a directory in the projects directory with this #. name! #: ../AMC-gui.pl:1697 #, perl-format msgid "Directory %s already exists, so you can't choose this name." msgstr "El directorio %s ya existe. Elija otro nombre." #: ../AMC-gui.pl:1743 msgid "Destination project directory already exists" msgstr "El archivo destino del proyecto ya existe " #: ../AMC-gui.pl:1755 msgid "Copying project..." msgstr "Copiando proyecto..." #: ../AMC-gui.pl:1780 msgid "Your project has been copied" msgstr "Su proyecto ha sido copiado" #: ../AMC-gui.pl:1781 #, perl-format msgid "(%d files out of %d)" msgstr "(%d archivos de un total de%d)" #: ../AMC-gui.pl:1788 msgid "Source project directory not found" msgstr "No se encuentra el directorio fuente del proyecto" #: ../AMC-gui.pl:1796 #, perl-format msgid "An error occuried during project copy: %s." msgstr "Ocurrió un error durante la copia del proyecto: %s." #: ../AMC-gui.pl:1817 #, perl-format msgid "You asked to remove project %s." msgstr "Usted pidió eliminar el proyecto %s." #: ../AMC-gui.pl:1818 msgid "" "This will permanently erase all the files of this project, including the " "source file as well as all the files you put in the directory of this " "project, as the scans for example." msgstr "" "Esto va a borrar permanentemente todos los archivos del proyecto, incluyendo" " la fuente y todos los archivos que usted ha puesto en el directorio de este" " proyecto como, por ejemplo, las digitalizaciones." #: ../AMC-gui.pl:1819 msgid "Is this really what you want?" msgstr "¿Es esto lo que quiere realmente?" #: ../AMC-gui.pl:1876 #, perl-format msgid "You selected directory %s as a project to open." msgstr "Usted seleccionó el directorio %s como un proyecto para abrir." #: ../AMC-gui.pl:1877 msgid "" "However, this directory does not seem to contain a project. Do you still " "want to try?" msgstr "" "Sin embargo, este directorio no parece contener un proyect. ¿Quiere " "intentarlo todavía?" #: ../AMC-gui.pl:1894 #, perl-format msgid "You selected project %s from directory %s." msgstr "Seleccionó el proyecto %sdel directorio %s." #: ../AMC-gui.pl:1895 msgid "" "Do you want to copy this project to your projects directory before opening " "it?" msgstr "" "¿Quiere hacer una copia de este proyecto a su directorio de proyectos antes " "de abrirlo?" #: ../AMC-gui.pl:1965 #, perl-format msgid "The name %s is already used in the projects directory." msgstr "El nombre %s ya se está usando en el directorio de proyectos." #: ../AMC-gui.pl:1966 msgid "You must choose another name to create a project." msgstr "Usted debe elegir otro nombre para crear un proyecto." #: ../AMC-gui.pl:2005 msgid "LaTeX packages:" msgstr "Paquetes LaTeX:" #: ../AMC-gui.pl:2006 msgid "Commands:" msgstr "Comandos:" #: ../AMC-gui.pl:2007 msgid "Fonts:" msgstr "Tipografías:" #: ../AMC-gui.pl:2022 msgid "" "Your AMC version and LaTeX style file version differ. Even if the documents " "are properly generated, this can lead to many problems using AMC.\n" msgstr "" "Las versiones instaladas de AMC y el fichero de estilo de LaTeX difieren. " "Incluso si los documentos se generan sin errores, pueden llegar a producir " "muchos problemas usando AMC. \n" #: ../AMC-gui.pl:2023 msgid "" "Please check your installation to get matching AMC and LaTeX style file " "versions.\n" msgstr "" "Por favor compruebe que las versiones instaladas de AMC y del fichero de " "estilo de LaTeX coinciden.\n" #: ../AMC-gui.pl:2024 #, perl-format msgid "" "AMC version: %s\n" "sty version: %s\n" "sty path: %s" msgstr "" "Versión de AMC: %s\n" "Versión fichero .sty:%s\n" "Ruta (Path) del fichero .sty: %s" #: ../AMC-gui.pl:2052 msgid "Documents update..." msgstr "Actualización de documentos..." #: ../AMC-gui.pl:2076 msgid "Problems while preparing documents" msgstr "Problemas durante la preparación de documentos" #: ../AMC-gui.pl:2078 msgid "Problems while processing the source file." msgstr "Problemas durante el procesado del archivo fuente." #: ../AMC-gui.pl:2081 msgid "You have to correct the source file and re-run documents update." msgstr "" "Debe corregir el archivo fuente y volver a ejecutar la actualización de los " "documentos." #: ../AMC-gui.pl:2085 msgid "Errors" msgstr "Errores" #: ../AMC-gui.pl:2086 msgid "Only first ten errors written" msgstr "Sólo se escriben los diez primeros errores" #: ../AMC-gui.pl:2089 msgid "Warnings" msgstr "Cuidado" #: ../AMC-gui.pl:2090 msgid "Only first ten warnings written" msgstr "Sólo se escriben las diez primeras advertencias" #. TRANSLATORS: Here, %s will be replaced with the translation of "Command #. output details", and refers to the small expandable part at the bottom of #. AMC main window, where one can see the output of the commands lauched by #. AMC. #: ../AMC-gui.pl:2095 #, perl-format msgid "See also the processing log in '%s' below." msgstr "Mire también en el reporte de procesado en '%s' debajo" #. TRANSLATORS: Title of the small expandable part at the bottom of AMC main #. window, where one can see the output of the commands lauched by AMC. #: ../AMC-gui.pl:2097 ../AMC-gui-main_window.glade:2570 msgid "Command output details" msgstr "Detalles de la salida del comando." #: ../AMC-gui.pl:2098 msgid "Use LaTeX editor or latex command for a precise diagnosis." msgstr "" "Use un editor de LaTeX o el comando latex para un diagnóstico preciso." #: ../AMC-gui.pl:2113 msgid "Documents have been prepared" msgstr "Los documentos han sido preparados" #: ../AMC-gui.pl:2143 msgid "Working documents successfully generated." msgstr "Los documentos de trabajo se han generado con éxito." #. TRANSLATORS: Here, "them" refers to the working documents. #: ../AMC-gui.pl:2145 msgid "You can take a look at them double-clicking on the list." msgstr "Puede verlos haciendo doble clic sobre la lista." #. TRANSLATORS: Here, "they" refers to the working documents. #: ../AMC-gui.pl:2147 msgid "If they are correct, proceed to layouts detection..." msgstr "Si están correctos, siga con la detección de los formatos..." #: ../AMC-gui.pl:2169 msgid "Your question has a separate answers sheet." msgstr "Su pregunta tiene una hoja de respuestas aparte." #: ../AMC-gui.pl:2170 msgid "In this case, letters are shown inside boxes." msgstr "En este caso, las letras se muestran dentro de las casillas." #: ../AMC-gui.pl:2171 msgid "Your question is set to present labels inside the boxes to be ticked." msgstr "" "Su pregunta esta configurada para mostrar las etiquetas dentro de las cajas " "para ser marcadas." #. TRANSLATORS: Here, %s will be replaced with the translation of "darkness #. threshold". #: ../AMC-gui.pl:2174 #, perl-format msgid "" "For better ticking detection, ask students to fill out completely boxes, and" " choose parameter \"%s\" around 0.5 for this project." msgstr "" "Para mejorar la detección de casillas marcadas, pida a sus alumnos que " "llenen las cajas completamente y escoja el parámetro \"%s\" cerca de 0.5 " "para este proyecto." #: ../AMC-gui.pl:2175 #, perl-format msgid "At the moment, this parameter is set to %.02f." msgstr "Actualmente, este parámetro está configurado como %.02f." #: ../AMC-gui.pl:2176 msgid "Would you like to set it to 0.5?" msgstr "Desea configurarlo a 0.5?" #. TRANSLATORS: This parameter is the ratio of dark pixels number over total #. pixels number inside box above which a box is considered to be ticked. #: ../AMC-gui.pl:2178 msgid "darkness threshold" msgstr "umbral de oscuridad" #: ../AMC-gui.pl:2199 msgid "" "Papers analysis was already made on the basis of the current working " "documents." msgstr "" "El análisis de los exámenes ya está realizado en los documentos de trabajo " "actuales. " #: ../AMC-gui.pl:2200 msgid "You already made the examination on the basis of these documents." msgstr "Usted ya hizo la revisión de estos documentos." #: ../AMC-gui.pl:2201 msgid "" "If you modify working documents, you will not be capable any more of " "analyzing the papers you have already distributed!" msgstr "" "¡Si modifica los documentos actuales no podrá analizar los exámenes que ya " "se han distribuido!" #: ../AMC-gui.pl:2202 ../AMC-gui.pl:2229 msgid "Do you wish to continue?" msgstr "¿Desea continuar?" #: ../AMC-gui.pl:2203 ../AMC-gui.pl:2230 msgid "" "Click on OK to erase the former layouts and update working documents, or on " "Cancel to cancel this operation." msgstr "" "Pulse en OK para borrar los formatos anteriores y actualizar los documentos " "de trabajo o pulse en Cancel para anular esta operación." #: ../AMC-gui.pl:2204 ../AMC-gui.pl:2231 msgid "To allow the use of an already printed question, cancel!" msgstr "¡Para permitir el uso de una pregunta ya impresa, cancele!" #: ../AMC-gui.pl:2227 msgid "Layouts are already calculated for the current documents." msgstr "Los formatos ya han sido calculados para los documentos actuales." #: ../AMC-gui.pl:2228 msgid "" "Updating working documents, the layouts will become obsolete and will thus " "be erased." msgstr "" "Actualizando los documentos abiertos, los formatos estarán obsoletos y serán" " borrados." #: ../AMC-gui.pl:2258 #, perl-format msgid "" "To handle properly %s files, AMC needs the following components, that" " are currently missing:" msgstr "" "Para poder usar los archivos %s, AMC necesita que se instalen los " "siguientes componentes que faltan actualmente:" #: ../AMC-gui.pl:2270 msgid "Install these components on your system and try again." msgstr "Instale estos componentes en su sistema e inténtelo de nuevo." #. TRANSLATORS: Message when the user required printing the question paper, #. but it is not present (probably the working documents have not been #. properly generated). #: ../AMC-gui.pl:2405 msgid "" "You don't have any question to print: please check your source file and " "update working documents first." msgstr "" "No tiene preguntas que imprimir: por favor revise su archivo fuente y " "actualice los documentos abiertos." #. TRANSLATORS: Message when AMC does not know about the subject pages that #. has been generated. Usualy this means that the layout computation step has #. not been made. #: ../AMC-gui.pl:2422 msgid "Question's pages are not detected." msgstr "Las páginas de las preguntas no han sido detectadas." #: ../AMC-gui.pl:2423 msgid "Perhaps you forgot to compute layouts?" msgstr "¿Tal vez olvidó calcular los diseños?" #: ../AMC-gui.pl:2445 #, perl-format msgid "" "You chose the printing method '%s' but it is not available (%s). Please " "install the missing dependencies or switch to another printing method." msgstr "" "Eligió el método de impresión '%s' pero no está disponible (%s). Instale las" " dependencias que faltan o cambie a otro método de impresión." #: ../AMC-gui.pl:2466 msgid "" "You chose a printing method using CUPS but there are no configured printer " "in CUPS. Please configure some printer or switch to another printing method." msgstr "" "Eligió un método de impresión usando CUPS pero no hay ninguna impresora " "configurada en CUPS. Por favor, configure alguna impresora o cambie a otro " "método de impresión." #. TRANSLATORS: This is the title of the column containing the paper's numbers #. (1,2,3,...) in the table showing all available papers, from which the user #. will choose those he wants to print. #: ../AMC-gui.pl:2533 msgid "papers" msgstr "exámenes" #: ../AMC-gui.pl:2622 msgid "You did not select any exam to print..." msgstr "No seleccionó ningún examen para imprimir..." #: ../AMC-gui.pl:2641 ../AMC-gui.pl:2657 msgid "You selected only a few sheets to print." msgstr "Seleccionó solo algunas hojas para imprimir." #: ../AMC-gui.pl:2642 msgid "" "As students are requested to write on more than one page, you must create as" " many exam sheets as necessary for all your students, with different sheets " "numbers, and print them all." msgstr "" "Dado que los alumnos deben escribir en más de una página, usted debe crear " "tantas hojas como sean necesarias para todos sus alumnos, con numeración " "diferente, e imprimirlas todas." #: ../AMC-gui.pl:2643 msgid "" "If you print one or several sheets and photocopy them to have enough for all" " the students, you won't be able to continue with AMC!" msgstr "" "Si imprime una o más páginas y las fotocopia para todos sus alumnos, " "¡usted no podrá seguir usando AMC!" #: ../AMC-gui.pl:2644 msgid "Do you want to print the selected sheets anyway?" msgstr "Desea imprimir las páginas seleccionadas de todas formas?" #: ../AMC-gui.pl:2658 msgid "" "Are you going to photocopy some printed subjects before giving them to the " "students?" msgstr "" "¿Usted va a fotocopiar algunas de las páginas antes de entregarselas a sus " "alumnos?" #: ../AMC-gui.pl:2659 msgid "If so, the corresponding option will be set for this project." msgstr "" "En caso de ser afirmativo, la opción correspondiente será elegida para este " "proyecto." #: ../AMC-gui.pl:2660 msgid "" "However, you will be able to change this when giving your first scans to " "AMC." msgstr "" "Sin embargo, usted podrá cambiar esto cuando entregue sus primeras " "digitalizaciones a AMC." #. TRANSLATORS: the two %s will be replaced by the translations of "Answer #. sheet first" and "Extracting method". #: ../AMC-gui.pl:2682 #, perl-format msgid "" "You selected the '%s' option, that uses '%s', so the %s has been set to '%s'" " for you." msgstr "" "Seleccionó la opción '%s', que usa '%s', luego %s ha sido definido como " "'%s'." #: ../AMC-gui.pl:2684 ../AMC-gui-edit_preferences.glade:902 msgid "Extracting method" msgstr "Método de extracción" #: ../AMC-gui.pl:2700 #, perl-format msgid "" "You selected the '%s' option, but this option needs 'qpdf' or 'pdftk' to be " "installed on your system. Please install one of these and try again." msgstr "" "Ha seleccionado la opción '%s' que necesita que en su sistema esté instalado" " 'qpdf' o 'pdftk'. Por favor instale uno de ellos y vuelva a intentarlo." #: ../AMC-gui.pl:2741 msgid "Print papers one by one..." msgstr "Imprimir los exámenes uno por uno..." #: ../AMC-gui.pl:2790 msgid "" "Working documents are in an old format, which is not supported anymore." msgstr "" "Los documentos de trabajo están en un formato anterior, que ya no es " "compatible con esta versión de AMC." #: ../AMC-gui.pl:2791 msgid "Please generate again the working documents!" msgstr "¡Genera otra vez los documentos de trabajo!" #: ../AMC-gui.pl:2805 msgid "Detecting layouts..." msgstr "Detectando diseños..." #: ../AMC-gui.pl:2823 msgid "No layout detected." msgstr "No se detectó diseño" #: ../AMC-gui.pl:2824 msgid "" "Don't go through the examination before fixing this problem, " "otherwise you won't be able to use AMC for correction." msgstr "" "No realice la prueba antes de corregir este problema, de otra forma " "no podrá usar AMC para corregirlos." #: ../AMC-gui.pl:2830 msgid "Layouts are detected." msgstr "Diseños detectados." #: ../AMC-gui.pl:2831 #, perl-format msgid "" "You can check all is correct clicking on button %s and looking at " "question pages to see if red boxes are well positioned." msgstr "" "Usted puede revisar que todo esté correcto haciendo clic en el botón " "%s y revisando que las cajas rojas están bien posicionadas en todas " "las páginas con preguntas." #: ../AMC-gui.pl:2831 ../AMC-gui-main_window.glade:560 msgid "Check layouts" msgstr "Revisar diseños" #: ../AMC-gui.pl:2832 msgid "Then you can proceed to printing and to examination." msgstr "Luego usted puede proceder a imprimir y tomar las pruebas." #: ../AMC-gui.pl:2905 msgid "No layout for this project." msgstr "No existe un diseño para este proyecto." #. TRANSLATORS: Here, the first %s will be replaced with "Layout detection" (a #. button title), and the second %s with "Preparation" (the tab title where #. one can find this button). #: ../AMC-gui.pl:2907 #, perl-format msgid "Please use button %s in %s before manual data capture." msgstr "" "Por favor use el botón %s en %s antes de capturar datos en " "forma manual." #: ../AMC-gui.pl:2908 ../AMC-gui-main_window.glade:508 msgid "Layout detection" msgstr "Detección de diseño" #: ../AMC-gui.pl:2909 ../AMC-gui-main_window.glade:684 msgid "Preparation" msgstr "Preparación" #: ../AMC-gui.pl:2947 #, perl-format msgid "Pre-allocate sheet ids from the page numbers, starting at %d" msgstr "Pre-asignar identificadores a las páginas, comenzando con %d" #: ../AMC-gui.pl:2978 msgid "Automatic data capture can be done in two different modes:" msgstr "La captura automática de datos puede hacerse en dos modos distintos:" #: ../AMC-gui.pl:2983 msgid "" "In the most robust one, you give a different exam (with a different exam " "number) to every student. You must not photocopy subjects before " "distributing them." msgstr "" "En el modo más robusto, se da un examen diferente (con un número diferente " "de examen) a cada estudiante. No debe fotocopiarlos antes de distribuirlos." #: ../AMC-gui.pl:2988 msgid "" "In the second one (which can be used only if answer sheets to be scanned " "have one page per candidate) you can photocopy answer sheets and give the " "same subject to different students." msgstr "" "En el segundo método, el cual solo puede ser usado si las hojas de " "respuestas consisten en una única página, usted debe fotocopiar las hojas de" " respuestas y entregar la misma página de preguntas a todos los alumnos. " #: ../AMC-gui.pl:2989 msgid "After the first automatic capture, you can't switch to the other mode." msgstr "" "Después de la primera captura automática, usted no podrá cambiar a otro " "modo." #: ../AMC-gui.pl:3163 msgid "Automatic data capture..." msgstr "Captura automática de datos..." #: ../AMC-gui.pl:3174 msgid "Automatic data capture has been completed" msgstr "Se ha completado la captura automática de datos." #: ../AMC-gui.pl:3183 #, perl-format msgid "" "Some of the pages you submitted (%d of them) have already been processed " "before. Old data has been overwritten." msgstr "" "Algunas de las páginas que ha enviado (%dde ellas) ya se habían procesado " "anteriormente. Los datos antiguos han sido sobreescritos. " #. TRANSLATORS: Names list file : (none) #: ../AMC-gui.pl:3271 msgid "(none)" msgstr "(ninguno)" #: ../AMC-gui.pl:3292 #, perl-format msgid "Unsuitable names file: %d errors, first on line %d." msgstr "" "Archivo con nombres de alumnos no es válido: %d errores, el primero en la " "línea %d." #. TRANSLATORS: Here, do not translate 'name' and 'surname' (except in #. french), as the column names in the students list file has to be named in #. english in order to be properly detected. #: ../AMC-gui.pl:3309 #, perl-format msgid "" "Found %d empty names in names file %s. Check that name or " "surname column is present, and always filled." msgstr "" "Se encontrarron %d nombres vacíos en el archivo de nombres, %s. " "Revise que las columas de nombre o apellido estén presente y " "rellenadas." #: ../AMC-gui.pl:3310 ../AMC-gui.pl:3326 msgid "Edit the names file to correct it, and re-read." msgstr "Corrija el archivo con nombres de alumnos y vuelva a leerlo." #: ../AMC-gui.pl:3326 #, perl-format msgid "Found duplicate names: %s. Check that all names are different." msgstr "" "Se encontraron nombres repetidos: %s. Asegurese que todos los nombres" " sean distintos." #. TRANSLATORS: Here, %s will be replaced with the name of the tab "Data #. capture". #: ../AMC-gui.pl:3358 #, perl-format msgid "" "Before associating names to papers, you must choose a students list file in " "tab \"%s\"." msgstr "" "Antes de asociar nombres a páginas, ustede debe elegir el archivo con la " "lista de alumnos en la sección \"%s\"." #. One of the "notify the user at the end of the following actions" checkbox: #. for automatic data capture. #: ../AMC-gui.pl:3359 ../AMC-gui-edit_preferences.glade:1584 #: ../AMC-gui-main_window.glade:1286 msgid "Data capture" msgstr "Captura de datos" #: ../AMC-gui.pl:3368 msgid "" "Please choose a key from primary keys in students list before association." msgstr "" "Por favor elegir una \"llave primaria\" en la lista de estudiantes antes de " "asociarlos." #: ../AMC-gui.pl:3377 msgid "" "Please choose a code (made with LaTeX command \\AMCcodeGrid or equivalent) " "before automatic association." msgstr "" "Por favor seleccione un código (realizado con el comando LaTeX \\AMCcodeGrid" " o equivalente) antes de la asociación automática. " #. TRANSLATORS: Here, %s will be replaced with "Students identification", #. which refers to a paragraph in the tab "Marking" from AMC main window. #: ../AMC-gui.pl:3422 #, perl-format msgid "" "Before associating names to papers, you must choose a students list file in " "paragraph \"%s\"." msgstr "" "Antes de asociar los nombres a las páginas, usted debe elegir el archivo con" " la lista de nombres en el parrafo \"%s\"." #: ../AMC-gui.pl:3423 msgid "Students identification" msgstr "Identificación del alumno" #: ../AMC-gui.pl:3446 msgid "Automatic association..." msgstr "Asociación automática..." #: ../AMC-gui.pl:3468 #, perl-format msgid "Automatic association completed: %d students recognized." msgstr "Asociación automática finalizada: se reconocieron %d alumnos." #. TRANSLATORS: Here %s and %s will be replaced with two parameters names: #. "Primary key from this list" and "Code name for automatic association". #: ../AMC-gui.pl:3470 #, perl-format msgid "Please check \"%s\" and \"%s\" values and try again." msgstr "Por favor revise los valores de \"%s\" y \"%s\" e intente denuevo." #: ../AMC-gui.pl:3471 msgid "Primary key from this list" msgstr "Llave primaria de esta lista" #: ../AMC-gui.pl:3472 msgid "Code name for automatic association" msgstr "Código para asociación automática" #: ../AMC-gui.pl:3478 msgid "" "Automatic association is now finished. You can ask for manual association to" " check that all is fine and, if necessary, read manually students names " "which have not been automatically identified." msgstr "" "La asociación automática ha terminado. Usted puede iniciar la asociación " "manual para asegurarse que todo está bien, y si es necesario, leer " "manualmente los nombres de los alumnos que no se han identificado " "automáticamente." #: ../AMC-gui.pl:3640 #, perl-format msgid "" "Some manual association data has be found, which will be lost if the primary" " key is changed. Do you want to switch back to the primary key \"%s\" and " "keep association data?" msgstr "" "Algunos datos de la asociación manual han sido encontrados, pero se perderán" " si la llave primaria es cambiada. ¿Desea volver a la llave primaria \"%s\"" " y mantener los datos asociados?" #: ../AMC-gui.pl:3666 #, perl-format msgid "" "The primary key from the students list has been set to \"%s\", which is not " "the value from the association data." msgstr "" "La llave principal de la lista de alumnos ha sido seteado a \"%s\", lo cual " "no es el valor de los datos de asoción." #: ../AMC-gui.pl:3667 msgid "" "Automatic papers/students association will be re-run to update the " "association data." msgstr "" "La asociación automática de pruebas a alumnos volverá a ser ejecutado para " "actualizar los datos de asociación." #: ../AMC-gui.pl:3693 #, perl-format msgid "Papers are not yet corrected: use button \"%s\"." msgstr "Pruebas aún no se han corregidas: use el botón \"%s\"." #. TRANSLATORS: This is a button: "Mark" is here an action to be called by the #. user. When clicking this button, the user requests scores to be computed #. for all students. #: ../AMC-gui.pl:3695 ../AMC-gui-main_window.glade:1363 msgid "Mark" msgstr "Corregir pruebas" #: ../AMC-gui.pl:3736 msgid "Extracting marking scale..." msgstr "Extrayendo escala de notas" #: ../AMC-gui.pl:3940 msgid "Computing marks..." msgstr "Computando notas..." #: ../AMC-gui.pl:3945 msgid "Grading has been completed" msgstr "La calificación se ha completado" #. TRANSLATORS: This is the marks mean for all students. #: ../AMC-gui.pl:3961 #, perl-format msgid "Mean: %.2f" msgstr "Promedio: %.2f" #: ../AMC-gui.pl:3964 msgid "No marks computed" msgstr "No se han calculado notas" #: ../AMC-gui.pl:3983 msgid "Pre-association" msgstr "Pre-asociación" #: ../AMC-gui.pl:3997 msgid "No students list file" msgstr "No hay lista de estudiantes" #: ../AMC-gui.pl:3999 msgid "No primary key from students list file" msgstr "No hay una llave principal en archivo con la lista de estudiantes" #: ../AMC-gui.pl:4005 #, perl-format msgid "Missing identification for %d answer sheets" msgstr "Falta identificación para %d hojas de respuestas." #: ../AMC-gui.pl:4007 msgid "All completed answer sheets are associated with a student name" msgstr "Todas las hojas de respuesta completadas están asociadas a un alumno." #: ../AMC-gui.pl:4061 msgid "exam ID" msgstr "ID del examen" #: ../AMC-gui.pl:4076 msgid "student" msgstr "alumno" #. TRANSLATORS: File name for single annotated answer sheets with only some #. selected students. Please use simple characters. #: ../AMC-gui.pl:4207 msgid "Selected_students" msgstr "Alumnos_seleccionados" #. TRANSLATORS: File name for single annotated answer sheets with all #. students. Please use simple characters. #: ../AMC-gui.pl:4209 msgid "All_students" msgstr "Todos_los_alumnos" #: ../AMC-gui.pl:4257 msgid "Annotating papers..." msgstr "Anotando pruebas..." #: ../AMC-gui.pl:4261 msgid "Annotations have been completed" msgstr "Las anotaciones se han completado" #: ../AMC-gui.pl:4375 #, perl-format msgid "Project \"%s\" preferences" msgstr "Preferencias \"%s\" del proyecto" #: ../AMC-gui.pl:4378 msgid "Project preferences" msgstr "Preferencias de proyecto" #: ../AMC-gui.pl:4484 #, perl-format msgid "" "You modified \"%s\" value, which is the default value used when " "creating new projects. Do you want to change also \"%s\" for the " "opened %s project?" msgstr "" "Usted modificó el valor \"%s\" , el cual es el valor por omisión " "cuanso se crea un nuevo proyecto. ¿Desea cambiar \"%s\" para el " "proyecto %s, el cual está abierto?" #: ../AMC-gui.pl:4600 msgid "Working documents are not readable" msgstr "Los documentos de trabajo no son legibles" #: ../AMC-gui.pl:4603 msgid "No working documents" msgstr "No hay documentos de trabajo" #: ../AMC-gui.pl:4606 msgid "Working documents last update:" msgstr "Última actualización de documentos de trabajo:" #: ../AMC-gui.pl:4662 msgid "No layout" msgstr "Sin diseño" #: ../AMC-gui.pl:4665 #, perl-format msgid "Processed %d pages" msgstr "Se han procesado %d páginas" #: ../AMC-gui.pl:4668 msgid "but some defects were detected." msgstr "pero se detectaron algunos defectos." #: ../AMC-gui.pl:4680 msgid "" "The \\namefield command is not used. Writing subjects without name field is " "not recommended" msgstr "El comando \\namefield no se está usando, lo cual no es recomendable." #: ../AMC-gui.pl:4681 msgid "" "The \\namefield command is used several times for the same subject. This " "should not be the case, as each student should write his name only once" msgstr "" "El comando \\namfield se está usando varias veces para cada alumno. Esto no " "debería suceder ya que cada alumno solo debería escribir su nombre solo una " "vez." #: ../AMC-gui.pl:4682 msgid "No box to be ticked" msgstr "No hay casillas para marcar" #: ../AMC-gui.pl:4683 msgid "" "The corner marks and binary boxes are not at the same location on all pages" msgstr "" "Las marcas de esquina y casillas binarias no están en la misma ubicación en " "todas las páginas." #: ../AMC-gui.pl:4684 msgid "" "Some material has been placed out of the page. This is often a result of a " "multiple columns question group starting too close from the page bottom. In " "such a case, use \"needspace\"." msgstr "" "Algún material ha sido colocado fuera de la página. Esto es a menudo el " "resultado de un grupo de preguntas multi-columna que comienza demasiado " "cerca de la parte inferior de la página. En tal caso, use \"needspace\"." #: ../AMC-gui.pl:4705 msgid "" "Some potential defects were detected for this subject. Correct them in the " "source and update the working documents." msgstr "" "Se detectaros algunos defectos potenciales. Corrija el origen y actualice " "los documentos de trabajo." #: ../AMC-gui.pl:4711 #, perl-format msgid "(See for example pages %s and %s)" msgstr "(Vea, por ejemplo, páginas %s y %s)" #: ../AMC-gui.pl:4716 #, perl-format msgid "(Concerns %1$d pages, see for example page %2$s)" msgstr "(Se refiere a %1$d páginas, vea por ejemplo la página %2$s)" #: ../AMC-gui.pl:4723 #, perl-format msgid "(Concerns %1$d exams, see for example sheet %2$d)" msgstr "(Se refiere a %1$d exámenes, vea, por ejemplo la hoja %2$d)" #: ../AMC-gui.pl:4840 #, perl-format msgid "Data capture from %d complete papers and %d incomplete papers" msgstr "Datos capturados desde %d pruebas completas y %d pruebas incompletas" #: ../AMC-gui.pl:4844 #, perl-format msgid "Data capture from %d complete papers" msgstr "Datos capturados de %d páginas completas" #. TRANSLATORS: this text points out that no data capture has been made yet. #: ../AMC-gui.pl:4849 msgid "No data" msgstr "Sin datos" #: ../AMC-gui.pl:4856 #, perl-format msgid "Overwritten pages: %d" msgstr "Páginas sobreescritas: %d" #: ../AMC-gui.pl:4864 msgid "All scans were properly recognized." msgstr "Todos los escaneos fueron reconocidos correctamente." #: ../AMC-gui.pl:4871 #, perl-format msgid "%d scans were not recognized." msgstr "%d escaneos no fueron reconocidos." #. TRANSLATORS: column title for the list of overwritten pages. This refers to #. the page from the question #: ../AMC-gui.pl:4895 msgid "Page" msgstr "Página" #. TRANSLATORS: column title for the list of overwritten pages. This refers to #. the number of times the page has been overwritten. #: ../AMC-gui.pl:4900 msgid "count" msgstr "contar" #. TRANSLATORS: column title for the list of overwritten pages. This refers to #. the date of the last data capture for the page. #: ../AMC-gui.pl:4905 msgid "Date" msgstr "Fecha" #: ../AMC-gui.pl:4946 msgid "Looking for analysis..." msgstr "Buscando análisis..." #: ../AMC-gui.pl:4988 msgid "Automatic data capture now completed." msgstr "Captura automática de datos completada." #: ../AMC-gui.pl:4989 #, perl-format msgid "It is not complete (missing pages from %d papers)." msgstr "No está completp (faltan páginas de %d exámenes)." #: ../AMC-gui.pl:4990 msgid "" "You can analyse data capture quality with some indicators values in analysis" " list:" msgstr "" "Usted puede analizar la calidad de captura con unos indicadores en la lista " "de análisis:" #: ../AMC-gui.pl:4992 #, perl-format msgid "" "- %s represents positioning gap for the four corner marks. Great " "value means abnormal page distortion." msgstr "" "- %s representa el espacio entre las cuatro marcas de esquinas. Un " "valor alto significa que hay distorción anormal en la página." #: ../AMC-gui.pl:4994 #, perl-format msgid "" "- great values of %s are seen when darkness ratio is very close to " "the threshold for some boxes." msgstr "" "- un alto valor de %s se ve cuando la razón de oscuridad es cercano " "al umbral de algunas casillas." #: ../AMC-gui.pl:4996 #, perl-format msgid "" "You can also look at the scan adjustment (%s) and ticked and unticked" " boxes (%s) using right-click on lines from table %s." msgstr "" "Usted también puede ver el ajuste de escaneo (%s) y las marcas de las" " casillas (%s) haciendo clic-derecho en las líneas de la table " "%s." #: ../AMC-gui.pl:4996 msgid "Diagnosis" msgstr "Diagn" #: ../AMC-gui.pl:5024 msgid "Pages that miss data capture to complete students sheets:" msgstr "" "Página que no tienen escaneo para completar las pruebas de los alumnos:" #: ../AMC-gui.pl:5145 #, perl-format msgid "Error loading scan %s" msgstr "Error cargando el escaneo %s" #: ../AMC-gui.pl:5151 msgid "No scan selected" msgstr "No hay un escaneo seleccionado" #: ../AMC-gui.pl:5156 msgid "No more unrecognized scans" msgstr "No hay más escaneos no reconocidos. " #: ../AMC-gui.pl:5234 msgid "Making diagnostic image..." msgstr "Generando imágen diagnó" #: ../AMC-gui.pl:5304 msgid "(no description)" msgstr "(sin discripción)" #. TRANSLATORS: This is a column title for the list of files to be included in #. a template being created. #. TRANSLATORS: This is the title of a column containing attachments file #. paths in a table showing all attachments, when sending them to the students #. by email. #: ../AMC-gui.pl:5389 ../AMC-gui.pl:6336 msgid "file" msgstr "archivo" #: ../AMC-gui.pl:5469 msgid "Add files to template" msgstr "Agregar archivos a la plantilla" #: ../AMC-gui.pl:5490 msgid "" "When making a template, you can only add files that are within the project " "directory." msgstr "" "Cuando haga una plantila, usted solo puede agregar archivos que están dentro" " del directorio del proyecto." #. TRANSLATORS: This is a column name for the list of available templates, #. when creating a new project based on a template. #: ../AMC-gui.pl:5613 msgid "template" msgstr "plantilla" #: ../AMC-gui.pl:5658 msgid "All source files" msgstr "Agregar archivos fuente" #: ../AMC-gui.pl:5676 #, perl-format msgid "%s files" msgstr "%s archivos" #: ../AMC-gui.pl:5710 msgid "Archive (zip, tgz)" msgstr "Archivar (zip, tgz)" #: ../AMC-gui.pl:5739 #, perl-format msgid "Nothing extracted from archive %s. Check it." msgstr "Revise el archivo %s, nada fue extraído." #: ../AMC-gui.pl:5868 #, perl-format msgid "" "File %s already exists in project directory: do you want to replace it?" msgstr "" "El archivo %s ya existe en el directorio del proyecto, ¿desea reemplazarlo?" #: ../AMC-gui.pl:5869 msgid "" "Click yes to replace it and loose pre-existing contents, or No to cancel " "source file import." msgstr "" "Haga clic en \"SI\" para reemplazarlo y perder los contenidos pre-existentes" " o \"NO\" para cancelar la importación del archivo fuente." #: ../AMC-gui.pl:5885 msgid "The source file has been copied to project directory." msgstr "El archivo fuente ha sido copiado al directorio del proyecto." #: ../AMC-gui.pl:5885 #, perl-format msgid "You can now edit it with button \"%s\" or with any editor." msgstr "Usted puede editarlo con el botón \"%s\" o con cualquier editor." #: ../AMC-gui.pl:5885 ../AMC-gui-main_window.glade:241 msgid "Edit source file" msgstr "Editor archivo fuente" #: ../AMC-gui.pl:5893 #, perl-format msgid "Error copying source file: %s" msgstr "Error al copiar el archivo fuente: %s" #: ../AMC-gui.pl:6078 msgid "" "In order to send a useful bug report, please attach the following documents:" msgstr "" "Para poder enviar un informe de falla que sea útil, por favor adjuntar los " "siguientes documentos:" #: ../AMC-gui.pl:6079 msgid "" "an archive (in some compressed format, like ZIP, 7Z, TGZ...) containing the " "project directory, scan files and configuration " "directory (.AMC.d in home directory), so as to reproduce and analyse " "this problem." msgstr "" "un archivo comprimido (ZIP, 7Z, TGZ u otro) conteniendo el directorio del" " proyecto, archivos escaneados y directorio de " "configuración (.AMC.d en el directorio 'home'), para poder reproducir y " "analizar este problema." #: ../AMC-gui.pl:6080 msgid "" "the log file produced when the debugging mode (in Help menu) is " "checked. Please try to reproduce the bug with this mode activated." msgstr "" "el archivo de bitácora (log) es producido cuando el modo de " "depuración del menú de ayuda está marcado. Por favor intente de reproducir " "el error cuando este modo está activado." #: ../AMC-gui.pl:6081 #, perl-format msgid "Bug reports can be filled at %s or sent to the address below." msgstr "" "Informes de fallas puden ser llenados en %s o enviados a la siguiente " "dirección." #: ../AMC-gui.pl:6082 ../AMC-gui.pl:6086 msgid "AMC community site" msgstr "Sitio comunitario de AMC" #: ../AMC-gui.pl:6149 msgid "Attach file" msgstr "Adjuntar archivo" #: ../AMC-gui.pl:6183 msgid "There are no annotated corrected answer sheets to send." msgstr "No hay hojas de respuestas con anotaciones para enviar." #: ../AMC-gui.pl:6186 msgid "" "Please group the annotated sheets to PDF files to be able to send them." msgstr "" "Por favor agrupar las hojas con anotaciones a los archivos PDF para poder " "enviarlos." #: ../AMC-gui.pl:6187 msgid "" "Please annotate answer sheets and group them to PDF files to be able to send" " them." msgstr "" "Por favor haga anotaciones en la hoja de respuestas y agrupelas en PDFs para" " enviarlas." #: ../AMC-gui.pl:6218 #, perl-format msgid "" "Sending emails requires some perl modules that are not installed: %s. Please" " install these modules and try again." msgstr "" "Enviar correos requiere algunos módulos Perl que no están instalados: %s. " "Por favor instale estos módulos y vuelva a intentar." #: ../AMC-gui.pl:6239 msgid "" "SMTP security mode \"STARTTLS\" is only available with Email::Sender version" " 1.300027 and over. Please install a newer version of this perl module or " "change SMTP security mode, and try again." msgstr "" "El modo de seguridad SMTP \"STARTTLS\" está diponible únicamente con " "Email::Sender version 1.300027 y superior. Por favor, instale una versión " "más moderna de este módulo perl o cambie el modo de seguridad SMTP y prueb " "de nuevo." #: ../AMC-gui.pl:6255 #, perl-format msgid "The email address you entered (%s) is not correct." msgstr "El correo electrónico que ingresó (%s) no es correcto." #: ../AMC-gui.pl:6257 msgid "Please edit your preferences to correct your email address." msgstr "" "Edite sus preferencias para corregir su dirección de correo electrónico." #: ../AMC-gui.pl:6259 msgid "You did not enter your email address." msgstr "Usted no ingresó un correo electrónico." #: ../AMC-gui.pl:6260 msgid "Please edit the preferences to set your email address." msgstr "" "Edite sus preferencias para definir su dirección de correo electrónico." #: ../AMC-gui.pl:6283 #, perl-format msgid "" "The sendmail program cannot be found at the location you specified in" " the preferences (%s). Please update your configuration." msgstr "" "No se encuentra el programa sendmail en el sitio especificado en las " "preferencias (%s). Por favor, actualice su configuración. " #: ../AMC-gui.pl:6303 msgid "" "No email addresses has been found in the students list file. You need to " "write the students addresses in a column of this file." msgstr "" "No se ha encontrado ningún correo electrónico en el archivo con la lista de " "alumnos. Usted debe ingresar los correos electrónicos en una columna de este" " archivo." #. TRANSLATORS: This is the title of a column containing copy numbers in a #. table showing all annotated answer sheets, when sending them to the #. students by email. #: ../AMC-gui.pl:6351 msgid "copy" msgstr "copiar" #. TRANSLATORS: This is the title of a column containing students email #. addresses in a table showing all annotated answer sheets, when sending them #. to the students by email. #: ../AMC-gui.pl:6363 msgid "email" msgstr "correo electrónico" #. TRANSLATORS: This is the title of a column containing mailing status (not #. sent, already sent, failed) in a table showing all annotated answer sheets, #. when sending them to the students by email. #: ../AMC-gui.pl:6369 msgid "status" msgstr "estado" #: ../AMC-gui.pl:6388 msgid "failed" msgstr "fallado" #: ../AMC-gui.pl:6446 msgid "Some files you asked to be attached to the emails are missing:" msgstr "" "Algunos archivos solicitados para adjuntarse a las direcciones de correo " "están perdidos...." #: ../AMC-gui.pl:6447 msgid "Please create them or remove them from the list of attached files." msgstr "Por favor crealos o remuevelos de la lista de los archivos adjuntos." #: ../AMC-gui.pl:6499 msgid "Sending emails..." msgstr "Enviando correos electrónicos" #: ../AMC-gui.pl:6508 msgid "Cancelled." msgstr "Cancelado." #: ../AMC-gui.pl:6510 msgid "SMTP authentication failed: check SMTP configuration and password." msgstr "" "Fallo en la autenticación SMTP: compruebe la configuración y la clave SMTP." #: ../AMC-gui.pl:6512 #, perl-format msgid "%d message(s) has been sent." msgstr "%d mensaje(s) se han enviado(s)." #: ../AMC-gui.pl:6552 msgid "Set exam name" msgstr "Poner nombre de prueba" #: ../AMC-gui.pl:6559 ../AMC-gui-edit_preferences.glade:4154 msgid "Examination name" msgstr "Nombre de prueba" #: ../AMC-gui.pl:6563 ../AMC-gui-edit_preferences.glade:4165 msgid "Code (short name) for examination" msgstr "Código (nombre corto) para prueba" #. TRANSLATORS: This is the title of a column containing all columns names #. from the students list file, when choosing which columns has to be exported #. to the spreadsheets. #: ../AMC-gui.pl:6613 msgid "column" msgstr "columna" #: ../AMC-gui.pl:6621 msgid "" msgstr "" #: ../AMC-gui.pl:6622 msgid "" msgstr "" #: ../AMC-gui.pl:6623 msgid "" msgstr "" #: ../AMC-gui.pl:6657 msgid "Install an AMC plugin" msgstr "Instalar plug-in de AMC" #: ../AMC-gui.pl:6662 msgid "Plugins (zip, tgz)" msgstr "Plugins (zip, tgz)" #: ../AMC-gui.pl:6682 #, perl-format msgid "" "An error occured while trying to extract files from the plugin archive: %s." msgstr "" "Un error ocurrió mientras intentando de extraer los archivos del plugin: %s." #: ../AMC-gui.pl:6696 msgid "Nothing extracted from the plugin archive. Check it." msgstr "Nada se extrajo del plugin. Por favor revise." #: ../AMC-gui.pl:6706 msgid "" "This is not a valid plugin, as it contains more than one directory at the " "first level." msgstr "" "Este no es un plugin válido debido a que contiene más de un directorio en el" " primer nivel." #: ../AMC-gui.pl:6717 msgid "" "This is not a valid plugin, as it does not contain a perl/AMC subdirectory." msgstr "" "Este no es un plugin válido, dado que no contiene un sub-directorio " "Perl/AMC." #: ../AMC-gui.pl:6734 #, perl-format msgid "" "A plugin is already installed with the same name (%s). Do you want to delete" " the old one and overwrite?" msgstr "" "Un plugin ya está instalado con el mismo nombre (%s). ¿Desea sobreescribir " "el antiguo archivo con el nuevo?" #: ../AMC-gui.pl:6752 #, perl-format msgid "Error while moving the plugin to the user plugin directory: %s" msgstr "Error al mover el plugin al directorio de usuario: %s" #: ../AMC-gui.pl:6762 msgid "Please restart AMC before using the new plugin..." msgstr "Por favor reinicie AMC antes de usar el nuevo plugin..." #: ../AMC-gui.pl:6814 msgid "zooms" msgstr "acercamientos" #: ../AMC-gui.pl:6815 msgid "" "boxes images are extracted from the scans while processing automatic data " "capture. They can be removed if you don't plan to use the zooms dialog to " "check and correct boxes categorization. They can be recovered processing " "again automatic data capture from the same scans." msgstr "" "las imágenes de las casillas se extraen de los escaneos durante el " "procesamiento automático. Estas pueden ser eliminadas si no desea usar el " "dialogo de acercamiento para revisar la corrección automática de las " "pruebas. Una vez borradas, estas pueden ser recuperadas ejecutando la " "corrección automática sobre los mismos escaneos." #: ../AMC-gui.pl:6827 msgid "layout reports" msgstr "Formato de reportes" #: ../AMC-gui.pl:6828 msgid "" "these images are intended to show how the corner marks have been recognized " "and positioned on the scans. They can be safely removed once the scans are " "known to be well-recognized. They can be recovered processing again " "automatic data capture from the same scans." msgstr "" "La intención de estas imágenes es mostrar cómo las marcas de las esquinas " "han sido reconocidas y colocadas en la digitalización. Pueden ser removidas " "de forma segura una vez que la digitalización las reconozca sin problemas. " "Se pueden recuperar procediendo a la captura automática de datos de la misma" " digitalización." #: ../AMC-gui.pl:6843 msgid "annotated pages" msgstr "páginas con anotaciones" #: ../AMC-gui.pl:6844 msgid "" "jpeg annotated pages are made before beeing assembled to PDF annotated " "files. They can safely be removed, and will be recovered automatically the " "next time annotation will be requested." msgstr "" "Los archivos JPEG con anotaciones se hacen antes de ser ensamblados en un " "PDF. Estas pueden ser borradas, pero serán generadas automáticamente la " "próxima vez que usted pida las anotaciones." #: ../AMC-gui.pl:6874 msgid "Total size of concerned files:" msgstr "Tamaño total de los archivos afectados" #: ../AMC-gui.pl:6923 #, perl-format msgid "%s files were removed." msgstr "%s archivos fueron eliminados." #: ../AMC-gui.pl:6949 #, perl-format msgid "I don't find the command %s." msgstr "No se encontró el comando %s." #: ../AMC-gui.pl:6950 msgid "Perhaps LaTeX is not installed?" msgstr "¿Posiblemente LaTeX no está instalado?" #. TRANSLATORS: Do not translate 'auto-multiple-choice latex-link', which is a #. command to be typed on MacOsX #: ../AMC-gui.pl:6954 msgid "" "The style file automultiplechoice.sty seems to be unreachable. Try to use " "command 'auto-multiple-choice latex-link' as root to fix this." msgstr "" "El archivo de estilo, 'automultiplechoice.sty' no es alcanzable. Intente " "usar el comando 'auto-multiple-choice latex-link' como root para corregir " "esto." #: ../AMC-prepare.pl:274 #, perl-format msgid "%d/%d good answers not coherent for a simple question" msgstr "%d/%d respuestas correctas noes coherente para una pregunta simple" #: ../AMC-prepare.pl:357 #, perl-format msgid "question ID used several times for the same paper: \"%s\"" msgstr "" "el número ID de las preguntas es usado varias veces en la misma prueba: " "\"%s\"" #: ../AMC-prepare.pl:444 #, perl-format msgid "" "An answer appears to be given outside a question environment, after question" " \"%s\"" msgstr "" "Una respuesta parece estar fuera del entorno de la pregunta, después de la " "pregunta \"%s\"" #: ../AMC-prepare.pl:453 #, perl-format msgid "Answer number ID used several times for the same question: %s" msgstr "" "El número ID de la respuesta es usado varias veces en la misma pregunta: %s" #: ../AMC-prepare.pl:708 #, perl-format msgid "%d errors during LaTeX compiling" msgstr "%d errores durante compilación LaTeX" #: ../AMC-prepare.pl:768 #, perl-format msgid "" "LaTeX command configured is not present (%s). Install it or change " "configuration, and then rerun." msgstr "" "El comando LaTeX configurado no está presente (%s). Instalelo o cambie la " "conficuración y luego reinicie." #: ../AMC-prepare.pl:797 msgid "solution" msgstr "solución" #: ../AMC-prepare.pl:812 msgid "catalog" msgstr "catálogo" #: ../AMC-prepare.pl:845 msgid "question sheet" msgstr "hoja de preguntas" #: ../AMC-prepare.pl:873 #, perl-format msgid "" "please remove accentuated or non-standard characters from the following " "question ID: \"%s\"" msgstr "" "por favor, elimine caracteres acentuados o no estándar del siguiente ID de " "pregunta: \"%s\"" #: ../AMC-prepare.pl:875 msgid "" "some question IDs seems to have accentuated or non-standard characters. This" " may break future processings." msgstr "" "algunos IDs de preguntas parece que tienen caracteres acentuados o no " "estándar. Esto puede interrumpor procesos futuros." #: ../AMC-read-pdfform.pl:136 msgid "Reading PDF forms..." msgstr "Leyendo formularios PDF..." #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:592 msgid "Name [name column title in exported spreadsheet]" msgstr "Nombre" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:594 msgid "Mark [mark column title in exported spreadsheet]" msgstr "Nota" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:596 msgid "Exam [exam number column title in exported spreadsheet]" msgstr "" "Examen [el titlo de la columna del número del examen la hoja de cálculo " "exportada]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:598 msgid "Score [total score column title in exported spreadsheet]" msgstr "" "Puntuación [título de la columna puntuación total en la hoja de cálculo " "exportada]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:600 msgid "Max [maximum score column title in exported spreadsheet]" msgstr "" "Máximo [título de la columna máxima puntuación en la hoja de cálculo " "exportada]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:604 msgid "max [maximum score row name in exported spreadsheet]" msgstr "" "máximo [nombre de las filas máxima puntuación en la hoja de cálculo " "exportada]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:606 msgid "mean [means of scores row name in exported spreadsheet]" msgstr "" "promedio [nombre de las filas puntuación promedio en la hoja de cálculo " "exportada]" #. TRANSLATORS: This is the default text to be written on the top of the first #. page of each paper when annotating. From this string, %s will be replaced #. with the student final mark, %m with the maximum mark he can obtain, %S #. with the student total score, and %M with the maximum score the student can #. obtain. #: ../AMC-perl/AMC/Config.pm:319 msgid "Mark: %s/%m (total score: %S/%M)" msgstr "Calificación: %s/%m (puntuación total: %S/%M)" #. TRANSLATORS: Subject of the emails which can be sent to the students to #. give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:344 msgid "Exam result" msgstr "Resultados del examen" #. TRANSLATORS: Body text of the emails which can be sent to the students to #. give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:346 msgid "" "Please find enclosed your annotated completed answer sheet.\n" "Regards." msgstr "" "Se adjunta su hoja de respuestas con las anotaciones.\n" " Saludos" #. TRANSLATORS: Message (first part) when some of the commands that are given #. in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:598 msgid "Some commands allowing to open documents can't be found:" msgstr "" "No se han encontrado algunos de los comandos que permiten abrir documentos:" #. TRANSLATORS: Message (second part) when some of the commands that are given #. in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:601 msgid "Please check its correct spelling and install missing software." msgstr "" "Por favor revise que esté bien escrito e instale el software que falta." #. TRANSLATORS: Message (third part) when some of the commands that are given #. in the preferences cannot be found. The %s will be replaced with the name #. of the menu entry "Preferences" and the name of the menu "Edit". #: ../AMC-perl/AMC/Config.pm:603 #, perl-format msgid "You can change used commands following %s from menu %s." msgstr "" "Usted puede cambiar los comandos que se usan siguiendo %s del menú " "%s." #. TRANSLATORS: "Preferences" menu #: ../AMC-perl/AMC/Config.pm:605 ../AMC-gui-main_window.glade:2706 msgid "Preferences" msgstr "Preferencias" #. TRANSLATORS: "Edit" menu #: ../AMC-perl/AMC/Config.pm:607 msgid "Edit" msgstr "Editar" #. TRANSLATORS: Error writing one of the configuration files (global or #. project). The first %s will be replaced with the path of that file, and the #. second with the error text. #: ../AMC-perl/AMC/Config.pm:841 #, perl-format msgid "Error writing configuration file %s: %s" msgstr "Error escribiendo el fichero de configuración %s: %s" #: ../AMC-perl/AMC/DataModule/association.pm:103 msgid "Fetching association results from old format XML files..." msgstr "" "Obteniendo resultados de asociaciones de los archivos con el formato XML " "antiguo... " #: ../AMC-perl/AMC/DataModule/capture.pm:210 msgid "Including zooms in the database..." msgstr "Incluyendo enfoques en la base de datos..." #: ../AMC-perl/AMC/DataModule/capture.pm:229 #: ../AMC-perl/AMC/DataModule/capture.pm:237 msgid "Building capture database indexes..." msgstr "Construyendo la captura de los índices de la base de datos..." #: ../AMC-perl/AMC/DataModule/capture.pm:279 msgid "Fetching data capture results from old format XML files..." msgstr "" "Obteniendo datos de captura desde archivos con el formato XML antiguo..." #: ../AMC-perl/AMC/DataModule/layout.pm:222 msgid "Building layout database indexes..." msgstr "" "Construyendo los índices de la base de datos de las posiciones de las cajas" #: ../AMC-perl/AMC/DataModule/layout.pm:288 msgid "Fetching layout data from old format XML files..." msgstr "" "Obteniendo los datos de layout de los archivos con el formato XML antiguo..." #: ../AMC-perl/AMC/DataModule/scoring.pm:256 msgid "Fetching scoring data from old format XML files..." msgstr "" "Obteniendo los datos de puntuación de los archivos con el formato XML " "antiguos..." #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the total number of sheets. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:236 msgid "ALL" msgstr "TODO" #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the number of sheets for which the question did not get an answer. Please #. let this label short. #: ../AMC-perl/AMC/Export/ods.pm:238 msgid "NA" msgstr "NA" #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the number of sheets for which the question got an invalid answer. Please #. let this label short. #: ../AMC-perl/AMC/Export/ods.pm:240 msgid "INVALID" msgstr "INVALIDO" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains the reference of the boxes. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:268 msgid "Box" msgstr "Casilla" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains the number of items (ticked boxes, or invalid or empty questions). #. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:271 msgid "Nb" msgstr "Nb" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains percentage of questions for which the corresponding box is ticked #. over all questions. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:274 msgid "/all" msgstr "/todos" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains percentage of questions for which the corresponding box is ticked #. over the expressed questions (counting only questions that did not get #. empty or invalid answers). Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:277 msgid "/expr" msgstr "/expr" #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the number of sheets for which the question got the "none of the above are #. correct" answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:305 msgid "NONE" msgstr "NINGUNO" #. TRANSLATORS: table name in the exported ODS spreadsheet for the table that #. contains the marks. #: ../AMC-perl/AMC/Export/ods.pm:883 ../AMC-perl/AMC/Gui/Notes.glade:8 msgid "Marks" msgstr "Notas" #. TRANSLATORS: Label of the table with questions basic statistics in the #. exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1310 msgid "Questions statistics" msgstr "Estadísticas de preguntas" #. TRANSLATORS: Label of the table with indicative questions basic statistics #. in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1317 msgid "Indicative questions statistics" msgstr "Preguntas estadísticas indicativas" #. TRANSLATORS: Label of the table with a legend (explaination of the colors #. used) in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1327 ../AMC-perl/AMC/Export/ods.pm:1331 msgid "Legend" msgstr "Leyenda" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that have not been asked to some students. #: ../AMC-perl/AMC/Export/ods.pm:1337 msgid "Non applicable" msgstr "No aplica" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that have not been answered. #: ../AMC-perl/AMC/Export/ods.pm:1341 msgid "No answer" msgstr "Sin respuesta" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that have not been answered, but are cancelled by the use #. of allowempty scoring strategy. #: ../AMC-perl/AMC/Export/ods.pm:1345 msgid "Cancelled" msgstr "Cancelado" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1349 msgid "Invalid answer" msgstr "Respuesta no válida" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1354 msgid "Correct answer" msgstr "Respuesta correcta" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1358 msgid "Wrong answer" msgstr "Respuesta incorrecta" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the indicative questions. #: ../AMC-perl/AMC/Export/ods.pm:1363 msgid "Indicative" msgstr "Indicativa" #: ../AMC-perl/AMC/Export/ods.pm:1391 msgid "" "An old state of the exported file seems to be already opened. Use " "File/Reload from OpenOffice/LibreOffice to refresh." msgstr "" "Una versión anterior del archivo exportado parece que ya esta abierto. Usa " "Archivo/Recargar desde OpenOffice/LibreOffice para refrescar." #: ../AMC-perl/AMC/Filter/plain.pm:92 msgid "" "Please code your student number opposite, and write your name in the box " "below." msgstr "" "Por favor introduzca su número de alumno y escriba su nombre en la casilla." #. TRANSLATORS: Message when the Pages option used in AMC-TXT can't be parsed. #. %s will be replaced with the option value #: ../AMC-perl/AMC/Filter/plain.pm:209 #, perl-format msgid "Pages option value can't be understood: %s" msgstr "No se entiende el valor de la opción de páginas: %s" #: ../AMC-perl/AMC/Filter/plain.pm:238 #, perl-format msgid "Line %d" msgstr "Línea %d" #. TRANSLATORS: Error text for AMC-TXT parsing, when opening a new question #. whereas the previous question has less than two choices #: ../AMC-perl/AMC/Filter/plain.pm:249 msgid "Previous question has less than two choices" msgstr "La pregunta anterior tiene menos de dos alternativas." #. TRANSLATORS: Error text for AMC-TXT parsing #: ../AMC-perl/AMC/Filter/plain.pm:258 #, perl-format msgid "Previous question is a simple question but has %d correct choice(s)" msgstr "La pregunta anterior es simple, pero tiene %d soluciones" #: ../AMC-perl/AMC/Filter/plain.pm:342 msgid "" "Invalid encoding: you must use UTF-8, but your source file was saved using " "another encoding" msgstr "" "Codificación no válida: debe utilizar UTF-8, pero el archivo de origen ha " "sido guardado usando otra codificación" #: ../AMC-perl/AMC/Filter/plain.pm:368 #, perl-format msgid "File not found: %s" msgstr "Archivo no encontrado: %s" #. TRANSLATORS: Error text for AMC-TXT parsing, when an unknown option is #. given a value #: ../AMC-perl/AMC/Filter/plain.pm:386 #, perl-format msgid "Unknown option: %s" msgstr "Opción desconocida: %s" #. TRANSLATORS: Error text for AMC-TXT parsing when a choice is given but no #. question were opened #: ../AMC-perl/AMC/Filter/plain.pm:456 msgid "Choice outside question" msgstr "Opción no corresponde a pregunta" #: ../AMC-perl/AMC/Filter/plain.pm:1240 #, perl-format msgid "" "The following fonts does not seem to be installed on the system: %s." msgstr "" "Las siguientes tipografías no están instaladas en el sistema: %s." #: ../AMC-perl/AMC/Filter/register.pm:78 msgid "No description available." msgstr "No hay una descripción disponible." #: ../AMC-perl/AMC/Gui/Association.pm:133 msgid "" "Names images not found... Maybe you forgot using \\namefield command in " "LaTeX source?" msgstr "" "La imágen de los nombres no se encontró. Tal vez usted olvidó usar el " "comando \\namefield en la fuente LaTeX" #: ../AMC-perl/AMC/Gui/Association.pm:690 msgid "Sheet" msgstr "Hoja" #: ../AMC-perl/AMC/Gui/Association.pm:728 msgid "End" msgstr "Fin" #: ../AMC-perl/AMC/Gui/Manuel.pm:117 msgid "Page layout" msgstr "Diseño de página" #: ../AMC-perl/AMC/Gui/Manuel.pm:125 msgid "Original" msgstr "Original" #: ../AMC-perl/AMC/Gui/Manuel.pm:126 ../AMC-gui-edit_preferences.glade:2138 msgid "Scan" msgstr "Escaneo" #. TRANSLATORS: This is one of the choices for pages navigation in manual data #. capture window. Here, navigation goes through all pages. Please keep this #. text very short (say less than 5 letters) so that the window is not too #. large #: ../AMC-perl/AMC/Gui/Manuel.pm:130 ../AMC-perl/AMC/Gui/Manuel.pm:146 msgid "all" msgstr "todo" #. TRANSLATORS: This is one of the choices for pages navigation in manual data #. capture window. Here, navigation goes through pages with some invalid #. answers. Please keep this text very short (say less than 5 letters) so that #. the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:132 msgid "inv" msgstr "inv" #. TRANSLATORS: This is one of the choices for pages navigation in manual data #. capture window. Here, navigation goes through pages with empty or invalid #. answers. Please keep this text very short (say less than 5 letters) so that #. the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:134 msgid "i&e" msgstr "inv&err" #: ../AMC-perl/AMC/Gui/Manuel.pm:184 msgid "page" msgstr "página" #: ../AMC-perl/AMC/Gui/Manuel.pm:531 #, perl-format msgid "" "This is a template exam that you cannot edit. To create a new exam from this" " one to be edited, use the '%s' button." msgstr "" "Este es un formato de examen que no se puede editar. Para crear un nuevo " "examen a partir de este formato una vez editado, usar el botón '%s'." #: ../AMC-perl/AMC/Gui/Manuel.pm:531 ../AMC-perl/AMC/Gui/Manuel.glade:406 msgid "Add photocopy" msgstr "Agregar fotocopia" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms #. window #: ../AMC-perl/AMC/Gui/Zooms.pm:76 msgid "drag and drop" msgstr "arrastrar y soltar" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms #. window #: ../AMC-perl/AMC/Gui/Zooms.pm:78 msgid "click" msgstr "clic" #: ../AMC-perl/AMC/Gui/Zooms.pm:126 ../AMC-perl/AMC/Gui/Zooms.pm:413 #, perl-format msgid "Boxes zooms for page %s" msgstr "Enfoque de casillas para la página %s" #: ../AMC-perl/AMC/Gui/Zooms.pm:402 ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "" "You moved some boxes to correct automatic data query, but this work is not " "saved yet." msgstr "" "Usted cambio algunas casillas para corregir el análisis automático, pero " "esto no ha sido guardado aún." #: ../AMC-perl/AMC/Gui/Zooms.pm:402 msgid "" "Do you want to save these modifications before looking at another page?" msgstr "¿Desea guardar estas modificaciones antes de ver otra página?" #: ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "Dou you really want to close and ignore these modifications?" msgstr "¿Desea cerrar e ignorar estas modificaciones?" #: ../AMC-perl/AMC/Print/cups.pm:71 #, perl-format msgid "Perl module(s) missing: %s" msgstr "Módulo(s) de Perl que falta(n): %s" #: ../AMC-perl/AMC/Print/cupslp.pm:47 #, perl-format msgid "The following commands are missing: %s." msgstr "Los siguientes comandos no se encuentran: %s." #: ../AMC-perl/AMC/Export/register/CSV.pm:70 msgid "Separator" msgstr "Separador" #: ../AMC-perl/AMC/Export/register/CSV.pm:83 msgid "Ticked boxes" msgstr "Casillas marcadas" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'No, don't group questions by scope in the exported ODS #. file' #: ../AMC-perl/AMC/Export/register/CSV.pm:89 #: ../AMC-perl/AMC/Export/register/ods.pm:124 msgid "No" msgstr "No" #: ../AMC-perl/AMC/Export/register/CSV.pm:90 #: ../AMC-perl/AMC/Export/register/CSV.pm:91 msgid "Yes:" msgstr "Si:" #: ../AMC-perl/AMC/Export/register/CSV.pm:97 #: ../AMC-perl/AMC/Export/register/ods.pm:152 msgid "Choose columns" msgstr "Elija columnas" #. TRANSLATORS: List of students with their scores: one of the export formats. #: ../AMC-perl/AMC/Export/register/List.pm:37 msgid "PDF list" msgstr "Lista de PDFs" #: ../AMC-perl/AMC/Export/register/List.pm:64 msgid "Number of columns" msgstr "Número de columnas" #: ../AMC-perl/AMC/Export/register/List.pm:67 msgid "Long list is divided into this number of columns on each page." msgstr "Lista larga dividida en este número de columnas por página." #: ../AMC-perl/AMC/Export/register/List.pm:71 msgid "Paper size" msgstr "Tamaño de papel" #. TRANSLATORS: Check button label in the exports tab. If checked, a table #. with questions basic statistics will be added to the ODS exported #. spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:82 msgid "Stats table" msgstr "Tabla de estadísticas" #. TRANSLATORS: Menu to export statistics table in the exports tab. The first #. menu entry means 'do not build a stats table' in the exported ODS file. You #. can omit the [...] part, that is here only to state the context. #: ../AMC-perl/AMC/Export/register/ods.pm:89 msgid "None [no stats table to export]" msgstr "Ninguno [no tabla de estadísticas que exportar]" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second #. menu entry means 'build a stats table, with a horizontal flow' in the #. exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:91 #: ../AMC-perl/AMC/Export/register/ods.pm:106 msgid "Horizontal flow" msgstr "Flujo horizontal" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second #. menu entry means 'build a stats table, with a vertical flow' in the #. exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:93 #: ../AMC-perl/AMC/Export/register/ods.pm:107 msgid "Vertical flow" msgstr "Flujo vertical" #. TRANSLATORS: Check button label in the exports tab. If checked, a table #. with indicative questions basic statistics will be added to the ODS #. exported spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:99 msgid "Indicative stats table" msgstr "Tabla de estadísticas indicativas" #: ../AMC-perl/AMC/Export/register/ods.pm:105 msgid "None" msgstr "Ninguno" #: ../AMC-perl/AMC/Export/register/ods.pm:110 msgid "" "Create a table with basic statistics about answers for each indicative " "question?" msgstr "" "Crear una tabla con las estadíticas básicas sobre respuestas para cada " "pregunta indicativa." #. TRANSLATORS: Check button label in the exports tab. If checked, sums of the #. scores for groups of questions will be added to the exported table. #: ../AMC-perl/AMC/Export/register/ods.pm:114 msgid "Score groups" msgstr "Calificación de los grupos" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'Yes, group questions by scope in the exported ODS file, and #. report total scores' #: ../AMC-perl/AMC/Export/register/ods.pm:126 msgid "Yes (values)" msgstr "Sí (valores)" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'Yes, group questions by scope in the exported ODS file, and #. report total scores as percentages.' #: ../AMC-perl/AMC/Export/register/ods.pm:128 msgid "Yes (percentages)" msgstr "Sí (porcentajes)" #: ../AMC-perl/AMC/Export/register/ods.pm:131 msgid "Add sums of the scores for each question group?" msgstr "¿Añado la suma de las puntuaciones para cada grupo de cuestiones?" #: ../AMC-perl/AMC/Export/register/ods.pm:134 msgid "with scope separator" msgstr "con separador de scope" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'No, don't group questions by scope in the exported ODS #. file' #: ../AMC-perl/AMC/Export/register/ods.pm:141 msgid "':'" msgstr "':'" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'Yes, group questions by scope in the exported ODS file, and #. you can detect the scope from a question ID using the text before the #. separator .' #: ../AMC-perl/AMC/Export/register/ods.pm:143 msgid "'.'" msgstr "'.'" #: ../AMC-perl/AMC/Export/register/ods.pm:146 msgid "" "To define groups, use question ids in the form \"group:question\" or " "\"group.question\", depending on the scope separator." msgstr "" "Para definir grupos, use identificadores de cuestiones de la forma " "\"grupo:cuestión\" o \"grupo.cuestión\", dependiendo del separador de scope." #: ../AMC-perl/AMC/Filter/register/latex.pm:54 msgid "" "This is the native format for AMC. LaTeX is not so easy to use for unexperienced users, but the LaTeX power allows the user to build any multiple choice subject. As an example, the following is possible with LaTeX but not with other formats:\n" "* any kind of layout,\n" "* questions with random numerical values,\n" "* use of figures, mathematical formulas\n" "* and much more!" msgstr "" "Este es el formato nativo de AMC. LaTeX no es fácil para usuarios con poca experiencia, pero el poder de LaTeX nos permite hacer preguntas de opciones múltiple. Como ejemplo, lo siguientes es posible hacer con LaTeX pero no con otros formatos:\n" "* cualquier tipo de layout,\n" "* preguntas con valores númericos aleatorios,\n" "* uso de figuras y formulas matemáticas,\n" "* y mucho más!" #: ../AMC-perl/AMC/Filter/register/plain.pm:51 msgid "" "This is a plain text format for easy question writting. See the following minimal example:\n" "\n" "Title: Paper title\n" "\n" "* Which is the capital city of Cameroon?\n" "+ Yaounde\n" "- Douala\n" "- Kribi" msgstr "" "Este es un archivo de texto plano para escribir preguntas. Por favor vea el siguiente ejemplo mínimo:\n" "\n" "Title: Titulo de la Prueba\n" "\n" "* Cual es la capital de Cameroon?\n" "+ Yaounde\n" "- Douala\n" "- Kribi" #: ../AMC-gui-apropos.glade:8 msgid "AMC A propos" msgstr "AMC acerca de..." #: ../AMC-gui-apropos.glade:17 msgid "" "Copyright (C) 2008-2018\n" "Alexis Bienvenüe and the AMC development team" msgstr "" "Copyright (C) 2008-2018\n" "Alexis Bienvenüe y el equipo de desarrollo de AMC " #: ../AMC-gui-apropos.glade:19 msgid "Automatic multiple choice questionnaires management" msgstr "Administración de cuestionarios de opciones múltiples" #: ../AMC-gui-apropos.glade:21 msgid "Visit the AMC website" msgstr "Visite la página web de AMC" #: ../AMC-gui-choix_pages_impression.glade:33 msgid "Papers printing" msgstr "Imprimiendo pruebas" #: ../AMC-gui-choix_pages_impression.glade:98 msgid "Please select papers you wish to print:" msgstr "Por favor seleccionar las pruebas que desea imprimir:" #: ../AMC-gui-choix_pages_impression.glade:116 msgid "Select papers you wish to print (ctrl-a for all), then confirm..." msgstr "" "Seleccione las pruebas que usted desea imprimir (ctrl-a para todas), luego " "confirme..." #: ../AMC-gui-choix_pages_impression.glade:144 msgid "Answer sheet printing" msgstr "Imprimiendo hojas de respuesta" #: ../AMC-gui-choix_pages_impression.glade:190 msgid "Printer:" msgstr "Impresora:" #: ../AMC-gui-choix_pages_impression.glade:243 msgid "two-side printing" msgstr "impresión por ambos lados" #: ../AMC-gui-choix_pages_impression.glade:319 msgid "printing options" msgstr "Opciones de impresión" #: ../AMC-gui-choix_pages_impression.glade:343 msgid "Destination directory" msgstr "Directorio destino" #: ../AMC-gui-choix_pages_impression.glade:356 msgid "Select destination directory for printable files" msgstr "Seleccione el directorio destino para los archivos imprimibles" #: ../AMC-gui-choix_postcorrect.glade:20 msgid "Post-correction" msgstr "Post-corrección" #: ../AMC-gui-choix_postcorrect.glade:95 msgid "" "Please enter the teacher score sheet number and copy number to get the " "correct answers from:" msgstr "" "Por favor, ingrese el número de hoja de calificación del profesor y copie el" " número para obtener las respuestas correctas de:" #: ../AMC-gui-choix_postcorrect.glade:189 msgid "Guess simple/multiple status" msgstr "Estime el estado simple/múltiple" #: ../AMC-gui-choix_postcorrect.glade:194 msgid "" "Sets type of all questions for which 2 or more answers are ticked on the " "teacher answer sheet to multiple" msgstr "" "Establece el tipo de todas las preguntas para las cuales 2 o más respuestas " "están marcadas en la hoja de respuestas del profesor como múltiples" #: ../AMC-gui-choix_projet.glade:18 msgid "Open a MC project" msgstr "Abrir un proyecto MC" #: ../AMC-gui-choix_projet.glade:61 ../AMC-gui-liste_dialog.glade:91 msgid "Cancel" msgstr "Cancelar" #: ../AMC-gui-choix_projet.glade:104 ../AMC-gui-main_window.glade:2665 msgid "New project" msgstr "Nuevo proyecto" #: ../AMC-gui-choix_projet.glade:163 msgid "Rename" msgstr "Renombrar" #: ../AMC-gui-choix_projet.glade:182 msgid "Clone" msgstr "Clon" #: ../AMC-gui-choix_projet.glade:278 msgid "Open an existing MC project:" msgstr "Abrir un proyecto MC existente:" #: ../AMC-gui-choix_projet.glade:345 msgid "Create an new project:" msgstr "Crear un proyecto nuevo:" #: ../AMC-gui-choix_projet.glade:364 msgid "Project name:" msgstr "Nombre del proyecto:" #: ../AMC-gui-choix_projet.glade:398 msgid "" "Note : a project name can only contain alphanumeric characters, plus " "some simple characters (-_+.:)." msgstr "" "Nota : el nombre de un proyecto solo puede contener caracteres o los " "símbolos \"-_+.:\"" #: ../AMC-gui-choose-mode.glade:10 msgid "" "Before starting data capture, please choose the mode corresponding to what " "you did with the printed questions." msgstr "" "Antes de iniciar la captura de datos, por favor elija el modo que " "corresponda a lo que usted hizo con las preguntas impresas." #: ../AMC-gui-choose_columns.glade:8 msgid "Choose columns to export" msgstr "Elija las columnas a exportar" #: ../AMC-gui-choose_columns.glade:65 msgid "Order and select the columns to include in the exported file:" msgstr "Ordenar y seleccionar las columnas para incluir el archivo exportado:" #: ../AMC-gui-choose_students.glade:13 msgid "Choose students" msgstr "Elegir los alumnos" #: ../AMC-gui-choose_students.glade:70 msgid "Select the students for which you want to annotate the score sheet:" msgstr "" "Seleccione los alumnos a los que usted desea hacer anotaciones en sus " "pruebas:" #: ../AMC-gui-choose_students.glade:114 msgid "Search:" msgstr "Buscar:" #: ../AMC-gui-cleanup.glade:13 ../AMC-gui-main_window.glade:2939 msgid "Cleanup" msgstr "Limpiar" #: ../AMC-gui-cleanup.glade:40 msgid "Remove selected files" msgstr "Eliminar los archivos elegidos" #: ../AMC-gui-cleanup.glade:71 msgid "" "To save disk space, you can remove some intermediate files from your project" " directory." msgstr "" "Para ahorrar espacio en disco, usted puede eliminar algunos archivos " "intermedios en su carpeta del proyecto." #: ../AMC-gui-edit_preferences.glade:230 ../AMC-gui-edit_preferences.glade:243 msgid "LaTeX models directory" msgstr "Directorio de modelos LaTeX" #: ../AMC-gui-edit_preferences.glade:232 msgid "" "Please select a directory containing LaTeX models for AMC, with their " "descriptions" msgstr "" "Por favor seleccionar un directorio conteniendo los modelos LaTeX para AMC " "con sus descripciones" #: ../AMC-gui-edit_preferences.glade:255 msgid "" "Projects directory. May be modified only if there are no opened projects." msgstr "" "Directorio de proyectos. Puede ser modificado solo si no hay proyectos " "abiertos." #: ../AMC-gui-edit_preferences.glade:257 msgid "Please select the projects directory" msgstr "Por favor seleccionar el directorio de proyectos" #: ../AMC-gui-edit_preferences.glade:268 msgid "Projects directory" msgstr "Directorio de Proyectos" #: ../AMC-gui-edit_preferences.glade:283 msgid "Directories" msgstr "Directorios" #: ../AMC-gui-edit_preferences.glade:315 msgid "PDF files" msgstr "Archivos PDF" #: ../AMC-gui-edit_preferences.glade:326 msgid "Images" msgstr "Imágenes" #: ../AMC-gui-edit_preferences.glade:337 msgid "CSV data files" msgstr "Archivos de datos CSV" #: ../AMC-gui-edit_preferences.glade:348 msgid "OpenOffice files" msgstr "Archivos OpenOffice" #: ../AMC-gui-edit_preferences.glade:359 msgid "XML files" msgstr "Archivos XML" #: ../AMC-gui-edit_preferences.glade:370 msgid "Command to edit LaTeX files" msgstr "Comando para editar archivos LaTeX" #: ../AMC-gui-edit_preferences.glade:371 msgid "LaTeX editor" msgstr "Editor LaTeX" #: ../AMC-gui-edit_preferences.glade:382 msgid "Plain text editor" msgstr "Editor de texto plano" #: ../AMC-gui-edit_preferences.glade:393 msgid "" "Command for directory browsing (string %d will be replaced by the directory " "path before execution)" msgstr "" "Comando para explorar los directorios (%d será reemplazado por la tura del " "directorio antes de ejecución)" #: ../AMC-gui-edit_preferences.glade:394 msgid "File browser" msgstr "Navegador de archivos" #: ../AMC-gui-edit_preferences.glade:405 msgid "Web browser" msgstr "Navegador web" #: ../AMC-gui-edit_preferences.glade:534 msgid "Visualisation commands" msgstr "Comandos de visualización" #: ../AMC-gui-edit_preferences.glade:565 msgid "Default LaTeX engine" msgstr "Motor LaTeX por omisión" #: ../AMC-gui-edit_preferences.glade:576 msgid "" "Default command to compile LaTeX file and make PDF, PS or DVI output (may be" " changed for each project)." msgstr "" "Comando por omisión para compilar el archivo LaTeX y generar PDF, PS o DVI. " "Esto puede ser cambiado para cada proyecto." #: ../AMC-gui-edit_preferences.glade:599 msgid "External programs" msgstr "Aplicaciones externas" #: ../AMC-gui-edit_preferences.glade:631 #: ../AMC-gui-edit_preferences.glade:4238 msgid "Students list charset" msgstr "codificación de la lista de alumnos" #: ../AMC-gui-edit_preferences.glade:642 msgid "CSV charset" msgstr "Codificación CSV" #: ../AMC-gui-edit_preferences.glade:653 msgctxt "" "option name. Refers to a list of headers that may contain surnames in the " "CSV names list" msgid "CSV surname headers" msgstr "encabezado de \"apellidos\" en CSV" #: ../AMC-gui-edit_preferences.glade:664 msgctxt "" "option name. Refers to a list of headers that may contain names in the CSV " "names list." msgid "CSV name headers" msgstr "encabezado de \"nombres\" en CSV" #: ../AMC-gui-edit_preferences.glade:675 msgid "LaTeX files charset" msgstr "codificación LaTeX" #: ../AMC-gui-edit_preferences.glade:686 msgid "Default encoding for the students list file." msgstr "Codificación por omisión del archivo de alumnos " #: ../AMC-gui-edit_preferences.glade:705 msgid "Default charset for AMC CSV output." msgstr "Codificación por omisión para archivos CSV generados por AMC." #: ../AMC-gui-edit_preferences.glade:724 msgid "" "Comma separated list of CSV headers of columns that may contain the surnames" " of the students in the names list file." msgstr "" "Lista CSV de encabezados que puede contener los apellidos de los alumons del" " archivo de nombres." #: ../AMC-gui-edit_preferences.glade:738 msgid "" "Comma separated list of CSV headers of columns that may contain the names of" " the students in the names list file." msgstr "" "Lista CSV de encabezados que puede contener los nombres de los alumons del " "archivo de nombres." #: ../AMC-gui-edit_preferences.glade:752 msgid "Charset used when producing LaTeX files from models." msgstr "Codificación de archivos LaTeX de plantillas." #: ../AMC-gui-edit_preferences.glade:769 msgid "Decimal delimiter" msgstr "Delimitador decimal" #: ../AMC-gui-edit_preferences.glade:797 msgid "ASCII filenames" msgstr "Nombre de archivos ASCII" #: ../AMC-gui-edit_preferences.glade:809 msgid "" "Force all annotated completed student sheets to have only ASCII characters " "in their file names. When set, all non-ASCII characters will be replaced by " "underscores." msgstr "" "Forzar a que todas las hojas anotadas de los alumons solo usen caracteres " "ASCII. Cuando esté seleccionado, todos los caracteres que no sean ASCII " "serán reemplazados por el caractér \"_\"." #: ../AMC-gui-edit_preferences.glade:821 msgid "Accept non-ASCII project names" msgstr "Aceptar nombres de proyectos con caracteres no ASCII" #: ../AMC-gui-edit_preferences.glade:848 msgid "Internationalization" msgstr "Internacionalización" #: ../AMC-gui-edit_preferences.glade:880 msgid "Printing method" msgstr "Método de impresión" #: ../AMC-gui-edit_preferences.glade:891 msgid "Printing command" msgstr "Comando de impresión" #: ../AMC-gui-edit_preferences.glade:913 msgid "Useful printing options" msgstr "Opciones de impresión útiles" #: ../AMC-gui-edit_preferences.glade:941 msgid "" "Command to print one paper (with stapling). String %f will be replaced by " "the PDF file to be printed." msgstr "" "Comando para imprimir una página, con corcheteo. \"%f\" será reemplazado " "por el archivo PDF que se imprimirá." #: ../AMC-gui-edit_preferences.glade:984 msgid "Printing" msgstr "Imprimir" #: ../AMC-gui-edit_preferences.glade:1016 msgid "Number of processes" msgstr "Número de procesos" #: ../AMC-gui-edit_preferences.glade:1027 msgid "" "Number of processes to be run in parallel. Default value is 0, which allows " "to start as many processes as processors." msgstr "" "Número de procesos que pueden correr en paralelo. El valor por omisión es " "0, lo cual permite tener tantos procesos como procesadores." #: ../AMC-gui-edit_preferences.glade:1044 msgid "System" msgstr "Sistema" #: ../AMC-gui-edit_preferences.glade:1065 msgid "Main" msgstr "Principal" #: ../AMC-gui-edit_preferences.glade:1094 ../AMC-gui-main_window.glade:2771 msgid "Solution" msgstr "Solución" #: ../AMC-gui-edit_preferences.glade:1110 ../AMC-gui-main_window.glade:2783 msgid "Individual solution" msgstr "Solución individual" #: ../AMC-gui-edit_preferences.glade:1125 ../AMC-gui-main_window.glade:2759 msgid "Catalog" msgstr "Catálogo" #: ../AMC-gui-edit_preferences.glade:1147 msgid "Optional working documents to build" msgstr "Documentos de trabajo opcionales para construir" #: ../AMC-gui-edit_preferences.glade:1170 ../AMC-gui-main_window.glade:394 msgid "Documents" msgstr "Documentos" #: ../AMC-gui-edit_preferences.glade:1213 msgid "Limit MSE" msgstr "Umbral ECM (Error cuadrático medio)" #: ../AMC-gui-edit_preferences.glade:1224 msgid "Limit sensitivity" msgstr "Umbral de sensibilidad" #: ../AMC-gui-edit_preferences.glade:1265 msgid "Colouring thresholds" msgstr "Umbral de colores" #: ../AMC-gui-edit_preferences.glade:1299 msgid "No answers color" msgstr "Color para no respuestas" #: ../AMC-gui-edit_preferences.glade:1310 msgid "Invalid answers color" msgstr "Color de las repuestas no válidas" #: ../AMC-gui-edit_preferences.glade:1347 msgid "Scan view" msgstr "Vista de escaneo" #: ../AMC-gui-edit_preferences.glade:1379 msgid "Maximum density for manual data capture question paper rendering (DPI)" msgstr "" "Máxima densidad, en DPI, para la captura manual de las hojas con preguntas. " #: ../AMC-gui-edit_preferences.glade:1380 msgid "Manual capture density (DPI)" msgstr "Densidad, en DPI, para captura manual." #: ../AMC-gui-edit_preferences.glade:1391 msgid "Image type" msgstr "Tipo de imágen" #: ../AMC-gui-edit_preferences.glade:1402 msgid "Remember window size" msgstr "Recordar tamaño de ventana" #. Label in the preferences window, corresponding to "Starting number of #. columns for names in the manual association window". #: ../AMC-gui-edit_preferences.glade:1413 msgid "Number of columns for names" msgstr "Número de columnas para los nombres" #. Label in the preferences window, corresponding to the "Number of columns #. for zoomed boxes in the zooms window (opened from the Diagnosis list in the #. Data capture tab)". #: ../AMC-gui-edit_preferences.glade:1424 msgid "Number of columns for zoomes boxes" msgstr "Número de columnas para acercamiento de las casillas" #: ../AMC-gui-edit_preferences.glade:1448 msgid "" "Temporary file type used for manual data capture. Fastest choice is (none), " "but this seems to be problematic in some environments." msgstr "" "Tipo de archivo temporal usado para captura manual. La opción más rápida es " "'ninguno' pero genera problemas en algunos ambientes." #: ../AMC-gui-edit_preferences.glade:1467 msgid "Do you want to keep the same window size each time you start AMC?" msgstr "" "¿Realmente desea mantener el mismo tamaño de ventana cada vez que inicia " "AMC?" #: ../AMC-gui-edit_preferences.glade:1480 msgid "Starting number of columns for names in the manual association window." msgstr "" "Número en que inician las columnas para los nombres en la ventana de " "asociación manual." #: ../AMC-gui-edit_preferences.glade:1497 msgid "" "Number of columns for zoomed boxes in the zooms window (opened from the " "Diagnosis list in the Data capture tab)." msgstr "" "Número de columnas para acercamiento de casillas en la ventana de " "acercamientos, abierto desde la lista de diagnóstico en la sección de " "captura de datos." #: ../AMC-gui-edit_preferences.glade:1518 msgid "Miscellaneous" msgstr "Misceláneo" #: ../AMC-gui-edit_preferences.glade:1549 msgid "Notify the user at the end of the following actions:" msgstr "Notificar al usuario al final de las siguientes acciones:" #. One of the "notify the user at the end of the following actions" checkbox: #. for documents update. #: ../AMC-gui-edit_preferences.glade:1568 msgid "Documents update" msgstr "Actualización de documentos" #. One of the "notify the user at the end of the following actions" checkbox: #. for computing marks. #: ../AMC-gui-edit_preferences.glade:1600 msgid "Grading" msgstr "Calificar" #. One of the "notify the user at the end of the following actions" checkbox: #. for completed answer sheets annotation. #: ../AMC-gui-edit_preferences.glade:1616 #: ../AMC-gui-edit_preferences.glade:3137 msgid "Annotation" msgstr "Anotaciones" #: ../AMC-gui-edit_preferences.glade:1641 msgid "Notify using:" msgstr "Notifiqueme utilizando:" #: ../AMC-gui-edit_preferences.glade:1660 msgid "Desktop notifications" msgstr "Notificaciones de escritorio" #: ../AMC-gui-edit_preferences.glade:1696 msgid "Command:" msgstr "Comandos:" #: ../AMC-gui-edit_preferences.glade:1708 msgid "" "Command that will be called as a user notification. %m will be replaced by " "AMC's message, and %a by AMC completed action." msgstr "" "El comando será llamado notificación de usuario. %m será reemplazado por el " "mensaje AMC y %a por la acción AMC se realizó." #: ../AMC-gui-edit_preferences.glade:1737 msgid "Notifications" msgstr "Notificaciones" #: ../AMC-gui-edit_preferences.glade:1761 msgid "Display" msgstr "Despliegue" #: ../AMC-gui-edit_preferences.glade:1804 msgid "Vector formats density (DPI)" msgstr "Densidad, en DPI, de los formatos vectoriales" #: ../AMC-gui-edit_preferences.glade:1815 msgid "Black&white conversion threshold" msgstr "Umbral para conversión blanco y negro" #: ../AMC-gui-edit_preferences.glade:1826 msgid "Erease red from scans" msgstr "Borrar rojo de los escaneos" #: ../AMC-gui-edit_preferences.glade:1837 msgid "Force conversion" msgstr "Forzar conversión" #: ../AMC-gui-edit_preferences.glade:1848 msgid "" "Density used when converting vector format scans (PDF, EPS) into bitmap." msgstr "" "Densidad usada cuando se convierte un formato vectorial (PDF, EPS) a un mapa" " de bits." #: ../AMC-gui-edit_preferences.glade:1863 msgid "" "Threshold used when converting scans to black and white. Value 0.0 means all" " white, value 1.0 means all black." msgstr "" "Umbral que se usará cuando convierta escaneos a blanco y negro. Un valor de" " 0.0 significa que todo será blanco y un valor de 1.0 significa que todo " "será negro." #: ../AMC-gui-edit_preferences.glade:1881 msgid "" "When set, AMC will erease red color from the color scans before automatic " "data capture. This can be useful if the boxes are drawn in red." msgstr "" "Cuando definido, AMC borrará el color rojo de los escanes antes de iniciar " "la captura automática de datos. Esto puede ser útil cuando las casillas " "están dibujadas en rojo." #: ../AMC-gui-edit_preferences.glade:1896 msgid "" "With this option, all scan files will be converted with ImageMagick. This " "can slow down scans processing, but may allow some unusual file formats to " "be processed successfully." msgstr "" "Con esta opción, todos los archivos digitalizados serán convertidos con " "ImageMagick. Esto puede provocar que el proceso de digitalización sea lento." " Pero, permitiría que algunos formatos de archivo poco usuales se procesen " "exitosamente." #: ../AMC-gui-edit_preferences.glade:1913 msgid "Scans conversion" msgstr "Conversión de escaneos" #: ../AMC-gui-edit_preferences.glade:1945 msgid "Marks size max increase" msgstr "Máximo aumento de tamaño de marcas" #: ../AMC-gui-edit_preferences.glade:1956 msgid "Marks size max decrease" msgstr "Máxima disminución de tamaño de marcas" #: ../AMC-gui-edit_preferences.glade:1967 #: ../AMC-gui-edit_preferences.glade:2490 msgid "Can be customized on a per-project basis in the Project tab." msgstr "Puede ser customizado en para cada proyecto en la pestaña 'Proyecto'." #: ../AMC-gui-edit_preferences.glade:1968 msgid "Default darkness threshold" msgstr "Umbral oscuro (por omisión)" #: ../AMC-gui-edit_preferences.glade:1979 msgid "Default upper darkness threshold" msgstr "Umbral oscuro superior (por omisión) " #: ../AMC-gui-edit_preferences.glade:1990 msgid "" "Proportion of the box (on the scan) that is measured to compute its " "blackness." msgstr "Proporción de la casilla que se media para calcular su oscuridad." #: ../AMC-gui-edit_preferences.glade:1991 msgid "Measured box proportion" msgstr "Proporción medida en la casilla" #: ../AMC-gui-edit_preferences.glade:2002 msgid "Process scans with 3 corner marks" msgstr "Procesado de escaneos con 3 marcas en las esquinas" #: ../AMC-gui-edit_preferences.glade:2013 msgid "" "Maximum increase (proportion: 0.1 means 10%) allowed for corner marks after " "printing/scanning process." msgstr "" "Máximo aumento (0.1 = 10%) permitido para las marcas de esquinas después del" " proceso de impresión y escaneo." #: ../AMC-gui-edit_preferences.glade:2030 msgid "" "Maximum decrease (proportion: 0.1 means 10%) allowed for corner marks after " "printing/scanning process." msgstr "" "Máxima disminución (0.1 = 10%) permitido para las márcas de las esquinas " "después del proceso de impresión y escaneo." #: ../AMC-gui-edit_preferences.glade:2047 msgid "" "If black proportion is greater than this value, the box will be considered " "as beeing ticked. This is a default value, it can be changed in each " "project." msgstr "" "Si la parte negra es mayor que este valor, la casilla se considera marcada. " "Este es el valor por omisión, pero puede ser cambiado en cada proyecto." #: ../AMC-gui-edit_preferences.glade:2093 msgid "Do you want to process scans with 3 corner circles only?" msgstr "¿Quiere procesar escaneos con sólo 3 círculos en las esquinas?" #: ../AMC-gui-edit_preferences.glade:2110 msgid "Detection parameters" msgstr "Parametros de detección" #: ../AMC-gui-edit_preferences.glade:2166 msgid "" "These options are used when creating a new project. See the project tab for " "more details." msgstr "" "Estas opciones se usan cuando se crea un nuevo proyecto. Vea la pestaña de " "proyecto para más detalles." #: ../AMC-gui-edit_preferences.glade:2173 #: ../AMC-gui-edit_preferences.glade:3760 msgid "Minimal mark" msgstr "Nota mínima" #: ../AMC-gui-edit_preferences.glade:2184 #: ../AMC-gui-edit_preferences.glade:3771 msgid "Floor mark" msgstr "Nota base" #: ../AMC-gui-edit_preferences.glade:2195 #: ../AMC-gui-edit_preferences.glade:3782 msgid "Maximal mark" msgstr "Nota máxima" #: ../AMC-gui-edit_preferences.glade:2206 #: ../AMC-gui-edit_preferences.glade:3793 msgid "Grain" msgstr "Granularidad" #: ../AMC-gui-edit_preferences.glade:2217 #: ../AMC-gui-edit_preferences.glade:3804 msgid "Rounding type" msgstr "Tipo de redondeo" #: ../AMC-gui-edit_preferences.glade:2272 #: ../AMC-gui-edit_preferences.glade:3891 msgid "ceil" msgstr "limite superior" #: ../AMC-gui-edit_preferences.glade:2312 msgid "Default marking options" msgstr "Opciones de puntuación por defecto" #: ../AMC-gui-edit_preferences.glade:2329 ../AMC-gui-main_window.glade:1943 msgid "Marking" msgstr "Nota" #: ../AMC-gui-edit_preferences.glade:2372 msgid "Max size" msgstr "Tamaño máximo" #: ../AMC-gui-edit_preferences.glade:2383 msgid "Image format" msgstr "Formato de imagen" #: ../AMC-gui-edit_preferences.glade:2394 msgid "JPEG quality" msgstr "Calidad JPEG" #: ../AMC-gui-edit_preferences.glade:2454 msgid "Scans" msgstr "Escaneos" #: ../AMC-gui-edit_preferences.glade:2492 msgid "Default header text" msgstr "Encabezado por omisión" #: ../AMC-gui-edit_preferences.glade:2513 #: ../AMC-gui-edit_preferences.glade:3976 msgid "" "Text to be written on annotated sheets header. Use %S for score, %M for max " "score, %s for grade, %m for max grade, and %(col) for content of the column " "col in the students list file." msgstr "" "Texto que se escribirá en el encabezado de las pruebas con anotaciones. Use" " %S para puntuación, %M puntuación máxima, %s para nota, %m para nota máxima" " y %(col) para el contenido de la columna 'col' en el archivo con listado de" " estudiantes." #: ../AMC-gui-edit_preferences.glade:2553 msgid "Default writing direction" msgstr "Dirección de escritura por omisión" #: ../AMC-gui-edit_preferences.glade:2564 msgid "Default questions annotation" msgstr "Anotación de preguntas por omisión" #: ../AMC-gui-edit_preferences.glade:2575 msgid "Default cancelled questions annotation" msgstr "Anotación de preguntas canceladas, por omisión" #: ../AMC-gui-edit_preferences.glade:2585 #: ../AMC-gui-edit_preferences.glade:4050 msgid "right to left" msgstr "derecha a izquierda" #: ../AMC-gui-edit_preferences.glade:2639 msgid "Header" msgstr "Encabezado" #: ../AMC-gui-edit_preferences.glade:2671 msgid "Significant digits" msgstr "Número de digitos significativos" #: ../AMC-gui-edit_preferences.glade:2682 msgid "" "Number of significant digits to display for marks when annotating papers." msgstr "" "Número de digitos significaticos para desplegar en las notas cuando haciendo" " anotaciones en pruebas." #: ../AMC-gui-edit_preferences.glade:2703 msgid "Marks" msgstr "Notas" #: ../AMC-gui-edit_preferences.glade:2740 msgid "Line width" msgstr "Ancho de línea" #: ../AMC-gui-edit_preferences.glade:2751 msgid "Font" msgstr "Fuente" #: ../AMC-gui-edit_preferences.glade:2762 msgid "Marks shift" msgstr "Desplazamiento" #: ../AMC-gui-edit_preferences.glade:2803 msgid "" "When marks are written on annotated papers left to the boxes, shifts to the " "left marks by this value. You can use mm or in as a unit." msgstr "" "Cuando las marcas se escriben en los exámenes anotados a la izquierda de las" " casillas, desplaza hacia la izquierda las marcas este valor. Se puede " "utilizar en mm o pulgadas como una unidad." #: ../AMC-gui-edit_preferences.glade:2832 msgid "To be ticked" msgstr "Para ser marcado" #: ../AMC-gui-edit_preferences.glade:2844 msgid "Ticked" msgstr "Marcado" #: ../AMC-gui-edit_preferences.glade:2856 msgid "type" msgstr "tipo" #: ../AMC-gui-edit_preferences.glade:2868 msgid "colour" msgstr "color" #: ../AMC-gui-edit_preferences.glade:2880 #: ../AMC-gui-edit_preferences.glade:2891 #: ../AMC-gui-edit_preferences.glade:2924 #: ../AMC-gui-edit_preferences.glade:2946 msgid "no" msgstr "no" #: ../AMC-gui-edit_preferences.glade:2902 #: ../AMC-gui-edit_preferences.glade:2913 #: ../AMC-gui-edit_preferences.glade:2935 #: ../AMC-gui-edit_preferences.glade:2957 msgid "yes" msgstr "si" #: ../AMC-gui-edit_preferences.glade:3088 msgid "Also annotate informative questions" msgstr "También anotar preguntas informativas" #: ../AMC-gui-edit_preferences.glade:3110 msgid "Symbols" msgstr "Símbolos" #: ../AMC-gui-edit_preferences.glade:3185 msgid "Sender email" msgstr "Correo de quién envía" #: ../AMC-gui-edit_preferences.glade:3196 msgid "Carbon copy address" msgstr "Copia al carbón de la dirección" #: ../AMC-gui-edit_preferences.glade:3207 msgid "Blind Carbon copy address" msgstr "Copia al carbón oculta de la dirección" #: ../AMC-gui-edit_preferences.glade:3260 msgid "Delay between sendings" msgstr "Demora entre envíos" #: ../AMC-gui-edit_preferences.glade:3295 msgid "Mail delivery method:" msgstr "Método de despacho de correo:" #: ../AMC-gui-edit_preferences.glade:3337 msgid "sendmail path" msgstr "sendmail" #: ../AMC-gui-edit_preferences.glade:3373 msgid "SMTP host" msgstr "SMTP" #: ../AMC-gui-edit_preferences.glade:3384 msgid "SMTP port" msgstr "puerto SMTP" #: ../AMC-gui-edit_preferences.glade:3424 msgid "SMTP security" msgstr "Seguridad SMTP" #: ../AMC-gui-edit_preferences.glade:3435 msgid "SMTP user" msgstr "Usuario SMTP" #: ../AMC-gui-edit_preferences.glade:3472 msgid "SMTP password" msgstr "Clave SMTP" #: ../AMC-gui-edit_preferences.glade:3509 msgid "Sending emails" msgstr "Enviando correos electrónicos" #: ../AMC-gui-edit_preferences.glade:3546 msgid "Default subject" msgstr "Título del correo por omisión" #: ../AMC-gui-edit_preferences.glade:3588 msgid "Default content" msgstr "Contenido por omisión" #: ../AMC-gui-edit_preferences.glade:3612 msgid "Email" msgstr "Correo electrónico" #: ../AMC-gui-edit_preferences.glade:3638 msgid "Project preferences" msgstr "Preferencias del proyecto" #: ../AMC-gui-edit_preferences.glade:3670 msgid "Darkness threshold" msgstr "umbral de oscuridad" #: ../AMC-gui-edit_preferences.glade:3681 msgid "" "If black proportion is greater than this value, the box will be considered " "as beeing ticked. If students have been told to darken the boxes entirely, " "one can choose value 0.5. If students have been told to tick the boxes, " "values around 0.15 seems appropriate." msgstr "" "Si la proporción de negro es mayor que este valor, la casilla se considerará" " como marcada. Si a los alumnos se le ha dicho que deben oscurecer la " "casilla completamente uno puede escoger un valor de 0.5. Si a los alumnos " "se les ha dicho que deben marcar las cajas con una \"x\", se debe elegir un " "valor cercano a 0.15." #: ../AMC-gui-edit_preferences.glade:3697 msgid "Upper darkness threshold" msgstr "Umbral oscuro superior" #: ../AMC-gui-edit_preferences.glade:3708 msgid "" "If black proportion is greater than this value, the box is considered as not" " ticked. Setting this threshold to a value less than one allows the students" " to cancel ticked boxes by filling them completely." msgstr "" "Si la proporción de negro es mayor que este valor, la casilla se considera " "que no está señalada. Definiendo este umbral a un valor menor que uno " "permite al estudiante anular casillas señaladas rellenándolas completamente." #: ../AMC-gui-edit_preferences.glade:3728 msgid "Automatic data capture" msgstr "Captura automática de datos" #: ../AMC-gui-edit_preferences.glade:3815 msgid "Mark associated with null score" msgstr "Nota asociada con una puntuación nula" #: ../AMC-gui-edit_preferences.glade:3829 msgid "" "Floor mark: any exam with a global mark less than this value will be given " "this mark. Let empty for no floor mark." msgstr "" "Nota base: cualquier hoja con una puntuación global menor a este valor " "tenrá este valor. Deje vacío si no desea tener una nota base." #: ../AMC-gui-edit_preferences.glade:3879 msgid "" "Mark to be given to a perfect sheet with all good answers (scaling the " "marks). Value 0 meens that you don't want to scale the marks." msgstr "" "Nota que se da a una hoja con todas las respuestas correctas (esto se llama " "escalar). Un valor de 0 significa que no se desea escalar las marcas." #: ../AMC-gui-edit_preferences.glade:3896 msgid "" "When using SUF option in general grading scale, should marks be ceiled not " "to be larger than the maximum mark ?" msgstr "" "Cuando use la opción SUF para la escala de puntuación ¿las marcas deben ser " "recortadas para no superar la nota máxima? " #: ../AMC-gui-edit_preferences.glade:3920 msgid "Global mark rules" msgstr "Reglas globales para puntuación" #: ../AMC-gui-edit_preferences.glade:3956 msgid "Header text" msgstr "Texto de encabezado" #: ../AMC-gui-edit_preferences.glade:4007 msgid "Writing direction" msgstr "Dirección de escritura" #: ../AMC-gui-edit_preferences.glade:4018 msgid "Questions marks position" msgstr "Posición de marcas en preguntas" #: ../AMC-gui-edit_preferences.glade:4029 msgid "Questions annotation text" msgstr "Texto en anotaciones de preguntas" #: ../AMC-gui-edit_preferences.glade:4040 msgid "Cancelled questions annotation text" msgstr "Texto para anotar preguntas canceladas" #: ../AMC-gui-edit_preferences.glade:4083 msgid "" "Text to be written for each question. This will be evaluated by perl, so " "quote it to make a single string. Use %S for score, %M for max score, and %s" " and %m for these values truncated to the requested number of significant " "digits." msgstr "" "Texto que debe ser escrito para cada pregunta. Esto será evaluado por Perl," " por lo cual debe asegurarse que es un 'string'. Use %S para la puntuación," " %M puntuación máxima, %s y %m deben estar truncados al número de digitos " "significativos que se requieran." #: ../AMC-gui-edit_preferences.glade:4097 msgid "Same as above, but for cancelled questions (when using allowempty)." msgstr "" "Lo mismo que arriba pero para cuestiones canceladas (cuando se está usando " "permitir vacío)" #: ../AMC-gui-edit_preferences.glade:4122 msgid "Papers annotation" msgstr "Pruebas con anotaciones" #: ../AMC-gui-edit_preferences.glade:4206 msgid "Examination description" msgstr "Descripción de la pruebas" #: ../AMC-gui-edit_preferences.glade:4249 msgid "CSV files charset" msgstr "Codificación de archivos CSV" #: ../AMC-gui-edit_preferences.glade:4260 msgid "Charset used for the students list file" msgstr "Codificación usada en al archivo de alumnos" #: ../AMC-gui-edit_preferences.glade:4279 msgid "Charset for the CSV marks file produced by AMC." msgstr "Codificación usada para el archivo CSV con notas generado por AMC." #: ../AMC-gui-edit_preferences.glade:4302 msgid "Internationnalization" msgstr "Internacionalización" #: ../AMC-gui-edit_preferences.glade:4334 msgid "LaTeX engine" msgstr "Motor LaTeX" #: ../AMC-gui-edit_preferences.glade:4345 msgid "Command to compile LaTeX file and make PDF, PS or DVI output." msgstr "Comando para compilar archivo LaTeX y hacer PDF, PS o DVI." #: ../AMC-gui-edit_preferences.glade:4368 msgid "External commands" msgstr " Comandos externos" #: ../AMC-gui-edit_preferences.glade:4393 ../AMC-gui-main_window.glade:2923 #: ../AMC-gui-main_window.glade:3239 msgid "Project" msgstr "Proyecto" #: ../AMC-gui-edit_preferences.glade:4413 msgid "AMC Preferences" msgstr "Preferencias de AMC" #: ../AMC-gui-filter_details.glade:7 msgid "Formats details" msgstr "Detalles de formatos" #: ../AMC-gui-filter_details.glade:66 msgid "" "AMC supports different formats for the source file. Here are some details " "about each of them." msgstr "" "AMC soporta distintos formatos para el archivo fuente. A continuación se " "muestran detalles de cada uno." #: ../AMC-gui-filter_details.glade:115 msgid "Description:" msgstr "Descripción:" #: ../AMC-gui-liste_dialog.glade:48 msgid "No names list" msgstr "No hay un listado de nombres" #: ../AMC-gui-liste_dialog.glade:134 msgid "Apply" msgstr "Aplicar" #: ../AMC-gui-liste_dialog.glade:163 msgid "Choose your students names list file" msgstr "Elija el archivo con el nombre de los alumnos" #: ../AMC-gui-mailing.glade:13 msgid "Mailing" msgstr "Correos Electrónicos" #: ../AMC-gui-mailing.glade:40 msgid "Send" msgstr "Enviar" #: ../AMC-gui-mailing.glade:75 msgid "Current project name %n:" msgstr "El nombre del proyecto actual %n:" #: ../AMC-gui-mailing.glade:149 msgid "Emails column:" msgstr "Columna de correos electrónicos:" #: ../AMC-gui-mailing.glade:184 msgid "Select failed" msgstr "Selección fallida" #: ../AMC-gui-mailing.glade:237 msgid "Addressees" msgstr "Direcciones" #: ../AMC-gui-mailing.glade:274 msgid "Subject" msgstr "Asunto:" #: ../AMC-gui-mailing.glade:303 msgid "Enable HTML Tags" msgstr "Habilita Tags HTML" #: ../AMC-gui-mailing.glade:345 msgid "Body" msgstr "Cuerpo" #: ../AMC-gui-mailing.glade:437 msgid "Attachments" msgstr "Adjuntos" #: ../AMC-gui-main_window.glade:126 msgid "Updated" msgstr "Actualizado" #: ../AMC-gui-main_window.glade:146 msgid "Sensitivity" msgstr "Sensibilidad" #: ../AMC-gui-main_window.glade:156 msgid "Scan file" msgstr "Fichero escaneado" #: ../AMC-gui-main_window.glade:294 msgid "Number of papers:" msgstr "Número de pruebas:" #: ../AMC-gui-main_window.glade:308 msgid "" "Number of papers to produce. Zero means taking into account the number " "written in the LaTeX source file." msgstr "" "Numeros de pruebas que se debe producir. Cero significa que se debe usar el" " número indicado en el archivo fuente LaTeX." #. TRANSLATORS: Use the character '_' before the key that can be used as a #. mnemonic (to activate documents update with Alt+key) #: ../AMC-gui-main_window.glade:343 msgid "_Update documents" msgstr "Act_ualizar documentos" #: ../AMC-gui-main_window.glade:377 msgid "Question" msgstr "Pregunta" #: ../AMC-gui-main_window.glade:543 msgid "Warnings" msgstr "Advertencias" #: ../AMC-gui-main_window.glade:654 msgid "Print papers" msgstr "Imprimir pruebas" #: ../AMC-gui-main_window.glade:718 msgid "From papers' scans" msgstr "Desde escaneos de pruebas" #: ../AMC-gui-main_window.glade:740 ../AMC-gui-main_window.glade:1776 msgid "Automatic" msgstr "Automático" #: ../AMC-gui-main_window.glade:762 msgid "On screen with mouse" msgstr "En pantalla con ratón" #: ../AMC-gui-main_window.glade:784 ../AMC-gui-main_window.glade:1819 msgid "Manual" msgstr "Manual" #: ../AMC-gui-main_window.glade:809 msgid "Data capture after examination" msgstr "Captura de datos después de análisis" #: ../AMC-gui-main_window.glade:841 msgid "Missing pages" msgstr "Páginas que faltan" #: ../AMC-gui-main_window.glade:913 msgid "Look at scans" msgstr "Mirar escaneos" #: ../AMC-gui-main_window.glade:984 msgid "Forget" msgstr "Olvidar" #: ../AMC-gui-main_window.glade:1001 msgid "Look at pages" msgstr "Mirar páginas" #: ../AMC-gui-main_window.glade:1086 msgid "Pages:" msgstr "Páginas" #: ../AMC-gui-main_window.glade:1144 msgid "Columns" msgstr "Columnas" #. Label on the button used to open a window with the images of the boxes #. taken from the scan. This window can be used th check boxes categorization. #: ../AMC-gui-main_window.glade:1183 ../AMC-perl/AMC/Gui/Zooms.glade:13 msgid "Zooms" msgstr "Acercamientos" #: ../AMC-gui-main_window.glade:1188 msgid "" "Show images of the boxes from the scan, and check their categorization." msgstr "Mostrar imágenes de casillas del escaneo y revisar su análisis." #. Label of the button used to open a window showing a scan with the place #. where corner marks have been detected, and the position where the boxes are #. supposed to be. #: ../AMC-gui-main_window.glade:1202 msgid "Layout" msgstr "Disposición" #: ../AMC-gui-main_window.glade:1207 msgid "" "Show where corner marks have been detected on the scan, and where boxes are " "supposed to be." msgstr "" "Mostrar donde las marcas de las esquinas se han detectado en el escaneo y " "donde las cajas deberían estar." #. Label of the button used to delete data capture for selected pages. #: ../AMC-gui-main_window.glade:1221 msgid "Remove" msgstr "Eliminar" #: ../AMC-gui-main_window.glade:1225 msgid "Remove data capture for selected pages." msgstr "Eliminar la captura de datos de las páginas seleccionadas." #: ../AMC-gui-main_window.glade:1266 msgid "Diagnosis" msgstr "Diagnóstico" #: ../AMC-gui-main_window.glade:1323 msgid "Update marking scale" msgstr "Actualizar escala de notas" #: ../AMC-gui-main_window.glade:1327 msgid "Also update marking scale extraction from LaTeX source file" msgstr "Actualizar escala de puntuación extraída de archivo fuente LaTeX" #: ../AMC-gui-main_window.glade:1341 msgid "Mark papers" msgstr "Corregir pruebas" #: ../AMC-gui-main_window.glade:1394 msgid "Marking" msgstr "Marcas" #: ../AMC-gui-main_window.glade:1419 msgid "Look at marks" msgstr "Ver marcas" #: ../AMC-gui-main_window.glade:1500 msgid "Students list:" msgstr "Lista de alumnos:" #: ../AMC-gui-main_window.glade:1548 msgid "Set file" msgstr "Definir archivo" #: ../AMC-gui-main_window.glade:1596 msgid "Edit list" msgstr "Editar lista" #: ../AMC-gui-main_window.glade:1638 msgid "Re-read" msgstr "Volver a leer" #: ../AMC-gui-main_window.glade:1704 msgid "Code name for automatic association:" msgstr "Código para asociación automática" #: ../AMC-gui-main_window.glade:1715 msgid "Primary key from this list:" msgstr "Clave primaria de esta lista" #: ../AMC-gui-main_window.glade:1738 msgid "Papers/students association:" msgstr "Asociación entre pruebas y alumnos" #: ../AMC-gui-main_window.glade:1858 msgid "Students identification" msgstr "Identificación de estudiantes" #: ../AMC-gui-main_window.glade:2020 msgid "Export" msgstr "Exportar" #: ../AMC-gui-main_window.glade:2041 msgid "and" msgstr "y" #: ../AMC-gui-main_window.glade:2095 msgid "Sorting:" msgstr "Ordenamiento:" #: ../AMC-gui-main_window.glade:2121 msgid "include absentees" msgstr "incluir alumnos ausentes" #: ../AMC-gui-main_window.glade:2127 msgid "Should exported data include absentees?" msgstr "¿Los datos exportados deberían incluir alumnos ausentes?" #: ../AMC-gui-main_window.glade:2207 msgid "Exports dir" msgstr "Directorio de exportaciones" #: ../AMC-gui-main_window.glade:2239 msgid "Marks export" msgstr "Notas exportadas" #: ../AMC-gui-main_window.glade:2322 msgid "File name model:" msgstr "Nombre de archivo modelo:" #: ../AMC-gui-main_window.glade:2336 msgid "" "File name model used to make file names for PDF annotated papers, one by " "student. Keep empty in order to use student name." msgstr "" "Nombre de archivo modelo usado para generar nombres de archivos para las " "pruebas con anotaciones (PDF), una por alumno. Mantener vacío para usar el " "nombre del estudiante." #: ../AMC-gui-main_window.glade:2382 msgid "Annotate papers' scans with marking details." msgstr "Pruebas con anotaciones con detalles de marcas." #: ../AMC-gui-main_window.glade:2404 msgid "Annotate papers" msgstr "Pruebas con anotaciones" #: ../AMC-gui-main_window.glade:2428 msgid "Look at grouped files" msgstr "Ver archivos agrupados" #: ../AMC-gui-main_window.glade:2451 msgid "Look" msgstr "Ver" #: ../AMC-gui-main_window.glade:2482 msgid "Send..." msgstr "Enviar..." #: ../AMC-gui-main_window.glade:2511 msgid "Annotated papers" msgstr "Pruebas con anotaciones" #: ../AMC-gui-main_window.glade:2534 msgid "Reports" msgstr "Informes" #: ../AMC-gui-main_window.glade:2650 msgid "Open project" msgstr "Abrir Proyecto" #: ../AMC-gui-main_window.glade:2691 msgid "Save project" msgstr "Salvar Proyecto" #: ../AMC-gui-main_window.glade:2721 msgid "Menu" msgstr "Menu" #: ../AMC-gui-main_window.glade:2799 ../AMC-gui-main_window.glade:2838 #: ../AMC-gui-main_window.glade:2877 msgid "Update the document" msgstr "Actualizar documento" #: ../AMC-gui-main_window.glade:2813 ../AMC-gui-main_window.glade:2852 #: ../AMC-gui-main_window.glade:2891 msgid "Open the document" msgstr "Abrir documento" #: ../AMC-gui-main_window.glade:2953 msgid "Export as template" msgstr "Exportar como plantilla" #: ../AMC-gui-main_window.glade:2967 msgid "User templates" msgstr "Plantillas del usuario" #: ../AMC-gui-main_window.glade:2992 msgid "Manage" msgstr "Administrar" #: ../AMC-gui-main_window.glade:3017 ../AMC-gui-main_window.glade:3267 msgid "Help" msgstr "Ayuda" #: ../AMC-gui-main_window.glade:3033 msgid "About" msgstr "Acerca de" #: ../AMC-gui-main_window.glade:3047 msgid "Cancel learning…" msgstr "Cancelar aprendizaje..." #: ../AMC-gui-main_window.glade:3058 msgid "Debugging" msgstr "Depuración" #: ../AMC-gui-main_window.glade:3076 msgid "Bug report" msgstr "Informe de errores" #: ../AMC-gui-main_window.glade:3090 ../AMC-gui-main_window.glade:3115 msgid "Documentation" msgstr "Documentación" #: ../AMC-gui-main_window.glade:3184 ../AMC-gui-main_window.glade:3253 msgid "Plugins" msgstr "Extensiones" #: ../AMC-gui-main_window.glade:3200 msgid "Browse" msgstr "Navegar" #: ../AMC-gui-main_window.glade:3214 msgid "Install plugin" msgstr "Instalar extensión" #: ../AMC-gui-make_template.glade:8 msgid "Save as a template" msgstr "Guardar como plantilla" #: ../AMC-gui-make_template.glade:64 msgid "To make a new template from your project, describe it below:" msgstr "" "Para hacer una nueva template para su proycto, escriba una descripción:" #: ../AMC-gui-make_template.glade:86 msgid "File name:" msgstr "Nombre del archivo:" #: ../AMC-gui-make_template.glade:117 msgid "" "Note: please use only alphanumeric characters and characters from " "\"-_+\" for the template file name." msgstr "" "Nota: por favor use solo caracteres alfanuméricos y los caracteres " "\"-_+\" para el nombre de la plantilla." #: ../AMC-gui-make_template.glade:143 msgid "Short name:" msgstr "Nombre corto:" #: ../AMC-gui-make_template.glade:202 msgid "Description:" msgstr "Descripción:" #: ../AMC-gui-make_template.glade:304 msgid "Included files:" msgstr "Archivos incluídos:" #: ../AMC-gui-overwritten.glade:49 msgid "List of pages with overwritten data:" msgstr "Listado de páginas con datos sobreescritos:" #: ../AMC-gui-saisie_auto.glade:8 msgid "Please select all papers' scans" msgstr "Por favor seleccione todos los escaneos de pruebas" #: ../AMC-gui-saisie_auto.glade:10 msgid "Automatic data capture" msgstr "Captura automática de datos" #: ../AMC-gui-saisie_auto.glade:27 msgid "Proceed to data capture from scans with button OK" msgstr "Proceda a la captura de dato de los escaneos con el botón OK" #: ../AMC-gui-saisie_auto.glade:82 msgid "Copy to project directory (recommended)" msgstr "Copiar al directorio del proyecto (recomendado)" #: ../AMC-gui-saisie_auto.glade:88 ../AMC-gui-saisie_auto.glade:89 msgid "Copy all scans to scans sub-directory in project directory" msgstr "" "Copiar todos los escaneos al sub-directorio de escaneos en el directorio del" " proyecto" #: ../AMC-gui-saisie_auto.glade:156 msgid "" "Use this setting to be sure that the exam copy IDs allocated to the pages of" " the scans you selected will be consecutive numbers, in the same " "order as the pages." msgstr "" "Use esta configuración para asegurarse que los Ids de los exámenes copiados" " se localizan en las páginas de las digitalizaciones que seleccionó serán " "números consecutivos, en el mismo orden que las páginas." #: ../AMC-gui-saisie_auto.glade:172 msgid "Options" msgstr "Opciones" #: ../AMC-gui-source_latex_choix.glade:8 msgid "Choose LaTeX source file" msgstr "Elija el archivo LaTeX fuente" #: ../AMC-gui-source_latex_choix_zip.glade:8 msgid "ZIP file choice" msgstr "Elija el archivo ZIP" #: ../AMC-gui-source_latex_dialog.glade:7 msgid "Choose LaTeX source" msgstr "Elija el archivo LaTeX fuente" #: ../AMC-gui-source_latex_dialog.glade:62 msgid "" "A multiple choice project is mainly made of a source file, which describes the questionnaire.\n" "Please choose your situation:" msgstr "" "Un proyecto 'Multiple Choice' consiste en un archivo fuente, el cual " "describe las preguntas. Por favor indique su situación:" #: ../AMC-gui-source_latex_dialog.glade:105 msgid "Template" msgstr "Plantilla" #: ../AMC-gui-source_latex_dialog.glade:119 msgid "" "You did not write any description of the questionnaire, and want to start " "from a template." msgstr "" "Usted no escribió una descripción para el questionario, y desea comenzar " "como una plantilla." #: ../AMC-gui-source_latex_dialog.glade:171 msgid "File" msgstr "Fichero" #: ../AMC-gui-source_latex_dialog.glade:185 msgid "" "You already wrote a questionnaire description, and want to use it for this " "project." msgstr "" "Usted ya escribió una descripción del questionario y quiere usarlo para este" " proyecto." #: ../AMC-gui-source_latex_dialog.glade:237 msgid "Empty" msgstr "Vacío" #: ../AMC-gui-source_latex_dialog.glade:251 msgid "You want to write the description from zero." msgstr "Usted desea escribir la descripción desde cero" #: ../AMC-gui-source_latex_dialog.glade:303 msgid "Archive" msgstr "Archivo" #: ../AMC-gui-source_latex_dialog.glade:317 msgid "" "You have a .tgz or .zip file containing the questionnaire and " "other related stuff, coming from a third party software or a backup." msgstr "" "Tiene un archivo tipo .tgz o .zip con el cuestionario y otros" " archivos relacionados que provienen de otro software o de una copia de " "seguridad." #: ../AMC-gui-source_latex_modele.glade:8 msgid "Template selection" msgstr "Selección de plantilla" #: ../AMC-gui-unrecognized.glade:8 msgid "Preprocess" msgstr "Preprocesar" #: ../AMC-gui-unrecognized.glade:14 msgid "Delete" msgstr "Borrar" #: ../AMC-gui-unrecognized.glade:29 msgid "Unrecognized scans" msgstr "Escaneos no reconocidos" #: ../AMC-gui-unrecognized.glade:71 msgid "Scans list" msgstr "Lista de digitalizaciones" #: ../AMC-gui-unrecognized.glade:237 msgid "Original scan" msgstr "Texto original:" #: ../AMC-gui-unrecognized.glade:266 msgid "Preprocessed" msgstr "Preprocesado" #: ../AMC-perl/AMC/Gui/Association.glade:14 msgid "Manual association" msgstr "Asociación manual" #. This is the label of the check button that controls wheter the auto- #. completion for students names will be made looking at the beginnig of the #. names or at the whole names. #: ../AMC-perl/AMC/Gui/Association.glade:84 msgid "beginning" msgstr "iniciar" #: ../AMC-perl/AMC/Gui/Association.glade:89 msgid "Is auto-completion looking at the beginning of the names only?" msgstr "¿Buscando solamente el auto complemento al inicio de los nombres?" #: ../AMC-perl/AMC/Gui/Association.glade:157 msgid "Show all" msgstr "Mostrar todo" #: ../AMC-perl/AMC/Gui/Association.glade:361 msgid "associated" msgstr "asociado" #: ../AMC-perl/AMC/Gui/Association.glade:366 msgid "" "Unticking this box, you see only non-associated papers. Tick it to be able " "to check already associated papers." msgstr "" "Deseleccionando esta casilla verá solamente exámenes no asociados. " "Seleccionela para ser capaz de comprobar los exámenes ya asociados." #: ../AMC-perl/AMC/Gui/Association.glade:411 msgid "Remove manual association for this paper" msgstr "Eliminar la asociación manual de esta prueba" #: ../AMC-perl/AMC/Gui/Association.glade:427 msgid "" "Tell the system that this papers does not correspond to any of the students " "from the list." msgstr "" "Digale al sistema que esta prueba no corresponde a ningno de los estudiantes" " de la lista." #: ../AMC-perl/AMC/Gui/Association.glade:449 msgid "Unknown" msgstr "Desconocido" #: ../AMC-perl/AMC/Gui/Association.glade:509 msgid "Save associations." msgstr "Guardar asociaciones." #: ../AMC-perl/AMC/Gui/Manuel.glade:18 msgid "Paper data capture" msgstr "Captura de datos de pruebas" #: ../AMC-perl/AMC/Gui/Manuel.glade:39 ../AMC-perl/AMC/Gui/Manuel.glade:236 msgid "Go to:" msgstr "Ir a:" #: ../AMC-perl/AMC/Gui/Manuel.glade:51 ../AMC-perl/AMC/Gui/Manuel.glade:248 msgid "" "Enter paper number, or page number like 102/4 (page 4 from paper 102), then " "press enter." msgstr "" "Ingrese el número de prueba o número de página, como 102/4 (página 4 de la " "prueba 102), luego presione enter." #: ../AMC-perl/AMC/Gui/Manuel.glade:82 msgid "Go to the previous page." msgstr "Ir a la página anterior." #: ../AMC-perl/AMC/Gui/Manuel.glade:100 msgid "Quit" msgstr "Salir" #: ../AMC-perl/AMC/Gui/Manuel.glade:118 msgid "Go to next page." msgstr "Ir a siguiente página." #: ../AMC-perl/AMC/Gui/Manuel.glade:282 msgid "Save this page modifications, then go to the previous page." msgstr "" "Guarde las modificaciones de esta página, y luego vaya a la página anterior." #: ../AMC-perl/AMC/Gui/Manuel.glade:296 msgid "" "Choose if you want to navigate through all pages, through pages with invalid" " answers, or through pages with invalid or empty answers." msgstr "" "Elija si quiere navegar por todas las páginas, las páginas con respuestas no" " válidas o las páginas con respuestas no válidas o vacías." #: ../AMC-perl/AMC/Gui/Manuel.glade:318 msgid "Save this page modifications, then go to next page." msgstr "" "Guarde las modificaciones de esta página, y luego vaya a la página " "siguiente." #: ../AMC-perl/AMC/Gui/Manuel.glade:344 msgid "Focus on question:" msgstr "Centrarse en la pregunta:" #: ../AMC-perl/AMC/Gui/Manuel.glade:429 msgid "" "Remove manual modifications for this page. Automatic data capture for this " "page, if any, won't be changed." msgstr "" "Eliminar modificaciones manuales para esta página. La captura automática de " "datos para esta página, si existe, no será cambiada." #: ../AMC-perl/AMC/Gui/Manuel.glade:458 msgid "Cancel modifications for this page" msgstr "Cancelar las modificacioens para esta página" #: ../AMC-perl/AMC/Gui/Manuel.glade:476 msgid "Save and quit" msgstr "Guardar y salir" #: ../AMC-perl/AMC/Gui/Zooms.glade:135 msgid "Unchecked boxes" msgstr "Casillas sin marcar" #: ../AMC-perl/AMC/Gui/Zooms.glade:203 msgid "Checked boxes" msgstr "Casillas marcadas" #: ../AMC-perl/AMC/Gui/Zooms.glade:281 msgid "" "Toggle mode. With 'click', left-click to toggle and right-click to toggle a " "group." msgstr "" "Cambia modo. Con 'click', click izquierdo para cambiar y click derecho para " "cambiar a un grupo." auto-multiple-choice-1.4.0/I18N/lang/fr.po000066400000000000000000004611111341176102400201170ustar00rootroot00000000000000# translation of fr.po to Français # Auto Multiple Choice # Copyright 2008-2017 Alexis Bienvenüe # This file is distributed under the same license as the AMC software # Alexis Bienvenüe , 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 msgid "" msgstr "" "Project-Id-Version: 0.250 (svn: 250)\n" "Report-Msgid-Bugs-To: paamc@passoire.fr\n" "POT-Creation-Date: 2018-04-04 22:01 +0200\n" "PO-Revision-Date: 2018-04-04 08:42+0200\n" "Last-Translator: Alexis Bienvenüe \n" "Language-Team: AB \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 2.0.6\n" #. TRANSLATORS: directory name for projects. This directory will be created (if needed) in the home directory of the user. Please use only alphanumeric characters, and - or _. No accentuated characters. #: ../AMC-annotate.pl:158 ../AMC-perl/AMC/Config.pm:247 #: ../AMC-perl/AMC/Config.pm:248 msgid "MC-Projects" msgstr "Projets-QCM" #: ../AMC-getimages.pl:213 msgid "Splitting multi-page PDF files..." msgstr "Extraction des pages du document PDF..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be converted. #: ../AMC-getimages.pl:390 #, perl-format msgid "Converting %s to bitmap..." msgstr "Conversion de %s en image \"bitmap\"..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be splitted to several images (one per page). #: ../AMC-getimages.pl:393 #, perl-format msgid "Splitting multi-page image %s..." msgstr "Extraction des pages de l'image %s..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be splitted to several images (one per page). #: ../AMC-getimages.pl:396 #, perl-format msgid "Processing image %s..." msgstr "Traitement de l'image %s..." #: ../AMC-getimages.pl:469 msgid "Copying scans to project directory..." msgstr "Copie des scans dans le répertoire projet..." #: ../AMC-gui.pl:249 msgid "None of the perl modules Graphics::Magick and Image::Magick are installed: AMC won't work properly!" msgstr "Aucun des deux modules perl Graphics::Magick et Image::Magick n'est installé : AMC ne fonctionnera pas correctement !" #: ../AMC-gui.pl:280 msgid "" "The package auto-multiple-choice-common is installed, but not auto-multiple-choice.\n" "AMC won't work properly until you install auto-multiple-choice package!" msgstr "" "Le paquet auto-multiple-choice-common est installé, mais pas auto-multiple-choice.\n" "AMC ne fonctionnera pas convenablement tant que vous n'installerez pas le paquet auto-multiple-choice package !" #: ../AMC-gui.pl:298 #, perl-format msgid "There is too little space left in the temporary disk directory (%s). Please clean this directory and try again." msgstr "Il y a trop peu d'espace disponible dans le répertoire temporaire (%s). Nettoyez ce répertoire et essayez de nouveau." #: ../AMC-gui.pl:317 msgid "Several dialogs try to help you be at ease handling AMC." msgstr "Plusieurs dialogues essayent de vous guider pour une meilleure prise en main d'AMC." #: ../AMC-gui.pl:319 #, perl-format msgid "Unless you tick the \"%s\" box, they are shown only once." msgstr "À moins que vous ne cochiez la case « %s », ils n'apparaissent qu'une fois." #: ../AMC-gui.pl:321 ../AMC-gui.pl:605 msgid "Show this message again next time" msgstr "Conserver ce message la prochaine fois" #: ../AMC-gui.pl:323 msgid "Do you want to forgot which dialogs you have already seen and ask to show all of them next time they should appear ?" msgstr "Souhaitez vous oublier quels sont ceux qui ont déjà été montrés, de telle sorte qu'ils réapparaissent tous ?" #: ../AMC-gui.pl:357 msgid "Please install libnotify to make desktop notifications available." msgstr "Veuillez installer le paquet perl Gtk2::Notify pour pouvoir bénéficier des notifications de bureau." #. TRANSLATORS: Message when switching to debugging mode. #: ../AMC-gui.pl:552 msgid "Debugging mode." msgstr "Passage en mode débogage." #. TRANSLATORS: Message when switching to debugging mode. %s will be replaced with the path of the log file. #: ../AMC-gui.pl:554 #, perl-format msgid "Debugging informations will be written in file %s." msgstr "Les informations de débogage de cette session seront disponibles dans le fichier %s." #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:583 ../AMC-gui-main_window.glade:3131 msgid "French" msgstr "Français" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:585 ../AMC-gui-main_window.glade:3145 msgid "English" msgstr "Anglais" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:587 ../AMC-gui-main_window.glade:3159 msgid "Japanese" msgstr "Japonais" #. TRANSLATORS: This is the title of the column containing student/copy identifier in the table showing the results of data captures. #: ../AMC-gui.pl:703 msgid "identifier" msgstr "identifiant" #. TRANSLATORS: This is the title of the column containing data capture date/time in the table showing the results of data captures. #: ../AMC-gui.pl:712 msgid "updated" msgstr "mise à jour" #. TRANSLATORS: This is the title of the column containing Mean Square Error Distance (some kind of mean distance between the location of the four corner marks on the scan and the location where they should be if the scan was not distorted at all) in the table showing the results of data captures. #: ../AMC-gui.pl:720 ../AMC-gui.pl:4992 ../AMC-perl/AMC/Gui/Manuel.pm:192 #: ../AMC-gui-main_window.glade:136 msgid "MSE" msgstr "EQM" #. TRANSLATORS: This is the title of the column containing so-called "sensitivity" (an indicator telling the user if the darkness ratio of some boxes on the page are very near the threshold. A great value tells that some darkness ratios are very near the threshold, so that the capture is very sensitive to the threshold. A small value is a good thing) in the table showing the results of data captures. #: ../AMC-gui.pl:729 ../AMC-gui.pl:4994 ../AMC-perl/AMC/Gui/Manuel.pm:200 msgid "sensitivity" msgstr "sensibilité" #: ../AMC-gui.pl:737 msgid "scan file" msgstr "fichier" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:766 ../AMC-gui.pl:784 msgid "Western Europe" msgstr "Europe occidentale" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:768 ../AMC-gui.pl:786 msgid "Central Europe" msgstr "Europe centrale" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:770 msgid "Southern Europe" msgstr "Europe du sud" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:772 msgid "Northern Europe" msgstr "Europe du Nord" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:774 msgid "Cyrillic" msgstr "Cyrillique" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:776 msgid "Turkish" msgstr "Turc" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:778 msgid "Northern" msgstr "Nordique" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:780 msgid "Unicode" msgstr "Unicode" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:804 ../AMC-gui.pl:3338 msgid "(none) [No primary key found in association list]" msgstr "(aucune) [Aucun identifiant trouvé dans la liste d'étudiants]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:806 ../AMC-gui.pl:3976 msgid "(none) [No code found in LaTeX file]" msgstr "(aucun) [Aucun code trouvé dans le fichier LaTex]" #. TRANSLATORS: One of the printing methods: use a command (This is not the command name itself). This is a menu entry. #: ../AMC-gui.pl:835 msgid "command" msgstr "par une commande" #. TRANSLATORS: One of the printing methods: print to files. This is a menu entry. #: ../AMC-gui.pl:837 msgid "to files" msgstr "dans des fichiers" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:841 msgid "floor" msgstr "inférieur" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:843 msgid "rounding" msgstr "normal" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:845 msgid "ceiling" msgstr "supérieur" #. TRANSLATORS: One option for decimal point: use a comma. This is a menu entry #: ../AMC-gui.pl:849 msgid ", (comma)" msgstr ", (virgule)" #. TRANSLATORS: One option for decimal point: use a point. This is a menu entry. #: ../AMC-gui.pl:851 msgid ". (dot)" msgstr ". (point)" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:856 msgid "one sided [No two-sided printing]" msgstr "recto seulement [Pas d'impression recto-verso]" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:858 msgid "long edge" msgstr "grand côté" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:860 msgid "short edge" msgstr "petit côté" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:864 msgid "(none) [No transitional image type (direct processing)]" msgstr "(aucun)" #. TRANSLATORS: One of the actions that can be done after exporting the marks. Here, do nothing more. This is a menu entry. #: ../AMC-gui.pl:872 msgid "that's all" msgstr "c'est tout" #. TRANSLATORS: One of the actions that can be done after exporting the marks. Here, open the exported file. This is a menu entry. #: ../AMC-gui.pl:874 msgid "open the file" msgstr "ouvrir le fichier" #. TRANSLATORS: One of the actions that can be done after exporting the marks. Here, open the directory where the file is. This is a menu entry. #: ../AMC-gui.pl:876 msgid "open the directory" msgstr "ouvrir le répertoire" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:879 msgid "(none) [No annotation position (do not write anything)]" msgstr "(aucune)" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: in one margin. This is a menu entry. #: ../AMC-gui.pl:881 msgid "in one margin" msgstr "dans la marge" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: in one of the two margins. This is a menu entry. #: ../AMC-gui.pl:883 msgid "in the margins" msgstr "dans les deux marges" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: near the boxes. This is a menu entry. #: ../AMC-gui.pl:885 msgid "near boxes" msgstr "à côté des cases" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: in the zones defined in the source file #: ../AMC-gui.pl:887 msgid "where defined in the source" msgstr "indiqué dans le fichier source" #. TRANSLATORS: One of the possible sorting criteria for students in the exported spreadsheet with scores: the student name. This is a menu entry. #. TRANSLATORS: This is the title of a column containing students names in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:890 ../AMC-gui.pl:6357 msgid "name" msgstr "nom" #. TRANSLATORS: One of the possible sorting criteria for students in the exported spreadsheet with scores: the student sheet number. This is a menu entry. #: ../AMC-gui.pl:892 msgid "exam copy number" msgstr "numéro de copie" #. TRANSLATORS: One of the possible sorting criteria for students in the exported spreadsheet with scores: the line where one can find this student in the students list file. This is a menu entry. #: ../AMC-gui.pl:894 msgid "line in students list" msgstr "ligne dans la liste des étudiants" #. TRANSLATORS: you can omit the [...] part, just here to explain context #. One of the possible sorting criteria for students in the exported spreadsheet with scores: the student mark. This is a menu entry. #: ../AMC-gui.pl:897 msgid "mark [student mark, for sorting]" msgstr "note" #. TRANSLATORS: One of the possible way to group annotated answer sheets together to PDF files: make one PDF file per student, with all his pages. This is a menu entry. #: ../AMC-gui.pl:902 msgid "One file per student" msgstr "Un fichier par étudiant" #. TRANSLATORS: One of the possible way to group annotated answer sheets together to PDF files: make only one PDF with all students sheets. This is a menu entry. #: ../AMC-gui.pl:904 msgid "One file for all students" msgstr "Un seul fichier pour tous les étudiants" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we only select pages where the student has written something (in separate answer sheet mode, these are the pages from the answer sheet and not the pages from the subject). #: ../AMC-gui.pl:907 msgid "Only pages with answers" msgstr "Seulement la feuille de réponses" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we take the pages were the students has nothing to write (often question pages from a subject with separate answer sheet option) from the subject. #: ../AMC-gui.pl:909 msgid "Question pages from subject" msgstr "Avec sujet" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we take the pages were the students has nothing to write (often question pages from a subject with separate answer sheet option) from the correction. #: ../AMC-gui.pl:911 msgid "Question pages from correction" msgstr "Avec sujet corrigé" #: ../AMC-gui.pl:914 msgid "All students" msgstr "Tous les étudiants" #: ../AMC-gui.pl:916 msgid "Selected students" msgstr "Étudiants sélectionnés" #: ../AMC-gui.pl:918 msgid "Please select..." msgstr "Choisir..." #. TRANSLATORS: One of the ways exam was made: each student has a different answer sheet with a different copy number - no photocopy was made. This is a menu entry. #. TRANSLATORS: This is a title for the AMC mode where the distributed exam papers are all different (different paper numbers at the top) -- photocopy is not used. #: ../AMC-gui.pl:920 ../AMC-gui.pl:2981 msgid "Different answer sheets" msgstr "Copies toutes différentes" #. TRANSLATORS: One of the ways exam was made: some students have the same exam subject, as some photocopies were made before distributing the subjects. This is a menu entry. #. TRANSLATORS: This is a title for the AMC mode where some answer sheets have been photocopied before being distributed to the students. #: ../AMC-gui.pl:922 ../AMC-gui.pl:2986 msgid "Some answer sheets were photocopied" msgstr "Certaines copies ont été photocopiées" #. TRANSLATORS: One of the ways to send mail: use sendmail command. This is a menu entry. #: ../AMC-gui.pl:924 msgid "sendmail" msgstr "sendmail" #. TRANSLATORS: One of the ways to send mail: use a SMTP server. This is a menu entry. #: ../AMC-gui.pl:926 msgid "SMTP" msgstr "SMTP" #: ../AMC-gui.pl:927 msgid "None [SMTP security]" msgstr "Aucune" # TRANLATORS: One of the way to handle separate answer sheet when printing: standard (same as in the question pdf document). This is a menu entry. #: ../AMC-gui.pl:936 msgid "Standard" msgstr "Feuille réponses à la fin" # TRANLATORS: One of the way to handle separate answer sheet when printing: print separately answer sheet and question. This is a menu entry. #: ../AMC-gui.pl:938 msgid "Separate answer sheet" msgstr "Feuille réponses séparée" # TRANLATORS: One of the way to handle separate answer sheet when printing: print the answr sheet first. This is a menu entry. #: ../AMC-gui.pl:940 ../AMC-gui.pl:2683 ../AMC-gui.pl:2701 msgid "Answer sheet first" msgstr "Feuille réponses au début" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. #: ../AMC-gui.pl:944 msgid "nothing" msgstr "rien" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. #: ../AMC-gui.pl:946 msgid "circle" msgstr "cercle" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. Here, a cross. #: ../AMC-gui.pl:948 msgid "mark" msgstr "croix" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. Here, the box outline. #: ../AMC-gui.pl:950 msgid "box" msgstr "carré" #: ../AMC-gui.pl:1045 #, perl-format msgid "Exporting to '%s' needs some perl modules that are not installed: %s. Please install these modules or switch to another export format." msgstr "L'export au format '%s' nécessite la présence de certains modules perl qui ne sont pas installés sur votre système : %s. Veuillez les installer ou choisir un autre format d'export." #: ../AMC-gui.pl:1068 msgid "When referring to a particular answer in the export, the letter used will be the one found in the catalog. However, the catalog has not yet been built. Do you want to build it now?" msgstr "Les lettres inscrites dans les cases du catalogue sont utilisées pour faire référence aux réponses dans l'export. Cependant, le catalogue n'a pas encore été construit. Souhaitez-vous le construire maintenant ?" #: ../AMC-gui.pl:1104 msgid "Exporting marks..." msgstr "Export des notes..." #: ../AMC-gui.pl:1143 #, perl-format msgid "Export to %s did not work: file not created..." msgstr "L'export des notes dans le fichier %s n'a sans doute pas fonctionné, car ce dernier fichier est inexistant..." #. TRANSLATORS: One of the popup menu that appears when right-clicking on a page in the data capture diagnosis table. Choosing this entry, an image will be opened to see where the corner marks were detected. #: ../AMC-gui.pl:1152 ../AMC-gui.pl:4996 msgid "page adjustment" msgstr "calage de la page" #. TRANSLATORS: One of the popup menu that appears when right-clicking on a page in the data capture diagnosis table. Choosing this entry, a window will be opened were the user can see all boxes on the scans and how they were filled by the students, and correct detection of ticked-or-not if needed. #: ../AMC-gui.pl:1154 ../AMC-gui.pl:4996 msgid "boxes zooms" msgstr "zooms sur les cases" #: ../AMC-gui.pl:1225 #, perl-format msgid "You requested to delete all data capture results for %d page(s)" msgstr "Vous avez demandé d'effacer les saisies concernant %d page(s)" #: ../AMC-gui.pl:1226 msgid "All data and image files related to these pages will be deleted." msgstr "Toutes les données et images liées à ces pages vont être effacées." #: ../AMC-gui.pl:1227 msgid "Do you really want to continue?" msgstr "Souhaitez-vous vraiment continuer ?" #: ../AMC-gui.pl:1405 #, perl-format msgid "Following command could not be run: %s, perhaps due to a poor configuration?" msgstr "La commande suivante n'a pas pu être exécutée : %s. Peut-être est-ce dû à une mauvaise configuration ?" #: ../AMC-gui.pl:1450 #, perl-format msgid "Current directory: %s" msgstr "Répertoire courant : %s" #: ../AMC-gui.pl:1509 msgid "Existing projects:" msgstr "Projets déjà existants :" #. TRANSLATORS: Window title when creating a new project. #: ../AMC-gui.pl:1514 msgid "New AMC project" msgstr "Nouveau projet QCM" #: ../AMC-gui.pl:1519 msgid "Projects management:" msgstr "Gestion des projets :" #: ../AMC-gui.pl:1520 msgid "Change project name:" msgstr "Changement du nom d'un projet :" #: ../AMC-gui.pl:1525 msgid "Back" msgstr "Retour" #. TRANSLATORS: Window title when managing projects. #: ../AMC-gui.pl:1528 msgid "AMC projects management" msgstr "Gestion des projets AMC" #: ../AMC-gui.pl:1550 #, perl-format msgid "You don't have any MC project in directory %s!" msgstr "Vous n'avez aucun projet de QCM dans le répertoire %s !" #: ../AMC-gui.pl:1559 ../AMC-gui-choix_projet.glade:260 msgid "Choose directory" msgstr "Choisir le répertoire" #: ../AMC-gui.pl:1604 #, perl-format msgid "You can't change project %s since it's open." msgstr "Vous ne pouvez pas modifier le projet %s car il est ouvert." #: ../AMC-gui.pl:1626 #, perl-format msgid "This will clone project %s to a new project %s." msgstr "Ceci créera une copie du projet %s vers un nouveau projet %s." #. TRANSLATORS: Message when you want to create an AMC project with name xxx, but there already exists a directory in the projects directory with this name! #: ../AMC-gui.pl:1697 #, perl-format msgid "Directory %s already exists, so you can't choose this name." msgstr "Un répertoire %s existe déjà. Vous ne pouvez donc pas renommer ce projet ainsi." #: ../AMC-gui.pl:1743 msgid "Destination project directory already exists" msgstr "Le répertoire destination existe déjà" #: ../AMC-gui.pl:1755 msgid "Copying project..." msgstr "Copie du projet..." #: ../AMC-gui.pl:1780 msgid "Your project has been copied" msgstr "Votre projet a été copié" #: ../AMC-gui.pl:1781 #, perl-format msgid "(%d files out of %d)" msgstr "(%d fichiers parmi %d)" #: ../AMC-gui.pl:1788 msgid "Source project directory not found" msgstr "Le répertoire du projet source n'a pas été trouvé" #: ../AMC-gui.pl:1796 #, perl-format msgid "An error occuried during project copy: %s." msgstr "Une erreur s'est produite durant la copie du projet : %s." #: ../AMC-gui.pl:1817 #, perl-format msgid "You asked to remove project %s." msgstr "Vous avez demandé la suppression du projet %s." #: ../AMC-gui.pl:1818 msgid "This will permanently erase all the files of this project, including the source file as well as all the files you put in the directory of this project, as the scans for example." msgstr "Ceci va effacer définitivement tous les fichiers de ce projet, y compris le sujet ainsi que tous les fichiers que vous avez pu mettre dans le répertoire de ce projet, comme les scans par exemple." #: ../AMC-gui.pl:1819 msgid "Is this really what you want?" msgstr "Est-ce bien ce que vous désirez ?" #: ../AMC-gui.pl:1876 #, perl-format msgid "You selected directory %s as a project to open." msgstr "Vous avez choisi d'ouvrir le projet %s." #: ../AMC-gui.pl:1877 msgid "However, this directory does not seem to contain a project. Do you still want to try?" msgstr "Cependant, ce répertoire ne semble pas contenir de projet AMC. Voulez-vous essayer tout de même ?" #: ../AMC-gui.pl:1894 #, perl-format msgid "You selected project %s from directory %s." msgstr "Vous avez choisi d'ouvrir le projet %s dans le répertoire %s." #: ../AMC-gui.pl:1895 msgid "Do you want to copy this project to your projects directory before opening it?" msgstr "Voulez-vous copier ce projet dans votre répertoire de projets personnel avant de l'ouvrir ?" #: ../AMC-gui.pl:1965 #, perl-format msgid "The name %s is already used in the projects directory." msgstr "Le nom %s est déjà utilisé dans le répertoire des projets." #: ../AMC-gui.pl:1966 msgid "You must choose another name to create a project." msgstr "Pour créer un nouveau projet, il faut choisir un autre nom." #: ../AMC-gui.pl:2005 msgid "LaTeX packages:" msgstr "Paquets LaTeX :" #: ../AMC-gui.pl:2006 msgid "Commands:" msgstr "Commandes :" #: ../AMC-gui.pl:2007 msgid "Fonts:" msgstr "Polices :" #: ../AMC-gui.pl:2022 msgid "Your AMC version and LaTeX style file version differ. Even if the documents are properly generated, this can lead to many problems using AMC.\n" msgstr "Votre version d'AMC est différente de celle du fichier de style LaTeX utilisé. Même si les documents ont bien été construits, cela peut vous causer de nombreux problèmes.\n" #: ../AMC-gui.pl:2023 msgid "Please check your installation to get matching AMC and LaTeX style file versions.\n" msgstr "Veuillez vérifier votre installation pour avoir des versions d'AMC et du style LaTeX identiques.\n" #: ../AMC-gui.pl:2024 #, perl-format msgid "" "AMC version: %s\n" "sty version: %s\n" "sty path: %s" msgstr "" "Version AMC : %s\n" "Version sty : %s\n" "Chemin du sty : %s" #: ../AMC-gui.pl:2052 msgid "Documents update..." msgstr "Mise à jour des documents..." #: ../AMC-gui.pl:2076 msgid "Problems while preparing documents" msgstr "Erreur lors de la préparation des documents" #: ../AMC-gui.pl:2078 msgid "Problems while processing the source file." msgstr "La compilation de votre fichier source a occasionné des erreurs." #: ../AMC-gui.pl:2081 msgid "You have to correct the source file and re-run documents update." msgstr "Vous devez corriger votre fichier source pour obtenir une mise à jour des documents." #: ../AMC-gui.pl:2085 msgid "Errors" msgstr "Erreurs" #: ../AMC-gui.pl:2086 msgid "Only first ten errors written" msgstr "Seules les dix premières erreurs ont été retranscrites" #: ../AMC-gui.pl:2089 msgid "Warnings" msgstr "Avertissements" #: ../AMC-gui.pl:2090 msgid "Only first ten warnings written" msgstr "Seules les dix premièrs avertissements ont été retranscrits" #. TRANSLATORS: Here, %s will be replaced with the translation of "Command output details", and refers to the small expandable part at the bottom of AMC main window, where one can see the output of the commands lauched by AMC. #: ../AMC-gui.pl:2095 #, perl-format msgid "See also the processing log in '%s' below." msgstr "Regardez la sortie dans '%s' ci-dessous." #. TRANSLATORS: Title of the small expandable part at the bottom of AMC main window, where one can see the output of the commands lauched by AMC. #: ../AMC-gui.pl:2097 ../AMC-gui-main_window.glade:2570 msgid "Command output details" msgstr "Détail de la sortie des commandes" #: ../AMC-gui.pl:2098 msgid "Use LaTeX editor or latex command for a precise diagnosis." msgstr "Utilisez votre éditeur LaTeX ou la commande latex pour un diagnostic précis des erreurs." #: ../AMC-gui.pl:2113 msgid "Documents have been prepared" msgstr "Les documents ont été préparés" #: ../AMC-gui.pl:2143 msgid "Working documents successfully generated." msgstr "Les documents de travail ont bien été générés." #. TRANSLATORS: Here, "them" refers to the working documents. #: ../AMC-gui.pl:2145 msgid "You can take a look at them double-clicking on the list." msgstr "Vous pouvez y jeter un œil grâce à un double-clic sur les lignes de la liste correspondante." #. TRANSLATORS: Here, "they" refers to the working documents. #: ../AMC-gui.pl:2147 msgid "If they are correct, proceed to layouts detection..." msgstr "Si tout vous parraît correct, l'étape suivante est la détection des mises en page..." #: ../AMC-gui.pl:2169 msgid "Your question has a separate answers sheet." msgstr "Votre sujet propose une feuille de réponses séparée." #: ../AMC-gui.pl:2170 msgid "In this case, letters are shown inside boxes." msgstr "Dans ce cas, des lettres sont inscrites dans les cases à cocher." #: ../AMC-gui.pl:2171 msgid "Your question is set to present labels inside the boxes to be ticked." msgstr "Votre sujet présente des symboles à l'intérieur des cases à cocher." #. TRANSLATORS: Here, %s will be replaced with the translation of "darkness threshold". #: ../AMC-gui.pl:2174 #, perl-format msgid "For better ticking detection, ask students to fill out completely boxes, and choose parameter \"%s\" around 0.5 for this project." msgstr "Pour une bonne détection des cases à cocher, il faut donc demander aux étudiants de remplir totalement les cases voulues, et aussi fixer le paramètre \"%s\" du projet à une valeur de l'ordre de 0.5." #: ../AMC-gui.pl:2175 #, perl-format msgid "At the moment, this parameter is set to %.02f." msgstr "Pour l'instant, la valeur de ce paramètre est %.02f." #: ../AMC-gui.pl:2176 msgid "Would you like to set it to 0.5?" msgstr "Voulez-vous changer cette valeur en 0.5 ?" #. TRANSLATORS: This parameter is the ratio of dark pixels number over total pixels number inside box above which a box is considered to be ticked. #: ../AMC-gui.pl:2178 msgid "darkness threshold" msgstr "seuil de noirceur" #: ../AMC-gui.pl:2199 msgid "Papers analysis was already made on the basis of the current working documents." msgstr "L'analyse de certaines copies a déjà été effectuée sur la base des documents de travail actuels." #: ../AMC-gui.pl:2200 msgid "You already made the examination on the basis of these documents." msgstr "Vous avez donc vraisemblablement déjà effectué l'examen sur la base de ces documents." #: ../AMC-gui.pl:2201 msgid "If you modify working documents, you will not be capable any more of analyzing the papers you have already distributed!" msgstr "Si vous modifiez les documents de travail, vous ne serez plus en mesure d'analyser les copies que vous avez déjà distribuées !" #: ../AMC-gui.pl:2202 ../AMC-gui.pl:2229 msgid "Do you wish to continue?" msgstr "Souhaitez-vous tout de même continuer ?" #: ../AMC-gui.pl:2203 ../AMC-gui.pl:2230 msgid "Click on OK to erase the former layouts and update working documents, or on Cancel to cancel this operation." msgstr "Cliquez sur Valider pour effacer les anciennes mises en page et mettre à jour les documents de travail, ou sur Annuler pour annuler cette opération." #: ../AMC-gui.pl:2204 ../AMC-gui.pl:2231 msgid "To allow the use of an already printed question, cancel!" msgstr "Pour permettre l'utilisation d'un sujet déjà imprimé, annulez !" #: ../AMC-gui.pl:2227 msgid "Layouts are already calculated for the current documents." msgstr "Certaines mises en page on déjà été calculées pour les documents actuels." #: ../AMC-gui.pl:2228 msgid "Updating working documents, the layouts will become obsolete and will thus be erased." msgstr "En refabriquant les documents de travail, les mises en page deviendront obsolètes et seront donc effacées." #: ../AMC-gui.pl:2258 #, perl-format msgid "To handle properly %s files, AMC needs the following components, that are currently missing:" msgstr "Pour gérer le format de fichier %s, AMC a besoin des composants suivants, qui ne sont actuellement pas installés :" #: ../AMC-gui.pl:2270 msgid "Install these components on your system and try again." msgstr "Installez ces composants sur votre système et essayez de nouveau." #. TRANSLATORS: Message when the user required printing the question paper, but it is not present (probably the working documents have not been properly generated). #: ../AMC-gui.pl:2405 msgid "You don't have any question to print: please check your source file and update working documents first." msgstr "Vous n'avez pas de sujet à imprimer : veuillez vérifier votre fichier source et mettre à jour les documents de travail." #. TRANSLATORS: Message when AMC does not know about the subject pages that has been generated. Usualy this means that the layout computation step has not been made. #: ../AMC-gui.pl:2422 msgid "Question's pages are not detected." msgstr "Aucune copie n'a été détectée sur le document de calage." #: ../AMC-gui.pl:2423 msgid "Perhaps you forgot to compute layouts?" msgstr "Peut-être avez-vous oublié de calculer les mises en page ?" #: ../AMC-gui.pl:2445 #, perl-format msgid "You chose the printing method '%s' but it is not available (%s). Please install the missing dependencies or switch to another printing method." msgstr "Vous avez choisi la méthode d'impression '%s' mais celle-ci n'est pas disponible (%s). Veuillez installer les dépendances manquantes ou choisir une autre méthode d'impression." #: ../AMC-gui.pl:2466 msgid "You chose a printing method using CUPS but there are no configured printer in CUPS. Please configure some printer or switch to another printing method." msgstr "Vous avez choisi la méthode d'impression '%s' mais aucune imprimante n'est configurée dans CUPS. Veuillez en configurer ou choisir une autre méthode d'impression." #. TRANSLATORS: This is the title of the column containing the paper's numbers (1,2,3,...) in the table showing all available papers, from which the user will choose those he wants to print. #: ../AMC-gui.pl:2533 msgid "papers" msgstr "copies" #: ../AMC-gui.pl:2622 msgid "You did not select any exam to print..." msgstr "Vous n'avez sélectionné aucune copie à imprimer." #: ../AMC-gui.pl:2641 ../AMC-gui.pl:2657 msgid "You selected only a few sheets to print." msgstr "Vous n'avez sélectionné que quelques copies à imprimer." #: ../AMC-gui.pl:2642 msgid "As students are requested to write on more than one page, you must create as many exam sheets as necessary for all your students, with different sheets numbers, and print them all." msgstr "Comme les étudiants doivent remplir plusieurs pages, vous devez créer assez de copies pour tous les étudiants, avec des numéros de copie différents, et les imprimer toutes." #: ../AMC-gui.pl:2643 msgid "If you print one or several sheets and photocopy them to have enough for all the students, you won't be able to continue with AMC!" msgstr "Si vous imprimez une ou quelques copies et les photocopiez pour en avoir assez pour tous vos étudiants, vous ne pourrez pas continuer avec AMC !" #: ../AMC-gui.pl:2644 msgid "Do you want to print the selected sheets anyway?" msgstr "Voulez-vous imprimer les copies sélectionnées tout de même ?" #: ../AMC-gui.pl:2658 msgid "Are you going to photocopy some printed subjects before giving them to the students?" msgstr "Allez-vous photocopier certains sujets imprimés avant de les distribuer aux étudiants ?" #: ../AMC-gui.pl:2659 msgid "If so, the corresponding option will be set for this project." msgstr "Dans l'affirmative, le paramètre correspondant sera changé pour ce projet." #: ../AMC-gui.pl:2660 msgid "However, you will be able to change this when giving your first scans to AMC." msgstr "Vous pourrez toujours le modifier lors de la première saisie." #. TRANSLATORS: the two %s will be replaced by the translations of "Answer sheet first" and "Extracting method". #: ../AMC-gui.pl:2682 #, perl-format msgid "You selected the '%s' option, that uses '%s', so the %s has been set to '%s' for you." msgstr "Vous avez sélectioné l'option '%s' qui utilise '%s' donc %s a été mise à '%s' pour vous." #: ../AMC-gui.pl:2684 ../AMC-gui-edit_preferences.glade:902 msgid "Extracting method" msgstr "Méthode d'extraction" #: ../AMC-gui.pl:2700 #, perl-format msgid "You selected the '%s' option, but this option needs 'qpdf' or 'pdftk' to be installed on your system. Please install one of these and try again." msgstr "Vous avez sélectionné l'option '%s' mais cela nécessite que 'qpdf' ou 'pdftk' soit installé sur votre systeme. Installez une de ces commandes puis réessayez." #: ../AMC-gui.pl:2741 msgid "Print papers one by one..." msgstr "Impression copie par copie..." #: ../AMC-gui.pl:2790 msgid "Working documents are in an old format, which is not supported anymore." msgstr "Les documents de travail sont dans un vieux format qui n'est plus supporté." #: ../AMC-gui.pl:2791 msgid "Please generate again the working documents!" msgstr "Veuillez remettre à jour les documents de travail !" #: ../AMC-gui.pl:2805 msgid "Detecting layouts..." msgstr "Calcul des mises en page..." #: ../AMC-gui.pl:2823 msgid "No layout detected." msgstr "Aucune mise en page n'a été fabriquée." #: ../AMC-gui.pl:2824 msgid "Don't go through the examination before fixing this problem, otherwise you won't be able to use AMC for correction." msgstr "Ne faites pas passer l'examen avant d'avoir réglé le problème, sinon vous ne pourrez pas utiliser AMC pour la correction." #: ../AMC-gui.pl:2830 msgid "Layouts are detected." msgstr "Les mises en page sont maintenant détectées." #: ../AMC-gui.pl:2831 #, perl-format msgid "You can check all is correct clicking on button %s and looking at question pages to see if red boxes are well positioned." msgstr "Vous pouvez vérifier que tout est correct en cliquant sur le bouton %s et en navigant dans les pages du sujet pour vérifier que les cases à cocher sont bien marquées en rouge à la bonne position." #: ../AMC-gui.pl:2831 ../AMC-gui-main_window.glade:560 msgid "Check layouts" msgstr "Vérifier les mises en page" #: ../AMC-gui.pl:2832 msgid "Then you can proceed to printing and to examination." msgstr "Vous pouvez ensuite passer à l'impression des copies et faire passer l'examen." #: ../AMC-gui.pl:2905 msgid "No layout for this project." msgstr "Aucune mise en page n'est disponible pour ce projet." #. TRANSLATORS: Here, the first %s will be replaced with "Layout detection" (a button title), and the second %s with "Preparation" (the tab title where one can find this button). #: ../AMC-gui.pl:2907 #, perl-format msgid "Please use button %s in %s before manual data capture." msgstr "Veuillez utiliser le bouton %s de l'onglet %s avant la saisie manuelle." #: ../AMC-gui.pl:2908 ../AMC-gui-main_window.glade:508 msgid "Layout detection" msgstr "Calculer les mises en page" #: ../AMC-gui.pl:2909 ../AMC-gui-main_window.glade:684 msgid "Preparation" msgstr "Préparation" #: ../AMC-gui.pl:2947 #, perl-format msgid "Pre-allocate sheet ids from the page numbers, starting at %d" msgstr "Pré-allocation des identifiants de copies, en commençant à %d" #: ../AMC-gui.pl:2978 msgid "Automatic data capture can be done in two different modes:" msgstr "La saisie automatique de vos scans peut être faite dans deux différents modes :" #: ../AMC-gui.pl:2983 msgid "In the most robust one, you give a different exam (with a different exam number) to every student. You must not photocopy subjects before distributing them." msgstr "Dans le plus robuste, vous distribuez une copie différente (avec un numéro de copie différent) à chaque étudiant. Vous ne devez pas photocopier ces copies avant de les distribuer." #: ../AMC-gui.pl:2988 msgid "In the second one (which can be used only if answer sheets to be scanned have one page per candidate) you can photocopy answer sheets and give the same subject to different students." msgstr "Dans le deuxième (qui ne peut être utilisé que si les étudiants ont à remplir une unique page), vous pouvez photocopier les sujets et donner la même copie photocopiée à plusieurs étudiants." #: ../AMC-gui.pl:2989 msgid "After the first automatic capture, you can't switch to the other mode." msgstr "Après la première saisie, vous ne pourrez pas changer de mode." #: ../AMC-gui.pl:3163 msgid "Automatic data capture..." msgstr "Saisie automatique..." #: ../AMC-gui.pl:3174 msgid "Automatic data capture has been completed" msgstr "La saisie automatique est terminée" #: ../AMC-gui.pl:3183 #, perl-format msgid "Some of the pages you submitted (%d of them) have already been processed before. Old data has been overwritten." msgstr "Certaines pages soumises (il y en a %d) ont déjà été traitées précédemment. Les anciennes saisies ont été remplacées." #. TRANSLATORS: Names list file : (none) #: ../AMC-gui.pl:3271 msgid "(none)" msgstr "(aucune)" #: ../AMC-gui.pl:3292 #, perl-format msgid "Unsuitable names file: %d errors, first on line %d." msgstr "Le fichier choisi ne convient pas : %d erreurs détectées, la première en ligne %d." #. TRANSLATORS: Here, do not translate 'name' and 'surname' (except in french), as the column names in the students list file has to be named in english in order to be properly detected. #: ../AMC-gui.pl:3309 #, perl-format msgid "Found %d empty names in names file %s. Check that name or surname column is present, and always filled." msgstr "%d noms vides ont été trouvés dans le fichier de noms %s. Vérifiez qu'une colonne nom ou prenom est bien présente et toujours renseignée." #: ../AMC-gui.pl:3310 ../AMC-gui.pl:3326 msgid "Edit the names file to correct it, and re-read." msgstr "Éditez le fichier de noms d'étudiants pour le corriger, et appuyez sur \"Re-lire\"." #: ../AMC-gui.pl:3326 #, perl-format msgid "Found duplicate names: %s. Check that all names are different." msgstr "Des noms ont été trouvé en double : %s. Vérifiez que tous les noms d'étudiants sont différents." #. TRANSLATORS: Here, %s will be replaced with the name of the tab "Data capture". #: ../AMC-gui.pl:3358 #, perl-format msgid "Before associating names to papers, you must choose a students list file in tab \"%s\"." msgstr "Avant d'associer les noms aux copies, il faut indiquer un fichier de liste des étudiants dans l'onglet « %s »." #. One of the "notify the user at the end of the following actions" checkbox: for automatic data capture. #: ../AMC-gui.pl:3359 ../AMC-gui-edit_preferences.glade:1584 #: ../AMC-gui-main_window.glade:1286 msgid "Data capture" msgstr "Saisie" #: ../AMC-gui.pl:3368 msgid "Please choose a key from primary keys in students list before association." msgstr "Aucun identifiant n'a été choisi parmi les titres de colonnes du fichier contenant la liste des étudiants." #: ../AMC-gui.pl:3377 msgid "Please choose a code (made with LaTeX command \\AMCcodeGrid or equivalent) before automatic association." msgstr "Aucun code n'a été choisi parmi les codes (éventuellement fabriqués avec la commande LaTeX \\AMCcodeGrid ou similaire) disponibles." #. TRANSLATORS: Here, %s will be replaced with "Students identification", which refers to a paragraph in the tab "Marking" from AMC main window. #: ../AMC-gui.pl:3422 #, perl-format msgid "Before associating names to papers, you must choose a students list file in paragraph \"%s\"." msgstr "Avant d'associer les noms aux copies, il faut indiquer un fichier de liste des étudiants au paragraphe « %s »." #: ../AMC-gui.pl:3423 msgid "Students identification" msgstr "Identification des étudiants" #: ../AMC-gui.pl:3446 msgid "Automatic association..." msgstr "Association automatique..." #: ../AMC-gui.pl:3468 #, perl-format msgid "Automatic association completed: %d students recognized." msgstr "L'association automatique a détecté %d copies d'étudiants." #. TRANSLATORS: Here %s and %s will be replaced with two parameters names: "Primary key from this list" and "Code name for automatic association". #: ../AMC-gui.pl:3470 #, perl-format msgid "Please check \"%s\" and \"%s\" values and try again." msgstr "Vérifiez la valeur des champs \"%s\" et \"%s\" et essayez encore." #: ../AMC-gui.pl:3471 msgid "Primary key from this list" msgstr "Identifiant unique dans cette liste" #: ../AMC-gui.pl:3472 msgid "Code name for automatic association" msgstr "Titre du code pour association automatique" #: ../AMC-gui.pl:3478 msgid "Automatic association is now finished. You can ask for manual association to check that all is fine and, if necessary, read manually students names which have not been automatically identified." msgstr "L'association automatique est maintenant terminée. Vous pouvez demander une association manuelle pour voir si tout s'est bien passé et lire manuellement les noms des étudiants pour lesquels l'association automatique n'a pas fonctionné." #: ../AMC-gui.pl:3640 #, perl-format msgid "Some manual association data has be found, which will be lost if the primary key is changed. Do you want to switch back to the primary key \"%s\" and keep association data?" msgstr "Une association manuelle e déjà été effectuée, et sera perdue si l'identifiant unique est modifié. Voulez-vous revenir à l'identifiant unique \"%s\" et conserver l'association actuelle ?" #: ../AMC-gui.pl:3666 #, perl-format msgid "The primary key from the students list has been set to \"%s\", which is not the value from the association data." msgstr "L'identifiant unique de la liste des étudiants a été fixé à \"%s\", valeur différente de celle utilisée pour l'association actuelle." #: ../AMC-gui.pl:3667 msgid "Automatic papers/students association will be re-run to update the association data." msgstr "L'association automatique va être refaite." #: ../AMC-gui.pl:3693 #, perl-format msgid "Papers are not yet corrected: use button \"%s\"." msgstr "Les copies ne sont pas encore corrigées : veuillez d'abord utiliser le bouton « %s »." #. TRANSLATORS: This is a button: "Mark" is here an action to be called by the user. When clicking this button, the user requests scores to be computed for all students. #: ../AMC-gui.pl:3695 ../AMC-gui-main_window.glade:1363 msgid "Mark" msgstr "Corriger" #: ../AMC-gui.pl:3736 msgid "Extracting marking scale..." msgstr "Analyse du bareme..." #: ../AMC-gui.pl:3940 msgid "Computing marks..." msgstr "Calcul des notes..." #: ../AMC-gui.pl:3945 msgid "Grading has been completed" msgstr "La notation est terminée" #. TRANSLATORS: This is the marks mean for all students. #: ../AMC-gui.pl:3961 #, perl-format msgid "Mean: %.2f" msgstr "Moyenne : %.2f" #: ../AMC-gui.pl:3964 msgid "No marks computed" msgstr "Aucun calcul de notes" #: ../AMC-gui.pl:3983 msgid "Pre-association" msgstr "Pré-association" #: ../AMC-gui.pl:3997 msgid "No students list file" msgstr "Aucune liste d'étudiants" #: ../AMC-gui.pl:3999 msgid "No primary key from students list file" msgstr "Pas d'identifiant unique défini dans la liste des étudiants" #: ../AMC-gui.pl:4005 #, perl-format msgid "Missing identification for %d answer sheets" msgstr "Il manque l'identification de %d copies" #: ../AMC-gui.pl:4007 msgid "All completed answer sheets are associated with a student name" msgstr "Toutes les copies sont associées à un étudiant" #: ../AMC-gui.pl:4061 msgid "exam ID" msgstr "copie" #: ../AMC-gui.pl:4076 msgid "student" msgstr "étudiant" #. TRANSLATORS: File name for single annotated answer sheets with only some selected students. Please use simple characters. #: ../AMC-gui.pl:4207 msgid "Selected_students" msgstr "Etudiants_selectionnes" #. TRANSLATORS: File name for single annotated answer sheets with all students. Please use simple characters. #: ../AMC-gui.pl:4209 msgid "All_students" msgstr "Tous_etudiants" #: ../AMC-gui.pl:4257 msgid "Annotating papers..." msgstr "Annotation des copies..." #: ../AMC-gui.pl:4261 msgid "Annotations have been completed" msgstr "Les annotations sont terminées" #: ../AMC-gui.pl:4375 #, perl-format msgid "Project \"%s\" preferences" msgstr "Préférences du projet « %s »" #: ../AMC-gui.pl:4378 msgid "Project preferences" msgstr "Préférences du projet" #: ../AMC-gui.pl:4484 #, perl-format msgid "You modified \"%s\" value, which is the default value used when creating new projects. Do you want to change also \"%s\" for the opened %s project?" msgstr "Vous avez modifié la valeur de \"%s\", qui est une valeur par défaut et ne sera utilisée que pour les nouveaux projets. Souhaitez-vous modifier aussi la valeur de \"%s\" pour le projet en cours %s de la même manière ?" #: ../AMC-gui.pl:4600 msgid "Working documents are not readable" msgstr "Les documents de travail ne sont pas lisibles" #: ../AMC-gui.pl:4603 msgid "No working documents" msgstr "Pas de documents de travail" #: ../AMC-gui.pl:4606 msgid "Working documents last update:" msgstr "Dernière mise à jour des documents de travail :" #: ../AMC-gui.pl:4662 msgid "No layout" msgstr "Pas de mise en page" #: ../AMC-gui.pl:4665 #, perl-format msgid "Processed %d pages" msgstr "%d pages traitées" #: ../AMC-gui.pl:4668 msgid "but some defects were detected." msgstr "mais des défauts ont été détectés." #: ../AMC-gui.pl:4680 msgid "The \\namefield command is not used. Writing subjects without name field is not recommended" msgstr "La commande \\champnom n'est pas utilisée. Cette pratique est fortement déconseillée" #: ../AMC-gui.pl:4681 msgid "The \\namefield command is used several times for the same subject. This should not be the case, as each student should write his name only once" msgstr "La commande \\champnom est utilisée plusieurs fois pour un même sujet. Ceci ne devrait pas être le cas, car chaque étudiant ne devrait avoir à écrire son nom qu'une fois" #: ../AMC-gui.pl:4682 msgid "No box to be ticked" msgstr "Aucune case à cocher" #: ../AMC-gui.pl:4683 msgid "The corner marks and binary boxes are not at the same location on all pages" msgstr "Les marques de coin ne sont pas au même endroit sur toutes les pages" #: ../AMC-gui.pl:4684 msgid "Some material has been placed out of the page. This is often a result of a multiple columns question group starting too close from the page bottom. In such a case, use \"needspace\"." msgstr "Certains documents se trouvent hors de la page. Cela arrive souvent car la mise en page sur plusieurs colonnes fait débuter les questions trop près du bas de la page. Utilisez \"needspace \" pour forcer un début de nouvelle page." #: ../AMC-gui.pl:4705 msgid "Some potential defects were detected for this subject. Correct them in the source and update the working documents." msgstr "Des défauts ont été détectés dans ce sujet. Corrigez-les dans le fichier source et mettez à jour les documents de travail." #: ../AMC-gui.pl:4711 #, perl-format msgid "(See for example pages %s and %s)" msgstr "(Voir par exemple les pages %s et %s)" #: ../AMC-gui.pl:4716 #, perl-format msgid "(Concerns %1$d pages, see for example page %2$s)" msgstr "(Cela concerne %1$d pages, voir par exemple la page %2$s)" #: ../AMC-gui.pl:4723 #, perl-format msgid "(Concerns %1$d exams, see for example sheet %2$d)" msgstr "(Cela concerne %1$d sujets, voir par exemple le numéro %2$d)" #: ../AMC-gui.pl:4840 #, perl-format msgid "Data capture from %d complete papers and %d incomplete papers" msgstr "Saisie de %d copie(s) complète(s) et %d copie(s) incomplète(s)" #: ../AMC-gui.pl:4844 #, perl-format msgid "Data capture from %d complete papers" msgstr "Saisie de %d copie(s) complète(s)" #. TRANSLATORS: this text points out that no data capture has been made yet. #: ../AMC-gui.pl:4849 msgid "No data" msgstr "Aucune saisie" #: ../AMC-gui.pl:4856 #, perl-format msgid "Overwritten pages: %d" msgstr "Pages remplacées : %d" #: ../AMC-gui.pl:4864 msgid "All scans were properly recognized." msgstr "Tous les scans ont été correctement reconnus." #: ../AMC-gui.pl:4871 #, perl-format msgid "%d scans were not recognized." msgstr "%d scans n'ont pas été reconnus." #. TRANSLATORS: column title for the list of overwritten pages. This refers to the page from the question #: ../AMC-gui.pl:4895 msgid "Page" msgstr "Page" #. TRANSLATORS: column title for the list of overwritten pages. This refers to the number of times the page has been overwritten. #: ../AMC-gui.pl:4900 msgid "count" msgstr "nombre" #. TRANSLATORS: column title for the list of overwritten pages. This refers to the date of the last data capture for the page. #: ../AMC-gui.pl:4905 msgid "Date" msgstr "Date" #: ../AMC-gui.pl:4946 msgid "Looking for analysis..." msgstr "Recherche des analyses effectuées..." #: ../AMC-gui.pl:4988 msgid "Automatic data capture now completed." msgstr "La saisie automatique de vos scans est maintenant terminée." #: ../AMC-gui.pl:4989 #, perl-format msgid "It is not complete (missing pages from %d papers)." msgstr "Elle n'est pas complète (il manque certaines pages pour %d copie(s))." #: ../AMC-gui.pl:4990 msgid "You can analyse data capture quality with some indicators values in analysis list:" msgstr "Vous pouvez analyser la qualité de la détection grâce à la valeur des indicateurs donnée dans la liste des analyses :" #: ../AMC-gui.pl:4992 #, perl-format msgid "- %s represents positioning gap for the four corner marks. Great value means abnormal page distortion." msgstr "- %s représente l'écart de positionnement des quatre marques de coin. Une grande valeur signale une déformation anormale de la page." #: ../AMC-gui.pl:4994 #, perl-format msgid "- great values of %s are seen when darkness ratio is very close to the threshold for some boxes." msgstr "- une grande valeur de %s correspond à une situation dans laquelle le taux de remplissage de certaines cases est très proche du seuil défini." #: ../AMC-gui.pl:4996 #, perl-format msgid "You can also look at the scan adjustment (%s) and ticked and unticked boxes (%s) using right-click on lines from table %s." msgstr "Vous pouvez aussi observer le calage du scan (%s) ainsi que les cases cochées ou non (%s) en utilisant le menu déployé par un clic-droit sur chaque ligne du tableau %s." #: ../AMC-gui.pl:4996 msgid "Diagnosis" msgstr "Diagnostic" #: ../AMC-gui.pl:5024 msgid "Pages that miss data capture to complete students sheets:" msgstr "Pages pour lesquelles il manque une saisie :" #: ../AMC-gui.pl:5145 #, perl-format msgid "Error loading scan %s" msgstr "Erreur lors du chargement du scan %s" #: ../AMC-gui.pl:5151 msgid "No scan selected" msgstr "Aucun scan sélectionné" #: ../AMC-gui.pl:5156 msgid "No more unrecognized scans" msgstr "Plus de scans non reconnus." #: ../AMC-gui.pl:5234 msgid "Making diagnostic image..." msgstr "Fabrication de l'image de diagnostic..." #: ../AMC-gui.pl:5304 msgid "(no description)" msgstr "(aucune description)" #. TRANSLATORS: This is a column title for the list of files to be included in a template being created. #. TRANSLATORS: This is the title of a column containing attachments file paths in a table showing all attachments, when sending them to the students by email. #: ../AMC-gui.pl:5389 ../AMC-gui.pl:6336 msgid "file" msgstr "fichier" #: ../AMC-gui.pl:5469 msgid "Add files to template" msgstr "Ajout de fichiers au modèle" #: ../AMC-gui.pl:5490 msgid "When making a template, you can only add files that are within the project directory." msgstr "Pour la fabrication d'un modèle, vous pouvez uniquement inclure des fichiers appartenant au répertoire projet." #. TRANSLATORS: This is a column name for the list of available templates, when creating a new project based on a template. #: ../AMC-gui.pl:5613 msgid "template" msgstr "modèle" #: ../AMC-gui.pl:5658 msgid "All source files" msgstr "Tous fichiers source" #: ../AMC-gui.pl:5676 #, perl-format msgid "%s files" msgstr "%s fichiers" #: ../AMC-gui.pl:5710 msgid "Archive (zip, tgz)" msgstr "Fichier archive (zip, tgz)" #: ../AMC-gui.pl:5739 #, perl-format msgid "Nothing extracted from archive %s. Check it." msgstr "Rien n'a pu être extrait du fichier %s. Vérifiez qu'il est correct." #: ../AMC-gui.pl:5868 #, perl-format msgid "File %s already exists in project directory: do you want to replace it?" msgstr "Le fichier %s existe déjà dans le répertoire projet : voulez-vous écraser son ancien contenu ?" #: ../AMC-gui.pl:5869 msgid "Click yes to replace it and loose pre-existing contents, or No to cancel source file import." msgstr "Cliquez sur oui pour remplacer le fichier pré-existant par celui que vous venez de sélectionner, ou sur non pour annuler l'import du fichier source." #: ../AMC-gui.pl:5885 msgid "The source file has been copied to project directory." msgstr "Le fichier source a été copié dans le répertoire projet." #: ../AMC-gui.pl:5885 #, perl-format msgid "You can now edit it with button \"%s\" or with any editor." msgstr "Vous pouvez maintenant l'éditer soit en utilisant le bouton \"%s\", soit directement grâce au logiciel de votre choix." #: ../AMC-gui.pl:5885 ../AMC-gui-main_window.glade:241 msgid "Edit source file" msgstr "Éditer le fichier source" #: ../AMC-gui.pl:5893 #, perl-format msgid "Error copying source file: %s" msgstr "Erreur durant la copie du fichier source : %s" #: ../AMC-gui.pl:6078 msgid "In order to send a useful bug report, please attach the following documents:" msgstr "Pour envoyer un rapport de bogue utilisable, veuillez joindre les documents suivants :" #: ../AMC-gui.pl:6079 msgid "an archive (in some compressed format, like ZIP, 7Z, TGZ...) containing the project directory, scan files and configuration directory (.AMC.d in home directory), so as to reproduce and analyse this problem." msgstr "une archive (dans format comprimé tel que ZIP, 7Z , TGZ, etc.) contenant le dossier du projet, les fichiers de scan ainsi que le répertoire de configuration (.AMC.d dans le répertoire personnel), afin de reproduire et d'analyser le problème." #: ../AMC-gui.pl:6080 msgid "the log file produced when the debugging mode (in Help menu) is checked. Please try to reproduce the bug with this mode activated." msgstr "le fichier de log produit quand le mode de débogage (dans le menu Aide) est coché. Merci d'essayer de reproduire la bogue pendant que ce mode est activé." #: ../AMC-gui.pl:6081 #, perl-format msgid "Bug reports can be filled at %s or sent to the address below." msgstr "Les rapports de bogue peuvent être transmis sur %s ou être envoyés à l'adresse ci-dessous." #: ../AMC-gui.pl:6082 ../AMC-gui.pl:6086 msgid "AMC community site" msgstr "le site de la communauté AMC" #: ../AMC-gui.pl:6149 msgid "Attach file" msgstr "Joindre un fichier" #: ../AMC-gui.pl:6183 msgid "There are no annotated corrected answer sheets to send." msgstr "Il n'y a aucune copie annotée à envoyer." #: ../AMC-gui.pl:6186 msgid "Please group the annotated sheets to PDF files to be able to send them." msgstr "Veuillez regrouper les pages corrigées en un fichier PDF par étudiant pour les envoyer ensuite." #: ../AMC-gui.pl:6187 msgid "Please annotate answer sheets and group them to PDF files to be able to send them." msgstr "Veuillez annoter les scans et les regrouper en fichiers PDF avant de pouvoir les envoyer." #: ../AMC-gui.pl:6218 #, perl-format msgid "Sending emails requires some perl modules that are not installed: %s. Please install these modules and try again." msgstr "L'envoi de courriels nécessite la présence de certains modules perl qui ne sont pas installés sur votre système : %s. Veuillez les installer avant de recommencer." #: ../AMC-gui.pl:6239 msgid "SMTP security mode \"STARTTLS\" is only available with Email::Sender version 1.300027 and over. Please install a newer version of this perl module or change SMTP security mode, and try again." msgstr "Le mode SMTP \"STARTTLS\" est disponible à partir de la version 1.300027 de Email::Sender. Veuillez installer une version plus récente de ce module perl ou modifier le mode d'authentification SMTP, et réessayez." #: ../AMC-gui.pl:6255 #, perl-format msgid "The email address you entered (%s) is not correct." msgstr "L'adresse courriel que vous avez entrée (%s) n'est pas correcte." #: ../AMC-gui.pl:6257 msgid "Please edit your preferences to correct your email address." msgstr "Éditez les préférences pour corriger votre adresse de courriel." #: ../AMC-gui.pl:6259 msgid "You did not enter your email address." msgstr "Vous n'avez pas entré votre adresse de courriel." #: ../AMC-gui.pl:6260 msgid "Please edit the preferences to set your email address." msgstr "Veuillez éditer les préférences pour préciser votre adresse de courriel." #: ../AMC-gui.pl:6283 #, perl-format msgid "The sendmail program cannot be found at the location you specified in the preferences (%s). Please update your configuration." msgstr "Le programme sendmail n'a pas pu être trouvé à l'endroit spécifié dans les préférences (%s). Veuillez corriger votre configuration." #: ../AMC-gui.pl:6303 msgid "No email addresses has been found in the students list file. You need to write the students addresses in a column of this file." msgstr "Aucune adresse courriel n'a été trouvée dans la liste des étudiants. Vous devez entrer les adresses courriels des étudiants dans une colonne de cette liste." #. TRANSLATORS: This is the title of a column containing copy numbers in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:6351 msgid "copy" msgstr "copie" #. TRANSLATORS: This is the title of a column containing students email addresses in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:6363 msgid "email" msgstr "courriel" #. TRANSLATORS: This is the title of a column containing mailing status (not sent, already sent, failed) in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:6369 msgid "status" msgstr "état" #: ../AMC-gui.pl:6388 msgid "failed" msgstr "échec" #: ../AMC-gui.pl:6446 msgid "Some files you asked to be attached to the emails are missing:" msgstr "Des fichiers que vous voulez joindre au courriel n'ont pas été trouvés :" #: ../AMC-gui.pl:6447 msgid "Please create them or remove them from the list of attached files." msgstr "Veuillez les créer ou les enlever de la liste des fichiers à joindre." #: ../AMC-gui.pl:6499 msgid "Sending emails..." msgstr "Envoi des courriels..." #: ../AMC-gui.pl:6508 msgid "Cancelled." msgstr "Annulé." #: ../AMC-gui.pl:6510 msgid "SMTP authentication failed: check SMTP configuration and password." msgstr "L'authentification SMTP a échoué : vérifiez la configuration et le mot de passe SMTP." #: ../AMC-gui.pl:6512 #, perl-format msgid "%d message(s) has been sent." msgstr "%d messages ont été envoyés." #: ../AMC-gui.pl:6552 msgid "Set exam name" msgstr "Changement du nom de l'examen" #: ../AMC-gui.pl:6559 ../AMC-gui-edit_preferences.glade:4154 msgid "Examination name" msgstr "Nom de l'examen" #: ../AMC-gui.pl:6563 ../AMC-gui-edit_preferences.glade:4165 msgid "Code (short name) for examination" msgstr "Code (ou nom court) de l'examen" #. TRANSLATORS: This is the title of a column containing all columns names from the students list file, when choosing which columns has to be exported to the spreadsheets. #: ../AMC-gui.pl:6613 msgid "column" msgstr "colonne" #: ../AMC-gui.pl:6621 msgid "" msgstr "" #: ../AMC-gui.pl:6622 msgid "" msgstr "" #: ../AMC-gui.pl:6623 msgid "" msgstr "" #: ../AMC-gui.pl:6657 msgid "Install an AMC plugin" msgstr "Installer un plugin AMC" #: ../AMC-gui.pl:6662 msgid "Plugins (zip, tgz)" msgstr "Plugins (zip, tgz)" #: ../AMC-gui.pl:6682 #, perl-format msgid "An error occured while trying to extract files from the plugin archive: %s." msgstr "Une erreur est survenue lors de la décompression du plugin : %s." #: ../AMC-gui.pl:6696 msgid "Nothing extracted from the plugin archive. Check it." msgstr "Rien n'a pu être extrait du fichier plugin %s. Vérifiez qu'il est correct." #: ../AMC-gui.pl:6706 msgid "This is not a valid plugin, as it contains more than one directory at the first level." msgstr "Ce n'est pas un plugin valide, car il contient plus qu'un répertoire au premier niveau." #: ../AMC-gui.pl:6717 msgid "This is not a valid plugin, as it does not contain a perl/AMC subdirectory." msgstr "Ce n'est pas un plugin valide, car il ne contient pas de sous-répertoire perl/AMC." #: ../AMC-gui.pl:6734 #, perl-format msgid "A plugin is already installed with the same name (%s). Do you want to delete the old one and overwrite?" msgstr "Un plugin est déjà installé sous ce nom (%s). Voulez-vous le supprimer et installer le nouveau ?" #: ../AMC-gui.pl:6752 #, perl-format msgid "Error while moving the plugin to the user plugin directory: %s" msgstr "Erreur lors du déplacement du plugin vers le répertoire des plugins de l'utilisateur : %s" #: ../AMC-gui.pl:6762 msgid "Please restart AMC before using the new plugin..." msgstr "Veuillez redémarrer AMC avant d'utiliser ce nouveau plugin..." #: ../AMC-gui.pl:6814 msgid "zooms" msgstr "zooms" #: ../AMC-gui.pl:6815 msgid "boxes images are extracted from the scans while processing automatic data capture. They can be removed if you don't plan to use the zooms dialog to check and correct boxes categorization. They can be recovered processing again automatic data capture from the same scans." msgstr "les images des cases à cocher sont extraites des scans lors de la saisie automatique. Elles peuvent être effacées si vous ne prévoyez pas d'utiliser la fenêtre des zooms pour vérifier et corriger la catégorisation des cases. Ces images peuvent être refabriquées en effectuant de nouveau l'association automatique." #: ../AMC-gui.pl:6827 msgid "layout reports" msgstr "rapports de positionnement" #: ../AMC-gui.pl:6828 msgid "these images are intended to show how the corner marks have been recognized and positioned on the scans. They can be safely removed once the scans are known to be well-recognized. They can be recovered processing again automatic data capture from the same scans." msgstr "ces images servent à visualiser la précision du calage du modèle de page avec le scan. Elles peuvent être effacées sans problème une fois que toutes les pages ont été correctement reconnues. Elles pourront être refabriquées en relançant une saisie automatique à partir des même scans." #: ../AMC-gui.pl:6843 msgid "annotated pages" msgstr "pages annotées" #: ../AMC-gui.pl:6844 msgid "jpeg annotated pages are made before beeing assembled to PDF annotated files. They can safely be removed, and will be recovered automatically the next time annotation will be requested." msgstr "les pages annotées au format jpeg sont fabriquées par AMC avant d'être regroupées en copies annotées. Elles peuvent être effacées sans problème, et seront générées de nouveau la prochaine fois que vous demanderez la fabrication des copies annotées." #: ../AMC-gui.pl:6874 msgid "Total size of concerned files:" msgstr "Taille totale des fichiers concernés :" #: ../AMC-gui.pl:6923 #, perl-format msgid "%s files were removed." msgstr "%s fichiers ont été effacés." #: ../AMC-gui.pl:6949 #, perl-format msgid "I don't find the command %s." msgstr "Je ne trouve pas la commande %s." #: ../AMC-gui.pl:6950 msgid "Perhaps LaTeX is not installed?" msgstr "Peut-être LaTeX n'est-il pas installé ?" #. TRANSLATORS: Do not translate 'auto-multiple-choice latex-link', which is a command to be typed on MacOsX #: ../AMC-gui.pl:6954 msgid "The style file automultiplechoice.sty seems to be unreachable. Try to use command 'auto-multiple-choice latex-link' as root to fix this." msgstr "Le fichier style automultiplechoice.sty ne semble pas être accessible par LaTeX. Essayez la commande 'auto-multiple-choice latex-link' en tant que super-utilisateur (root) pour corriger ce problème." #: ../AMC-prepare.pl:274 #, perl-format msgid "%d/%d good answers not coherent for a simple question" msgstr "%d/%d bonnes réponses dans une question simple" #: ../AMC-prepare.pl:357 #, perl-format msgid "question ID used several times for the same paper: \"%s\"" msgstr "identifiant d'exercice utilisé plusieurs fois : « %s »" #: ../AMC-prepare.pl:444 #, perl-format msgid "An answer appears to be given outside a question environment, after question \"%s\"" msgstr "Une réponse a été mentionnée en-dehors d'un environnement question, après la question \"%s\"" #: ../AMC-prepare.pl:453 #, perl-format msgid "Answer number ID used several times for the same question: %s" msgstr "Numéro de réponse utilisé plusieurs fois : %s" #: ../AMC-prepare.pl:708 #, perl-format msgid "%d errors during LaTeX compiling" msgstr "%d erreurs lors de la compilation LaTeX" #: ../AMC-prepare.pl:768 #, perl-format msgid "LaTeX command configured is not present (%s). Install it or change configuration, and then rerun." msgstr "Le moteur LaTeX configuré n'est pas installé (%s). Installez-le, ou modifiez la configuration, puis relancez." #: ../AMC-prepare.pl:797 msgid "solution" msgstr "corrigé" #: ../AMC-prepare.pl:812 msgid "catalog" msgstr "catalogue" #: ../AMC-prepare.pl:845 msgid "question sheet" msgstr "sujet" #: ../AMC-prepare.pl:873 #, perl-format msgid "please remove accentuated or non-standard characters from the following question ID: \"%s\"" msgstr "effacez les caractères accentués ou non standards des identifiants des questions suivantes : \"%s\"" #: ../AMC-prepare.pl:875 msgid "some question IDs seems to have accentuated or non-standard characters. This may break future processings." msgstr "certains identifiants de questions ont des caractères accentués ou non standards. Cela peut gêner la compilation." #: ../AMC-read-pdfform.pl:136 msgid "Reading PDF forms..." msgstr "Lecture des formulaires PDF..." #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:592 msgid "Name [name column title in exported spreadsheet]" msgstr "Nom" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:594 msgid "Mark [mark column title in exported spreadsheet]" msgstr "Note" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:596 msgid "Exam [exam number column title in exported spreadsheet]" msgstr "Copie" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:598 msgid "Score [total score column title in exported spreadsheet]" msgstr "Total" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:600 msgid "Max [maximum score column title in exported spreadsheet]" msgstr "Max" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:604 msgid "max [maximum score row name in exported spreadsheet]" msgstr "max" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:606 msgid "mean [means of scores row name in exported spreadsheet]" msgstr "moyenne" #. TRANSLATORS: This is the default text to be written on the top of the first page of each paper when annotating. From this string, %s will be replaced with the student final mark, %m with the maximum mark he can obtain, %S with the student total score, and %M with the maximum score the student can obtain. #: ../AMC-perl/AMC/Config.pm:319 msgid "Mark: %s/%m (total score: %S/%M)" msgstr "Note: %s/%m (score total : %S/%M)" #. TRANSLATORS: Subject of the emails which can be sent to the students to give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:344 msgid "Exam result" msgstr "Résultat de l'examen" #. TRANSLATORS: Body text of the emails which can be sent to the students to give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:346 msgid "" "Please find enclosed your annotated completed answer sheet.\n" "Regards." msgstr "" "Veuillez trouver ci-jointe votre copie corrigée.\n" "Cordialement." #. TRANSLATORS: Message (first part) when some of the commands that are given in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:598 msgid "Some commands allowing to open documents can't be found:" msgstr "Certaines commandes prévues pour l'ouverture de documents ne sont pas accessibles :" #. TRANSLATORS: Message (second part) when some of the commands that are given in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:601 msgid "Please check its correct spelling and install missing software." msgstr "Vérifiez que les commandes sont les bonnes et que les programmes correspondants sont bien installés." #. TRANSLATORS: Message (third part) when some of the commands that are given in the preferences cannot be found. The %s will be replaced with the name of the menu entry "Preferences" and the name of the menu "Edit". #: ../AMC-perl/AMC/Config.pm:603 #, perl-format msgid "You can change used commands following %s from menu %s." msgstr "Vous pouvez aussi modifier les commandes à utiliser en sélectionnant %s dans le menu %s." #. TRANSLATORS: "Preferences" menu #: ../AMC-perl/AMC/Config.pm:605 ../AMC-gui-main_window.glade:2706 msgid "Preferences" msgstr "Préférences" #. TRANSLATORS: "Edit" menu #: ../AMC-perl/AMC/Config.pm:607 msgid "Edit" msgstr "Édition" #. TRANSLATORS: Error writing one of the configuration files (global or project). The first %s will be replaced with the path of that file, and the second with the error text. #: ../AMC-perl/AMC/Config.pm:841 #, perl-format msgid "Error writing configuration file %s: %s" msgstr "Erreur à la lecture du fichier d'options %s : %s" #: ../AMC-perl/AMC/DataModule/association.pm:103 msgid "Fetching association results from old format XML files..." msgstr "Récupération des résultats d'association depuis les anciens fichiers XML..." #: ../AMC-perl/AMC/DataModule/capture.pm:210 msgid "Including zooms in the database..." msgstr "Inclusion des zooms dans la base de données..." #: ../AMC-perl/AMC/DataModule/capture.pm:229 #: ../AMC-perl/AMC/DataModule/capture.pm:237 msgid "Building capture database indexes..." msgstr "Construction d'un index dans la base de saisie..." #: ../AMC-perl/AMC/DataModule/capture.pm:279 msgid "Fetching data capture results from old format XML files..." msgstr "Récupération des saisies depuis les anciens fichiers XML..." #: ../AMC-perl/AMC/DataModule/layout.pm:222 msgid "Building layout database indexes..." msgstr "Construction d'un index dans la base de mise en page..." #: ../AMC-perl/AMC/DataModule/layout.pm:288 msgid "Fetching layout data from old format XML files..." msgstr "Récupération des mises en page depuis les anciens fichiers XML..." #: ../AMC-perl/AMC/DataModule/scoring.pm:256 msgid "Fetching scoring data from old format XML files..." msgstr "Récupération de la notation depuis les anciens fichiers XML..." #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the total number of sheets. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:236 msgid "ALL" msgstr "TOTAL" #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the number of sheets for which the question did not get an answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:238 msgid "NA" msgstr "NONREP" #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the number of sheets for which the question got an invalid answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:240 msgid "INVALID" msgstr "INVALIDE" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains the reference of the boxes. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:268 msgid "Box" msgstr "Case" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains the number of items (ticked boxes, or invalid or empty questions). Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:271 msgid "Nb" msgstr "Nb" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains percentage of questions for which the corresponding box is ticked over all questions. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:274 msgid "/all" msgstr "/tous" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains percentage of questions for which the corresponding box is ticked over the expressed questions (counting only questions that did not get empty or invalid answers). Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:277 msgid "/expr" msgstr "/expr" #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the number of sheets for which the question got the "none of the above are correct" answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:305 msgid "NONE" msgstr "AUCUNE" #. TRANSLATORS: table name in the exported ODS spreadsheet for the table that contains the marks. #: ../AMC-perl/AMC/Export/ods.pm:883 ../AMC-perl/AMC/Gui/Notes.glade:8 msgid "Marks" msgstr "Notes" #. TRANSLATORS: Label of the table with questions basic statistics in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1310 msgid "Questions statistics" msgstr "Statistiques des questions" #. TRANSLATORS: Label of the table with indicative questions basic statistics in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1317 msgid "Indicative questions statistics" msgstr "Statistiques des questions indicatives" #. TRANSLATORS: Label of the table with a legend (explaination of the colors used) in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1327 ../AMC-perl/AMC/Export/ods.pm:1331 msgid "Legend" msgstr "Légende" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that have not been asked to some students. #: ../AMC-perl/AMC/Export/ods.pm:1337 msgid "Non applicable" msgstr "Non applicable" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that have not been answered. #: ../AMC-perl/AMC/Export/ods.pm:1341 msgid "No answer" msgstr "Sans réponse" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that have not been answered, but are cancelled by the use of allowempty scoring strategy. #: ../AMC-perl/AMC/Export/ods.pm:1345 msgid "Cancelled" msgstr "Annulées" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1349 msgid "Invalid answer" msgstr "Réponse invalide" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1354 msgid "Correct answer" msgstr "Bonne réponse" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1358 msgid "Wrong answer" msgstr "Mauvaise réponse" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the indicative questions. #: ../AMC-perl/AMC/Export/ods.pm:1363 msgid "Indicative" msgstr "Indicative" #: ../AMC-perl/AMC/Export/ods.pm:1391 msgid "An old state of the exported file seems to be already opened. Use File/Reload from OpenOffice/LibreOffice to refresh." msgstr "Une ancienne version du fichier exporté semble être ouverte actuellement. Utilisez l'action Fichier/Recharger pour voir la nouvelle version." #: ../AMC-perl/AMC/Filter/plain.pm:92 msgid "Please code your student number opposite, and write your name in the box below." msgstr "Veuillez coder votre numéro d'étudiant ci-contre et écrire votre nom dans la case ci-dessous." #. TRANSLATORS: Message when the Pages option used in AMC-TXT can't be parsed. %s will be replaced with the option value #: ../AMC-perl/AMC/Filter/plain.pm:209 #, perl-format msgid "Pages option value can't be understood: %s" msgstr "Valeur invalide pour l'option Pages : %s" #: ../AMC-perl/AMC/Filter/plain.pm:238 #, perl-format msgid "Line %d" msgstr "Ligne %d" #. TRANSLATORS: Error text for AMC-TXT parsing, when opening a new question whereas the previous question has less than two choices #: ../AMC-perl/AMC/Filter/plain.pm:249 msgid "Previous question has less than two choices" msgstr "La question précédente a moins de deux réponses" #. TRANSLATORS: Error text for AMC-TXT parsing #: ../AMC-perl/AMC/Filter/plain.pm:258 #, perl-format msgid "Previous question is a simple question but has %d correct choice(s)" msgstr "La question précédente est une question simple mais a %d réponses correctes" #: ../AMC-perl/AMC/Filter/plain.pm:342 msgid "Invalid encoding: you must use UTF-8, but your source file was saved using another encoding" msgstr "Encodage invalide : vous devez utiliser UTF-8 mais votre fichier source a été enregistré avec un autre encodage" #: ../AMC-perl/AMC/Filter/plain.pm:368 #, perl-format msgid "File not found: %s" msgstr "Fichier inexistant : %s" #. TRANSLATORS: Error text for AMC-TXT parsing, when an unknown option is given a value #: ../AMC-perl/AMC/Filter/plain.pm:386 #, perl-format msgid "Unknown option: %s" msgstr "Option inconnue : %s" #. TRANSLATORS: Error text for AMC-TXT parsing when a choice is given but no question were opened #: ../AMC-perl/AMC/Filter/plain.pm:456 msgid "Choice outside question" msgstr "Une réponse est donnée en-dehors d'une question" #: ../AMC-perl/AMC/Filter/plain.pm:1240 #, perl-format msgid "The following fonts does not seem to be installed on the system: %s." msgstr "Les polices de caractères suivantes ne semblent pas installées sur votre système : %s." #: ../AMC-perl/AMC/Filter/register.pm:78 msgid "No description available." msgstr "Aucune description disponible." #: ../AMC-perl/AMC/Gui/Association.pm:133 msgid "Names images not found... Maybe you forgot using \\namefield command in LaTeX source?" msgstr "Je ne trouve pas d'images de noms... Peut-être avez-vous oublié d'utiliser la commande \\champnom dans le source LaTeX ?" #: ../AMC-perl/AMC/Gui/Association.pm:690 msgid "Sheet" msgstr "Page" #: ../AMC-perl/AMC/Gui/Association.pm:728 msgid "End" msgstr "Fin" #: ../AMC-perl/AMC/Gui/Manuel.pm:117 msgid "Page layout" msgstr "Mise en page" #: ../AMC-perl/AMC/Gui/Manuel.pm:125 msgid "Original" msgstr "Original" #: ../AMC-perl/AMC/Gui/Manuel.pm:126 ../AMC-gui-edit_preferences.glade:2138 msgid "Scan" msgstr "Scan" #. TRANSLATORS: This is one of the choices for pages navigation in manual data capture window. Here, navigation goes through all pages. Please keep this text very short (say less than 5 letters) so that the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:130 ../AMC-perl/AMC/Gui/Manuel.pm:146 msgid "all" msgstr "toutes" #. TRANSLATORS: This is one of the choices for pages navigation in manual data capture window. Here, navigation goes through pages with some invalid answers. Please keep this text very short (say less than 5 letters) so that the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:132 msgid "inv" msgstr "inv" #. TRANSLATORS: This is one of the choices for pages navigation in manual data capture window. Here, navigation goes through pages with empty or invalid answers. Please keep this text very short (say less than 5 letters) so that the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:134 msgid "i&e" msgstr "i&v" #: ../AMC-perl/AMC/Gui/Manuel.pm:184 msgid "page" msgstr "page" #: ../AMC-perl/AMC/Gui/Manuel.pm:531 #, perl-format msgid "This is a template exam that you cannot edit. To create a new exam from this one to be edited, use the '%s' button." msgstr "Ceci est un modèle de page que vous ne pouvez pas éditer. Pour en créer une copie éditable, utilisez le bouton \"%s\"." #: ../AMC-perl/AMC/Gui/Manuel.pm:531 ../AMC-perl/AMC/Gui/Manuel.glade:406 msgid "Add photocopy" msgstr "Ajouter une photocopie" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms window #: ../AMC-perl/AMC/Gui/Zooms.pm:76 msgid "drag and drop" msgstr "cliquer-glisser" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms window #: ../AMC-perl/AMC/Gui/Zooms.pm:78 msgid "click" msgstr "clic" #: ../AMC-perl/AMC/Gui/Zooms.pm:126 ../AMC-perl/AMC/Gui/Zooms.pm:413 #, perl-format msgid "Boxes zooms for page %s" msgstr "Cases de la page %s" #: ../AMC-perl/AMC/Gui/Zooms.pm:402 ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "You moved some boxes to correct automatic data query, but this work is not saved yet." msgstr "Vous avez déplacé des cases pour corriger la saisie automatique, mais ces modifications n'ont pas encore été sauvées." #: ../AMC-perl/AMC/Gui/Zooms.pm:402 msgid "Do you want to save these modifications before looking at another page?" msgstr "Voulez-vous sauvegarder ces modifications avant de passer à une autre page ?" #: ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "Dou you really want to close and ignore these modifications?" msgstr "Voulez-vous vraiment fermer et ignorer ces modifications ?" #: ../AMC-perl/AMC/Print/cups.pm:71 #, perl-format msgid "Perl module(s) missing: %s" msgstr "Modules Perl manquants : %s" #: ../AMC-perl/AMC/Print/cupslp.pm:47 #, perl-format msgid "The following commands are missing: %s." msgstr "Les commandes suivantes sont manquantes : %s." #: ../AMC-perl/AMC/Export/register/CSV.pm:70 msgid "Separator" msgstr "Séparateur" #: ../AMC-perl/AMC/Export/register/CSV.pm:83 msgid "Ticked boxes" msgstr "Cases cochées" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'No, don't group questions by scope in the exported ODS file' #: ../AMC-perl/AMC/Export/register/CSV.pm:89 #: ../AMC-perl/AMC/Export/register/ods.pm:124 msgid "No" msgstr "Non" #: ../AMC-perl/AMC/Export/register/CSV.pm:90 #: ../AMC-perl/AMC/Export/register/CSV.pm:91 msgid "Yes:" msgstr "Oui :" #: ../AMC-perl/AMC/Export/register/CSV.pm:97 #: ../AMC-perl/AMC/Export/register/ods.pm:152 msgid "Choose columns" msgstr "Choix des colonnes" #. TRANSLATORS: List of students with their scores: one of the export formats. #: ../AMC-perl/AMC/Export/register/List.pm:37 msgid "PDF list" msgstr "Liste PDF" #: ../AMC-perl/AMC/Export/register/List.pm:64 msgid "Number of columns" msgstr "Nombre de colonnes" #: ../AMC-perl/AMC/Export/register/List.pm:67 msgid "Long list is divided into this number of columns on each page." msgstr "Les listes longues seront réparties sur ce nombre de colonnes sur chaque page." #: ../AMC-perl/AMC/Export/register/List.pm:71 msgid "Paper size" msgstr "Taille du papier" #. TRANSLATORS: Check button label in the exports tab. If checked, a table with questions basic statistics will be added to the ODS exported spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:82 msgid "Stats table" msgstr "Table de statistiques" #. TRANSLATORS: Menu to export statistics table in the exports tab. The first menu entry means 'do not build a stats table' in the exported ODS file. You can omit the [...] part, that is here only to state the context. #: ../AMC-perl/AMC/Export/register/ods.pm:89 msgid "None [no stats table to export]" msgstr "Aucune table de statistiques à exporter" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second menu entry means 'build a stats table, with a horizontal flow' in the exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:91 #: ../AMC-perl/AMC/Export/register/ods.pm:106 msgid "Horizontal flow" msgstr "Alignement horizontal" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second menu entry means 'build a stats table, with a vertical flow' in the exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:93 #: ../AMC-perl/AMC/Export/register/ods.pm:107 msgid "Vertical flow" msgstr "Alignement vertical" #. TRANSLATORS: Check button label in the exports tab. If checked, a table with indicative questions basic statistics will be added to the ODS exported spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:99 msgid "Indicative stats table" msgstr "Stats des questions indicatives" #: ../AMC-perl/AMC/Export/register/ods.pm:105 msgid "None" msgstr "Aucun" #: ../AMC-perl/AMC/Export/register/ods.pm:110 msgid "Create a table with basic statistics about answers for each indicative question?" msgstr "Créer une table de statistiques simples sur chaque question indicative ?" #. TRANSLATORS: Check button label in the exports tab. If checked, sums of the scores for groups of questions will be added to the exported table. #: ../AMC-perl/AMC/Export/register/ods.pm:114 msgid "Score groups" msgstr "Totaux des groupes" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'Yes, group questions by scope in the exported ODS file, and report total scores' #: ../AMC-perl/AMC/Export/register/ods.pm:126 msgid "Yes (values)" msgstr "Oui (totaux)" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'Yes, group questions by scope in the exported ODS file, and report total scores as percentages.' #: ../AMC-perl/AMC/Export/register/ods.pm:128 msgid "Yes (percentages)" msgstr "Oui (pourcentages)" #: ../AMC-perl/AMC/Export/register/ods.pm:131 msgid "Add sums of the scores for each question group?" msgstr "Ajouter une colonne de total pour chaque groupe de questions ?" #: ../AMC-perl/AMC/Export/register/ods.pm:134 msgid "with scope separator" msgstr "avec séparateur de champs" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'No, don't group questions by scope in the exported ODS file' #: ../AMC-perl/AMC/Export/register/ods.pm:141 msgid "':'" msgstr "':'" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'Yes, group questions by scope in the exported ODS file, and you can detect the scope from a question ID using the text before the separator .' #: ../AMC-perl/AMC/Export/register/ods.pm:143 msgid "'.'" msgstr "'.'" #: ../AMC-perl/AMC/Export/register/ods.pm:146 msgid "To define groups, use question ids in the form \"group:question\" or \"group.question\", depending on the scope separator." msgstr "Pour définir les groupes, utilisez des identifiants de questions sous la forme \"groupe:question\" ou \"groupe.question\", suivant votre choix de séparateur de domaine." #: ../AMC-perl/AMC/Filter/register/latex.pm:54 msgid "" "This is the native format for AMC. LaTeX is not so easy to use for unexperienced users, but the LaTeX power allows the user to build any multiple choice subject. As an example, the following is possible with LaTeX but not with other formats:\n" "* any kind of layout,\n" "* questions with random numerical values,\n" "* use of figures, mathematical formulas\n" "* and much more!" msgstr "" "C'est le format natif pour AMC. La langage LaTeX n'est pas toujours facile à manipuler pour les novices, mais sa puissance permet d'obtenir tout ce que l'on veut pour son sujet. Quelques exemples de ce qui est possible avec LaTeX mais pas avec les autres formats :\n" "* toute mise en page peut être obtenue avec LaTeX,\n" "* des questions avec données numériques aléatoires,\n" "* l'insertion d'images, de figures, de formules mathématiques,\n" "* et bien d'autres choses encore !" #: ../AMC-perl/AMC/Filter/register/plain.pm:51 msgid "" "This is a plain text format for easy question writting. See the following minimal example:\n" "\n" "Title: Paper title\n" "\n" "* Which is the capital city of Cameroon?\n" "+ Yaounde\n" "- Douala\n" "- Kribi" msgstr "" "C'est un format en texte pur pour une écriture aisée de questionnaires simples. Un petit exemple minimal permet de se faire une idée :\n" "\n" "Title: Titre de l'examen\n" "\n" "* Quelle est la capitale du Cameroun ?\n" "+ Yaoundé\n" "- Douala\n" "- Kribi" #: ../AMC-gui-apropos.glade:8 msgid "AMC A propos" msgstr "À propos de AMC" #: ../AMC-gui-apropos.glade:17 msgid "" "Copyright (C) 2008-2018\n" "Alexis Bienvenüe and the AMC development team" msgstr "" "Copyright (C) 2008-2018\n" "Alexis Bienvenüe et l'équipe de développement d'AMC" #: ../AMC-gui-apropos.glade:19 msgid "Automatic multiple choice questionnaires management" msgstr "Traitement automatisé de formulaires QCM" #: ../AMC-gui-apropos.glade:21 msgid "Visit the AMC website" msgstr "Visitez le site internet d'AMC" #: ../AMC-gui-choix_pages_impression.glade:33 msgid "Papers printing" msgstr "Impression de copies" #: ../AMC-gui-choix_pages_impression.glade:98 msgid "Please select papers you wish to print:" msgstr "Sélectionnez les copies que vous souhaitez imprimer :" #: ../AMC-gui-choix_pages_impression.glade:116 msgid "Select papers you wish to print (ctrl-a for all), then confirm..." msgstr "Sélectionnez la ou les copies que vous voulez imprimer (ctrl-a permet de les choisir toutes), puis validez..." #: ../AMC-gui-choix_pages_impression.glade:144 msgid "Answer sheet printing" msgstr "Impression feuille réponses" #: ../AMC-gui-choix_pages_impression.glade:190 msgid "Printer:" msgstr "Imprimante :" #: ../AMC-gui-choix_pages_impression.glade:243 msgid "two-side printing" msgstr "recto/verso" #: ../AMC-gui-choix_pages_impression.glade:319 msgid "printing options" msgstr "options d'impression" #: ../AMC-gui-choix_pages_impression.glade:343 msgid "Destination directory" msgstr "Répertoire destination" #: ../AMC-gui-choix_pages_impression.glade:356 msgid "Select destination directory for printable files" msgstr "Sélectionner un répertoire destination pour les fichiers PDF à imprimer" #: ../AMC-gui-choix_postcorrect.glade:20 msgid "Post-correction" msgstr "Post-correction" #: ../AMC-gui-choix_postcorrect.glade:95 msgid "Please enter the teacher score sheet number and copy number to get the correct answers from:" msgstr "Indiquez la copie de l'enseignant, afin de connaître quelles sont les bonnes réponses :" #: ../AMC-gui-choix_postcorrect.glade:189 msgid "Guess simple/multiple status" msgstr "Estimer statut simple/multiple des questions" #: ../AMC-gui-choix_postcorrect.glade:194 msgid "Sets type of all questions for which 2 or more answers are ticked on the teacher answer sheet to multiple" msgstr "Identifie sur la feuille du professeur les questions multiples pour lesquelles 2 ou plusieurs réponses sont cochées" #: ../AMC-gui-choix_projet.glade:18 msgid "Open a MC project" msgstr "Ouverture d'un projet de QCM" #: ../AMC-gui-choix_projet.glade:61 ../AMC-gui-liste_dialog.glade:91 msgid "Cancel" msgstr "Annuler" #: ../AMC-gui-choix_projet.glade:104 ../AMC-gui-main_window.glade:2665 msgid "New project" msgstr "Créer un projet" #: ../AMC-gui-choix_projet.glade:163 msgid "Rename" msgstr "Renommer" #: ../AMC-gui-choix_projet.glade:182 msgid "Clone" msgstr "Cloner" #: ../AMC-gui-choix_projet.glade:278 msgid "Open an existing MC project:" msgstr "Ouverture d'un projet existant :" #: ../AMC-gui-choix_projet.glade:345 msgid "Create an new project:" msgstr "Création d'un nouveau projet :" #: ../AMC-gui-choix_projet.glade:364 msgid "Project name:" msgstr "Nom du projet :" #: ../AMC-gui-choix_projet.glade:398 msgid "Note : a project name can only contain alphanumeric characters, plus some simple characters (-_+.:)." msgstr "Note : Un nom de projet ne peut contenir que des caractères alphanumériques et quelques autres caractères simples (-_+.:)." #: ../AMC-gui-choose-mode.glade:10 msgid "Before starting data capture, please choose the mode corresponding to what you did with the printed questions." msgstr "Avant de commencer la saisie, veuillez choisir le mode qui correspond à votre situation." #: ../AMC-gui-choose_columns.glade:8 msgid "Choose columns to export" msgstr "Choix des colonnes à exporter" #: ../AMC-gui-choose_columns.glade:65 msgid "Order and select the columns to include in the exported file:" msgstr "Ordonnez et sélectionnez les colonnes que vous désirez inclure dans le fichier exporté :" #: ../AMC-gui-choose_students.glade:13 msgid "Choose students" msgstr "Choix des étudiants" #: ../AMC-gui-choose_students.glade:70 msgid "Select the students for which you want to annotate the score sheet:" msgstr "Sélectionnez les étudiants dont vous voulez annoter la copie :" #: ../AMC-gui-choose_students.glade:114 msgid "Search:" msgstr "Recherche :" #: ../AMC-gui-cleanup.glade:13 ../AMC-gui-main_window.glade:2939 msgid "Cleanup" msgstr "Nettoyage" #: ../AMC-gui-cleanup.glade:40 msgid "Remove selected files" msgstr "Efface les fichiers sélectionnés" #: ../AMC-gui-cleanup.glade:71 msgid "To save disk space, you can remove some intermediate files from your project directory." msgstr "Pour économiser de l'espace sur votre disque dur, vous pouvez effacer certains fichiers intermédiaires de votre répertoire projet." #: ../AMC-gui-edit_preferences.glade:230 ../AMC-gui-edit_preferences.glade:243 msgid "LaTeX models directory" msgstr "Répertoire contenant les modèles de fichiers LaTeX" #: ../AMC-gui-edit_preferences.glade:232 msgid "Please select a directory containing LaTeX models for AMC, with their descriptions" msgstr "Sélectionner le répertoire qui contient les modèles de fichiers LaTeX de QCM" #: ../AMC-gui-edit_preferences.glade:255 msgid "Projects directory. May be modified only if there are no opened projects." msgstr "Répertoire contenant tous les projets. Il ne peut être modifié que si aucun projet n'est ouvert." #: ../AMC-gui-edit_preferences.glade:257 msgid "Please select the projects directory" msgstr "Sélectionner le dossier qui contient les projets" #: ../AMC-gui-edit_preferences.glade:268 msgid "Projects directory" msgstr "Répertoire des projets" #: ../AMC-gui-edit_preferences.glade:283 msgid "Directories" msgstr "Répertoires" #: ../AMC-gui-edit_preferences.glade:315 msgid "PDF files" msgstr "Fichiers PDF" #: ../AMC-gui-edit_preferences.glade:326 msgid "Images" msgstr "Images" #: ../AMC-gui-edit_preferences.glade:337 msgid "CSV data files" msgstr "Fichiers de données CSV" #: ../AMC-gui-edit_preferences.glade:348 msgid "OpenOffice files" msgstr "Fichiers OpenOffice" #: ../AMC-gui-edit_preferences.glade:359 msgid "XML files" msgstr "Fichiers XML" #: ../AMC-gui-edit_preferences.glade:370 msgid "Command to edit LaTeX files" msgstr "Programme d'édition des fichiers LaTeX" #: ../AMC-gui-edit_preferences.glade:371 msgid "LaTeX editor" msgstr "Editeur LaTeX" #: ../AMC-gui-edit_preferences.glade:382 msgid "Plain text editor" msgstr "Editeur de texte" #: ../AMC-gui-edit_preferences.glade:393 msgid "Command for directory browsing (string %d will be replaced by the directory path before execution)" msgstr "Commande pour explorer un répertoire (la séquence %d sera remplacée par le répertoire avant exécution)" #: ../AMC-gui-edit_preferences.glade:394 msgid "File browser" msgstr "Navigateur de fichiers" #: ../AMC-gui-edit_preferences.glade:405 msgid "Web browser" msgstr "Navigateur web" #: ../AMC-gui-edit_preferences.glade:534 msgid "Visualisation commands" msgstr "Programmes de visualisation" #: ../AMC-gui-edit_preferences.glade:565 msgid "Default LaTeX engine" msgstr "Moteur LaTeX par défaut" #: ../AMC-gui-edit_preferences.glade:576 msgid "Default command to compile LaTeX file and make PDF, PS or DVI output (may be changed for each project)." msgstr "Commande utilisée pour transformer le fichier source LaTeX en PDF, par défaut (individualisable pour chaque projet)." #: ../AMC-gui-edit_preferences.glade:599 msgid "External programs" msgstr "Programmes utilisés" #: ../AMC-gui-edit_preferences.glade:631 ../AMC-gui-edit_preferences.glade:4238 msgid "Students list charset" msgstr "Encodage de la liste d'étudiants" #: ../AMC-gui-edit_preferences.glade:642 msgid "CSV charset" msgstr "Encodage des fichiers CSV" #: ../AMC-gui-edit_preferences.glade:653 msgctxt "option name. Refers to a list of headers that may contain surnames in the CSV names list" msgid "CSV surname headers" msgstr "En-têtes CSV pour les noms" #: ../AMC-gui-edit_preferences.glade:664 msgctxt "option name. Refers to a list of headers that may contain names in the CSV names list." msgid "CSV name headers" msgstr "En-têtes CSV pour les prénoms" #: ../AMC-gui-edit_preferences.glade:675 msgid "LaTeX files charset" msgstr "Encodage des fichiers LaTeX" #: ../AMC-gui-edit_preferences.glade:686 msgid "Default encoding for the students list file." msgstr "Encodage par défaut du fichier contenant la liste des étudiants." #: ../AMC-gui-edit_preferences.glade:705 msgid "Default charset for AMC CSV output." msgstr "Encodage par défaut du fichier CSV (éventuellement) produit par AMC." #: ../AMC-gui-edit_preferences.glade:724 msgid "Comma separated list of CSV headers of columns that may contain the surnames of the students in the names list file." msgstr "Liste des en-têtes CSV des colonnes pouvant contenir les noms des étudiants dans le fichier liste des étudiants, séparés par des virgules." #: ../AMC-gui-edit_preferences.glade:738 msgid "Comma separated list of CSV headers of columns that may contain the names of the students in the names list file." msgstr "Liste des en-têtes CSV des colonnes pouvant contenir les prénoms des étudiants dans le fichier liste des étudiants, séparés par des virgules." #: ../AMC-gui-edit_preferences.glade:752 msgid "Charset used when producing LaTeX files from models." msgstr "Encodage utilisé pour mettre à votre disposition les modèles de fichiers LaTeX." #: ../AMC-gui-edit_preferences.glade:769 msgid "Decimal delimiter" msgstr "Délimiteur décimal" #: ../AMC-gui-edit_preferences.glade:797 msgid "ASCII filenames" msgstr "Noms de fichiers ASCII" #: ../AMC-gui-edit_preferences.glade:809 msgid "Force all annotated completed student sheets to have only ASCII characters in their file names. When set, all non-ASCII characters will be replaced by underscores." msgstr "Force les noms de fichiers des copies annotées à ne contenir que des caractères ASCII (sans accents). Les autres caractères seront remplacés par des _." #: ../AMC-gui-edit_preferences.glade:821 msgid "Accept non-ASCII project names" msgstr "Accepter les noms de projet avec caractères spéciaux" #: ../AMC-gui-edit_preferences.glade:848 msgid "Internationalization" msgstr "Internationalisation" #: ../AMC-gui-edit_preferences.glade:880 msgid "Printing method" msgstr "Méthode d'impression" #: ../AMC-gui-edit_preferences.glade:891 msgid "Printing command" msgstr "Méthode d'impression" #: ../AMC-gui-edit_preferences.glade:913 msgid "Useful printing options" msgstr "Options d'impression utiles" #: ../AMC-gui-edit_preferences.glade:941 msgid "Command to print one paper (with stapling). String %f will be replaced by the PDF file to be printed." msgstr "Commande pour imprimer une copie (avec agrafage). La séquence %f sera remplacée par le nom d'un fichier PDF à imprimer." #: ../AMC-gui-edit_preferences.glade:984 msgid "Printing" msgstr "Impression" #: ../AMC-gui-edit_preferences.glade:1016 msgid "Number of processes" msgstr "Processus en parallèle" #: ../AMC-gui-edit_preferences.glade:1027 msgid "Number of processes to be run in parallel. Default value is 0, which allows to start as many processes as processors." msgstr "Nombre de processus à exécuter en parallèle. La valeur par défaut est 0, et est remplacée par le nombre de processeurs." #: ../AMC-gui-edit_preferences.glade:1044 msgid "System" msgstr "Système" #: ../AMC-gui-edit_preferences.glade:1065 msgid "Main" msgstr "Général" #: ../AMC-gui-edit_preferences.glade:1094 ../AMC-gui-main_window.glade:2771 msgid "Solution" msgstr "Corrigé" #: ../AMC-gui-edit_preferences.glade:1110 ../AMC-gui-main_window.glade:2783 msgid "Individual solution" msgstr "Correction individuelle" #: ../AMC-gui-edit_preferences.glade:1125 ../AMC-gui-main_window.glade:2759 msgid "Catalog" msgstr "Catalogue" #: ../AMC-gui-edit_preferences.glade:1147 msgid "Optional working documents to build" msgstr "Documents optionnels à fabriquer" #: ../AMC-gui-edit_preferences.glade:1170 ../AMC-gui-main_window.glade:394 msgid "Documents" msgstr "Documents" #: ../AMC-gui-edit_preferences.glade:1213 msgid "Limit MSE" msgstr "EQM limite" #: ../AMC-gui-edit_preferences.glade:1224 msgid "Limit sensitivity" msgstr "Sensibilité limite" #: ../AMC-gui-edit_preferences.glade:1265 msgid "Colouring thresholds" msgstr "Seuils de coloration" #: ../AMC-gui-edit_preferences.glade:1299 msgid "No answers color" msgstr "Couleur pour sans réponse" #: ../AMC-gui-edit_preferences.glade:1310 msgid "Invalid answers color" msgstr "Couleur pour réponse invalide" #: ../AMC-gui-edit_preferences.glade:1347 msgid "Scan view" msgstr "Scan" #: ../AMC-gui-edit_preferences.glade:1379 msgid "Maximum density for manual data capture question paper rendering (DPI)" msgstr "Échelle maximale pour le rendu en saisie manuelle (dpi)" #: ../AMC-gui-edit_preferences.glade:1380 msgid "Manual capture density (DPI)" msgstr "Échelle saisie manuelle (dpi)" #: ../AMC-gui-edit_preferences.glade:1391 msgid "Image type" msgstr "Type image" #: ../AMC-gui-edit_preferences.glade:1402 msgid "Remember window size" msgstr "Taille fenêtre conservée" #. Label in the preferences window, corresponding to "Starting number of columns for names in the manual association window". #: ../AMC-gui-edit_preferences.glade:1413 msgid "Number of columns for names" msgstr "Nombre de colonnes de noms" #. Label in the preferences window, corresponding to the "Number of columns for zoomed boxes in the zooms window (opened from the Diagnosis list in the Data capture tab)". #: ../AMC-gui-edit_preferences.glade:1424 msgid "Number of columns for zoomes boxes" msgstr "Nombre de colonnes de zooms sur les cases" #: ../AMC-gui-edit_preferences.glade:1448 msgid "Temporary file type used for manual data capture. Fastest choice is (none), but this seems to be problematic in some environments." msgstr "Type de fichier image temporaire utilisé pendant la saisie manuelle. Le choix le plus rapide est (aucun), mais il ne fonctionne pas dans certains environnements." #: ../AMC-gui-edit_preferences.glade:1467 msgid "Do you want to keep the same window size each time you start AMC?" msgstr "Voulez-vous garder la même taille de fenêtre à chaque démarrage d'AMC ?" #: ../AMC-gui-edit_preferences.glade:1480 msgid "Starting number of columns for names in the manual association window." msgstr "Nombre de colonnes de noms à l'ouverture de la fenêtre d'association manuelle." #: ../AMC-gui-edit_preferences.glade:1497 msgid "Number of columns for zoomed boxes in the zooms window (opened from the Diagnosis list in the Data capture tab)." msgstr "Nombre de colonnes pour les zooms sur les cases dans la fenêtre des zooms (ouverte à partir de la liste Diagnostic dans l'onglet Saisie)." #: ../AMC-gui-edit_preferences.glade:1518 msgid "Miscellaneous" msgstr "Divers" #: ../AMC-gui-edit_preferences.glade:1549 msgid "Notify the user at the end of the following actions:" msgstr "Notifier l'utilisateur à la fin des actions suivantes :" #. One of the "notify the user at the end of the following actions" checkbox: for documents update. #: ../AMC-gui-edit_preferences.glade:1568 msgid "Documents update" msgstr "Mise à jour des documents" #. One of the "notify the user at the end of the following actions" checkbox: for computing marks. #: ../AMC-gui-edit_preferences.glade:1600 msgid "Grading" msgstr "Notation" #. One of the "notify the user at the end of the following actions" checkbox: for completed answer sheets annotation. #: ../AMC-gui-edit_preferences.glade:1616 #: ../AMC-gui-edit_preferences.glade:3137 msgid "Annotation" msgstr "Annotation" #: ../AMC-gui-edit_preferences.glade:1641 msgid "Notify using:" msgstr "Notifier en utilisant :" #: ../AMC-gui-edit_preferences.glade:1660 msgid "Desktop notifications" msgstr "Notifications" #: ../AMC-gui-edit_preferences.glade:1696 msgid "Command:" msgstr "Commande :" #: ../AMC-gui-edit_preferences.glade:1708 msgid "Command that will be called as a user notification. %m will be replaced by AMC's message, and %a by AMC completed action." msgstr "Commande à exécuter pour la notification. %m sera remplacé par le message d'AMC, et %a par l'action que AMC vient de terminer." #: ../AMC-gui-edit_preferences.glade:1737 msgid "Notifications" msgstr "Notifications" #: ../AMC-gui-edit_preferences.glade:1761 msgid "Display" msgstr "Affichage" #: ../AMC-gui-edit_preferences.glade:1804 msgid "Vector formats density (DPI)" msgstr "Densité des scans vectoriels (DPI)" #: ../AMC-gui-edit_preferences.glade:1815 msgid "Black&white conversion threshold" msgstr "Seuil de conversion N&B" #: ../AMC-gui-edit_preferences.glade:1826 msgid "Erease red from scans" msgstr "Effacer le rouge des scans" #: ../AMC-gui-edit_preferences.glade:1837 msgid "Force conversion" msgstr "Forcer la conversion" #: ../AMC-gui-edit_preferences.glade:1848 msgid "Density used when converting vector format scans (PDF, EPS) into bitmap." msgstr "Densité utilisée pour convertir les fichiers scans vectoriels (PDF, EPS)." #: ../AMC-gui-edit_preferences.glade:1863 msgid "Threshold used when converting scans to black and white. Value 0.0 means all white, value 1.0 means all black." msgstr "Seuil utilisé lors de la conversion des scans en noir et blanc. Une valeur de 0.0 donnera un résultat blanc, et une valeur de 1.0 un résultat tout noir." #: ../AMC-gui-edit_preferences.glade:1881 msgid "When set, AMC will erease red color from the color scans before automatic data capture. This can be useful if the boxes are drawn in red." msgstr "Si vous sélectionnez cette option, AMC effacera le rouge des scans couleur avant la saisie automatique. Cela peut être utile dans le cas où les cases à cochées ont été dessinées en rouge." #: ../AMC-gui-edit_preferences.glade:1896 msgid "With this option, all scan files will be converted with ImageMagick. This can slow down scans processing, but may allow some unusual file formats to be processed successfully." msgstr "Avec cette option, tous les fichiers scan seront convertis avec ImageMagick. Ceci peut ralentir le traitement des scans, mais peut permettre de traiter avec succès certains fichiers au format inhabituel." #: ../AMC-gui-edit_preferences.glade:1913 msgid "Scans conversion" msgstr "Conversion des scans" #: ../AMC-gui-edit_preferences.glade:1945 msgid "Marks size max increase" msgstr "Majoration de la taille des marques" #: ../AMC-gui-edit_preferences.glade:1956 msgid "Marks size max decrease" msgstr "Minoration de la taille des marques" #: ../AMC-gui-edit_preferences.glade:1967 #: ../AMC-gui-edit_preferences.glade:2490 msgid "Can be customized on a per-project basis in the Project tab." msgstr "Peut être personnalisé pour chaque projet dans l'onglet Projet." #: ../AMC-gui-edit_preferences.glade:1968 msgid "Default darkness threshold" msgstr "Seuil de noirceur par défaut" #: ../AMC-gui-edit_preferences.glade:1979 msgid "Default upper darkness threshold" msgstr "Seuil de noirceur maximal" #: ../AMC-gui-edit_preferences.glade:1990 msgid "Proportion of the box (on the scan) that is measured to compute its blackness." msgstr "Proportion des cases (sur le scan) utilisée pour calculer leur noirceur." #: ../AMC-gui-edit_preferences.glade:1991 msgid "Measured box proportion" msgstr "Proportion des cases à mesurer" #: ../AMC-gui-edit_preferences.glade:2002 msgid "Process scans with 3 corner marks" msgstr "Contôle des scans avec 3 angles marqués" #: ../AMC-gui-edit_preferences.glade:2013 msgid "Maximum increase (proportion: 0.1 means 10%) allowed for corner marks after printing/scanning process." msgstr "Augmentation (en proportion) permise de la taille d'une marque après le processus impression/scan." #: ../AMC-gui-edit_preferences.glade:2030 msgid "Maximum decrease (proportion: 0.1 means 10%) allowed for corner marks after printing/scanning process." msgstr "Diminution (en proportion) permise de la taille d'une marque après le processus impression/scan." #: ../AMC-gui-edit_preferences.glade:2047 msgid "If black proportion is greater than this value, the box will be considered as beeing ticked. This is a default value, it can be changed in each project." msgstr "Proportion de noir dans la case à partir de laquelle la case est considérée comme étant cochée, par défaut. Cette valeur est individualisable pour chaque projet." #: ../AMC-gui-edit_preferences.glade:2093 msgid "Do you want to process scans with 3 corner circles only?" msgstr "Souhaitez-vous vérifier les scans avec seulement 3 angles marqués ?" #: ../AMC-gui-edit_preferences.glade:2110 msgid "Detection parameters" msgstr "Paramètres de détection" #: ../AMC-gui-edit_preferences.glade:2166 msgid "These options are used when creating a new project. See the project tab for more details." msgstr "Ces options sont utilisées lors de la création d'un nouveau projet. Voir l'onglet projet pour plus de précisions." #: ../AMC-gui-edit_preferences.glade:2173 #: ../AMC-gui-edit_preferences.glade:3760 msgid "Minimal mark" msgstr "Note minimale" #: ../AMC-gui-edit_preferences.glade:2184 #: ../AMC-gui-edit_preferences.glade:3771 msgid "Floor mark" msgstr "Note plancher" #: ../AMC-gui-edit_preferences.glade:2195 #: ../AMC-gui-edit_preferences.glade:3782 msgid "Maximal mark" msgstr "Note maximale" #: ../AMC-gui-edit_preferences.glade:2206 #: ../AMC-gui-edit_preferences.glade:3793 msgid "Grain" msgstr "Granularité" #: ../AMC-gui-edit_preferences.glade:2217 #: ../AMC-gui-edit_preferences.glade:3804 msgid "Rounding type" msgstr "Type d'arrondi" #: ../AMC-gui-edit_preferences.glade:2272 #: ../AMC-gui-edit_preferences.glade:3891 msgid "ceil" msgstr "plafonné" #: ../AMC-gui-edit_preferences.glade:2312 msgid "Default marking options" msgstr "Options de barème par défaut" #: ../AMC-gui-edit_preferences.glade:2329 ../AMC-gui-main_window.glade:1943 msgid "Marking" msgstr "Notation" #: ../AMC-gui-edit_preferences.glade:2372 msgid "Max size" msgstr "Taille maximale" #: ../AMC-gui-edit_preferences.glade:2383 msgid "Image format" msgstr "Format d'image" #: ../AMC-gui-edit_preferences.glade:2394 msgid "JPEG quality" msgstr "Qualité jpeg" #: ../AMC-gui-edit_preferences.glade:2454 msgid "Scans" msgstr "Scans" #: ../AMC-gui-edit_preferences.glade:2492 msgid "Default header text" msgstr "En-tête par défaut" #: ../AMC-gui-edit_preferences.glade:2513 #: ../AMC-gui-edit_preferences.glade:3976 msgid "Text to be written on annotated sheets header. Use %S for score, %M for max score, %s for grade, %m for max grade, and %(col) for content of the column col in the students list file." msgstr "Texte à écrire en entête sur les copies annotées. Utiliser %S pour le total des points, %M pour le maximum de points, %s pour la note obtenue, %m pour la note maximale, et %(col) pour le contenu de la colonne col dans le fichier liste des étudiants." #: ../AMC-gui-edit_preferences.glade:2553 msgid "Default writing direction" msgstr "Direction d'écriture par défaut" #: ../AMC-gui-edit_preferences.glade:2564 msgid "Default questions annotation" msgstr "Annotation des questions par défaut" #: ../AMC-gui-edit_preferences.glade:2575 msgid "Default cancelled questions annotation" msgstr "Annotation des questions annulées par défaut" #: ../AMC-gui-edit_preferences.glade:2585 #: ../AMC-gui-edit_preferences.glade:4050 msgid "right to left" msgstr "droite à gauche" #: ../AMC-gui-edit_preferences.glade:2639 msgid "Header" msgstr "En-tête" #: ../AMC-gui-edit_preferences.glade:2671 msgid "Significant digits" msgstr "Chiffres significatifs" #: ../AMC-gui-edit_preferences.glade:2682 msgid "Number of significant digits to display for marks when annotating papers." msgstr "Nombre de chiffres significatifs à écrire pour les notes sur les copies annotées." #: ../AMC-gui-edit_preferences.glade:2703 msgid "Marks" msgstr "Notes" #: ../AMC-gui-edit_preferences.glade:2740 msgid "Line width" msgstr "Épaisseur du trait" #: ../AMC-gui-edit_preferences.glade:2751 msgid "Font" msgstr "Police" #: ../AMC-gui-edit_preferences.glade:2762 msgid "Marks shift" msgstr "Décalage des notes" #: ../AMC-gui-edit_preferences.glade:2803 msgid "When marks are written on annotated papers left to the boxes, shifts to the left marks by this value. You can use mm or in as a unit." msgstr "Décalage vers la gauche des notes de chaque question, en précisant mm ou in, quand les notes des questions sont indiquées à gauche des cases." #: ../AMC-gui-edit_preferences.glade:2832 msgid "To be ticked" msgstr "À cocher" #: ../AMC-gui-edit_preferences.glade:2844 msgid "Ticked" msgstr "Cochée" #: ../AMC-gui-edit_preferences.glade:2856 msgid "type" msgstr "type" #: ../AMC-gui-edit_preferences.glade:2868 msgid "colour" msgstr "couleur" #: ../AMC-gui-edit_preferences.glade:2880 #: ../AMC-gui-edit_preferences.glade:2891 #: ../AMC-gui-edit_preferences.glade:2924 #: ../AMC-gui-edit_preferences.glade:2946 msgid "no" msgstr "non" #: ../AMC-gui-edit_preferences.glade:2902 #: ../AMC-gui-edit_preferences.glade:2913 #: ../AMC-gui-edit_preferences.glade:2935 #: ../AMC-gui-edit_preferences.glade:2957 msgid "yes" msgstr "oui" #: ../AMC-gui-edit_preferences.glade:3088 msgid "Also annotate informative questions" msgstr "Annoter aussi les réponses des questions indicatives" #: ../AMC-gui-edit_preferences.glade:3110 msgid "Symbols" msgstr "Symboles utilisés" #: ../AMC-gui-edit_preferences.glade:3185 msgid "Sender email" msgstr "Courriel de l'expéditeur" #: ../AMC-gui-edit_preferences.glade:3196 msgid "Carbon copy address" msgstr "Adresse de copie" #: ../AMC-gui-edit_preferences.glade:3207 msgid "Blind Carbon copy address" msgstr "Adresse de copie cachée" #: ../AMC-gui-edit_preferences.glade:3260 msgid "Delay between sendings" msgstr "Délai entre chaque envoi" #: ../AMC-gui-edit_preferences.glade:3295 msgid "Mail delivery method:" msgstr "Méthode d'envoi :" #: ../AMC-gui-edit_preferences.glade:3337 msgid "sendmail path" msgstr "chemin où trouver sendmail" #: ../AMC-gui-edit_preferences.glade:3373 msgid "SMTP host" msgstr "Hôte SMTP" #: ../AMC-gui-edit_preferences.glade:3384 msgid "SMTP port" msgstr "Port SMTP" #: ../AMC-gui-edit_preferences.glade:3424 msgid "SMTP security" msgstr "Sécurité SMTP" #: ../AMC-gui-edit_preferences.glade:3435 msgid "SMTP user" msgstr "Utilisateur SMTP" #: ../AMC-gui-edit_preferences.glade:3472 msgid "SMTP password" msgstr "Mot de passe SMTP" #: ../AMC-gui-edit_preferences.glade:3509 msgid "Sending emails" msgstr "Envoi de courriels" #: ../AMC-gui-edit_preferences.glade:3546 msgid "Default subject" msgstr "Sujet par défaut" #: ../AMC-gui-edit_preferences.glade:3588 msgid "Default content" msgstr "Message par défaut" #: ../AMC-gui-edit_preferences.glade:3612 msgid "Email" msgstr "Courriel" #: ../AMC-gui-edit_preferences.glade:3638 msgid "Project preferences" msgstr "Préférences du projet" #: ../AMC-gui-edit_preferences.glade:3670 msgid "Darkness threshold" msgstr "Seuil de noirceur" #: ../AMC-gui-edit_preferences.glade:3681 msgid "If black proportion is greater than this value, the box will be considered as beeing ticked. If students have been told to darken the boxes entirely, one can choose value 0.5. If students have been told to tick the boxes, values around 0.15 seems appropriate." msgstr "Seuil de proportion de pixels noirs à partir duquel une case sera considérée comme étant cochée. Si la consigne est de noircir totalement la case, on peut utiliser 0,5. Si la consigne permet de cocher par des croix, une valeur de l'ordre de 0,15 semble appropriée." #: ../AMC-gui-edit_preferences.glade:3697 msgid "Upper darkness threshold" msgstr "Seuil de noirceur supérieur" #: ../AMC-gui-edit_preferences.glade:3708 msgid "If black proportion is greater than this value, the box is considered as not ticked. Setting this threshold to a value less than one allows the students to cancel ticked boxes by filling them completely." msgstr "Si la proportion de noir dans la case est supérieure à cette valeur, la case sera considérée comme non-cochée. En indiquant une valeur inférieure à 1, les étudiants pourront annuler une case cochée en la remplissant complètement." #: ../AMC-gui-edit_preferences.glade:3728 msgid "Automatic data capture" msgstr "Saisie automatique" #: ../AMC-gui-edit_preferences.glade:3815 msgid "Mark associated with null score" msgstr "Note associée à un score nul" #: ../AMC-gui-edit_preferences.glade:3829 msgid "Floor mark: any exam with a global mark less than this value will be given this mark. Let empty for no floor mark." msgstr "Note plancher. Toute note en-dessous de celle-ci sera modifiée pour prendre cette valeur. Laisser vide pour n'appliquer aucun plancher." #: ../AMC-gui-edit_preferences.glade:3879 msgid "Mark to be given to a perfect sheet with all good answers (scaling the marks). Value 0 meens that you don't want to scale the marks." msgstr "Note à donner à une copie parfaite (avec toutes les bonnes réponses), grâce à une règle de trois effectuée sur toutes les notes. Indiquez ici la valeur 0 pour ne pas effectuer de règle de trois." #: ../AMC-gui-edit_preferences.glade:3896 msgid "When using SUF option in general grading scale, should marks be ceiled not to be larger than the maximum mark ?" msgstr "Lors de l'utilisation de l'option SUF dans le barème général, la note calculée doit-elle être plafonnée à la valeur maximale ?" #: ../AMC-gui-edit_preferences.glade:3920 msgid "Global mark rules" msgstr "Calcul de la note finale" #: ../AMC-gui-edit_preferences.glade:3956 msgid "Header text" msgstr "Texte d'en-tête" #: ../AMC-gui-edit_preferences.glade:4007 msgid "Writing direction" msgstr "Direction d'écriture" #: ../AMC-gui-edit_preferences.glade:4018 msgid "Questions marks position" msgstr "Position de la note des questions" #: ../AMC-gui-edit_preferences.glade:4029 msgid "Questions annotation text" msgstr "Annotation des questions" #: ../AMC-gui-edit_preferences.glade:4040 msgid "Cancelled questions annotation text" msgstr "Texte d'annotation des questions annulées" #: ../AMC-gui-edit_preferences.glade:4083 msgid "Text to be written for each question. This will be evaluated by perl, so quote it to make a single string. Use %S for score, %M for max score, and %s and %m for these values truncated to the requested number of significant digits." msgstr "Texte a écrire en face de chaque question. Il sera évalué par perl : entourez-le de guillemets si vous écrivez une chaîne simple. Les séquences %S seront remplacées par la score, %M par le score maximal, et %s et %m les mêmes valeurs arrondies avec le nombre de chiffres significatifs voulu." #: ../AMC-gui-edit_preferences.glade:4097 msgid "Same as above, but for cancelled questions (when using allowempty)." msgstr "Comme au-dessus mais pour des questions annulées (quand l'option allowempty est utilisée)." #: ../AMC-gui-edit_preferences.glade:4122 msgid "Papers annotation" msgstr "Annotation des copies" #: ../AMC-gui-edit_preferences.glade:4206 msgid "Examination description" msgstr "Description de l'examen" #: ../AMC-gui-edit_preferences.glade:4249 msgid "CSV files charset" msgstr "Encodage des fichiers CSV" #: ../AMC-gui-edit_preferences.glade:4260 msgid "Charset used for the students list file" msgstr "Encodage du fichier contenant la liste des étudiants" #: ../AMC-gui-edit_preferences.glade:4279 msgid "Charset for the CSV marks file produced by AMC." msgstr "Encodage du fichier CSV (éventuellement) produit par AMC." #: ../AMC-gui-edit_preferences.glade:4302 msgid "Internationnalization" msgstr "Internationnalisation" #: ../AMC-gui-edit_preferences.glade:4334 msgid "LaTeX engine" msgstr "Moteur LaTeX" #: ../AMC-gui-edit_preferences.glade:4345 msgid "Command to compile LaTeX file and make PDF, PS or DVI output." msgstr "Commande utilisée pour transformer le source LaTeX en PDF." #: ../AMC-gui-edit_preferences.glade:4368 msgid "External commands" msgstr "Commandes utilisées" #: ../AMC-gui-edit_preferences.glade:4393 ../AMC-gui-main_window.glade:2923 #: ../AMC-gui-main_window.glade:3239 msgid "Project" msgstr "Projet" #: ../AMC-gui-edit_preferences.glade:4413 msgid "AMC Preferences" msgstr "Préférences AMC" #: ../AMC-gui-filter_details.glade:7 msgid "Formats details" msgstr "Détails sur les formats" #: ../AMC-gui-filter_details.glade:66 msgid "AMC supports different formats for the source file. Here are some details about each of them." msgstr "AMC connaît différents formats de fichier source. Voici une description de ceux-ci." #: ../AMC-gui-filter_details.glade:115 msgid "Description:" msgstr "Description :" #: ../AMC-gui-liste_dialog.glade:48 msgid "No names list" msgstr "Pas de liste des étudiants" #: ../AMC-gui-liste_dialog.glade:134 msgid "Apply" msgstr "Appliquer" #: ../AMC-gui-liste_dialog.glade:163 msgid "Choose your students names list file" msgstr "Choisissez le fichier contenant la liste des étudiants" #: ../AMC-gui-mailing.glade:13 msgid "Mailing" msgstr "Mailing" #: ../AMC-gui-mailing.glade:40 msgid "Send" msgstr "Envoyer" #: ../AMC-gui-mailing.glade:75 msgid "Current project name %n:" msgstr "Nom de l'examen %n :" #: ../AMC-gui-mailing.glade:149 msgid "Emails column:" msgstr "Colonne des courriels :" #: ../AMC-gui-mailing.glade:184 msgid "Select failed" msgstr "Sélectionner les anciens échecs" #: ../AMC-gui-mailing.glade:237 msgid "Addressees" msgstr "Destinataires" #: ../AMC-gui-mailing.glade:274 msgid "Subject" msgstr "Sujet" #: ../AMC-gui-mailing.glade:303 msgid "Enable HTML Tags" msgstr "Autoriser le codage HTML" #: ../AMC-gui-mailing.glade:345 msgid "Body" msgstr "Message" #: ../AMC-gui-mailing.glade:437 msgid "Attachments" msgstr "Pièces jointes" #: ../AMC-gui-main_window.glade:126 msgid "Updated" msgstr "MAJ" #: ../AMC-gui-main_window.glade:146 msgid "Sensitivity" msgstr "Sensibilité" #: ../AMC-gui-main_window.glade:156 msgid "Scan file" msgstr "Fichier" #: ../AMC-gui-main_window.glade:294 msgid "Number of papers:" msgstr "Nombre de copies :" #: ../AMC-gui-main_window.glade:308 msgid "Number of papers to produce. Zero means taking into account the number written in the LaTeX source file." msgstr "Nombre de copies à produire. La valeur zéro demande de prendre en compte le nombre de copies défini dans le fichier LaTeX." #. TRANSLATORS: Use the character '_' before the key that can be used as a mnemonic (to activate documents update with Alt+key) #: ../AMC-gui-main_window.glade:343 msgid "_Update documents" msgstr "Mettre à jour les _documents" #: ../AMC-gui-main_window.glade:377 msgid "Question" msgstr "Sujet" #: ../AMC-gui-main_window.glade:543 msgid "Warnings" msgstr "Avertissements" #: ../AMC-gui-main_window.glade:654 msgid "Print papers" msgstr "Imprimer des copies" #: ../AMC-gui-main_window.glade:718 msgid "From papers' scans" msgstr "À partir des scans des copies, automatiquement" #: ../AMC-gui-main_window.glade:740 ../AMC-gui-main_window.glade:1776 msgid "Automatic" msgstr "Automatique" #: ../AMC-gui-main_window.glade:762 msgid "On screen with mouse" msgstr "À l'écran, manuellement" #: ../AMC-gui-main_window.glade:784 ../AMC-gui-main_window.glade:1819 msgid "Manual" msgstr "Manuelle" #: ../AMC-gui-main_window.glade:809 msgid "Data capture after examination" msgstr "Saisie des copies après examen" #: ../AMC-gui-main_window.glade:841 msgid "Missing pages" msgstr "Pages manquantes" #: ../AMC-gui-main_window.glade:913 msgid "Look at scans" msgstr "Voir les scans" #: ../AMC-gui-main_window.glade:984 msgid "Forget" msgstr "Oublier" #: ../AMC-gui-main_window.glade:1001 msgid "Look at pages" msgstr "Voir les scans" #: ../AMC-gui-main_window.glade:1086 msgid "Pages:" msgstr "Pages traitées :" #: ../AMC-gui-main_window.glade:1144 msgid "Columns" msgstr "Colonnes" #. Label on the button used to open a window with the images of the boxes taken from the scan. This window can be used th check boxes categorization. #: ../AMC-gui-main_window.glade:1183 ../AMC-perl/AMC/Gui/Zooms.glade:13 msgid "Zooms" msgstr "Zooms" #: ../AMC-gui-main_window.glade:1188 msgid "Show images of the boxes from the scan, and check their categorization." msgstr "Montre les images des cases extraites du scan, et vérifie leur catégorisation." #. Label of the button used to open a window showing a scan with the place where corner marks have been detected, and the position where the boxes are supposed to be. #: ../AMC-gui-main_window.glade:1202 msgid "Layout" msgstr "Calage" #: ../AMC-gui-main_window.glade:1207 msgid "Show where corner marks have been detected on the scan, and where boxes are supposed to be." msgstr "Montre l'endroit où les marques de coin ont été détectées sur le scan, et les positions prévues pour les cases." #. Label of the button used to delete data capture for selected pages. #: ../AMC-gui-main_window.glade:1221 msgid "Remove" msgstr "Effacer" #: ../AMC-gui-main_window.glade:1225 msgid "Remove data capture for selected pages." msgstr "Efface la saisie pour les pages sélectionnées." #: ../AMC-gui-main_window.glade:1266 msgid "Diagnosis" msgstr "Diagnostic" #: ../AMC-gui-main_window.glade:1323 msgid "Update marking scale" msgstr "Mettre à jour le barème" #: ../AMC-gui-main_window.glade:1327 msgid "Also update marking scale extraction from LaTeX source file" msgstr "Faut-il aussi extraire le barème du fichier LaTeX ?" #: ../AMC-gui-main_window.glade:1341 msgid "Mark papers" msgstr "Correction des copies" #: ../AMC-gui-main_window.glade:1394 msgid "Marking" msgstr "Correction" #: ../AMC-gui-main_window.glade:1419 msgid "Look at marks" msgstr "Voir les notes" #: ../AMC-gui-main_window.glade:1500 msgid "Students list:" msgstr "Liste des étudiants :" #: ../AMC-gui-main_window.glade:1548 msgid "Set file" msgstr "Choisir" #: ../AMC-gui-main_window.glade:1596 msgid "Edit list" msgstr "Éditer la liste" #: ../AMC-gui-main_window.glade:1638 msgid "Re-read" msgstr "Re-lire" #: ../AMC-gui-main_window.glade:1704 msgid "Code name for automatic association:" msgstr "Titre du code pour association automatique :" #: ../AMC-gui-main_window.glade:1715 msgid "Primary key from this list:" msgstr "Identifiant unique dans cette liste :" #: ../AMC-gui-main_window.glade:1738 msgid "Papers/students association:" msgstr "Association entre copies et étudiants :" #: ../AMC-gui-main_window.glade:1858 msgid "Students identification" msgstr "Identification des étudiants" #: ../AMC-gui-main_window.glade:2020 msgid "Export" msgstr "Exporter" #: ../AMC-gui-main_window.glade:2041 msgid "and" msgstr "et" #: ../AMC-gui-main_window.glade:2095 msgid "Sorting:" msgstr "Tri :" #: ../AMC-gui-main_window.glade:2121 msgid "include absentees" msgstr "inclure les absents" #: ../AMC-gui-main_window.glade:2127 msgid "Should exported data include absentees?" msgstr "Le tableau de notes exporté doit-il inclure une ligne pour chaque étudiant absent ?" #: ../AMC-gui-main_window.glade:2207 msgid "Exports dir" msgstr "Fichiers de notes" #: ../AMC-gui-main_window.glade:2239 msgid "Marks export" msgstr "Export des notes" #: ../AMC-gui-main_window.glade:2322 msgid "File name model:" msgstr "Modèle de nom de fichier :" #: ../AMC-gui-main_window.glade:2336 msgid "File name model used to make file names for PDF annotated papers, one by student. Keep empty in order to use student name." msgstr "Modèle utilisé pour former les noms des fichiers qui contiendront les copies corrigées en PDF rassemblées par étudiant. On peut laisser vide pour obtenir le numéro de copie." #: ../AMC-gui-main_window.glade:2382 msgid "Annotate papers' scans with marking details." msgstr "Annoter les scans des copies en signalant les erreurs et en écrivant le détail de la note." #: ../AMC-gui-main_window.glade:2404 msgid "Annotate papers" msgstr "Annoter les copies" #: ../AMC-gui-main_window.glade:2428 msgid "Look at grouped files" msgstr "Voir les fichiers fabriqués" #: ../AMC-gui-main_window.glade:2451 msgid "Look" msgstr "Voir" #: ../AMC-gui-main_window.glade:2482 msgid "Send..." msgstr "Envoyer..." #: ../AMC-gui-main_window.glade:2511 msgid "Annotated papers" msgstr "Copies corrigées" #: ../AMC-gui-main_window.glade:2534 msgid "Reports" msgstr "Rapports" #: ../AMC-gui-main_window.glade:2650 msgid "Open project" msgstr "Ouverture d'un projet de QCM" #: ../AMC-gui-main_window.glade:2691 msgid "Save project" msgstr "Enregistrer le projet" #: ../AMC-gui-main_window.glade:2721 msgid "Menu" msgstr "Menu" #: ../AMC-gui-main_window.glade:2799 ../AMC-gui-main_window.glade:2838 #: ../AMC-gui-main_window.glade:2877 msgid "Update the document" msgstr "Mettre à jour le document" #: ../AMC-gui-main_window.glade:2813 ../AMC-gui-main_window.glade:2852 #: ../AMC-gui-main_window.glade:2891 msgid "Open the document" msgstr "Ouvrir le document" #: ../AMC-gui-main_window.glade:2953 msgid "Export as template" msgstr "Exporter comme modèle" #: ../AMC-gui-main_window.glade:2967 msgid "User templates" msgstr "Modèles personnels" #: ../AMC-gui-main_window.glade:2992 msgid "Manage" msgstr "Gérer" #: ../AMC-gui-main_window.glade:3017 ../AMC-gui-main_window.glade:3267 msgid "Help" msgstr "Aide" #: ../AMC-gui-main_window.glade:3033 msgid "About" msgstr "À propos" #: ../AMC-gui-main_window.glade:3047 msgid "Cancel learning…" msgstr "Reprendre l'apprentissage…" #: ../AMC-gui-main_window.glade:3058 msgid "Debugging" msgstr "Débogage" #: ../AMC-gui-main_window.glade:3076 msgid "Bug report" msgstr "Rapport de bogue" #: ../AMC-gui-main_window.glade:3090 ../AMC-gui-main_window.glade:3115 msgid "Documentation" msgstr "Documentation" #: ../AMC-gui-main_window.glade:3184 ../AMC-gui-main_window.glade:3253 msgid "Plugins" msgstr "Plugins" #: ../AMC-gui-main_window.glade:3200 msgid "Browse" msgstr "Naviguer" #: ../AMC-gui-main_window.glade:3214 msgid "Install plugin" msgstr "Installer un plugin" #: ../AMC-gui-make_template.glade:8 msgid "Save as a template" msgstr "Enregistrer comme modèle" #: ../AMC-gui-make_template.glade:64 msgid "To make a new template from your project, describe it below:" msgstr "Fabriquez un nouveau modèle en le décrivant ci-dessous :" #: ../AMC-gui-make_template.glade:86 msgid "File name:" msgstr "Nom de fichier :" #: ../AMC-gui-make_template.glade:117 msgid "Note: please use only alphanumeric characters and characters from \"-_+\" for the template file name." msgstr "Note : n'utilisez que des caractères alphanumériques et quelques autres caractères simples (-_+)." #: ../AMC-gui-make_template.glade:143 msgid "Short name:" msgstr "Nom court :" #: ../AMC-gui-make_template.glade:202 msgid "Description:" msgstr "Description :" #: ../AMC-gui-make_template.glade:304 msgid "Included files:" msgstr "Fichiers à inclure :" #: ../AMC-gui-overwritten.glade:49 msgid "List of pages with overwritten data:" msgstr "Liste des pages à saisie multiple :" #: ../AMC-gui-saisie_auto.glade:8 msgid "Please select all papers' scans" msgstr "Sélectionnez tous les scans des copies des étudiants" #: ../AMC-gui-saisie_auto.glade:10 msgid "Automatic data capture" msgstr "Saisie automatique" #: ../AMC-gui-saisie_auto.glade:27 msgid "Proceed to data capture from scans with button OK" msgstr "Lancez l'analyse des scans avec le bouton Valider" #: ../AMC-gui-saisie_auto.glade:82 msgid "Copy to project directory (recommended)" msgstr "Copier les scans dans le répertoire projet (recommandé)" #: ../AMC-gui-saisie_auto.glade:88 ../AMC-gui-saisie_auto.glade:89 msgid "Copy all scans to scans sub-directory in project directory" msgstr "Pour copier tous les fichiers sélectionnés dans un sous-répertoire du projet" #: ../AMC-gui-saisie_auto.glade:156 msgid "Use this setting to be sure that the exam copy IDs allocated to the pages of the scans you selected will be consecutive numbers, in the same order as the pages." msgstr "Utilisez cette option pour être certains que les identifiants de copies affectés aux pages des scans sélectionnés seront des nombres consécutifs, dans le même ordre que les pages." #: ../AMC-gui-saisie_auto.glade:172 msgid "Options" msgstr "Options" #: ../AMC-gui-source_latex_choix.glade:8 msgid "Choose LaTeX source file" msgstr "Choix du fichier source LaTeX" #: ../AMC-gui-source_latex_choix_zip.glade:8 msgid "ZIP file choice" msgstr "Choix du fichier ZIP" #: ../AMC-gui-source_latex_dialog.glade:7 msgid "Choose LaTeX source" msgstr "Choix du source LaTeX" #: ../AMC-gui-source_latex_dialog.glade:62 msgid "" "A multiple choice project is mainly made of a source file, which describes the questionnaire.\n" "Please choose your situation:" msgstr "" "Un projet de QCM est avant tout constitué d'un fichier source qui contient la définition du questionnaire lui-même.\n" "Choisissez votre situation :" #: ../AMC-gui-source_latex_dialog.glade:105 msgid "Template" msgstr "Modèle" #: ../AMC-gui-source_latex_dialog.glade:119 msgid "You did not write any description of the questionnaire, and want to start from a template." msgstr "Vous n'avez pas encore écrit cette description ; vous voulez partir d'un modèle de source LaTeX que vous modifierez." #: ../AMC-gui-source_latex_dialog.glade:171 msgid "File" msgstr "Fichier" #: ../AMC-gui-source_latex_dialog.glade:185 msgid "You already wrote a questionnaire description, and want to use it for this project." msgstr "Vous avez déjà écrit une description de votre questionnaire et vous voulez l'utiliser pour ce projet." #: ../AMC-gui-source_latex_dialog.glade:237 msgid "Empty" msgstr "Vide" #: ../AMC-gui-source_latex_dialog.glade:251 msgid "You want to write the description from zero." msgstr "Vous voulez écrire votre description de zéro en partant d'un fichier vide." #: ../AMC-gui-source_latex_dialog.glade:303 msgid "Archive" msgstr "Archive" #: ../AMC-gui-source_latex_dialog.glade:317 msgid "You have a .tgz or .zip file containing the questionnaire and other related stuff, coming from a third party software or a backup." msgstr "Vous disposez d'un fichier tgz ou zip contenant le sujet et des fichiers annexes. Il peut venir d'une sauvegarde ou d'un export AMC à partir d'une autre application." #: ../AMC-gui-source_latex_modele.glade:8 msgid "Template selection" msgstr "Choix du modèle" #: ../AMC-gui-unrecognized.glade:8 msgid "Preprocess" msgstr "Pré-traitement" #: ../AMC-gui-unrecognized.glade:14 msgid "Delete" msgstr "Effacer" #: ../AMC-gui-unrecognized.glade:29 msgid "Unrecognized scans" msgstr "Scans non reconnus" #: ../AMC-gui-unrecognized.glade:71 msgid "Scans list" msgstr "Liste des scans" #: ../AMC-gui-unrecognized.glade:237 msgid "Original scan" msgstr "Scan original" #: ../AMC-gui-unrecognized.glade:266 msgid "Preprocessed" msgstr "Pré-traité" #: ../AMC-perl/AMC/Gui/Association.glade:14 msgid "Manual association" msgstr "Association manuelle" #. This is the label of the check button that controls wheter the auto-completion for students names will be made looking at the beginnig of the names or at the whole names. #: ../AMC-perl/AMC/Gui/Association.glade:84 msgid "beginning" msgstr "au début" #: ../AMC-perl/AMC/Gui/Association.glade:89 msgid "Is auto-completion looking at the beginning of the names only?" msgstr "La complétion automatique regarde-t-elle au début des noms uniquement ?" #: ../AMC-perl/AMC/Gui/Association.glade:157 msgid "Show all" msgstr "Tous les noms" #: ../AMC-perl/AMC/Gui/Association.glade:361 msgid "associated" msgstr "associés" #: ../AMC-perl/AMC/Gui/Association.glade:366 msgid "Unticking this box, you see only non-associated papers. Tick it to be able to check already associated papers." msgstr "Si cette case n'est pas cochée, vous pourrez naviguer uniquement parmi les copies non-associées." #: ../AMC-perl/AMC/Gui/Association.glade:411 msgid "Remove manual association for this paper" msgstr "Effacer l'association manuelle pour cette copie" #: ../AMC-perl/AMC/Gui/Association.glade:427 msgid "Tell the system that this papers does not correspond to any of the students from the list." msgstr "Indiquer que cette copie ne correspond à aucun étudiant de la liste." #: ../AMC-perl/AMC/Gui/Association.glade:449 msgid "Unknown" msgstr "Inconnu" #: ../AMC-perl/AMC/Gui/Association.glade:509 msgid "Save associations." msgstr "Sauvegarder les associations effectuées." #: ../AMC-perl/AMC/Gui/Manuel.glade:18 msgid "Paper data capture" msgstr "Saisie des copies de QCM" #: ../AMC-perl/AMC/Gui/Manuel.glade:39 ../AMC-perl/AMC/Gui/Manuel.glade:236 msgid "Go to:" msgstr "Aller à :" #: ../AMC-perl/AMC/Gui/Manuel.glade:51 ../AMC-perl/AMC/Gui/Manuel.glade:248 msgid "Enter paper number, or page number like 102/4 (page 4 from paper 102), then press enter." msgstr "Entrer un numéro d'étudiant, ou un numéro de page sous la forme 102/4 (ici pour la page 4 de l'étudiant 102), puis appuyez sur la touche entrée." #: ../AMC-perl/AMC/Gui/Manuel.glade:82 msgid "Go to the previous page." msgstr "Aller à la page précédente." #: ../AMC-perl/AMC/Gui/Manuel.glade:100 msgid "Quit" msgstr "Quitter" #: ../AMC-perl/AMC/Gui/Manuel.glade:118 msgid "Go to next page." msgstr "Aller à la page suivante." #: ../AMC-perl/AMC/Gui/Manuel.glade:282 msgid "Save this page modifications, then go to the previous page." msgstr "Sauvegarder les modifications de cette page puis passer à la page précédente." #: ../AMC-perl/AMC/Gui/Manuel.glade:296 msgid "Choose if you want to navigate through all pages, through pages with invalid answers, or through pages with invalid or empty answers." msgstr "Choisissez si vous voulez étudier toutes les pages, les pages avec réponses incohérentes seulement, ou les pages avec réponses incohérentes ou vides seulement." #: ../AMC-perl/AMC/Gui/Manuel.glade:318 msgid "Save this page modifications, then go to next page." msgstr "Sauvegarder les modifications de cette page puis passer à la page suivante." #: ../AMC-perl/AMC/Gui/Manuel.glade:344 msgid "Focus on question:" msgstr "Se concentrer sur la question:" #: ../AMC-perl/AMC/Gui/Manuel.glade:429 msgid "Remove manual modifications for this page. Automatic data capture for this page, if any, won't be changed." msgstr "Effacer la saisie manuelle pour cette page. Les résultats éventuels de la saisie automatique ne seront pas modifiés." #: ../AMC-perl/AMC/Gui/Manuel.glade:458 msgid "Cancel modifications for this page" msgstr "Annuler les modifications faites à cette page" #: ../AMC-perl/AMC/Gui/Manuel.glade:476 msgid "Save and quit" msgstr "Sauvegarder et quitter" #: ../AMC-perl/AMC/Gui/Zooms.glade:135 msgid "Unchecked boxes" msgstr "Cases non cochées" #: ../AMC-perl/AMC/Gui/Zooms.glade:203 msgid "Checked boxes" msgstr "Cases cochées" #: ../AMC-perl/AMC/Gui/Zooms.glade:281 msgid "Toggle mode. With 'click', left-click to toggle and right-click to toggle a group." msgstr "Clic gauche ou droit pour déplacer vers un groupe." #~ msgid "" #~ "Names list file for this project is:\n" #~ "%s" #~ msgstr "" #~ "Le fichier contenant la liste des étudiants de ce projet est situé à l'emplacement suivant :\n" #~ "%s" #~ msgid "(no file)" #~ msgstr "(aucun fichier)" #~ msgid "Path" #~ msgstr "Emplacement" #~ msgid "Yes, with scope separator '.'" #~ msgstr "Oui, avec le séparateur de champs '.'" #~ msgid "_Project" #~ msgstr "_Projet" #~ msgid "Open personal templates directory" #~ msgstr "Ouvrir le répertoire des modèles personnels" #~ msgid "_Edit" #~ msgstr "_Édition" #~ msgid "_Tools" #~ msgstr "_Outils" #~ msgid "Cleanup..." #~ msgstr "Nettoyage..." #~ msgid "Installed plugins" #~ msgstr "Plugins installés" #~ msgid "Open the installed plugins directory." #~ msgstr "Ouvrir le répertoire des plugins" #~ msgid "Get debugging information in a file" #~ msgstr "Obtenir des informations de debogage dans un fichier" #~ msgid "Error writing state file %s: %s" #~ msgstr "Erreur à l'écriture du fichier d'état %s : %s" #~ msgid "The working documents are already prepared with the current file format. If you change the file format, working documents and all other data for this project will be ereased." #~ msgstr "Les documents de travail sont déjà préparés en utilisant le format de fichier source actuel. Si vous modifiez ce format, les documents de travail et toutes les données de ce projet vont être effacés." #~ msgid "Click on Ok to erease old working documents and change file format, and on Cancel to get back to the same file format." #~ msgstr "Cliquez sur Ok pour effacer les anciens documents de travail et modifier le format de fichier source, ou sur Annuler pour garder le format de fichier actuel." #~ msgid "The working documents are already prepared with the current file format. If you change the file format, working documents will be ereased." #~ msgstr "Les documents de travail sont déjà préparés en utilisant le format de fichier source actuel. Si vous modifiez ce format, les documents de travail vont être effacés et devront être générés de nouveau." #~ msgid "You can't choose column '%s' as a key in the students list, as it contains duplicates (value '%s')" #~ msgstr "Vous ne pouvez pas choisir la colonne \"%s\" comme identifiant dans la liste des étudiants, car elle contient des doublons (la valeur \"%s\" par exemple)" #~ msgid "You did not save project %s options, which have been modified: do you want to save them before leaving?" #~ msgstr "Vous n'avez pas sauvegardé les options du projet %s, qui ont pourtant été modifiées : voulez-vous le faire avant de le quitter ?" #~ msgid "You did not save main options, which have been modified: do you want to save them before leaving?" #~ msgstr "Vous n'avez pas sauvegardé les options générales, qui ont pourtant été modifiées : voulez-vous le faire avant de le quitter ?" #~ msgid "Color used to highlight questions with no ticked answers in the manual data capture window" #~ msgstr "Couleur utilisée pour faire ressortir les questions pour lesquelles aucune réponse n'a été cochée dans la fenêtre de saisie manuelle" #~ msgid "Color used to highlight questions with invalid answers in the manual data capture window" #~ msgstr "Couleur utilisée pour faire ressortir les questions pour lesquelles les réponses sont incohérentes dans la fenêtre de saisie manuelle" #~ msgid "Select all students whose report sending has failed last time." #~ msgstr "Sélectionne les étudiants pour lesquels l'envoi précédent a échoué." #~ msgid "Use HTML tags in the body of your message such as , , ,

    etc." #~ msgstr "Utilisez les codes HTML dans le message comme , , ,

    etc." #~ msgid "empty" #~ msgstr "vide" #~ msgid "archive" #~ msgstr "archive" #~ msgid "If this is not ticked, the next copy is taken from the copies which are not yet associated (already associated copies are skipped), and when it is ticked, the next copy is taken from all the copies (you pass all associated and non-associated copies in turn)." #~ msgstr "Si cette option n'est pas activée, la copie suivante sera prise parmi les copies qui n'ont pas encore été associées (les copies déjà associées sont omises), et quand elle est activée, la copie suivante est prise parmi toutes les copies (toutes les copies, associées ou non, sont étudiées)." #~ msgid "(not supported)" #~ msgstr "(impossible)" #~ msgid "Printing with method '%s' needs some perl modules that are not installed: %s. Please install these modules or switch to another printing method." #~ msgstr "La méthode d'impression '%s' nécessite la présence de certains modules perl qui ne sont pas installés sur votre système : %s. Veuillez les installer ou choisir une autre méthode d'impression." #~ msgid "CUPS" #~ msgstr "CUPS" #~ msgid "Yes" #~ msgstr "Oui" #~ msgid "Print separate answer sheet separately" #~ msgstr "Imprimer la page de réponses séparément" #~ msgid "Stapling" #~ msgstr "agrafage" #~ msgid "Grouping students annotated pages together..." #~ msgstr "Regroupement des pages corrigées par étudiant..." #~ msgid "Renaming annotated files with new model..." #~ msgstr "Renommage des copies annotées..." #~ msgid "Name and surname" #~ msgstr "Nom et prénom" #~ msgid "Previous group was empty" #~ msgstr "Le groupe précédent est vide" #~ msgid "Create a table with basic statistics about answers for each question?" #~ msgstr "Créer une table de statistiques simples sur chaque question ?" #~ msgid "PDF" #~ msgstr "PDF" #~ msgid "Size, in the form \"width\"x\"height\", for exemple 1000x1500" #~ msgstr "Format \"largeur\"x\"hauteur\", par exemple 1000x1500" #~ msgid "Maximum size in pixels" #~ msgstr "Taille maximale en pixels" #~ msgid "JPEG quality for annotated papers" #~ msgstr "Qualité de l'image jpeg produite" #~ msgid "Value 60, for exemple, means that text size is chosen so that page height is 60 lines of text." #~ msgstr "Utiliser la valeur 60 signifie que la taille du texte sera choisie de telle sorte que la hauteur de la page correspond à 60 lignes de texte." #~ msgid "compose" #~ msgstr "composer" #~ msgid "Find pages in solution if scan is not present? Useful with question with separated answers page." #~ msgstr "Doit-on aller chercher dans la correction les pages qui n'ont pas été annotées à partir de scans ? Cette option est utile en particulier pour les sujets à page de réponses séparées." #~ msgid "Do you want notifications to be shown at the end of automatic data capture and annotation processes?" #~ msgstr "Voulez-vous afficher une notification à la fin des saisies automatiques et de la fabrication des copies annotées ?" #~ msgid "Add a column" #~ msgstr "Ajouter une colonne" #~ msgid "Remove a column" #~ msgstr "Enlever une colonne" #~ msgid "Annotate papers' scans with marking details." #~ msgstr "Annoter les scans des copies en signalant les erreurs et en écrivant le détail de la note." #~ msgid "Remove manual modifications for this page. Automatic data capture for this page, if any, won't be changed." #~ msgstr "Effacer la saisie manuelle pour cette page. Les résultats éventuels de la saisie automatique ne seront pas modifiés." #~ msgid "Confirm changes" #~ msgstr "Valider les modifications" #~ msgid "Process" #~ msgstr "Commencer" #~ msgid "project %s" #~ msgstr "projet %s" #~ msgid "Automatic Multiple Choice" #~ msgstr "QCM Automatique" #~ msgid "Proceed" #~ msgstr "Utiliser" #~ msgid "Edit LaTeX file" #~ msgstr "Éditer le fichier LaTeX" #~ msgid "ID" #~ msgstr "ID" #~ msgid "LaTeX file (*.tex)" #~ msgstr "Fichier LaTeX (*.tex)" #~ msgid "Group annotated pages to one PDF file by student" #~ msgstr "Regrouper les pages corrigées en un fichier par étudiant" #~ msgid "Group" #~ msgstr "Regrouper" #~ msgid "Choose which columns from the students list to include in the exported file." #~ msgstr "Choisir quelles colonnes de la liste des étudiants seront exportées." #~ msgid "Compute layouts" #~ msgstr "calculer les mises en page" #~ msgid "Transport:" #~ msgstr "Transport :" #~ msgid "Unreadable marks" #~ msgstr "Notes illisibles" #~ msgid "No automatic data capture: no zoom to build..." #~ msgstr "Aucune saisie automatique n'a été effectuée : il n'y a donc pas de zooms à reconstruire..." #~ msgid "You changed parameter \"%s\"." #~ msgstr "Vous avez modifié le paramètre « %s »." #~ msgid "If you already captured data from scans, boxes zooms are no longer correctly grouped." #~ msgstr "Si vous avez déjà effectué une saisie automatique, les zooms des cases fabriqués pour chaque copie ne sont plus correctement organisés." #~ msgid "Do you want to re-build them?" #~ msgstr "Voulez-vous les refabriquer ?" #~ msgid "It will take some time." #~ msgstr "Cela prend un peu de temps." #~ msgid "You will be able to build them later with %s in menu %s." #~ msgstr "Vous pouvez aussi les refabriquer plus tard grâce à l'action %s du menu %s." #~ msgid "Re-extract zooms" #~ msgstr "re-extraire les zooms" #~ msgid "Tools" #~ msgstr "Outils" #~ msgid "unticked boxes" #~ msgstr "non cochées" #~ msgid "ticked boxes" #~ msgstr "cases cochées" #~ msgid "For both two latest cases, you can use graphical interface for manual data caption." #~ msgstr "Dans les deux derniers cas, vous pouvez associer les copies aux étudiants en utilisant l'interface de saisie manuelle." #~ msgid "Error saving to %s: %s" #~ msgstr "Erreur lors de la sauvegarde de %s : %s" #~ msgid "Shall AMC include in the marks file details about which boxes are ticked on the completed answer sheets?" #~ msgstr "AMC doit-il inclure dans le fichier de notes le détail des cases cochées ou non ?" #~ msgid "Cancel all associations made this time." #~ msgstr "Annuler toutes les associations faites cette fois-ci." #~ msgid "Working documents are not present" #~ msgstr "Les documents de travail ne sont pas présents" #~ msgid "" #~ "LaTeX source file for this project is:\n" #~ "%s" #~ msgstr "" #~ "Le fichier LaTeX qui décrit le QCM de ce projet est situé à l'emplacement suivant :\n" #~ "%s" #~ msgid "Path:" #~ msgstr "Emplacement :" #~ msgid "Click here to know where project LaTeX source file is" #~ msgstr "Cliquez ici pour connaître l'emplacement exact du fichier LaTeX utilisé pour ce projet" #~ msgid "adjustment" #~ msgstr "calage" #~ msgid "unreadable" #~ msgstr "illisible" #~ msgid "Looking for detected layouts..." #~ msgstr "Recherche des mises en page détectées..." #~ msgid "Detect layouts from adjustment document." #~ msgstr "Analyser la mise en page de chaque page à partir du document de calage." #~ msgid "Print papers, one by one" #~ msgstr "Lance l'impression, copie par copie" #~ msgid "Enter the student name written on this page." #~ msgstr "Entrez ici le nom que l'étudiant a inscrit sur cette page." #~ msgid "File source.tex already exists in project directory %s. It has not been removed, and will be used as the project source file." #~ msgstr "Un fichier source.tex existe déjà dans le répertoire du projet %s. Je ne l'ai pas effacé et il servira de fichier source." #~ msgid "Templates directory" #~ msgstr "Modèles personnels" #~ msgid "model" #~ msgstr "modèle" #~ msgid "Questionnaire model choice" #~ msgstr "Choix d'un modèle de questionnaire" #~ msgid "automatic decoupled" #~ msgstr "découplé automatique" #~ msgid "direct" #~ msgstr "direct" #~ msgid "It is faster than the one that you used so far." #~ msgstr "Elle est bien plus rapide que celle que vous avez utilisé jusqu'à maintenant." #~ msgid "Do you want to use it from now on?" #~ msgstr "Voulez-vous l'utiliser dorénavant ?" #~ msgid "If you experience any problem with this new implementation, you can change back to the old one setting \"%s\" to \"%s\" in %s (tab \"%s\")." #~ msgstr "Si vous rencontrez des problèmes avec cette nouvelle implémentation, vous pouvez revenir à l'ancienne méthode en donnant à « %s » la valeur « %s » dans %s (onglet « %s »)." #~ msgid "Detection" #~ msgstr "Détection" #~ msgid "adjustment document" #~ msgstr "document de calage" #~ msgid "Can be customized in a per-project basis in the Project tab." #~ msgstr "Peut être personnalisé pour chaque projet dans l'onglet Projet." #~ msgid "Models" #~ msgstr "Modeles" #~ msgid "zip" #~ msgstr "zip" #~ msgctxt "No code found in LaTeX file" #~ msgid "(none)" #~ msgstr "(aucun)" #~ msgctxt "No two-sided printing" #~ msgid "one sided" #~ msgstr "Non" #~ msgctxt "No transitional image type (direct processing)" #~ msgid "(none)" #~ msgstr "(aucun)" #~ msgctxt "No annotation position (do not write anything)" #~ msgid "(none)" #~ msgstr "(aucune)" auto-multiple-choice-1.4.0/I18N/lang/ja.po000066400000000000000000004560171341176102400201130ustar00rootroot00000000000000# Auto Multiple Choice # Copyright 2008-2017 Alexis Bienvenüe # This file is distributed under the same license as the AMC software msgid "" msgstr "" "Project-Id-Version: 1.2.2016.022902 (r:e6c431add948)\n" "Report-Msgid-Bugs-To: paamc@passoire.fr\n" "POT-Creation-Date: 2018-04-04 22:01 +0200\n" "PO-Revision-Date: 2018-05-08 23:21+0900\n" "Last-Translator: Hiroto Kagotani \n" "Language-Team: Hiroto Kagotani \n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-SourceCharset: utf-8\n" "X-Generator: Poedit 1.8.4\n" #. TRANSLATORS: directory name for projects. This directory will be created (if needed) in the home directory of the user. Please use only alphanumeric characters, and - or _. No accentuated characters. #: ../AMC-annotate.pl:158 ../AMC-perl/AMC/Config.pm:247 #: ../AMC-perl/AMC/Config.pm:248 msgid "MC-Projects" msgstr "MC-Projects" #: ../AMC-getimages.pl:213 msgid "Splitting multi-page PDF files..." msgstr "複数ページPDFファイル %s を分割しています..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be converted. #: ../AMC-getimages.pl:390 #, perl-format msgid "Converting %s to bitmap..." msgstr "%s をビットマップに変換しています..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be splitted to several images (one per page). #: ../AMC-getimages.pl:393 #, perl-format msgid "Splitting multi-page image %s..." msgstr "複数ページ画像ファイル %s を分割しています..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be splitted to several images (one per page). #: ../AMC-getimages.pl:396 #, perl-format msgid "Processing image %s..." msgstr "画像ファイル %s を処理しています..." #: ../AMC-getimages.pl:469 msgid "Copying scans to project directory..." msgstr "スキャン画像をプロジェクトディレクトリにコピーしています..." #: ../AMC-gui.pl:249 msgid "None of the perl modules Graphics::Magick and Image::Magick are installed: AMC won't work properly!" msgstr "perlモジュール Graphics::MagickImage::Magick のどちらもインストールされていません。AMCは正しく動作できません!" #: ../AMC-gui.pl:280 msgid "" "The package auto-multiple-choice-common is installed, but not auto-multiple-choice.\n" "AMC won't work properly until you install auto-multiple-choice package!" msgstr "" "auto-multiple-choice-commonパッケージはインストールされましたが、auto-multiple-choiceがインストールされていません。\n" "AMCは、auto-multiple-choiceパッケージをインストールしないと、正しく動作しません!" #: ../AMC-gui.pl:298 #, perl-format msgid "There is too little space left in the temporary disk directory (%s). Please clean this directory and try again." msgstr "一時ファイルディレクトリ (%s) のスペースが不足しています。このディレクトリをクリーンアップして再試行してください。" #: ../AMC-gui.pl:317 msgid "Several dialogs try to help you be at ease handling AMC." msgstr "ダイアログはAMCを簡単に扱うための手助けをしてくれます。" #: ../AMC-gui.pl:319 #, perl-format msgid "Unless you tick the \"%s\" box, they are shown only once." msgstr "\"%s\" ボックスにチェックをしない限り、それらは一度しか表示されません。" #: ../AMC-gui.pl:321 ../AMC-gui.pl:605 msgid "Show this message again next time" msgstr "次回もこのメッセージを表示する" #: ../AMC-gui.pl:323 msgid "Do you want to forgot which dialogs you have already seen and ask to show all of them next time they should appear ?" msgstr "これまでにどのダイアログを見たかクリアして、次回それらが表示されるようにしますか?" #: ../AMC-gui.pl:357 msgid "Please install libnotify to make desktop notifications available." msgstr "デスクトップ通知を有効にするには、libnotify をインストールしてください。" #. TRANSLATORS: Message when switching to debugging mode. #: ../AMC-gui.pl:552 msgid "Debugging mode." msgstr "デバッグモード。" #. TRANSLATORS: Message when switching to debugging mode. %s will be replaced with the path of the log file. #: ../AMC-gui.pl:554 #, perl-format msgid "Debugging informations will be written in file %s." msgstr "デバッグ情報は %s ファイルに書き込まれます。" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:583 ../AMC-gui-main_window.glade:3131 msgid "French" msgstr "フランス語" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:585 ../AMC-gui-main_window.glade:3145 msgid "English" msgstr "英語" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:587 ../AMC-gui-main_window.glade:3159 msgid "Japanese" msgstr "日本語" #. TRANSLATORS: This is the title of the column containing student/copy identifier in the table showing the results of data captures. #: ../AMC-gui.pl:703 msgid "identifier" msgstr "用紙ID" #. TRANSLATORS: This is the title of the column containing data capture date/time in the table showing the results of data captures. #: ../AMC-gui.pl:712 msgid "updated" msgstr "更新日時" #. TRANSLATORS: This is the title of the column containing Mean Square Error Distance (some kind of mean distance between the location of the four corner marks on the scan and the location where they should be if the scan was not distorted at all) in the table showing the results of data captures. #: ../AMC-gui.pl:720 ../AMC-gui.pl:4992 ../AMC-perl/AMC/Gui/Manuel.pm:192 #: ../AMC-gui-main_window.glade:136 msgid "MSE" msgstr "用紙ゆがみ" #. TRANSLATORS: This is the title of the column containing so-called "sensitivity" (an indicator telling the user if the darkness ratio of some boxes on the page are very near the threshold. A great value tells that some darkness ratios are very near the threshold, so that the capture is very sensitive to the threshold. A small value is a good thing) in the table showing the results of data captures. #: ../AMC-gui.pl:729 ../AMC-gui.pl:4994 ../AMC-perl/AMC/Gui/Manuel.pm:200 msgid "sensitivity" msgstr "白黒閾値近接度" #: ../AMC-gui.pl:737 msgid "scan file" msgstr "スキャン画像ファイル" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:766 ../AMC-gui.pl:784 msgid "Western Europe" msgstr "西欧" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:768 ../AMC-gui.pl:786 msgid "Central Europe" msgstr "中欧" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:770 msgid "Southern Europe" msgstr "南欧" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:772 msgid "Northern Europe" msgstr "バルト語" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:774 msgid "Cyrillic" msgstr "キリル文字" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:776 msgid "Turkish" msgstr "トルコ語" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:778 msgid "Northern" msgstr "北欧" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:780 msgid "Unicode" msgstr "Unicode" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:804 ../AMC-gui.pl:3338 msgid "(none) [No primary key found in association list]" msgstr "(なし)" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:806 ../AMC-gui.pl:3976 msgid "(none) [No code found in LaTeX file]" msgstr "(なし)" #. TRANSLATORS: One of the printing methods: use a command (This is not the command name itself). This is a menu entry. #: ../AMC-gui.pl:835 msgid "command" msgstr "コマンド" #. TRANSLATORS: One of the printing methods: print to files. This is a menu entry. #: ../AMC-gui.pl:837 msgid "to files" msgstr "ファイルへ" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:841 msgid "floor" msgstr "切捨て" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:843 msgid "rounding" msgstr "丸め" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:845 msgid "ceiling" msgstr "切上げ" #. TRANSLATORS: One option for decimal point: use a comma. This is a menu entry #: ../AMC-gui.pl:849 msgid ", (comma)" msgstr ", (カンマ)" #. TRANSLATORS: One option for decimal point: use a point. This is a menu entry. #: ../AMC-gui.pl:851 msgid ". (dot)" msgstr ". (点)" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:856 msgid "one sided [No two-sided printing]" msgstr "片面" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:858 msgid "long edge" msgstr "長辺" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:860 msgid "short edge" msgstr "短辺" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:864 msgid "(none) [No transitional image type (direct processing)]" msgstr "(なし)" #. TRANSLATORS: One of the actions that can be done after exporting the marks. Here, do nothing more. This is a menu entry. #: ../AMC-gui.pl:872 msgid "that's all" msgstr "する" #. TRANSLATORS: One of the actions that can be done after exporting the marks. Here, open the exported file. This is a menu entry. #: ../AMC-gui.pl:874 msgid "open the file" msgstr "して、そのファイルを開く" #. TRANSLATORS: One of the actions that can be done after exporting the marks. Here, open the directory where the file is. This is a menu entry. #: ../AMC-gui.pl:876 msgid "open the directory" msgstr "して、そのディレクトリを開く" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:879 msgid "(none) [No annotation position (do not write anything)]" msgstr "(なし)" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: in one margin. This is a menu entry. #: ../AMC-gui.pl:881 msgid "in one margin" msgstr "片方のマージン" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: in one of the two margins. This is a menu entry. #: ../AMC-gui.pl:883 msgid "in the margins" msgstr "いずれかのマージン" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: near the boxes. This is a menu entry. #: ../AMC-gui.pl:885 msgid "near boxes" msgstr "ボックス付近" #. TRANSLATORS: One of the possible location for questions scores on annotated completed answer sheet: in the zones defined in the source file #: ../AMC-gui.pl:887 msgid "where defined in the source" msgstr "ソースコードで指定" #. TRANSLATORS: One of the possible sorting criteria for students in the exported spreadsheet with scores: the student name. This is a menu entry. #. TRANSLATORS: This is the title of a column containing students names in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:890 ../AMC-gui.pl:6357 msgid "name" msgstr "氏名" #. TRANSLATORS: One of the possible sorting criteria for students in the exported spreadsheet with scores: the student sheet number. This is a menu entry. #: ../AMC-gui.pl:892 msgid "exam copy number" msgstr "試験問題番号" #. TRANSLATORS: One of the possible sorting criteria for students in the exported spreadsheet with scores: the line where one can find this student in the students list file. This is a menu entry. #: ../AMC-gui.pl:894 msgid "line in students list" msgstr "受験者名簿順" #. TRANSLATORS: you can omit the [...] part, just here to explain context #. One of the possible sorting criteria for students in the exported spreadsheet with scores: the student mark. This is a menu entry. #: ../AMC-gui.pl:897 msgid "mark [student mark, for sorting]" msgstr "得点" #. TRANSLATORS: One of the possible way to group annotated answer sheets together to PDF files: make one PDF file per student, with all his pages. This is a menu entry. #: ../AMC-gui.pl:902 msgid "One file per student" msgstr "受験者1人に1ファイル" #. TRANSLATORS: One of the possible way to group annotated answer sheets together to PDF files: make only one PDF with all students sheets. This is a menu entry. #: ../AMC-gui.pl:904 msgid "One file for all students" msgstr "受験者全員で1ファイル" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we only select pages where the student has written something (in separate answer sheet mode, these are the pages from the answer sheet and not the pages from the subject). #: ../AMC-gui.pl:907 msgid "Only pages with answers" msgstr "答案のページのみ" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we take the pages were the students has nothing to write (often question pages from a subject with separate answer sheet option) from the subject. #: ../AMC-gui.pl:909 msgid "Question pages from subject" msgstr "設問ページを問題用紙からコピー" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we take the pages were the students has nothing to write (often question pages from a subject with separate answer sheet option) from the correction. #: ../AMC-gui.pl:911 msgid "Question pages from correction" msgstr "設問ページを採点済用紙からコピー" #: ../AMC-gui.pl:914 msgid "All students" msgstr "全受験者" #: ../AMC-gui.pl:916 msgid "Selected students" msgstr "選択した受験者" #: ../AMC-gui.pl:918 msgid "Please select..." msgstr "モードを選択してください..." #. TRANSLATORS: One of the ways exam was made: each student has a different answer sheet with a different copy number - no photocopy was made. This is a menu entry. #. TRANSLATORS: This is a title for the AMC mode where the distributed exam papers are all different (different paper numbers at the top) -- photocopy is not used. #: ../AMC-gui.pl:920 ../AMC-gui.pl:2981 msgid "Different answer sheets" msgstr "受験者個別答案用紙モード" #. TRANSLATORS: One of the ways exam was made: some students have the same exam subject, as some photocopies were made before distributing the subjects. This is a menu entry. #. TRANSLATORS: This is a title for the AMC mode where some answer sheets have been photocopied before being distributed to the students. #: ../AMC-gui.pl:922 ../AMC-gui.pl:2986 msgid "Some answer sheets were photocopied" msgstr "コピー答案用紙モード" #. TRANSLATORS: One of the ways to send mail: use sendmail command. This is a menu entry. #: ../AMC-gui.pl:924 msgid "sendmail" msgstr "sendmail" #. TRANSLATORS: One of the ways to send mail: use a SMTP server. This is a menu entry. #: ../AMC-gui.pl:926 msgid "SMTP" msgstr "SMTP" #: ../AMC-gui.pl:927 msgid "None [SMTP security]" msgstr "なし" #: ../AMC-gui.pl:936 msgid "Standard" msgstr "標準" #: ../AMC-gui.pl:938 msgid "Separate answer sheet" msgstr "別紙答案用紙モード" #: ../AMC-gui.pl:940 ../AMC-gui.pl:2683 ../AMC-gui.pl:2701 msgid "Answer sheet first" msgstr "答案用紙優先" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. #: ../AMC-gui.pl:944 msgid "nothing" msgstr "なし" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. #: ../AMC-gui.pl:946 msgid "circle" msgstr "円" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. Here, a cross. #: ../AMC-gui.pl:948 msgid "mark" msgstr "×印" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets to tell if boxes are to be ticked or not, and if they were detected as ticked or not. Here, the box outline. #: ../AMC-gui.pl:950 msgid "box" msgstr "四角形" #: ../AMC-gui.pl:1045 #, perl-format msgid "Exporting to '%s' needs some perl modules that are not installed: %s. Please install these modules or switch to another export format." msgstr "'%s' にエクスポートするのに必要なperlモジュール %s がインストールされていません。これらのモジュールをインストールするか別のエクスポート形式に変更してください。" #: ../AMC-gui.pl:1068 msgid "When referring to a particular answer in the export, the letter used will be the one found in the catalog. However, the catalog has not yet been built. Do you want to build it now?" msgstr "エクスポート中の各解答には設問カタログ中の文字が使用されます。しかし、設問カタログがまだ生成されていません。今すぐに生成しますか?" #: ../AMC-gui.pl:1104 msgid "Exporting marks..." msgstr "採点結果をエクスポートしています..." #: ../AMC-gui.pl:1143 #, perl-format msgid "Export to %s did not work: file not created..." msgstr "%s へのエクスポートができません。ファイルは作成されませんでした..." #. TRANSLATORS: One of the popup menu that appears when right-clicking on a page in the data capture diagnosis table. Choosing this entry, an image will be opened to see where the corner marks were detected. #: ../AMC-gui.pl:1152 ../AMC-gui.pl:4996 msgid "page adjustment" msgstr "四隅マーカー確認" #. TRANSLATORS: One of the popup menu that appears when right-clicking on a page in the data capture diagnosis table. Choosing this entry, a window will be opened were the user can see all boxes on the scans and how they were filled by the students, and correct detection of ticked-or-not if needed. #: ../AMC-gui.pl:1154 ../AMC-gui.pl:4996 msgid "boxes zooms" msgstr "ボックス拡大画像" #: ../AMC-gui.pl:1225 #, perl-format msgid "You requested to delete all data capture results for %d page(s)" msgstr "%d ページ分のマーク認識結果の削除が要求されました。" #: ../AMC-gui.pl:1226 msgid "All data and image files related to these pages will be deleted." msgstr "これらのページに関連するすべてのデータと画像のファイルが削除されます。" #: ../AMC-gui.pl:1227 msgid "Do you really want to continue?" msgstr "本当に続けますか?" #: ../AMC-gui.pl:1405 #, perl-format msgid "Following command could not be run: %s, perhaps due to a poor configuration?" msgstr "コマンド %s が起動できません。設定に不具合はありませんか?" #: ../AMC-gui.pl:1450 #, perl-format msgid "Current directory: %s" msgstr "現在のディレクトリ: %s" #: ../AMC-gui.pl:1509 msgid "Existing projects:" msgstr "既存プロジェクト:" #. TRANSLATORS: Window title when creating a new project. #: ../AMC-gui.pl:1514 msgid "New AMC project" msgstr "新規AMCプロジェクト" #: ../AMC-gui.pl:1519 msgid "Projects management:" msgstr "プロジェクト管理:" #: ../AMC-gui.pl:1520 msgid "Change project name:" msgstr "プロジェクト名を変更:" #: ../AMC-gui.pl:1525 msgid "Back" msgstr "戻る" #. TRANSLATORS: Window title when managing projects. #: ../AMC-gui.pl:1528 msgid "AMC projects management" msgstr "AMCプロジェクト管理" #: ../AMC-gui.pl:1550 #, perl-format msgid "You don't have any MC project in directory %s!" msgstr "このディレクトリにはAMCプロジェクトがありません: %s!" #: ../AMC-gui.pl:1559 ../AMC-gui-choix_projet.glade:260 msgid "Choose directory" msgstr "ディレクトリ選択" #: ../AMC-gui.pl:1604 #, perl-format msgid "You can't change project %s since it's open." msgstr "開いているプロジェクト %s は変更できません。" #: ../AMC-gui.pl:1626 #, perl-format msgid "This will clone project %s to a new project %s." msgstr "これは、プロジェクト %s を新しいプロジェクト %s にクローンします。" #. TRANSLATORS: Message when you want to create an AMC project with name xxx, but there already exists a directory in the projects directory with this name! #: ../AMC-gui.pl:1697 #, perl-format msgid "Directory %s already exists, so you can't choose this name." msgstr "ディレクトリ %s は既に存在するので、この名前は選べません。" #: ../AMC-gui.pl:1743 msgid "Destination project directory already exists" msgstr "コピー先プロジェクトディレクトリが既に存在します" #: ../AMC-gui.pl:1755 msgid "Copying project..." msgstr "プロジェクトをコピーしています..." #: ../AMC-gui.pl:1780 msgid "Your project has been copied" msgstr "プロジェクトがコピーされました" #: ../AMC-gui.pl:1781 #, perl-format msgid "(%d files out of %d)" msgstr "(%d/%d ファイル)" #: ../AMC-gui.pl:1788 msgid "Source project directory not found" msgstr "コピー元プロジェクトディレクトリが見つかりません" #: ../AMC-gui.pl:1796 #, perl-format msgid "An error occuried during project copy: %s." msgstr "プロジェクトのコピー中にエラーが発生しました: %s。" #: ../AMC-gui.pl:1817 #, perl-format msgid "You asked to remove project %s." msgstr "プロジェクト %s を削除します。" #: ../AMC-gui.pl:1818 msgid "This will permanently erase all the files of this project, including the source file as well as all the files you put in the directory of this project, as the scans for example." msgstr "このプロジェクトの全ファイルを永久に消去します。これには、ソースファイルやこのプロジェクトのディレクトリに置いた全ファイル(スキャン画像など)を含みます。" #: ../AMC-gui.pl:1819 msgid "Is this really what you want?" msgstr "本当に実行しますか?" #: ../AMC-gui.pl:1876 #, perl-format msgid "You selected directory %s as a project to open." msgstr "ディレクトリ %s を選択してプロジェクトを開こうとしています。" #: ../AMC-gui.pl:1877 msgid "However, this directory does not seem to contain a project. Do you still want to try?" msgstr "しかしこのディレクトリにはプロジェクトが含まれていないようです。続けてみますか?" #: ../AMC-gui.pl:1894 #, perl-format msgid "You selected project %s from directory %s." msgstr "ディレクトリ %2$s にあるプロジェクト %1$s を選択しました。" #: ../AMC-gui.pl:1895 msgid "Do you want to copy this project to your projects directory before opening it?" msgstr "プロジェクトを開く前にあなたのプロジェクトディレクトリにコピーしますか?" #: ../AMC-gui.pl:1965 #, perl-format msgid "The name %s is already used in the projects directory." msgstr "プロジェクトディレクトリ内で %s という名前は既に使用されています。" #: ../AMC-gui.pl:1966 msgid "You must choose another name to create a project." msgstr "プロジェクトを作成するには別の名前をつける必要があります。" #: ../AMC-gui.pl:2005 msgid "LaTeX packages:" msgstr "LaTeXパッケージ:" #: ../AMC-gui.pl:2006 msgid "Commands:" msgstr " コマンド:" #: ../AMC-gui.pl:2007 msgid "Fonts:" msgstr "フォント:" #: ../AMC-gui.pl:2022 msgid "Your AMC version and LaTeX style file version differ. Even if the documents are properly generated, this can lead to many problems using AMC.\n" msgstr "AMCのバージョンとLaTeXスタイルファイルのバージョンが異なっています。文書が適切に生成されたとしても、AMC使用時に種々の問題が発生する可能性があります。\n" #: ../AMC-gui.pl:2023 msgid "Please check your installation to get matching AMC and LaTeX style file versions.\n" msgstr "インストールを確認して、AMCとLaTeXスタイルファイルのバージョンを一致させてください。\n" #: ../AMC-gui.pl:2024 #, perl-format msgid "" "AMC version: %s\n" "sty version: %s\n" "sty path: %s" msgstr "" "AMCバージョン: %s\n" "styバージョン: %s\n" "styパス: %s" #: ../AMC-gui.pl:2052 msgid "Documents update..." msgstr "文書更新..." #: ../AMC-gui.pl:2076 msgid "Problems while preparing documents" msgstr "文書準備中の不具合" #: ../AMC-gui.pl:2078 msgid "Problems while processing the source file." msgstr "ソースファイル処理中の不具合" #: ../AMC-gui.pl:2081 msgid "You have to correct the source file and re-run documents update." msgstr "ソースファイルを修正して文書更新を再実行する必要があります。" #: ../AMC-gui.pl:2085 msgid "Errors" msgstr "エラー" #: ../AMC-gui.pl:2086 msgid "Only first ten errors written" msgstr "エラーのうち先頭の10個だけ表示" #: ../AMC-gui.pl:2089 msgid "Warnings" msgstr "警告" #: ../AMC-gui.pl:2090 msgid "Only first ten warnings written" msgstr "警告のうち先頭の10個だけ表示" #. TRANSLATORS: Here, %s will be replaced with the translation of "Command output details", and refers to the small expandable part at the bottom of AMC main window, where one can see the output of the commands lauched by AMC. #: ../AMC-gui.pl:2095 #, perl-format msgid "See also the processing log in '%s' below." msgstr "以下の '%s' にある処理ログ参照。" #. TRANSLATORS: Title of the small expandable part at the bottom of AMC main window, where one can see the output of the commands lauched by AMC. #: ../AMC-gui.pl:2097 ../AMC-gui-main_window.glade:2570 msgid "Command output details" msgstr "コマンド出力の詳細" #: ../AMC-gui.pl:2098 msgid "Use LaTeX editor or latex command for a precise diagnosis." msgstr "LaTeXエデイタかlatexコマンドを用いて正確な診断を行ってください。" #: ../AMC-gui.pl:2113 msgid "Documents have been prepared" msgstr "文書が準備できました" #: ../AMC-gui.pl:2143 msgid "Working documents successfully generated." msgstr "作業文書が正しく作成されました。" #. TRANSLATORS: Here, "them" refers to the working documents. #: ../AMC-gui.pl:2145 msgid "You can take a look at them double-clicking on the list." msgstr "リスト上でダブルクリックすると表示されます。" #. TRANSLATORS: Here, "they" refers to the working documents. #: ../AMC-gui.pl:2147 msgid "If they are correct, proceed to layouts detection..." msgstr "これが正しければ、レイアウト検出に進んでください..." #: ../AMC-gui.pl:2169 msgid "Your question has a separate answers sheet." msgstr "別紙答案用紙のある試験問題です。" #: ../AMC-gui.pl:2170 msgid "In this case, letters are shown inside boxes." msgstr "この場合、文字はボックス内に表示されます。" #: ../AMC-gui.pl:2171 msgid "Your question is set to present labels inside the boxes to be ticked." msgstr "これらの試験問題は、ボックス中にあるラベルをチェックするように設定されます。" #. TRANSLATORS: Here, %s will be replaced with the translation of "darkness threshold". #: ../AMC-gui.pl:2174 #, perl-format msgid "For better ticking detection, ask students to fill out completely boxes, and choose parameter \"%s\" around 0.5 for this project." msgstr "より正確にマークを検出するために、受験者にボックスを完全に塗りつぶすよう指示し、このプロジェクトの \"%s\" パラメータを 0.5 付近に選択してください。" #: ../AMC-gui.pl:2175 #, perl-format msgid "At the moment, this parameter is set to %.02f." msgstr "現在このパラメータは %0.2f に設定されています。" #: ../AMC-gui.pl:2176 msgid "Would you like to set it to 0.5?" msgstr "これを 0.5 に設定しますか?" #. TRANSLATORS: This parameter is the ratio of dark pixels number over total pixels number inside box above which a box is considered to be ticked. #: ../AMC-gui.pl:2178 msgid "darkness threshold" msgstr "マーク判定閾値" #: ../AMC-gui.pl:2199 msgid "Papers analysis was already made on the basis of the current working documents." msgstr "現在の作業文書に基づいて、試験問題の解析が完了しています。" #: ../AMC-gui.pl:2200 msgid "You already made the examination on the basis of these documents." msgstr "これらの文書に基づいて試験が作成されています。" #: ../AMC-gui.pl:2201 msgid "If you modify working documents, you will not be capable any more of analyzing the papers you have already distributed!" msgstr "作業文書を修正すると、それ以降、既に配布した試験問題の解析ができなくなります!" #: ../AMC-gui.pl:2202 ../AMC-gui.pl:2229 msgid "Do you wish to continue?" msgstr "続けますか?" #: ../AMC-gui.pl:2203 ../AMC-gui.pl:2230 msgid "Click on OK to erase the former layouts and update working documents, or on Cancel to cancel this operation." msgstr "古いレイアウトを消去して作業文書を更新するにはOKを、この操作を取り消すにはキャンセルをクリックしてください。" #: ../AMC-gui.pl:2204 ../AMC-gui.pl:2231 msgid "To allow the use of an already printed question, cancel!" msgstr "既に印刷した試験問題を使用する場合は、キャンセルしてください!" #: ../AMC-gui.pl:2227 msgid "Layouts are already calculated for the current documents." msgstr "現在の文書用のレイアウトが既に計算されています。" #: ../AMC-gui.pl:2228 msgid "Updating working documents, the layouts will become obsolete and will thus be erased." msgstr "作業文書を更新すると、レイアウトは無効になり消去されます。" #: ../AMC-gui.pl:2258 #, perl-format msgid "To handle properly %s files, AMC needs the following components, that are currently missing:" msgstr "AMCで %s ファイルを適切に扱うには、現在欠けている次のコンポーネントが必要です:" #: ../AMC-gui.pl:2270 msgid "Install these components on your system and try again." msgstr "これらのコンポーネントをインストールして、もう一度試してください。" #. TRANSLATORS: Message when the user required printing the question paper, but it is not present (probably the working documents have not been properly generated). #: ../AMC-gui.pl:2405 msgid "You don't have any question to print: please check your source file and update working documents first." msgstr "印刷する試験問題がありません。ソースファイルをチェックして、作業用文書を更新してください。" #. TRANSLATORS: Message when AMC does not know about the subject pages that has been generated. Usualy this means that the layout computation step has not been made. #: ../AMC-gui.pl:2422 msgid "Question's pages are not detected." msgstr "試験問題のページが検出されていません。" #: ../AMC-gui.pl:2423 msgid "Perhaps you forgot to compute layouts?" msgstr "レイアウト検出を忘れていませんか?" #: ../AMC-gui.pl:2445 #, perl-format msgid "You chose the printing method '%s' but it is not available (%s). Please install the missing dependencies or switch to another printing method." msgstr "印刷方法に '%s' を選択していますが、使用できません(%s)。必要なものをインストールするか、他の印刷方法に切り替えてください。" #: ../AMC-gui.pl:2466 msgid "You chose a printing method using CUPS but there are no configured printer in CUPS. Please configure some printer or switch to another printing method." msgstr "CUPSを使用する印刷方法を選択していますが、CUPSに設定されたプリンタがありません。プリンタを設定するか、他の印刷方法に切り替えてください。" #. TRANSLATORS: This is the title of the column containing the paper's numbers (1,2,3,...) in the table showing all available papers, from which the user will choose those he wants to print. #: ../AMC-gui.pl:2533 msgid "papers" msgstr "試験問題" #: ../AMC-gui.pl:2622 msgid "You did not select any exam to print..." msgstr "印刷する試験問題を選んでいません..." #: ../AMC-gui.pl:2641 ../AMC-gui.pl:2657 msgid "You selected only a few sheets to print." msgstr "わずかの試験問題しか選択していません。" #: ../AMC-gui.pl:2642 msgid "As students are requested to write on more than one page, you must create as many exam sheets as necessary for all your students, with different sheets numbers, and print them all." msgstr "受験者は複数のページに解答する必要があるので、全受験者に必要な分の部数を異なる試験問題番号で作成し、それを全部印刷しなければなりません。" #: ../AMC-gui.pl:2643 msgid "If you print one or several sheets and photocopy them to have enough for all the students, you won't be able to continue with AMC!" msgstr "少数の部数だけ印刷して残りの全受験者分をコピーで作成した場合、AMCで処理することができません!" #: ../AMC-gui.pl:2644 msgid "Do you want to print the selected sheets anyway?" msgstr "それでも選択した試験問題を印刷しますか?" #: ../AMC-gui.pl:2658 msgid "Are you going to photocopy some printed subjects before giving them to the students?" msgstr "印刷した試験問題をコピーして受験者に配りますか?" #: ../AMC-gui.pl:2659 msgid "If so, the corresponding option will be set for this project." msgstr "その場合、このプロジェクトでは対応するオプションがセットされます。" #: ../AMC-gui.pl:2660 msgid "However, you will be able to change this when giving your first scans to AMC." msgstr "ただし、最初のスキャン画像をAMCで取り込むときに、これを変更することができます。" #. TRANSLATORS: the two %s will be replaced by the translations of "Answer sheet first" and "Extracting method". #: ../AMC-gui.pl:2682 #, perl-format msgid "You selected the '%s' option, that uses '%s', so the %s has been set to '%s' for you." msgstr "選択している '%s' オプションは '%s' を使用するので、'%s' は '%s' に設定されました。" #: ../AMC-gui.pl:2684 ../AMC-gui-edit_preferences.glade:902 msgid "Extracting method" msgstr "抽出方法" #: ../AMC-gui.pl:2700 #, perl-format msgid "You selected the '%s' option, but this option needs 'qpdf' or 'pdftk' to be installed on your system. Please install one of these and try again." msgstr "'%s' オプションを選択するにはシステムに 'qpdf' または 'pdftk' がインストールされている必要があります。いずれかをインストールして再試行してください。" #: ../AMC-gui.pl:2741 msgid "Print papers one by one..." msgstr "試験問題を1部ずつ印刷します..." #: ../AMC-gui.pl:2790 msgid "Working documents are in an old format, which is not supported anymore." msgstr "作業文書が、サポート対象でない古い形式です。" #: ../AMC-gui.pl:2791 msgid "Please generate again the working documents!" msgstr "作業文書を再生成してください!" #: ../AMC-gui.pl:2805 msgid "Detecting layouts..." msgstr "レイアウトを検出しています..." #: ../AMC-gui.pl:2823 msgid "No layout detected." msgstr "レイアウトが検出できませんでした。" #: ../AMC-gui.pl:2824 msgid "Don't go through the examination before fixing this problem, otherwise you won't be able to use AMC for correction." msgstr "この問題が修正されるまで試験を実施しないでください。でなければ、AMCを用いて採点できません。" #: ../AMC-gui.pl:2830 msgid "Layouts are detected." msgstr "レイアウトが検出されました。" #: ../AMC-gui.pl:2831 #, perl-format msgid "You can check all is correct clicking on button %s and looking at question pages to see if red boxes are well positioned." msgstr "%s ボタンをクリックし、試験問題ページ上で赤いボックスが正しい位置にあるか見ることで、確認することができます。" #: ../AMC-gui.pl:2831 ../AMC-gui-main_window.glade:560 msgid "Check layouts" msgstr "レイアウト確認" #: ../AMC-gui.pl:2832 msgid "Then you can proceed to printing and to examination." msgstr "その後、印刷および試験に進むことができます。" #: ../AMC-gui.pl:2905 msgid "No layout for this project." msgstr "このプロジェクト用のレイアウトがありません。" #. TRANSLATORS: Here, the first %s will be replaced with "Layout detection" (a button title), and the second %s with "Preparation" (the tab title where one can find this button). #: ../AMC-gui.pl:2907 #, perl-format msgid "Please use button %s in %s before manual data capture." msgstr "手動マーク認識の前に、「%2$s」タブ内の「%1$s」ボタンを使用してください。" #: ../AMC-gui.pl:2908 ../AMC-gui-main_window.glade:508 msgid "Layout detection" msgstr "レイアウト検出" #: ../AMC-gui.pl:2909 ../AMC-gui-main_window.glade:684 msgid "Preparation" msgstr "試験問題作成" #: ../AMC-gui.pl:2947 #, perl-format msgid "Pre-allocate sheet ids from the page numbers, starting at %d" msgstr "ページ番号に基づいて用紙番号を%dから割り当てる" #: ../AMC-gui.pl:2978 msgid "Automatic data capture can be done in two different modes:" msgstr "自動マーク認識には2種類のモードがあります:" #: ../AMC-gui.pl:2983 msgid "In the most robust one, you give a different exam (with a different exam number) to every student. You must not photocopy subjects before distributing them." msgstr "最も堅牢なモードで、各受験者に別々の(試験問題番号の異なる)答案用紙を配る方法です。コピーした試験問題を配ってはいけません。" #: ../AMC-gui.pl:2988 msgid "In the second one (which can be used only if answer sheets to be scanned have one page per candidate) you can photocopy answer sheets and give the same subject to different students." msgstr "二つ目のモードで、1受験者あたり答案用紙を1ページしかスキャンしないときだけ使え、答案用紙を数種類だけ用意して同じ試験問題のコピーを複数の受験者に配ることができます。" #: ../AMC-gui.pl:2989 msgid "After the first automatic capture, you can't switch to the other mode." msgstr "最初の自動マーク認識の後は、モードを変更することはできません。" #: ../AMC-gui.pl:3163 msgid "Automatic data capture..." msgstr "自動マーク認識..." #: ../AMC-gui.pl:3174 msgid "Automatic data capture has been completed" msgstr "自動マーク認識が完了しました。" #: ../AMC-gui.pl:3183 #, perl-format msgid "Some of the pages you submitted (%d of them) have already been processed before. Old data has been overwritten." msgstr "提出したページのうち %d 件は既に処理済です。旧データは上書き更新されました。" #. TRANSLATORS: Names list file : (none) #: ../AMC-gui.pl:3271 msgid "(none)" msgstr "(なし)" #: ../AMC-gui.pl:3292 #, perl-format msgid "Unsuitable names file: %d errors, first on line %d." msgstr "名簿ファイルが不適切です: エラーが%d個あり、最初のエラーは%d行目です。" #. TRANSLATORS: Here, do not translate 'name' and 'surname' (except in french), as the column names in the students list file has to be named in english in order to be properly detected. #: ../AMC-gui.pl:3309 #, perl-format msgid "Found %d empty names in names file %s. Check that name or surname column is present, and always filled." msgstr "名簿ファイル%2$s中に氏名のない行が%1$d件あります。先頭行にnameあるいはsurnameという名前のカラムがあることと、すべての行に正しく記入されていることを確認してください。" #: ../AMC-gui.pl:3310 ../AMC-gui.pl:3326 msgid "Edit the names file to correct it, and re-read." msgstr "名簿ファイルを編集・修正して、再読込みしてください。" #: ../AMC-gui.pl:3326 #, perl-format msgid "Found duplicate names: %s. Check that all names are different." msgstr "氏名 %s が重複しています: すべての氏名が異なっているか確認してください。" #. TRANSLATORS: Here, %s will be replaced with the name of the tab "Data capture". #: ../AMC-gui.pl:3358 #, perl-format msgid "Before associating names to papers, you must choose a students list file in tab \"%s\"." msgstr "答案の受験者識別をする前に、\"%s\" タブで、受験者名簿ファイルを選ばなければなりません。" #. One of the "notify the user at the end of the following actions" checkbox: for automatic data capture. #: ../AMC-gui.pl:3359 ../AMC-gui-edit_preferences.glade:1584 #: ../AMC-gui-main_window.glade:1286 msgid "Data capture" msgstr "マーク認識" #: ../AMC-gui.pl:3368 msgid "Please choose a key from primary keys in students list before association." msgstr "受験者識別をする前に、受験者名簿のカラムのうち識別に用いるカラム名を選んでください。" #: ../AMC-gui.pl:3377 msgid "Please choose a code (made with LaTeX command \\AMCcodeGrid or equivalent) before automatic association." msgstr "自動受験者識別の前に、(\\AMCcodeGrid または同等のLaTeXコマンドで作成した)コード名を選んでください。" #. TRANSLATORS: Here, %s will be replaced with "Students identification", which refers to a paragraph in the tab "Marking" from AMC main window. #: ../AMC-gui.pl:3422 #, perl-format msgid "Before associating names to papers, you must choose a students list file in paragraph \"%s\"." msgstr "答案の受験者識別をする前に、\"%s\" 欄で、受験者名簿ファイルを選ばなければなりません。" #: ../AMC-gui.pl:3423 msgid "Students identification" msgstr "受験者識別" #: ../AMC-gui.pl:3446 msgid "Automatic association..." msgstr "自動受験者識別..." #: ../AMC-gui.pl:3468 #, perl-format msgid "Automatic association completed: %d students recognized." msgstr "自動受験者識別完了: 受験者 %d 人を認識しました。" #. TRANSLATORS: Here %s and %s will be replaced with two parameters names: "Primary key from this list" and "Code name for automatic association". #: ../AMC-gui.pl:3470 #, perl-format msgid "Please check \"%s\" and \"%s\" values and try again." msgstr "\"%s\" と \"%s\" の値を確認してもう一度試してください。" #: ../AMC-gui.pl:3471 msgid "Primary key from this list" msgstr "名簿内の受験者識別用カラム名" #: ../AMC-gui.pl:3472 msgid "Code name for automatic association" msgstr "答案内の受験者識別用コード名" #: ../AMC-gui.pl:3478 msgid "Automatic association is now finished. You can ask for manual association to check that all is fine and, if necessary, read manually students names which have not been automatically identified." msgstr "自動受験者識別が終了しました。手動受験者識別を用いれば、すべて成功しているか確認して、必要なら識別できなかった受験者の氏名を手動で読みとることができます。" #: ../AMC-gui.pl:3640 #, perl-format msgid "Some manual association data has be found, which will be lost if the primary key is changed. Do you want to switch back to the primary key \"%s\" and keep association data?" msgstr "手動受験者識別データが既にいくつかありますが、受験者識別用カラムを変更すると失われます。受験者識別用カラムを \"%s\" に戻して受験者識別データを残しますか?" #: ../AMC-gui.pl:3666 #, perl-format msgid "The primary key from the students list has been set to \"%s\", which is not the value from the association data." msgstr "受験者名簿の受験者識別用カラムが \"%s\" に設定されました。これは現在の受験者識別データの値とは異なります。" #: ../AMC-gui.pl:3667 msgid "Automatic papers/students association will be re-run to update the association data." msgstr "自動受験者識別を再実行して受験者識別データを更新します。" #: ../AMC-gui.pl:3693 #, perl-format msgid "Papers are not yet corrected: use button \"%s\"." msgstr "答案がまだ採点されていません: \"%s\" ボタンを使用してください。" #. TRANSLATORS: This is a button: "Mark" is here an action to be called by the user. When clicking this button, the user requests scores to be computed for all students. #: ../AMC-gui.pl:3695 ../AMC-gui-main_window.glade:1363 msgid "Mark" msgstr "採点" #: ../AMC-gui.pl:3736 msgid "Extracting marking scale..." msgstr "採点基準の抽出..." #: ../AMC-gui.pl:3940 msgid "Computing marks..." msgstr "得点を計算しています..." #: ../AMC-gui.pl:3945 msgid "Grading has been completed" msgstr "採点が完了しました。" #. TRANSLATORS: This is the marks mean for all students. #: ../AMC-gui.pl:3961 #, perl-format msgid "Mean: %.2f" msgstr "平均: %.2f" #: ../AMC-gui.pl:3964 msgid "No marks computed" msgstr "得点が計算されていません" #: ../AMC-gui.pl:3983 msgid "Pre-association" msgstr "印刷時識別済" #: ../AMC-gui.pl:3997 msgid "No students list file" msgstr "受験者名簿ファイルがありません" #: ../AMC-gui.pl:3999 msgid "No primary key from students list file" msgstr "受験者名簿の受験者識別用カラムがありません" #: ../AMC-gui.pl:4005 #, perl-format msgid "Missing identification for %d answer sheets" msgstr "答案 %d 件の受験者識別ができていません" #: ../AMC-gui.pl:4007 msgid "All completed answer sheets are associated with a student name" msgstr "答案はすべて受験者識別されています" #: ../AMC-gui.pl:4061 msgid "exam ID" msgstr "試験ID" #: ../AMC-gui.pl:4076 msgid "student" msgstr "受験者" #. TRANSLATORS: File name for single annotated answer sheets with only some selected students. Please use simple characters. #: ../AMC-gui.pl:4207 msgid "Selected_students" msgstr "Selected_students" #. TRANSLATORS: File name for single annotated answer sheets with all students. Please use simple characters. #: ../AMC-gui.pl:4209 msgid "All_students" msgstr "All_students" #: ../AMC-gui.pl:4257 msgid "Annotating papers..." msgstr "答案に採点を記入しています..." #: ../AMC-gui.pl:4261 msgid "Annotations have been completed" msgstr "採点記入が完了しました" #: ../AMC-gui.pl:4375 #, perl-format msgid "Project \"%s\" preferences" msgstr "プロジェクト \"%s\" の設定" #: ../AMC-gui.pl:4378 msgid "Project preferences" msgstr "プロジェクト設定" #: ../AMC-gui.pl:4484 #, perl-format msgid "You modified \"%s\" value, which is the default value used when creating new projects. Do you want to change also \"%s\" for the opened %s project?" msgstr "\"%s\" の値を修正しました。これは新しいプロジェクトを作成するときのデフォルト値です。\"%s\" (現在の \"%s\" プロジェクト用)も変更しますか?" #: ../AMC-gui.pl:4600 msgid "Working documents are not readable" msgstr "作業文書が読み込めません" #: ../AMC-gui.pl:4603 msgid "No working documents" msgstr "作業文書なし" #: ../AMC-gui.pl:4606 msgid "Working documents last update:" msgstr "作業文書最終更新:" #: ../AMC-gui.pl:4662 msgid "No layout" msgstr "レイアウトなし" #: ../AMC-gui.pl:4665 #, perl-format msgid "Processed %d pages" msgstr "%d ページ処理済" #: ../AMC-gui.pl:4668 msgid "but some defects were detected." msgstr "しかし問題点がいくつかみつかりました。" #: ../AMC-gui.pl:4680 msgid "The \\namefield command is not used. Writing subjects without name field is not recommended" msgstr "\\namefield コマンドが使用されていません。氏名欄のない試験問題の作成は推奨されません。" #: ../AMC-gui.pl:4681 msgid "The \\namefield command is used several times for the same subject. This should not be the case, as each student should write his name only once" msgstr "\\namefield コマンドが同じ試験問題内で複数回使用されています。各受験者は氏名を1回だけ記入すべきなので、何かのミスと思われます。" #: ../AMC-gui.pl:4682 msgid "No box to be ticked" msgstr "マークするボックスがありません" #: ../AMC-gui.pl:4683 msgid "The corner marks and binary boxes are not at the same location on all pages" msgstr "四隅マーカーと2進ボックスが全ページで同じ位置になっていません。" #: ../AMC-gui.pl:4684 msgid "Some material has been placed out of the page. This is often a result of a multiple columns question group starting too close from the page bottom. In such a case, use \"needspace\"." msgstr "ページ外に配置された素材があります。これは、ページ下部付近で複数カラムの設問グループを開始したときによく発生します。その場合には \"needspace\" を使用してください。" #: ../AMC-gui.pl:4705 msgid "Some potential defects were detected for this subject. Correct them in the source and update the working documents." msgstr "この試験問題に潜在的な問題点がみつかりました。ソースを修正して作業文書を更新してください。" #: ../AMC-gui.pl:4711 #, perl-format msgid "(See for example pages %s and %s)" msgstr "(例えば、ページ %s と %s を見てください)" #: ../AMC-gui.pl:4716 #, perl-format msgid "(Concerns %1$d pages, see for example page %2$s)" msgstr "(%1$d 件のページが関連しています。例としてページ番号 %2$s を見てください)" #: ../AMC-gui.pl:4723 #, perl-format msgid "(Concerns %1$d exams, see for example sheet %2$d)" msgstr "(%1$d 件の試験問題が関連しています。例として試験問題番号 %2$d を見てください)" #: ../AMC-gui.pl:4840 #, perl-format msgid "Data capture from %d complete papers and %d incomplete papers" msgstr "完全な答案 %d 人分と、不完全な答案 %d 人分のマークが認識されました" #: ../AMC-gui.pl:4844 #, perl-format msgid "Data capture from %d complete papers" msgstr "完全な答案 %d 人分のマークが認識されました" #. TRANSLATORS: this text points out that no data capture has been made yet. #: ../AMC-gui.pl:4849 msgid "No data" msgstr "マーク認識結果なし" #: ../AMC-gui.pl:4856 #, perl-format msgid "Overwritten pages: %d" msgstr "上書き更新されたページ数: %d" #: ../AMC-gui.pl:4864 msgid "All scans were properly recognized." msgstr "スキャン画像はすべて適切に認識されました。" #: ../AMC-gui.pl:4871 #, perl-format msgid "%d scans were not recognized." msgstr "スキャン画像のうち %d 件が認識できません" #. TRANSLATORS: column title for the list of overwritten pages. This refers to the page from the question #: ../AMC-gui.pl:4895 msgid "Page" msgstr "ページ" #. TRANSLATORS: column title for the list of overwritten pages. This refers to the number of times the page has been overwritten. #: ../AMC-gui.pl:4900 msgid "count" msgstr "回数" #. TRANSLATORS: column title for the list of overwritten pages. This refers to the date of the last data capture for the page. #: ../AMC-gui.pl:4905 msgid "Date" msgstr "最終更新" #: ../AMC-gui.pl:4946 msgid "Looking for analysis..." msgstr "解析結果を確認しています..." #: ../AMC-gui.pl:4988 msgid "Automatic data capture now completed." msgstr "自動マーク認識が完了しました。" #: ../AMC-gui.pl:4989 #, perl-format msgid "It is not complete (missing pages from %d papers)." msgstr "完全ではありません(%d 件の答案に不足ページがあります)。" #: ../AMC-gui.pl:4990 msgid "You can analyse data capture quality with some indicators values in analysis list:" msgstr "マーク認識の品質は解析リスト中のいくつかの指標値で確認することができます:" #: ../AMC-gui.pl:4992 #, perl-format msgid "- %s represents positioning gap for the four corner marks. Great value means abnormal page distortion." msgstr "- %s は四隅マーカーの位置ずれを表します。この値が大きいとページのゆがみが異常に大きいことを意味します。" #: ../AMC-gui.pl:4994 #, perl-format msgid "- great values of %s are seen when darkness ratio is very close to the threshold for some boxes." msgstr "- 黒ピクセル比率がマーク判定閾値に非常に近いボックスがあると %s の値が大きくなります。" #: ../AMC-gui.pl:4996 #, perl-format msgid "You can also look at the scan adjustment (%s) and ticked and unticked boxes (%s) using right-click on lines from table %s." msgstr "%3$s 表の該当行を右クリックして、スキャンのずれ(%s)と各ボックスのマーク有無(%s)を見ることもできます。" #: ../AMC-gui.pl:4996 msgid "Diagnosis" msgstr "診断" #: ../AMC-gui.pl:5024 msgid "Pages that miss data capture to complete students sheets:" msgstr "答案の欠落ページ:" #: ../AMC-gui.pl:5145 #, perl-format msgid "Error loading scan %s" msgstr "スキャン画像の読込みエラー: %s" #: ../AMC-gui.pl:5151 msgid "No scan selected" msgstr "スキャン画像が選択されていません" #: ../AMC-gui.pl:5156 msgid "No more unrecognized scans" msgstr "未認識スキャン画像はありません" #: ../AMC-gui.pl:5234 msgid "Making diagnostic image..." msgstr "診断画像を作成しています..." #: ../AMC-gui.pl:5304 msgid "(no description)" msgstr "(説明なし)" #. TRANSLATORS: This is a column title for the list of files to be included in a template being created. #. TRANSLATORS: This is the title of a column containing attachments file paths in a table showing all attachments, when sending them to the students by email. #: ../AMC-gui.pl:5389 ../AMC-gui.pl:6336 msgid "file" msgstr "ファイル" #: ../AMC-gui.pl:5469 msgid "Add files to template" msgstr "テンプレートにファイルを追加" #: ../AMC-gui.pl:5490 msgid "When making a template, you can only add files that are within the project directory." msgstr "テンプレートを作成する際は、プロジェクトディレクトリ内のファイルしか追加できません。" #. TRANSLATORS: This is a column name for the list of available templates, when creating a new project based on a template. #: ../AMC-gui.pl:5613 msgid "template" msgstr "テンプレート" #: ../AMC-gui.pl:5658 msgid "All source files" msgstr "全ソースファイル" #: ../AMC-gui.pl:5676 #, perl-format msgid "%s files" msgstr "%s ファイル" #: ../AMC-gui.pl:5710 msgid "Archive (zip, tgz)" msgstr "アーカイブ(zip, tgz)" #: ../AMC-gui.pl:5739 #, perl-format msgid "Nothing extracted from archive %s. Check it." msgstr "アーカイブ %s から何も取り出せません。確認してください。" #: ../AMC-gui.pl:5868 #, perl-format msgid "File %s already exists in project directory: do you want to replace it?" msgstr "プロジェクトディレクトリに %s ファイルが既に存在します。上書きしますか?" #: ../AMC-gui.pl:5869 msgid "Click yes to replace it and loose pre-existing contents, or No to cancel source file import." msgstr "yesをクリックすると上書きして既存のコンテンツが失われます。noをクリックするとソースファイルのインポートをキャンセルします。" #: ../AMC-gui.pl:5885 msgid "The source file has been copied to project directory." msgstr "ソースファイルがプロジェクトディレクトリにコピーされました。" #: ../AMC-gui.pl:5885 #, perl-format msgid "You can now edit it with button \"%s\" or with any editor." msgstr "\"%s\" ボタンか、お気に入りのエディタで編集することができます。" #: ../AMC-gui.pl:5885 ../AMC-gui-main_window.glade:241 msgid "Edit source file" msgstr "ソースファイル編集" #: ../AMC-gui.pl:5893 #, perl-format msgid "Error copying source file: %s" msgstr "ソースファイルのコピーエラー: %s" #: ../AMC-gui.pl:6078 msgid "In order to send a useful bug report, please attach the following documents:" msgstr "有用なバグレポートを送るには、次の文書を添付してください。" #: ../AMC-gui.pl:6079 msgid "an archive (in some compressed format, like ZIP, 7Z, TGZ...) containing the project directory, scan files and configuration directory (.AMC.d in home directory), so as to reproduce and analyse this problem." msgstr "この問題を再発させて解析できるようにするための、プロジェクトディレクトリを含んだアーカイブ(ZIP、7Z、TGZ...のような何らかの圧縮形式)、スキャン画像ファイル、および、設定ディレクトリ(ホームディレクトリ中の.AMC.d)。" #: ../AMC-gui.pl:6080 msgid "the log file produced when the debugging mode (in Help menu) is checked. Please try to reproduce the bug with this mode activated." msgstr "ヘルプメニュー内の「デバッグ」にチェックを入れて生成されたログファイル。このモードを有効にしてからバグを再発させてみてください。" #: ../AMC-gui.pl:6081 #, perl-format msgid "Bug reports can be filled at %s or sent to the address below." msgstr "バグレポートは %s に記入するか、以下のアドレスに送付することができます。" #: ../AMC-gui.pl:6082 ../AMC-gui.pl:6086 msgid "AMC community site" msgstr "AMCコミュニティサイト" #: ../AMC-gui.pl:6149 msgid "Attach file" msgstr "添付するファイル" #: ../AMC-gui.pl:6183 msgid "There are no annotated corrected answer sheets to send." msgstr "採点を記入して受験者別にまとめた答案がないので送れません。" #: ../AMC-gui.pl:6186 msgid "Please group the annotated sheets to PDF files to be able to send them." msgstr "採点記入済答案を送るには、PDFにグループ化してください。" #: ../AMC-gui.pl:6187 msgid "Please annotate answer sheets and group them to PDF files to be able to send them." msgstr "採点記入済答案を送るには、答案に採点を記入し、PDFにグループ化してください。" #: ../AMC-gui.pl:6218 #, perl-format msgid "Sending emails requires some perl modules that are not installed: %s. Please install these modules and try again." msgstr "メールを送るのに必要なperlモジュール %s がインストールされていません。これらのモジュールをインストールして、もう一度試してください。" #: ../AMC-gui.pl:6239 msgid "SMTP security mode \"STARTTLS\" is only available with Email::Sender version 1.300027 and over. Please install a newer version of this perl module or change SMTP security mode, and try again." msgstr "SMTPセキュリティモード \"STARTTLS\" は Email::Sender のバージョン 1.300027 以上でのみ使用できます。このperlモジュールの最新バージョンをインストールするか、SMTPセキュリティモードを変更して、再試行してください。" #: ../AMC-gui.pl:6255 #, perl-format msgid "The email address you entered (%s) is not correct." msgstr "入力されている差出人メールアドレス(%s)が正しくありません。" #: ../AMC-gui.pl:6257 msgid "Please edit your preferences to correct your email address." msgstr "設定メニューを編集して、差出人メールアドレスを修正してください。" #: ../AMC-gui.pl:6259 msgid "You did not enter your email address." msgstr "差出人メールアドレスが入力されていません。" #: ../AMC-gui.pl:6260 msgid "Please edit the preferences to set your email address." msgstr "設定メニューを編集して、差出人メールアドレスを設定してください。" #: ../AMC-gui.pl:6283 #, perl-format msgid "The sendmail program cannot be found at the location you specified in the preferences (%s). Please update your configuration." msgstr "設定メニュー(%s)で指定した場所に sendmail プログラムがありません。設定を更新してください。" #: ../AMC-gui.pl:6303 msgid "No email addresses has been found in the students list file. You need to write the students addresses in a column of this file." msgstr "受験者名簿にメールアドレスがみつかりません。このファイルにアドレスのカラムが必要です。" #. TRANSLATORS: This is the title of a column containing copy numbers in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:6351 msgid "copy" msgstr " 答案番号" #. TRANSLATORS: This is the title of a column containing students email addresses in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:6363 msgid "email" msgstr "アドレス" #. TRANSLATORS: This is the title of a column containing mailing status (not sent, already sent, failed) in a table showing all annotated answer sheets, when sending them to the students by email. #: ../AMC-gui.pl:6369 msgid "status" msgstr "状態" #: ../AMC-gui.pl:6388 msgid "failed" msgstr "失敗" #: ../AMC-gui.pl:6446 msgid "Some files you asked to be attached to the emails are missing:" msgstr "メールに添付するファイルが見つかりません:" #: ../AMC-gui.pl:6447 msgid "Please create them or remove them from the list of attached files." msgstr "これらを作成するか、添付ファイル一覧から削除してください。" #: ../AMC-gui.pl:6499 msgid "Sending emails..." msgstr "メールを送信しています..." #: ../AMC-gui.pl:6508 msgid "Cancelled." msgstr "キャンセル済" #: ../AMC-gui.pl:6510 msgid "SMTP authentication failed: check SMTP configuration and password." msgstr "SMTP認証の失敗: SMTPの設定とパスワードを確認してください。" #: ../AMC-gui.pl:6512 #, perl-format msgid "%d message(s) has been sent." msgstr "%d 件のメッセージが送信されました。" #: ../AMC-gui.pl:6552 msgid "Set exam name" msgstr "試験名称を設定" #: ../AMC-gui.pl:6559 ../AMC-gui-edit_preferences.glade:4154 msgid "Examination name" msgstr "試験名称" #: ../AMC-gui.pl:6563 ../AMC-gui-edit_preferences.glade:4165 msgid "Code (short name) for examination" msgstr "試験コード(短縮名)" #. TRANSLATORS: This is the title of a column containing all columns names from the students list file, when choosing which columns has to be exported to the spreadsheets. #: ../AMC-gui.pl:6613 msgid "column" msgstr "カラム" #: ../AMC-gui.pl:6621 msgid "" msgstr "<氏名>" #: ../AMC-gui.pl:6622 msgid "" msgstr "<受験番号>" #: ../AMC-gui.pl:6623 msgid "" msgstr "<試験問題番号>" #: ../AMC-gui.pl:6657 msgid "Install an AMC plugin" msgstr "AMCプラグインをインストールする" #: ../AMC-gui.pl:6662 msgid "Plugins (zip, tgz)" msgstr "プラグイン (zip, tgz)" #: ../AMC-gui.pl:6682 #, perl-format msgid "An error occured while trying to extract files from the plugin archive: %s." msgstr "プラグインアーカイブからファイルを取り出す際にエラーがありました: %s。" #: ../AMC-gui.pl:6696 msgid "Nothing extracted from the plugin archive. Check it." msgstr "プラグインアーカイブ %s から何も取り出せません。確認してください。" #: ../AMC-gui.pl:6706 msgid "This is not a valid plugin, as it contains more than one directory at the first level." msgstr "先頭レベルに複数のディレクトリを含むので、有効なプラグインではありません。" #: ../AMC-gui.pl:6717 msgid "This is not a valid plugin, as it does not contain a perl/AMC subdirectory." msgstr "perl/AMCサブディレクトリを含まないので、有効なプラグインではありません。" #: ../AMC-gui.pl:6734 #, perl-format msgid "A plugin is already installed with the same name (%s). Do you want to delete the old one and overwrite?" msgstr "同じ名前のプラグイン(l%s)が既にインストールされています。削除して上書きしますか?" #: ../AMC-gui.pl:6752 #, perl-format msgid "Error while moving the plugin to the user plugin directory: %s" msgstr "プラグインをユーザープラグインディレクトリに移動する際にエラー: %s" #: ../AMC-gui.pl:6762 msgid "Please restart AMC before using the new plugin..." msgstr "新しいプラグインを使用するにはAMCを再起動してください..." #: ../AMC-gui.pl:6814 msgid "zooms" msgstr "拡大画像" #: ../AMC-gui.pl:6815 msgid "boxes images are extracted from the scans while processing automatic data capture. They can be removed if you don't plan to use the zooms dialog to check and correct boxes categorization. They can be recovered processing again automatic data capture from the same scans." msgstr "自動マーク認識の処理中にスキャン画像からボックス画像が抽出されます。拡大画像ダイアログを使ってボックス内のマーク有無の判定をチェックや訂正する必要がなければ、削除してかまいません。同じスキャン画像から自動マーク認識を再実行すれば元に戻すことができます。" #: ../AMC-gui.pl:6827 msgid "layout reports" msgstr "レイアウトレポート" #: ../AMC-gui.pl:6828 msgid "these images are intended to show how the corner marks have been recognized and positioned on the scans. They can be safely removed once the scans are known to be well-recognized. They can be recovered processing again automatic data capture from the same scans." msgstr "これらの画像はどのように四隅マークが認識されスキャン画像中に位置づけられたかを示すためのものです。スキャン画像がうまく認識できたことが確認できれば、削除してかまいません。同じスキャン画像から自動マーク認識を再実行すれば元に戻すことができます。" #: ../AMC-gui.pl:6843 msgid "annotated pages" msgstr "採点記入済答案" #: ../AMC-gui.pl:6844 msgid "jpeg annotated pages are made before beeing assembled to PDF annotated files. They can safely be removed, and will be recovered automatically the next time annotation will be requested." msgstr "PDFの採点記入済答案ファイルを作成する前にJPEGの採点記入済答案が作成されます。これらは削除しても問題なく、次回採点記入をすると自動的に回復されます。" #: ../AMC-gui.pl:6874 msgid "Total size of concerned files:" msgstr "関連するファイルの合計サイズ:" #: ../AMC-gui.pl:6923 #, perl-format msgid "%s files were removed." msgstr "%s ファイルが削除されました。" #: ../AMC-gui.pl:6949 #, perl-format msgid "I don't find the command %s." msgstr "コマンド %s がみつかりません。" #: ../AMC-gui.pl:6950 msgid "Perhaps LaTeX is not installed?" msgstr "LaTeXがインストールされていないようですが?" #. TRANSLATORS: Do not translate 'auto-multiple-choice latex-link', which is a command to be typed on MacOsX #: ../AMC-gui.pl:6954 msgid "The style file automultiplechoice.sty seems to be unreachable. Try to use command 'auto-multiple-choice latex-link' as root to fix this." msgstr "スタイルファイル automultiplechoice.sty がみつかりません。root 権限で 'auto-multiple-choice latex-link' コマンドを実行して、これを修正してください。" #: ../AMC-prepare.pl:274 #, perl-format msgid "%d/%d good answers not coherent for a simple question" msgstr "単一選択問題に %d/%d 個の正解があります。" #: ../AMC-prepare.pl:357 #, perl-format msgid "question ID used several times for the same paper: \"%s\"" msgstr "試験問題内で同一の設問IDが複数回使われています: \"%s\"" #: ../AMC-prepare.pl:444 #, perl-format msgid "An answer appears to be given outside a question environment, after question \"%s\"" msgstr "設問 \"%s\" のあとで、設問環境の外部に解答があります。" #: ../AMC-prepare.pl:453 #, perl-format msgid "Answer number ID used several times for the same question: %s" msgstr "設問内で同一の選択肢番号IDが複数回使われています: %s" #: ../AMC-prepare.pl:708 #, perl-format msgid "%d errors during LaTeX compiling" msgstr "LaTeXコンパイル時にエラーが %d 個ありました。" #: ../AMC-prepare.pl:768 #, perl-format msgid "LaTeX command configured is not present (%s). Install it or change configuration, and then rerun." msgstr "設定されたLaTeXコマンド(%s)が存在しません。インストールするか設定を変更し、再実行してください。" #: ../AMC-prepare.pl:797 msgid "solution" msgstr "模範解答" #: ../AMC-prepare.pl:812 msgid "catalog" msgstr "設問カタログ" #: ../AMC-prepare.pl:845 msgid "question sheet" msgstr "問題用紙" #: ../AMC-prepare.pl:873 #, perl-format msgid "please remove accentuated or non-standard characters from the following question ID: \"%s\"" msgstr "設問ID \"%s\" から、アクセント付または非標準文字を取り除いてください。" #: ../AMC-prepare.pl:875 msgid "some question IDs seems to have accentuated or non-standard characters. This may break future processings." msgstr "設問IDにアクセント付または非標準文字が使用されています。この場合、以降の処理に不具合が発生する可能性があります。" #: ../AMC-read-pdfform.pl:136 msgid "Reading PDF forms..." msgstr "PDFフォームの読込み中..." #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:592 msgid "Name [name column title in exported spreadsheet]" msgstr "氏名" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:594 msgid "Mark [mark column title in exported spreadsheet]" msgstr "得点" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:596 msgid "Exam [exam number column title in exported spreadsheet]" msgstr "試験" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:598 msgid "Score [total score column title in exported spreadsheet]" msgstr "素点合計" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:600 msgid "Max [maximum score column title in exported spreadsheet]" msgstr "素点の満点" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:604 msgid "max [maximum score row name in exported spreadsheet]" msgstr "満点" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:606 msgid "mean [means of scores row name in exported spreadsheet]" msgstr "平均" #. TRANSLATORS: This is the default text to be written on the top of the first page of each paper when annotating. From this string, %s will be replaced with the student final mark, %m with the maximum mark he can obtain, %S with the student total score, and %M with the maximum score the student can obtain. #: ../AMC-perl/AMC/Config.pm:319 msgid "Mark: %s/%m (total score: %S/%M)" msgstr "得点: %s/%m (素点: %S/%M)" #. TRANSLATORS: Subject of the emails which can be sent to the students to give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:344 msgid "Exam result" msgstr "試験結果" #. TRANSLATORS: Body text of the emails which can be sent to the students to give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:346 msgid "" "Please find enclosed your annotated completed answer sheet.\n" "Regards." msgstr "" "答案の採点結果を添付ファイルで送付します。\n" "採点ミスなどがないか確認してください。" #. TRANSLATORS: Message (first part) when some of the commands that are given in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:598 msgid "Some commands allowing to open documents can't be found:" msgstr "ファイルを開くためのコマンドがいくつか見つかりません:" #. TRANSLATORS: Message (second part) when some of the commands that are given in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:601 msgid "Please check its correct spelling and install missing software." msgstr "コマンド名を確認し、不足しているソフトウェアをインストールしてください。" #. TRANSLATORS: Message (third part) when some of the commands that are given in the preferences cannot be found. The %s will be replaced with the name of the menu entry "Preferences" and the name of the menu "Edit". #: ../AMC-perl/AMC/Config.pm:603 #, perl-format msgid "You can change used commands following %s from menu %s." msgstr "「%2$s」メニュー内の「%1$s」を選択して使用するコマンドを変更できます。" #. TRANSLATORS: "Preferences" menu #: ../AMC-perl/AMC/Config.pm:605 ../AMC-gui-main_window.glade:2706 msgid "Preferences" msgstr "設定" #. TRANSLATORS: "Edit" menu #: ../AMC-perl/AMC/Config.pm:607 msgid "Edit" msgstr "編集" #. TRANSLATORS: Error writing one of the configuration files (global or project). The first %s will be replaced with the path of that file, and the second with the error text. #: ../AMC-perl/AMC/Config.pm:841 #, perl-format msgid "Error writing configuration file %s: %s" msgstr "設定ファイル %s への書込みエラー: %s" #: ../AMC-perl/AMC/DataModule/association.pm:103 msgid "Fetching association results from old format XML files..." msgstr "旧形式のXMLファイルから受験者識別結果を取り出しています..." #: ../AMC-perl/AMC/DataModule/capture.pm:210 msgid "Including zooms in the database..." msgstr "データベース内に拡大画像を格納中..." #: ../AMC-perl/AMC/DataModule/capture.pm:229 #: ../AMC-perl/AMC/DataModule/capture.pm:237 msgid "Building capture database indexes..." msgstr "マーク認識データベースの索引を作成中..." #: ../AMC-perl/AMC/DataModule/capture.pm:279 msgid "Fetching data capture results from old format XML files..." msgstr "旧形式のXMLファイルからマーク認識結果を取り出しています..." #: ../AMC-perl/AMC/DataModule/layout.pm:222 msgid "Building layout database indexes..." msgstr "レイアウトデータベースの索引を作成中" #: ../AMC-perl/AMC/DataModule/layout.pm:288 msgid "Fetching layout data from old format XML files..." msgstr "旧形式のXMLファイルからレイアウトデータを取り出しています..." #: ../AMC-perl/AMC/DataModule/scoring.pm:256 msgid "Fetching scoring data from old format XML files..." msgstr "旧形式のXMLファイルから採点データを取り出しています..." #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the total number of sheets. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:236 msgid "ALL" msgstr "計" #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the number of sheets for which the question did not get an answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:238 msgid "NA" msgstr "無記入" #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the number of sheets for which the question got an invalid answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:240 msgid "INVALID" msgstr "矛盾" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains the reference of the boxes. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:268 msgid "Box" msgstr "ボックス" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains the number of items (ticked boxes, or invalid or empty questions). Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:271 msgid "Nb" msgstr "件数" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains percentage of questions for which the corresponding box is ticked over all questions. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:274 msgid "/all" msgstr "/全受験者" #. TRANSLATORS: this is a head name in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding column contains percentage of questions for which the corresponding box is ticked over the expressed questions (counting only questions that did not get empty or invalid answers). Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:277 msgid "/expr" msgstr "/有効解答" #. TRANSLATORS: this is a row label in the table with questions basic statistics in the ODS exported spreadsheet. The corresponding row contains the number of sheets for which the question got the "none of the above are correct" answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:305 msgid "NONE" msgstr "該当なし" #. TRANSLATORS: table name in the exported ODS spreadsheet for the table that contains the marks. #: ../AMC-perl/AMC/Export/ods.pm:883 ../AMC-perl/AMC/Gui/Notes.glade:8 msgid "Marks" msgstr "得点" #. TRANSLATORS: Label of the table with questions basic statistics in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1310 msgid "Questions statistics" msgstr "設問ごとの統計" #. TRANSLATORS: Label of the table with indicative questions basic statistics in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1317 msgid "Indicative questions statistics" msgstr "採点対象外設問の統計" #. TRANSLATORS: Label of the table with a legend (explaination of the colors used) in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1327 ../AMC-perl/AMC/Export/ods.pm:1331 msgid "Legend" msgstr "凡例" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that have not been asked to some students. #: ../AMC-perl/AMC/Export/ods.pm:1337 msgid "Non applicable" msgstr "適用外" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that have not been answered. #: ../AMC-perl/AMC/Export/ods.pm:1341 msgid "No answer" msgstr "無記入" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that have not been answered, but are cancelled by the use of allowempty scoring strategy. #: ../AMC-perl/AMC/Export/ods.pm:1345 msgid "Cancelled" msgstr "キャンセル済" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1349 msgid "Invalid answer" msgstr "マーク矛盾" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1354 msgid "Correct answer" msgstr "正解" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1358 msgid "Wrong answer" msgstr "不正解" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers to the indicative questions. #: ../AMC-perl/AMC/Export/ods.pm:1363 msgid "Indicative" msgstr "採点対象外" #: ../AMC-perl/AMC/Export/ods.pm:1391 msgid "An old state of the exported file seems to be already opened. Use File/Reload from OpenOffice/LibreOffice to refresh." msgstr "エクスポートしたファイルの古い版が既に開かれているようです。OpenOffice/LibreOfficeでファイル/再読み込みを使用してリフレッシュしてください。" #: ../AMC-perl/AMC/Filter/plain.pm:92 msgid "Please code your student number opposite, and write your name in the box below." msgstr "左欄に受験番号をマークし、下欄に氏名を記入してください。" #. TRANSLATORS: Message when the Pages option used in AMC-TXT can't be parsed. %s will be replaced with the option value #: ../AMC-perl/AMC/Filter/plain.pm:209 #, perl-format msgid "Pages option value can't be understood: %s" msgstr "Pagesオプション値が誤っています: %s" #: ../AMC-perl/AMC/Filter/plain.pm:238 #, perl-format msgid "Line %d" msgstr "第%d行" #. TRANSLATORS: Error text for AMC-TXT parsing, when opening a new question whereas the previous question has less than two choices #: ../AMC-perl/AMC/Filter/plain.pm:249 msgid "Previous question has less than two choices" msgstr "前問には選択肢が2個以上ありません。" #. TRANSLATORS: Error text for AMC-TXT parsing #: ../AMC-perl/AMC/Filter/plain.pm:258 #, perl-format msgid "Previous question is a simple question but has %d correct choice(s)" msgstr "この設問は単一選択問題なのに正解が%d個あります。" #: ../AMC-perl/AMC/Filter/plain.pm:342 msgid "Invalid encoding: you must use UTF-8, but your source file was saved using another encoding" msgstr "無効なエンコーディング: UTF-8を使用しなければなりませんが、他のエンコーディングを用いて保存されています。" #: ../AMC-perl/AMC/Filter/plain.pm:368 #, perl-format msgid "File not found: %s" msgstr "ファイルが見つかりません: %s" #. TRANSLATORS: Error text for AMC-TXT parsing, when an unknown option is given a value #: ../AMC-perl/AMC/Filter/plain.pm:386 #, perl-format msgid "Unknown option: %s" msgstr "不明なオプション: %s" #. TRANSLATORS: Error text for AMC-TXT parsing when a choice is given but no question were opened #: ../AMC-perl/AMC/Filter/plain.pm:456 msgid "Choice outside question" msgstr "問題文の前に選択肢があります。" #: ../AMC-perl/AMC/Filter/plain.pm:1240 #, perl-format msgid "The following fonts does not seem to be installed on the system: %s." msgstr "次のフォントがシステムにインストールされていないようです: %s." #: ../AMC-perl/AMC/Filter/register.pm:78 msgid "No description available." msgstr "説明がありません。" #: ../AMC-perl/AMC/Gui/Association.pm:133 msgid "Names images not found... Maybe you forgot using \\namefield command in LaTeX source?" msgstr "氏名画像がみつかりません... LaTeXソースで \\namefield コマンドを使用し忘れていませんか?" #: ../AMC-perl/AMC/Gui/Association.pm:690 msgid "Sheet" msgstr "試験問題" #: ../AMC-perl/AMC/Gui/Association.pm:728 msgid "End" msgstr "終了" #: ../AMC-perl/AMC/Gui/Manuel.pm:117 msgid "Page layout" msgstr "ページレイアウト" #: ../AMC-perl/AMC/Gui/Manuel.pm:125 msgid "Original" msgstr "オリジナル用紙" #: ../AMC-perl/AMC/Gui/Manuel.pm:126 ../AMC-gui-edit_preferences.glade:2138 msgid "Scan" msgstr "スキャン画像" #. TRANSLATORS: This is one of the choices for pages navigation in manual data capture window. Here, navigation goes through all pages. Please keep this text very short (say less than 5 letters) so that the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:130 ../AMC-perl/AMC/Gui/Manuel.pm:146 msgid "all" msgstr "全答案ページ" #. TRANSLATORS: This is one of the choices for pages navigation in manual data capture window. Here, navigation goes through pages with some invalid answers. Please keep this text very short (say less than 5 letters) so that the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:132 msgid "inv" msgstr "矛盾のみ" #. TRANSLATORS: This is one of the choices for pages navigation in manual data capture window. Here, navigation goes through pages with empty or invalid answers. Please keep this text very short (say less than 5 letters) so that the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:134 msgid "i&e" msgstr "無記入と矛盾のみ" #: ../AMC-perl/AMC/Gui/Manuel.pm:184 msgid "page" msgstr "ページ" #: ../AMC-perl/AMC/Gui/Manuel.pm:531 #, perl-format msgid "This is a template exam that you cannot edit. To create a new exam from this one to be edited, use the '%s' button." msgstr "これはテンプレート試験問題なので編集できません。これをもとに新しい試験問題を作って編集するには、'%s' ボタンを使ってください。" #: ../AMC-perl/AMC/Gui/Manuel.pm:531 ../AMC-perl/AMC/Gui/Manuel.glade:406 msgid "Add photocopy" msgstr "複製を追加" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms window #: ../AMC-perl/AMC/Gui/Zooms.pm:76 msgid "drag and drop" msgstr "ドラッグアンドドロップ" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms window #: ../AMC-perl/AMC/Gui/Zooms.pm:78 msgid "click" msgstr "クリック" #: ../AMC-perl/AMC/Gui/Zooms.pm:126 ../AMC-perl/AMC/Gui/Zooms.pm:413 #, perl-format msgid "Boxes zooms for page %s" msgstr "用紙番号 %s のボックス拡大画像" #: ../AMC-perl/AMC/Gui/Zooms.pm:402 ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "You moved some boxes to correct automatic data query, but this work is not saved yet." msgstr "自動マーク認識の結果を補正するためにボックスが移動されていますが、まだ保存されていません。" #: ../AMC-perl/AMC/Gui/Zooms.pm:402 msgid "Do you want to save these modifications before looking at another page?" msgstr "次の用紙を見る前にこの修正を保存しますか?" #: ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "Dou you really want to close and ignore these modifications?" msgstr "本当にこの修正を閉じて無視しますか?" #: ../AMC-perl/AMC/Print/cups.pm:71 #, perl-format msgid "Perl module(s) missing: %s" msgstr "未インストールperlモジュール: %s" #: ../AMC-perl/AMC/Print/cupslp.pm:47 #, perl-format msgid "The following commands are missing: %s." msgstr "未インストールコマンド: %s" #: ../AMC-perl/AMC/Export/register/CSV.pm:70 msgid "Separator" msgstr "セパレータ" #: ../AMC-perl/AMC/Export/register/CSV.pm:83 msgid "Ticked boxes" msgstr "マークしたボックス" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'No, don't group questions by scope in the exported ODS file' #: ../AMC-perl/AMC/Export/register/CSV.pm:89 #: ../AMC-perl/AMC/Export/register/ods.pm:124 msgid "No" msgstr "いいえ" #: ../AMC-perl/AMC/Export/register/CSV.pm:90 #: ../AMC-perl/AMC/Export/register/CSV.pm:91 msgid "Yes:" msgstr "はい:" #: ../AMC-perl/AMC/Export/register/CSV.pm:97 #: ../AMC-perl/AMC/Export/register/ods.pm:152 msgid "Choose columns" msgstr "カラムを選択" #. TRANSLATORS: List of students with their scores: one of the export formats. #: ../AMC-perl/AMC/Export/register/List.pm:37 msgid "PDF list" msgstr "PDFリスト" #: ../AMC-perl/AMC/Export/register/List.pm:64 msgid "Number of columns" msgstr "カラム数" #: ../AMC-perl/AMC/Export/register/List.pm:67 msgid "Long list is divided into this number of columns on each page." msgstr "長いリストを指定したカラム数に分割してページに配置します。" #: ../AMC-perl/AMC/Export/register/List.pm:71 msgid "Paper size" msgstr "PDF用紙サイズ" #. TRANSLATORS: Check button label in the exports tab. If checked, a table with questions basic statistics will be added to the ODS exported spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:82 msgid "Stats table" msgstr "統計表" #. TRANSLATORS: Menu to export statistics table in the exports tab. The first menu entry means 'do not build a stats table' in the exported ODS file. You can omit the [...] part, that is here only to state the context. #: ../AMC-perl/AMC/Export/register/ods.pm:89 msgid "None [no stats table to export]" msgstr "なし" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second menu entry means 'build a stats table, with a horizontal flow' in the exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:91 #: ../AMC-perl/AMC/Export/register/ods.pm:106 msgid "Horizontal flow" msgstr "横方向" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second menu entry means 'build a stats table, with a vertical flow' in the exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:93 #: ../AMC-perl/AMC/Export/register/ods.pm:107 msgid "Vertical flow" msgstr "縦方向" #. TRANSLATORS: Check button label in the exports tab. If checked, a table with indicative questions basic statistics will be added to the ODS exported spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:99 msgid "Indicative stats table" msgstr "採点対象外設問の統計表" #: ../AMC-perl/AMC/Export/register/ods.pm:105 msgid "None" msgstr "なし" #: ../AMC-perl/AMC/Export/register/ods.pm:110 msgid "Create a table with basic statistics about answers for each indicative question?" msgstr "各採点対象外設問の解答に関する基本統計表を作成しますか?" #. TRANSLATORS: Check button label in the exports tab. If checked, sums of the scores for groups of questions will be added to the exported table. #: ../AMC-perl/AMC/Export/register/ods.pm:114 msgid "Score groups" msgstr "素点グループ" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'Yes, group questions by scope in the exported ODS file, and report total scores' #: ../AMC-perl/AMC/Export/register/ods.pm:126 msgid "Yes (values)" msgstr "はい (素点合計)" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'Yes, group questions by scope in the exported ODS file, and report total scores as percentages.' #: ../AMC-perl/AMC/Export/register/ods.pm:128 msgid "Yes (percentages)" msgstr "はい (パーセンテージ)" #: ../AMC-perl/AMC/Export/register/ods.pm:131 msgid "Add sums of the scores for each question group?" msgstr "設問グループごとに素点合計を付加しますか?" #: ../AMC-perl/AMC/Export/register/ods.pm:134 msgid "with scope separator" msgstr "スコープセレクタ" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'No, don't group questions by scope in the exported ODS file' #: ../AMC-perl/AMC/Export/register/ods.pm:141 msgid "':'" msgstr "':'" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the menu entry for 'Yes, group questions by scope in the exported ODS file, and you can detect the scope from a question ID using the text before the separator .' #: ../AMC-perl/AMC/Export/register/ods.pm:143 msgid "'.'" msgstr "'.'" #: ../AMC-perl/AMC/Export/register/ods.pm:146 msgid "To define groups, use question ids in the form \"group:question\" or \"group.question\", depending on the scope separator." msgstr "グループを定義するには、スコープセバレータの設定に応じて \"group:question\" または \"group.question\" という形式の設問IDを使用してください。" #: ../AMC-perl/AMC/Filter/register/latex.pm:54 msgid "" "This is the native format for AMC. LaTeX is not so easy to use for unexperienced users, but the LaTeX power allows the user to build any multiple choice subject. As an example, the following is possible with LaTeX but not with other formats:\n" "* any kind of layout,\n" "* questions with random numerical values,\n" "* use of figures, mathematical formulas\n" "* and much more!" msgstr "" "これはAMCのネイティブ形式です。LaTeXは未経験のユーザが使うのは容易ではありませんが、LaTeXの能力を使えば任意の選択式試験問題が作成できます。例えばLaTeXなら次のようなことができますが、他の形式ではできません:\n" "* 任意のレイアウト、\n" "* 乱数値を用いた設問、\n" "* 図や数式の使用、\n" "* などなど!" #: ../AMC-perl/AMC/Filter/register/plain.pm:51 msgid "" "This is a plain text format for easy question writting. See the following minimal example:\n" "\n" "Title: Paper title\n" "\n" "* Which is the capital city of Cameroon?\n" "+ Yaounde\n" "- Douala\n" "- Kribi" msgstr "" "これは簡単な設問用のプレーンテキスト形式です。次の最小限の例を参考にしてください:\n" "\n" "Title: 試験問題タイトル\n" "\n" "* カメルーンの首都はどれですか?\n" "+ ヤウンデ\n" "- ドゥアラ\n" "- クリビ" #: ../AMC-gui-apropos.glade:8 msgid "AMC A propos" msgstr "AMCについて" #: ../AMC-gui-apropos.glade:17 msgid "" "Copyright (C) 2008-2018\n" "Alexis Bienvenüe and the AMC development team" msgstr "" "Copyright (C) 2008-2018\n" "Alexis BienvenüeとAMC開発チーム" #: ../AMC-gui-apropos.glade:19 msgid "Automatic multiple choice questionnaires management" msgstr "自動選択式試験問題管理" #: ../AMC-gui-apropos.glade:21 msgid "Visit the AMC website" msgstr "AMCウェブサイトを開く" #: ../AMC-gui-choix_pages_impression.glade:33 msgid "Papers printing" msgstr "試験問題の印刷" #: ../AMC-gui-choix_pages_impression.glade:98 msgid "Please select papers you wish to print:" msgstr "印刷したい試験問題を選択してください:" #: ../AMC-gui-choix_pages_impression.glade:116 msgid "Select papers you wish to print (ctrl-a for all), then confirm..." msgstr "印刷したい試験問題を選択し(Ctrl-aですべて選択)、確認してください..." #: ../AMC-gui-choix_pages_impression.glade:144 msgid "Answer sheet printing" msgstr "答案用紙印刷" #: ../AMC-gui-choix_pages_impression.glade:190 msgid "Printer:" msgstr "プリンタ:" #: ../AMC-gui-choix_pages_impression.glade:243 msgid "two-side printing" msgstr "両面印刷" #: ../AMC-gui-choix_pages_impression.glade:319 msgid "printing options" msgstr "印刷オプション" #: ../AMC-gui-choix_pages_impression.glade:343 msgid "Destination directory" msgstr "書込み先ディレクトリ" #: ../AMC-gui-choix_pages_impression.glade:356 msgid "Select destination directory for printable files" msgstr "印刷可能なファイルの書込み先ディレクトリを選んでください。" #: ../AMC-gui-choix_postcorrect.glade:20 msgid "Post-correction" msgstr "採点時正解提示" #: ../AMC-gui-choix_postcorrect.glade:95 msgid "Please enter the teacher score sheet number and copy number to get the correct answers from:" msgstr "正解が記入されている模範解答の試験問題番号とページ番号を入力してください:" #: ../AMC-gui-choix_postcorrect.glade:189 msgid "Guess simple/multiple status" msgstr "単一/複数選択問題を自動判別" #: ../AMC-gui-choix_postcorrect.glade:194 msgid "Sets type of all questions for which 2 or more answers are ticked on the teacher answer sheet to multiple" msgstr "正解が記入されている模範解答に2個以上マークされている設問を複数選択問題として扱います。" #: ../AMC-gui-choix_projet.glade:18 msgid "Open a MC project" msgstr "AMCプロジェクトを開く" #: ../AMC-gui-choix_projet.glade:61 ../AMC-gui-liste_dialog.glade:91 msgid "Cancel" msgstr "キャンセル" #: ../AMC-gui-choix_projet.glade:104 ../AMC-gui-main_window.glade:2665 msgid "New project" msgstr "新規プロジェクト" #: ../AMC-gui-choix_projet.glade:163 msgid "Rename" msgstr "名前を変更" #: ../AMC-gui-choix_projet.glade:182 msgid "Clone" msgstr "クローン" #: ../AMC-gui-choix_projet.glade:278 msgid "Open an existing MC project:" msgstr "既存のAMCプロジェクトを開く" #: ../AMC-gui-choix_projet.glade:345 msgid "Create an new project:" msgstr "新しいプロジェクトを作成" #: ../AMC-gui-choix_projet.glade:364 msgid "Project name:" msgstr "プロジェクト名:" #: ../AMC-gui-choix_projet.glade:398 msgid "Note : a project name can only contain alphanumeric characters, plus some simple characters (-_+.:)." msgstr "注意: プロジェクト名には英数字といくつかの記号(-_+.:)のみ使用できます。" #: ../AMC-gui-choose-mode.glade:10 msgid "Before starting data capture, please choose the mode corresponding to what you did with the printed questions." msgstr "マーク認識を開始する前に、試験問題の印刷で用いたモードを選択してください。" #: ../AMC-gui-choose_columns.glade:8 msgid "Choose columns to export" msgstr "エクスポートするカラムの選択" #: ../AMC-gui-choose_columns.glade:65 msgid "Order and select the columns to include in the exported file:" msgstr "エクスポートするファイルに含みたいカラムを(順序を必要に応じて変更し)選択してください:" #: ../AMC-gui-choose_students.glade:13 msgid "Choose students" msgstr "受験者の選択" #: ../AMC-gui-choose_students.glade:70 msgid "Select the students for which you want to annotate the score sheet:" msgstr "どの受験者の答案に採点を記入するか選んでください:" #: ../AMC-gui-choose_students.glade:114 msgid "Search:" msgstr "検索:" #: ../AMC-gui-cleanup.glade:13 ../AMC-gui-main_window.glade:2939 msgid "Cleanup" msgstr "不要ファイル削除" #: ../AMC-gui-cleanup.glade:40 msgid "Remove selected files" msgstr "選択したファイルを削除する" #: ../AMC-gui-cleanup.glade:71 msgid "To save disk space, you can remove some intermediate files from your project directory." msgstr "ディスク容量を節約するために、プロジェクトディレクトリ中の中間ファイルを削除することができます。" #: ../AMC-gui-edit_preferences.glade:230 ../AMC-gui-edit_preferences.glade:243 msgid "LaTeX models directory" msgstr "LaTeXモデルディレクトリ" #: ../AMC-gui-edit_preferences.glade:232 msgid "Please select a directory containing LaTeX models for AMC, with their descriptions" msgstr "AMCのLaTeXモデルとその説明を格納したディレクトリを選択してください。" #: ../AMC-gui-edit_preferences.glade:255 msgid "Projects directory. May be modified only if there are no opened projects." msgstr "プロジェクトディレクトリ。開いているプロジェクトがない場合のみ修正できます。" #: ../AMC-gui-edit_preferences.glade:257 msgid "Please select the projects directory" msgstr "プロジェクトディレクトリを選択してください" #: ../AMC-gui-edit_preferences.glade:268 msgid "Projects directory" msgstr "プロジェクトディレクトリ" #: ../AMC-gui-edit_preferences.glade:283 msgid "Directories" msgstr "ディレクトリ" #: ../AMC-gui-edit_preferences.glade:315 msgid "PDF files" msgstr "PDFファイル" #: ../AMC-gui-edit_preferences.glade:326 msgid "Images" msgstr "画像" #: ../AMC-gui-edit_preferences.glade:337 msgid "CSV data files" msgstr "CSVデータファイル" #: ../AMC-gui-edit_preferences.glade:348 msgid "OpenOffice files" msgstr "OpenOfficeファイル" #: ../AMC-gui-edit_preferences.glade:359 msgid "XML files" msgstr "XMLファイル" #: ../AMC-gui-edit_preferences.glade:370 msgid "Command to edit LaTeX files" msgstr "LaTeXファイルを編集するためのコマンド" #: ../AMC-gui-edit_preferences.glade:371 msgid "LaTeX editor" msgstr "LaTeXエディタ" #: ../AMC-gui-edit_preferences.glade:382 msgid "Plain text editor" msgstr "テキストエディタ" #: ../AMC-gui-edit_preferences.glade:393 msgid "Command for directory browsing (string %d will be replaced by the directory path before execution)" msgstr "ディレクトリブライズ用のコマンド(文字列 %d は実行前にディレクトリパスに置換されます)" #: ../AMC-gui-edit_preferences.glade:394 msgid "File browser" msgstr "ファイルブラウザ" #: ../AMC-gui-edit_preferences.glade:405 msgid "Web browser" msgstr "Webブラウザ" #: ../AMC-gui-edit_preferences.glade:534 msgid "Visualisation commands" msgstr "表示コマンド" #: ../AMC-gui-edit_preferences.glade:565 msgid "Default LaTeX engine" msgstr "デフォルトLaTeXエンジン" #: ../AMC-gui-edit_preferences.glade:576 msgid "Default command to compile LaTeX file and make PDF, PS or DVI output (may be changed for each project)." msgstr "LaTeXファイルをコンパイルしてPDF、PS、DVI出力を作成するデフォルトコマンド(プロジェクトごとに変更できます)。" #: ../AMC-gui-edit_preferences.glade:599 msgid "External programs" msgstr "外部プログラム" #: ../AMC-gui-edit_preferences.glade:631 ../AMC-gui-edit_preferences.glade:4238 msgid "Students list charset" msgstr "受験者名簿エンコーディング" #: ../AMC-gui-edit_preferences.glade:642 msgid "CSV charset" msgstr "CSVエンコーディング" #: ../AMC-gui-edit_preferences.glade:653 msgctxt "option name. Refers to a list of headers that may contain surnames in the CSV names list" msgid "CSV surname headers" msgstr "CSV中の姓ヘッダー" #: ../AMC-gui-edit_preferences.glade:664 msgctxt "option name. Refers to a list of headers that may contain names in the CSV names list." msgid "CSV name headers" msgstr "CSV中の名ヘッダー" #: ../AMC-gui-edit_preferences.glade:675 msgid "LaTeX files charset" msgstr "LaTeXファイルエンコーディング" #: ../AMC-gui-edit_preferences.glade:686 msgid "Default encoding for the students list file." msgstr "受験者名簿ファイルのデフォルトエンコーディング。" #: ../AMC-gui-edit_preferences.glade:705 msgid "Default charset for AMC CSV output." msgstr "AMCのCSV出力のデフォルトエンコーディング" #: ../AMC-gui-edit_preferences.glade:724 msgid "Comma separated list of CSV headers of columns that may contain the surnames of the students in the names list file." msgstr "名簿CSVファイル中の受験者の姓を格納したカラムヘッダー" #: ../AMC-gui-edit_preferences.glade:738 msgid "Comma separated list of CSV headers of columns that may contain the names of the students in the names list file." msgstr "名簿CSVファイル中の受験者の名を格納したカラムヘッダー" #: ../AMC-gui-edit_preferences.glade:752 msgid "Charset used when producing LaTeX files from models." msgstr "モデルからLaTeXファイルを生成するときのエンコーディング。" #: ../AMC-gui-edit_preferences.glade:769 msgid "Decimal delimiter" msgstr "小数点" #: ../AMC-gui-edit_preferences.glade:797 msgid "ASCII filenames" msgstr "ASCIIファイル名" #: ../AMC-gui-edit_preferences.glade:809 msgid "Force all annotated completed student sheets to have only ASCII characters in their file names. When set, all non-ASCII characters will be replaced by underscores." msgstr "受験者の採点済答案のファイル名にASCII文字のみを使うようにします。セットすると非ASCII文字はアンダースコアに置換されます。" #: ../AMC-gui-edit_preferences.glade:821 msgid "Accept non-ASCII project names" msgstr "プロジェクト名に非ASCII文字を使用可" #: ../AMC-gui-edit_preferences.glade:848 msgid "Internationalization" msgstr "国際化" #: ../AMC-gui-edit_preferences.glade:880 msgid "Printing method" msgstr "印刷方法" #: ../AMC-gui-edit_preferences.glade:891 msgid "Printing command" msgstr "印刷コマンド" #: ../AMC-gui-edit_preferences.glade:913 msgid "Useful printing options" msgstr "印刷オプション" #: ../AMC-gui-edit_preferences.glade:941 msgid "Command to print one paper (with stapling). String %f will be replaced by the PDF file to be printed." msgstr "試験問題1部を(ステープル付きで)印刷するコマンド。文字列中の %f は印刷するPDFファイル名に置換されます。" #: ../AMC-gui-edit_preferences.glade:984 msgid "Printing" msgstr "印刷" #: ../AMC-gui-edit_preferences.glade:1016 msgid "Number of processes" msgstr "プロセス数" #: ../AMC-gui-edit_preferences.glade:1027 msgid "Number of processes to be run in parallel. Default value is 0, which allows to start as many processes as processors." msgstr "並列実行されるプロセス数。デフォルトは0で、プロセッサ数と同数のプロセスが起動できます。" #: ../AMC-gui-edit_preferences.glade:1044 msgid "System" msgstr "システム" #: ../AMC-gui-edit_preferences.glade:1065 msgid "Main" msgstr "メイン" #: ../AMC-gui-edit_preferences.glade:1094 ../AMC-gui-main_window.glade:2771 msgid "Solution" msgstr "模範解答" #: ../AMC-gui-edit_preferences.glade:1110 ../AMC-gui-main_window.glade:2783 msgid "Individual solution" msgstr "個別模範解答" #: ../AMC-gui-edit_preferences.glade:1125 ../AMC-gui-main_window.glade:2759 msgid "Catalog" msgstr "設問カタログ" #: ../AMC-gui-edit_preferences.glade:1147 msgid "Optional working documents to build" msgstr "作成する任意作業文書" #: ../AMC-gui-edit_preferences.glade:1170 ../AMC-gui-main_window.glade:394 msgid "Documents" msgstr "文書" #: ../AMC-gui-edit_preferences.glade:1213 msgid "Limit MSE" msgstr "用紙ゆがみ上限" #: ../AMC-gui-edit_preferences.glade:1224 msgid "Limit sensitivity" msgstr "白黒閾値近接度上限" #: ../AMC-gui-edit_preferences.glade:1265 msgid "Colouring thresholds" msgstr "警告閾値" #: ../AMC-gui-edit_preferences.glade:1299 msgid "No answers color" msgstr "マーク無記入の表示色" #: ../AMC-gui-edit_preferences.glade:1310 msgid "Invalid answers color" msgstr "マーク矛盾の表示色" #: ../AMC-gui-edit_preferences.glade:1347 msgid "Scan view" msgstr "スキャン画像表示" #: ../AMC-gui-edit_preferences.glade:1379 msgid "Maximum density for manual data capture question paper rendering (DPI)" msgstr "手動マーク認識での試験問題画像表示の最高解像度(DPI)" #: ../AMC-gui-edit_preferences.glade:1380 msgid "Manual capture density (DPI)" msgstr "手動認識解像度(DPI)" #: ../AMC-gui-edit_preferences.glade:1391 msgid "Image type" msgstr "画像タイプ" #: ../AMC-gui-edit_preferences.glade:1402 msgid "Remember window size" msgstr "ウィンドウサイズを記憶" #. Label in the preferences window, corresponding to "Starting number of columns for names in the manual association window". #: ../AMC-gui-edit_preferences.glade:1413 msgid "Number of columns for names" msgstr "手動受験者識別の表示カラム数" #. Label in the preferences window, corresponding to the "Number of columns for zoomed boxes in the zooms window (opened from the Diagnosis list in the Data capture tab)". #: ../AMC-gui-edit_preferences.glade:1424 msgid "Number of columns for zoomes boxes" msgstr "ボックス拡大画像の表示カラム数" #: ../AMC-gui-edit_preferences.glade:1448 msgid "Temporary file type used for manual data capture. Fastest choice is (none), but this seems to be problematic in some environments." msgstr "手動マーク認識に用いる一時ファイルのタイプ。最速は (なし) ですが、環境によっては不具合が発生する場合があります。" #: ../AMC-gui-edit_preferences.glade:1467 msgid "Do you want to keep the same window size each time you start AMC?" msgstr "AMCが起動するときにいつも同じウィンドウサイズに固定して表示しますか?" #: ../AMC-gui-edit_preferences.glade:1480 msgid "Starting number of columns for names in the manual association window." msgstr "手動受験者識別での氏名表示の初期カラム数。" #: ../AMC-gui-edit_preferences.glade:1497 msgid "Number of columns for zoomed boxes in the zooms window (opened from the Diagnosis list in the Data capture tab)." msgstr "(マーク認識タブの診断リストから開く)ボックス拡大画像ウィンドウのカラム数。" #: ../AMC-gui-edit_preferences.glade:1518 msgid "Miscellaneous" msgstr "その他" #: ../AMC-gui-edit_preferences.glade:1549 msgid "Notify the user at the end of the following actions:" msgstr "以下の動作の後、ユーザに通知する:" #. One of the "notify the user at the end of the following actions" checkbox: for documents update. #: ../AMC-gui-edit_preferences.glade:1568 msgid "Documents update" msgstr "文書更新" #. One of the "notify the user at the end of the following actions" checkbox: for computing marks. #: ../AMC-gui-edit_preferences.glade:1600 msgid "Grading" msgstr "採点" #. One of the "notify the user at the end of the following actions" checkbox: for completed answer sheets annotation. #: ../AMC-gui-edit_preferences.glade:1616 #: ../AMC-gui-edit_preferences.glade:3137 msgid "Annotation" msgstr "採点記入" #: ../AMC-gui-edit_preferences.glade:1641 msgid "Notify using:" msgstr "通知方法:" #: ../AMC-gui-edit_preferences.glade:1660 msgid "Desktop notifications" msgstr "デスクトップ通知" #: ../AMC-gui-edit_preferences.glade:1696 msgid "Command:" msgstr " コマンド:" #: ../AMC-gui-edit_preferences.glade:1708 msgid "Command that will be called as a user notification. %m will be replaced by AMC's message, and %a by AMC completed action." msgstr "ユーザ通知として起動されるコマンド。%m はAMCのメッセージに、%a は完了した動作に置換されます。" #: ../AMC-gui-edit_preferences.glade:1737 msgid "Notifications" msgstr "通知" #: ../AMC-gui-edit_preferences.glade:1761 msgid "Display" msgstr "表示" #: ../AMC-gui-edit_preferences.glade:1804 msgid "Vector formats density (DPI)" msgstr "ベクトル形式解像度(DPI)" #: ../AMC-gui-edit_preferences.glade:1815 msgid "Black&white conversion threshold" msgstr "黒&白ピクセル判別閾値" #: ../AMC-gui-edit_preferences.glade:1826 msgid "Erease red from scans" msgstr "スキャン画像から赤色を除去" #: ../AMC-gui-edit_preferences.glade:1837 msgid "Force conversion" msgstr "変換を強制" #: ../AMC-gui-edit_preferences.glade:1848 msgid "Density used when converting vector format scans (PDF, EPS) into bitmap." msgstr "ベクトル形式のスキャン画像(PDF、EPS)をビットマップに変換するときの解像度。" #: ../AMC-gui-edit_preferences.glade:1863 msgid "Threshold used when converting scans to black and white. Value 0.0 means all white, value 1.0 means all black." msgstr "スキャン画像の各ピクセルを黒と白に変換するときの閾値。0.0にするとすべて白と判定され、1.0にするとすべて黒と判定されます。" #: ../AMC-gui-edit_preferences.glade:1881 msgid "When set, AMC will erease red color from the color scans before automatic data capture. This can be useful if the boxes are drawn in red." msgstr "これをセットすると、AMCは自動マーク認識に先立ってカラースキャン画像から赤色成分を取り除きます。これはボックスが赤で印刷されているときに有用です。" #: ../AMC-gui-edit_preferences.glade:1896 msgid "With this option, all scan files will be converted with ImageMagick. This can slow down scans processing, but may allow some unusual file formats to be processed successfully." msgstr "このオプションにより、スキャン画像ファイルを必ずImageMagickによって変換します。スキャン画像の処理が遅くなる可能性がありますが、特殊なファイル形式でもうまく処理できるようになります。" #: ../AMC-gui-edit_preferences.glade:1913 msgid "Scans conversion" msgstr "スキャン画像の変換" #: ../AMC-gui-edit_preferences.glade:1945 msgid "Marks size max increase" msgstr "四隅マーカーの最大拡大率" #: ../AMC-gui-edit_preferences.glade:1956 msgid "Marks size max decrease" msgstr "四隅マーカーの最大縮小率" #: ../AMC-gui-edit_preferences.glade:1967 #: ../AMC-gui-edit_preferences.glade:2490 msgid "Can be customized on a per-project basis in the Project tab." msgstr "「プロジェクト」タブで、プロジェクトごとにカスタマイズできます。" #: ../AMC-gui-edit_preferences.glade:1968 msgid "Default darkness threshold" msgstr "デフォルトのマーク判定閾値" #: ../AMC-gui-edit_preferences.glade:1979 msgid "Default upper darkness threshold" msgstr "デフォルトのマーク判定上限閾値" #: ../AMC-gui-edit_preferences.glade:1990 msgid "Proportion of the box (on the scan) that is measured to compute its blackness." msgstr "スキャン画像上のボックスの黒ピクセル数をカウントする領域の比率。" #: ../AMC-gui-edit_preferences.glade:1991 msgid "Measured box proportion" msgstr "判定領域比率" #: ../AMC-gui-edit_preferences.glade:2002 msgid "Process scans with 3 corner marks" msgstr "認識できた四隅マーカーが3個でも処理" #: ../AMC-gui-edit_preferences.glade:2013 msgid "Maximum increase (proportion: 0.1 means 10%) allowed for corner marks after printing/scanning process." msgstr "印刷・スキャン後の四隅マーカーの最大拡大率(0.1は10%の意味)" #: ../AMC-gui-edit_preferences.glade:2030 msgid "Maximum decrease (proportion: 0.1 means 10%) allowed for corner marks after printing/scanning process." msgstr "印刷・スキャン後の四隅マーカーの最大縮小率(0.1は10%の意味)" #: ../AMC-gui-edit_preferences.glade:2047 msgid "If black proportion is greater than this value, the box will be considered as beeing ticked. This is a default value, it can be changed in each project." msgstr "黒ピクセルの比率がこの値より大きければ、ボックスがマークされていると判定されます。これはデフォルト値で、プロジェクトごとに変更できます。" #: ../AMC-gui-edit_preferences.glade:2093 msgid "Do you want to process scans with 3 corner circles only?" msgstr "四隅マーカーが3個しか認識できない場合でも処理をしますか?" #: ../AMC-gui-edit_preferences.glade:2110 msgid "Detection parameters" msgstr "検出パラメータ" #: ../AMC-gui-edit_preferences.glade:2166 msgid "These options are used when creating a new project. See the project tab for more details." msgstr "これらのオプションは新規プロジェクトの作成時に使用されます。詳細はプロジェクトタブを参照してください。" #: ../AMC-gui-edit_preferences.glade:2173 #: ../AMC-gui-edit_preferences.glade:3760 msgid "Minimal mark" msgstr "下駄" #: ../AMC-gui-edit_preferences.glade:2184 #: ../AMC-gui-edit_preferences.glade:3771 msgid "Floor mark" msgstr "下限" #: ../AMC-gui-edit_preferences.glade:2195 #: ../AMC-gui-edit_preferences.glade:3782 msgid "Maximal mark" msgstr "満点" #: ../AMC-gui-edit_preferences.glade:2206 #: ../AMC-gui-edit_preferences.glade:3793 msgid "Grain" msgstr "最小単位" #: ../AMC-gui-edit_preferences.glade:2217 #: ../AMC-gui-edit_preferences.glade:3804 msgid "Rounding type" msgstr "丸めタイプ" #: ../AMC-gui-edit_preferences.glade:2272 #: ../AMC-gui-edit_preferences.glade:3891 msgid "ceil" msgstr "上限" #: ../AMC-gui-edit_preferences.glade:2312 msgid "Default marking options" msgstr "デフォルト採点オプション" #: ../AMC-gui-edit_preferences.glade:2329 ../AMC-gui-main_window.glade:1943 msgid "Marking" msgstr "採点" #: ../AMC-gui-edit_preferences.glade:2372 msgid "Max size" msgstr "最大サイズ" #: ../AMC-gui-edit_preferences.glade:2383 msgid "Image format" msgstr "画像フォーマット" #: ../AMC-gui-edit_preferences.glade:2394 msgid "JPEG quality" msgstr "JPEG品質" #: ../AMC-gui-edit_preferences.glade:2454 msgid "Scans" msgstr "スキャン画像" #: ../AMC-gui-edit_preferences.glade:2492 msgid "Default header text" msgstr "デフォルトヘッダーテキスト" #: ../AMC-gui-edit_preferences.glade:2513 #: ../AMC-gui-edit_preferences.glade:3976 msgid "Text to be written on annotated sheets header. Use %S for score, %M for max score, %s for grade, %m for max grade, and %(col) for content of the column col in the students list file." msgstr "採点記入済答案のヘッダーに記入されるテキスト。%Sは素点、%Mは素点の満点、%sは換算した得点、%mは換算した得点の満点、%(col)は受験者名簿のcolカラムの内容に置換されます。" #: ../AMC-gui-edit_preferences.glade:2553 msgid "Default writing direction" msgstr "デフォルト文字方向" #: ../AMC-gui-edit_preferences.glade:2564 msgid "Default questions annotation" msgstr "設問ごとのデフォルトの採点表記" #: ../AMC-gui-edit_preferences.glade:2575 msgid "Default cancelled questions annotation" msgstr "キャンセルした設問のデフォルトの採点表記" #: ../AMC-gui-edit_preferences.glade:2585 #: ../AMC-gui-edit_preferences.glade:4050 msgid "right to left" msgstr "右から左" #: ../AMC-gui-edit_preferences.glade:2639 msgid "Header" msgstr "ヘッダー" #: ../AMC-gui-edit_preferences.glade:2671 msgid "Significant digits" msgstr "有効桁数" #: ../AMC-gui-edit_preferences.glade:2682 msgid "Number of significant digits to display for marks when annotating papers." msgstr "答案に採点を記入するときの有効桁数。" #: ../AMC-gui-edit_preferences.glade:2703 msgid "Marks" msgstr "得点" #: ../AMC-gui-edit_preferences.glade:2740 msgid "Line width" msgstr "線幅" #: ../AMC-gui-edit_preferences.glade:2751 msgid "Font" msgstr "フォント" #: ../AMC-gui-edit_preferences.glade:2762 msgid "Marks shift" msgstr "素点表記位置のシフト量" #: ../AMC-gui-edit_preferences.glade:2803 msgid "When marks are written on annotated papers left to the boxes, shifts to the left marks by this value. You can use mm or in as a unit." msgstr "採点記入時の素点表記位置を答案の「ボックス付近」としたとき、この長さだけボックスから左に記入します。単位にはmmとinが使えます。" #: ../AMC-gui-edit_preferences.glade:2832 msgid "To be ticked" msgstr "マークされるべき" #: ../AMC-gui-edit_preferences.glade:2844 msgid "Ticked" msgstr "マークされている" #: ../AMC-gui-edit_preferences.glade:2856 msgid "type" msgstr "タイプ" #: ../AMC-gui-edit_preferences.glade:2868 msgid "colour" msgstr "" #: ../AMC-gui-edit_preferences.glade:2880 #: ../AMC-gui-edit_preferences.glade:2891 #: ../AMC-gui-edit_preferences.glade:2924 #: ../AMC-gui-edit_preferences.glade:2946 msgid "no" msgstr "いいえ" #: ../AMC-gui-edit_preferences.glade:2902 #: ../AMC-gui-edit_preferences.glade:2913 #: ../AMC-gui-edit_preferences.glade:2935 #: ../AMC-gui-edit_preferences.glade:2957 msgid "yes" msgstr "はい" #: ../AMC-gui-edit_preferences.glade:3088 msgid "Also annotate informative questions" msgstr "採点対象外の設問にも採点を記入する" #: ../AMC-gui-edit_preferences.glade:3110 msgid "Symbols" msgstr "記号" #: ../AMC-gui-edit_preferences.glade:3185 msgid "Sender email" msgstr "差出人アドレス" #: ../AMC-gui-edit_preferences.glade:3196 msgid "Carbon copy address" msgstr "Cc: アドレス" #: ../AMC-gui-edit_preferences.glade:3207 msgid "Blind Carbon copy address" msgstr "Bcc: アドレス" #: ../AMC-gui-edit_preferences.glade:3260 msgid "Delay between sendings" msgstr "送信間隔" #: ../AMC-gui-edit_preferences.glade:3295 msgid "Mail delivery method:" msgstr "メール配信方法:" #: ../AMC-gui-edit_preferences.glade:3337 msgid "sendmail path" msgstr "sendmailのパス" #: ../AMC-gui-edit_preferences.glade:3373 msgid "SMTP host" msgstr "SMTPホスト" #: ../AMC-gui-edit_preferences.glade:3384 msgid "SMTP port" msgstr "SMTPポート" #: ../AMC-gui-edit_preferences.glade:3424 msgid "SMTP security" msgstr "SMTPセキュリティ" #: ../AMC-gui-edit_preferences.glade:3435 msgid "SMTP user" msgstr "SMTPユーザ" #: ../AMC-gui-edit_preferences.glade:3472 msgid "SMTP password" msgstr "SMTPパスワード" #: ../AMC-gui-edit_preferences.glade:3509 msgid "Sending emails" msgstr "メール送信" #: ../AMC-gui-edit_preferences.glade:3546 msgid "Default subject" msgstr "デフォルト件名" #: ../AMC-gui-edit_preferences.glade:3588 msgid "Default content" msgstr "デフォルト本文" #: ../AMC-gui-edit_preferences.glade:3612 msgid "Email" msgstr "メール" #: ../AMC-gui-edit_preferences.glade:3638 msgid "Project preferences" msgstr "プロジェクト設定" #: ../AMC-gui-edit_preferences.glade:3670 msgid "Darkness threshold" msgstr "マーク判定閾値" #: ../AMC-gui-edit_preferences.glade:3681 msgid "If black proportion is greater than this value, the box will be considered as beeing ticked. If students have been told to darken the boxes entirely, one can choose value 0.5. If students have been told to tick the boxes, values around 0.15 seems appropriate." msgstr "黒ピクセルの比率がこの値より大きければ、ボックスがマークされていると判定されます。受験者にボックスを完全に塗りつぶすように指示した場合は、0.5 を選ぶといいでしょう。受験者にボックスをチェックするように指示した場合は、0.15 付近の値が適当です。" #: ../AMC-gui-edit_preferences.glade:3697 msgid "Upper darkness threshold" msgstr "マーク判定上限閾値" #: ../AMC-gui-edit_preferences.glade:3708 msgid "If black proportion is greater than this value, the box is considered as not ticked. Setting this threshold to a value less than one allows the students to cancel ticked boxes by filling them completely." msgstr "黒ピクセルの比率がこの値より大きければ、ボックスがマークされていないと判定されます。1より小さい値を設定すれば、受験者はチェックしたボックスを完全に塗りつぶすことで取り消すことができます。" #: ../AMC-gui-edit_preferences.glade:3728 msgid "Automatic data capture" msgstr "自動マーク認識" #: ../AMC-gui-edit_preferences.glade:3815 msgid "Mark associated with null score" msgstr "全問不正解の場合に与える得点" #: ../AMC-gui-edit_preferences.glade:3829 msgid "Floor mark: any exam with a global mark less than this value will be given this mark. Let empty for no floor mark." msgstr "下限: 下駄を加えた上でこれより低い得点にはこの得点を与えます。下限がない場合は空欄としてください。" #: ../AMC-gui-edit_preferences.glade:3879 msgid "Mark to be given to a perfect sheet with all good answers (scaling the marks). Value 0 meens that you don't want to scale the marks." msgstr "全問正解の完璧な答案に与える得点(傾斜係数を乗じます)。値を0にすると傾斜係数を乗じません。" #: ../AMC-gui-edit_preferences.glade:3896 msgid "When using SUF option in general grading scale, should marks be ceiled not to be larger than the maximum mark ?" msgstr "全体採点基準でSUFオプションを使用している場合、得点が上限を越えないように天井をつけますか?" #: ../AMC-gui-edit_preferences.glade:3920 msgid "Global mark rules" msgstr "全体採点基準" #: ../AMC-gui-edit_preferences.glade:3956 msgid "Header text" msgstr "ヘッダーテキスト" #: ../AMC-gui-edit_preferences.glade:4007 msgid "Writing direction" msgstr "文字方向" #: ../AMC-gui-edit_preferences.glade:4018 msgid "Questions marks position" msgstr "設問ごとの得点表記位置" #: ../AMC-gui-edit_preferences.glade:4029 msgid "Questions annotation text" msgstr "設問ごとの採点表記" #: ../AMC-gui-edit_preferences.glade:4040 msgid "Cancelled questions annotation text" msgstr "キャンセルした設問の採点表記" #: ../AMC-gui-edit_preferences.glade:4083 msgid "Text to be written for each question. This will be evaluated by perl, so quote it to make a single string. Use %S for score, %M for max score, and %s and %m for these values truncated to the requested number of significant digits." msgstr "各設問に記入される採点テキスト。これはperlによって評価されるので、単一の文字列とするには引用符を使ってください。%S は素点に、%M は素点の満点に置換され、%s と %m はそれぞれを指定した有効桁数に丸めた値に置換されます。" #: ../AMC-gui-edit_preferences.glade:4097 msgid "Same as above, but for cancelled questions (when using allowempty)." msgstr "キャンセルした設問に関して上と同様(allowempty使用時)" #: ../AMC-gui-edit_preferences.glade:4122 msgid "Papers annotation" msgstr "答案の採点記入" #: ../AMC-gui-edit_preferences.glade:4206 msgid "Examination description" msgstr "試験の説明" #: ../AMC-gui-edit_preferences.glade:4249 msgid "CSV files charset" msgstr "CSVファイルエンコーディング" #: ../AMC-gui-edit_preferences.glade:4260 msgid "Charset used for the students list file" msgstr "受験者名簿ファイルで用いるエンコーディング" #: ../AMC-gui-edit_preferences.glade:4279 msgid "Charset for the CSV marks file produced by AMC." msgstr "AMCにより生成されるCVS採点表のエンコーディング。" #: ../AMC-gui-edit_preferences.glade:4302 msgid "Internationnalization" msgstr "国際化" #: ../AMC-gui-edit_preferences.glade:4334 msgid "LaTeX engine" msgstr "LaTeXエンジン" #: ../AMC-gui-edit_preferences.glade:4345 msgid "Command to compile LaTeX file and make PDF, PS or DVI output." msgstr "LaTeXファイルをコンパイルしてPDF, PS, DVIの出力を作成するコマンド。" #: ../AMC-gui-edit_preferences.glade:4368 msgid "External commands" msgstr "外部コマンド" #: ../AMC-gui-edit_preferences.glade:4393 ../AMC-gui-main_window.glade:2923 #: ../AMC-gui-main_window.glade:3239 msgid "Project" msgstr "プロジェクト" #: ../AMC-gui-edit_preferences.glade:4413 msgid "AMC Preferences" msgstr "AMC設定" #: ../AMC-gui-filter_details.glade:7 msgid "Formats details" msgstr "形式の詳細" #: ../AMC-gui-filter_details.glade:66 msgid "AMC supports different formats for the source file. Here are some details about each of them." msgstr "AMCはソースファイル用の異なる形式をサポートしています。それぞれの詳細を示します。" #: ../AMC-gui-filter_details.glade:115 msgid "Description:" msgstr "説明:" #: ../AMC-gui-liste_dialog.glade:48 msgid "No names list" msgstr "名簿を使用しない" #: ../AMC-gui-liste_dialog.glade:134 msgid "Apply" msgstr "適用" #: ../AMC-gui-liste_dialog.glade:163 msgid "Choose your students names list file" msgstr "受験者名簿ファイルを選択してください" #: ../AMC-gui-mailing.glade:13 msgid "Mailing" msgstr "メール送信" #: ../AMC-gui-mailing.glade:40 msgid "Send" msgstr "送信" #: ../AMC-gui-mailing.glade:75 msgid "Current project name %n:" msgstr "現在のプロジェクト名 %n:" #: ../AMC-gui-mailing.glade:149 msgid "Emails column:" msgstr "メールアドレスのカラム:" #: ../AMC-gui-mailing.glade:184 msgid "Select failed" msgstr "送信失敗のみ選択" #: ../AMC-gui-mailing.glade:237 msgid "Addressees" msgstr "アドレス" #: ../AMC-gui-mailing.glade:274 msgid "Subject" msgstr "件名" #: ../AMC-gui-mailing.glade:303 msgid "Enable HTML Tags" msgstr "HTMLタグの使用許可" #: ../AMC-gui-mailing.glade:345 msgid "Body" msgstr "本文" #: ../AMC-gui-mailing.glade:437 msgid "Attachments" msgstr "添付ファイル" #: ../AMC-gui-main_window.glade:126 msgid "Updated" msgstr "更新日時" #: ../AMC-gui-main_window.glade:146 msgid "Sensitivity" msgstr "白黒閾値近接度" #: ../AMC-gui-main_window.glade:156 msgid "Scan file" msgstr "スキャン画像ファイル" #: ../AMC-gui-main_window.glade:294 msgid "Number of papers:" msgstr "試験問題の部数" #: ../AMC-gui-main_window.glade:308 msgid "Number of papers to produce. Zero means taking into account the number written in the LaTeX source file." msgstr "作成する試験問題の部数。ゼロの場合、LaTeXソースファイルに書かれた部数を用います。" #. TRANSLATORS: Use the character '_' before the key that can be used as a mnemonic (to activate documents update with Alt+key) #: ../AMC-gui-main_window.glade:343 msgid "_Update documents" msgstr "文書更新 (_U)" #: ../AMC-gui-main_window.glade:377 msgid "Question" msgstr "試験問題プレビュー" #: ../AMC-gui-main_window.glade:543 msgid "Warnings" msgstr "警告" #: ../AMC-gui-main_window.glade:654 msgid "Print papers" msgstr "試験問題印刷" #: ../AMC-gui-main_window.glade:718 msgid "From papers' scans" msgstr "答案用紙のスキャン画像を利用" #: ../AMC-gui-main_window.glade:740 ../AMC-gui-main_window.glade:1776 msgid "Automatic" msgstr "自動" #: ../AMC-gui-main_window.glade:762 msgid "On screen with mouse" msgstr "マウスを用い、画面上で入力" #: ../AMC-gui-main_window.glade:784 ../AMC-gui-main_window.glade:1819 msgid "Manual" msgstr "手動" #: ../AMC-gui-main_window.glade:809 msgid "Data capture after examination" msgstr "試験実施後のマーク認識" #: ../AMC-gui-main_window.glade:841 msgid "Missing pages" msgstr "不足ページ" #: ../AMC-gui-main_window.glade:913 msgid "Look at scans" msgstr "スキャン画像を表示" #: ../AMC-gui-main_window.glade:984 msgid "Forget" msgstr "忘れる" #: ../AMC-gui-main_window.glade:1001 msgid "Look at pages" msgstr "ページを表示" #: ../AMC-gui-main_window.glade:1086 msgid "Pages:" msgstr "ページ:" #: ../AMC-gui-main_window.glade:1144 msgid "Columns" msgstr "表示カラム" #. Label on the button used to open a window with the images of the boxes taken from the scan. This window can be used th check boxes categorization. #: ../AMC-gui-main_window.glade:1183 ../AMC-perl/AMC/Gui/Zooms.glade:13 msgid "Zooms" msgstr "拡大画像" #: ../AMC-gui-main_window.glade:1188 msgid "Show images of the boxes from the scan, and check their categorization." msgstr "スキャン画像内のボックス画像を表示し、マーク有無の判定をチェックします。" #. Label of the button used to open a window showing a scan with the place where corner marks have been detected, and the position where the boxes are supposed to be. #: ../AMC-gui-main_window.glade:1202 msgid "Layout" msgstr "レイアウト" #: ../AMC-gui-main_window.glade:1207 msgid "Show where corner marks have been detected on the scan, and where boxes are supposed to be." msgstr "スキャン画像上で検出された四隅マーカーの位置と、ボックスの推定位置を表示します。" #. Label of the button used to delete data capture for selected pages. #: ../AMC-gui-main_window.glade:1221 msgid "Remove" msgstr "削除" #: ../AMC-gui-main_window.glade:1225 msgid "Remove data capture for selected pages." msgstr "選択したページのマーク認識データを削除します。" #: ../AMC-gui-main_window.glade:1266 msgid "Diagnosis" msgstr "診断" #: ../AMC-gui-main_window.glade:1323 msgid "Update marking scale" msgstr "採点基準を更新" #: ../AMC-gui-main_window.glade:1327 msgid "Also update marking scale extraction from LaTeX source file" msgstr "LaTeXソーソファイルから抽出された採点基準を更新する" #: ../AMC-gui-main_window.glade:1341 msgid "Mark papers" msgstr "答案を採点" #: ../AMC-gui-main_window.glade:1394 msgid "Marking" msgstr "採点" #: ../AMC-gui-main_window.glade:1419 msgid "Look at marks" msgstr "採点結果を表示" #: ../AMC-gui-main_window.glade:1500 msgid "Students list:" msgstr "受験者名簿:" #: ../AMC-gui-main_window.glade:1548 msgid "Set file" msgstr "ファイルを設定" #: ../AMC-gui-main_window.glade:1596 msgid "Edit list" msgstr "名簿を編集" #: ../AMC-gui-main_window.glade:1638 msgid "Re-read" msgstr "再読込み" #: ../AMC-gui-main_window.glade:1704 msgid "Code name for automatic association:" msgstr "答案内の受験者識別用コード名:" #: ../AMC-gui-main_window.glade:1715 msgid "Primary key from this list:" msgstr "名簿内の受験者識別用カラム名:" #: ../AMC-gui-main_window.glade:1738 msgid "Papers/students association:" msgstr "答案の受験者識別:" #: ../AMC-gui-main_window.glade:1858 msgid "Students identification" msgstr "受験者識別" #: ../AMC-gui-main_window.glade:2020 msgid "Export" msgstr "をエクスポート" #: ../AMC-gui-main_window.glade:2041 msgid "and" msgstr "..." #: ../AMC-gui-main_window.glade:2095 msgid "Sorting:" msgstr "並べ替え" #: ../AMC-gui-main_window.glade:2121 msgid "include absentees" msgstr "欠席者を含む" #: ../AMC-gui-main_window.glade:2127 msgid "Should exported data include absentees?" msgstr "エクスポートするデータに欠席者を含みますか?" #: ../AMC-gui-main_window.glade:2207 msgid "Exports dir" msgstr "エクスポートディレクトリ" #: ../AMC-gui-main_window.glade:2239 msgid "Marks export" msgstr "採点結果のエクスポート" #: ../AMC-gui-main_window.glade:2322 msgid "File name model:" msgstr "ファイル名テンプレート:" #: ../AMC-gui-main_window.glade:2336 msgid "File name model used to make file names for PDF annotated papers, one by student. Keep empty in order to use student name." msgstr "受験者別の採点記入済答案PDF用のファイル名テンプレート。受験者氏名を用いる場合は空欄のままにしてください。" #: ../AMC-gui-main_window.glade:2382 msgid "Annotate papers' scans with marking details." msgstr "スキャンした答案に採点の詳細を記入する。" #: ../AMC-gui-main_window.glade:2404 msgid "Annotate papers" msgstr "採点記入" #: ../AMC-gui-main_window.glade:2428 msgid "Look at grouped files" msgstr "グループ化されたファイルを表示" #: ../AMC-gui-main_window.glade:2451 msgid "Look" msgstr "表示" #: ../AMC-gui-main_window.glade:2482 msgid "Send..." msgstr "送信..." #: ../AMC-gui-main_window.glade:2511 msgid "Annotated papers" msgstr "答案への採点記入" #: ../AMC-gui-main_window.glade:2534 msgid "Reports" msgstr "レポート" #: ../AMC-gui-main_window.glade:2650 msgid "Open project" msgstr "プロジェクトを開く" #: ../AMC-gui-main_window.glade:2691 msgid "Save project" msgstr "プロジェクトを保存する" #: ../AMC-gui-main_window.glade:2721 msgid "Menu" msgstr "メニュー" #: ../AMC-gui-main_window.glade:2799 ../AMC-gui-main_window.glade:2838 #: ../AMC-gui-main_window.glade:2877 msgid "Update the document" msgstr "文書を更新する" #: ../AMC-gui-main_window.glade:2813 ../AMC-gui-main_window.glade:2852 #: ../AMC-gui-main_window.glade:2891 msgid "Open the document" msgstr "文書を開く" #: ../AMC-gui-main_window.glade:2953 msgid "Export as template" msgstr "テンプレートとしてエクスポート" #: ../AMC-gui-main_window.glade:2967 msgid "User templates" msgstr "ユーザテンプレート" #: ../AMC-gui-main_window.glade:2992 msgid "Manage" msgstr "管理" #: ../AMC-gui-main_window.glade:3017 ../AMC-gui-main_window.glade:3267 msgid "Help" msgstr "ヘルプ" #: ../AMC-gui-main_window.glade:3033 msgid "About" msgstr "概要" #: ../AMC-gui-main_window.glade:3047 msgid "Cancel learning…" msgstr "学習をキャンセルする..." #: ../AMC-gui-main_window.glade:3058 msgid "Debugging" msgstr "デバッグ" #: ../AMC-gui-main_window.glade:3076 msgid "Bug report" msgstr "バグレポート" #: ../AMC-gui-main_window.glade:3090 ../AMC-gui-main_window.glade:3115 msgid "Documentation" msgstr "ドキュメント" #: ../AMC-gui-main_window.glade:3184 ../AMC-gui-main_window.glade:3253 msgid "Plugins" msgstr "プラグイン" #: ../AMC-gui-main_window.glade:3200 msgid "Browse" msgstr "一覧を見る" #: ../AMC-gui-main_window.glade:3214 msgid "Install plugin" msgstr "プラグインをインストールする" #: ../AMC-gui-make_template.glade:8 msgid "Save as a template" msgstr "テンプレートとして保存する" #: ../AMC-gui-make_template.glade:64 msgid "To make a new template from your project, describe it below:" msgstr "プロジェクトから新しいテンプレートを作るには、以下に説明を書いてください:" #: ../AMC-gui-make_template.glade:86 msgid "File name:" msgstr "ファイル名:" #: ../AMC-gui-make_template.glade:117 msgid "Note: please use only alphanumeric characters and characters from \"-_+\" for the template file name." msgstr "注意: テンプレートファイル名には英数字と \"-_+\" の文字のみを使用してください。" #: ../AMC-gui-make_template.glade:143 msgid "Short name:" msgstr "テンプレート名:" #: ../AMC-gui-make_template.glade:202 msgid "Description:" msgstr "説明:" #: ../AMC-gui-make_template.glade:304 msgid "Included files:" msgstr "テンプレートに含まれるファイル:" #: ../AMC-gui-overwritten.glade:49 msgid "List of pages with overwritten data:" msgstr "上書き更新されたページの一覧" #: ../AMC-gui-saisie_auto.glade:8 msgid "Please select all papers' scans" msgstr "試験問題のスキャン画像をすべて選択してください" #: ../AMC-gui-saisie_auto.glade:10 msgid "Automatic data capture" msgstr "自動マーク認識" #: ../AMC-gui-saisie_auto.glade:27 msgid "Proceed to data capture from scans with button OK" msgstr "OKボタンを押すとスキャンファイルからのマーク認識に進みます" #: ../AMC-gui-saisie_auto.glade:82 msgid "Copy to project directory (recommended)" msgstr "プロジェクトディレクトリにコピーする(推奨)" #: ../AMC-gui-saisie_auto.glade:88 ../AMC-gui-saisie_auto.glade:89 msgid "Copy all scans to scans sub-directory in project directory" msgstr "スキャン画像をすべてプロジェクト内のscansサブディレクトリにコピーします" #: ../AMC-gui-saisie_auto.glade:156 msgid "Use this setting to be sure that the exam copy IDs allocated to the pages of the scans you selected will be consecutive numbers, in the same order as the pages." msgstr "選択したスキャン画像の各ページの用紙番号がページ順序と同じになるように連続した番号を割り当てるには、この設定を使用してください。" #: ../AMC-gui-saisie_auto.glade:172 msgid "Options" msgstr "オプション" #: ../AMC-gui-source_latex_choix.glade:8 msgid "Choose LaTeX source file" msgstr "LaTeXソースファイルの選択" #: ../AMC-gui-source_latex_choix_zip.glade:8 msgid "ZIP file choice" msgstr "ZIPファイル選択" #: ../AMC-gui-source_latex_dialog.glade:7 msgid "Choose LaTeX source" msgstr "LaTeXソースの選択" #: ../AMC-gui-source_latex_dialog.glade:62 msgid "" "A multiple choice project is mainly made of a source file, which describes the questionnaire.\n" "Please choose your situation:" msgstr "" "選択式試験問題のプロジェクトは主に質問事項を記述したソースファイルで作られます。\n" "シチュエーションを選択してください:" #: ../AMC-gui-source_latex_dialog.glade:105 msgid "Template" msgstr "テンプレート" #: ../AMC-gui-source_latex_dialog.glade:119 msgid "You did not write any description of the questionnaire, and want to start from a template." msgstr "試験問題をまだ何も作成しておらず、テンプレートから開始したい。" #: ../AMC-gui-source_latex_dialog.glade:171 msgid "File" msgstr "ファイル" #: ../AMC-gui-source_latex_dialog.glade:185 msgid "You already wrote a questionnaire description, and want to use it for this project." msgstr "既に質問記述があり、このプロジェクトでそれを使いたい。" #: ../AMC-gui-source_latex_dialog.glade:237 msgid "Empty" msgstr "" #: ../AMC-gui-source_latex_dialog.glade:251 msgid "You want to write the description from zero." msgstr "記述をゼロから作成したい。" #: ../AMC-gui-source_latex_dialog.glade:303 msgid "Archive" msgstr "アーカイブ" #: ../AMC-gui-source_latex_dialog.glade:317 msgid "You have a .tgz or .zip file containing the questionnaire and other related stuff, coming from a third party software or a backup." msgstr "第三者あるいはバックアップ由来で、試験問題と必要なファイルを含んだtgzあるいはzipファイルを持っている。" #: ../AMC-gui-source_latex_modele.glade:8 msgid "Template selection" msgstr "テンプレート選択" #: ../AMC-gui-unrecognized.glade:8 msgid "Preprocess" msgstr "前処理" #: ../AMC-gui-unrecognized.glade:14 msgid "Delete" msgstr "削除" #: ../AMC-gui-unrecognized.glade:29 msgid "Unrecognized scans" msgstr "未認識スキャン画像" #: ../AMC-gui-unrecognized.glade:71 msgid "Scans list" msgstr "スキャン画像一覧" #: ../AMC-gui-unrecognized.glade:237 msgid "Original scan" msgstr "オリジナルスキャン画像" #: ../AMC-gui-unrecognized.glade:266 msgid "Preprocessed" msgstr "前処理結果" #: ../AMC-perl/AMC/Gui/Association.glade:14 msgid "Manual association" msgstr "手動受験者識別" #. This is the label of the check button that controls wheter the auto-completion for students names will be made looking at the beginnig of the names or at the whole names. #: ../AMC-perl/AMC/Gui/Association.glade:84 msgid "beginning" msgstr "先頭一致" #: ../AMC-perl/AMC/Gui/Association.glade:89 msgid "Is auto-completion looking at the beginning of the names only?" msgstr "自動補完では氏名の先頭一致のみを用いますか?" #: ../AMC-perl/AMC/Gui/Association.glade:157 msgid "Show all" msgstr "全て表示" #: ../AMC-perl/AMC/Gui/Association.glade:361 msgid "associated" msgstr "識別済も表示" #: ../AMC-perl/AMC/Gui/Association.glade:366 msgid "Unticking this box, you see only non-associated papers. Tick it to be able to check already associated papers." msgstr "このボックスのチェックをはずすと受験者識別されていない答案のみ表示されます。チェックを入れると受験者識別の済んだ答案も確認することができます。" #: ../AMC-perl/AMC/Gui/Association.glade:411 msgid "Remove manual association for this paper" msgstr "この答案の手動受験者識別を削除" #: ../AMC-perl/AMC/Gui/Association.glade:427 msgid "Tell the system that this papers does not correspond to any of the students from the list." msgstr "この答案の受験者が名簿になく無視してよいことをシステムに通知します。" #: ../AMC-perl/AMC/Gui/Association.glade:449 msgid "Unknown" msgstr "不明" #: ../AMC-perl/AMC/Gui/Association.glade:509 msgid "Save associations." msgstr "手動受験者識別結果を保存する。" #: ../AMC-perl/AMC/Gui/Manuel.glade:18 msgid "Paper data capture" msgstr "答案用紙マーク認識" #: ../AMC-perl/AMC/Gui/Manuel.glade:39 ../AMC-perl/AMC/Gui/Manuel.glade:236 msgid "Go to:" msgstr "直接ジャンプ:" #: ../AMC-perl/AMC/Gui/Manuel.glade:51 ../AMC-perl/AMC/Gui/Manuel.glade:248 msgid "Enter paper number, or page number like 102/4 (page 4 from paper 102), then press enter." msgstr "試験問題番号あるいは102/4(試験問題102の4ページ目)のような用紙番号を入力し、Enterを押してください。" #: ../AMC-perl/AMC/Gui/Manuel.glade:82 msgid "Go to the previous page." msgstr "前ページに戻る。" #: ../AMC-perl/AMC/Gui/Manuel.glade:100 msgid "Quit" msgstr "終了" #: ../AMC-perl/AMC/Gui/Manuel.glade:118 msgid "Go to next page." msgstr "次ページに進む。" #: ../AMC-perl/AMC/Gui/Manuel.glade:282 msgid "Save this page modifications, then go to the previous page." msgstr "このページの修正を保存し、前のページに戻る。" #: ../AMC-perl/AMC/Gui/Manuel.glade:296 msgid "Choose if you want to navigate through all pages, through pages with invalid answers, or through pages with invalid or empty answers." msgstr "すべてのページ、マーク矛盾のあるページ、マーク矛盾あるいはマーク無記入のあるページのいずれを表示するか選択してください。" #: ../AMC-perl/AMC/Gui/Manuel.glade:318 msgid "Save this page modifications, then go to next page." msgstr "このページの修正を保存し、次のページに進む。" #: ../AMC-perl/AMC/Gui/Manuel.glade:344 msgid "Focus on question:" msgstr "注目する設問:" #: ../AMC-perl/AMC/Gui/Manuel.glade:429 msgid "Remove manual modifications for this page. Automatic data capture for this page, if any, won't be changed." msgstr "このページの手動修正を削除します。このページの自動マーク認識結果は、変更されません。" #: ../AMC-perl/AMC/Gui/Manuel.glade:458 msgid "Cancel modifications for this page" msgstr "このページの修正を取り消す" #: ../AMC-perl/AMC/Gui/Manuel.glade:476 msgid "Save and quit" msgstr "保存して終了" #: ../AMC-perl/AMC/Gui/Zooms.glade:135 msgid "Unchecked boxes" msgstr "マークされていないボックス" #: ../AMC-perl/AMC/Gui/Zooms.glade:203 msgid "Checked boxes" msgstr "マークされているボックス" #: ../AMC-perl/AMC/Gui/Zooms.glade:281 msgid "Toggle mode. With 'click', left-click to toggle and right-click to toggle a group." msgstr "マークのトグル方法のモード: クリックモードでは、左クリックで個別のトグル、右クリックで指定以上または以下のグループをすべてトグルします。" #~ msgid "" #~ "Names list file for this project is:\n" #~ "%s" #~ msgstr "" #~ "このプロジェクトの名簿ファイル:\n" #~ "%s" #~ msgid "(no file)" #~ msgstr "(ファイルなし)" #~ msgid "Path" #~ msgstr "パス" #~ msgid "Yes, with scope separator '.'" #~ msgstr "スコープセパレータ '.' を使用" #~ msgid "_Project" #~ msgstr "プロジェクト(_P)" #~ msgid "Open personal templates directory" #~ msgstr "個人テンプレートディレクトリを開く" #~ msgid "_Edit" #~ msgstr "編集(_E)" #~ msgid "_Tools" #~ msgstr "ツール(_T)" #~ msgid "Cleanup..." #~ msgstr "不要ファイル削除..." #~ msgid "Installed plugins" #~ msgstr "インストール済プラグイン" #~ msgid "Open the installed plugins directory." #~ msgstr "インストール済プラグイン一覧を開く" #~ msgid "Get debugging information in a file" #~ msgstr "ファイルにデバッグ情報を出力する" #~ msgid "Error writing state file %s: %s" #~ msgstr "状態ファイル %s の書込みエラー: %s" #~ msgid "The working documents are already prepared with the current file format. If you change the file format, working documents and all other data for this project will be ereased." #~ msgstr "現在のファイル形式で作業文書が既に用意されています。ファイル形式を変更すると作業文書とこのプロジェクトの他のデータがすべて消去されます。" #~ msgid "Click on Ok to erease old working documents and change file format, and on Cancel to get back to the same file format." #~ msgstr "古い作業文書を消去してファイル形式を変更するにはOKを、ファイル形式を元に戻すにはキャンセルをクリックしてください。" #~ msgid "The working documents are already prepared with the current file format. If you change the file format, working documents will be ereased." #~ msgstr "現在のファイル形式で作業文書が既に用意されています。ファイル形式を変更すると作業文書が消去されます。" #~ msgid "You can't choose column '%s' as a key in the students list, as it contains duplicates (value '%s')" #~ msgstr "受験者名簿の '%s' カラムには重複('%s')が含まれているので、受験者識別用カラムとして選択できません。" #~ msgid "You did not save project %s options, which have been modified: do you want to save them before leaving?" #~ msgstr "プロジェクト %s の修正済オプションを保存していません。プロジェクトを閉じる前に保存しますか?" #~ msgid "You did not save main options, which have been modified: do you want to save them before leaving?" #~ msgstr "修正済のメインオプションを保存していません。終了する前に保存しますか?" #~ msgid "Color used to highlight questions with no ticked answers in the manual data capture window" #~ msgstr "手動マーク認識ウィンドウで、マーク無記入の設問をハイライトする色" #~ msgid "Color used to highlight questions with invalid answers in the manual data capture window" #~ msgstr "手動マーク認識ウィンドウで、マーク矛盾の設問をハイライトする色" #~ msgid "Select all students whose report sending has failed last time." #~ msgstr "前回メール送信に失敗した受験者のみ選択します。" #~ msgid "Use HTML tags in the body of your message such as , , ,

    etc." #~ msgstr "メッセージの本文に, , ,

    などのHTMLタグを使用できるようにします。" #~ msgid "empty" #~ msgstr "空" #~ msgid "archive" #~ msgstr "アーカイブ" #~ msgid "If this is not ticked, the next copy is taken from the copies which are not yet associated (already associated copies are skipped), and when it is ticked, the next copy is taken from all the copies (you pass all associated and non-associated copies in turn)." #~ msgstr "オフにすると、(識別済の用紙はスキップして)未識別の用紙のみ表示します。オンにすると、すべての用紙を(識別済と未識別をまとめて順に)表示します。" #~ msgid "You chose printing method '%s' but there are no configured printer in CUPS. Please configure some printer or switch to another printing method." #~ msgstr "印刷方法に '%s' を選択していますが、CUPSに設定されたプリンタがありません。プリンタを設定するか、他の印刷方法に切り替えてください。" #~ msgid "Add sums of the scores for each question group? To define groups, use question ids in the form \"group:question\"." #~ msgstr "設問グループごとに素点を合計しますか?グループを定義するには、\"group:question\"という形式の設問IDを使用してください。" #~ msgid "(not supported)" #~ msgstr "(未サポート)" #~ msgid "Printing with method '%s' needs some perl modules that are not installed: %s. Please install these modules or switch to another printing method." #~ msgstr "印刷方法 '%s' に必要なperlモジュール %s がインストールされていません。これらのモジュールをインストールするか、他の印刷方法に切り替えてください。" #~ msgid "CUPS" #~ msgstr "CUPS" #~ msgid "Print separate answer sheet separately" #~ msgstr "別紙答案用紙を別に印刷する。" #~ msgid "Stapling" #~ msgstr "ステープル" #~ msgid "Name and surname" #~ msgstr "氏名" #~ msgid "PDF" #~ msgstr "PDF" #~ msgid "Font size" #~ msgstr "フォントサイズ" #~ msgid "Font size in points." #~ msgstr "ポイント単位でのフォントサイズ。" #~ msgid "compose" #~ msgstr "合成" #~ msgid "Find pages in solution if scan is not present? Useful with question with separated answers page." #~ msgstr "スキャンデータが存在しないページを模範解答から作成しますか?別紙答案用紙を使った試験問題に有用です。" #~ msgid "Grouping students annotated pages together..." #~ msgstr "受験者の採点記入済答案をまとめてグループ化しています..." #~ msgid "Renaming annotated files with new model..." #~ msgstr "採点記入済答案ファイルの名前を新しいテンプレートに沿って変更しています..." #~ msgid "Previous group was empty" #~ msgstr "前のグループは空です。" #~ msgid "Create a table with basic statistics about answers for each question?" #~ msgstr "各設問の解答に関する基本統計表を作成しますか?" #~ msgid "Size, in the form \"width\"x\"height\", for exemple 1000x1500" #~ msgstr "\"幅\"x\"高さ\"の形式でのサイズ(例 1000x1500)" #~ msgid "Maximum size in pixels" #~ msgstr "最大サイズ(ピクセル)" #~ msgid "JPEG quality for annotated papers" #~ msgstr "採点記入済答案のJPEG品質" #~ msgid "Value 60, for exemple, means that text size is chosen so that page height is 60 lines of text." #~ msgstr "例えば60に設定すると、ページの高さが60行になるように文字サイズが選択されます。" auto-multiple-choice-1.4.0/I18N/lang/pt_BR.po000066400000000000000000004311021341176102400205130ustar00rootroot00000000000000# Auto Multiple Choice # Copyright 2008-2016 Alexis Bienvenue # This file is distributed under the same license as the AMC software #, fuzzy msgid "" msgstr "" "Project-Id-Version: 1.4.0~beta1 (r:a488cdb)\n" "Report-Msgid-Bugs-To: paamc@passoire.fr\n" "POT-Creation-Date: 2018-05-02 09:25 +0200\n" "PO-Revision-Date: 2018-05-07 10:30 +0200\n" "Last-Translator: Milana Santos , 2018\n" "Language-Team: Portuguese (Brazil) (https://www.transifex.com/jojoboulix/teams/10701/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. TRANSLATORS: directory name for projects. This directory will be created #. (if needed) in the home directory of the user. Please use only alphanumeric #. characters, and - or _. No accentuated characters. #: ../AMC-annotate.pl:158 ../AMC-perl/AMC/Config.pm:247 #: ../AMC-perl/AMC/Config.pm:248 msgid "MC-Projects" msgstr "Projetos-MC" #: ../AMC-getimages.pl:213 msgid "Splitting multi-page PDF files..." msgstr "Dividindo arquivos PDF multi-página..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be #. converted. #: ../AMC-getimages.pl:390 #, perl-format msgid "Converting %s to bitmap..." msgstr "Convertendo %s para bitmap ..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be #. splitted to several images (one per page). #: ../AMC-getimages.pl:393 #, perl-format msgid "Splitting multi-page image %s..." msgstr "Dividindo imagem multi-página %s..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be #. splitted to several images (one per page). #: ../AMC-getimages.pl:396 #, perl-format msgid "Processing image %s..." msgstr "Processando a imagem %s..." #: ../AMC-getimages.pl:469 msgid "Copying scans to project directory..." msgstr "Copiando as digitalizações para a pasta do projeto..." #: ../AMC-gui.pl:249 msgid "" "None of the perl modules Graphics::Magick and Image::Magick " "are installed: AMC won't work properly!" msgstr "" "Nenhum dos módulos perl Graphics::Magick e Image::Magick " "estão instalados: o AMC não funcionará corretamente!" #: ../AMC-gui.pl:280 msgid "" "The package auto-multiple-choice-common is installed, but not auto-multiple-choice.\n" "AMC won't work properly until you install auto-multiple-choice package!" msgstr "" "O pacote auto-multiple-choice-common está instalado, mas não o auto-multiple-choice.\n" "O AMC não funcionará corretamente até que você instale o pacote auto-multiple-choice!" #: ../AMC-gui.pl:298 #, perl-format msgid "" "There is too little space left in the temporary disk directory (%s). " "Please clean this directory and try again." msgstr "" "Não há espaço disponível suficiente na pasta temporária (%s). Por favor, " "limpe esta pasta e tente novamente. " #: ../AMC-gui.pl:317 msgid "Several dialogs try to help you be at ease handling AMC." msgstr "Vários diálogos buscam auxiliá-lo a utilizar o AMC de maneira fácil." #: ../AMC-gui.pl:319 #, perl-format msgid "Unless you tick the \"%s\" box, they are shown only once." msgstr "" "A menos que você marque a caixa \"%s\" , eles serão mostrados apenas uma " "vez." #: ../AMC-gui.pl:321 ../AMC-gui.pl:605 msgid "Show this message again next time" msgstr "Mostre esta mensagem novamente, na próxima vez." #: ../AMC-gui.pl:323 msgid "" "Do you want to forgot which dialogs you have already seen and ask to show " "all of them next time they should appear ?" msgstr "" "Você deseja esquecer quais diálogos já viu e pedir para ver todos, da " "próxima vez que eles aparecerem?" #: ../AMC-gui.pl:357 msgid "" "Please install libnotify to make desktop notifications available." msgstr "" "Por favor, instale libnotify para tornar disponíveis as notificações " "na área de trabalho." #. TRANSLATORS: Message when switching to debugging mode. #: ../AMC-gui.pl:552 msgid "Debugging mode." msgstr "Modo de depuração." #. TRANSLATORS: Message when switching to debugging mode. %s will be replaced #. with the path of the log file. #: ../AMC-gui.pl:554 #, perl-format msgid "Debugging informations will be written in file %s." msgstr "A informação sobre a depuração será escrita no arquivo %s." #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:583 ../AMC-gui-main_window.glade:3131 msgid "French" msgstr "Francês" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:585 ../AMC-gui-main_window.glade:3145 msgid "English" msgstr "Inglês" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:587 ../AMC-gui-main_window.glade:3159 msgid "Japanese" msgstr "Japonês" #. TRANSLATORS: This is the title of the column containing student/copy #. identifier in the table showing the results of data captures. #: ../AMC-gui.pl:703 msgid "identifier" msgstr "identificador" #. TRANSLATORS: This is the title of the column containing data capture #. date/time in the table showing the results of data captures. #: ../AMC-gui.pl:712 msgid "updated" msgstr "atualizado" #. TRANSLATORS: This is the title of the column containing Mean Square Error #. Distance (some kind of mean distance between the location of the four #. corner marks on the scan and the location where they should be if the scan #. was not distorted at all) in the table showing the results of data #. captures. #: ../AMC-gui.pl:720 ../AMC-gui.pl:4992 ../AMC-perl/AMC/Gui/Manuel.pm:192 #: ../AMC-gui-main_window.glade:136 msgid "MSE" msgstr "MSE" #. TRANSLATORS: This is the title of the column containing so-called #. "sensitivity" (an indicator telling the user if the darkness ratio of some #. boxes on the page are very near the threshold. A great value tells that #. some darkness ratios are very near the threshold, so that the capture is #. very sensitive to the threshold. A small value is a good thing) in the #. table showing the results of data captures. #: ../AMC-gui.pl:729 ../AMC-gui.pl:4994 ../AMC-perl/AMC/Gui/Manuel.pm:200 msgid "sensitivity" msgstr "sensibilidade" #: ../AMC-gui.pl:737 msgid "scan file" msgstr "Arquivo escaneado" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:766 ../AMC-gui.pl:784 msgid "Western Europe" msgstr "Europa Ocidental" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:768 ../AMC-gui.pl:786 msgid "Central Europe" msgstr "Europa Central" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:770 msgid "Southern Europe" msgstr "Sul da Europa" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:772 msgid "Northern Europe" msgstr "Norte da Europa" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:774 msgid "Cyrillic" msgstr "cirílico" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:776 msgid "Turkish" msgstr "turco" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:778 msgid "Northern" msgstr "do norte" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:780 msgid "Unicode" msgstr "Unicode" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:804 ../AMC-gui.pl:3338 msgid "(none) [No primary key found in association list]" msgstr "(none) [Nenhuma chave primária localizada na lista de associações]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:806 ../AMC-gui.pl:3976 msgid "(none) [No code found in LaTeX file]" msgstr "(none) [Nenhum código localizado no arquivo LaTeX]" #. TRANSLATORS: One of the printing methods: use a command (This is not the #. command name itself). This is a menu entry. #: ../AMC-gui.pl:835 msgid "command" msgstr "comando" #. TRANSLATORS: One of the printing methods: print to files. This is a menu #. entry. #: ../AMC-gui.pl:837 msgid "to files" msgstr "para os arquivos" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:841 msgid "floor" msgstr "para baixo" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:843 msgid "rounding" msgstr "arredondamento" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:845 msgid "ceiling" msgstr "para cima" #. TRANSLATORS: One option for decimal point: use a comma. This is a menu #. entry #: ../AMC-gui.pl:849 msgid ", (comma)" msgstr ", (vírgula)" #. TRANSLATORS: One option for decimal point: use a point. This is a menu #. entry. #: ../AMC-gui.pl:851 msgid ". (dot)" msgstr ". (ponto)" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:856 msgid "one sided [No two-sided printing]" msgstr "somente de um lado" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:858 msgid "long edge" msgstr "borda maior" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:860 msgid "short edge" msgstr "borda menor" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:864 msgid "(none) [No transitional image type (direct processing)]" msgstr "(none) [No transitional image type (direct processing)]" #. TRANSLATORS: One of the actions that can be done after exporting the marks. #. Here, do nothing more. This is a menu entry. #: ../AMC-gui.pl:872 msgid "that's all" msgstr "concluído" #. TRANSLATORS: One of the actions that can be done after exporting the marks. #. Here, open the exported file. This is a menu entry. #: ../AMC-gui.pl:874 msgid "open the file" msgstr "abrir o arquivo" #. TRANSLATORS: One of the actions that can be done after exporting the marks. #. Here, open the directory where the file is. This is a menu entry. #: ../AMC-gui.pl:876 msgid "open the directory" msgstr "abrir a pasta" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:879 msgid "(none) [No annotation position (do not write anything)]" msgstr "(none) [No annotation position (do not write anything)]" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: in one margin. This is a menu entry. #: ../AMC-gui.pl:881 msgid "in one margin" msgstr "em uma margem" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: in one of the two margins. This is a menu entry. #: ../AMC-gui.pl:883 msgid "in the margins" msgstr "nas margens" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: near the boxes. This is a menu entry. #: ../AMC-gui.pl:885 msgid "near boxes" msgstr "próximo às caixas" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: in the zones defined in the source file #: ../AMC-gui.pl:887 msgid "where defined in the source" msgstr "onde definido no arquivo fonte" #. TRANSLATORS: One of the possible sorting criteria for students in the #. exported spreadsheet with scores: the student name. This is a menu entry. #. TRANSLATORS: This is the title of a column containing students names in a #. table showing all annotated answer sheets, when sending them to the #. students by email. #: ../AMC-gui.pl:890 ../AMC-gui.pl:6357 msgid "name" msgstr "nome" #. TRANSLATORS: One of the possible sorting criteria for students in the #. exported spreadsheet with scores: the student sheet number. This is a menu #. entry. #: ../AMC-gui.pl:892 msgid "exam copy number" msgstr "número do exemplar" #. TRANSLATORS: One of the possible sorting criteria for students in the #. exported spreadsheet with scores: the line where one can find this student #. in the students list file. This is a menu entry. #: ../AMC-gui.pl:894 msgid "line in students list" msgstr "linha na lista de alunos" #. TRANSLATORS: you can omit the [...] part, just here to explain context #. One of the possible sorting criteria for students in the exported #. spreadsheet with scores: the student mark. This is a menu entry. #: ../AMC-gui.pl:897 msgid "mark [student mark, for sorting]" msgstr "marca" #. TRANSLATORS: One of the possible way to group annotated answer sheets #. together to PDF files: make one PDF file per student, with all his pages. #. This is a menu entry. #: ../AMC-gui.pl:902 msgid "One file per student" msgstr "Um arquivo por aluno" #. TRANSLATORS: One of the possible way to group annotated answer sheets #. together to PDF files: make only one PDF with all students sheets. This is #. a menu entry. #: ../AMC-gui.pl:904 msgid "One file for all students" msgstr "Um arquivo para todos os alunos" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we #. only select pages where the student has written something (in separate #. answer sheet mode, these are the pages from the answer sheet and not the #. pages from the subject). #: ../AMC-gui.pl:907 msgid "Only pages with answers" msgstr "Apenas páginas com respostas" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we #. take the pages were the students has nothing to write (often question pages #. from a subject with separate answer sheet option) from the subject. #: ../AMC-gui.pl:909 msgid "Question pages from subject" msgstr "Folhas com questões a partir da prova" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we #. take the pages were the students has nothing to write (often question pages #. from a subject with separate answer sheet option) from the correction. #: ../AMC-gui.pl:911 msgid "Question pages from correction" msgstr "Folhas com questões a partir da correção" #: ../AMC-gui.pl:914 msgid "All students" msgstr "Todos os alunos" #: ../AMC-gui.pl:916 msgid "Selected students" msgstr "Alunos selecionados" #: ../AMC-gui.pl:918 msgid "Please select..." msgstr "Por favor, selecione" #. TRANSLATORS: One of the ways exam was made: each student has a different #. answer sheet with a different copy number - no photocopy was made. This is #. a menu entry. #. TRANSLATORS: This is a title for the AMC mode where the distributed exam #. papers are all different (different paper numbers at the top) -- photocopy #. is not used. #: ../AMC-gui.pl:920 ../AMC-gui.pl:2981 msgid "Different answer sheets" msgstr "Diferentes folhas de resposta" #. TRANSLATORS: One of the ways exam was made: some students have the same #. exam subject, as some photocopies were made before distributing the #. subjects. This is a menu entry. #. TRANSLATORS: This is a title for the AMC mode where some answer sheets have #. been photocopied before being distributed to the students. #: ../AMC-gui.pl:922 ../AMC-gui.pl:2986 msgid "Some answer sheets were photocopied" msgstr "Algumas folhas de resposta foram fotocopiadas" #. TRANSLATORS: One of the ways to send mail: use sendmail command. This is a #. menu entry. #: ../AMC-gui.pl:924 msgid "sendmail" msgstr "sendmail" #. TRANSLATORS: One of the ways to send mail: use a SMTP server. This is a #. menu entry. #: ../AMC-gui.pl:926 msgid "SMTP" msgstr "SMTP" #: ../AMC-gui.pl:927 msgid "None [SMTP security]" msgstr "None [segurança do SMTP]" #: ../AMC-gui.pl:936 msgid "Standard" msgstr "Padrão" #: ../AMC-gui.pl:938 msgid "Separate answer sheet" msgstr "Folha de respostas separada" #: ../AMC-gui.pl:940 ../AMC-gui.pl:2683 ../AMC-gui.pl:2701 msgid "Answer sheet first" msgstr "Folha de respostas em primeiro lugar" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. #: ../AMC-gui.pl:944 msgid "nothing" msgstr "nada" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. #: ../AMC-gui.pl:946 msgid "circle" msgstr "círculo" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. Here, a cross. #: ../AMC-gui.pl:948 msgid "mark" msgstr "marca" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. Here, the box outline. #: ../AMC-gui.pl:950 msgid "box" msgstr "caixa" #: ../AMC-gui.pl:1045 #, perl-format msgid "" "Exporting to '%s' needs some perl modules that are not installed: %s. Please" " install these modules or switch to another export format." msgstr "" "A exportação para '%s' exige alguns módulos perl que não estão instalados: " "%s. Por favor, instale esses módulos ou utilize outro layout de exportação." #: ../AMC-gui.pl:1068 msgid "" "When referring to a particular answer in the export, the letter used will be" " the one found in the catalog. However, the catalog has not yet been built. " "Do you want to build it now?" msgstr "" "Ao se referir a uma resposta em particular na exportação, a letra utilizada " "será aquela constante do catálogo. Porém, o catálogo ainda não foi " "construído. Você deseja construí-lo agora?" #: ../AMC-gui.pl:1104 msgid "Exporting marks..." msgstr "Exportando as pontuações..." #: ../AMC-gui.pl:1143 #, perl-format msgid "Export to %s did not work: file not created..." msgstr "Exportação para %s não funcionou: arquivo não criado..." #. TRANSLATORS: One of the popup menu that appears when right-clicking on a #. page in the data capture diagnosis table. Choosing this entry, an image #. will be opened to see where the corner marks were detected. #: ../AMC-gui.pl:1152 ../AMC-gui.pl:4996 msgid "page adjustment" msgstr "ajuste de página" #. TRANSLATORS: One of the popup menu that appears when right-clicking on a #. page in the data capture diagnosis table. Choosing this entry, a window #. will be opened were the user can see all boxes on the scans and how they #. were filled by the students, and correct detection of ticked-or-not if #. needed. #: ../AMC-gui.pl:1154 ../AMC-gui.pl:4996 msgid "boxes zooms" msgstr "zoom nas caixas" #: ../AMC-gui.pl:1225 #, perl-format msgid "You requested to delete all data capture results for %d page(s)" msgstr "" "Você solicitou a exclusão dos resultados de captura dos dados para " "%dpágina(s)" #: ../AMC-gui.pl:1226 msgid "All data and image files related to these pages will be deleted." msgstr "" "Todos os dados e imagens relacionados com essas páginas serão apagados." #: ../AMC-gui.pl:1227 msgid "Do you really want to continue?" msgstr "Quer mesmo continuar?" #: ../AMC-gui.pl:1405 #, perl-format msgid "" "Following command could not be run: %s, perhaps due to a poor " "configuration?" msgstr "" "O seguinte comando não pôde ser executado: %s, talvez devido a uma má" " configuração." #: ../AMC-gui.pl:1450 #, perl-format msgid "Current directory: %s" msgstr "Pasta atual: %s" #: ../AMC-gui.pl:1509 msgid "Existing projects:" msgstr "Projetos existentes:" #. TRANSLATORS: Window title when creating a new project. #: ../AMC-gui.pl:1514 msgid "New AMC project" msgstr "Novo projeto AMC" #: ../AMC-gui.pl:1519 msgid "Projects management:" msgstr "Gerenciamento de projetos" #: ../AMC-gui.pl:1520 msgid "Change project name:" msgstr "Mudar o nome do projeto:" #: ../AMC-gui.pl:1525 msgid "Back" msgstr "Preto" #. TRANSLATORS: Window title when managing projects. #: ../AMC-gui.pl:1528 msgid "AMC projects management" msgstr "Gerenciamento de projetos AMC" #: ../AMC-gui.pl:1550 #, perl-format msgid "You don't have any MC project in directory %s!" msgstr "A pasta '%s' não contém projetos AMC" #: ../AMC-gui.pl:1559 ../AMC-gui-choix_projet.glade:260 msgid "Choose directory" msgstr "Escolha a pasta" #: ../AMC-gui.pl:1604 #, perl-format msgid "You can't change project %s since it's open." msgstr "O projeto %s está aberto e, por isso, não pode ser alterado." #: ../AMC-gui.pl:1626 #, perl-format msgid "This will clone project %s to a new project %s." msgstr "Esta ação irá clonar o projeto%spara um novo projeto %s" #. TRANSLATORS: Message when you want to create an AMC project with name xxx, #. but there already exists a directory in the projects directory with this #. name! #: ../AMC-gui.pl:1697 #, perl-format msgid "Directory %s already exists, so you can't choose this name." msgstr "A pasta %sjá existe, então esse nome não pode ser escolhido." #: ../AMC-gui.pl:1743 msgid "Destination project directory already exists" msgstr "A pasta de destino do projeto já existe." #: ../AMC-gui.pl:1755 msgid "Copying project..." msgstr "Copiando o projeto..." #: ../AMC-gui.pl:1780 msgid "Your project has been copied" msgstr "O seu projeto foi copiado." #: ../AMC-gui.pl:1781 #, perl-format msgid "(%d files out of %d)" msgstr "(%d arquivos de %d)" #: ../AMC-gui.pl:1788 msgid "Source project directory not found" msgstr "Pasta com fonte do projeto não encontrada" #: ../AMC-gui.pl:1796 #, perl-format msgid "An error occuried during project copy: %s." msgstr "Um erro ocorreu durante a cópia do projeto: %s." #: ../AMC-gui.pl:1817 #, perl-format msgid "You asked to remove project %s." msgstr "Você pediu para remover o projeto %s." #: ../AMC-gui.pl:1818 msgid "" "This will permanently erase all the files of this project, including the " "source file as well as all the files you put in the directory of this " "project, as the scans for example." msgstr "" "Essa ação apagará permanentemente todos os arquivos deste projeto, incluindo" " o arquivo fonte e todos os outros arquivos adicionados à pasta do projeto, " "bem como as digitalizações." #: ../AMC-gui.pl:1819 msgid "Is this really what you want?" msgstr "É isso mesmo que você deseja?" #: ../AMC-gui.pl:1876 #, perl-format msgid "You selected directory %s as a project to open." msgstr "Selecionou a pasta %s como um projeto a ser aberto." #: ../AMC-gui.pl:1877 msgid "" "However, this directory does not seem to contain a project. Do you still " "want to try?" msgstr "" "No entanto, esta pasta não parece conter um projeto. Você ainda deseja " "tentar?" #: ../AMC-gui.pl:1894 #, perl-format msgid "You selected project %s from directory %s." msgstr "Você selecionou o projeto %s da pasta %s." #: ../AMC-gui.pl:1895 msgid "" "Do you want to copy this project to your projects directory before opening " "it?" msgstr "" "Você deseja copiar este projeto para a pasta dos seus projetos antes de " "abri-lo?" #: ../AMC-gui.pl:1965 #, perl-format msgid "The name %s is already used in the projects directory." msgstr "O nome %s já está em uso na pasta de projetos." #: ../AMC-gui.pl:1966 msgid "You must choose another name to create a project." msgstr "Você deve escolher outro nome para criar um projeto." #: ../AMC-gui.pl:2005 msgid "LaTeX packages:" msgstr "Pacotes LaTeX:" #: ../AMC-gui.pl:2006 msgid "Commands:" msgstr "Comandos:" #: ../AMC-gui.pl:2007 msgid "Fonts:" msgstr "Fontes:" #: ../AMC-gui.pl:2022 msgid "" "Your AMC version and LaTeX style file version differ. Even if the documents " "are properly generated, this can lead to many problems using AMC.\n" msgstr "" "As suas versões do AMC e do arquivo de estilos LaTeX são diferentes. Mesmo " "que os documentos sejam adequadamente gerados, isto pode levar a muitos " "problemas na utilização do AMC.\n" #: ../AMC-gui.pl:2023 msgid "" "Please check your installation to get matching AMC and LaTeX style file " "versions.\n" msgstr "" "Por favor, verifique sua instalação, para que as versões do AMC e do " "arquivo de estilos LaTeX sejam compatíveis.\n" #: ../AMC-gui.pl:2024 #, perl-format msgid "" "AMC version: %s\n" "sty version: %s\n" "sty path: %s" msgstr "" "Versão do AMC: %s\n" "versão do sty: %s\n" "caminho do sty: %s" #: ../AMC-gui.pl:2052 msgid "Documents update..." msgstr "Atualização de documentos..." #: ../AMC-gui.pl:2076 msgid "Problems while preparing documents" msgstr "Problemas ao preparar os documentos" #: ../AMC-gui.pl:2078 msgid "Problems while processing the source file." msgstr "Problemas ao processar o arquivo fonte." #: ../AMC-gui.pl:2081 msgid "You have to correct the source file and re-run documents update." msgstr "" "Você precisa corrigir o arquivo fonte e executar novamente a atualização de " "documentos." #: ../AMC-gui.pl:2085 msgid "Errors" msgstr "Erros" #: ../AMC-gui.pl:2086 msgid "Only first ten errors written" msgstr "Apenas os primeiros dez erros estão escritos." #: ../AMC-gui.pl:2089 msgid "Warnings" msgstr "Avisos" #: ../AMC-gui.pl:2090 msgid "Only first ten warnings written" msgstr "Apenas as primeiras dez advertências escritas" #. TRANSLATORS: Here, %s will be replaced with the translation of "Command #. output details", and refers to the small expandable part at the bottom of #. AMC main window, where one can see the output of the commands lauched by #. AMC. #: ../AMC-gui.pl:2095 #, perl-format msgid "See also the processing log in '%s' below." msgstr "Veja também o log do processamento em '%s' abaixo." #. TRANSLATORS: Title of the small expandable part at the bottom of AMC main #. window, where one can see the output of the commands lauched by AMC. #: ../AMC-gui.pl:2097 ../AMC-gui-main_window.glade:2570 msgid "Command output details" msgstr "Detalhes de saída do comando" #: ../AMC-gui.pl:2098 msgid "Use LaTeX editor or latex command for a precise diagnosis." msgstr "Use um editor LaTeX ou um comando LaTeX para um diagnóstico preciso." #: ../AMC-gui.pl:2113 msgid "Documents have been prepared" msgstr "Os documentos foram preparados" #: ../AMC-gui.pl:2143 msgid "Working documents successfully generated." msgstr "Os documentos de trabalho gerados com sucesso." #. TRANSLATORS: Here, "them" refers to the working documents. #: ../AMC-gui.pl:2145 msgid "You can take a look at them double-clicking on the list." msgstr "Você pode visualizá-los com um duplo clique na lista." #. TRANSLATORS: Here, "they" refers to the working documents. #: ../AMC-gui.pl:2147 msgid "If they are correct, proceed to layouts detection..." msgstr "Se estão corretos, prossiga para a detecção do layout." #: ../AMC-gui.pl:2169 msgid "Your question has a separate answers sheet." msgstr "A sua questão tem uma folha de respostas em separado." #: ../AMC-gui.pl:2170 msgid "In this case, letters are shown inside boxes." msgstr "neste caso, as letras estão dentro das caixas." #: ../AMC-gui.pl:2171 msgid "Your question is set to present labels inside the boxes to be ticked." msgstr "" "A sua questão está preparada para apresentar anotações dentro das caixas a " "ser marcadas com um tique." #. TRANSLATORS: Here, %s will be replaced with the translation of "darkness #. threshold". #: ../AMC-gui.pl:2174 #, perl-format msgid "" "For better ticking detection, ask students to fill out completely boxes, and" " choose parameter \"%s\" around 0.5 for this project." msgstr "" "Para melhor detecção das marcas, solicite aos alunos para preencherem " "completamente as caixas e indique, neste projeto, aproximadamente 0.5 para o" " parâmetro \"%s\"." #: ../AMC-gui.pl:2175 #, perl-format msgid "At the moment, this parameter is set to %.02f." msgstr "Atualmente, este parâmetro está ajustado para %.02f." #: ../AMC-gui.pl:2176 msgid "Would you like to set it to 0.5?" msgstr "Você gostaria de ajustá-lo para 0.5?" #. TRANSLATORS: This parameter is the ratio of dark pixels number over total #. pixels number inside box above which a box is considered to be ticked. #: ../AMC-gui.pl:2178 msgid "darkness threshold" msgstr "limiar de claro/escuro" #: ../AMC-gui.pl:2199 msgid "" "Papers analysis was already made on the basis of the current working " "documents." msgstr "" "A análise das provas foi realizada com base nos atuais documentos de " "trabalho." #: ../AMC-gui.pl:2200 msgid "You already made the examination on the basis of these documents." msgstr "Você já aplicou a prova com base nesses documentos." #: ../AMC-gui.pl:2201 msgid "" "If you modify working documents, you will not be capable any more of " "analyzing the papers you have already distributed!" msgstr "" "Se você modificar os documentos de trabalho, não será mais capaz de analisar" " as provas que já distribuiu!" #: ../AMC-gui.pl:2202 ../AMC-gui.pl:2229 msgid "Do you wish to continue?" msgstr "Você deseja continuar?" #: ../AMC-gui.pl:2203 ../AMC-gui.pl:2230 msgid "" "Click on OK to erase the former layouts and update working documents, or on " "Cancel to cancel this operation." msgstr "" "Escolha OK para apagar os antigos formatos (\"layouts\") e atualizar os " "documentos de trabalho, ou escolha Cancel para cancelar a operação." #: ../AMC-gui.pl:2204 ../AMC-gui.pl:2231 msgid "To allow the use of an already printed question, cancel!" msgstr "Para permitir o uso de uma questão já impressa, cancele!" #: ../AMC-gui.pl:2227 msgid "Layouts are already calculated for the current documents." msgstr "Os formatos foram calculados para os documentos atuais." #: ../AMC-gui.pl:2228 msgid "" "Updating working documents, the layouts will become obsolete and will thus " "be erased." msgstr "" "Ao atualizar os documentos de trabalho, os formatos tornam-se obsoletos e " "serão apagados." #: ../AMC-gui.pl:2258 #, perl-format msgid "" "To handle properly %s files, AMC needs the following components, that" " are currently missing:" msgstr "" "Para lidar apropriadamente com arquivos %s, o AMC precisa dos " "seguintes componentes, que estão faltando:" #: ../AMC-gui.pl:2270 msgid "Install these components on your system and try again." msgstr "Instale os seguintes componentes no seu sistema e tente de novo." #. TRANSLATORS: Message when the user required printing the question paper, #. but it is not present (probably the working documents have not been #. properly generated). #: ../AMC-gui.pl:2405 msgid "" "You don't have any question to print: please check your source file and " "update working documents first." msgstr "" "Você não tem nenhuma questão a imprimir: antes de continuar, por favor " "verifique o arquivo fonte e atualize os documentos de trabalho." #. TRANSLATORS: Message when AMC does not know about the subject pages that #. has been generated. Usualy this means that the layout computation step has #. not been made. #: ../AMC-gui.pl:2422 msgid "Question's pages are not detected." msgstr "Páginas de questões não detectadas." #: ../AMC-gui.pl:2423 msgid "Perhaps you forgot to compute layouts?" msgstr "Porventura você esqueceu de calcular os layouts?" #: ../AMC-gui.pl:2445 #, perl-format msgid "" "You chose the printing method '%s' but it is not available (%s). Please " "install the missing dependencies or switch to another printing method." msgstr "" "Você escolheu o método de impressão '%s', mas ele não está disponível (%s). " "Por favor, instale as dependências ou escolha outro método de impressão." #: ../AMC-gui.pl:2466 msgid "" "You chose a printing method using CUPS but there are no configured printer " "in CUPS. Please configure some printer or switch to another printing method." msgstr "" "Você escolheu um método de impressão que usa CUPS mas não existe nenhuma " "impressora disponível no CUPS. Configure outra impressora ou escolha outro " "método." #. TRANSLATORS: This is the title of the column containing the paper's numbers #. (1,2,3,...) in the table showing all available papers, from which the user #. will choose those he wants to print. #: ../AMC-gui.pl:2533 msgid "papers" msgstr "provas" #: ../AMC-gui.pl:2622 msgid "You did not select any exam to print..." msgstr "Você não selecionou nenhum exame para imprimir..." #: ../AMC-gui.pl:2641 ../AMC-gui.pl:2657 msgid "You selected only a few sheets to print." msgstr "Você selecionou apenas algumas páginas para impressão." #: ../AMC-gui.pl:2642 msgid "" "As students are requested to write on more than one page, you must create as" " many exam sheets as necessary for all your students, with different sheets " "numbers, and print them all." msgstr "" "Quando é solicitado aos alunos que escrevam em mais que uma página, deve ser" " criada a quantidade necessária de exemplares para todos os alunos, com " "diferentes números nas páginas, e todas as páginas devem ser impressas." #: ../AMC-gui.pl:2643 msgid "" "If you print one or several sheets and photocopy them to have enough for all" " the students, you won't be able to continue with AMC!" msgstr "" "Se você imprimir e fotocopiar algumas páginas para ter exemplares para todos" " os alunos, não poderá continuar a usar o AMC!" #: ../AMC-gui.pl:2644 msgid "Do you want to print the selected sheets anyway?" msgstr "Você deseja imprimir as páginas selecionadas mesmo assim?" #: ../AMC-gui.pl:2658 msgid "" "Are you going to photocopy some printed subjects before giving them to the " "students?" msgstr "" "Você vai fotocopiar alguns \"subjects\" impressos antes de os entregar aos " "alunos?" #: ../AMC-gui.pl:2659 msgid "If so, the corresponding option will be set for this project." msgstr "Se sim, a opção correspondente será selecionada para este projeto." #: ../AMC-gui.pl:2660 msgid "" "However, you will be able to change this when giving your first scans to " "AMC." msgstr "" "No entanto, é possível mudar a opção quando submeter as digitalizações ao " "AMC." #. TRANSLATORS: the two %s will be replaced by the translations of "Answer #. sheet first" and "Extracting method". #: ../AMC-gui.pl:2682 #, perl-format msgid "" "You selected the '%s' option, that uses '%s', so the %s has been set to '%s'" " for you." msgstr "" "Você selecionou a opção '%s', que utiliza '%s', então %s passa a ser '%s'." #: ../AMC-gui.pl:2684 ../AMC-gui-edit_preferences.glade:902 msgid "Extracting method" msgstr "Método de extração" #: ../AMC-gui.pl:2700 #, perl-format msgid "" "You selected the '%s' option, but this option needs 'qpdf' or 'pdftk' to be " "installed on your system. Please install one of these and try again." msgstr "" "Você selecionou a opção '%s', mas esta opção exige que 'qpdf' ou 'pdftk' " "estejam instalados no seu sistema. Por favor, instale um desses e tente " "novamente." #: ../AMC-gui.pl:2741 msgid "Print papers one by one..." msgstr "Imprimir as provas uma por uma..." #: ../AMC-gui.pl:2790 msgid "" "Working documents are in an old format, which is not supported anymore." msgstr "" "Os documentos de trabalho estão num formato antigo, que já não é mais " "suportado." #: ../AMC-gui.pl:2791 msgid "Please generate again the working documents!" msgstr "Por favor, gere novamente os documentos de trabalho!" #: ../AMC-gui.pl:2805 msgid "Detecting layouts..." msgstr "Reconhecendo os layouts..." #: ../AMC-gui.pl:2823 msgid "No layout detected." msgstr "Layouts não detectados." #: ../AMC-gui.pl:2824 msgid "" "Don't go through the examination before fixing this problem, " "otherwise you won't be able to use AMC for correction." msgstr "" "Não prossiga com a prova sem resolver este problema. Caso contrário, " "você não poderá usar o AMC para correção." #: ../AMC-gui.pl:2830 msgid "Layouts are detected." msgstr "Os layouts foram detectados." #: ../AMC-gui.pl:2831 #, perl-format msgid "" "You can check all is correct clicking on button %s and looking at " "question pages to see if red boxes are well positioned." msgstr "" "Você pode verificar se tudo está correto selecionando o botão %s e " "observando, nas páginas de questões, se as caixas vermelhas estão bem " "posicionadas." #: ../AMC-gui.pl:2831 ../AMC-gui-main_window.glade:560 msgid "Check layouts" msgstr "Verificar os layouts" #: ../AMC-gui.pl:2832 msgid "Then you can proceed to printing and to examination." msgstr "Então você pode proceder para a impressão e aplicação da prova." #: ../AMC-gui.pl:2905 msgid "No layout for this project." msgstr "Sem formatos para este projeto." #. TRANSLATORS: Here, the first %s will be replaced with "Layout detection" (a #. button title), and the second %s with "Preparation" (the tab title where #. one can find this button). #: ../AMC-gui.pl:2907 #, perl-format msgid "Please use button %s in %s before manual data capture." msgstr "" "Por favor, use o botão %s em %s antes da captura manual." #: ../AMC-gui.pl:2908 ../AMC-gui-main_window.glade:508 msgid "Layout detection" msgstr "Detecção de layout" #: ../AMC-gui.pl:2909 ../AMC-gui-main_window.glade:684 msgid "Preparation" msgstr "Preparação" #: ../AMC-gui.pl:2947 #, perl-format msgid "Pre-allocate sheet ids from the page numbers, starting at %d" msgstr "" "Pré-alocação do código identificador da folha de prova a partir do número da" " página, começando em %d." #: ../AMC-gui.pl:2978 msgid "Automatic data capture can be done in two different modes:" msgstr "Captura automática de dados pode ser feita de dois modos diferentes." #: ../AMC-gui.pl:2983 msgid "" "In the most robust one, you give a different exam (with a different exam " "number) to every student. You must not photocopy subjects before " "distributing them." msgstr "" "No modo mais robusto, dá-se uma prova diferente (i.e., com um identificador " "diferente) a cada aluno. Não se deve fotocopiar exemplares com a finalidade " "de os distribuir." #: ../AMC-gui.pl:2988 msgid "" "In the second one (which can be used only if answer sheets to be scanned " "have one page per candidate) you can photocopy answer sheets and give the " "same subject to different students." msgstr "" "No segundo (que só pode ser usado se a folha de respostas a ser escaneada, " "para cada candidato, tiver uma única página), você pode fotocopiar a folha " "de respostas e dar o mesmo \"subject\" a diferentes alunos." #: ../AMC-gui.pl:2989 msgid "After the first automatic capture, you can't switch to the other mode." msgstr "" "Depois da primeira captura automática, você não poderá mudar para outro " "modo." #: ../AMC-gui.pl:3163 msgid "Automatic data capture..." msgstr "Captura automática..." #: ../AMC-gui.pl:3174 msgid "Automatic data capture has been completed" msgstr "A captura automática foi concluída." #: ../AMC-gui.pl:3183 #, perl-format msgid "" "Some of the pages you submitted (%d of them) have already been processed " "before. Old data has been overwritten." msgstr "" "Algumas das páginas que você submeteu (%ddo total) já foram processadas " "anteriormente. Os dados antigos foram sobrescritos." #. TRANSLATORS: Names list file : (none) #: ../AMC-gui.pl:3271 msgid "(none)" msgstr "(none)" #: ../AMC-gui.pl:3292 #, perl-format msgid "Unsuitable names file: %d errors, first on line %d." msgstr "Arquivo de nomes inadequado: %d erros, o primeiro na linha %d." #. TRANSLATORS: Here, do not translate 'name' and 'surname' (except in #. french), as the column names in the students list file has to be named in #. english in order to be properly detected. #: ../AMC-gui.pl:3309 #, perl-format msgid "" "Found %d empty names in names file %s. Check that name or " "surname column is present, and always filled." msgstr "" "Encontrados %d nomes vazios no arquivo de nomes %s. Verifique que a " "coluna \"name\" ou \"surname\"estão presentes, e sempre " "preenchidas." #: ../AMC-gui.pl:3310 ../AMC-gui.pl:3326 msgid "Edit the names file to correct it, and re-read." msgstr "Edite o arquivo de nomes para corrigi-lo e faça a leitura novamente." #: ../AMC-gui.pl:3326 #, perl-format msgid "Found duplicate names: %s. Check that all names are different." msgstr "" "Encontrados nomes duplicados: %s. Confirme que todos os nomes são " "diferentes." #. TRANSLATORS: Here, %s will be replaced with the name of the tab "Data #. capture". #: ../AMC-gui.pl:3358 #, perl-format msgid "" "Before associating names to papers, you must choose a students list file in " "tab \"%s\"." msgstr "" "Antes de associar nomes às provas, você deve escolher a listagem de " "estudantes na aba \"%s\"." #. One of the "notify the user at the end of the following actions" checkbox: #. for automatic data capture. #: ../AMC-gui.pl:3359 ../AMC-gui-edit_preferences.glade:1584 #: ../AMC-gui-main_window.glade:1286 msgid "Data capture" msgstr "Captura de dados" #: ../AMC-gui.pl:3368 msgid "" "Please choose a key from primary keys in students list before association." msgstr "" "Por favor, selecione uma chave nas chaves primárias da listagem de " "estudantes antes da associação." #: ../AMC-gui.pl:3377 msgid "" "Please choose a code (made with LaTeX command \\AMCcodeGrid or equivalent) " "before automatic association." msgstr "" "Por favor, escolha um código (criado com o comando LaTeX \\AMCcodeGrid ou " "equivalente) antes da associação automática." #. TRANSLATORS: Here, %s will be replaced with "Students identification", #. which refers to a paragraph in the tab "Marking" from AMC main window. #: ../AMC-gui.pl:3422 #, perl-format msgid "" "Before associating names to papers, you must choose a students list file in " "paragraph \"%s\"." msgstr "" "Antes de associar nomes às provas, você deve escolher a listagem de alunos " "no parágrafo \"%s\"." #: ../AMC-gui.pl:3423 msgid "Students identification" msgstr "Identificação dos alunos" #: ../AMC-gui.pl:3446 msgid "Automatic association..." msgstr "Associação automática..." #: ../AMC-gui.pl:3468 #, perl-format msgid "Automatic association completed: %d students recognized." msgstr "Associação automática concluída: %d alunos reconhecidos." #. TRANSLATORS: Here %s and %s will be replaced with two parameters names: #. "Primary key from this list" and "Code name for automatic association". #: ../AMC-gui.pl:3470 #, perl-format msgid "Please check \"%s\" and \"%s\" values and try again." msgstr "Por favor, verifique os valores \"%s\" e \"%s\" e tente de novo." #: ../AMC-gui.pl:3471 msgid "Primary key from this list" msgstr "Chave primária desta lista." #: ../AMC-gui.pl:3472 msgid "Code name for automatic association" msgstr "Nome do código identificador para associação automática" #: ../AMC-gui.pl:3478 msgid "" "Automatic association is now finished. You can ask for manual association to" " check that all is fine and, if necessary, read manually students names " "which have not been automatically identified." msgstr "" "A associação automática está terminada. Você pode usar a associação manual " "para verificar que tudo está correto, e se necessário, ler manualmente os " "nomes dos estudantes que não foram automaticamente identificados." #: ../AMC-gui.pl:3640 #, perl-format msgid "" "Some manual association data has be found, which will be lost if the primary" " key is changed. Do you want to switch back to the primary key \"%s\" and " "keep association data?" msgstr "" "Foram encontradas algumas associações manuais que serão perdidas se a chave " "primária for alterada. Você deseja voltar a usar a chame primária \"%s\" e " "manter as associações?" #: ../AMC-gui.pl:3666 #, perl-format msgid "" "The primary key from the students list has been set to \"%s\", which is not " "the value from the association data." msgstr "" "A chave primária da listagem de alunos selecionada é \"%s\", que não é o " "valor associado aos dados." #: ../AMC-gui.pl:3667 msgid "" "Automatic papers/students association will be re-run to update the " "association data." msgstr "" "A associação de alunos/provas será novamente executada para atualizar os " "dados de associações." #: ../AMC-gui.pl:3693 #, perl-format msgid "Papers are not yet corrected: use button \"%s\"." msgstr "As provas ainda não foram corrigidos: use o botão \"%s\"." #. TRANSLATORS: This is a button: "Mark" is here an action to be called by the #. user. When clicking this button, the user requests scores to be computed #. for all students. #: ../AMC-gui.pl:3695 ../AMC-gui-main_window.glade:1363 msgid "Mark" msgstr "Pontuação" #: ../AMC-gui.pl:3736 msgid "Extracting marking scale..." msgstr "Extraindo a escala de pontuação..." #: ../AMC-gui.pl:3940 msgid "Computing marks..." msgstr "Calculando as pontuações..." #: ../AMC-gui.pl:3945 msgid "Grading has been completed" msgstr "A atribuição de notas está concluída." #. TRANSLATORS: This is the marks mean for all students. #: ../AMC-gui.pl:3961 #, perl-format msgid "Mean: %.2f" msgstr "Média: %.2f" #: ../AMC-gui.pl:3964 msgid "No marks computed" msgstr "Nenhuma pontuação foi calculada" #: ../AMC-gui.pl:3983 msgid "Pre-association" msgstr "Pré-associação" #: ../AMC-gui.pl:3997 msgid "No students list file" msgstr "Nenhum arquivo com a lista de alunos" #: ../AMC-gui.pl:3999 msgid "No primary key from students list file" msgstr "O arquivo da lista de alunos não tem uma chave primária" #: ../AMC-gui.pl:4005 #, perl-format msgid "Missing identification for %d answer sheets" msgstr "Identificador ausente para %d folhas de respostas" #: ../AMC-gui.pl:4007 msgid "All completed answer sheets are associated with a student name" msgstr "" "Todas as folhas de respostas preenchidas estão associadas a um nome de " "aluno." #: ../AMC-gui.pl:4061 msgid "exam ID" msgstr "identificação da prova" #: ../AMC-gui.pl:4076 msgid "student" msgstr "aluno" #. TRANSLATORS: File name for single annotated answer sheets with only some #. selected students. Please use simple characters. #: ../AMC-gui.pl:4207 msgid "Selected_students" msgstr "Selected_students" #. TRANSLATORS: File name for single annotated answer sheets with all #. students. Please use simple characters. #: ../AMC-gui.pl:4209 msgid "All_students" msgstr "Todos_os_alunos" #: ../AMC-gui.pl:4257 msgid "Annotating papers..." msgstr "Anotando a correção em cada prova..." #: ../AMC-gui.pl:4261 msgid "Annotations have been completed" msgstr "As anotações de correção estão concluídas" #: ../AMC-gui.pl:4375 #, perl-format msgid "Project \"%s\" preferences" msgstr "Preferências do projeto \"%s\"" #: ../AMC-gui.pl:4378 msgid "Project preferences" msgstr "Preferências do projeto" #: ../AMC-gui.pl:4484 #, perl-format msgid "" "You modified \"%s\" value, which is the default value used when " "creating new projects. Do you want to change also \"%s\" for the " "opened %s project?" msgstr "" "Você alterou o valor \"%s\", que é o valor padrão na criação de novos" " projetos. Você deseja alterar também o valor \"%s\" para o projeto " "%s aberto?" #: ../AMC-gui.pl:4600 msgid "Working documents are not readable" msgstr "Os documentos de trabalho não podem ser lidos" #: ../AMC-gui.pl:4603 msgid "No working documents" msgstr "Não há documentos de trabalho" #: ../AMC-gui.pl:4606 msgid "Working documents last update:" msgstr "Última atualização dos documentos de trabalho:" #: ../AMC-gui.pl:4662 msgid "No layout" msgstr "Nenhum layout" #: ../AMC-gui.pl:4665 #, perl-format msgid "Processed %d pages" msgstr "%d páginas processadas" #: ../AMC-gui.pl:4668 msgid "but some defects were detected." msgstr "mas alguns defeitos foram detectados" #: ../AMC-gui.pl:4680 msgid "" "The \\namefield command is not used. Writing subjects without name field is " "not recommended" msgstr "" "O comando \\namefield não foi usado. Não é recomendado escrever assuntos sem" " o nome do campo" #: ../AMC-gui.pl:4681 msgid "" "The \\namefield command is used several times for the same subject. This " "should not be the case, as each student should write his name only once" msgstr "" "O comando \\namefield está sendo usado diversas vezes para a mesma prova. " "Isso não deveria acontecer, pois cada aluno deve escrever seu nome apenas " "uma vez," #: ../AMC-gui.pl:4682 msgid "No box to be ticked" msgstr "Nenhuma caixa a ser marcada" #: ../AMC-gui.pl:4683 msgid "" "The corner marks and binary boxes are not at the same location on all pages" msgstr "" "As marcas de canto e as caixas binárias não estão todas na mesma localização" " em todas as páginas" #: ../AMC-gui.pl:4684 msgid "" "Some material has been placed out of the page. This is often a result of a " "multiple columns question group starting too close from the page bottom. In " "such a case, use \"needspace\"." msgstr "" "Algum conteúdo foi posicionado fora da página. Frequentemente, isto é o " "resultado de uma questão com múltiplas colunas iniciando muito perto da " "parte de baixo da página. Nesse caso, use \"needspace\"." #: ../AMC-gui.pl:4705 msgid "" "Some potential defects were detected for this subject. Correct them in the " "source and update the working documents." msgstr "" "Alguns defeitos potenciais foram detectados nesta prova. Corrija-os na fonte" " e atualize os documentos de trabalho." #: ../AMC-gui.pl:4711 #, perl-format msgid "(See for example pages %s and %s)" msgstr "(Veja, por exemplo, as páginas %s e %s)" #: ../AMC-gui.pl:4716 #, perl-format msgid "(Concerns %1$d pages, see for example page %2$s)" msgstr "(Referente às páginas%1$d, veja, por exemplo, a página %2$s)" #: ../AMC-gui.pl:4723 #, perl-format msgid "(Concerns %1$d exams, see for example sheet %2$d)" msgstr "(Referente às provas %1$d, veja, por exemplo, a folha %2$d)" #: ../AMC-gui.pl:4840 #, perl-format msgid "Data capture from %d complete papers and %d incomplete papers" msgstr "Digitalização de %d provas completas e %d provas incompletas" #: ../AMC-gui.pl:4844 #, perl-format msgid "Data capture from %d complete papers" msgstr "Captura de dados a partir de %d provas completas" #. TRANSLATORS: this text points out that no data capture has been made yet. #: ../AMC-gui.pl:4849 msgid "No data" msgstr "Sem dados" #: ../AMC-gui.pl:4856 #, perl-format msgid "Overwritten pages: %d" msgstr "Páginas sobrescritas: %d" #: ../AMC-gui.pl:4864 msgid "All scans were properly recognized." msgstr "Todas as digitalizações foram adequadamente reconhecidas." #: ../AMC-gui.pl:4871 #, perl-format msgid "%d scans were not recognized." msgstr "%ddigitalizações não foram reconhecidas. " #. TRANSLATORS: column title for the list of overwritten pages. This refers to #. the page from the question #: ../AMC-gui.pl:4895 msgid "Page" msgstr "Página" #. TRANSLATORS: column title for the list of overwritten pages. This refers to #. the number of times the page has been overwritten. #: ../AMC-gui.pl:4900 msgid "count" msgstr "contagem" #. TRANSLATORS: column title for the list of overwritten pages. This refers to #. the date of the last data capture for the page. #: ../AMC-gui.pl:4905 msgid "Date" msgstr "Data" #: ../AMC-gui.pl:4946 msgid "Looking for analysis..." msgstr "Buscando por análise..." #: ../AMC-gui.pl:4988 msgid "Automatic data capture now completed." msgstr "Captura automática de dados concluída agora." #: ../AMC-gui.pl:4989 #, perl-format msgid "It is not complete (missing pages from %d papers)." msgstr "Não está completo (faltam páginas de %d provas)." #: ../AMC-gui.pl:4990 msgid "" "You can analyse data capture quality with some indicators values in analysis" " list:" msgstr "" "Você pode avaliar a qualidade da captura de dados com alguns indicadores na " "lista de análise:" #: ../AMC-gui.pl:4992 #, perl-format msgid "" "- %s represents positioning gap for the four corner marks. Great " "value means abnormal page distortion." msgstr "" "- %s representa o distanciamento das quatro marcas de canto. Valores " "grande significam uma página anormalmente distorcida." #: ../AMC-gui.pl:4994 #, perl-format msgid "" "- great values of %s are seen when darkness ratio is very close to " "the threshold for some boxes." msgstr "" "- valores grandes de %s são observados a razão claro/escuro é muito " "próxima ao limiar para certas caixas." #: ../AMC-gui.pl:4996 #, perl-format msgid "" "You can also look at the scan adjustment (%s) and ticked and unticked" " boxes (%s) using right-click on lines from table %s." msgstr "" "Você pode visualizar o ajuste da digitalização (%s), bem como as " "caixas marcadas e não-marcadas (%s), clicando com o botão direito do " "mouse nas linhas da tabela %s." #: ../AMC-gui.pl:4996 msgid "Diagnosis" msgstr "Diagnóstico" #: ../AMC-gui.pl:5024 msgid "Pages that miss data capture to complete students sheets:" msgstr "Páginas em que há falta de dados para completar as provas dos alunos:" #: ../AMC-gui.pl:5145 #, perl-format msgid "Error loading scan %s" msgstr "Erro ao carregar a digitalização %s" #: ../AMC-gui.pl:5151 msgid "No scan selected" msgstr "Nenhuma digitalização selecionada" #: ../AMC-gui.pl:5156 msgid "No more unrecognized scans" msgstr "Sem mais digitalizações reconhecidas" #: ../AMC-gui.pl:5234 msgid "Making diagnostic image..." msgstr "Fazendo uma imagem de diagnóstico..." #: ../AMC-gui.pl:5304 msgid "(no description)" msgstr "(sem descrição)" #. TRANSLATORS: This is a column title for the list of files to be included in #. a template being created. #. TRANSLATORS: This is the title of a column containing attachments file #. paths in a table showing all attachments, when sending them to the students #. by email. #: ../AMC-gui.pl:5389 ../AMC-gui.pl:6336 msgid "file" msgstr "arquivo" #: ../AMC-gui.pl:5469 msgid "Add files to template" msgstr "Adicionar arquivos ao modelo" #: ../AMC-gui.pl:5490 msgid "" "When making a template, you can only add files that are within the project " "directory." msgstr "" "Ao construir um modelo, você só pode adicionar arquivos que estejam dentro " "da pasta do projeto." #. TRANSLATORS: This is a column name for the list of available templates, #. when creating a new project based on a template. #: ../AMC-gui.pl:5613 msgid "template" msgstr "modelo" #: ../AMC-gui.pl:5658 msgid "All source files" msgstr "Todos os arquivos fonte" #: ../AMC-gui.pl:5676 #, perl-format msgid "%s files" msgstr "%s arquivos" #: ../AMC-gui.pl:5710 msgid "Archive (zip, tgz)" msgstr "Arquivo comprimido (zip, tgz)" #: ../AMC-gui.pl:5739 #, perl-format msgid "Nothing extracted from archive %s. Check it." msgstr "Nada foi extraído do arquivo %s. Verifique." #: ../AMC-gui.pl:5868 #, perl-format msgid "" "File %s already exists in project directory: do you want to replace it?" msgstr "O arquivo %s já existe na pasta do projeto: você deseja substitui-lo?" #: ../AMC-gui.pl:5869 msgid "" "Click yes to replace it and loose pre-existing contents, or No to cancel " "source file import." msgstr "" "Clique \"sim\" para substituir e perder o conteúdo existente, ou \"não\" " "para cancelar a importação do arquivo fonte." #: ../AMC-gui.pl:5885 msgid "The source file has been copied to project directory." msgstr "O arquivo fonte foi copiado para a pasta do projeto." #: ../AMC-gui.pl:5885 #, perl-format msgid "You can now edit it with button \"%s\" or with any editor." msgstr "Pode agora editar com o botão \"%s\" ou com outro editor." #: ../AMC-gui.pl:5885 ../AMC-gui-main_window.glade:241 msgid "Edit source file" msgstr "Editar o arquivo fonte" #: ../AMC-gui.pl:5893 #, perl-format msgid "Error copying source file: %s" msgstr "Erro ao copiar o arquivo fonte: %s" #: ../AMC-gui.pl:6078 msgid "" "In order to send a useful bug report, please attach the following documents:" msgstr "" "De modo a nos enviar um relatório útil sobre um problema, por favor anexe os" " seguintes documentos:" #: ../AMC-gui.pl:6079 msgid "" "an archive (in some compressed format, like ZIP, 7Z, TGZ...) containing the " "project directory, scan files and configuration " "directory (.AMC.d in home directory), so as to reproduce and analyse " "this problem." msgstr "" "um arquivo (em algum formato compacto como ZIP, 7Z, TGZ...) contendo a " "pasta do projeto, arquivos de digitalização e a pasta de " "configuração (.AMC.d na pasta \"home\"), de forma a reproduzir e " "analisar o problema." #: ../AMC-gui.pl:6080 msgid "" "the log file produced when the debugging mode (in Help menu) is " "checked. Please try to reproduce the bug with this mode activated." msgstr "" "O arquivo de log gerado quando o modo de depuração (no menu \"Help\" " ") está selecionado. Por favor, tente reproduzir o problema com este modo " "habilitado." #: ../AMC-gui.pl:6081 #, perl-format msgid "Bug reports can be filled at %s or sent to the address below." msgstr "" "Relatórios de erros podem ser preenchidos em %s ou enviados para o endereço " "abaixo." #: ../AMC-gui.pl:6082 ../AMC-gui.pl:6086 msgid "AMC community site" msgstr "Site da comunidade AMC" #: ../AMC-gui.pl:6149 msgid "Attach file" msgstr "Anexar arquivo" #: ../AMC-gui.pl:6183 msgid "There are no annotated corrected answer sheets to send." msgstr "Não existem folhas de respostas corrigidas para serem enviadas." #: ../AMC-gui.pl:6186 msgid "" "Please group the annotated sheets to PDF files to be able to send them." msgstr "" "Por favor, agrupe as folhas anotadas em arquivos PDF para que possam ser " "enviadas." #: ../AMC-gui.pl:6187 msgid "" "Please annotate answer sheets and group them to PDF files to be able to send" " them." msgstr "" "Por favor, execute as anotações das folhas de respostas e as agrupe em " "arquivos PDF para que possam ser enviadas." #: ../AMC-gui.pl:6218 #, perl-format msgid "" "Sending emails requires some perl modules that are not installed: %s. Please" " install these modules and try again." msgstr "" "O envio de emails requer alguns módulos \"Perl\" que não estão instalados: " "%s. Por favor, instale-os e tente novamente." #: ../AMC-gui.pl:6239 msgid "" "SMTP security mode \"STARTTLS\" is only available with Email::Sender version" " 1.300027 and over. Please install a newer version of this perl module or " "change SMTP security mode, and try again." msgstr "" "O modo de segurança \"STARTTLS\" do SMTP só está disponível com o " "Email::Sender versão 1.300027 ou posterior. Por favor, instale uma versão " "mais nova deste módulo perl ou altere o modo de segurança do SMTP, e tente " "novamente." #: ../AMC-gui.pl:6255 #, perl-format msgid "The email address you entered (%s) is not correct." msgstr "O endereço de email informado (%s) não está correto." #: ../AMC-gui.pl:6257 msgid "Please edit your preferences to correct your email address." msgstr "" "Por favor, altere as suas preferências para corrigir o endereço de email." #: ../AMC-gui.pl:6259 msgid "You did not enter your email address." msgstr "Não informou um endereço de email." #: ../AMC-gui.pl:6260 msgid "Please edit the preferences to set your email address." msgstr "" "Por favor altere as preferências para definir o seu endereço de email." #: ../AMC-gui.pl:6283 #, perl-format msgid "" "The sendmail program cannot be found at the location you specified in" " the preferences (%s). Please update your configuration." msgstr "" "O programa sendmail não pode ser encontrado na localização indicada " "nas preferencias (%s). Por favor, atualize a configuração." #: ../AMC-gui.pl:6303 msgid "" "No email addresses has been found in the students list file. You need to " "write the students addresses in a column of this file." msgstr "" "Nenhum endereço de email foi encontrado no arquivo com a lista de alunos. " "Você precisa escrever os endereço dos alunos em uma coluna deste arquivo." #. TRANSLATORS: This is the title of a column containing copy numbers in a #. table showing all annotated answer sheets, when sending them to the #. students by email. #: ../AMC-gui.pl:6351 msgid "copy" msgstr "cópia" #. TRANSLATORS: This is the title of a column containing students email #. addresses in a table showing all annotated answer sheets, when sending them #. to the students by email. #: ../AMC-gui.pl:6363 msgid "email" msgstr "email" #. TRANSLATORS: This is the title of a column containing mailing status (not #. sent, already sent, failed) in a table showing all annotated answer sheets, #. when sending them to the students by email. #: ../AMC-gui.pl:6369 msgid "status" msgstr "status" #: ../AMC-gui.pl:6388 msgid "failed" msgstr "falhou" #: ../AMC-gui.pl:6446 msgid "Some files you asked to be attached to the emails are missing:" msgstr "Alguns arquivos que você indicou para anexar ao email estão faltando:" #: ../AMC-gui.pl:6447 msgid "Please create them or remove them from the list of attached files." msgstr "Por favor, crie ou remova-os da lista de arquivos anexadas." #: ../AMC-gui.pl:6499 msgid "Sending emails..." msgstr "Enviando emails..." #: ../AMC-gui.pl:6508 msgid "Cancelled." msgstr "Cancelado." #: ../AMC-gui.pl:6510 msgid "SMTP authentication failed: check SMTP configuration and password." msgstr "" "A autenticação do SMTP falhou: verifique a configuração SMTP e a senha." #: ../AMC-gui.pl:6512 #, perl-format msgid "%d message(s) has been sent." msgstr "%dmensagem(ns) enviada(s)." #: ../AMC-gui.pl:6552 msgid "Set exam name" msgstr "Defina o nome da prova" #: ../AMC-gui.pl:6559 ../AMC-gui-edit_preferences.glade:4154 msgid "Examination name" msgstr "Nome da prova" #: ../AMC-gui.pl:6563 ../AMC-gui-edit_preferences.glade:4165 msgid "Code (short name) for examination" msgstr "Código (nome curto) da prova" #. TRANSLATORS: This is the title of a column containing all columns names #. from the students list file, when choosing which columns has to be exported #. to the spreadsheets. #: ../AMC-gui.pl:6613 msgid "column" msgstr "coluna" #: ../AMC-gui.pl:6621 msgid "" msgstr "" #: ../AMC-gui.pl:6622 msgid "" msgstr "" #: ../AMC-gui.pl:6623 msgid "" msgstr "" #: ../AMC-gui.pl:6657 msgid "Install an AMC plugin" msgstr "Instalar um plugin do AMC" #: ../AMC-gui.pl:6662 msgid "Plugins (zip, tgz)" msgstr "Plugins (zip, tgz)" #: ../AMC-gui.pl:6682 #, perl-format msgid "" "An error occured while trying to extract files from the plugin archive: %s." msgstr "" "Um erro ocorreu ao se tentar extrair arquivos a partir do arquivo de plugin " "%s." #: ../AMC-gui.pl:6696 msgid "Nothing extracted from the plugin archive. Check it." msgstr "Nada foi extraído do arquivo de plugin. Verifique." #: ../AMC-gui.pl:6706 msgid "" "This is not a valid plugin, as it contains more than one directory at the " "first level." msgstr "" "Não é um plugin válido, pois contém mais de uma pasta no primeiro nível." #: ../AMC-gui.pl:6717 msgid "" "This is not a valid plugin, as it does not contain a perl/AMC subdirectory." msgstr "Nâo é um plugin válido, pois não contém uma subpasta perl/AMC." #: ../AMC-gui.pl:6734 #, perl-format msgid "" "A plugin is already installed with the same name (%s). Do you want to delete" " the old one and overwrite?" msgstr "" "Um plugin já está instalado com o mesmo nome (%s). Você deseja apagar o " "antigo e sobrescrevê-lo?" #: ../AMC-gui.pl:6752 #, perl-format msgid "Error while moving the plugin to the user plugin directory: %s" msgstr "Erro ao mover o plugin para a pasta de plugins do usuário: %s" #: ../AMC-gui.pl:6762 msgid "Please restart AMC before using the new plugin..." msgstr "Por favor, reinicie o AMC antes de usar o novo plugin." #: ../AMC-gui.pl:6814 msgid "zooms" msgstr "zooms" #: ../AMC-gui.pl:6815 msgid "" "boxes images are extracted from the scans while processing automatic data " "capture. They can be removed if you don't plan to use the zooms dialog to " "check and correct boxes categorization. They can be recovered processing " "again automatic data capture from the same scans." msgstr "" "imagens das caixas são extraídas das digitalizações durante o processo de " "captura automática de dados. Elas podem ser removidas se você não planeja " "mais usar o diálogo de zooms para verificar e corrigir a categorização das " "caixas. Podem ser recuperadas ao se processar novamente a captura automática" " a partir das mesmas digitalizações." #: ../AMC-gui.pl:6827 msgid "layout reports" msgstr "relatórios de layout" #: ../AMC-gui.pl:6828 msgid "" "these images are intended to show how the corner marks have been recognized " "and positioned on the scans. They can be safely removed once the scans are " "known to be well-recognized. They can be recovered processing again " "automatic data capture from the same scans." msgstr "" "estas imagens têm a intenção de mostrar como as marcas dos cantos foram " "reconhecidas e posicionadas nas digitalizações. Elas podem ser removidas com" " segurança logo que as digitalizações sejam reconhecidas com êxito. Podem " "ser recuperadas ao se processar novamente a captura automática a partir das " "mesmas digitalizações." #: ../AMC-gui.pl:6843 msgid "annotated pages" msgstr "páginas com anotação das correções" #: ../AMC-gui.pl:6844 msgid "" "jpeg annotated pages are made before beeing assembled to PDF annotated " "files. They can safely be removed, and will be recovered automatically the " "next time annotation will be requested." msgstr "" "páginas anotadas em jpeg são criadas antes de serem reunidas em arquivos PDF" " anotados. Elas podem ser removidas de forma segura, e serão recuperadas da " "próxima vez em que a anotação seja solicitada." #: ../AMC-gui.pl:6874 msgid "Total size of concerned files:" msgstr "Tamanho total dos arquivos em questão:" #: ../AMC-gui.pl:6923 #, perl-format msgid "%s files were removed." msgstr "%s arquivos serão removidos." #: ../AMC-gui.pl:6949 #, perl-format msgid "I don't find the command %s." msgstr "Não encontrei o comando %s." #: ../AMC-gui.pl:6950 msgid "Perhaps LaTeX is not installed?" msgstr "Porventura o LaTeX está instalado?" #. TRANSLATORS: Do not translate 'auto-multiple-choice latex-link', which is a #. command to be typed on MacOsX #: ../AMC-gui.pl:6954 msgid "" "The style file automultiplechoice.sty seems to be unreachable. Try to use " "command 'auto-multiple-choice latex-link' as root to fix this." msgstr "" "O arquivo de estilo automultiplechoice.sty parece estar inacessível. Tente " "usar o comando 'auto-multiple-choice latex-link' como usuário \"root\" para " "resolver este problema." #: ../AMC-prepare.pl:274 #, perl-format msgid "%d/%d good answers not coherent for a simple question" msgstr "" "%d/%d de respostas corretas não estão coerentes no contexto de uma questão " "simples." #: ../AMC-prepare.pl:357 #, perl-format msgid "question ID used several times for the same paper: \"%s\"" msgstr "identificador de questão usado várias vezes na mesma folha: \"%s\"" #: ../AMC-prepare.pl:444 #, perl-format msgid "" "An answer appears to be given outside a question environment, after question" " \"%s\"" msgstr "" "Uma resposta parece ter sido dada fora do ambiente de uma questão, após a " "questão \"%s\"." #: ../AMC-prepare.pl:453 #, perl-format msgid "Answer number ID used several times for the same question: %s" msgstr "" "Número identificador de resposta usado várias vezes para a mesma questão: %s" #: ../AMC-prepare.pl:708 #, perl-format msgid "%d errors during LaTeX compiling" msgstr "%d erros durante a compilação LaTeX" #: ../AMC-prepare.pl:768 #, perl-format msgid "" "LaTeX command configured is not present (%s). Install it or change " "configuration, and then rerun." msgstr "" "Comando LaTeX configurado não encontrado (%s). Instale-o ou mude a " "configuração e execute novamente." #: ../AMC-prepare.pl:797 msgid "solution" msgstr "solução" #: ../AMC-prepare.pl:812 msgid "catalog" msgstr "catálogo" #: ../AMC-prepare.pl:845 msgid "question sheet" msgstr "Folha de questões" #: ../AMC-prepare.pl:873 #, perl-format msgid "" "please remove accentuated or non-standard characters from the following " "question ID: \"%s\"" msgstr "" "por favor, remova as letras acentuadas ou letras não-padrão do seguinte " "identificador de questão: \"%s\"" #: ../AMC-prepare.pl:875 msgid "" "some question IDs seems to have accentuated or non-standard characters. This" " may break future processings." msgstr "" "alguns ID de questões parecem ter letras com acentuação ou caracteres não " "padrão." #: ../AMC-read-pdfform.pl:136 msgid "Reading PDF forms..." msgstr "Lendo os formulários PDF..." #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:592 msgid "Name [name column title in exported spreadsheet]" msgstr "Nome" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:594 msgid "Mark [mark column title in exported spreadsheet]" msgstr "Pontuação" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:596 msgid "Exam [exam number column title in exported spreadsheet]" msgstr "Prova" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:598 msgid "Score [total score column title in exported spreadsheet]" msgstr "Score" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:600 msgid "Max [maximum score column title in exported spreadsheet]" msgstr "Máx" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:604 msgid "max [maximum score row name in exported spreadsheet]" msgstr "máx" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:606 msgid "mean [means of scores row name in exported spreadsheet]" msgstr "média" #. TRANSLATORS: This is the default text to be written on the top of the first #. page of each paper when annotating. From this string, %s will be replaced #. with the student final mark, %m with the maximum mark he can obtain, %S #. with the student total score, and %M with the maximum score the student can #. obtain. #: ../AMC-perl/AMC/Config.pm:319 msgid "Mark: %s/%m (total score: %S/%M)" msgstr "Nota: %s/%m (score total: %S/%M)" #. TRANSLATORS: Subject of the emails which can be sent to the students to #. give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:344 msgid "Exam result" msgstr "Resultado da prova" #. TRANSLATORS: Body text of the emails which can be sent to the students to #. give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:346 msgid "" "Please find enclosed your annotated completed answer sheet.\n" "Regards." msgstr "" "Segue, em anexo, a sua prova corrigida.\n" "Atenciosamente." #. TRANSLATORS: Message (first part) when some of the commands that are given #. in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:598 msgid "Some commands allowing to open documents can't be found:" msgstr "Alguns comandos que permitem abrir documentos não foram encontrados:" #. TRANSLATORS: Message (second part) when some of the commands that are given #. in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:601 msgid "Please check its correct spelling and install missing software." msgstr "Por favor, verifique a ortografia e instale o software faltante." #. TRANSLATORS: Message (third part) when some of the commands that are given #. in the preferences cannot be found. The %s will be replaced with the name #. of the menu entry "Preferences" and the name of the menu "Edit". #: ../AMC-perl/AMC/Config.pm:603 #, perl-format msgid "You can change used commands following %s from menu %s." msgstr "" "Você pode alterar os comandos utilizados indo em %s no menu " "%s." #. TRANSLATORS: "Preferences" menu #: ../AMC-perl/AMC/Config.pm:605 ../AMC-gui-main_window.glade:2706 msgid "Preferences" msgstr "Preferências" #. TRANSLATORS: "Edit" menu #: ../AMC-perl/AMC/Config.pm:607 msgid "Edit" msgstr "Edição" #. TRANSLATORS: Error writing one of the configuration files (global or #. project). The first %s will be replaced with the path of that file, and the #. second with the error text. #: ../AMC-perl/AMC/Config.pm:841 #, perl-format msgid "Error writing configuration file %s: %s" msgstr "Erro ao escrever arquivo de configuração %s: %s" #: ../AMC-perl/AMC/DataModule/association.pm:103 msgid "Fetching association results from old format XML files..." msgstr "" "Buscando resultados de associação a partir de arquivos XML em formatos " "antigos..." #: ../AMC-perl/AMC/DataModule/capture.pm:210 msgid "Including zooms in the database..." msgstr "Incluindo os zooms na base de dados..." #: ../AMC-perl/AMC/DataModule/capture.pm:229 #: ../AMC-perl/AMC/DataModule/capture.pm:237 msgid "Building capture database indexes..." msgstr "Construindo os índices das bases de dados..." #: ../AMC-perl/AMC/DataModule/capture.pm:279 msgid "Fetching data capture results from old format XML files..." msgstr "" "Buscando resultados de captura de dados a partir de arquivos XML em formatos" " antigos..." #: ../AMC-perl/AMC/DataModule/layout.pm:222 msgid "Building layout database indexes..." msgstr "Construindo os índices das bases de dados de layouts..." #: ../AMC-perl/AMC/DataModule/layout.pm:288 msgid "Fetching layout data from old format XML files..." msgstr "" "Buscando resultados de layout a partir de arquivos XML em formatos " "antigos..." #: ../AMC-perl/AMC/DataModule/scoring.pm:256 msgid "Fetching scoring data from old format XML files..." msgstr "" "Buscando dados de scores a partir de arquivos XML em formatos antigos..." #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the total number of sheets. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:236 msgid "ALL" msgstr "TODAS" #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the number of sheets for which the question did not get an answer. Please #. let this label short. #: ../AMC-perl/AMC/Export/ods.pm:238 msgid "NA" msgstr "NA" #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the number of sheets for which the question got an invalid answer. Please #. let this label short. #: ../AMC-perl/AMC/Export/ods.pm:240 msgid "INVALID" msgstr "INVÁLIDA" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains the reference of the boxes. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:268 msgid "Box" msgstr "Caixa" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains the number of items (ticked boxes, or invalid or empty questions). #. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:271 msgid "Nb" msgstr "Nb" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains percentage of questions for which the corresponding box is ticked #. over all questions. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:274 msgid "/all" msgstr "/all" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains percentage of questions for which the corresponding box is ticked #. over the expressed questions (counting only questions that did not get #. empty or invalid answers). Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:277 msgid "/expr" msgstr "/expr" #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the number of sheets for which the question got the "none of the above are #. correct" answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:305 msgid "NONE" msgstr "NENHUMA" #. TRANSLATORS: table name in the exported ODS spreadsheet for the table that #. contains the marks. #: ../AMC-perl/AMC/Export/ods.pm:883 ../AMC-perl/AMC/Gui/Notes.glade:8 msgid "Marks" msgstr "Pontuação" #. TRANSLATORS: Label of the table with questions basic statistics in the #. exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1310 msgid "Questions statistics" msgstr "Estatísticas das questões" #. TRANSLATORS: Label of the table with indicative questions basic statistics #. in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1317 msgid "Indicative questions statistics" msgstr "Estatísticas das questões indicativas" #. TRANSLATORS: Label of the table with a legend (explaination of the colors #. used) in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1327 ../AMC-perl/AMC/Export/ods.pm:1331 msgid "Legend" msgstr "Legenda" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that have not been asked to some students. #: ../AMC-perl/AMC/Export/ods.pm:1337 msgid "Non applicable" msgstr "Não aplicável" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that have not been answered. #: ../AMC-perl/AMC/Export/ods.pm:1341 msgid "No answer" msgstr "Nenhuma resposta" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that have not been answered, but are cancelled by the use #. of allowempty scoring strategy. #: ../AMC-perl/AMC/Export/ods.pm:1345 msgid "Cancelled" msgstr "Cancelada" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1349 msgid "Invalid answer" msgstr "Resposta inválida" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1354 msgid "Correct answer" msgstr "Resposta correta" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1358 msgid "Wrong answer" msgstr "Resposta errada" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the indicative questions. #: ../AMC-perl/AMC/Export/ods.pm:1363 msgid "Indicative" msgstr "Indicativa" #: ../AMC-perl/AMC/Export/ods.pm:1391 msgid "" "An old state of the exported file seems to be already opened. Use " "File/Reload from OpenOffice/LibreOffice to refresh." msgstr "" "Um antigo estado do arquivo exportado parece já estar aberto. Use " "Arquivo/Recarregar no OpenOffice/LibreOffice para atualizar." #: ../AMC-perl/AMC/Filter/plain.pm:92 msgid "" "Please code your student number opposite, and write your name in the box " "below." msgstr "" "Por favor, codifique sua matrícula ao lado, e escreva seu nome na caixa " "abaixo." #. TRANSLATORS: Message when the Pages option used in AMC-TXT can't be parsed. #. %s will be replaced with the option value #: ../AMC-perl/AMC/Filter/plain.pm:209 #, perl-format msgid "Pages option value can't be understood: %s" msgstr "O valor da opção \"Páginas\" não pode ser entendido: %s" #: ../AMC-perl/AMC/Filter/plain.pm:238 #, perl-format msgid "Line %d" msgstr "Linha %d" #. TRANSLATORS: Error text for AMC-TXT parsing, when opening a new question #. whereas the previous question has less than two choices #: ../AMC-perl/AMC/Filter/plain.pm:249 msgid "Previous question has less than two choices" msgstr "A questão anterior tem menos de duas escolhas" #. TRANSLATORS: Error text for AMC-TXT parsing #: ../AMC-perl/AMC/Filter/plain.pm:258 #, perl-format msgid "Previous question is a simple question but has %d correct choice(s)" msgstr "" "A questão anterior é uma questão simples, mas tem %d opções correta(s)" #: ../AMC-perl/AMC/Filter/plain.pm:342 msgid "" "Invalid encoding: you must use UTF-8, but your source file was saved using " "another encoding" msgstr "" "Codificação de fonte inválida: você deve usar UTF-8, mas o seu arquivo fonte" " foi gravado em outra codificação." #: ../AMC-perl/AMC/Filter/plain.pm:368 #, perl-format msgid "File not found: %s" msgstr "Arquivo não encontrado: %s" #. TRANSLATORS: Error text for AMC-TXT parsing, when an unknown option is #. given a value #: ../AMC-perl/AMC/Filter/plain.pm:386 #, perl-format msgid "Unknown option: %s" msgstr "Opção desconhecida: %s" #. TRANSLATORS: Error text for AMC-TXT parsing when a choice is given but no #. question were opened #: ../AMC-perl/AMC/Filter/plain.pm:456 msgid "Choice outside question" msgstr "Opção fora da questão" #: ../AMC-perl/AMC/Filter/plain.pm:1240 #, perl-format msgid "" "The following fonts does not seem to be installed on the system: %s." msgstr "" "As seguintes fontes não parecem estar instaladas no seu sistema: %s." #: ../AMC-perl/AMC/Filter/register.pm:78 msgid "No description available." msgstr "Sem descrição disponível." #: ../AMC-perl/AMC/Gui/Association.pm:133 msgid "" "Names images not found... Maybe you forgot using \\namefield command in " "LaTeX source?" msgstr "" "Imagens com os nomes não foram encontradas...Porventura você se esqueceu de " "usar o comando \\namefield na fonte LaTeX?" #: ../AMC-perl/AMC/Gui/Association.pm:690 msgid "Sheet" msgstr "Folha" #: ../AMC-perl/AMC/Gui/Association.pm:728 msgid "End" msgstr "Fim" #: ../AMC-perl/AMC/Gui/Manuel.pm:117 msgid "Page layout" msgstr "Layout de página" #: ../AMC-perl/AMC/Gui/Manuel.pm:125 msgid "Original" msgstr "Original" #: ../AMC-perl/AMC/Gui/Manuel.pm:126 ../AMC-gui-edit_preferences.glade:2138 msgid "Scan" msgstr "Digitalização" #. TRANSLATORS: This is one of the choices for pages navigation in manual data #. capture window. Here, navigation goes through all pages. Please keep this #. text very short (say less than 5 letters) so that the window is not too #. large #: ../AMC-perl/AMC/Gui/Manuel.pm:130 ../AMC-perl/AMC/Gui/Manuel.pm:146 msgid "all" msgstr "tudo" #. TRANSLATORS: This is one of the choices for pages navigation in manual data #. capture window. Here, navigation goes through pages with some invalid #. answers. Please keep this text very short (say less than 5 letters) so that #. the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:132 msgid "inv" msgstr "inv" #. TRANSLATORS: This is one of the choices for pages navigation in manual data #. capture window. Here, navigation goes through pages with empty or invalid #. answers. Please keep this text very short (say less than 5 letters) so that #. the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:134 msgid "i&e" msgstr "i&e" #: ../AMC-perl/AMC/Gui/Manuel.pm:184 msgid "page" msgstr "página" #: ../AMC-perl/AMC/Gui/Manuel.pm:531 #, perl-format msgid "" "This is a template exam that you cannot edit. To create a new exam from this" " one to be edited, use the '%s' button." msgstr "" "Esta é uma prova modelo que você não pode editar. Para criar uma nova prova " "a partir desta para ser editada, use o botão '%s'." #: ../AMC-perl/AMC/Gui/Manuel.pm:531 ../AMC-perl/AMC/Gui/Manuel.glade:406 msgid "Add photocopy" msgstr "Adicionar fotocópia" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms #. window #: ../AMC-perl/AMC/Gui/Zooms.pm:76 msgid "drag and drop" msgstr "arrastar e soltar" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms #. window #: ../AMC-perl/AMC/Gui/Zooms.pm:78 msgid "click" msgstr "clique" #: ../AMC-perl/AMC/Gui/Zooms.pm:126 ../AMC-perl/AMC/Gui/Zooms.pm:413 #, perl-format msgid "Boxes zooms for page %s" msgstr "Zooms das caixas para as páginas %s" #: ../AMC-perl/AMC/Gui/Zooms.pm:402 ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "" "You moved some boxes to correct automatic data query, but this work is not " "saved yet." msgstr "" "Você moveu algumas caixas para corrigir alguns reconhecimentos automáticos, " "mas essas alterações ainda não foram salvas." #: ../AMC-perl/AMC/Gui/Zooms.pm:402 msgid "" "Do you want to save these modifications before looking at another page?" msgstr "" "Você deseja gravar estas modificações antes de visualizar outra página?" #: ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "Dou you really want to close and ignore these modifications?" msgstr "Você realmente deseja fechar e ignorar essas modificações?" #: ../AMC-perl/AMC/Print/cups.pm:71 #, perl-format msgid "Perl module(s) missing: %s" msgstr "Módulo(s) perl faltante(s): %s" #: ../AMC-perl/AMC/Print/cupslp.pm:47 #, perl-format msgid "The following commands are missing: %s." msgstr "Os seguintes comandos estão faltando: %s." #: ../AMC-perl/AMC/Export/register/CSV.pm:70 msgid "Separator" msgstr "Separador" #: ../AMC-perl/AMC/Export/register/CSV.pm:83 msgid "Ticked boxes" msgstr "Caixas marcadas" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'No, don't group questions by scope in the exported ODS #. file' #: ../AMC-perl/AMC/Export/register/CSV.pm:89 #: ../AMC-perl/AMC/Export/register/ods.pm:124 msgid "No" msgstr "Não" #: ../AMC-perl/AMC/Export/register/CSV.pm:90 #: ../AMC-perl/AMC/Export/register/CSV.pm:91 msgid "Yes:" msgstr "Sim:" #: ../AMC-perl/AMC/Export/register/CSV.pm:97 #: ../AMC-perl/AMC/Export/register/ods.pm:152 msgid "Choose columns" msgstr "Escolher colunas" #. TRANSLATORS: List of students with their scores: one of the export formats. #: ../AMC-perl/AMC/Export/register/List.pm:37 msgid "PDF list" msgstr "Lista de PDFs" #: ../AMC-perl/AMC/Export/register/List.pm:64 msgid "Number of columns" msgstr "Número de colunas" #: ../AMC-perl/AMC/Export/register/List.pm:67 msgid "Long list is divided into this number of columns on each page." msgstr "A longa lista foi dividida neste número de colunas em cada página." #: ../AMC-perl/AMC/Export/register/List.pm:71 msgid "Paper size" msgstr "Tamanho do papel" #. TRANSLATORS: Check button label in the exports tab. If checked, a table #. with questions basic statistics will be added to the ODS exported #. spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:82 msgid "Stats table" msgstr "Tabela de estatísticas" #. TRANSLATORS: Menu to export statistics table in the exports tab. The first #. menu entry means 'do not build a stats table' in the exported ODS file. You #. can omit the [...] part, that is here only to state the context. #: ../AMC-perl/AMC/Export/register/ods.pm:89 msgid "None [no stats table to export]" msgstr "Nenhum" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second #. menu entry means 'build a stats table, with a horizontal flow' in the #. exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:91 #: ../AMC-perl/AMC/Export/register/ods.pm:106 msgid "Horizontal flow" msgstr "Fluxo horizontal" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second #. menu entry means 'build a stats table, with a vertical flow' in the #. exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:93 #: ../AMC-perl/AMC/Export/register/ods.pm:107 msgid "Vertical flow" msgstr "Fluxo vertical" #. TRANSLATORS: Check button label in the exports tab. If checked, a table #. with indicative questions basic statistics will be added to the ODS #. exported spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:99 msgid "Indicative stats table" msgstr "Estatísticas de questões indicativas" #: ../AMC-perl/AMC/Export/register/ods.pm:105 msgid "None" msgstr "Nenhum" #: ../AMC-perl/AMC/Export/register/ods.pm:110 msgid "" "Create a table with basic statistics about answers for each indicative " "question?" msgstr "" "Criar uma tabela com estatísticas básicas sobre as respostas para cada " "questão indicativa?" #. TRANSLATORS: Check button label in the exports tab. If checked, sums of the #. scores for groups of questions will be added to the exported table. #: ../AMC-perl/AMC/Export/register/ods.pm:114 msgid "Score groups" msgstr "Grupos de score" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'Yes, group questions by scope in the exported ODS file, and #. report total scores' #: ../AMC-perl/AMC/Export/register/ods.pm:126 msgid "Yes (values)" msgstr "Sim (valores)" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'Yes, group questions by scope in the exported ODS file, and #. report total scores as percentages.' #: ../AMC-perl/AMC/Export/register/ods.pm:128 msgid "Yes (percentages)" msgstr "Sim (percentuais)" #: ../AMC-perl/AMC/Export/register/ods.pm:131 msgid "Add sums of the scores for each question group?" msgstr "Adicionar as somas dos scores para cada grupo de questões?" #: ../AMC-perl/AMC/Export/register/ods.pm:134 msgid "with scope separator" msgstr "com separador de escopo" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'No, don't group questions by scope in the exported ODS #. file' #: ../AMC-perl/AMC/Export/register/ods.pm:141 msgid "':'" msgstr "':'" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'Yes, group questions by scope in the exported ODS file, and #. you can detect the scope from a question ID using the text before the #. separator .' #: ../AMC-perl/AMC/Export/register/ods.pm:143 msgid "'.'" msgstr "'.'" #: ../AMC-perl/AMC/Export/register/ods.pm:146 msgid "" "To define groups, use question ids in the form \"group:question\" or " "\"group.question\", depending on the scope separator." msgstr "" "Para definir grupos, use os identificadores de questões na forma " "\"group:question\" ou \"group.question\", dependendo do separador de escopo." #: ../AMC-perl/AMC/Filter/register/latex.pm:54 msgid "" "This is the native format for AMC. LaTeX is not so easy to use for unexperienced users, but the LaTeX power allows the user to build any multiple choice subject. As an example, the following is possible with LaTeX but not with other formats:\n" "* any kind of layout,\n" "* questions with random numerical values,\n" "* use of figures, mathematical formulas\n" "* and much more!" msgstr "" "Este é o o formato nativo para o AMC. A linguagem LaTeX não é assim tão simples para usuários iniciantes, mas o poder do LaTeX permite que o autor faça exercícios de escolha múltipla sobre qualquer tema. Como exemplo, o seguinte é possível em LaTeX mas não em outros formatos:\n" "* definir qualquer formato de página,\n" "* questões com parâmetros aleatórios,\n" "* utilização de figuras, fórmulas matemáticas\n" "* e muito mais!" #: ../AMC-perl/AMC/Filter/register/plain.pm:51 msgid "" "This is a plain text format for easy question writting. See the following minimal example:\n" "\n" "Title: Paper title\n" "\n" "* Which is the capital city of Cameroon?\n" "+ Yaounde\n" "- Douala\n" "- Kribi" msgstr "" "Este é um formato texto para a fácil criação de questões. Veja este simples exemplo:\n" "\n" "Título: título do artigo\n" "* Qual é a capital dos Camarões?\n" "+ Yaunde\n" "- Douala\n" "-Kribi" #: ../AMC-gui-apropos.glade:8 msgid "AMC A propos" msgstr "AMC Uma proposta" #: ../AMC-gui-apropos.glade:17 msgid "" "Copyright (C) 2008-2018\n" "Alexis Bienvenüe and the AMC development team" msgstr "" "Copyright (C) 2008-2018\n" "Alexis Bienvenüe e a equipe de desenvolvimento AMC" #: ../AMC-gui-apropos.glade:19 msgid "Automatic multiple choice questionnaires management" msgstr "Gerenciamento automático de questionários de múltipla escolha" #: ../AMC-gui-apropos.glade:21 msgid "Visit the AMC website" msgstr "Visite o website do AMC" #: ../AMC-gui-choix_pages_impression.glade:33 msgid "Papers printing" msgstr "Impressão de provas" #: ../AMC-gui-choix_pages_impression.glade:98 msgid "Please select papers you wish to print:" msgstr "Por favor, selecione as provas que deseja imprimir" #: ../AMC-gui-choix_pages_impression.glade:116 msgid "Select papers you wish to print (ctrl-a for all), then confirm..." msgstr "" "Selecione as páginas que deseja imprimir (ctrl-a para todas), depois " "confirme..." #: ../AMC-gui-choix_pages_impression.glade:144 msgid "Answer sheet printing" msgstr "Impressão de folhas de respostas" #: ../AMC-gui-choix_pages_impression.glade:190 msgid "Printer:" msgstr "Impressora:" #: ../AMC-gui-choix_pages_impression.glade:243 msgid "two-side printing" msgstr "impressão frente e verso" #: ../AMC-gui-choix_pages_impression.glade:319 msgid "printing options" msgstr "opções de impressão" #: ../AMC-gui-choix_pages_impression.glade:343 msgid "Destination directory" msgstr "Pasta destino" #: ../AMC-gui-choix_pages_impression.glade:356 msgid "Select destination directory for printable files" msgstr "Selecione a pasta destino para os arquivos a ser impressos" #: ../AMC-gui-choix_postcorrect.glade:20 msgid "Post-correction" msgstr "Pós-correção" #: ../AMC-gui-choix_postcorrect.glade:95 msgid "" "Please enter the teacher score sheet number and copy number to get the " "correct answers from:" msgstr "" "Por favor, informe o número da folha de scores do professor e o número da " "cópia onde estão as respostas corretas:" #: ../AMC-gui-choix_postcorrect.glade:189 msgid "Guess simple/multiple status" msgstr "Supor o status simples/múltiplo" #: ../AMC-gui-choix_postcorrect.glade:194 msgid "" "Sets type of all questions for which 2 or more answers are ticked on the " "teacher answer sheet to multiple" msgstr "" "Ativa o tipo de questão para múltipla quando duas ou mais respostas são " "marcadas na folha de respostas do professor" #: ../AMC-gui-choix_projet.glade:18 msgid "Open a MC project" msgstr "Abrir um projeto MC" #: ../AMC-gui-choix_projet.glade:61 ../AMC-gui-liste_dialog.glade:91 msgid "Cancel" msgstr "Cancelar" #: ../AMC-gui-choix_projet.glade:104 ../AMC-gui-main_window.glade:2665 msgid "New project" msgstr "Novo projeto" #: ../AMC-gui-choix_projet.glade:163 msgid "Rename" msgstr "Renomear" #: ../AMC-gui-choix_projet.glade:182 msgid "Clone" msgstr "Clonar" #: ../AMC-gui-choix_projet.glade:278 msgid "Open an existing MC project:" msgstr "Abrir um projeto MC existente" #: ../AMC-gui-choix_projet.glade:345 msgid "Create an new project:" msgstr "Criar um novo projeto" #: ../AMC-gui-choix_projet.glade:364 msgid "Project name:" msgstr "Nome do projeto:" #: ../AMC-gui-choix_projet.glade:398 msgid "" "Note : a project name can only contain alphanumeric characters, plus " "some simple characters (-_+.:)." msgstr "" "Nota: o nome de projeto pode conter apenas símbolos alfanuméricos, " "além de alguns caracteres simples (-_+.:)." #: ../AMC-gui-choose-mode.glade:10 msgid "" "Before starting data capture, please choose the mode corresponding to what " "you did with the printed questions." msgstr "" "Antes de começar a captura de dados, por favor escolha o modo correspondente" " ao modo escolhido para impressão das questões." #: ../AMC-gui-choose_columns.glade:8 msgid "Choose columns to export" msgstr "Escolher colunas a exportar" #: ../AMC-gui-choose_columns.glade:65 msgid "Order and select the columns to include in the exported file:" msgstr "" "Ordenar e selecionar as colunas a serem incluídas no arquivo de exportação:" #: ../AMC-gui-choose_students.glade:13 msgid "Choose students" msgstr "Escolher alunos" #: ../AMC-gui-choose_students.glade:70 msgid "Select the students for which you want to annotate the score sheet:" msgstr "Escolha os alunos cujas folhas de scores você deseja anotar:" #: ../AMC-gui-choose_students.glade:114 msgid "Search:" msgstr "Pesquisar:" #: ../AMC-gui-cleanup.glade:13 ../AMC-gui-main_window.glade:2939 msgid "Cleanup" msgstr "Limpar" #: ../AMC-gui-cleanup.glade:40 msgid "Remove selected files" msgstr "Remover arquivos selecionados" #: ../AMC-gui-cleanup.glade:71 msgid "" "To save disk space, you can remove some intermediate files from your project" " directory." msgstr "" "Para poupar espaço em disco, você pode remover arquivos intermediários da " "sua pasta de projeto." #: ../AMC-gui-edit_preferences.glade:230 ../AMC-gui-edit_preferences.glade:243 msgid "LaTeX models directory" msgstr "Pasta de modelos LaTeX" #: ../AMC-gui-edit_preferences.glade:232 msgid "" "Please select a directory containing LaTeX models for AMC, with their " "descriptions" msgstr "" "Por favor, selecione uma pasta contendo os modelos LaTeX para o AMC, com as " "suas descrições" #: ../AMC-gui-edit_preferences.glade:255 msgid "" "Projects directory. May be modified only if there are no opened projects." msgstr "" "Pasta de projetos. Pode ser modificada apenas se não houver projetos " "abertos." #: ../AMC-gui-edit_preferences.glade:257 msgid "Please select the projects directory" msgstr "Por favor, selecione a pasta de projetos" #: ../AMC-gui-edit_preferences.glade:268 msgid "Projects directory" msgstr "Pasta de projetos" #: ../AMC-gui-edit_preferences.glade:283 msgid "Directories" msgstr "Pastas" #: ../AMC-gui-edit_preferences.glade:315 msgid "PDF files" msgstr "Arquivos PDF" #: ../AMC-gui-edit_preferences.glade:326 msgid "Images" msgstr "Imagens" #: ../AMC-gui-edit_preferences.glade:337 msgid "CSV data files" msgstr "Arquivos de dados CSV" #: ../AMC-gui-edit_preferences.glade:348 msgid "OpenOffice files" msgstr "Arquivos OpenOffice" #: ../AMC-gui-edit_preferences.glade:359 msgid "XML files" msgstr "Arquivos XML" #: ../AMC-gui-edit_preferences.glade:370 msgid "Command to edit LaTeX files" msgstr "Comando para editar os arquivos LaTeX" #: ../AMC-gui-edit_preferences.glade:371 msgid "LaTeX editor" msgstr "Editor LaTeX" #: ../AMC-gui-edit_preferences.glade:382 msgid "Plain text editor" msgstr "Editor de texto simples" #: ../AMC-gui-edit_preferences.glade:393 msgid "" "Command for directory browsing (string %d will be replaced by the directory " "path before execution)" msgstr "" "Comando para navegar nas pastas (antes da execução, a string %d será " "substituída pelo caminho para a pasta)" #: ../AMC-gui-edit_preferences.glade:394 msgid "File browser" msgstr "Navegador de arquivos" #: ../AMC-gui-edit_preferences.glade:405 msgid "Web browser" msgstr "Navegador web" #: ../AMC-gui-edit_preferences.glade:534 msgid "Visualisation commands" msgstr "Comandos para visualização" #: ../AMC-gui-edit_preferences.glade:565 msgid "Default LaTeX engine" msgstr "LaTeX engine padrão" #: ../AMC-gui-edit_preferences.glade:576 msgid "" "Default command to compile LaTeX file and make PDF, PS or DVI output (may be" " changed for each project)." msgstr "" "Comando padrão para compilar o arquivo LaTeX e gerar saída em PDF, PS ou DVI" " (pode ser alterado para cada projeto)." #: ../AMC-gui-edit_preferences.glade:599 msgid "External programs" msgstr "Programas externos" #: ../AMC-gui-edit_preferences.glade:631 #: ../AMC-gui-edit_preferences.glade:4238 msgid "Students list charset" msgstr "Conjunto de caracteres da lista de alunos" #: ../AMC-gui-edit_preferences.glade:642 msgid "CSV charset" msgstr "Conjunto de caracteres do CSV" #: ../AMC-gui-edit_preferences.glade:653 msgctxt "" "option name. Refers to a list of headers that may contain surnames in the " "CSV names list" msgid "CSV surname headers" msgstr "Cabeçalhos de sobrenomes no CSV" #: ../AMC-gui-edit_preferences.glade:664 msgctxt "" "option name. Refers to a list of headers that may contain names in the CSV " "names list." msgid "CSV name headers" msgstr "Cabeçalhos de nomes no CSV" #: ../AMC-gui-edit_preferences.glade:675 msgid "LaTeX files charset" msgstr "Conjunto de caracteres dos arquivos LaTeX" #: ../AMC-gui-edit_preferences.glade:686 msgid "Default encoding for the students list file." msgstr "Codificação padrão para o arquivo com a lista de alunos" #: ../AMC-gui-edit_preferences.glade:705 msgid "Default charset for AMC CSV output." msgstr "Conjunto de caracteres padrão para a saída CSV do AMC" #: ../AMC-gui-edit_preferences.glade:724 msgid "" "Comma separated list of CSV headers of columns that may contain the surnames" " of the students in the names list file." msgstr "" "Lista separada por vírgulas com os cabeçalhos CSV das colunas que podem " "conter os sobrenomes no arquivo com lista de alunos." #: ../AMC-gui-edit_preferences.glade:738 msgid "" "Comma separated list of CSV headers of columns that may contain the names of" " the students in the names list file." msgstr "" "Lista separada por vírgulas com os cabeçalhos CSV das colunas que podem " "conter os nomes no arquivo com lista de alunos." #: ../AMC-gui-edit_preferences.glade:752 msgid "Charset used when producing LaTeX files from models." msgstr "" "Conjunto de caracteres utilizado ao gerar arquivos LaTeX a partir de modelos" #: ../AMC-gui-edit_preferences.glade:769 msgid "Decimal delimiter" msgstr "Delimitador decimal" #: ../AMC-gui-edit_preferences.glade:797 msgid "ASCII filenames" msgstr "Nomes de arquivos ASCII" #: ../AMC-gui-edit_preferences.glade:809 msgid "" "Force all annotated completed student sheets to have only ASCII characters " "in their file names. When set, all non-ASCII characters will be replaced by " "underscores." msgstr "" "Forçar todas as folhas completas anotadas a terem carateres ASCII nos nomes " "de arquivos. Quando ativado, todas os caracteres não ASCII serão " "substituídas por \"underscores\"." #: ../AMC-gui-edit_preferences.glade:821 msgid "Accept non-ASCII project names" msgstr "Aceitar nomes de projetos não-ASCII" #: ../AMC-gui-edit_preferences.glade:848 msgid "Internationalization" msgstr "Internacionalização" #: ../AMC-gui-edit_preferences.glade:880 msgid "Printing method" msgstr "Método de impressão" #: ../AMC-gui-edit_preferences.glade:891 msgid "Printing command" msgstr "Comando de impressão" #: ../AMC-gui-edit_preferences.glade:913 msgid "Useful printing options" msgstr "Opções de impressão úteis" #: ../AMC-gui-edit_preferences.glade:941 msgid "" "Command to print one paper (with stapling). String %f will be replaced by " "the PDF file to be printed." msgstr "" "Comando para imprimir uma folha (com grampos). A string %f será substituída " "pelo arquivo PDF a ser impresso." #: ../AMC-gui-edit_preferences.glade:984 msgid "Printing" msgstr "Imprimindo" #: ../AMC-gui-edit_preferences.glade:1016 msgid "Number of processes" msgstr "Número de processos" #: ../AMC-gui-edit_preferences.glade:1027 msgid "" "Number of processes to be run in parallel. Default value is 0, which allows " "to start as many processes as processors." msgstr "" "Número de processos a serem executados em paralelo. Por padrão é 0, o que " "permite iniciar tantos processos quantos forem os processadores." #: ../AMC-gui-edit_preferences.glade:1044 msgid "System" msgstr "Sistema" #: ../AMC-gui-edit_preferences.glade:1065 msgid "Main" msgstr "Principal" #: ../AMC-gui-edit_preferences.glade:1094 ../AMC-gui-main_window.glade:2771 msgid "Solution" msgstr "Solução" #: ../AMC-gui-edit_preferences.glade:1110 ../AMC-gui-main_window.glade:2783 msgid "Individual solution" msgstr "Solução individual" #: ../AMC-gui-edit_preferences.glade:1125 ../AMC-gui-main_window.glade:2759 msgid "Catalog" msgstr "Catálogo" #: ../AMC-gui-edit_preferences.glade:1147 msgid "Optional working documents to build" msgstr "Documentos de trabalho opcionais a gerar" #: ../AMC-gui-edit_preferences.glade:1170 ../AMC-gui-main_window.glade:394 msgid "Documents" msgstr "Documentos" #: ../AMC-gui-edit_preferences.glade:1213 msgid "Limit MSE" msgstr "Limite de MSE" #: ../AMC-gui-edit_preferences.glade:1224 msgid "Limit sensitivity" msgstr "Limite de sensibilidade" #: ../AMC-gui-edit_preferences.glade:1265 msgid "Colouring thresholds" msgstr "Limiar de coloração" #: ../AMC-gui-edit_preferences.glade:1299 msgid "No answers color" msgstr "Cor de ausência de respostas" #: ../AMC-gui-edit_preferences.glade:1310 msgid "Invalid answers color" msgstr "Cor de respostas inválidas" #: ../AMC-gui-edit_preferences.glade:1347 msgid "Scan view" msgstr "Visualização de digitalização" #: ../AMC-gui-edit_preferences.glade:1379 msgid "Maximum density for manual data capture question paper rendering (DPI)" msgstr "" "Densidade máxima de digitalização para a renderização da captura manual das " "questões (DPI)" #: ../AMC-gui-edit_preferences.glade:1380 msgid "Manual capture density (DPI)" msgstr "Densidade de captura manual (DPI)" #: ../AMC-gui-edit_preferences.glade:1391 msgid "Image type" msgstr "Tipo de imagem" #: ../AMC-gui-edit_preferences.glade:1402 msgid "Remember window size" msgstr "Lembrar o tamanho da janela" #. Label in the preferences window, corresponding to "Starting number of #. columns for names in the manual association window". #: ../AMC-gui-edit_preferences.glade:1413 msgid "Number of columns for names" msgstr "Número de colunas dos nomes" #. Label in the preferences window, corresponding to the "Number of columns #. for zoomed boxes in the zooms window (opened from the Diagnosis list in the #. Data capture tab)". #: ../AMC-gui-edit_preferences.glade:1424 msgid "Number of columns for zoomes boxes" msgstr "Número de colunas para as caixas de zoom" #: ../AMC-gui-edit_preferences.glade:1448 msgid "" "Temporary file type used for manual data capture. Fastest choice is (none), " "but this seems to be problematic in some environments." msgstr "" "Tipo de arquivo temporário usado para a digitalização manual. A escolha mais" " rápida é (none), mas isto pode ser problemático em alguns ambientes." #: ../AMC-gui-edit_preferences.glade:1467 msgid "Do you want to keep the same window size each time you start AMC?" msgstr "" "Você deseja manter o mesmo tamanho de janela toda vez que iniciar o AMC?" #: ../AMC-gui-edit_preferences.glade:1480 msgid "Starting number of columns for names in the manual association window." msgstr "Número inicial de colunas de nomes na janela de associação manual" #: ../AMC-gui-edit_preferences.glade:1497 msgid "" "Number of columns for zoomed boxes in the zooms window (opened from the " "Diagnosis list in the Data capture tab)." msgstr "" "Número de colunas para as caixas de zoom na janela de zoom (aberta a partir " "da lista de Diagnóstico, na aba Captura de Dados)." #: ../AMC-gui-edit_preferences.glade:1518 msgid "Miscellaneous" msgstr "Miscellaneous" #: ../AMC-gui-edit_preferences.glade:1549 msgid "Notify the user at the end of the following actions:" msgstr "Notifica o usuário ao final das seguintes ações:" #. One of the "notify the user at the end of the following actions" checkbox: #. for documents update. #: ../AMC-gui-edit_preferences.glade:1568 msgid "Documents update" msgstr "Atualização de documentos" #. One of the "notify the user at the end of the following actions" checkbox: #. for computing marks. #: ../AMC-gui-edit_preferences.glade:1600 msgid "Grading" msgstr "Notas" #. One of the "notify the user at the end of the following actions" checkbox: #. for completed answer sheets annotation. #: ../AMC-gui-edit_preferences.glade:1616 #: ../AMC-gui-edit_preferences.glade:3137 msgid "Annotation" msgstr "Anotações" #: ../AMC-gui-edit_preferences.glade:1641 msgid "Notify using:" msgstr "Notificar usando:" #: ../AMC-gui-edit_preferences.glade:1660 msgid "Desktop notifications" msgstr "Notificações na área de trabalho" #: ../AMC-gui-edit_preferences.glade:1696 msgid "Command:" msgstr "Comando:" #: ../AMC-gui-edit_preferences.glade:1708 msgid "" "Command that will be called as a user notification. %m will be replaced by " "AMC's message, and %a by AMC completed action." msgstr "" "Comando que será chamado como alerta ao usuário. %m será substituído pela " "mensagem do AMC, e %a pela ação do AMC concluída." #: ../AMC-gui-edit_preferences.glade:1737 msgid "Notifications" msgstr "Notificações" #: ../AMC-gui-edit_preferences.glade:1761 msgid "Display" msgstr "Display" #: ../AMC-gui-edit_preferences.glade:1804 msgid "Vector formats density (DPI)" msgstr "Densidade dos formatos vetoriais (DPI)" #: ../AMC-gui-edit_preferences.glade:1815 msgid "Black&white conversion threshold" msgstr "Limiar de conversão de preto&branco" #: ../AMC-gui-edit_preferences.glade:1826 msgid "Erease red from scans" msgstr "Apaga os vermelhos da digitalização" #: ../AMC-gui-edit_preferences.glade:1837 msgid "Force conversion" msgstr "Forçar conversão" #: ../AMC-gui-edit_preferences.glade:1848 msgid "" "Density used when converting vector format scans (PDF, EPS) into bitmap." msgstr "Densidade usada ao converter digitalizações (PDF, EPS) para bitmap." #: ../AMC-gui-edit_preferences.glade:1863 msgid "" "Threshold used when converting scans to black and white. Value 0.0 means all" " white, value 1.0 means all black." msgstr "" "Limiar usado quando se converte uma digitalização para preto e branco. O " "valor 0.0 significa tudo branco, e o valor 1.0 tudo preto." #: ../AMC-gui-edit_preferences.glade:1881 msgid "" "When set, AMC will erease red color from the color scans before automatic " "data capture. This can be useful if the boxes are drawn in red." msgstr "" "Quando ativado, o AMC vai apagar os vermelhos das digitalizações coloridas " "antes da captura de dados. Isto pode ser útil se as caixas forem vermelhas." #: ../AMC-gui-edit_preferences.glade:1896 msgid "" "With this option, all scan files will be converted with ImageMagick. This " "can slow down scans processing, but may allow some unusual file formats to " "be processed successfully." msgstr "" "Com esta opção, todos os arquivos de digitalização serão convertidos com o " "ImageMagick. Isto pode tornar o processamento das digitalizações mais lento," " mas pode permitir que formatos não usuais de arquivos sejam processados com" " sucesso." #: ../AMC-gui-edit_preferences.glade:1913 msgid "Scans conversion" msgstr "Conversão de digitalizações" #: ../AMC-gui-edit_preferences.glade:1945 msgid "Marks size max increase" msgstr "Aumento máximo no tamanho das pontuações" #: ../AMC-gui-edit_preferences.glade:1956 msgid "Marks size max decrease" msgstr "Redução máximo no tamanho das pontuações" #: ../AMC-gui-edit_preferences.glade:1967 #: ../AMC-gui-edit_preferences.glade:2490 msgid "Can be customized on a per-project basis in the Project tab." msgstr "Pode ser customizado para cada projeto na aba \"Projeto\"." #: ../AMC-gui-edit_preferences.glade:1968 msgid "Default darkness threshold" msgstr "Padrão para limiar de claro/escuro" #: ../AMC-gui-edit_preferences.glade:1979 msgid "Default upper darkness threshold" msgstr "Padrão para limiar superior de claro/escuro" #: ../AMC-gui-edit_preferences.glade:1990 msgid "" "Proportion of the box (on the scan) that is measured to compute its " "blackness." msgstr "" "Proporção da caixa (na digitalização) que é medida para calcular o nível de " "preto." #: ../AMC-gui-edit_preferences.glade:1991 msgid "Measured box proportion" msgstr "Proporção medida da caixa" #: ../AMC-gui-edit_preferences.glade:2002 msgid "Process scans with 3 corner marks" msgstr "Processar digitalizações com apenas 3 marcas de canto" #: ../AMC-gui-edit_preferences.glade:2013 msgid "" "Maximum increase (proportion: 0.1 means 10%) allowed for corner marks after " "printing/scanning process." msgstr "" "Aumento máximo (proporção: 0.1 significa 10%) permitido para marcas de canto" " após o processo de impressão/digitalização." #: ../AMC-gui-edit_preferences.glade:2030 msgid "" "Maximum decrease (proportion: 0.1 means 10%) allowed for corner marks after " "printing/scanning process." msgstr "" "Redução máximo (proporção: 0.1 significa 10%) permitida para marcas de canto" " após o processo de impressão/digitalização." #: ../AMC-gui-edit_preferences.glade:2047 msgid "" "If black proportion is greater than this value, the box will be considered " "as beeing ticked. This is a default value, it can be changed in each " "project." msgstr "" "Se a proporção de preto é maior que esse valor, a caixa será considerada " "como marcada. Este é um valor padrão, pode ser alterado para cada projeto." #: ../AMC-gui-edit_preferences.glade:2093 msgid "Do you want to process scans with 3 corner circles only?" msgstr "Você deseja processar digitalizações com apenas 3 círculos de canto?" #: ../AMC-gui-edit_preferences.glade:2110 msgid "Detection parameters" msgstr "Parâmetros de detecção" #: ../AMC-gui-edit_preferences.glade:2166 msgid "" "These options are used when creating a new project. See the project tab for " "more details." msgstr "" "Essas opções são usadas ao criar um novo projeto. Veja a aba Projeto para " "maiores detalhes." #: ../AMC-gui-edit_preferences.glade:2173 #: ../AMC-gui-edit_preferences.glade:3760 msgid "Minimal mark" msgstr "Pontuação mínima" #: ../AMC-gui-edit_preferences.glade:2184 #: ../AMC-gui-edit_preferences.glade:3771 msgid "Floor mark" msgstr "Pontuação arrendondada para baixo" #: ../AMC-gui-edit_preferences.glade:2195 #: ../AMC-gui-edit_preferences.glade:3782 msgid "Maximal mark" msgstr "Pontuação máxima" #: ../AMC-gui-edit_preferences.glade:2206 #: ../AMC-gui-edit_preferences.glade:3793 msgid "Grain" msgstr "Granularidade" #: ../AMC-gui-edit_preferences.glade:2217 #: ../AMC-gui-edit_preferences.glade:3804 msgid "Rounding type" msgstr "Tipo de arredondamento" #: ../AMC-gui-edit_preferences.glade:2272 #: ../AMC-gui-edit_preferences.glade:3891 msgid "ceil" msgstr "arredondada para cima" #: ../AMC-gui-edit_preferences.glade:2312 msgid "Default marking options" msgstr "Opções padrão para pontuação" #: ../AMC-gui-edit_preferences.glade:2329 ../AMC-gui-main_window.glade:1943 msgid "Marking" msgstr "Pontuação" #: ../AMC-gui-edit_preferences.glade:2372 msgid "Max size" msgstr "Tamanho máximo" #: ../AMC-gui-edit_preferences.glade:2383 msgid "Image format" msgstr "Formato de imagem" #: ../AMC-gui-edit_preferences.glade:2394 msgid "JPEG quality" msgstr "Qualidade JPEG" #: ../AMC-gui-edit_preferences.glade:2454 msgid "Scans" msgstr "Digitalizações" #: ../AMC-gui-edit_preferences.glade:2492 msgid "Default header text" msgstr "Texto padrão do cabeçalho" #: ../AMC-gui-edit_preferences.glade:2513 #: ../AMC-gui-edit_preferences.glade:3976 msgid "" "Text to be written on annotated sheets header. Use %S for score, %M for max " "score, %s for grade, %m for max grade, and %(col) for content of the column " "col in the students list file." msgstr "" "Texto a ser escrito no cabeçalho das folhas anotadas. Use %S para o score, " "%M para os máximos scores, %spara a nota, %m para a máxima nota, e %(col) " "para o conteúdo da coluna col no arquivo com a lista de alunos." #: ../AMC-gui-edit_preferences.glade:2553 msgid "Default writing direction" msgstr "Direção padrão de escrita" #: ../AMC-gui-edit_preferences.glade:2564 msgid "Default questions annotation" msgstr "Anotação padrão de questões" #: ../AMC-gui-edit_preferences.glade:2575 msgid "Default cancelled questions annotation" msgstr "Anotação padrão de questões canceladas" #: ../AMC-gui-edit_preferences.glade:2585 #: ../AMC-gui-edit_preferences.glade:4050 msgid "right to left" msgstr "direita para esquerda" #: ../AMC-gui-edit_preferences.glade:2639 msgid "Header" msgstr "Cabeçalho" #: ../AMC-gui-edit_preferences.glade:2671 msgid "Significant digits" msgstr "Dígitos significativos" #: ../AMC-gui-edit_preferences.glade:2682 msgid "" "Number of significant digits to display for marks when annotating papers." msgstr "" "Número de dígitos significativos utilizados nas pontuações ao anotar as " "provas." #: ../AMC-gui-edit_preferences.glade:2703 msgid "Marks" msgstr "Pontuações" #: ../AMC-gui-edit_preferences.glade:2740 msgid "Line width" msgstr "Espessura da linha" #: ../AMC-gui-edit_preferences.glade:2751 msgid "Font" msgstr "Fonte" #: ../AMC-gui-edit_preferences.glade:2762 msgid "Marks shift" msgstr "Deslocação das pontuações" #: ../AMC-gui-edit_preferences.glade:2803 msgid "" "When marks are written on annotated papers left to the boxes, shifts to the " "left marks by this value. You can use mm or in as a unit." msgstr "" "Quando as pontuações são anotadas à esquerda das caixas, são deslocadas " "deste valor. As unidades podem ser mm ou in." #: ../AMC-gui-edit_preferences.glade:2832 msgid "To be ticked" msgstr "A ser selecionado" #: ../AMC-gui-edit_preferences.glade:2844 msgid "Ticked" msgstr "Selecionado" #: ../AMC-gui-edit_preferences.glade:2856 msgid "type" msgstr "tipo" #: ../AMC-gui-edit_preferences.glade:2868 msgid "colour" msgstr "cor" #: ../AMC-gui-edit_preferences.glade:2880 #: ../AMC-gui-edit_preferences.glade:2891 #: ../AMC-gui-edit_preferences.glade:2924 #: ../AMC-gui-edit_preferences.glade:2946 msgid "no" msgstr "não" #: ../AMC-gui-edit_preferences.glade:2902 #: ../AMC-gui-edit_preferences.glade:2913 #: ../AMC-gui-edit_preferences.glade:2935 #: ../AMC-gui-edit_preferences.glade:2957 msgid "yes" msgstr "sim" #: ../AMC-gui-edit_preferences.glade:3088 msgid "Also annotate informative questions" msgstr "Anotar também questões informativas" #: ../AMC-gui-edit_preferences.glade:3110 msgid "Symbols" msgstr "Símbolos" #: ../AMC-gui-edit_preferences.glade:3185 msgid "Sender email" msgstr "Email do remetente" #: ../AMC-gui-edit_preferences.glade:3196 msgid "Carbon copy address" msgstr "Endereço para cópia" #: ../AMC-gui-edit_preferences.glade:3207 msgid "Blind Carbon copy address" msgstr "Endereço para cópia oculta" #: ../AMC-gui-edit_preferences.glade:3260 msgid "Delay between sendings" msgstr "Intervalo entre envios" #: ../AMC-gui-edit_preferences.glade:3295 msgid "Mail delivery method:" msgstr "Método de entrega do email:" #: ../AMC-gui-edit_preferences.glade:3337 msgid "sendmail path" msgstr "Caminho do sendmail" #: ../AMC-gui-edit_preferences.glade:3373 msgid "SMTP host" msgstr "host SMTP" #: ../AMC-gui-edit_preferences.glade:3384 msgid "SMTP port" msgstr "porta SMTP" #: ../AMC-gui-edit_preferences.glade:3424 msgid "SMTP security" msgstr "segurança SMTP" #: ../AMC-gui-edit_preferences.glade:3435 msgid "SMTP user" msgstr "usuário SMTP" #: ../AMC-gui-edit_preferences.glade:3472 msgid "SMTP password" msgstr "senha SMTP" #: ../AMC-gui-edit_preferences.glade:3509 msgid "Sending emails" msgstr "Enviando emails" #: ../AMC-gui-edit_preferences.glade:3546 msgid "Default subject" msgstr "Assunto padrão" #: ../AMC-gui-edit_preferences.glade:3588 msgid "Default content" msgstr "Conteúdo padrão" #: ../AMC-gui-edit_preferences.glade:3612 msgid "Email" msgstr "Email" #: ../AMC-gui-edit_preferences.glade:3638 msgid "Project preferences" msgstr "Preferências de projeto" #: ../AMC-gui-edit_preferences.glade:3670 msgid "Darkness threshold" msgstr "Limiar de claro/escuro" #: ../AMC-gui-edit_preferences.glade:3681 msgid "" "If black proportion is greater than this value, the box will be considered " "as beeing ticked. If students have been told to darken the boxes entirely, " "one can choose value 0.5. If students have been told to tick the boxes, " "values around 0.15 seems appropriate." msgstr "" "Se a proporção de preto for maior que esse valor, a caxa será considerada " "marcada. Se os alunos forem orientados a escurecer inteiramente as caixas, " "pode-se escolher o valor de 0,5. Se os alunos foram orientados a dar um " "\"tique\" nas caixas, valores ao redor de 0,15 devem ser adequados." #: ../AMC-gui-edit_preferences.glade:3697 msgid "Upper darkness threshold" msgstr "Limiar superior de claro/escuro" #: ../AMC-gui-edit_preferences.glade:3708 msgid "" "If black proportion is greater than this value, the box is considered as not" " ticked. Setting this threshold to a value less than one allows the students" " to cancel ticked boxes by filling them completely." msgstr "" "Se a proporção de preto for maior que esse valor, a caxa será considerada " "não marcada. Ajustar o limiar para um valor menor que 1 permite que os " "alunos cancelem a marcação nas caixas preenchendo-as completamente." #: ../AMC-gui-edit_preferences.glade:3728 msgid "Automatic data capture" msgstr "Captura automática de dados" #: ../AMC-gui-edit_preferences.glade:3815 msgid "Mark associated with null score" msgstr "Pontuação associada com score nulo" #: ../AMC-gui-edit_preferences.glade:3829 msgid "" "Floor mark: any exam with a global mark less than this value will be given " "this mark. Let empty for no floor mark." msgstr "" "Piso de pontuação: um exame com uma pontuação global inferior a este valor " "ficará com este limite inferior da pontuação. Deixar vazio para nenhum piso." #: ../AMC-gui-edit_preferences.glade:3879 msgid "" "Mark to be given to a perfect sheet with all good answers (scaling the " "marks). Value 0 meens that you don't want to scale the marks." msgstr "" "Nota a ser dada para uma folha \"perfeita\", com todas as respostas " "adequadas (escalar a nota). O value 0 significa que você não deseja escalar " "as notas." #: ../AMC-gui-edit_preferences.glade:3896 msgid "" "When using SUF option in general grading scale, should marks be ceiled not " "to be larger than the maximum mark ?" msgstr "" "Ao usar a opção SUF na escala geral de notas, as pontuações devem ter um " "teto, de forma a não superarem a nota máxima?" #: ../AMC-gui-edit_preferences.glade:3920 msgid "Global mark rules" msgstr "Regras de pontuação gerais" #: ../AMC-gui-edit_preferences.glade:3956 msgid "Header text" msgstr "Texto de cabeçalho" #: ../AMC-gui-edit_preferences.glade:4007 msgid "Writing direction" msgstr "Direção da escrita" #: ../AMC-gui-edit_preferences.glade:4018 msgid "Questions marks position" msgstr "Posição das pontuações nas questões" #: ../AMC-gui-edit_preferences.glade:4029 msgid "Questions annotation text" msgstr "Texto de anotação das questões" #: ../AMC-gui-edit_preferences.glade:4040 msgid "Cancelled questions annotation text" msgstr "Texto de anotação das questões canceladas" #: ../AMC-gui-edit_preferences.glade:4083 msgid "" "Text to be written for each question. This will be evaluated by perl, so " "quote it to make a single string. Use %S for score, %M for max score, and %s" " and %m for these values truncated to the requested number of significant " "digits." msgstr "" "Texto a ser escrito para cada questão. Isto será executado em perl, então " "coloque entre aspas para formar uma única string. Use %M para o score " "máximo, e %s e %m para esses valores truncados para o número desejado de " "dígitos significativos." #: ../AMC-gui-edit_preferences.glade:4097 msgid "Same as above, but for cancelled questions (when using allowempty)." msgstr "" "Igual ao anterior, agora para questões canceladas (quando se usa " "allowempty)." #: ../AMC-gui-edit_preferences.glade:4122 msgid "Papers annotation" msgstr "Anotação de provas" #: ../AMC-gui-edit_preferences.glade:4206 msgid "Examination description" msgstr "Descrição da prova" #: ../AMC-gui-edit_preferences.glade:4249 msgid "CSV files charset" msgstr "Conjunto de caracteres do CSV" #: ../AMC-gui-edit_preferences.glade:4260 msgid "Charset used for the students list file" msgstr "Conjunto de caracteres utilizado para o arquivo com a lista de alunos" #: ../AMC-gui-edit_preferences.glade:4279 msgid "Charset for the CSV marks file produced by AMC." msgstr "" "Conjunto de caracteres para o arquivo CSV com as pontuações gerado pelo AMC" #: ../AMC-gui-edit_preferences.glade:4302 msgid "Internationnalization" msgstr "Internacionalização" #: ../AMC-gui-edit_preferences.glade:4334 msgid "LaTeX engine" msgstr "Engine LaTeX" #: ../AMC-gui-edit_preferences.glade:4345 msgid "Command to compile LaTeX file and make PDF, PS or DVI output." msgstr "Comando para compilar arquivo LaTeX e gerar saída PDF, PS ou DVI." #: ../AMC-gui-edit_preferences.glade:4368 msgid "External commands" msgstr "Comandos externos" #: ../AMC-gui-edit_preferences.glade:4393 ../AMC-gui-main_window.glade:2923 #: ../AMC-gui-main_window.glade:3239 msgid "Project" msgstr "Projeto" #: ../AMC-gui-edit_preferences.glade:4413 msgid "AMC Preferences" msgstr "Preferências do AMC" #: ../AMC-gui-filter_details.glade:7 msgid "Formats details" msgstr "Detalhes dos layouts" #: ../AMC-gui-filter_details.glade:66 msgid "" "AMC supports different formats for the source file. Here are some details " "about each of them." msgstr "" "O AMC suporta diversos formatos para o arquivo fonte. Seguem alguns detalhes" " sobre cada um deles." #: ../AMC-gui-filter_details.glade:115 msgid "Description:" msgstr "Descrição" #: ../AMC-gui-liste_dialog.glade:48 msgid "No names list" msgstr "Não há lista de nomes" #: ../AMC-gui-liste_dialog.glade:134 msgid "Apply" msgstr "Aplicar" #: ../AMC-gui-liste_dialog.glade:163 msgid "Choose your students names list file" msgstr "Escolha o seu arquivo com a lista de alunos" #: ../AMC-gui-mailing.glade:13 msgid "Mailing" msgstr "Envio de emails" #: ../AMC-gui-mailing.glade:40 msgid "Send" msgstr "Enviar" #: ../AMC-gui-mailing.glade:75 msgid "Current project name %n:" msgstr "Nome do projeto atual %n:" #: ../AMC-gui-mailing.glade:149 msgid "Emails column:" msgstr "Coluna de emails:" #: ../AMC-gui-mailing.glade:184 msgid "Select failed" msgstr "Seleção falhou" #: ../AMC-gui-mailing.glade:237 msgid "Addressees" msgstr "Endereços" #: ../AMC-gui-mailing.glade:274 msgid "Subject" msgstr "Assunto" #: ../AMC-gui-mailing.glade:303 msgid "Enable HTML Tags" msgstr "Ativar as marcações HTML" #: ../AMC-gui-mailing.glade:345 msgid "Body" msgstr "Corpo" #: ../AMC-gui-mailing.glade:437 msgid "Attachments" msgstr "Anexos" #: ../AMC-gui-main_window.glade:126 msgid "Updated" msgstr "Atualizado" #: ../AMC-gui-main_window.glade:146 msgid "Sensitivity" msgstr "Sensibilidade" #: ../AMC-gui-main_window.glade:156 msgid "Scan file" msgstr "Arquivo de digitalização" #: ../AMC-gui-main_window.glade:294 msgid "Number of papers:" msgstr "Número de prova:" #: ../AMC-gui-main_window.glade:308 msgid "" "Number of papers to produce. Zero means taking into account the number " "written in the LaTeX source file." msgstr "" "Número de provas a gerar. Zero significa considerar o número expresso no " "arquivo fonte LaTeX." #. TRANSLATORS: Use the character '_' before the key that can be used as a #. mnemonic (to activate documents update with Alt+key) #: ../AMC-gui-main_window.glade:343 msgid "_Update documents" msgstr "_Atualiza documentos" #: ../AMC-gui-main_window.glade:377 msgid "Question" msgstr "Questão" #: ../AMC-gui-main_window.glade:543 msgid "Warnings" msgstr "Advertências" #: ../AMC-gui-main_window.glade:654 msgid "Print papers" msgstr "Imprimir provas" #: ../AMC-gui-main_window.glade:718 msgid "From papers' scans" msgstr "A partir das digitalizações das provas" #: ../AMC-gui-main_window.glade:740 ../AMC-gui-main_window.glade:1776 msgid "Automatic" msgstr "Automático" #: ../AMC-gui-main_window.glade:762 msgid "On screen with mouse" msgstr "Na tela com o mouse" #: ../AMC-gui-main_window.glade:784 ../AMC-gui-main_window.glade:1819 msgid "Manual" msgstr "Manual" #: ../AMC-gui-main_window.glade:809 msgid "Data capture after examination" msgstr "Captura de dados após a prova" #: ../AMC-gui-main_window.glade:841 msgid "Missing pages" msgstr "Páginas faltantes" #: ../AMC-gui-main_window.glade:913 msgid "Look at scans" msgstr "Visualizar digitalizações" #: ../AMC-gui-main_window.glade:984 msgid "Forget" msgstr "Esquecer" #: ../AMC-gui-main_window.glade:1001 msgid "Look at pages" msgstr "Visualizar nas páginas" #: ../AMC-gui-main_window.glade:1086 msgid "Pages:" msgstr "Páginas:" #: ../AMC-gui-main_window.glade:1144 msgid "Columns" msgstr "Colunas" #. Label on the button used to open a window with the images of the boxes #. taken from the scan. This window can be used th check boxes categorization. #: ../AMC-gui-main_window.glade:1183 ../AMC-perl/AMC/Gui/Zooms.glade:13 msgid "Zooms" msgstr "Zooms" #: ../AMC-gui-main_window.glade:1188 msgid "" "Show images of the boxes from the scan, and check their categorization." msgstr "" "Exibir imagens das caixas a partir da digitalização, e verificar sua " "categorização." #. Label of the button used to open a window showing a scan with the place #. where corner marks have been detected, and the position where the boxes are #. supposed to be. #: ../AMC-gui-main_window.glade:1202 msgid "Layout" msgstr "Layout" #: ../AMC-gui-main_window.glade:1207 msgid "" "Show where corner marks have been detected on the scan, and where boxes are " "supposed to be." msgstr "" "Mostrar onde as marcas de canto foram detectadas na digitalização, e onde as" " caixas deveriam estar." #. Label of the button used to delete data capture for selected pages. #: ../AMC-gui-main_window.glade:1221 msgid "Remove" msgstr "Remover" #: ../AMC-gui-main_window.glade:1225 msgid "Remove data capture for selected pages." msgstr "Remover a captura de dados das páginas selecionadas." #: ../AMC-gui-main_window.glade:1266 msgid "Diagnosis" msgstr "Disgnóstico" #: ../AMC-gui-main_window.glade:1323 msgid "Update marking scale" msgstr "Atualizar escala de pontuação" #: ../AMC-gui-main_window.glade:1327 msgid "Also update marking scale extraction from LaTeX source file" msgstr "" "Também atualizar a extração de escala de pontuação a partir do arquivo fonte" " LaTeX" #: ../AMC-gui-main_window.glade:1341 msgid "Mark papers" msgstr "Pontuar provas" #: ../AMC-gui-main_window.glade:1394 msgid "Marking" msgstr "Pontuação" #: ../AMC-gui-main_window.glade:1419 msgid "Look at marks" msgstr "Visualizar as pontuações" #: ../AMC-gui-main_window.glade:1500 msgid "Students list:" msgstr "Lista de alunos:" #: ../AMC-gui-main_window.glade:1548 msgid "Set file" msgstr "Definir arquivo" #: ../AMC-gui-main_window.glade:1596 msgid "Edit list" msgstr "Editar lista" #: ../AMC-gui-main_window.glade:1638 msgid "Re-read" msgstr "Ler novamente" #: ../AMC-gui-main_window.glade:1704 msgid "Code name for automatic association:" msgstr "Nome do código para associação automática:" #: ../AMC-gui-main_window.glade:1715 msgid "Primary key from this list:" msgstr "Chave primária dessa lista:" #: ../AMC-gui-main_window.glade:1738 msgid "Papers/students association:" msgstr "Associação provas/alunos:" #: ../AMC-gui-main_window.glade:1858 msgid "Students identification" msgstr "Identificação dos alunos" #: ../AMC-gui-main_window.glade:2020 msgid "Export" msgstr "Exportar" #: ../AMC-gui-main_window.glade:2041 msgid "and" msgstr "e" #: ../AMC-gui-main_window.glade:2095 msgid "Sorting:" msgstr "Ordenação:" #: ../AMC-gui-main_window.glade:2121 msgid "include absentees" msgstr "incluir ausentes" #: ../AMC-gui-main_window.glade:2127 msgid "Should exported data include absentees?" msgstr "Os dados exportados devem incluir os ausentes?" #: ../AMC-gui-main_window.glade:2207 msgid "Exports dir" msgstr "Pasta de exportação" #: ../AMC-gui-main_window.glade:2239 msgid "Marks export" msgstr "Exportar pontuação" #: ../AMC-gui-main_window.glade:2322 msgid "File name model:" msgstr "Modelo de nome de arquivo:" #: ../AMC-gui-main_window.glade:2336 msgid "" "File name model used to make file names for PDF annotated papers, one by " "student. Keep empty in order to use student name." msgstr "" "Modelo de nome de arquivo para as provas anotadas em PDF, um por aluno. " "Deixe vazio para usar o nome do aluno." #: ../AMC-gui-main_window.glade:2382 msgid "Annotate papers' scans with marking details." msgstr "Anotar as digitalizações das provas com detalhes de pontuação." #: ../AMC-gui-main_window.glade:2404 msgid "Annotate papers" msgstr "Anotar provas" #: ../AMC-gui-main_window.glade:2428 msgid "Look at grouped files" msgstr "Visualizar arquivos agrupados" #: ../AMC-gui-main_window.glade:2451 msgid "Look" msgstr "Visualizar" #: ../AMC-gui-main_window.glade:2482 msgid "Send..." msgstr "Enviar..." #: ../AMC-gui-main_window.glade:2511 msgid "Annotated papers" msgstr "Provas anotadas" #: ../AMC-gui-main_window.glade:2534 msgid "Reports" msgstr "Relatórios" #: ../AMC-gui-main_window.glade:2650 msgid "Open project" msgstr "Abrir projeto" #: ../AMC-gui-main_window.glade:2691 msgid "Save project" msgstr "Salvar projeto" #: ../AMC-gui-main_window.glade:2721 msgid "Menu" msgstr "Menu" #: ../AMC-gui-main_window.glade:2799 ../AMC-gui-main_window.glade:2838 #: ../AMC-gui-main_window.glade:2877 msgid "Update the document" msgstr "Atualizar o documento" #: ../AMC-gui-main_window.glade:2813 ../AMC-gui-main_window.glade:2852 #: ../AMC-gui-main_window.glade:2891 msgid "Open the document" msgstr "Abrir o documento" #: ../AMC-gui-main_window.glade:2953 msgid "Export as template" msgstr "Exportar como modelo" #: ../AMC-gui-main_window.glade:2967 msgid "User templates" msgstr "Modelos do usuário" #: ../AMC-gui-main_window.glade:2992 msgid "Manage" msgstr "Gerenciar" #: ../AMC-gui-main_window.glade:3017 ../AMC-gui-main_window.glade:3267 msgid "Help" msgstr "Ajuda" #: ../AMC-gui-main_window.glade:3033 msgid "About" msgstr "Sobre" #: ../AMC-gui-main_window.glade:3047 msgid "Cancel learning…" msgstr "Cancelar a aprendizagem..." #: ../AMC-gui-main_window.glade:3058 msgid "Debugging" msgstr "Depuração" #: ../AMC-gui-main_window.glade:3076 msgid "Bug report" msgstr "Relatório de problemas" #: ../AMC-gui-main_window.glade:3090 ../AMC-gui-main_window.glade:3115 msgid "Documentation" msgstr "Documentação" #: ../AMC-gui-main_window.glade:3184 ../AMC-gui-main_window.glade:3253 msgid "Plugins" msgstr "Plugins" #: ../AMC-gui-main_window.glade:3200 msgid "Browse" msgstr "Navegar" #: ../AMC-gui-main_window.glade:3214 msgid "Install plugin" msgstr "Instalar plugin" #: ../AMC-gui-make_template.glade:8 msgid "Save as a template" msgstr "Salvar como modelo" #: ../AMC-gui-make_template.glade:64 msgid "To make a new template from your project, describe it below:" msgstr "Para criar um novo modelo a partir do seu projeto, descreva-o abaixo:" #: ../AMC-gui-make_template.glade:86 msgid "File name:" msgstr "Nome do arquivo:" #: ../AMC-gui-make_template.glade:117 msgid "" "Note: please use only alphanumeric characters and characters from " "\"-_+\" for the template file name." msgstr "" "Nota: por favor, use apenas caracteres alfanuméricos e \"-_+\" para o" " nome de arquivo do modelo." #: ../AMC-gui-make_template.glade:143 msgid "Short name:" msgstr "Nome curto:" #: ../AMC-gui-make_template.glade:202 msgid "Description:" msgstr "Descrição:" #: ../AMC-gui-make_template.glade:304 msgid "Included files:" msgstr "Arquivos incluídos:" #: ../AMC-gui-overwritten.glade:49 msgid "List of pages with overwritten data:" msgstr "Lista de páginas com dados sobrescritos:" #: ../AMC-gui-saisie_auto.glade:8 msgid "Please select all papers' scans" msgstr "Por favor, selecione todas as digitalizações das provas" #: ../AMC-gui-saisie_auto.glade:10 msgid "Automatic data capture" msgstr "Captura automática de dados" #: ../AMC-gui-saisie_auto.glade:27 msgid "Proceed to data capture from scans with button OK" msgstr "Prossiga para a captura de dados das digitalizações com o botão OK." #: ../AMC-gui-saisie_auto.glade:82 msgid "Copy to project directory (recommended)" msgstr "Copiar para a pasta de projeto (recomendado)" #: ../AMC-gui-saisie_auto.glade:88 ../AMC-gui-saisie_auto.glade:89 msgid "Copy all scans to scans sub-directory in project directory" msgstr "" "Copiar todas as digitalizações para a subpasta de digitalizações na pasta do" " projeto." #: ../AMC-gui-saisie_auto.glade:156 msgid "" "Use this setting to be sure that the exam copy IDs allocated to the pages of" " the scans you selected will be consecutive numbers, in the same " "order as the pages." msgstr "" "Use esse ajuste para ter certeza de que os identificadores dos exemplares " "alocados às páginas de digitalizações serão números consecutivos, na " "mesma ordem das páginas." #: ../AMC-gui-saisie_auto.glade:172 msgid "Options" msgstr "Opções" #: ../AMC-gui-source_latex_choix.glade:8 msgid "Choose LaTeX source file" msgstr "Escolher o arquivo fonte LaTeX" #: ../AMC-gui-source_latex_choix_zip.glade:8 msgid "ZIP file choice" msgstr "escolha de arquivo ZIP" #: ../AMC-gui-source_latex_dialog.glade:7 msgid "Choose LaTeX source" msgstr "Escolher fonte LaTeX" #: ../AMC-gui-source_latex_dialog.glade:62 msgid "" "A multiple choice project is mainly made of a source file, which describes the questionnaire.\n" "Please choose your situation:" msgstr "" "Um projeto de múltipla escolha é basicamente constituído de um arquivo fonte que descreve o questionário.\n" "Por favor, escolha a sua situação:" #: ../AMC-gui-source_latex_dialog.glade:105 msgid "Template" msgstr "Modelo" #: ../AMC-gui-source_latex_dialog.glade:119 msgid "" "You did not write any description of the questionnaire, and want to start " "from a template." msgstr "" "Você não escreveu nenhuma descrição do questionário, e deseja começar a " "partir de um modelo." #: ../AMC-gui-source_latex_dialog.glade:171 msgid "File" msgstr "Arquivo" #: ../AMC-gui-source_latex_dialog.glade:185 msgid "" "You already wrote a questionnaire description, and want to use it for this " "project." msgstr "" "Você já escreveu a descrição do questionário e quer usá-la para este " "projeto." #: ../AMC-gui-source_latex_dialog.glade:237 msgid "Empty" msgstr "Vazio" #: ../AMC-gui-source_latex_dialog.glade:251 msgid "You want to write the description from zero." msgstr "Você quer escrever a sua descrição a partir do zero." #: ../AMC-gui-source_latex_dialog.glade:303 msgid "Archive" msgstr "Arquivar" #: ../AMC-gui-source_latex_dialog.glade:317 msgid "" "You have a .tgz or .zip file containing the questionnaire and " "other related stuff, coming from a third party software or a backup." msgstr "" "Você tem um arquivo .tgz ou .zip contendo o questionário e " "outras coisas relacionadas, a partir de um software terceiro ou de um " "backup." #: ../AMC-gui-source_latex_modele.glade:8 msgid "Template selection" msgstr "Seleção de modelos" #: ../AMC-gui-unrecognized.glade:8 msgid "Preprocess" msgstr "Pré-processamento" #: ../AMC-gui-unrecognized.glade:14 msgid "Delete" msgstr "Apagar" #: ../AMC-gui-unrecognized.glade:29 msgid "Unrecognized scans" msgstr "Digitalizações não reconhecidas" #: ../AMC-gui-unrecognized.glade:71 msgid "Scans list" msgstr "Lista de digitalizações" #: ../AMC-gui-unrecognized.glade:237 msgid "Original scan" msgstr "Digitalização original " #: ../AMC-gui-unrecognized.glade:266 msgid "Preprocessed" msgstr "Pré-processado" #: ../AMC-perl/AMC/Gui/Association.glade:14 msgid "Manual association" msgstr "Associação manual" #. This is the label of the check button that controls wheter the auto- #. completion for students names will be made looking at the beginnig of the #. names or at the whole names. #: ../AMC-perl/AMC/Gui/Association.glade:84 msgid "beginning" msgstr "início" #: ../AMC-perl/AMC/Gui/Association.glade:89 msgid "Is auto-completion looking at the beginning of the names only?" msgstr "A complementação automática está olhando apenas o começo dos nomes?" #: ../AMC-perl/AMC/Gui/Association.glade:157 msgid "Show all" msgstr "Mostrar tudo" #: ../AMC-perl/AMC/Gui/Association.glade:361 msgid "associated" msgstr "associado" #: ../AMC-perl/AMC/Gui/Association.glade:366 msgid "" "Unticking this box, you see only non-associated papers. Tick it to be able " "to check already associated papers." msgstr "" "Desmarcando essa caixa, você visualiza apenas as provas não-associadas. " "Marque-a para poder verificar as provas já associadas." #: ../AMC-perl/AMC/Gui/Association.glade:411 msgid "Remove manual association for this paper" msgstr "Remover a associação manual para esta prova" #: ../AMC-perl/AMC/Gui/Association.glade:427 msgid "" "Tell the system that this papers does not correspond to any of the students " "from the list." msgstr "" "Diz ao sistema que esta prova não corresponde a nenhum estudante da lista." #: ../AMC-perl/AMC/Gui/Association.glade:449 msgid "Unknown" msgstr "Desconhecido" #: ../AMC-perl/AMC/Gui/Association.glade:509 msgid "Save associations." msgstr "Salva associações." #: ../AMC-perl/AMC/Gui/Manuel.glade:18 msgid "Paper data capture" msgstr "Captura de dados da prova" #: ../AMC-perl/AMC/Gui/Manuel.glade:39 ../AMC-perl/AMC/Gui/Manuel.glade:236 msgid "Go to:" msgstr "Ir para:" #: ../AMC-perl/AMC/Gui/Manuel.glade:51 ../AMC-perl/AMC/Gui/Manuel.glade:248 msgid "" "Enter paper number, or page number like 102/4 (page 4 from paper 102), then " "press enter." msgstr "" "Informe o número da prova, ou o número da página, como 102/4 (página 4 da " "prova 102), e pressione Enter." #: ../AMC-perl/AMC/Gui/Manuel.glade:82 msgid "Go to the previous page." msgstr "Ir para a página anterior" #: ../AMC-perl/AMC/Gui/Manuel.glade:100 msgid "Quit" msgstr "Sair" #: ../AMC-perl/AMC/Gui/Manuel.glade:118 msgid "Go to next page." msgstr "Ia para a próxima página." #: ../AMC-perl/AMC/Gui/Manuel.glade:282 msgid "Save this page modifications, then go to the previous page." msgstr "" "Salvar as modificações nessa página, e então ir para a página anterior." #: ../AMC-perl/AMC/Gui/Manuel.glade:296 msgid "" "Choose if you want to navigate through all pages, through pages with invalid" " answers, or through pages with invalid or empty answers." msgstr "" "Escolher se você deseja navegar por todas as páginas, pelas páginas com " "respostas inválidas, ou pelas páginas com respostas inválidas ou vazias." #: ../AMC-perl/AMC/Gui/Manuel.glade:318 msgid "Save this page modifications, then go to next page." msgstr "" "Salvar as modificações nessa página, e então ir para a próxima página." #: ../AMC-perl/AMC/Gui/Manuel.glade:344 msgid "Focus on question:" msgstr "Focar na questão:" #: ../AMC-perl/AMC/Gui/Manuel.glade:429 msgid "" "Remove manual modifications for this page. Automatic data capture for this " "page, if any, won't be changed." msgstr "" "Remover modificações manuais para essa página. A captura automática para " "essa página, se houver, não será alterada." #: ../AMC-perl/AMC/Gui/Manuel.glade:458 msgid "Cancel modifications for this page" msgstr "Cancelar modificações para esta página" #: ../AMC-perl/AMC/Gui/Manuel.glade:476 msgid "Save and quit" msgstr "Salvar e sair." #: ../AMC-perl/AMC/Gui/Zooms.glade:135 msgid "Unchecked boxes" msgstr "Caixas não marcadas" #: ../AMC-perl/AMC/Gui/Zooms.glade:203 msgid "Checked boxes" msgstr "Caixas marcadas" #: ../AMC-perl/AMC/Gui/Zooms.glade:281 msgid "" "Toggle mode. With 'click', left-click to toggle and right-click to toggle a " "group." msgstr "" "Modo de alternância. Com 'clique', clique à esquerda para alternar e clique " "à direita para alternar um grupo." auto-multiple-choice-1.4.0/I18N/lang/pt_PT.po000066400000000000000000004304541341176102400205440ustar00rootroot00000000000000# Auto Multiple Choice # Copyright 2008-2016 Alexis Bienvenue # This file is distributed under the same license as the AMC software #, fuzzy msgid "" msgstr "" "Project-Id-Version: 1.4.0~beta1 (r:a488cdb)\n" "Report-Msgid-Bugs-To: paamc@passoire.fr\n" "POT-Creation-Date: 2018-05-02 09:25 +0200\n" "PO-Revision-Date: 2018-05-15 21:50 +0200\n" "Last-Translator: Pedro Cruz , 2018\n" "Language-Team: Portuguese (Portugal) (https://www.transifex.com/jojoboulix/teams/10701/pt_PT/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: pt_PT\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. TRANSLATORS: directory name for projects. This directory will be created #. (if needed) in the home directory of the user. Please use only alphanumeric #. characters, and - or _. No accentuated characters. #: ../AMC-annotate.pl:158 ../AMC-perl/AMC/Config.pm:247 #: ../AMC-perl/AMC/Config.pm:248 msgid "MC-Projects" msgstr "Projetos-MC" #: ../AMC-getimages.pl:213 msgid "Splitting multi-page PDF files..." msgstr "Dividindo ficheiros PDF multi-página..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be #. converted. #: ../AMC-getimages.pl:390 #, perl-format msgid "Converting %s to bitmap..." msgstr "Convertendo %s para bitmap..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be #. splitted to several images (one per page). #: ../AMC-getimages.pl:393 #, perl-format msgid "Splitting multi-page image %s..." msgstr "Dividindo imagem multi-página %s..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be #. splitted to several images (one per page). #: ../AMC-getimages.pl:396 #, perl-format msgid "Processing image %s..." msgstr "Processando a imagem %s..." #: ../AMC-getimages.pl:469 msgid "Copying scans to project directory..." msgstr "Copiando as digitalizações para a pasta do projeto..." #: ../AMC-gui.pl:249 msgid "" "None of the perl modules Graphics::Magick and Image::Magick " "are installed: AMC won't work properly!" msgstr "" "Nenhum dos módulos perl Graphics::Magick e Image::Magick " "estão instalados: o AMC não funcionará corretamente!" #: ../AMC-gui.pl:280 msgid "" "The package auto-multiple-choice-common is installed, but not auto-multiple-choice.\n" "AMC won't work properly until you install auto-multiple-choice package!" msgstr "" "O pacote auto-multiple-choice-common está instalado mas não auto-multiple-choice.\n" "O AMC não funcionará corretamente até que instale o pacote auto-multiple-choice." #: ../AMC-gui.pl:298 #, perl-format msgid "" "There is too little space left in the temporary disk directory (%s). " "Please clean this directory and try again." msgstr "" "Existe pouco espaço no disco temporário (%s) Por favor, limpe a pasta e " "tente de novo." #: ../AMC-gui.pl:317 msgid "Several dialogs try to help you be at ease handling AMC." msgstr "Muitas caixas de diálogo tentam que seja fácil usar o AMC." #: ../AMC-gui.pl:319 #, perl-format msgid "Unless you tick the \"%s\" box, they are shown only once." msgstr "A menos que marque a caixa \"%s\" , eles serão mostrados apenas uma vez." #: ../AMC-gui.pl:321 ../AMC-gui.pl:605 msgid "Show this message again next time" msgstr "Mostre esta mensagem novamente, na próxima vez." #: ../AMC-gui.pl:323 msgid "" "Do you want to forgot which dialogs you have already seen and ask to show " "all of them next time they should appear ?" msgstr "" "Pretende que o sistema esqueça o conteúdo de todas as caixas de diálogo já " "vistas e lhe peça para ver de novo cada uma ?" #: ../AMC-gui.pl:357 msgid "" "Please install libnotify to make desktop notifications available." msgstr "" "Por favor, instale libnotify para tornar disponíveis as notificações " "no desktop." #. TRANSLATORS: Message when switching to debugging mode. #: ../AMC-gui.pl:552 msgid "Debugging mode." msgstr "Modo de depuração." #. TRANSLATORS: Message when switching to debugging mode. %s will be replaced #. with the path of the log file. #: ../AMC-gui.pl:554 #, perl-format msgid "Debugging informations will be written in file %s." msgstr "A informação sobre a depuração será escrita no ficheiro %s." #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:583 ../AMC-gui-main_window.glade:3131 msgid "French" msgstr "Francês" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:585 ../AMC-gui-main_window.glade:3145 msgid "English" msgstr "Inglês" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:587 ../AMC-gui-main_window.glade:3159 msgid "Japanese" msgstr "Japonês" #. TRANSLATORS: This is the title of the column containing student/copy #. identifier in the table showing the results of data captures. #: ../AMC-gui.pl:703 msgid "identifier" msgstr "identificador" #. TRANSLATORS: This is the title of the column containing data capture #. date/time in the table showing the results of data captures. #: ../AMC-gui.pl:712 msgid "updated" msgstr "atualizado" #. TRANSLATORS: This is the title of the column containing Mean Square Error #. Distance (some kind of mean distance between the location of the four #. corner marks on the scan and the location where they should be if the scan #. was not distorted at all) in the table showing the results of data #. captures. #: ../AMC-gui.pl:720 ../AMC-gui.pl:4992 ../AMC-perl/AMC/Gui/Manuel.pm:192 #: ../AMC-gui-main_window.glade:136 msgid "MSE" msgstr "EQM (\"MSE\")" #. TRANSLATORS: This is the title of the column containing so-called #. "sensitivity" (an indicator telling the user if the darkness ratio of some #. boxes on the page are very near the threshold. A great value tells that #. some darkness ratios are very near the threshold, so that the capture is #. very sensitive to the threshold. A small value is a good thing) in the #. table showing the results of data captures. #: ../AMC-gui.pl:729 ../AMC-gui.pl:4994 ../AMC-perl/AMC/Gui/Manuel.pm:200 msgid "sensitivity" msgstr "sensitividade" #: ../AMC-gui.pl:737 msgid "scan file" msgstr "Ficheiro com a digitalização" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:766 ../AMC-gui.pl:784 msgid "Western Europe" msgstr "Europa ocidental" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:768 ../AMC-gui.pl:786 msgid "Central Europe" msgstr "Europa Central" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:770 msgid "Southern Europe" msgstr "Europa do Sul" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:772 msgid "Northern Europe" msgstr "Europa do Norte" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:774 msgid "Cyrillic" msgstr "Cirílico" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:776 msgid "Turkish" msgstr "Turco" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:778 msgid "Northern" msgstr "Norte (setentrional)" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:780 msgid "Unicode" msgstr "Unicode" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:804 ../AMC-gui.pl:3338 msgid "(none) [No primary key found in association list]" msgstr "(nenhum) [Nenhuma chave primária encontrada na lista de associações]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:806 ../AMC-gui.pl:3976 msgid "(none) [No code found in LaTeX file]" msgstr "(nenhum) [nenhum código encontrado no ficheiro LaTeX]" #. TRANSLATORS: One of the printing methods: use a command (This is not the #. command name itself). This is a menu entry. #: ../AMC-gui.pl:835 msgid "command" msgstr "comando" #. TRANSLATORS: One of the printing methods: print to files. This is a menu #. entry. #: ../AMC-gui.pl:837 msgid "to files" msgstr "para os arquivos" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:841 msgid "floor" msgstr "chão (\"floor\")" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:843 msgid "rounding" msgstr "arredondado" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:845 msgid "ceiling" msgstr "teto (\"ceiling\")" #. TRANSLATORS: One option for decimal point: use a comma. This is a menu #. entry #: ../AMC-gui.pl:849 msgid ", (comma)" msgstr ", (vírgula)" #. TRANSLATORS: One option for decimal point: use a point. This is a menu #. entry. #: ../AMC-gui.pl:851 msgid ". (dot)" msgstr ". (ponto)" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:856 msgid "one sided [No two-sided printing]" msgstr "lado único [Sem impressão em dupla face]" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:858 msgid "long edge" msgstr "borda longa" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:860 msgid "short edge" msgstr "borda curto" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:864 msgid "(none) [No transitional image type (direct processing)]" msgstr "(nenhum) [Nenhuma imagem de transição (processamento direto)]" #. TRANSLATORS: One of the actions that can be done after exporting the marks. #. Here, do nothing more. This is a menu entry. #: ../AMC-gui.pl:872 msgid "that's all" msgstr "é tudo" #. TRANSLATORS: One of the actions that can be done after exporting the marks. #. Here, open the exported file. This is a menu entry. #: ../AMC-gui.pl:874 msgid "open the file" msgstr "abre o ficheiro" #. TRANSLATORS: One of the actions that can be done after exporting the marks. #. Here, open the directory where the file is. This is a menu entry. #: ../AMC-gui.pl:876 msgid "open the directory" msgstr "abre a pasta" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:879 msgid "(none) [No annotation position (do not write anything)]" msgstr "(nenhum) [Nenhuma posição para a anotação (não será escrito nada)]" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: in one margin. This is a menu entry. #: ../AMC-gui.pl:881 msgid "in one margin" msgstr "numa margem" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: in one of the two margins. This is a menu entry. #: ../AMC-gui.pl:883 msgid "in the margins" msgstr "nas margens" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: near the boxes. This is a menu entry. #: ../AMC-gui.pl:885 msgid "near boxes" msgstr "perto das caixas" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: in the zones defined in the source file #: ../AMC-gui.pl:887 msgid "where defined in the source" msgstr "onde definido na fonte" #. TRANSLATORS: One of the possible sorting criteria for students in the #. exported spreadsheet with scores: the student name. This is a menu entry. #. TRANSLATORS: This is the title of a column containing students names in a #. table showing all annotated answer sheets, when sending them to the #. students by email. #: ../AMC-gui.pl:890 ../AMC-gui.pl:6357 msgid "name" msgstr "nome" #. TRANSLATORS: One of the possible sorting criteria for students in the #. exported spreadsheet with scores: the student sheet number. This is a menu #. entry. #: ../AMC-gui.pl:892 msgid "exam copy number" msgstr "número de cópia do exame/inquérito" #. TRANSLATORS: One of the possible sorting criteria for students in the #. exported spreadsheet with scores: the line where one can find this student #. in the students list file. This is a menu entry. #: ../AMC-gui.pl:894 msgid "line in students list" msgstr "linha na lista de alunos" #. TRANSLATORS: you can omit the [...] part, just here to explain context #. One of the possible sorting criteria for students in the exported #. spreadsheet with scores: the student mark. This is a menu entry. #: ../AMC-gui.pl:897 msgid "mark [student mark, for sorting]" msgstr "pontuação [pontuação do exame/inquérito, para ordenar]" #. TRANSLATORS: One of the possible way to group annotated answer sheets #. together to PDF files: make one PDF file per student, with all his pages. #. This is a menu entry. #: ../AMC-gui.pl:902 msgid "One file per student" msgstr "Um ficheiro por estudante" #. TRANSLATORS: One of the possible way to group annotated answer sheets #. together to PDF files: make only one PDF with all students sheets. This is #. a menu entry. #: ../AMC-gui.pl:904 msgid "One file for all students" msgstr "Um ficheiro para todos os estudantes" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we #. only select pages where the student has written something (in separate #. answer sheet mode, these are the pages from the answer sheet and not the #. pages from the subject). #: ../AMC-gui.pl:907 msgid "Only pages with answers" msgstr "Só páginas com respostas" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we #. take the pages were the students has nothing to write (often question pages #. from a subject with separate answer sheet option) from the subject. #: ../AMC-gui.pl:909 msgid "Question pages from subject" msgstr "Páginas com questões obtidas do assunto" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we #. take the pages were the students has nothing to write (often question pages #. from a subject with separate answer sheet option) from the correction. #: ../AMC-gui.pl:911 msgid "Question pages from correction" msgstr "Páginas com questões para correção" #: ../AMC-gui.pl:914 msgid "All students" msgstr "Todos os estudantes" #: ../AMC-gui.pl:916 msgid "Selected students" msgstr "Estudantes selecionados" #: ../AMC-gui.pl:918 msgid "Please select..." msgstr "Por favor, selecione..." #. TRANSLATORS: One of the ways exam was made: each student has a different #. answer sheet with a different copy number - no photocopy was made. This is #. a menu entry. #. TRANSLATORS: This is a title for the AMC mode where the distributed exam #. papers are all different (different paper numbers at the top) -- photocopy #. is not used. #: ../AMC-gui.pl:920 ../AMC-gui.pl:2981 msgid "Different answer sheets" msgstr "Diferentes folhas de resposta" #. TRANSLATORS: One of the ways exam was made: some students have the same #. exam subject, as some photocopies were made before distributing the #. subjects. This is a menu entry. #. TRANSLATORS: This is a title for the AMC mode where some answer sheets have #. been photocopied before being distributed to the students. #: ../AMC-gui.pl:922 ../AMC-gui.pl:2986 msgid "Some answer sheets were photocopied" msgstr "Alguns exames/inquéritos foram fotocopiados" #. TRANSLATORS: One of the ways to send mail: use sendmail command. This is a #. menu entry. #: ../AMC-gui.pl:924 msgid "sendmail" msgstr "sendmail" #. TRANSLATORS: One of the ways to send mail: use a SMTP server. This is a #. menu entry. #: ../AMC-gui.pl:926 msgid "SMTP" msgstr "SMTP" #: ../AMC-gui.pl:927 msgid "None [SMTP security]" msgstr "Nenhum [segurança SMTP]" #: ../AMC-gui.pl:936 msgid "Standard" msgstr "Padrão" #: ../AMC-gui.pl:938 msgid "Separate answer sheet" msgstr "Folha de respostas separada" #: ../AMC-gui.pl:940 ../AMC-gui.pl:2683 ../AMC-gui.pl:2701 msgid "Answer sheet first" msgstr "Folha de respostas em primeiro lugar" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. #: ../AMC-gui.pl:944 msgid "nothing" msgstr "nada" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. #: ../AMC-gui.pl:946 msgid "circle" msgstr "círculo" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. Here, a cross. #: ../AMC-gui.pl:948 msgid "mark" msgstr "pontuação" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. Here, the box outline. #: ../AMC-gui.pl:950 msgid "box" msgstr "caixa" #: ../AMC-gui.pl:1045 #, perl-format msgid "" "Exporting to '%s' needs some perl modules that are not installed: %s. Please" " install these modules or switch to another export format." msgstr "" "Exportar para '%s' requere alguns módulos perl que não estão instalados: %s." " Por favor, instale os módulos ou mude para outro formato de exportação." #: ../AMC-gui.pl:1068 msgid "" "When referring to a particular answer in the export, the letter used will be" " the one found in the catalog. However, the catalog has not yet been built. " "Do you want to build it now?" msgstr "" "Quando se referir a uma particular resposta na exportação, a letra usada " "será encontrada no Catálogo. No entanto, o catálogo ainda não foi " "construído. Pretende construir o catálogo agora?" #: ../AMC-gui.pl:1104 msgid "Exporting marks..." msgstr "Exportar as pontuações..." #: ../AMC-gui.pl:1143 #, perl-format msgid "Export to %s did not work: file not created..." msgstr "Exportar para %s não funcionou: ficheiro não criado..." #. TRANSLATORS: One of the popup menu that appears when right-clicking on a #. page in the data capture diagnosis table. Choosing this entry, an image #. will be opened to see where the corner marks were detected. #: ../AMC-gui.pl:1152 ../AMC-gui.pl:4996 msgid "page adjustment" msgstr "ajuste de página" #. TRANSLATORS: One of the popup menu that appears when right-clicking on a #. page in the data capture diagnosis table. Choosing this entry, a window #. will be opened were the user can see all boxes on the scans and how they #. were filled by the students, and correct detection of ticked-or-not if #. needed. #: ../AMC-gui.pl:1154 ../AMC-gui.pl:4996 msgid "boxes zooms" msgstr "ampliação das caixas" #: ../AMC-gui.pl:1225 #, perl-format msgid "You requested to delete all data capture results for %d page(s)" msgstr "Pediu que fossem apagadas todas as capturas de %d página(s)" #: ../AMC-gui.pl:1226 msgid "All data and image files related to these pages will be deleted." msgstr "" "Todos os dados e imagens relacionados com essas páginas serão apagados." #: ../AMC-gui.pl:1227 msgid "Do you really want to continue?" msgstr "Quer mesmo continuar?" #: ../AMC-gui.pl:1405 #, perl-format msgid "" "Following command could not be run: %s, perhaps due to a poor " "configuration?" msgstr "" "O comando seguinte não pode ser executado: %s. Será devido a uma má " "configuração?" #: ../AMC-gui.pl:1450 #, perl-format msgid "Current directory: %s" msgstr "Pasta atual: %s" #: ../AMC-gui.pl:1509 msgid "Existing projects:" msgstr "Projetos existentes:" #. TRANSLATORS: Window title when creating a new project. #: ../AMC-gui.pl:1514 msgid "New AMC project" msgstr "Novo projeto AMC" #: ../AMC-gui.pl:1519 msgid "Projects management:" msgstr "Gestão de projetos" #: ../AMC-gui.pl:1520 msgid "Change project name:" msgstr "Mude o nome do projeto:" #: ../AMC-gui.pl:1525 msgid "Back" msgstr "Preto" #. TRANSLATORS: Window title when managing projects. #: ../AMC-gui.pl:1528 msgid "AMC projects management" msgstr "Gestão de projetos AMC" #: ../AMC-gui.pl:1550 #, perl-format msgid "You don't have any MC project in directory %s!" msgstr "A pasta '%s' não contém projetos AMC!" #: ../AMC-gui.pl:1559 ../AMC-gui-choix_projet.glade:260 msgid "Choose directory" msgstr "Escolha a pasta" #: ../AMC-gui.pl:1604 #, perl-format msgid "You can't change project %s since it's open." msgstr "Não pode mudar o projeto %s depois de aberto." #: ../AMC-gui.pl:1626 #, perl-format msgid "This will clone project %s to a new project %s." msgstr "" "O projeto %s será duplicado, constituindo um novo projeto %s." #. TRANSLATORS: Message when you want to create an AMC project with name xxx, #. but there already exists a directory in the projects directory with this #. name! #: ../AMC-gui.pl:1697 #, perl-format msgid "Directory %s already exists, so you can't choose this name." msgstr "A pasta %s já existe. Não pode escolher esse nome." #: ../AMC-gui.pl:1743 msgid "Destination project directory already exists" msgstr "A pasta destinada ao projeto já existe." #: ../AMC-gui.pl:1755 msgid "Copying project..." msgstr "Copiando o projeto..." #: ../AMC-gui.pl:1780 msgid "Your project has been copied" msgstr "O seu projeto foi copiado." #: ../AMC-gui.pl:1781 #, perl-format msgid "(%d files out of %d)" msgstr "(%d ficheiros de %d)" #: ../AMC-gui.pl:1788 msgid "Source project directory not found" msgstr "Pasta de projeto não encontrada" #: ../AMC-gui.pl:1796 #, perl-format msgid "An error occuried during project copy: %s." msgstr "Um erro ocorreu durante a cópia do projeto: %s." #: ../AMC-gui.pl:1817 #, perl-format msgid "You asked to remove project %s." msgstr "Você pediu para remover o projeto %s." #: ../AMC-gui.pl:1818 msgid "" "This will permanently erase all the files of this project, including the " "source file as well as all the files you put in the directory of this " "project, as the scans for example." msgstr "" "Essa ação apagará permanentemente todos os arquivos deste projeto, incluindo" " o arquivo fonte assim como todos os arquivos que colocou na pasta deste " "projeto, tal como as digitalizações." #: ../AMC-gui.pl:1819 msgid "Is this really what you want?" msgstr "É mesmo isto que pretende?" #: ../AMC-gui.pl:1876 #, perl-format msgid "You selected directory %s as a project to open." msgstr "Selecionou a pasta %s como o projeto a abrir." #: ../AMC-gui.pl:1877 msgid "" "However, this directory does not seem to contain a project. Do you still " "want to try?" msgstr "" "No entanto, esta pasta não parece ter um projeto. Pretende tentar abrir?" #: ../AMC-gui.pl:1894 #, perl-format msgid "You selected project %s from directory %s." msgstr "Selecionou o projeto %s da pasta %s." #: ../AMC-gui.pl:1895 msgid "" "Do you want to copy this project to your projects directory before opening " "it?" msgstr "" "Pretende copiar este projeto para a pasta dos seus projetos antes de o " "abrir?" #: ../AMC-gui.pl:1965 #, perl-format msgid "The name %s is already used in the projects directory." msgstr "O nome %s já está em uso na pasta de projetos." #: ../AMC-gui.pl:1966 msgid "You must choose another name to create a project." msgstr "Deve escolher outro nome para criar um projeto." #: ../AMC-gui.pl:2005 msgid "LaTeX packages:" msgstr "Pacotes LaTeX:" #: ../AMC-gui.pl:2006 msgid "Commands:" msgstr "Comandos:" #: ../AMC-gui.pl:2007 msgid "Fonts:" msgstr "Fontes:" #: ../AMC-gui.pl:2022 msgid "" "Your AMC version and LaTeX style file version differ. Even if the documents " "are properly generated, this can lead to many problems using AMC.\n" msgstr "" "A sua versão AMC e estilo LaTeX diferem. Mesmo que os documentos sejam " "apropriadamente gerados, tal pode levar a vários problemas usando o AMC.\n" #: ../AMC-gui.pl:2023 msgid "" "Please check your installation to get matching AMC and LaTeX style file " "versions.\n" msgstr "" "Por favor, verifique a instalação por forma a mesma versão do AMC e do " "ficheiro de estilo do LaTeX.\n" #: ../AMC-gui.pl:2024 #, perl-format msgid "" "AMC version: %s\n" "sty version: %s\n" "sty path: %s" msgstr "" "Versão AMC: %s\n" "versão sty: %s\n" "\"path\" do sty: %s" #: ../AMC-gui.pl:2052 msgid "Documents update..." msgstr "Atualização de documentos..." #: ../AMC-gui.pl:2076 msgid "Problems while preparing documents" msgstr "Problemas ao preparar os documentos" #: ../AMC-gui.pl:2078 msgid "Problems while processing the source file." msgstr "Problemas ao processar o ficheiro fonte." #: ../AMC-gui.pl:2081 msgid "You have to correct the source file and re-run documents update." msgstr "" "Tem que corrigir o arquivo fonte e voltar a executar a atualização de " "documentos." #: ../AMC-gui.pl:2085 msgid "Errors" msgstr "Erros" #: ../AMC-gui.pl:2086 msgid "Only first ten errors written" msgstr "Apenas os primeiros dez erros estão escritos" #: ../AMC-gui.pl:2089 msgid "Warnings" msgstr "Avisos" #: ../AMC-gui.pl:2090 msgid "Only first ten warnings written" msgstr "Foram escritos apenas os primeiros dez avisos" #. TRANSLATORS: Here, %s will be replaced with the translation of "Command #. output details", and refers to the small expandable part at the bottom of #. AMC main window, where one can see the output of the commands lauched by #. AMC. #: ../AMC-gui.pl:2095 #, perl-format msgid "See also the processing log in '%s' below." msgstr "Veja também o \"log\" do processamento em '%s', em baixo." #. TRANSLATORS: Title of the small expandable part at the bottom of AMC main #. window, where one can see the output of the commands lauched by AMC. #: ../AMC-gui.pl:2097 ../AMC-gui-main_window.glade:2570 msgid "Command output details" msgstr "Detalhes de saída do comando executado" #: ../AMC-gui.pl:2098 msgid "Use LaTeX editor or latex command for a precise diagnosis." msgstr "Use um editor LaTeX ou um comando LaTeX para um diagnóstico preciso." #: ../AMC-gui.pl:2113 msgid "Documents have been prepared" msgstr "Os documentos estão preparados" #: ../AMC-gui.pl:2143 msgid "Working documents successfully generated." msgstr "Os documentos de trabalho foram gerados com sucesso." #. TRANSLATORS: Here, "them" refers to the working documents. #: ../AMC-gui.pl:2145 msgid "You can take a look at them double-clicking on the list." msgstr "Pode visionar selecionando da lista com duplo-click." #. TRANSLATORS: Here, "they" refers to the working documents. #: ../AMC-gui.pl:2147 msgid "If they are correct, proceed to layouts detection..." msgstr "Se estão corretos, proceda para a deteção de marcas de página." #: ../AMC-gui.pl:2169 msgid "Your question has a separate answers sheet." msgstr "A sua questão tem uma folha de respostas em separado." #: ../AMC-gui.pl:2170 msgid "In this case, letters are shown inside boxes." msgstr "Neste caso, as letras estão dentro das caixas." #: ../AMC-gui.pl:2171 msgid "Your question is set to present labels inside the boxes to be ticked." msgstr "" "A sua questão está preparada para apresentar anotações dentro das caixas que" " são colocadas." #. TRANSLATORS: Here, %s will be replaced with the translation of "darkness #. threshold". #: ../AMC-gui.pl:2174 #, perl-format msgid "" "For better ticking detection, ask students to fill out completely boxes, and" " choose parameter \"%s\" around 0.5 for this project." msgstr "" "Para melhor deteção das marcas, solicite aos estudantes para preencherem " "completamente as caixas e indique aproximadamente 0.5 para o parâmetro " "\"%s\", neste projeto. " #: ../AMC-gui.pl:2175 #, perl-format msgid "At the moment, this parameter is set to %.02f." msgstr "De momento, este parâmetro é %.02f." #: ../AMC-gui.pl:2176 msgid "Would you like to set it to 0.5?" msgstr "Pretende modificá-lo para 0.5?" #. TRANSLATORS: This parameter is the ratio of dark pixels number over total #. pixels number inside box above which a box is considered to be ticked. #: ../AMC-gui.pl:2178 msgid "darkness threshold" msgstr "limiar de negrura" #: ../AMC-gui.pl:2199 msgid "" "Papers analysis was already made on the basis of the current working " "documents." msgstr "" "A análise dos testes/inquéritos foi feita com base nos atuais documentos de " "trabalho." #: ../AMC-gui.pl:2200 msgid "You already made the examination on the basis of these documents." msgstr "Já fez o teste/inquérito baseado nestes documentos." #: ../AMC-gui.pl:2201 msgid "" "If you modify working documents, you will not be capable any more of " "analyzing the papers you have already distributed!" msgstr "" "Se modificar os documentos de trabalho, não será capaz de analizar as os " "testes/inquéritos que já distribuiu." #: ../AMC-gui.pl:2202 ../AMC-gui.pl:2229 msgid "Do you wish to continue?" msgstr "Pretende continuar?" #: ../AMC-gui.pl:2203 ../AMC-gui.pl:2230 msgid "" "Click on OK to erase the former layouts and update working documents, or on " "Cancel to cancel this operation." msgstr "" "Escolha OK para apagar os antigos formatos (\"layouts\") e atualizar os " "documentos de trabalho, ou escolha Cancel para cancelar a operação." #: ../AMC-gui.pl:2204 ../AMC-gui.pl:2231 msgid "To allow the use of an already printed question, cancel!" msgstr "Para permitir o uso de uma questão já impressa, cancele!" #: ../AMC-gui.pl:2227 msgid "Layouts are already calculated for the current documents." msgstr "Os formatos foram calculados para os documentos atuais." #: ../AMC-gui.pl:2228 msgid "" "Updating working documents, the layouts will become obsolete and will thus " "be erased." msgstr "" "Ao atualizar os documentos de trabalho, os formatos tornam-se obsoletos e " "serão apagados." #: ../AMC-gui.pl:2258 #, perl-format msgid "" "To handle properly %s files, AMC needs the following components, that" " are currently missing:" msgstr "" "Para lidar apropriadamente com arquivos %s, o AMC precisa dos " "seguintes componentes em falta:" #: ../AMC-gui.pl:2270 msgid "Install these components on your system and try again." msgstr "Instale os seguintes componentes no seu sistema e tente de novo." #. TRANSLATORS: Message when the user required printing the question paper, #. but it is not present (probably the working documents have not been #. properly generated). #: ../AMC-gui.pl:2405 msgid "" "You don't have any question to print: please check your source file and " "update working documents first." msgstr "" "Não tem nenhuma questão a imprimir: por favor verifique o ficheiro fonte e " "atualize, primeiro, os documentos de trabalho." #. TRANSLATORS: Message when AMC does not know about the subject pages that #. has been generated. Usualy this means that the layout computation step has #. not been made. #: ../AMC-gui.pl:2422 msgid "Question's pages are not detected." msgstr "Página de questões não detetada." #: ../AMC-gui.pl:2423 msgid "Perhaps you forgot to compute layouts?" msgstr "Talvez se tenha esquecido de calcular os formatos?" #: ../AMC-gui.pl:2445 #, perl-format msgid "" "You chose the printing method '%s' but it is not available (%s). Please " "install the missing dependencies or switch to another printing method." msgstr "" "Escolheu o método de impressão '%s' mas não está disponível (%s). Por favor," " instale as dependências ou mude para outro método de impressão." #: ../AMC-gui.pl:2466 msgid "" "You chose a printing method using CUPS but there are no configured printer " "in CUPS. Please configure some printer or switch to another printing method." msgstr "" "Escolheu um método de impressão que usa o sistema CUPS mas não existe " "nenhuma impressora disponível no CUPS. Configure outra impressão ou escolhe " "outro método." #. TRANSLATORS: This is the title of the column containing the paper's numbers #. (1,2,3,...) in the table showing all available papers, from which the user #. will choose those he wants to print. #: ../AMC-gui.pl:2533 msgid "papers" msgstr "folhas" #: ../AMC-gui.pl:2622 msgid "You did not select any exam to print..." msgstr "Não selecionou nenhum exame para imprimir..." #: ../AMC-gui.pl:2641 ../AMC-gui.pl:2657 msgid "You selected only a few sheets to print." msgstr "Selecionou apenas algumas páginas para impressão." #: ../AMC-gui.pl:2642 msgid "" "As students are requested to write on more than one page, you must create as" " many exam sheets as necessary for all your students, with different sheets " "numbers, and print them all." msgstr "" "Quando é requerido aos estudantes que escrevam mais que uma página, devem " "ser criados tantos exames quantos os alunos, e com diferentes números nas " "páginas, e devem ser todas impressas." #: ../AMC-gui.pl:2643 msgid "" "If you print one or several sheets and photocopy them to have enough for all" " the students, you won't be able to continue with AMC!" msgstr "" "Se imprimir e fotocopiar algumas páginas para ter exames para todos os " "alunos, não poderá continuar a usar o AMC!" #: ../AMC-gui.pl:2644 msgid "Do you want to print the selected sheets anyway?" msgstr "Pretende imprimir as páginas selecionadas mesmo assim?" #: ../AMC-gui.pl:2658 msgid "" "Are you going to photocopy some printed subjects before giving them to the " "students?" msgstr "" "Vai fotocopiar alguns \"subjects\" impressos antes de os entregar aos " "estudantes?" #: ../AMC-gui.pl:2659 msgid "If so, the corresponding option will be set for this project." msgstr "Se sim, a opção correspondente será selecionada para este projeto." #: ../AMC-gui.pl:2660 msgid "" "However, you will be able to change this when giving your first scans to " "AMC." msgstr "" "No entanto, é possível mudar a opção quando entregar as digitalizações ao " "AMC." #. TRANSLATORS: the two %s will be replaced by the translations of "Answer #. sheet first" and "Extracting method". #: ../AMC-gui.pl:2682 #, perl-format msgid "" "You selected the '%s' option, that uses '%s', so the %s has been set to '%s'" " for you." msgstr "" "Selecionou a opção '%s', que usa '%s', e assim %s foi selecionado para " "'%s'." #: ../AMC-gui.pl:2684 ../AMC-gui-edit_preferences.glade:902 msgid "Extracting method" msgstr "Método de extração" #: ../AMC-gui.pl:2700 #, perl-format msgid "" "You selected the '%s' option, but this option needs 'qpdf' or 'pdftk' to be " "installed on your system. Please install one of these and try again." msgstr "" "Selecionou a opção '%s', mas esta opção precisa que um dos comandos: 'qpdf' " "ou 'pdftk', esteja instalado no seu sistema. Por favor, instale um destes e " "tente de novo." #: ../AMC-gui.pl:2741 msgid "Print papers one by one..." msgstr "Imprima as folhas uma por uma..." #: ../AMC-gui.pl:2790 msgid "" "Working documents are in an old format, which is not supported anymore." msgstr "" "Os documentos de trabalho estão num formato antigo, que já não é suportado." #: ../AMC-gui.pl:2791 msgid "Please generate again the working documents!" msgstr "Por favor, volte a gerar os documentos de trabalho!" #: ../AMC-gui.pl:2805 msgid "Detecting layouts..." msgstr "Reconhecendo os formatos..." #: ../AMC-gui.pl:2823 msgid "No layout detected." msgstr "Formatos não detetados." #: ../AMC-gui.pl:2824 msgid "" "Don't go through the examination before fixing this problem, " "otherwise you won't be able to use AMC for correction." msgstr "" "Não avance para o exame sem resolver este problema. Caso contrário " "não poderá usar o AMC para correção." #: ../AMC-gui.pl:2830 msgid "Layouts are detected." msgstr "Os formatos foram reconhecidos." #: ../AMC-gui.pl:2831 #, perl-format msgid "" "You can check all is correct clicking on button %s and looking at " "question pages to see if red boxes are well positioned." msgstr "" "Pode verificar se tudo está correto selecionando o botão %s e " "observando nas páginas se as caixas vermelhas estão bem posicionadas." #: ../AMC-gui.pl:2831 ../AMC-gui-main_window.glade:560 msgid "Check layouts" msgstr "Verificar os formatos" #: ../AMC-gui.pl:2832 msgid "Then you can proceed to printing and to examination." msgstr "Depois pode proceder para a impressão e depois o exame." #: ../AMC-gui.pl:2905 msgid "No layout for this project." msgstr "Sem formatos neste projeto." #. TRANSLATORS: Here, the first %s will be replaced with "Layout detection" (a #. button title), and the second %s with "Preparation" (the tab title where #. one can find this button). #: ../AMC-gui.pl:2907 #, perl-format msgid "Please use button %s in %s before manual data capture." msgstr "" "Por favor, use o botão %s em %s antes da captura manual." #: ../AMC-gui.pl:2908 ../AMC-gui-main_window.glade:508 msgid "Layout detection" msgstr "Reconhecimento de formatos" #: ../AMC-gui.pl:2909 ../AMC-gui-main_window.glade:684 msgid "Preparation" msgstr "Preparação" #: ../AMC-gui.pl:2947 #, perl-format msgid "Pre-allocate sheet ids from the page numbers, starting at %d" msgstr "" "Pré-alocação do código de página (\"id\") a partir do número de página, " "começando em %d." #: ../AMC-gui.pl:2978 msgid "Automatic data capture can be done in two different modes:" msgstr "Captura automática de dados em dois modos diferentes." #: ../AMC-gui.pl:2983 msgid "" "In the most robust one, you give a different exam (with a different exam " "number) to every student. You must not photocopy subjects before " "distributing them." msgstr "" "No modo mais robusto, dá-se um exame diferente (ie, com um número diferente " "de exame) a cada estudante. Não deve fotopiar exames com a finalidade de os " "distribuir." #: ../AMC-gui.pl:2988 msgid "" "In the second one (which can be used only if answer sheets to be scanned " "have one page per candidate) you can photocopy answer sheets and give the " "same subject to different students." msgstr "" "No segundo (que só pode ser usado se a folha de respostas for única, por " "cada candidato), pode fotocopiar a folha de respostas e dar o mesmo " "\"subject\" a diferentes alunos." #: ../AMC-gui.pl:2989 msgid "After the first automatic capture, you can't switch to the other mode." msgstr "" "Depois da primeira captura automática, não poderá mudar para outro modo." #: ../AMC-gui.pl:3163 msgid "Automatic data capture..." msgstr "Captura automática..." #: ../AMC-gui.pl:3174 msgid "Automatic data capture has been completed" msgstr "A captura automática terminou." #: ../AMC-gui.pl:3183 #, perl-format msgid "" "Some of the pages you submitted (%d of them) have already been processed " "before. Old data has been overwritten." msgstr "" "Algumas das páginas submetidas (%d do total) já foram processadas " "anteriormente. Os dados antigos forem rescritos." #. TRANSLATORS: Names list file : (none) #: ../AMC-gui.pl:3271 msgid "(none)" msgstr "(nenhum)" #: ../AMC-gui.pl:3292 #, perl-format msgid "Unsuitable names file: %d errors, first on line %d." msgstr "Arquivo de nomes inapropriados: %d erros, o primeiro na linha %d." #. TRANSLATORS: Here, do not translate 'name' and 'surname' (except in #. french), as the column names in the students list file has to be named in #. english in order to be properly detected. #: ../AMC-gui.pl:3309 #, perl-format msgid "" "Found %d empty names in names file %s. Check that name or " "surname column is present, and always filled." msgstr "" "Encontrados %d nomes vazios no arquivo de nomes %s. Verifique que a " "coluna name ou surname estão presentes, e sempre preenchidas." #: ../AMC-gui.pl:3310 ../AMC-gui.pl:3326 msgid "Edit the names file to correct it, and re-read." msgstr "Edite o arquivo de nomes para os corrigir e volte a lê-los." #: ../AMC-gui.pl:3326 #, perl-format msgid "Found duplicate names: %s. Check that all names are different." msgstr "" "Encontrados nomes duplicados: %s. Confirme que todos os nomes são " "diferentes." #. TRANSLATORS: Here, %s will be replaced with the name of the tab "Data #. capture". #: ../AMC-gui.pl:3358 #, perl-format msgid "" "Before associating names to papers, you must choose a students list file in " "tab \"%s\"." msgstr "" "Antes de associar nomes aos exames, deve escolher a listagem de estudantes " "no \"tab\" \"%s\"." #. One of the "notify the user at the end of the following actions" checkbox: #. for automatic data capture. #: ../AMC-gui.pl:3359 ../AMC-gui-edit_preferences.glade:1584 #: ../AMC-gui-main_window.glade:1286 msgid "Data capture" msgstr "Captura de dados" #: ../AMC-gui.pl:3368 msgid "" "Please choose a key from primary keys in students list before association." msgstr "" "Por favor, selecione uma chave nas chaves primárias da listagem de " "estudantes antes da associação." #: ../AMC-gui.pl:3377 msgid "" "Please choose a code (made with LaTeX command \\AMCcodeGrid or equivalent) " "before automatic association." msgstr "" "Por favor escolha um código (realizado com o comando LaTeX \\AMCcodeGrid " "ou equivalente) antes da associação automática." #. TRANSLATORS: Here, %s will be replaced with "Students identification", #. which refers to a paragraph in the tab "Marking" from AMC main window. #: ../AMC-gui.pl:3422 #, perl-format msgid "" "Before associating names to papers, you must choose a students list file in " "paragraph \"%s\"." msgstr "" "Antes de associar nomes aos exames, deve escolher a listagem de estudantes " "no parágrafo \"%s\"." #: ../AMC-gui.pl:3423 msgid "Students identification" msgstr "Identificação do estudante." #: ../AMC-gui.pl:3446 msgid "Automatic association..." msgstr "Associação automática..." #: ../AMC-gui.pl:3468 #, perl-format msgid "Automatic association completed: %d students recognized." msgstr "Associação automática compeleta: %d estudantes reconhecidos." #. TRANSLATORS: Here %s and %s will be replaced with two parameters names: #. "Primary key from this list" and "Code name for automatic association". #: ../AMC-gui.pl:3470 #, perl-format msgid "Please check \"%s\" and \"%s\" values and try again." msgstr "Por favor, verifique os valores \"%s\" e \"%s\" e tente de novo." #: ../AMC-gui.pl:3471 msgid "Primary key from this list" msgstr "Chave primária desta lista." #: ../AMC-gui.pl:3472 msgid "Code name for automatic association" msgstr "Nome do código identificador para associação automática" #: ../AMC-gui.pl:3478 msgid "" "Automatic association is now finished. You can ask for manual association to" " check that all is fine and, if necessary, read manually students names " "which have not been automatically identified." msgstr "" "A associação automática está terminada. Pode usar a associação manual para " "verificar que tudo está bem, e se necessário, ler manualmente os nomes dos " "estudantes que não foram automaticamente identificados." #: ../AMC-gui.pl:3640 #, perl-format msgid "" "Some manual association data has be found, which will be lost if the primary" " key is changed. Do you want to switch back to the primary key \"%s\" and " "keep association data?" msgstr "" "Foram encontradas algumas associações manuais que serão perdidas se a chave " "primária for alterada. Pretende voltar a usar a chame primária \"%s\" e " "manter as associações?" #: ../AMC-gui.pl:3666 #, perl-format msgid "" "The primary key from the students list has been set to \"%s\", which is not " "the value from the association data." msgstr "" "A chave primária da listagem de alunos selecionada é '%s', que não é o valor" " associado aos dados." #: ../AMC-gui.pl:3667 msgid "" "Automatic papers/students association will be re-run to update the " "association data." msgstr "" "O processo automático de associação de estudantes/exames será novamente " "executado para atualizar as associações." #: ../AMC-gui.pl:3693 #, perl-format msgid "Papers are not yet corrected: use button \"%s\"." msgstr "Os exames ainda não foram corrigidos: use o botão \"%s\"." #. TRANSLATORS: This is a button: "Mark" is here an action to be called by the #. user. When clicking this button, the user requests scores to be computed #. for all students. #: ../AMC-gui.pl:3695 ../AMC-gui-main_window.glade:1363 msgid "Mark" msgstr "Pontuação" #: ../AMC-gui.pl:3736 msgid "Extracting marking scale..." msgstr "Extraindo a escala de pontuação..." #: ../AMC-gui.pl:3940 msgid "Computing marks..." msgstr "Calculando as pontuações..." #: ../AMC-gui.pl:3945 msgid "Grading has been completed" msgstr "As classificações estão prontas." #. TRANSLATORS: This is the marks mean for all students. #: ../AMC-gui.pl:3961 #, perl-format msgid "Mean: %.2f" msgstr "Média: %.2f" #: ../AMC-gui.pl:3964 msgid "No marks computed" msgstr "Nenhuma pontuação foi calculada" #: ../AMC-gui.pl:3983 msgid "Pre-association" msgstr "Pré-associação" #: ../AMC-gui.pl:3997 msgid "No students list file" msgstr "Nenhum ficheiro de estudantes" #: ../AMC-gui.pl:3999 msgid "No primary key from students list file" msgstr "O ficheiro com os estudantes não tem uma chave primária" #: ../AMC-gui.pl:4005 #, perl-format msgid "Missing identification for %d answer sheets" msgstr "Estão em falta %d folhas de resposta ao exame" #: ../AMC-gui.pl:4007 msgid "All completed answer sheets are associated with a student name" msgstr "" "Todas as folhas de resposta completas estão associadas ao nome do estudante" #: ../AMC-gui.pl:4061 msgid "exam ID" msgstr "ID do exame" #: ../AMC-gui.pl:4076 msgid "student" msgstr "estudante" #. TRANSLATORS: File name for single annotated answer sheets with only some #. selected students. Please use simple characters. #: ../AMC-gui.pl:4207 msgid "Selected_students" msgstr "Estudantes_selecionados" #. TRANSLATORS: File name for single annotated answer sheets with all #. students. Please use simple characters. #: ../AMC-gui.pl:4209 msgid "All_students" msgstr "Todos_os_estudantes" #: ../AMC-gui.pl:4257 msgid "Annotating papers..." msgstr "Anotando a correção em cada exame" #: ../AMC-gui.pl:4261 msgid "Annotations have been completed" msgstr "As anotações de correção estão prontas" #: ../AMC-gui.pl:4375 #, perl-format msgid "Project \"%s\" preferences" msgstr "Preferências do projeto \"%s\"" #: ../AMC-gui.pl:4378 msgid "Project preferences" msgstr "Preferências do projeto" #: ../AMC-gui.pl:4484 #, perl-format msgid "" "You modified \"%s\" value, which is the default value used when " "creating new projects. Do you want to change also \"%s\" for the " "opened %s project?" msgstr "" "Modificou o valor \"%s\", que é o valor por omissão usando quando se " "cria um projeto novo. Pretende mudar \"%s\" para o projeto já aberto" " %s ?" #: ../AMC-gui.pl:4600 msgid "Working documents are not readable" msgstr "Os documentos de trabalho não podem ser lidos" #: ../AMC-gui.pl:4603 msgid "No working documents" msgstr "Sem documentos de trabalho" #: ../AMC-gui.pl:4606 msgid "Working documents last update:" msgstr "Última atualização dos documentos de trabalho:" #: ../AMC-gui.pl:4662 msgid "No layout" msgstr "Sem formato" #: ../AMC-gui.pl:4665 #, perl-format msgid "Processed %d pages" msgstr "%d páginas processadas" #: ../AMC-gui.pl:4668 msgid "but some defects were detected." msgstr "mas alguns defeitos foram detectados" #: ../AMC-gui.pl:4680 msgid "" "The \\namefield command is not used. Writing subjects without name field is " "not recommended" msgstr "" "O comando \\namefield não foi usado. Escrever assuntos sem o nome do campo " "não é apropriado" #: ../AMC-gui.pl:4681 msgid "" "The \\namefield command is used several times for the same subject. This " "should not be the case, as each student should write his name only once" msgstr "" "O comando \\namefield foi usado várias vezes para o mesmo assunto. Não deve " "ser o caso, cada aluno deve escrever o seu nome uma só vez." #: ../AMC-gui.pl:4682 msgid "No box to be ticked" msgstr "Nenhuma caixa foi marcada." #: ../AMC-gui.pl:4683 msgid "" "The corner marks and binary boxes are not at the same location on all pages" msgstr "" "As marcas de canto e as caixas de escolha não estão todas na mesma " "localização em todas as páginas" #: ../AMC-gui.pl:4684 msgid "" "Some material has been placed out of the page. This is often a result of a " "multiple columns question group starting too close from the page bottom. In " "such a case, use \"needspace\"." msgstr "" "Alguma material ficou fora da página escrita. Por vezes, esta situação " "ocorre quando há colunas múltiplas a começarem próximo do fundo da página. " "Em tais casos, use \"needspace\"." #: ../AMC-gui.pl:4705 msgid "" "Some potential defects were detected for this subject. Correct them in the " "source and update the working documents." msgstr "" "Alguns defeitos foram detectados neste assunto. Corrija-o na fonte e " "atualize os documentos de trabalho." #: ../AMC-gui.pl:4711 #, perl-format msgid "(See for example pages %s and %s)" msgstr "(Veja, por exemplo, as páginas %s e %s.)" #: ../AMC-gui.pl:4716 #, perl-format msgid "(Concerns %1$d pages, see for example page %2$s)" msgstr "(Sobre as %1$d páginas, veja o exemplo na página %2$s)" #: ../AMC-gui.pl:4723 #, perl-format msgid "(Concerns %1$d exams, see for example sheet %2$d)" msgstr "(Sobre %1$d exames, veja por exemplo a folha %2$d)" #: ../AMC-gui.pl:4840 #, perl-format msgid "Data capture from %d complete papers and %d incomplete papers" msgstr "Digitalização de %d exames completos e %d exames incompletos " #: ../AMC-gui.pl:4844 #, perl-format msgid "Data capture from %d complete papers" msgstr "Digitalização de %d folhas de exame" #. TRANSLATORS: this text points out that no data capture has been made yet. #: ../AMC-gui.pl:4849 msgid "No data" msgstr "Sem dados" #: ../AMC-gui.pl:4856 #, perl-format msgid "Overwritten pages: %d" msgstr "Página re-escritas: %d" #: ../AMC-gui.pl:4864 msgid "All scans were properly recognized." msgstr "Todas as digitalizações estão apropriadamente reconhecidas." #: ../AMC-gui.pl:4871 #, perl-format msgid "%d scans were not recognized." msgstr "%d digitalizações não foram reconhecidas." #. TRANSLATORS: column title for the list of overwritten pages. This refers to #. the page from the question #: ../AMC-gui.pl:4895 msgid "Page" msgstr "Página" #. TRANSLATORS: column title for the list of overwritten pages. This refers to #. the number of times the page has been overwritten. #: ../AMC-gui.pl:4900 msgid "count" msgstr "contagem" #. TRANSLATORS: column title for the list of overwritten pages. This refers to #. the date of the last data capture for the page. #: ../AMC-gui.pl:4905 msgid "Date" msgstr "Data" #: ../AMC-gui.pl:4946 msgid "Looking for analysis..." msgstr "Procurando uma análise..." #: ../AMC-gui.pl:4988 msgid "Automatic data capture now completed." msgstr "O reconhecimento terminou agora ." #: ../AMC-gui.pl:4989 #, perl-format msgid "It is not complete (missing pages from %d papers)." msgstr "Não está completo (faltam páginas de %d folhas)." #: ../AMC-gui.pl:4990 msgid "" "You can analyse data capture quality with some indicators values in analysis" " list:" msgstr "" "Pode analisar a qualidade do reconhecimento dos dados com alguns indicadores" " da lista analisada:" #: ../AMC-gui.pl:4992 #, perl-format msgid "" "- %s represents positioning gap for the four corner marks. Great " "value means abnormal page distortion." msgstr "" "- %s representa o distenciamento das quatro marcas de canto. Valores " "grande significam uma página anormalmente distorcida." #: ../AMC-gui.pl:4994 #, perl-format msgid "" "- great values of %s are seen when darkness ratio is very close to " "the threshold for some boxes." msgstr "" "- valores grandes de %s são encontrados quando o nível de negrito é " "muito próximo ao limiar de certas caixas." #: ../AMC-gui.pl:4996 #, perl-format msgid "" "You can also look at the scan adjustment (%s) and ticked and unticked" " boxes (%s) using right-click on lines from table %s." msgstr "" "Pode observar os parâmetros da digitalização (%s), as caixas marcadas" " ou não marcadas (%s), usando o botão direito do rato nas linhas da " "tabela %s." #: ../AMC-gui.pl:4996 msgid "Diagnosis" msgstr "Diagnóstico" #: ../AMC-gui.pl:5024 msgid "Pages that miss data capture to complete students sheets:" msgstr "" "Páginas em que há falta de dados para completar os exames dos estudantes:" #: ../AMC-gui.pl:5145 #, perl-format msgid "Error loading scan %s" msgstr "Erro ao carregar a digitalização %s" #: ../AMC-gui.pl:5151 msgid "No scan selected" msgstr "Nenhuma digitalização foi selecionada" #: ../AMC-gui.pl:5156 msgid "No more unrecognized scans" msgstr "Não existem mais digitalizações reconhecidas" #: ../AMC-gui.pl:5234 msgid "Making diagnostic image..." msgstr "Construindo uma imagem de diagnóstico..." #: ../AMC-gui.pl:5304 msgid "(no description)" msgstr "(sem descrição)" #. TRANSLATORS: This is a column title for the list of files to be included in #. a template being created. #. TRANSLATORS: This is the title of a column containing attachments file #. paths in a table showing all attachments, when sending them to the students #. by email. #: ../AMC-gui.pl:5389 ../AMC-gui.pl:6336 msgid "file" msgstr "ficheiro" #: ../AMC-gui.pl:5469 msgid "Add files to template" msgstr "Adicione ficheiros ao modelo" #: ../AMC-gui.pl:5490 msgid "" "When making a template, you can only add files that are within the project " "directory." msgstr "" "Quando fizer um modelo, pode adicionar apenas ficheiros que estão na pasta " "do projeto." #. TRANSLATORS: This is a column name for the list of available templates, #. when creating a new project based on a template. #: ../AMC-gui.pl:5613 msgid "template" msgstr "modelo" #: ../AMC-gui.pl:5658 msgid "All source files" msgstr "Todos os ficheiros fonte" #: ../AMC-gui.pl:5676 #, perl-format msgid "%s files" msgstr "%s ficheiros" #: ../AMC-gui.pl:5710 msgid "Archive (zip, tgz)" msgstr "Arquivo (zip,tgz)" #: ../AMC-gui.pl:5739 #, perl-format msgid "Nothing extracted from archive %s. Check it." msgstr "Nada foi extraído do arquivo %s. Verifique." #: ../AMC-gui.pl:5868 #, perl-format msgid "" "File %s already exists in project directory: do you want to replace it?" msgstr "O ficheiro %s já existe na pasta do projeto: pretende substituí-lo?" #: ../AMC-gui.pl:5869 msgid "" "Click yes to replace it and loose pre-existing contents, or No to cancel " "source file import." msgstr "" "Click em Yes para substituir e perder o conteúdo existente, ou No para " "cancelar a importação do ficheiro fonte." #: ../AMC-gui.pl:5885 msgid "The source file has been copied to project directory." msgstr "O ficheiro donte foi copiado para a pata do projeto." #: ../AMC-gui.pl:5885 #, perl-format msgid "You can now edit it with button \"%s\" or with any editor." msgstr "Pode agora editar com o botão \"%s\" ou com outro editor." #: ../AMC-gui.pl:5885 ../AMC-gui-main_window.glade:241 msgid "Edit source file" msgstr "Editar o ficheiro fonte." #: ../AMC-gui.pl:5893 #, perl-format msgid "Error copying source file: %s" msgstr "Erro ao copiar o ficheiro fonte: %s" #: ../AMC-gui.pl:6078 msgid "" "In order to send a useful bug report, please attach the following documents:" msgstr "" "De modo a nos enviar um relatório útil sobre um problema, por favor anexe os" " seguintes documentos:" #: ../AMC-gui.pl:6079 msgid "" "an archive (in some compressed format, like ZIP, 7Z, TGZ...) containing the " "project directory, scan files and configuration " "directory (.AMC.d in home directory), so as to reproduce and analyse " "this problem." msgstr "" "um arquivo (em algum formato compacto como ZIP, 7Z, TGZ...) contendo a " "pasta do porjeto, ficheiros digitalizados e a pasta de " "configuração (.AMC.d na pasta \"home\"), por forma a reproduzir e " "analisar o problema." #: ../AMC-gui.pl:6080 msgid "" "the log file produced when the debugging mode (in Help menu) is " "checked. Please try to reproduce the bug with this mode activated." msgstr "" "O log file produzido em modo de depuração (no menu \"Help\" ) está " "marcada. Por favor, tente reproduzir este problema com este modo ativo." #: ../AMC-gui.pl:6081 #, perl-format msgid "Bug reports can be filled at %s or sent to the address below." msgstr "" "Relatórios de erros podem ser preenchidos em %s ou enviados para o endereço " "abaixo." #: ../AMC-gui.pl:6082 ../AMC-gui.pl:6086 msgid "AMC community site" msgstr "Sítio Comunitário do AMC" #: ../AMC-gui.pl:6149 msgid "Attach file" msgstr "Ficheiro anexado" #: ../AMC-gui.pl:6183 msgid "There are no annotated corrected answer sheets to send." msgstr "Não existem folhas de respostas corrigidas para serem enviadas." #: ../AMC-gui.pl:6186 msgid "" "Please group the annotated sheets to PDF files to be able to send them." msgstr "" "Por favor, grave os exames corrigidos em formato PDF para que possam ser " "enviados." #: ../AMC-gui.pl:6187 msgid "" "Please annotate answer sheets and group them to PDF files to be able to send" " them." msgstr "" "Por favor, grave os exames corrigidos em formato PDF para que possam ser " "enviados." #: ../AMC-gui.pl:6218 #, perl-format msgid "" "Sending emails requires some perl modules that are not installed: %s. Please" " install these modules and try again." msgstr "" "O envio de emails requer alguns módulos \"Perl\" que não estão instalados: " "%s. Por favor, instale-os e tente novamente." #: ../AMC-gui.pl:6239 msgid "" "SMTP security mode \"STARTTLS\" is only available with Email::Sender version" " 1.300027 and over. Please install a newer version of this perl module or " "change SMTP security mode, and try again." msgstr "" "SMTP security mode \"STARTTLS\" is only available with Email::Sender version" " 1.300027 and over. Please install a newer version of this perl module or " "change SMTP security mode, and try again." #: ../AMC-gui.pl:6255 #, perl-format msgid "The email address you entered (%s) is not correct." msgstr "O endereço de email introduzido (%s) não está correto." #: ../AMC-gui.pl:6257 msgid "Please edit your preferences to correct your email address." msgstr "" "Por favor, altere as suas preferências para corrigir o endereço e email." #: ../AMC-gui.pl:6259 msgid "You did not enter your email address." msgstr "Não introduziu um endereço de email." #: ../AMC-gui.pl:6260 msgid "Please edit the preferences to set your email address." msgstr "Por favor altere as preferências e indique o seu email." #: ../AMC-gui.pl:6283 #, perl-format msgid "" "The sendmail program cannot be found at the location you specified in" " the preferences (%s). Please update your configuration." msgstr "" "O programa sendmail não pode ser encontrado na localização indicada " "nas preferencias (%s). Por favor, atualize a configuração." #: ../AMC-gui.pl:6303 msgid "" "No email addresses has been found in the students list file. You need to " "write the students addresses in a column of this file." msgstr "" "Não foram encontrados emails de alunos no ficheiro. É necessário escrever os" " endereços de email na coluna deste ficheiro." #. TRANSLATORS: This is the title of a column containing copy numbers in a #. table showing all annotated answer sheets, when sending them to the #. students by email. #: ../AMC-gui.pl:6351 msgid "copy" msgstr "cópia" #. TRANSLATORS: This is the title of a column containing students email #. addresses in a table showing all annotated answer sheets, when sending them #. to the students by email. #: ../AMC-gui.pl:6363 msgid "email" msgstr "email" #. TRANSLATORS: This is the title of a column containing mailing status (not #. sent, already sent, failed) in a table showing all annotated answer sheets, #. when sending them to the students by email. #: ../AMC-gui.pl:6369 msgid "status" msgstr "estado" #: ../AMC-gui.pl:6388 msgid "failed" msgstr "falhou" #: ../AMC-gui.pl:6446 msgid "Some files you asked to be attached to the emails are missing:" msgstr "Alguns ficheiros que indicou para anexar ao email estão em falta:" #: ../AMC-gui.pl:6447 msgid "Please create them or remove them from the list of attached files." msgstr "Por favor, crie ou remova-os da lista de ficheiros anexos." #: ../AMC-gui.pl:6499 msgid "Sending emails..." msgstr "Enviando os emails." #: ../AMC-gui.pl:6508 msgid "Cancelled." msgstr "Cancelado." #: ../AMC-gui.pl:6510 msgid "SMTP authentication failed: check SMTP configuration and password." msgstr "SMTP authentication failed: check SMTP configuration and password." #: ../AMC-gui.pl:6512 #, perl-format msgid "%d message(s) has been sent." msgstr "%d mensage(ns) foram enviadas." #: ../AMC-gui.pl:6552 msgid "Set exam name" msgstr "\"Set\" o nome do exame." #: ../AMC-gui.pl:6559 ../AMC-gui-edit_preferences.glade:4154 msgid "Examination name" msgstr "Nome do exame" #: ../AMC-gui.pl:6563 ../AMC-gui-edit_preferences.glade:4165 msgid "Code (short name) for examination" msgstr "Código (nome curto) do exame" #. TRANSLATORS: This is the title of a column containing all columns names #. from the students list file, when choosing which columns has to be exported #. to the spreadsheets. #: ../AMC-gui.pl:6613 msgid "column" msgstr "coluna" #: ../AMC-gui.pl:6621 msgid "" msgstr "" #: ../AMC-gui.pl:6622 msgid "" msgstr "" #: ../AMC-gui.pl:6623 msgid "" msgstr " " #: ../AMC-gui.pl:6657 msgid "Install an AMC plugin" msgstr "Instalar um \"plugin\" do AMC" #: ../AMC-gui.pl:6662 msgid "Plugins (zip, tgz)" msgstr "\"Plugin\" (zip, tgz)" #: ../AMC-gui.pl:6682 #, perl-format msgid "" "An error occured while trying to extract files from the plugin archive: %s." msgstr "" "Um erro ocorreu enquanto se tentava extrair of ficheiros do arquivo contendo" " o plugin: %s" #: ../AMC-gui.pl:6696 msgid "Nothing extracted from the plugin archive. Check it." msgstr "Nada foi extraído do arquivo de pluin. Verifique-o." #: ../AMC-gui.pl:6706 msgid "" "This is not a valid plugin, as it contains more than one directory at the " "first level." msgstr "" "Não é um plugin válido, pois contém mais que uma pasta no primeiro nível." #: ../AMC-gui.pl:6717 msgid "" "This is not a valid plugin, as it does not contain a perl/AMC subdirectory." msgstr "Nâo é um plugin válido porque não contém uma subpasta perl/AMC." #: ../AMC-gui.pl:6734 #, perl-format msgid "" "A plugin is already installed with the same name (%s). Do you want to delete" " the old one and overwrite?" msgstr "" "Um plugin já está instalado com o mesmo nome (%s). Pretende apagar o antigo " "e reescrever-lo?" #: ../AMC-gui.pl:6752 #, perl-format msgid "Error while moving the plugin to the user plugin directory: %s" msgstr "Erro ao mover o plugin para a pasta de plugins do utilizador: %s" #: ../AMC-gui.pl:6762 msgid "Please restart AMC before using the new plugin..." msgstr "Por favor, reinicie o AMC antes de usar o novo plugin." #: ../AMC-gui.pl:6814 msgid "zooms" msgstr "ampliação" #: ../AMC-gui.pl:6815 msgid "" "boxes images are extracted from the scans while processing automatic data " "capture. They can be removed if you don't plan to use the zooms dialog to " "check and correct boxes categorization. They can be recovered processing " "again automatic data capture from the same scans." msgstr "" "as imagens das caixas de marcação são extraídas das digitalizações durante o" " processo automático de análise. As imagens das caixas de marcação podem ser" " removidas se não pretender usar as caixas de diálogo de ampliação para " "verificar e corrigir as categorias das caixas de marcação." #: ../AMC-gui.pl:6827 msgid "layout reports" msgstr "relatório dos formatos" #: ../AMC-gui.pl:6828 msgid "" "these images are intended to show how the corner marks have been recognized " "and positioned on the scans. They can be safely removed once the scans are " "known to be well-recognized. They can be recovered processing again " "automatic data capture from the same scans." msgstr "" "estas imagens têm a intenção de mostrar como as marcas dos cantos foram " "reconhecidas e posicionadas nas digitalizações. Elas podem ser removidas com" " segurança logo que as digitalizações sejam bem processadas. Podem ser " "recuperadas novamente com o processamento automático das digitalizações a " "partir dos mesmos documentos digitalizados." #: ../AMC-gui.pl:6843 msgid "annotated pages" msgstr "páginas com anotação das correções" #: ../AMC-gui.pl:6844 msgid "" "jpeg annotated pages are made before beeing assembled to PDF annotated " "files. They can safely be removed, and will be recovered automatically the " "next time annotation will be requested." msgstr "" "os ficheiros jpeg com anotações da correção são construídos antes da criação" " dos ficheiros PDF com anotações da correção. Os ficheiros jpeg podem ser " "removidos com segurança e serão automaticamente recuperados num próximo " "pedido de anotação de correção dos testes." #: ../AMC-gui.pl:6874 msgid "Total size of concerned files:" msgstr "Número total de ficheiros relacionados:" #: ../AMC-gui.pl:6923 #, perl-format msgid "%s files were removed." msgstr "%s ficheiros serão removidos." #: ../AMC-gui.pl:6949 #, perl-format msgid "I don't find the command %s." msgstr "Não se encontra o comando %s." #: ../AMC-gui.pl:6950 msgid "Perhaps LaTeX is not installed?" msgstr "Será que o LaTeX não está instalado?" #. TRANSLATORS: Do not translate 'auto-multiple-choice latex-link', which is a #. command to be typed on MacOsX #: ../AMC-gui.pl:6954 msgid "" "The style file automultiplechoice.sty seems to be unreachable. Try to use " "command 'auto-multiple-choice latex-link' as root to fix this." msgstr "" "O ficheiro de estilo automultiplechoice.sty parece estar inacessível. Tente " "usar o comando 'auto-multiple-choice latex-link' como raiz para resolver " "este problema." #: ../AMC-prepare.pl:274 #, perl-format msgid "%d/%d good answers not coherent for a simple question" msgstr "" "%d/%d de respostas corretas não estão coerentes no contexto de uma Questão " "Simples." #: ../AMC-prepare.pl:357 #, perl-format msgid "question ID used several times for the same paper: \"%s\"" msgstr "o ID de questão foi usado várias vezes na mesma folha: \"%s\"" #: ../AMC-prepare.pl:444 #, perl-format msgid "" "An answer appears to be given outside a question environment, after question" " \"%s\"" msgstr "" "Uma resposta parece estar a ser fornecida fora do enquadramento de uma " "Questão, após a Questão \"%s\"." #: ../AMC-prepare.pl:453 #, perl-format msgid "Answer number ID used several times for the same question: %s" msgstr "A resposta número ID foi usada várias vezes na mesma Questão: %s" #: ../AMC-prepare.pl:708 #, perl-format msgid "%d errors during LaTeX compiling" msgstr "ocorreram %d erros durante a compilação LaTeX" #: ../AMC-prepare.pl:768 #, perl-format msgid "" "LaTeX command configured is not present (%s). Install it or change " "configuration, and then rerun." msgstr "" "Não se encontra o comando LaTeX configurado (%s). Instale-o ou mude a " "configuração e volte a executar. " #: ../AMC-prepare.pl:797 msgid "solution" msgstr "solução" #: ../AMC-prepare.pl:812 msgid "catalog" msgstr "catálogo" #: ../AMC-prepare.pl:845 msgid "question sheet" msgstr "Folha de questões" #: ../AMC-prepare.pl:873 #, perl-format msgid "" "please remove accentuated or non-standard characters from the following " "question ID: \"%s\"" msgstr "" "por favor, remova as letras acentuadas ou letras não 'standard' da questão " "com o seguinte ID: \"%s\"" #: ../AMC-prepare.pl:875 msgid "" "some question IDs seems to have accentuated or non-standard characters. This" " may break future processings." msgstr "" "alguns ID de questões parecem ter letras com acentuação ou caracteres não " "padrão." #: ../AMC-read-pdfform.pl:136 msgid "Reading PDF forms..." msgstr "A ler os formulários/inquéritos/exames PDF..." #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:592 msgid "Name [name column title in exported spreadsheet]" msgstr "Nome [o nome da coluna na exportando na planilha]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:594 msgid "Mark [mark column title in exported spreadsheet]" msgstr "Pontuação [coluna de pontuação exportada na planilha]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:596 msgid "Exam [exam number column title in exported spreadsheet]" msgstr "Exame [coluna com o número do exame exportado na planilha]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:598 msgid "Score [total score column title in exported spreadsheet]" msgstr "Soma(?) [coluna com a soma total exportada na planilha]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:600 msgid "Max [maximum score column title in exported spreadsheet]" msgstr "Máx [coluna com a máxima pontuação na planilha exportada]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:604 msgid "max [maximum score row name in exported spreadsheet]" msgstr "máx [coluna com o nome da linha na planilha expotada]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:606 msgid "mean [means of scores row name in exported spreadsheet]" msgstr "" "média [coluna com as médias de pontuação das linhas na planilha exportada]" #. TRANSLATORS: This is the default text to be written on the top of the first #. page of each paper when annotating. From this string, %s will be replaced #. with the student final mark, %m with the maximum mark he can obtain, %S #. with the student total score, and %M with the maximum score the student can #. obtain. #: ../AMC-perl/AMC/Config.pm:319 msgid "Mark: %s/%m (total score: %S/%M)" msgstr "Pontuação: %s/%m (total: %S/%M)" #. TRANSLATORS: Subject of the emails which can be sent to the students to #. give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:344 msgid "Exam result" msgstr "Resultado do exame" #. TRANSLATORS: Body text of the emails which can be sent to the students to #. give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:346 msgid "" "Please find enclosed your annotated completed answer sheet.\n" "Regards." msgstr "" "Segue, em anexo, o seu exame corrigido.\n" "Cumprimentos." #. TRANSLATORS: Message (first part) when some of the commands that are given #. in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:598 msgid "Some commands allowing to open documents can't be found:" msgstr "" "Alguns comandos que permitem abrir documentos não podem ser encontrados:" #. TRANSLATORS: Message (second part) when some of the commands that are given #. in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:601 msgid "Please check its correct spelling and install missing software." msgstr "Por favor, verifique a ortografia e instale o software em falta." #. TRANSLATORS: Message (third part) when some of the commands that are given #. in the preferences cannot be found. The %s will be replaced with the name #. of the menu entry "Preferences" and the name of the menu "Edit". #: ../AMC-perl/AMC/Config.pm:603 #, perl-format msgid "You can change used commands following %s from menu %s." msgstr "Pode mudar comandos habituais seguindo %s no menu %s." #. TRANSLATORS: "Preferences" menu #: ../AMC-perl/AMC/Config.pm:605 ../AMC-gui-main_window.glade:2706 msgid "Preferences" msgstr "Preferências" #. TRANSLATORS: "Edit" menu #: ../AMC-perl/AMC/Config.pm:607 msgid "Edit" msgstr "Editar" #. TRANSLATORS: Error writing one of the configuration files (global or #. project). The first %s will be replaced with the path of that file, and the #. second with the error text. #: ../AMC-perl/AMC/Config.pm:841 #, perl-format msgid "Error writing configuration file %s: %s" msgstr "Erro ao escrever o ficheiro de configuração %s: %s" #: ../AMC-perl/AMC/DataModule/association.pm:103 msgid "Fetching association results from old format XML files..." msgstr "" "Recolhendo resultados de associação dos antigos formatos de ficheiros XML..." #: ../AMC-perl/AMC/DataModule/capture.pm:210 msgid "Including zooms in the database..." msgstr "Incluindo as ampliações na base de dados..." #: ../AMC-perl/AMC/DataModule/capture.pm:229 #: ../AMC-perl/AMC/DataModule/capture.pm:237 msgid "Building capture database indexes..." msgstr "Construindo o índice das bases de dados..." #: ../AMC-perl/AMC/DataModule/capture.pm:279 msgid "Fetching data capture results from old format XML files..." msgstr "Recolhendo os dados das digitalizações de formatos antigos em XML..." #: ../AMC-perl/AMC/DataModule/layout.pm:222 msgid "Building layout database indexes..." msgstr "Construindo a base de dados dos índices de formatos ..." #: ../AMC-perl/AMC/DataModule/layout.pm:288 msgid "Fetching layout data from old format XML files..." msgstr "Recolhendo dados de formatos de antigos ficheiros XML..." #: ../AMC-perl/AMC/DataModule/scoring.pm:256 msgid "Fetching scoring data from old format XML files..." msgstr "Recolhendo dados de pontuações de antigos ficheiros XML..." #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the total number of sheets. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:236 msgid "ALL" msgstr "TODOS" #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the number of sheets for which the question did not get an answer. Please #. let this label short. #: ../AMC-perl/AMC/Export/ods.pm:238 msgid "NA" msgstr "NA" #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the number of sheets for which the question got an invalid answer. Please #. let this label short. #: ../AMC-perl/AMC/Export/ods.pm:240 msgid "INVALID" msgstr "INVALIDO" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains the reference of the boxes. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:268 msgid "Box" msgstr "Caixa" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains the number of items (ticked boxes, or invalid or empty questions). #. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:271 msgid "Nb" msgstr "Nb" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains percentage of questions for which the corresponding box is ticked #. over all questions. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:274 msgid "/all" msgstr "/all" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains percentage of questions for which the corresponding box is ticked #. over the expressed questions (counting only questions that did not get #. empty or invalid answers). Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:277 msgid "/expr" msgstr "/expr" #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the number of sheets for which the question got the "none of the above are #. correct" answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:305 msgid "NONE" msgstr "NONE" #. TRANSLATORS: table name in the exported ODS spreadsheet for the table that #. contains the marks. #: ../AMC-perl/AMC/Export/ods.pm:883 ../AMC-perl/AMC/Gui/Notes.glade:8 msgid "Marks" msgstr "Marcas" #. TRANSLATORS: Label of the table with questions basic statistics in the #. exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1310 msgid "Questions statistics" msgstr "Estatísticas das questões" #. TRANSLATORS: Label of the table with indicative questions basic statistics #. in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1317 msgid "Indicative questions statistics" msgstr "Estatísticas indicatórias sobre as questões" #. TRANSLATORS: Label of the table with a legend (explaination of the colors #. used) in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1327 ../AMC-perl/AMC/Export/ods.pm:1331 msgid "Legend" msgstr "Legenda" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that have not been asked to some students. #: ../AMC-perl/AMC/Export/ods.pm:1337 msgid "Non applicable" msgstr "Não aplicável" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that have not been answered. #: ../AMC-perl/AMC/Export/ods.pm:1341 msgid "No answer" msgstr "Nenhuma resposta" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that have not been answered, but are cancelled by the use #. of allowempty scoring strategy. #: ../AMC-perl/AMC/Export/ods.pm:1345 msgid "Cancelled" msgstr "Cancelado" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1349 msgid "Invalid answer" msgstr "Resposta inválida" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1354 msgid "Correct answer" msgstr "Resposta correta" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1358 msgid "Wrong answer" msgstr "Resposta errada" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the indicative questions. #: ../AMC-perl/AMC/Export/ods.pm:1363 msgid "Indicative" msgstr "Indicativo" #: ../AMC-perl/AMC/Export/ods.pm:1391 msgid "" "An old state of the exported file seems to be already opened. Use " "File/Reload from OpenOffice/LibreOffice to refresh." msgstr "" "Um antigo estado do ficheiro exportado parece já estar aberto. Use " "Ficheiro/Recarregar no OpenOffice/LibreOffice para atualizar." #: ../AMC-perl/AMC/Filter/plain.pm:92 msgid "" "Please code your student number opposite, and write your name in the box " "below." msgstr "" "Por favor, indique o seu número mecanográfio ao lado e escreva o seu nome na" " caixa abaixo." #. TRANSLATORS: Message when the Pages option used in AMC-TXT can't be parsed. #. %s will be replaced with the option value #: ../AMC-perl/AMC/Filter/plain.pm:209 #, perl-format msgid "Pages option value can't be understood: %s" msgstr "" "Não se consegue \"ler\" o valor na página de opções (\"Pages option value " "can't be understood\"): %s" #: ../AMC-perl/AMC/Filter/plain.pm:238 #, perl-format msgid "Line %d" msgstr "Linha %d" #. TRANSLATORS: Error text for AMC-TXT parsing, when opening a new question #. whereas the previous question has less than two choices #: ../AMC-perl/AMC/Filter/plain.pm:249 msgid "Previous question has less than two choices" msgstr "A questão anterior tem menos de duas escolhas" #. TRANSLATORS: Error text for AMC-TXT parsing #: ../AMC-perl/AMC/Filter/plain.pm:258 #, perl-format msgid "Previous question is a simple question but has %d correct choice(s)" msgstr "A questão anterior é uma Questão Simples mas tem %d opções correta(s)" #: ../AMC-perl/AMC/Filter/plain.pm:342 msgid "" "Invalid encoding: you must use UTF-8, but your source file was saved using " "another encoding" msgstr "" "Codificação de fonte inválida: deve usar UTF-8 mas o seu ficheiro fonte foi " "gravado noutra codificação." #: ../AMC-perl/AMC/Filter/plain.pm:368 #, perl-format msgid "File not found: %s" msgstr "Ficheiro não encontrado: %s" #. TRANSLATORS: Error text for AMC-TXT parsing, when an unknown option is #. given a value #: ../AMC-perl/AMC/Filter/plain.pm:386 #, perl-format msgid "Unknown option: %s" msgstr "Opção desconhecida: %s" #. TRANSLATORS: Error text for AMC-TXT parsing when a choice is given but no #. question were opened #: ../AMC-perl/AMC/Filter/plain.pm:456 msgid "Choice outside question" msgstr "Opção fora da questão" #: ../AMC-perl/AMC/Filter/plain.pm:1240 #, perl-format msgid "" "The following fonts does not seem to be installed on the system: %s." msgstr "" "As fontes indicadas não parecem estar instaladas no seu sistema: %s." #: ../AMC-perl/AMC/Filter/register.pm:78 msgid "No description available." msgstr "Sem descrição disponível." #: ../AMC-perl/AMC/Gui/Association.pm:133 msgid "" "Names images not found... Maybe you forgot using \\namefield command in " "LaTeX source?" msgstr "" "Ficheiros de imagem com nomes não encontrados...Talvez se tenha esquecido de" " usar o comando LaTeX \\namefield no original!" #: ../AMC-perl/AMC/Gui/Association.pm:690 msgid "Sheet" msgstr "Folha" #: ../AMC-perl/AMC/Gui/Association.pm:728 msgid "End" msgstr "Fim" #: ../AMC-perl/AMC/Gui/Manuel.pm:117 msgid "Page layout" msgstr "Formato da págin" #: ../AMC-perl/AMC/Gui/Manuel.pm:125 msgid "Original" msgstr "Original" #: ../AMC-perl/AMC/Gui/Manuel.pm:126 ../AMC-gui-edit_preferences.glade:2138 msgid "Scan" msgstr "Digitalização" #. TRANSLATORS: This is one of the choices for pages navigation in manual data #. capture window. Here, navigation goes through all pages. Please keep this #. text very short (say less than 5 letters) so that the window is not too #. large #: ../AMC-perl/AMC/Gui/Manuel.pm:130 ../AMC-perl/AMC/Gui/Manuel.pm:146 msgid "all" msgstr "todos" #. TRANSLATORS: This is one of the choices for pages navigation in manual data #. capture window. Here, navigation goes through pages with some invalid #. answers. Please keep this text very short (say less than 5 letters) so that #. the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:132 msgid "inv" msgstr "inv" #. TRANSLATORS: This is one of the choices for pages navigation in manual data #. capture window. Here, navigation goes through pages with empty or invalid #. answers. Please keep this text very short (say less than 5 letters) so that #. the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:134 msgid "i&e" msgstr "i&e" #: ../AMC-perl/AMC/Gui/Manuel.pm:184 msgid "page" msgstr "página" #: ../AMC-perl/AMC/Gui/Manuel.pm:531 #, perl-format msgid "" "This is a template exam that you cannot edit. To create a new exam from this" " one to be edited, use the '%s' button." msgstr "" "Este é um modelo de exame que não pode editar. Para criar um novo exame a " "partir deste para ser editado, use o notão '%s'." #: ../AMC-perl/AMC/Gui/Manuel.pm:531 ../AMC-perl/AMC/Gui/Manuel.glade:406 msgid "Add photocopy" msgstr "Adicionar uma fotocópia" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms #. window #: ../AMC-perl/AMC/Gui/Zooms.pm:76 msgid "drag and drop" msgstr "arraste e largue" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms #. window #: ../AMC-perl/AMC/Gui/Zooms.pm:78 msgid "click" msgstr "clique" #: ../AMC-perl/AMC/Gui/Zooms.pm:126 ../AMC-perl/AMC/Gui/Zooms.pm:413 #, perl-format msgid "Boxes zooms for page %s" msgstr "Ampliações das caixas para a página %s" #: ../AMC-perl/AMC/Gui/Zooms.pm:402 ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "" "You moved some boxes to correct automatic data query, but this work is not " "saved yet." msgstr "" "Moveu algumas caixas para corrigir determinados reconhecimentos automáticos " "mas essas alterações ainda não foram gravadas." #: ../AMC-perl/AMC/Gui/Zooms.pm:402 msgid "" "Do you want to save these modifications before looking at another page?" msgstr "Pretende gravar estas modificações antes de observar outra página?" #: ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "Dou you really want to close and ignore these modifications?" msgstr "Pretende mesmo fechar e ignorar estas modificações?" #: ../AMC-perl/AMC/Print/cups.pm:71 #, perl-format msgid "Perl module(s) missing: %s" msgstr "Módulo(s) Perl em falta: %s" #: ../AMC-perl/AMC/Print/cupslp.pm:47 #, perl-format msgid "The following commands are missing: %s." msgstr "Os seguintes comandos estão em falta: %s." #: ../AMC-perl/AMC/Export/register/CSV.pm:70 msgid "Separator" msgstr "Separador" #: ../AMC-perl/AMC/Export/register/CSV.pm:83 msgid "Ticked boxes" msgstr "Caixas marcadas" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'No, don't group questions by scope in the exported ODS #. file' #: ../AMC-perl/AMC/Export/register/CSV.pm:89 #: ../AMC-perl/AMC/Export/register/ods.pm:124 msgid "No" msgstr "Não" #: ../AMC-perl/AMC/Export/register/CSV.pm:90 #: ../AMC-perl/AMC/Export/register/CSV.pm:91 msgid "Yes:" msgstr "Sim:" #: ../AMC-perl/AMC/Export/register/CSV.pm:97 #: ../AMC-perl/AMC/Export/register/ods.pm:152 msgid "Choose columns" msgstr "Escolha as colunas" #. TRANSLATORS: List of students with their scores: one of the export formats. #: ../AMC-perl/AMC/Export/register/List.pm:37 msgid "PDF list" msgstr "Lista de PDF" #: ../AMC-perl/AMC/Export/register/List.pm:64 msgid "Number of columns" msgstr "Número de colunas" #: ../AMC-perl/AMC/Export/register/List.pm:67 msgid "Long list is divided into this number of columns on each page." msgstr "A longa lista foi dividida neste número de colunas em cada página." #: ../AMC-perl/AMC/Export/register/List.pm:71 msgid "Paper size" msgstr "Tamanho da folha" #. TRANSLATORS: Check button label in the exports tab. If checked, a table #. with questions basic statistics will be added to the ODS exported #. spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:82 msgid "Stats table" msgstr "Tabela de estatísticas" #. TRANSLATORS: Menu to export statistics table in the exports tab. The first #. menu entry means 'do not build a stats table' in the exported ODS file. You #. can omit the [...] part, that is here only to state the context. #: ../AMC-perl/AMC/Export/register/ods.pm:89 msgid "None [no stats table to export]" msgstr "Nenhum [sem tabela de estatísticas para exportação]" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second #. menu entry means 'build a stats table, with a horizontal flow' in the #. exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:91 #: ../AMC-perl/AMC/Export/register/ods.pm:106 msgid "Horizontal flow" msgstr "Fluxo horizontal" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second #. menu entry means 'build a stats table, with a vertical flow' in the #. exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:93 #: ../AMC-perl/AMC/Export/register/ods.pm:107 msgid "Vertical flow" msgstr "Fluxo vertical" #. TRANSLATORS: Check button label in the exports tab. If checked, a table #. with indicative questions basic statistics will be added to the ODS #. exported spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:99 msgid "Indicative stats table" msgstr "Tabela indicativa de estatísticas" #: ../AMC-perl/AMC/Export/register/ods.pm:105 msgid "None" msgstr "Nenhum" #: ../AMC-perl/AMC/Export/register/ods.pm:110 msgid "" "Create a table with basic statistics about answers for each indicative " "question?" msgstr "" "Criar uma tabela com estatísticas básicas sobre as respostas para cada " "questão indicativa?" #. TRANSLATORS: Check button label in the exports tab. If checked, sums of the #. scores for groups of questions will be added to the exported table. #: ../AMC-perl/AMC/Export/register/ods.pm:114 msgid "Score groups" msgstr "Grupos de pontuação" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'Yes, group questions by scope in the exported ODS file, and #. report total scores' #: ../AMC-perl/AMC/Export/register/ods.pm:126 msgid "Yes (values)" msgstr "Sim (valores)" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'Yes, group questions by scope in the exported ODS file, and #. report total scores as percentages.' #: ../AMC-perl/AMC/Export/register/ods.pm:128 msgid "Yes (percentages)" msgstr "Sim (percentagens)" #: ../AMC-perl/AMC/Export/register/ods.pm:131 msgid "Add sums of the scores for each question group?" msgstr "Adiciona as somas das pontuações para cada grupo de questões?" #: ../AMC-perl/AMC/Export/register/ods.pm:134 msgid "with scope separator" msgstr "com separador por áreas (\"scope\")" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'No, don't group questions by scope in the exported ODS #. file' #: ../AMC-perl/AMC/Export/register/ods.pm:141 msgid "':'" msgstr "':'" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'Yes, group questions by scope in the exported ODS file, and #. you can detect the scope from a question ID using the text before the #. separator .' #: ../AMC-perl/AMC/Export/register/ods.pm:143 msgid "'.'" msgstr "'.'" #: ../AMC-perl/AMC/Export/register/ods.pm:146 msgid "" "To define groups, use question ids in the form \"group:question\" or " "\"group.question\", depending on the scope separator." msgstr "" "Para definir grupos, use os ids das questões na forma grupo:questão " "(\"group:question\") ou grupo.questão (\"group.question\"), dependendo do " "separador de grupo." #: ../AMC-perl/AMC/Filter/register/latex.pm:54 msgid "" "This is the native format for AMC. LaTeX is not so easy to use for unexperienced users, but the LaTeX power allows the user to build any multiple choice subject. As an example, the following is possible with LaTeX but not with other formats:\n" "* any kind of layout,\n" "* questions with random numerical values,\n" "* use of figures, mathematical formulas\n" "* and much more!" msgstr "" "Este é o o formato original para o AMC. A linguagem LaTeX não é assim tão simples para utilizadores sem experiência em LaTeX mas o LaTeX permite que o autor faça exercícios de escolha múltipla em qualquer tema. Como exemplo, o seguinte é possível em LaTeX mas não noutros formatos:\n" "* definir um qualquer formato de página,\n" "* questões com parâmetros aleatórios,\n" "* utilização de figuras, e fórmulas matemáticas\n" "* e muito mais!" #: ../AMC-perl/AMC/Filter/register/plain.pm:51 msgid "" "This is a plain text format for easy question writting. See the following minimal example:\n" "\n" "Title: Paper title\n" "\n" "* Which is the capital city of Cameroon?\n" "+ Yaounde\n" "- Douala\n" "- Kribi" msgstr "" "Este é um formato em texto simples para ser fácil criar questões. Siga o seguinte exemplo simples:\n" "\n" "Título: título do artigo\n" "\n" "* Qual é a capital da cidade dos Camarões?\n" "+ Yaunde\n" "- Douala\n" "-Kribi" #: ../AMC-gui-apropos.glade:8 msgid "AMC A propos" msgstr "AMC Uma proposta" #: ../AMC-gui-apropos.glade:17 msgid "" "Copyright (C) 2008-2018\n" "Alexis Bienvenüe and the AMC development team" msgstr "" "Copyright (C) 2008-2018\n" "Alexis Bienvenüe and the AMC development team" #: ../AMC-gui-apropos.glade:19 msgid "Automatic multiple choice questionnaires management" msgstr "Gestão de questionários AMC" #: ../AMC-gui-apropos.glade:21 msgid "Visit the AMC website" msgstr "Visite o sítio do AMC" #: ../AMC-gui-choix_pages_impression.glade:33 msgid "Papers printing" msgstr "Impressão de páginas" #: ../AMC-gui-choix_pages_impression.glade:98 msgid "Please select papers you wish to print:" msgstr "POr favor, selecione as páginas a imprimir" #: ../AMC-gui-choix_pages_impression.glade:116 msgid "Select papers you wish to print (ctrl-a for all), then confirm..." msgstr "" "Selecione as páginas a imprimir (ctrl-a para todas), depois confirme..." #: ../AMC-gui-choix_pages_impression.glade:144 msgid "Answer sheet printing" msgstr "Impressão da folha de respostas" #: ../AMC-gui-choix_pages_impression.glade:190 msgid "Printer:" msgstr "Impressora:" #: ../AMC-gui-choix_pages_impression.glade:243 msgid "two-side printing" msgstr "impressão duplex" #: ../AMC-gui-choix_pages_impression.glade:319 msgid "printing options" msgstr "opções de impressão" #: ../AMC-gui-choix_pages_impression.glade:343 msgid "Destination directory" msgstr "Pasta destino" #: ../AMC-gui-choix_pages_impression.glade:356 msgid "Select destination directory for printable files" msgstr "Selecione a pasta destino para os ficheiros de impressão" #: ../AMC-gui-choix_postcorrect.glade:20 msgid "Post-correction" msgstr "Depois da correção" #: ../AMC-gui-choix_postcorrect.glade:95 msgid "" "Please enter the teacher score sheet number and copy number to get the " "correct answers from:" msgstr "" "Por favor, introduza a folha de pontuações do professor e o número da cópia " "para obter as respostas corretas de:" #: ../AMC-gui-choix_postcorrect.glade:189 msgid "Guess simple/multiple status" msgstr "Prever o modo simples/múltiplas" #: ../AMC-gui-choix_postcorrect.glade:194 msgid "" "Sets type of all questions for which 2 or more answers are ticked on the " "teacher answer sheet to multiple" msgstr "" "Ativa o tipo de questão para múltipla quando as quais duas ou mais respostas" " são marcadas na folha de respostas do professor " #: ../AMC-gui-choix_projet.glade:18 msgid "Open a MC project" msgstr "Abre um projeto MC" #: ../AMC-gui-choix_projet.glade:61 ../AMC-gui-liste_dialog.glade:91 msgid "Cancel" msgstr "Cancelar" #: ../AMC-gui-choix_projet.glade:104 ../AMC-gui-main_window.glade:2665 msgid "New project" msgstr "Novo projeto" #: ../AMC-gui-choix_projet.glade:163 msgid "Rename" msgstr "Mudar o nome" #: ../AMC-gui-choix_projet.glade:182 msgid "Clone" msgstr "Copiar (clone)" #: ../AMC-gui-choix_projet.glade:278 msgid "Open an existing MC project:" msgstr "Abre um projeto MC existente" #: ../AMC-gui-choix_projet.glade:345 msgid "Create an new project:" msgstr "Criar um novo projeto" #: ../AMC-gui-choix_projet.glade:364 msgid "Project name:" msgstr "Nome do projeto:" #: ../AMC-gui-choix_projet.glade:398 msgid "" "Note : a project name can only contain alphanumeric characters, plus " "some simple characters (-_+.:)." msgstr "" "Note: o nome dum projeto só pode conter símbolos alfanuméricos, mais " "os símbolos ( - _ + . :)." #: ../AMC-gui-choose-mode.glade:10 msgid "" "Before starting data capture, please choose the mode corresponding to what " "you did with the printed questions." msgstr "" "Antes de iniciar as digitalizações, escolha, por favor, o modo " "correspondente ao que fez nas escolha na impressão das questões" #: ../AMC-gui-choose_columns.glade:8 msgid "Choose columns to export" msgstr "Escolha as colunas a exportar" #: ../AMC-gui-choose_columns.glade:65 msgid "Order and select the columns to include in the exported file:" msgstr "" "Ordene e selecione as colunas a serem incluidas no ficheiro de exportação:" #: ../AMC-gui-choose_students.glade:13 msgid "Choose students" msgstr "Escolha os estudantes" #: ../AMC-gui-choose_students.glade:70 msgid "Select the students for which you want to annotate the score sheet:" msgstr "" "Selecione os estudantes para os quais pretende anotar a folha de pontuações:" #: ../AMC-gui-choose_students.glade:114 msgid "Search:" msgstr "Procura:" #: ../AMC-gui-cleanup.glade:13 ../AMC-gui-main_window.glade:2939 msgid "Cleanup" msgstr "Limpeza" #: ../AMC-gui-cleanup.glade:40 msgid "Remove selected files" msgstr "Remover os arquivos selecionados " #: ../AMC-gui-cleanup.glade:71 msgid "" "To save disk space, you can remove some intermediate files from your project" " directory." msgstr "" "Para poupar espaço em disco, pode remover ficheiros intermédios da pasta do " "seu projeto." #: ../AMC-gui-edit_preferences.glade:230 ../AMC-gui-edit_preferences.glade:243 msgid "LaTeX models directory" msgstr "Pasta do modo LaTeX " #: ../AMC-gui-edit_preferences.glade:232 msgid "" "Please select a directory containing LaTeX models for AMC, with their " "descriptions" msgstr "" "Selecione, por favor, uma pasta contendo os modelos LaTeX para o AMC, com as" " suas descrições" #: ../AMC-gui-edit_preferences.glade:255 msgid "" "Projects directory. May be modified only if there are no opened projects." msgstr "" "Pasta de projetos. Pode ser modificada apenas se não existirem projetos " "abertos." #: ../AMC-gui-edit_preferences.glade:257 msgid "Please select the projects directory" msgstr "Por favor, selecione a pasta dos projetos" #: ../AMC-gui-edit_preferences.glade:268 msgid "Projects directory" msgstr "Pasta dos projetos" #: ../AMC-gui-edit_preferences.glade:283 msgid "Directories" msgstr "Pastas" #: ../AMC-gui-edit_preferences.glade:315 msgid "PDF files" msgstr "Arquivos PDF" #: ../AMC-gui-edit_preferences.glade:326 msgid "Images" msgstr "Imagens" #: ../AMC-gui-edit_preferences.glade:337 msgid "CSV data files" msgstr "Arquivos de dados CSV" #: ../AMC-gui-edit_preferences.glade:348 msgid "OpenOffice files" msgstr "Arquivos OpenOffice" #: ../AMC-gui-edit_preferences.glade:359 msgid "XML files" msgstr "Arquivos XML" #: ../AMC-gui-edit_preferences.glade:370 msgid "Command to edit LaTeX files" msgstr "Comando para editar os arquivos LaTeX" #: ../AMC-gui-edit_preferences.glade:371 msgid "LaTeX editor" msgstr "Editor LaTeX" #: ../AMC-gui-edit_preferences.glade:382 msgid "Plain text editor" msgstr "Editor de texto simples" #: ../AMC-gui-edit_preferences.glade:393 msgid "" "Command for directory browsing (string %d will be replaced by the directory " "path before execution)" msgstr "" "Comando para navegar nas pastas (string %d será substituída pelo caminho " "para a pasta antes da execução)" #: ../AMC-gui-edit_preferences.glade:394 msgid "File browser" msgstr "Navegador de arquivos" #: ../AMC-gui-edit_preferences.glade:405 msgid "Web browser" msgstr "Navegador web" #: ../AMC-gui-edit_preferences.glade:534 msgid "Visualisation commands" msgstr "Comandos para visualização" #: ../AMC-gui-edit_preferences.glade:565 msgid "Default LaTeX engine" msgstr "Motor LaTeX por omissão" #: ../AMC-gui-edit_preferences.glade:576 msgid "" "Default command to compile LaTeX file and make PDF, PS or DVI output (may be" " changed for each project)." msgstr "" "Comando por omissão para compilar arquivos LaTeX e produzir saídas em PDF, " "PS ou DVI (pode ser alterado em cada projeto)." #: ../AMC-gui-edit_preferences.glade:599 msgid "External programs" msgstr "Programas externos" #: ../AMC-gui-edit_preferences.glade:631 #: ../AMC-gui-edit_preferences.glade:4238 msgid "Students list charset" msgstr "Tipo de letra da lista dos estudantes" #: ../AMC-gui-edit_preferences.glade:642 msgid "CSV charset" msgstr "Conjunto de símbolos CSV" #: ../AMC-gui-edit_preferences.glade:653 msgctxt "" "option name. Refers to a list of headers that may contain surnames in the " "CSV names list" msgid "CSV surname headers" msgstr "CSV com apelidos no cabeçalho" #: ../AMC-gui-edit_preferences.glade:664 msgctxt "" "option name. Refers to a list of headers that may contain names in the CSV " "names list." msgid "CSV name headers" msgstr "CSV com nomes no cabeçalho" #: ../AMC-gui-edit_preferences.glade:675 msgid "LaTeX files charset" msgstr "Tipo de letra dos arquivos LaTeX" #: ../AMC-gui-edit_preferences.glade:686 msgid "Default encoding for the students list file." msgstr "Codificação por omissão do arquivo com a lista de estudantes" #: ../AMC-gui-edit_preferences.glade:705 msgid "Default charset for AMC CSV output." msgstr "Tipo de Letra por omissão para o output do AMC CSV" #: ../AMC-gui-edit_preferences.glade:724 msgid "" "Comma separated list of CSV headers of columns that may contain the surnames" " of the students in the names list file." msgstr "" "Lista separada por vírgulas do cabeçalho CSV com colunas que podem conter os" " apelidos no arquivo de nomes de estudantes." #: ../AMC-gui-edit_preferences.glade:738 msgid "" "Comma separated list of CSV headers of columns that may contain the names of" " the students in the names list file." msgstr "" "Lista separada por vírgulas do cabeçalho CSV das colunas que podem conter " "nomes dos estudantes no arquivo de nomes." #: ../AMC-gui-edit_preferences.glade:752 msgid "Charset used when producing LaTeX files from models." msgstr "Tipo de Letra usando quando se produzem arquivos LaTeX dos modelos" #: ../AMC-gui-edit_preferences.glade:769 msgid "Decimal delimiter" msgstr "Delimitador decimal" #: ../AMC-gui-edit_preferences.glade:797 msgid "ASCII filenames" msgstr "Nomes de arquivos ASCII" #: ../AMC-gui-edit_preferences.glade:809 msgid "" "Force all annotated completed student sheets to have only ASCII characters " "in their file names. When set, all non-ASCII characters will be replaced by " "underscores." msgstr "" "Forçar todas as folhas de resposta a terem tipo de letra ASCII nos nomes dos" " ficheiros. Quando ativar, todas as letras não ASCII serão substituídas por " "\"underscores\". " #: ../AMC-gui-edit_preferences.glade:821 msgid "Accept non-ASCII project names" msgstr "Aceita nomes não-ASCII para projetos " #: ../AMC-gui-edit_preferences.glade:848 msgid "Internationalization" msgstr "Internacionalização" #: ../AMC-gui-edit_preferences.glade:880 msgid "Printing method" msgstr "Método de impressão" #: ../AMC-gui-edit_preferences.glade:891 msgid "Printing command" msgstr "Comando para impressão" #: ../AMC-gui-edit_preferences.glade:913 msgid "Useful printing options" msgstr "Opções de impressão úteis" #: ../AMC-gui-edit_preferences.glade:941 msgid "" "Command to print one paper (with stapling). String %f will be replaced by " "the PDF file to be printed." msgstr "" "Comando para imprimir uma folha (com agrafos). A string %f será substituída " "pelo arquivo PDF a ser impresso." #: ../AMC-gui-edit_preferences.glade:984 msgid "Printing" msgstr "Imprimindo" #: ../AMC-gui-edit_preferences.glade:1016 msgid "Number of processes" msgstr "Número de processos" #: ../AMC-gui-edit_preferences.glade:1027 msgid "" "Number of processes to be run in parallel. Default value is 0, which allows " "to start as many processes as processors." msgstr "" "Número de processos a correrem em paralelo. Por omissão é 0, o que permite " "começar com tantos processos como processadores." #: ../AMC-gui-edit_preferences.glade:1044 msgid "System" msgstr "Sistema" #: ../AMC-gui-edit_preferences.glade:1065 msgid "Main" msgstr "Principal" #: ../AMC-gui-edit_preferences.glade:1094 ../AMC-gui-main_window.glade:2771 msgid "Solution" msgstr "Solução" #: ../AMC-gui-edit_preferences.glade:1110 ../AMC-gui-main_window.glade:2783 msgid "Individual solution" msgstr "Solução individual" #: ../AMC-gui-edit_preferences.glade:1125 ../AMC-gui-main_window.glade:2759 msgid "Catalog" msgstr "Catálogo" #: ../AMC-gui-edit_preferences.glade:1147 msgid "Optional working documents to build" msgstr "Documentos opcionais de trabalho a construir" #: ../AMC-gui-edit_preferences.glade:1170 ../AMC-gui-main_window.glade:394 msgid "Documents" msgstr "Documentos" #: ../AMC-gui-edit_preferences.glade:1213 msgid "Limit MSE" msgstr "Limiar MSE" #: ../AMC-gui-edit_preferences.glade:1224 msgid "Limit sensitivity" msgstr "Limiar de sensitividade" #: ../AMC-gui-edit_preferences.glade:1265 msgid "Colouring thresholds" msgstr "Limiar de cor" #: ../AMC-gui-edit_preferences.glade:1299 msgid "No answers color" msgstr "Cor das não-respostas" #: ../AMC-gui-edit_preferences.glade:1310 msgid "Invalid answers color" msgstr "Cor das respostas inválidas" #: ../AMC-gui-edit_preferences.glade:1347 msgid "Scan view" msgstr "Vista da digitalização" #: ../AMC-gui-edit_preferences.glade:1379 msgid "Maximum density for manual data capture question paper rendering (DPI)" msgstr "Densidade máxima de digitalização para a captura manual das questões" #: ../AMC-gui-edit_preferences.glade:1380 msgid "Manual capture density (DPI)" msgstr "Densidade de captura (DPI) manual " #: ../AMC-gui-edit_preferences.glade:1391 msgid "Image type" msgstr "Tipo de imagem" #: ../AMC-gui-edit_preferences.glade:1402 msgid "Remember window size" msgstr "Recordar o tamanho da janela" #. Label in the preferences window, corresponding to "Starting number of #. columns for names in the manual association window". #: ../AMC-gui-edit_preferences.glade:1413 msgid "Number of columns for names" msgstr "Número de colunas dos nomes" #. Label in the preferences window, corresponding to the "Number of columns #. for zoomed boxes in the zooms window (opened from the Diagnosis list in the #. Data capture tab)". #: ../AMC-gui-edit_preferences.glade:1424 msgid "Number of columns for zoomes boxes" msgstr "Número de colunas para as caixas ampliadas" #: ../AMC-gui-edit_preferences.glade:1448 msgid "" "Temporary file type used for manual data capture. Fastest choice is (none), " "but this seems to be problematic in some environments." msgstr "" "Tipo de arquivo temporário usado para a digitalização manual. A escolha mais" " rápida é (none), mas esta pode ser problemática em alguns ambientes." #: ../AMC-gui-edit_preferences.glade:1467 msgid "Do you want to keep the same window size each time you start AMC?" msgstr "Pretende manter o mesmo tamanho de janela cad avez que inicia o AMC?" #: ../AMC-gui-edit_preferences.glade:1480 msgid "Starting number of columns for names in the manual association window." msgstr "Número inicial de colunas de nomes na janela de associação manual" #: ../AMC-gui-edit_preferences.glade:1497 msgid "" "Number of columns for zoomed boxes in the zooms window (opened from the " "Diagnosis list in the Data capture tab)." msgstr "" "Número de colunas para as caixas ampliadas na janela de ampliação (aberta do" " \"tab\" da digitalização de dados, lista de Diagnósticos)." #: ../AMC-gui-edit_preferences.glade:1518 msgid "Miscellaneous" msgstr "Variados" #: ../AMC-gui-edit_preferences.glade:1549 msgid "Notify the user at the end of the following actions:" msgstr "Alerta o utilizador no final das seguintes ações:" #. One of the "notify the user at the end of the following actions" checkbox: #. for documents update. #: ../AMC-gui-edit_preferences.glade:1568 msgid "Documents update" msgstr "Atualização de documentos" #. One of the "notify the user at the end of the following actions" checkbox: #. for computing marks. #: ../AMC-gui-edit_preferences.glade:1600 msgid "Grading" msgstr "Atribuição de classificação" #. One of the "notify the user at the end of the following actions" checkbox: #. for completed answer sheets annotation. #: ../AMC-gui-edit_preferences.glade:1616 #: ../AMC-gui-edit_preferences.glade:3137 msgid "Annotation" msgstr "Anotação" #: ../AMC-gui-edit_preferences.glade:1641 msgid "Notify using:" msgstr "Alertar usando:" #: ../AMC-gui-edit_preferences.glade:1660 msgid "Desktop notifications" msgstr "Alertas no desktop" #: ../AMC-gui-edit_preferences.glade:1696 msgid "Command:" msgstr "Comando:" #: ../AMC-gui-edit_preferences.glade:1708 msgid "" "Command that will be called as a user notification. %m will be replaced by " "AMC's message, and %a by AMC completed action." msgstr "" "Comando que será chamado como alerta ao utilizador. %m será substituído pela" " mensagem AMC's, e %a pela ação AMC completa." #: ../AMC-gui-edit_preferences.glade:1737 msgid "Notifications" msgstr "Notificações" #: ../AMC-gui-edit_preferences.glade:1761 msgid "Display" msgstr "Ecrã" #: ../AMC-gui-edit_preferences.glade:1804 msgid "Vector formats density (DPI)" msgstr "Densidade do formato vetorial (DPI)" #: ../AMC-gui-edit_preferences.glade:1815 msgid "Black&white conversion threshold" msgstr "Limiar de conversão de preto&branco " #: ../AMC-gui-edit_preferences.glade:1826 msgid "Erease red from scans" msgstr "Apaga os vermelhos da digitalização" #: ../AMC-gui-edit_preferences.glade:1837 msgid "Force conversion" msgstr "Força a conversão" #: ../AMC-gui-edit_preferences.glade:1848 msgid "" "Density used when converting vector format scans (PDF, EPS) into bitmap." msgstr "" "Densidade usada quando se converte digitalizações (PDF; EPS) para bitmap." #: ../AMC-gui-edit_preferences.glade:1863 msgid "" "Threshold used when converting scans to black and white. Value 0.0 means all" " white, value 1.0 means all black." msgstr "" "Limiar usado quando se converte uma digitalização para preto&branco. O valor" " 0.0 significa tudo branco, e o valor 1.0 tudo preto." #: ../AMC-gui-edit_preferences.glade:1881 msgid "" "When set, AMC will erease red color from the color scans before automatic " "data capture. This can be useful if the boxes are drawn in red." msgstr "" "When set, AMC will erease red color from the color scans before automatic " "data capture. This can be useful if the boxes are drawn in red." #: ../AMC-gui-edit_preferences.glade:1896 msgid "" "With this option, all scan files will be converted with ImageMagick. This " "can slow down scans processing, but may allow some unusual file formats to " "be processed successfully." msgstr "" "With this option, all scan files will be converted with ImageMagick. This " "can slow down scans processing, but may allow some unusual file formats to " "be processed successfully." #: ../AMC-gui-edit_preferences.glade:1913 msgid "Scans conversion" msgstr "Conversão de digitalizações" #: ../AMC-gui-edit_preferences.glade:1945 msgid "Marks size max increase" msgstr "Aumento máximo das marcas" #: ../AMC-gui-edit_preferences.glade:1956 msgid "Marks size max decrease" msgstr "Redução máxima das marcas" #: ../AMC-gui-edit_preferences.glade:1967 #: ../AMC-gui-edit_preferences.glade:2490 msgid "Can be customized on a per-project basis in the Project tab." msgstr "Pode ser costumizado por projeto no \"Project Tab\"." #: ../AMC-gui-edit_preferences.glade:1968 msgid "Default darkness threshold" msgstr "Limiar de negrito (por omissão)" #: ../AMC-gui-edit_preferences.glade:1979 msgid "Default upper darkness threshold" msgstr "Limiar superior de negrito (por omissão)" #: ../AMC-gui-edit_preferences.glade:1990 msgid "" "Proportion of the box (on the scan) that is measured to compute its " "blackness." msgstr "" "Proporção da caixa (na digitalização) que é medida quando calculado o seu " "volume de negrito" #: ../AMC-gui-edit_preferences.glade:1991 msgid "Measured box proportion" msgstr "Proporção da medida da caixa" #: ../AMC-gui-edit_preferences.glade:2002 msgid "Process scans with 3 corner marks" msgstr "Processando digitalizações com 3 marcas apenas" #: ../AMC-gui-edit_preferences.glade:2013 msgid "" "Maximum increase (proportion: 0.1 means 10%) allowed for corner marks after " "printing/scanning process." msgstr "" "Maximum increase (proportion: 0.1 means 10%) allowed for corner marks after " "printing/scanning process." #: ../AMC-gui-edit_preferences.glade:2030 msgid "" "Maximum decrease (proportion: 0.1 means 10%) allowed for corner marks after " "printing/scanning process." msgstr "" "Maximum decrease (proportion: 0.1 means 10%) allowed for corner marks after " "printing/scanning process." #: ../AMC-gui-edit_preferences.glade:2047 msgid "" "If black proportion is greater than this value, the box will be considered " "as beeing ticked. This is a default value, it can be changed in each " "project." msgstr "" "If black proportion is greater than this value, the box will be considered " "as beeing ticked. This is a default value, it can be changed in each " "project." #: ../AMC-gui-edit_preferences.glade:2093 msgid "Do you want to process scans with 3 corner circles only?" msgstr "Pretende processar digitalizações com 3 círculos apenas?" #: ../AMC-gui-edit_preferences.glade:2110 msgid "Detection parameters" msgstr "Deteção de parâmetros" #: ../AMC-gui-edit_preferences.glade:2166 msgid "" "These options are used when creating a new project. See the project tab for " "more details." msgstr "" "Estas opções são usadas quando se cria um novo projeto. Veja o separador de " "Projeto para mais detalhes." #: ../AMC-gui-edit_preferences.glade:2173 #: ../AMC-gui-edit_preferences.glade:3760 msgid "Minimal mark" msgstr "Ponutação mínima" #: ../AMC-gui-edit_preferences.glade:2184 #: ../AMC-gui-edit_preferences.glade:3771 msgid "Floor mark" msgstr "Limite inferior da pontuação" #: ../AMC-gui-edit_preferences.glade:2195 #: ../AMC-gui-edit_preferences.glade:3782 msgid "Maximal mark" msgstr "Pontuação máxima" #: ../AMC-gui-edit_preferences.glade:2206 #: ../AMC-gui-edit_preferences.glade:3793 msgid "Grain" msgstr "Grão" #: ../AMC-gui-edit_preferences.glade:2217 #: ../AMC-gui-edit_preferences.glade:3804 msgid "Rounding type" msgstr "Aproximar (tipo)" #: ../AMC-gui-edit_preferences.glade:2272 #: ../AMC-gui-edit_preferences.glade:3891 msgid "ceil" msgstr "Limiar superior (\"ceil\")" #: ../AMC-gui-edit_preferences.glade:2312 msgid "Default marking options" msgstr "Opções por omissão para marcação" #: ../AMC-gui-edit_preferences.glade:2329 ../AMC-gui-main_window.glade:1943 msgid "Marking" msgstr "Marcação" #: ../AMC-gui-edit_preferences.glade:2372 msgid "Max size" msgstr "Tamanho máximo" #: ../AMC-gui-edit_preferences.glade:2383 msgid "Image format" msgstr "Formato de imagem" #: ../AMC-gui-edit_preferences.glade:2394 msgid "JPEG quality" msgstr "Qualidade JPEG" #: ../AMC-gui-edit_preferences.glade:2454 msgid "Scans" msgstr "Digitalizações" #: ../AMC-gui-edit_preferences.glade:2492 msgid "Default header text" msgstr "Texto do cabeçalho (por omissão)" #: ../AMC-gui-edit_preferences.glade:2513 #: ../AMC-gui-edit_preferences.glade:3976 msgid "" "Text to be written on annotated sheets header. Use %S for score, %M for max " "score, %s for grade, %m for max grade, and %(col) for content of the column " "col in the students list file." msgstr "" "Text to be written on annotated sheets header. Use %S for score, %M for max " "score, %s for grade, %m for max grade, and %(col) for content of the column " "col in the students list file." #: ../AMC-gui-edit_preferences.glade:2553 msgid "Default writing direction" msgstr "Direção de escrita (por omissão)" #: ../AMC-gui-edit_preferences.glade:2564 msgid "Default questions annotation" msgstr "Anotação de questões (por omissão)" #: ../AMC-gui-edit_preferences.glade:2575 msgid "Default cancelled questions annotation" msgstr "ANotação de questões canceladas (por omissão)" #: ../AMC-gui-edit_preferences.glade:2585 #: ../AMC-gui-edit_preferences.glade:4050 msgid "right to left" msgstr "direita para esquerda" #: ../AMC-gui-edit_preferences.glade:2639 msgid "Header" msgstr "Cabeçalho" #: ../AMC-gui-edit_preferences.glade:2671 msgid "Significant digits" msgstr "Digitos significativos" #: ../AMC-gui-edit_preferences.glade:2682 msgid "" "Number of significant digits to display for marks when annotating papers." msgstr "" "Número de dígitos significativos para mostrar as marcas nos exames anotados" #: ../AMC-gui-edit_preferences.glade:2703 msgid "Marks" msgstr "Marcas" #: ../AMC-gui-edit_preferences.glade:2740 msgid "Line width" msgstr "Comprimento da linha" #: ../AMC-gui-edit_preferences.glade:2751 msgid "Font" msgstr "Tipo de Letra" #: ../AMC-gui-edit_preferences.glade:2762 msgid "Marks shift" msgstr "Deslocação das marcas" #: ../AMC-gui-edit_preferences.glade:2803 msgid "" "When marks are written on annotated papers left to the boxes, shifts to the " "left marks by this value. You can use mm or in as a unit." msgstr "" "When marks are written on annotated papers left to the boxes, shifts to the " "left marks by this value. You can use mm or in as a unit." #: ../AMC-gui-edit_preferences.glade:2832 msgid "To be ticked" msgstr "A ser selecionado" #: ../AMC-gui-edit_preferences.glade:2844 msgid "Ticked" msgstr "" #: ../AMC-gui-edit_preferences.glade:2856 msgid "type" msgstr "tipo" #: ../AMC-gui-edit_preferences.glade:2868 msgid "colour" msgstr "cor" #: ../AMC-gui-edit_preferences.glade:2880 #: ../AMC-gui-edit_preferences.glade:2891 #: ../AMC-gui-edit_preferences.glade:2924 #: ../AMC-gui-edit_preferences.glade:2946 msgid "no" msgstr "não" #: ../AMC-gui-edit_preferences.glade:2902 #: ../AMC-gui-edit_preferences.glade:2913 #: ../AMC-gui-edit_preferences.glade:2935 #: ../AMC-gui-edit_preferences.glade:2957 msgid "yes" msgstr "sim" #: ../AMC-gui-edit_preferences.glade:3088 msgid "Also annotate informative questions" msgstr "Anota também questões informativas" #: ../AMC-gui-edit_preferences.glade:3110 msgid "Symbols" msgstr "Símbolos" #: ../AMC-gui-edit_preferences.glade:3185 msgid "Sender email" msgstr "Email do remetente" #: ../AMC-gui-edit_preferences.glade:3196 msgid "Carbon copy address" msgstr "Endreçeo para cópias (CC)" #: ../AMC-gui-edit_preferences.glade:3207 msgid "Blind Carbon copy address" msgstr "Endereço para cópias escondidas (BCC)" #: ../AMC-gui-edit_preferences.glade:3260 msgid "Delay between sendings" msgstr "Atraso entre envios" #: ../AMC-gui-edit_preferences.glade:3295 msgid "Mail delivery method:" msgstr "Método de entrega do email:" #: ../AMC-gui-edit_preferences.glade:3337 msgid "sendmail path" msgstr "Caminho do programa \"sendmail\"" #: ../AMC-gui-edit_preferences.glade:3373 msgid "SMTP host" msgstr "SMTP host" #: ../AMC-gui-edit_preferences.glade:3384 msgid "SMTP port" msgstr "SMTP port" #: ../AMC-gui-edit_preferences.glade:3424 msgid "SMTP security" msgstr "Segurança SMTP" #: ../AMC-gui-edit_preferences.glade:3435 msgid "SMTP user" msgstr "Utilizador SMTP" #: ../AMC-gui-edit_preferences.glade:3472 msgid "SMTP password" msgstr "Palavra-chave do user SMTP" #: ../AMC-gui-edit_preferences.glade:3509 msgid "Sending emails" msgstr "A enviar emails" #: ../AMC-gui-edit_preferences.glade:3546 msgid "Default subject" msgstr "Assunto (por omissão)" #: ../AMC-gui-edit_preferences.glade:3588 msgid "Default content" msgstr "" #: ../AMC-gui-edit_preferences.glade:3612 msgid "Email" msgstr "Email" #: ../AMC-gui-edit_preferences.glade:3638 msgid "Project preferences" msgstr "Preferências do projeto" #: ../AMC-gui-edit_preferences.glade:3670 msgid "Darkness threshold" msgstr "Limiar de negrito" #: ../AMC-gui-edit_preferences.glade:3681 msgid "" "If black proportion is greater than this value, the box will be considered " "as beeing ticked. If students have been told to darken the boxes entirely, " "one can choose value 0.5. If students have been told to tick the boxes, " "values around 0.15 seems appropriate." msgstr "" "If black proportion is greater than this value, the box will be considered " "as beeing ticked. If students have been told to darken the boxes entirely, " "one can choose value 0.5. If students have been told to tick the boxes, " "values around 0.15 seems appropriate." #: ../AMC-gui-edit_preferences.glade:3697 msgid "Upper darkness threshold" msgstr "Limiar superior de negrito" #: ../AMC-gui-edit_preferences.glade:3708 msgid "" "If black proportion is greater than this value, the box is considered as not" " ticked. Setting this threshold to a value less than one allows the students" " to cancel ticked boxes by filling them completely." msgstr "" "If black proportion is greater than this value, the box is considered as not" " ticked. Setting this threshold to a value less than one allows the students" " to cancel ticked boxes by filling them completely." #: ../AMC-gui-edit_preferences.glade:3728 msgid "Automatic data capture" msgstr "Captura automática" #: ../AMC-gui-edit_preferences.glade:3815 msgid "Mark associated with null score" msgstr "Ponutação associada com \"null score\"" #: ../AMC-gui-edit_preferences.glade:3829 msgid "" "Floor mark: any exam with a global mark less than this value will be given " "this mark. Let empty for no floor mark." msgstr "" "Limite inferior da pontuação: um exame com uma pontuação global inferior a " "este valor ficará com este limite inferior da pontuação. Deixar vazio para " "nenhum limite." #: ../AMC-gui-edit_preferences.glade:3879 msgid "" "Mark to be given to a perfect sheet with all good answers (scaling the " "marks). Value 0 meens that you don't want to scale the marks." msgstr "" "Mark to be given to a perfect sheet with all good answers (scaling the " "marks). Value 0 meens that you don't want to scale the marks." #: ../AMC-gui-edit_preferences.glade:3896 msgid "" "When using SUF option in general grading scale, should marks be ceiled not " "to be larger than the maximum mark ?" msgstr "" "When using SUF option in general grading scale, should marks be ceiled not " "to be larger than the maximum mark ?" #: ../AMC-gui-edit_preferences.glade:3920 msgid "Global mark rules" msgstr "Regras de pontuação gerais" #: ../AMC-gui-edit_preferences.glade:3956 msgid "Header text" msgstr "Texto do cabeçalho" #: ../AMC-gui-edit_preferences.glade:4007 msgid "Writing direction" msgstr "Direção da escrita" #: ../AMC-gui-edit_preferences.glade:4018 msgid "Questions marks position" msgstr "Posição das pontuações nas questões" #: ../AMC-gui-edit_preferences.glade:4029 msgid "Questions annotation text" msgstr "Texto de anotação das questões" #: ../AMC-gui-edit_preferences.glade:4040 msgid "Cancelled questions annotation text" msgstr "Texto de nota de cancelamento de questões" #: ../AMC-gui-edit_preferences.glade:4083 msgid "" "Text to be written for each question. This will be evaluated by perl, so " "quote it to make a single string. Use %S for score, %M for max score, and %s" " and %m for these values truncated to the requested number of significant " "digits." msgstr "" "Text to be written for each question. This will be evaluated by perl, so " "quote it to make a single string. Use %S for score, %M for max score, and %s" " and %m for these values truncated to the requested number of significant " "digits." #: ../AMC-gui-edit_preferences.glade:4097 msgid "Same as above, but for cancelled questions (when using allowempty)." msgstr "Same as above, but for cancelled questions (when using allowempty)." #: ../AMC-gui-edit_preferences.glade:4122 msgid "Papers annotation" msgstr "Anotação de exames" #: ../AMC-gui-edit_preferences.glade:4206 msgid "Examination description" msgstr "Descrição do exame" #: ../AMC-gui-edit_preferences.glade:4249 msgid "CSV files charset" msgstr "Conjunto de tipos de letra dos arquivos CSV" #: ../AMC-gui-edit_preferences.glade:4260 msgid "Charset used for the students list file" msgstr "Conjuntos de letras usados no arquivo de listagens de estudantes" #: ../AMC-gui-edit_preferences.glade:4279 msgid "Charset for the CSV marks file produced by AMC." msgstr "" "Conjuntos de letras para as pontuações em arquivo CSV produzidos pelo AMC." #: ../AMC-gui-edit_preferences.glade:4302 msgid "Internationnalization" msgstr "Internacionalização" #: ../AMC-gui-edit_preferences.glade:4334 msgid "LaTeX engine" msgstr "Motor LaTeX" #: ../AMC-gui-edit_preferences.glade:4345 msgid "Command to compile LaTeX file and make PDF, PS or DVI output." msgstr "Comando para compilar arquivo LaTeX e produzir PDF, PS ou DVI." #: ../AMC-gui-edit_preferences.glade:4368 msgid "External commands" msgstr "Comandos externos" #: ../AMC-gui-edit_preferences.glade:4393 ../AMC-gui-main_window.glade:2923 #: ../AMC-gui-main_window.glade:3239 msgid "Project" msgstr "Projeto" #: ../AMC-gui-edit_preferences.glade:4413 msgid "AMC Preferences" msgstr "Preferências do AMC" #: ../AMC-gui-filter_details.glade:7 msgid "Formats details" msgstr "Detalhes de formatos" #: ../AMC-gui-filter_details.glade:66 msgid "" "AMC supports different formats for the source file. Here are some details " "about each of them." msgstr "" "AMC supports different formats for the source file. Here are some details " "about each of them." #: ../AMC-gui-filter_details.glade:115 msgid "Description:" msgstr "Descrição" #: ../AMC-gui-liste_dialog.glade:48 msgid "No names list" msgstr "Lista de nomes em falta" #: ../AMC-gui-liste_dialog.glade:134 msgid "Apply" msgstr "Aplicar" #: ../AMC-gui-liste_dialog.glade:163 msgid "Choose your students names list file" msgstr "Escolha o arquivo de nomes de estudantes" #: ../AMC-gui-mailing.glade:13 msgid "Mailing" msgstr "Mailing" #: ../AMC-gui-mailing.glade:40 msgid "Send" msgstr "Enviar" #: ../AMC-gui-mailing.glade:75 msgid "Current project name %n:" msgstr "Nome do projeto corrente %n:" #: ../AMC-gui-mailing.glade:149 msgid "Emails column:" msgstr "Coluna de emails:" #: ../AMC-gui-mailing.glade:184 msgid "Select failed" msgstr "Seleção falhada" #: ../AMC-gui-mailing.glade:237 msgid "Addressees" msgstr "Endereços" #: ../AMC-gui-mailing.glade:274 msgid "Subject" msgstr "Assunto" #: ../AMC-gui-mailing.glade:303 msgid "Enable HTML Tags" msgstr "Ativar a marcação HTML" #: ../AMC-gui-mailing.glade:345 msgid "Body" msgstr "Corpo" #: ../AMC-gui-mailing.glade:437 msgid "Attachments" msgstr "Anexos" #: ../AMC-gui-main_window.glade:126 msgid "Updated" msgstr "Atualizado" #: ../AMC-gui-main_window.glade:146 msgid "Sensitivity" msgstr "Sensitividade" #: ../AMC-gui-main_window.glade:156 msgid "Scan file" msgstr "Ficheiro digitalizado" #: ../AMC-gui-main_window.glade:294 msgid "Number of papers:" msgstr "Número de páginas:" #: ../AMC-gui-main_window.glade:308 msgid "" "Number of papers to produce. Zero means taking into account the number " "written in the LaTeX source file." msgstr "" "Number of papers to produce. Zero means taking into account the number " "written in the LaTeX source file." #. TRANSLATORS: Use the character '_' before the key that can be used as a #. mnemonic (to activate documents update with Alt+key) #: ../AMC-gui-main_window.glade:343 msgid "_Update documents" msgstr "At_ualização de documentos" #: ../AMC-gui-main_window.glade:377 msgid "Question" msgstr "Questão" #: ../AMC-gui-main_window.glade:543 msgid "Warnings" msgstr "Avisos" #: ../AMC-gui-main_window.glade:654 msgid "Print papers" msgstr "Impressão de exames" #: ../AMC-gui-main_window.glade:718 msgid "From papers' scans" msgstr "Das digitalizações dos exames" #: ../AMC-gui-main_window.glade:740 ../AMC-gui-main_window.glade:1776 msgid "Automatic" msgstr "Automatico" #: ../AMC-gui-main_window.glade:762 msgid "On screen with mouse" msgstr "No ecrã com o rato" #: ../AMC-gui-main_window.glade:784 ../AMC-gui-main_window.glade:1819 msgid "Manual" msgstr "Manual" #: ../AMC-gui-main_window.glade:809 msgid "Data capture after examination" msgstr "Captura de dados após o exame" #: ../AMC-gui-main_window.glade:841 msgid "Missing pages" msgstr "Páginas em falta" #: ../AMC-gui-main_window.glade:913 msgid "Look at scans" msgstr "Ver as digitalizações" #: ../AMC-gui-main_window.glade:984 msgid "Forget" msgstr "Esquecer" #: ../AMC-gui-main_window.glade:1001 msgid "Look at pages" msgstr "Ver as páginas" #: ../AMC-gui-main_window.glade:1086 msgid "Pages:" msgstr "Páginas:" #: ../AMC-gui-main_window.glade:1144 msgid "Columns" msgstr "Colunas" #. Label on the button used to open a window with the images of the boxes #. taken from the scan. This window can be used th check boxes categorization. #: ../AMC-gui-main_window.glade:1183 ../AMC-perl/AMC/Gui/Zooms.glade:13 msgid "Zooms" msgstr "Ampliação" #: ../AMC-gui-main_window.glade:1188 msgid "" "Show images of the boxes from the scan, and check their categorization." msgstr "" "Show images of the boxes from the scan, and check their categorization." #. Label of the button used to open a window showing a scan with the place #. where corner marks have been detected, and the position where the boxes are #. supposed to be. #: ../AMC-gui-main_window.glade:1202 msgid "Layout" msgstr "Disposição (\"layout\")" #: ../AMC-gui-main_window.glade:1207 msgid "" "Show where corner marks have been detected on the scan, and where boxes are " "supposed to be." msgstr "" "Mostrar onde as marcas de canto foram detetadas na digitalização, e onde a " "caixas devem estar" #. Label of the button used to delete data capture for selected pages. #: ../AMC-gui-main_window.glade:1221 msgid "Remove" msgstr "Remover" #: ../AMC-gui-main_window.glade:1225 msgid "Remove data capture for selected pages." msgstr "Remover a captura de dados das páginas elecionadas" #: ../AMC-gui-main_window.glade:1266 msgid "Diagnosis" msgstr "Diagnóstico" #: ../AMC-gui-main_window.glade:1323 msgid "Update marking scale" msgstr "Atualizar as cotações/escalas" #: ../AMC-gui-main_window.glade:1327 msgid "Also update marking scale extraction from LaTeX source file" msgstr "Também atualizar as cotações/escalas extraindo do ficheiro LaTeX" #: ../AMC-gui-main_window.glade:1341 msgid "Mark papers" msgstr "Marcar os exames/inquéritos" #: ../AMC-gui-main_window.glade:1394 msgid "Marking" msgstr "Marcar" #: ../AMC-gui-main_window.glade:1419 msgid "Look at marks" msgstr "Confira as marcas" #: ../AMC-gui-main_window.glade:1500 msgid "Students list:" msgstr "Lista de estudantes:" #: ../AMC-gui-main_window.glade:1548 msgid "Set file" msgstr "Ficheiro a escolher (\"set file\")" #: ../AMC-gui-main_window.glade:1596 msgid "Edit list" msgstr "Editar a lista" #: ../AMC-gui-main_window.glade:1638 msgid "Re-read" msgstr "Voltar a ler" #: ../AMC-gui-main_window.glade:1704 msgid "Code name for automatic association:" msgstr "Nome do campo com o número mecanográfico para associação" #: ../AMC-gui-main_window.glade:1715 msgid "Primary key from this list:" msgstr "Chave principal da lista" #: ../AMC-gui-main_window.glade:1738 msgid "Papers/students association:" msgstr "Associação de teste/inquérito a cada estudante" #: ../AMC-gui-main_window.glade:1858 msgid "Students identification" msgstr "Identificação do estudante" #: ../AMC-gui-main_window.glade:2020 msgid "Export" msgstr "Exportar" #: ../AMC-gui-main_window.glade:2041 msgid "and" msgstr "e" #: ../AMC-gui-main_window.glade:2095 msgid "Sorting:" msgstr "Ordenar:" #: ../AMC-gui-main_window.glade:2121 msgid "include absentees" msgstr "incluir ausentes" #: ../AMC-gui-main_window.glade:2127 msgid "Should exported data include absentees?" msgstr "Expostar incluindo os ausentes?" #: ../AMC-gui-main_window.glade:2207 msgid "Exports dir" msgstr "Exportação da pasta" #: ../AMC-gui-main_window.glade:2239 msgid "Marks export" msgstr "Exportação das marcas" #: ../AMC-gui-main_window.glade:2322 msgid "File name model:" msgstr "Nome do ficheiro com o modelo:" #: ../AMC-gui-main_window.glade:2336 msgid "" "File name model used to make file names for PDF annotated papers, one by " "student. Keep empty in order to use student name." msgstr "" "Nome do ficheiro com o modelo usado para produzir nomes de ficheiros para os" " PDF anotados, um por estudante. Manter vazio para usar o nome do estudante." #: ../AMC-gui-main_window.glade:2382 msgid "Annotate papers' scans with marking details." msgstr "" "Anotar as digitalizações de exames/inquéritos com detalhes da marcação." #: ../AMC-gui-main_window.glade:2404 msgid "Annotate papers" msgstr "Anotar os exames/inquéritos." #: ../AMC-gui-main_window.glade:2428 msgid "Look at grouped files" msgstr "Ver os ficheiros agrupados" #: ../AMC-gui-main_window.glade:2451 msgid "Look" msgstr "Ver" #: ../AMC-gui-main_window.glade:2482 msgid "Send..." msgstr "Enviar..." #: ../AMC-gui-main_window.glade:2511 msgid "Annotated papers" msgstr "Exames/inquéritos anotados" #: ../AMC-gui-main_window.glade:2534 msgid "Reports" msgstr "Relatórios" #: ../AMC-gui-main_window.glade:2650 msgid "Open project" msgstr "Abrir projeto" #: ../AMC-gui-main_window.glade:2691 msgid "Save project" msgstr "Guardar projeto" #: ../AMC-gui-main_window.glade:2721 msgid "Menu" msgstr "Menu" #: ../AMC-gui-main_window.glade:2799 ../AMC-gui-main_window.glade:2838 #: ../AMC-gui-main_window.glade:2877 msgid "Update the document" msgstr "Atualizar o documento" #: ../AMC-gui-main_window.glade:2813 ../AMC-gui-main_window.glade:2852 #: ../AMC-gui-main_window.glade:2891 msgid "Open the document" msgstr "Abrir o documento" #: ../AMC-gui-main_window.glade:2953 msgid "Export as template" msgstr "Exportar como modelo (\"template\")" #: ../AMC-gui-main_window.glade:2967 msgid "User templates" msgstr "Modelos (\"templates\") do utilizador" #: ../AMC-gui-main_window.glade:2992 msgid "Manage" msgstr "Gerir" #: ../AMC-gui-main_window.glade:3017 ../AMC-gui-main_window.glade:3267 msgid "Help" msgstr "Ajuda" #: ../AMC-gui-main_window.glade:3033 msgid "About" msgstr "Sobre" #: ../AMC-gui-main_window.glade:3047 msgid "Cancel learning…" msgstr "Parar a aprendizagem..." #: ../AMC-gui-main_window.glade:3058 msgid "Debugging" msgstr "Depuração (\"debug\")" #: ../AMC-gui-main_window.glade:3076 msgid "Bug report" msgstr "Relatório de erros" #: ../AMC-gui-main_window.glade:3090 ../AMC-gui-main_window.glade:3115 msgid "Documentation" msgstr "Documentação" #: ../AMC-gui-main_window.glade:3184 ../AMC-gui-main_window.glade:3253 msgid "Plugins" msgstr "Plugins" #: ../AMC-gui-main_window.glade:3200 msgid "Browse" msgstr "navegar" #: ../AMC-gui-main_window.glade:3214 msgid "Install plugin" msgstr "Instalar plugin" #: ../AMC-gui-make_template.glade:8 msgid "Save as a template" msgstr "Guardar como modelo" #: ../AMC-gui-make_template.glade:64 msgid "To make a new template from your project, describe it below:" msgstr "Para criar um novo modelo a partir do seu projeto, descreva-o:" #: ../AMC-gui-make_template.glade:86 msgid "File name:" msgstr "Nome do ficheiro:" #: ../AMC-gui-make_template.glade:117 msgid "" "Note: please use only alphanumeric characters and characters from " "\"-_+\" for the template file name." msgstr "" "Note: por favor, use apenas caractéres alfanuméricos e caractéres -, " "_, ou + para o nome do ficheiro de modelo." #: ../AMC-gui-make_template.glade:143 msgid "Short name:" msgstr "Nome curto:" #: ../AMC-gui-make_template.glade:202 msgid "Description:" msgstr "Descrição:" #: ../AMC-gui-make_template.glade:304 msgid "Included files:" msgstr "Ficheiros incluídos:" #: ../AMC-gui-overwritten.glade:49 msgid "List of pages with overwritten data:" msgstr "Lista de páginas com dados sobrepostos (\"overwritten\")" #: ../AMC-gui-saisie_auto.glade:8 msgid "Please select all papers' scans" msgstr "Por favro, selecione todas as digitalizações" #: ../AMC-gui-saisie_auto.glade:10 msgid "Automatic data capture" msgstr "Captura automática de dados" #: ../AMC-gui-saisie_auto.glade:27 msgid "Proceed to data capture from scans with button OK" msgstr "Avance para a captura de dados das digitalizações com o botão OK" #: ../AMC-gui-saisie_auto.glade:82 msgid "Copy to project directory (recommended)" msgstr "Copiar para a pasta do projeto (recomendado)" #: ../AMC-gui-saisie_auto.glade:88 ../AMC-gui-saisie_auto.glade:89 msgid "Copy all scans to scans sub-directory in project directory" msgstr "Copiar todas as digitalizações para a subpasta no projeto" #: ../AMC-gui-saisie_auto.glade:156 msgid "" "Use this setting to be sure that the exam copy IDs allocated to the pages of" " the scans you selected will be consecutive numbers, in the same " "order as the pages." msgstr "" "Use esta opção para ter a acerteza que o ID do exame/inquérito alocado a " "páginas digitalizadas usa numeração consecutiva, na mesma ordem que " "as páginas" #: ../AMC-gui-saisie_auto.glade:172 msgid "Options" msgstr "Opções" #: ../AMC-gui-source_latex_choix.glade:8 msgid "Choose LaTeX source file" msgstr "Escolha o ficheiro LaTeX" #: ../AMC-gui-source_latex_choix_zip.glade:8 msgid "ZIP file choice" msgstr "Escolha o ficheiro ZIP" #: ../AMC-gui-source_latex_dialog.glade:7 msgid "Choose LaTeX source" msgstr "Escolha a fonte LaTeX:" #: ../AMC-gui-source_latex_dialog.glade:62 msgid "" "A multiple choice project is mainly made of a source file, which describes the questionnaire.\n" "Please choose your situation:" msgstr "" "Um projeot de escolha-múltipla é principalmente composto de um ficheiro fonte, o qual descreve o questionário.\n" "Por favor, descreva a sua situação:" #: ../AMC-gui-source_latex_dialog.glade:105 msgid "Template" msgstr "Modelo" #: ../AMC-gui-source_latex_dialog.glade:119 msgid "" "You did not write any description of the questionnaire, and want to start " "from a template." msgstr "" "Não escreveu a descrição do questionário, e pretende começar de um modelo." #: ../AMC-gui-source_latex_dialog.glade:171 msgid "File" msgstr "Ficheiro" #: ../AMC-gui-source_latex_dialog.glade:185 msgid "" "You already wrote a questionnaire description, and want to use it for this " "project." msgstr "" "Já escreveu a descrição do questionário, e pretende usá-la neste projeto." #: ../AMC-gui-source_latex_dialog.glade:237 msgid "Empty" msgstr "Vazio" #: ../AMC-gui-source_latex_dialog.glade:251 msgid "You want to write the description from zero." msgstr "Pretende escrever a descrição começando do início." #: ../AMC-gui-source_latex_dialog.glade:303 msgid "Archive" msgstr "Arquivo" #: ../AMC-gui-source_latex_dialog.glade:317 msgid "" "You have a .tgz or .zip file containing the questionnaire and " "other related stuff, coming from a third party software or a backup." msgstr "" "Tem ficheiros do tipo .tgz ou .zip contendo o questionário e " "outras coisas relacionadas, provenientes de software de terceiros ou de uma " "cópia de segurança" #: ../AMC-gui-source_latex_modele.glade:8 msgid "Template selection" msgstr "Seleção do modelo" #: ../AMC-gui-unrecognized.glade:8 msgid "Preprocess" msgstr "Pré-processamento" #: ../AMC-gui-unrecognized.glade:14 msgid "Delete" msgstr "Apagar" #: ../AMC-gui-unrecognized.glade:29 msgid "Unrecognized scans" msgstr "Digitalizações não reconhecidas" #: ../AMC-gui-unrecognized.glade:71 msgid "Scans list" msgstr "Lista de digitalizações" #: ../AMC-gui-unrecognized.glade:237 msgid "Original scan" msgstr "Digitalização original" #: ../AMC-gui-unrecognized.glade:266 msgid "Preprocessed" msgstr "Pré-processado" #: ../AMC-perl/AMC/Gui/Association.glade:14 msgid "Manual association" msgstr "Associação manual" #. This is the label of the check button that controls wheter the auto- #. completion for students names will be made looking at the beginnig of the #. names or at the whole names. #: ../AMC-perl/AMC/Gui/Association.glade:84 msgid "beginning" msgstr "início" #: ../AMC-perl/AMC/Gui/Association.glade:89 msgid "Is auto-completion looking at the beginning of the names only?" msgstr "O auto-preenchimento procura apenas no início dos nomes?" #: ../AMC-perl/AMC/Gui/Association.glade:157 msgid "Show all" msgstr "Mostrar tudo" #: ../AMC-perl/AMC/Gui/Association.glade:361 msgid "associated" msgstr "associados" #: ../AMC-perl/AMC/Gui/Association.glade:366 msgid "" "Unticking this box, you see only non-associated papers. Tick it to be able " "to check already associated papers." msgstr "" "Ao desmarcar esta caixa, irá ver apenas folhas não associadas. Marque a " "caixa para ser possível a verificação das folhas já associadas." #: ../AMC-perl/AMC/Gui/Association.glade:411 msgid "Remove manual association for this paper" msgstr "Remover as associações manuais para este documento" #: ../AMC-perl/AMC/Gui/Association.glade:427 msgid "" "Tell the system that this papers does not correspond to any of the students " "from the list." msgstr "" "Dizer ao sistema que estas \"folhas/provas\" não correspondem a qualquer " "estudante da lista" #: ../AMC-perl/AMC/Gui/Association.glade:449 msgid "Unknown" msgstr "Desconhecido" #: ../AMC-perl/AMC/Gui/Association.glade:509 msgid "Save associations." msgstr "Gravar associações." #: ../AMC-perl/AMC/Gui/Manuel.glade:18 msgid "Paper data capture" msgstr "Captura de dados da folha:" #: ../AMC-perl/AMC/Gui/Manuel.glade:39 ../AMC-perl/AMC/Gui/Manuel.glade:236 msgid "Go to:" msgstr "Ir para:" #: ../AMC-perl/AMC/Gui/Manuel.glade:51 ../AMC-perl/AMC/Gui/Manuel.glade:248 msgid "" "Enter paper number, or page number like 102/4 (page 4 from paper 102), then " "press enter." msgstr "" "Introduza o número do \"artigo\", ou o número da página como 102/4 (página 4" " do artigo 102), depois pressione enter." #: ../AMC-perl/AMC/Gui/Manuel.glade:82 msgid "Go to the previous page." msgstr "Passar à página anterior." #: ../AMC-perl/AMC/Gui/Manuel.glade:100 msgid "Quit" msgstr "Sair" #: ../AMC-perl/AMC/Gui/Manuel.glade:118 msgid "Go to next page." msgstr "Passar à página seguinte." #: ../AMC-perl/AMC/Gui/Manuel.glade:282 msgid "Save this page modifications, then go to the previous page." msgstr "" "Guardar as modificações nesta página, depois passar à página seguinte." #: ../AMC-perl/AMC/Gui/Manuel.glade:296 msgid "" "Choose if you want to navigate through all pages, through pages with invalid" " answers, or through pages with invalid or empty answers." msgstr "" "Escolha se pretende navegar por todas as páginas, por páginas com respostas " "inálidas, ou por páginas com respostas inválidas ou em branco." #: ../AMC-perl/AMC/Gui/Manuel.glade:318 msgid "Save this page modifications, then go to next page." msgstr "Guardar modificações nesta página, depois passar à página seguinte." #: ../AMC-perl/AMC/Gui/Manuel.glade:344 msgid "Focus on question:" msgstr "Focar na questão:" #: ../AMC-perl/AMC/Gui/Manuel.glade:429 msgid "" "Remove manual modifications for this page. Automatic data capture for this " "page, if any, won't be changed." msgstr "" "Remover as modificações manuais para esta página. A captura autmática para " "esta página, se existir, não será modificada." #: ../AMC-perl/AMC/Gui/Manuel.glade:458 msgid "Cancel modifications for this page" msgstr "Cancelar as modificações para esta página" #: ../AMC-perl/AMC/Gui/Manuel.glade:476 msgid "Save and quit" msgstr "Gravar e sair" #: ../AMC-perl/AMC/Gui/Zooms.glade:135 msgid "Unchecked boxes" msgstr "Caixas não marcadas" #: ../AMC-perl/AMC/Gui/Zooms.glade:203 msgid "Checked boxes" msgstr "Caixas marcadas" #: ../AMC-perl/AMC/Gui/Zooms.glade:281 msgid "" "Toggle mode. With 'click', left-click to toggle and right-click to toggle a " "group." msgstr "" "Alternância de seleção: com click-esquerdo e click-direito para " "marcar/desmarcar um grupo." auto-multiple-choice-1.4.0/I18N/lang/ta.po000066400000000000000000006405261341176102400201250ustar00rootroot00000000000000# Auto Multiple Choice # Copyright 2008-2016 Alexis Bienvenue # This file is distributed under the same license as the AMC software #, fuzzy msgid "" msgstr "" "Project-Id-Version: 1.4.0~beta1 (r:a488cdb)\n" "Report-Msgid-Bugs-To: paamc@passoire.fr\n" "POT-Creation-Date: 2018-05-02 09:25 +0200\n" "PO-Revision-Date: 2018-05-06\n" "Last-Translator: Balaganesh B. 14310063 , 2018\n" "Language-Team: Tamil (https://www.transifex.com/jojoboulix/teams/10701/ta/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ta\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. TRANSLATORS: directory name for projects. This directory will be created #. (if needed) in the home directory of the user. Please use only alphanumeric #. characters, and - or _. No accentuated characters. #: ../AMC-annotate.pl:158 ../AMC-perl/AMC/Config.pm:247 #: ../AMC-perl/AMC/Config.pm:248 msgid "MC-Projects" msgstr "MC-Projects" #: ../AMC-getimages.pl:213 msgid "Splitting multi-page PDF files..." msgstr "பல பக்க PDF கையடக்க ஆவண வடிவ கோப்புகளை பிரித்தல்..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be #. converted. #: ../AMC-getimages.pl:390 #, perl-format msgid "Converting %s to bitmap..." msgstr "%s னை பிட்மேப்பாக மாற்றுகிறது..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be #. splitted to several images (one per page). #: ../AMC-getimages.pl:393 #, perl-format msgid "Splitting multi-page image %s..." msgstr "பல பக்க படத்தை பிரித்தல் %s..." #. TRANSLATORS: Here, %s will be replaced with the path of a file that will be #. splitted to several images (one per page). #: ../AMC-getimages.pl:396 #, perl-format msgid "Processing image %s..." msgstr "%s படத்தை செயலாக்குகிறது..." #: ../AMC-getimages.pl:469 msgid "Copying scans to project directory..." msgstr "திட்டப்பணி அடைவுக்கு பதில் தாள் அலகீடுகளை நகலெடுக்கிறது..." #: ../AMC-gui.pl:249 msgid "" "None of the perl modules Graphics::Magick and Image::Magick " "are installed: AMC won't work properly!" msgstr "" "பின்வரும் எந்தவொரு perl கூறுகளும் நிறுவப்படாததால், தன்னியக்க பல தெரிவு AMC " "ஒழுங்காக இயங்காது! Graphics::Magick மற்றும் Image::Magick" #: ../AMC-gui.pl:280 msgid "" "The package auto-multiple-choice-common is installed, but not auto-multiple-choice.\n" "AMC won't work properly until you install auto-multiple-choice package!" msgstr "" "auto-multiple-choiceக்குப் பதிலாகauto-multiple-choice-commonஆனது நிறுவப்பட்டுள்ளது .\n" "auto-multiple-choice package ஐ நீங்கள் நிறுவும் வரை தன்னியக்க பல தெரிவு ஒழுங்காக இயங்காது!" #: ../AMC-gui.pl:298 #, perl-format msgid "" "There is too little space left in the temporary disk directory (%s). " "Please clean this directory and try again." msgstr "" "தற்காலிக வட்டு அடைவில் மிகக் குறைவான இடமுள்ளது (%s).  இந்த அடைவை சுத்தம் " "செய்து மீண்டும் முயற்சிக்கவும்." #: ../AMC-gui.pl:317 msgid "Several dialogs try to help you be at ease handling AMC." msgstr "" "தன்னியக்க பல தெரிவை எளிதாக கையாள்வதற்க்கு பல உரையாடல்கள் உங்களுக்கு உதவ " "முயலுகின்றன." #: ../AMC-gui.pl:319 #, perl-format msgid "Unless you tick the \"%s\" box, they are shown only once." msgstr "\"%s\" கட்டத்தைத் தட்டாத வரை, அவை ஒரே ஒரு முறை மட்டுமே காட்டப்படுகின்றன." #: ../AMC-gui.pl:321 ../AMC-gui.pl:605 msgid "Show this message again next time" msgstr "இந்தச் செய்தியை அடுத்த முறை மீண்டும் காட்டவும்" #: ../AMC-gui.pl:323 msgid "" "Do you want to forgot which dialogs you have already seen and ask to show " "all of them next time they should appear ?" msgstr "" "நீங்கள் ஏற்கனவே பார்த்திருக்கும் உரையாடல்களை மறந்துவிட்டு, அடுத்த முறை " "பாா்க்கும் போது அவையனைத்தையும் காட்ட வேண்டுமா?" #: ../AMC-gui.pl:357 msgid "" "Please install libnotify to make desktop notifications available." msgstr "முகப்பு அறிவிப்புகளைப் பெற libnotify யை நிறுவவும்" #. TRANSLATORS: Message when switching to debugging mode. #: ../AMC-gui.pl:552 msgid "Debugging mode." msgstr "வழுநீக்குகின்ற பாணி." #. TRANSLATORS: Message when switching to debugging mode. %s will be replaced #. with the path of the log file. #: ../AMC-gui.pl:554 #, perl-format msgid "Debugging informations will be written in file %s." msgstr "%s இந்தக் கோப்பில் வழுநீக்கப்படுகின்ற தகவல்கள் எழுதப்படும்." #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:583 ../AMC-gui-main_window.glade:3131 msgid "French" msgstr "பிரஞ்சு" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:585 ../AMC-gui-main_window.glade:3145 msgid "English" msgstr "ஆங்கிலம்" #. TRANSLATORS: One of the documentation languages. #: ../AMC-gui.pl:587 ../AMC-gui-main_window.glade:3159 msgid "Japanese" msgstr "ஜப்பனீஸ்" #. TRANSLATORS: This is the title of the column containing student/copy #. identifier in the table showing the results of data captures. #: ../AMC-gui.pl:703 msgid "identifier" msgstr "அடையாளக்காட்டி" #. TRANSLATORS: This is the title of the column containing data capture #. date/time in the table showing the results of data captures. #: ../AMC-gui.pl:712 msgid "updated" msgstr "புதுப்பிக்கப்பட்டது" #. TRANSLATORS: This is the title of the column containing Mean Square Error #. Distance (some kind of mean distance between the location of the four #. corner marks on the scan and the location where they should be if the scan #. was not distorted at all) in the table showing the results of data #. captures. #: ../AMC-gui.pl:720 ../AMC-gui.pl:4992 ../AMC-perl/AMC/Gui/Manuel.pm:192 #: ../AMC-gui-main_window.glade:136 msgid "MSE" msgstr " சராசாி இருபடிப் பிழை" #. TRANSLATORS: This is the title of the column containing so-called #. "sensitivity" (an indicator telling the user if the darkness ratio of some #. boxes on the page are very near the threshold. A great value tells that #. some darkness ratios are very near the threshold, so that the capture is #. very sensitive to the threshold. A small value is a good thing) in the #. table showing the results of data captures. #: ../AMC-gui.pl:729 ../AMC-gui.pl:4994 ../AMC-perl/AMC/Gui/Manuel.pm:200 msgid "sensitivity" msgstr "ஒளிக்கூருணர்வுத்திறன்" #: ../AMC-gui.pl:737 msgid "scan file" msgstr "அலகீட்டுக் கோப்பு" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:766 ../AMC-gui.pl:784 msgid "Western Europe" msgstr "மேற்கு ஐரோப்பா" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:768 ../AMC-gui.pl:786 msgid "Central Europe" msgstr "மத்திய ஐரோப்பா" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:770 msgid "Southern Europe" msgstr "தெற்கு ஐரோப்பா" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:772 msgid "Northern Europe" msgstr "வடக்கு ஐரோப்பா" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:774 msgid "Cyrillic" msgstr "சிரிலிக்" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:776 msgid "Turkish" msgstr "துருக்கி" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:778 msgid "Northern" msgstr "வடக்கத்திய" #. TRANSLATORS: for encodings #: ../AMC-gui.pl:780 msgid "Unicode" msgstr "ஒற்றைக் குறியீடு" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:804 ../AMC-gui.pl:3338 msgid "(none) [No primary key found in association list]" msgstr "(ஒன்றுமில்லை) [இணைப்பு பட்டியலில் முதன்மைக் குறியைக் காணவில்லை]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:806 ../AMC-gui.pl:3976 msgid "(none) [No code found in LaTeX file]" msgstr "(ஒன்றுமில்லை) [LaTeX கோப்பில் எந்தக் குறிமுறையும் இல்லை]" #. TRANSLATORS: One of the printing methods: use a command (This is not the #. command name itself). This is a menu entry. #: ../AMC-gui.pl:835 msgid "command" msgstr "கட்டளை" #. TRANSLATORS: One of the printing methods: print to files. This is a menu #. entry. #: ../AMC-gui.pl:837 msgid "to files" msgstr "கோப்புகளுக்கு" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:841 msgid "floor" msgstr "முழு எண்ணாக்கம்-குறை" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:843 msgid "rounding" msgstr "முழு எண்ணாக்கம்" #. TRANSLATORS: One of the rounding method for marks. This is a menu entry. #: ../AMC-gui.pl:845 msgid "ceiling" msgstr "முழு எண்ணாக்கம்-மிகை" #. TRANSLATORS: One option for decimal point: use a comma. This is a menu #. entry #: ../AMC-gui.pl:849 msgid ", (comma)" msgstr ", (காற் புள்ளி)" #. TRANSLATORS: One option for decimal point: use a point. This is a menu #. entry. #: ../AMC-gui.pl:851 msgid ". (dot)" msgstr ". (புள்ளி)" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:856 msgid "one sided [No two-sided printing]" msgstr "ஒரு பக்கமாக [இரு பக்கமாக அச்சிடவில்லை]" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:858 msgid "long edge" msgstr "நீண்ட விளிம்பு" #. TRANSLATORS: One of the two-side printing types. This is a menu entry. #: ../AMC-gui.pl:860 msgid "short edge" msgstr "குறுகிய விளிம்பு" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:864 msgid "(none) [No transitional image type (direct processing)]" msgstr "(ஒன்றுமில்லை) [இடைநிலை பட வகை இல்லை (நேரடி பக்குவப்படுத்தல்)]" #. TRANSLATORS: One of the actions that can be done after exporting the marks. #. Here, do nothing more. This is a menu entry. #: ../AMC-gui.pl:872 msgid "that's all" msgstr "அவ்வளவுதான்" #. TRANSLATORS: One of the actions that can be done after exporting the marks. #. Here, open the exported file. This is a menu entry. #: ../AMC-gui.pl:874 msgid "open the file" msgstr "கோப்பைத் திற" #. TRANSLATORS: One of the actions that can be done after exporting the marks. #. Here, open the directory where the file is. This is a menu entry. #: ../AMC-gui.pl:876 msgid "open the directory" msgstr "அடைவைத் திற" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-gui.pl:879 msgid "(none) [No annotation position (do not write anything)]" msgstr "" "(ஒன்றுமில்லை) [சுட்டுவிளக்கத்திற்குரிய இடமில்லை (எதையும் எழுத வேண்டாம்)]" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: in one margin. This is a menu entry. #: ../AMC-gui.pl:881 msgid "in one margin" msgstr "ஒரு விளிம்புக்குள்" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: in one of the two margins. This is a menu entry. #: ../AMC-gui.pl:883 msgid "in the margins" msgstr "ஓரங்களில்" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: near the boxes. This is a menu entry. #: ../AMC-gui.pl:885 msgid "near boxes" msgstr "கட்டங்களுக்கு அருகில்" #. TRANSLATORS: One of the possible location for questions scores on annotated #. completed answer sheet: in the zones defined in the source file #: ../AMC-gui.pl:887 msgid "where defined in the source" msgstr "மூலத்தில் எங்கே வரையறுக்கப்பட்டுள்ளது" #. TRANSLATORS: One of the possible sorting criteria for students in the #. exported spreadsheet with scores: the student name. This is a menu entry. #. TRANSLATORS: This is the title of a column containing students names in a #. table showing all annotated answer sheets, when sending them to the #. students by email. #: ../AMC-gui.pl:890 ../AMC-gui.pl:6357 msgid "name" msgstr "பெயர்" #. TRANSLATORS: One of the possible sorting criteria for students in the #. exported spreadsheet with scores: the student sheet number. This is a menu #. entry. #: ../AMC-gui.pl:892 msgid "exam copy number" msgstr "தேர்வெண்வாாியாக" #. TRANSLATORS: One of the possible sorting criteria for students in the #. exported spreadsheet with scores: the line where one can find this student #. in the students list file. This is a menu entry. #: ../AMC-gui.pl:894 msgid "line in students list" msgstr "வாிசையெண்வாாியாக" #. TRANSLATORS: you can omit the [...] part, just here to explain context #. One of the possible sorting criteria for students in the exported #. spreadsheet with scores: the student mark. This is a menu entry. #: ../AMC-gui.pl:897 msgid "mark [student mark, for sorting]" msgstr "மதிப்பெண்வாாியாக [மாணவர் மதிப்பெண், வரிசைப்படுத்த]" #. TRANSLATORS: One of the possible way to group annotated answer sheets #. together to PDF files: make one PDF file per student, with all his pages. #. This is a menu entry. #: ../AMC-gui.pl:902 msgid "One file per student" msgstr "ஒவ்வொரு மாணவருக்கும் தனி கோப்பு" #. TRANSLATORS: One of the possible way to group annotated answer sheets #. together to PDF files: make only one PDF with all students sheets. This is #. a menu entry. #: ../AMC-gui.pl:904 msgid "One file for all students" msgstr "எல்லா மாணவா்களுக்கும் ஒரே கோப்பு" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we #. only select pages where the student has written something (in separate #. answer sheet mode, these are the pages from the answer sheet and not the #. pages from the subject). #: ../AMC-gui.pl:907 msgid "Only pages with answers" msgstr "பதில்களுள்ள பக்கங்கள் மட்டும்" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we #. take the pages were the students has nothing to write (often question pages #. from a subject with separate answer sheet option) from the subject. #: ../AMC-gui.pl:909 msgid "Question pages from subject" msgstr "வினாத்தாளுடன் பதில்களுள்ள பக்கங்களும்" #. TRANSLATORS: One of the possible way to annotate answer sheets: here we #. take the pages were the students has nothing to write (often question pages #. from a subject with separate answer sheet option) from the correction. #: ../AMC-gui.pl:911 msgid "Question pages from correction" msgstr "வினா-விடைத்தாளுடன் பதில்களுள்ள பக்கங்களும்" #: ../AMC-gui.pl:914 msgid "All students" msgstr "எல்லா மாணவா்களுக்கும்" #: ../AMC-gui.pl:916 msgid "Selected students" msgstr "குறிப்பிட்ட மாணவர்களுக்கு" #: ../AMC-gui.pl:918 msgid "Please select..." msgstr "தயவு செய்து தேர்ந்தெடுக்க..." #. TRANSLATORS: One of the ways exam was made: each student has a different #. answer sheet with a different copy number - no photocopy was made. This is #. a menu entry. #. TRANSLATORS: This is a title for the AMC mode where the distributed exam #. papers are all different (different paper numbers at the top) -- photocopy #. is not used. #: ../AMC-gui.pl:920 ../AMC-gui.pl:2981 msgid "Different answer sheets" msgstr "முற்றிலும் வேறுபட்ட பதில் தாள்கள்" #. TRANSLATORS: One of the ways exam was made: some students have the same #. exam subject, as some photocopies were made before distributing the #. subjects. This is a menu entry. #. TRANSLATORS: This is a title for the AMC mode where some answer sheets have #. been photocopied before being distributed to the students. #: ../AMC-gui.pl:922 ../AMC-gui.pl:2986 msgid "Some answer sheets were photocopied" msgstr "சில பதில் தாள்கள் நகலெடுக்கப்பட்டுள்ளன " #. TRANSLATORS: One of the ways to send mail: use sendmail command. This is a #. menu entry. #: ../AMC-gui.pl:924 msgid "sendmail" msgstr "sendmail" #. TRANSLATORS: One of the ways to send mail: use a SMTP server. This is a #. menu entry. #: ../AMC-gui.pl:926 msgid "SMTP" msgstr "SMTP" #: ../AMC-gui.pl:927 msgid "None [SMTP security]" msgstr "ஒன்றுமில்லை [SMTP பாதுகாப்பு]" #: ../AMC-gui.pl:936 msgid "Standard" msgstr "படித்தரம்" #: ../AMC-gui.pl:938 msgid "Separate answer sheet" msgstr "தனி பதில் தாள்" #: ../AMC-gui.pl:940 ../AMC-gui.pl:2683 ../AMC-gui.pl:2701 msgid "Answer sheet first" msgstr "பதில் தாள் முதலில்" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. #: ../AMC-gui.pl:944 msgid "nothing" msgstr "ஏதுமில்லை" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. #: ../AMC-gui.pl:946 msgid "circle" msgstr "வட்டம்" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. Here, a cross. #: ../AMC-gui.pl:948 msgid "mark" msgstr "தவறுக் குறி" #. TRANSLATORS: One of the signs that can be drawn on annotated answer sheets #. to tell if boxes are to be ticked or not, and if they were detected as #. ticked or not. Here, the box outline. #: ../AMC-gui.pl:950 msgid "box" msgstr "கட்டம்" #: ../AMC-gui.pl:1045 #, perl-format msgid "" "Exporting to '%s' needs some perl modules that are not installed: %s. Please" " install these modules or switch to another export format." msgstr "" "'%s' க்கு ஏற்றுவதற்க்கு தேவையான சில perl கூறுகள் நிறுவப்படவில்லை: %s. இந்த " "கூறுகளை நிறுவவும் அல்லது வேறொரு ஏற்று வடிவமைப்பிற்கு மாறவும்." #: ../AMC-gui.pl:1068 msgid "" "When referring to a particular answer in the export, the letter used will be" " the one found in the catalog. However, the catalog has not yet been built. " "Do you want to build it now?" msgstr "" "ஏற்றுமதியில் ஒரு குறிப்பிட்ட பதிலை குறிப்பிடும் போது, பட்டியல் வரிசையில் " "காணப்படும் பயன்படுத்தப்படும். எனினும், பட்டியல் வரிசை இன்னும் " "உருவாக்கப்படவில்லை. அதை இப்போது உருவாக்க வேண்டுமா?" #: ../AMC-gui.pl:1104 msgid "Exporting marks..." msgstr "மதிப்பெண்களை ஏற்றிக்கொண்டிருக்கிறது..." #: ../AMC-gui.pl:1143 #, perl-format msgid "Export to %s did not work: file not created..." msgstr "%sக்கு ஏற்றுதல் வேலை செய்யவில்லை: கோப்பு உருவாக்கப்படவில்லை ..." #. TRANSLATORS: One of the popup menu that appears when right-clicking on a #. page in the data capture diagnosis table. Choosing this entry, an image #. will be opened to see where the corner marks were detected. #: ../AMC-gui.pl:1152 ../AMC-gui.pl:4996 msgid "page adjustment" msgstr "பக்கத்தைச் சீரமை" #. TRANSLATORS: One of the popup menu that appears when right-clicking on a #. page in the data capture diagnosis table. Choosing this entry, a window #. will be opened were the user can see all boxes on the scans and how they #. were filled by the students, and correct detection of ticked-or-not if #. needed. #: ../AMC-gui.pl:1154 ../AMC-gui.pl:4996 msgid "boxes zooms" msgstr "கட்டங்களைப் பொிதாக்கு" #: ../AMC-gui.pl:1225 #, perl-format msgid "You requested to delete all data capture results for %d page(s)" msgstr "" "பக்கம்(பக்கங்கள்) %d இல் இருந்து எடுக்கப்பட்ட அனைத்து தரவு முடிவுகளையும் " "நீக்க கோரியுள்ளீா்கள்" #: ../AMC-gui.pl:1226 msgid "All data and image files related to these pages will be deleted." msgstr "" "இந்த பக்கங்களுடன் தொடா்புடைய எல்லா தரவுகளும் படக் கோப்புகளும் நீக்கப்படும்." #: ../AMC-gui.pl:1227 msgid "Do you really want to continue?" msgstr "நீங்கள் உறுதியாக தொடர விரும்புகிறீா்களா?" #: ../AMC-gui.pl:1405 #, perl-format msgid "" "Following command could not be run: %s, perhaps due to a poor " "configuration?" msgstr "" "பின்வருகின்ற கட்டளையை இயக்க முடியவில்லை: %s, ஒருவேளை மோசமான " "உருப்படுத்தல் காரணமாக இருக்கலாம்?" #: ../AMC-gui.pl:1450 #, perl-format msgid "Current directory: %s" msgstr "தற்போதைய அடைவு: %s" #: ../AMC-gui.pl:1509 msgid "Existing projects:" msgstr "ஏற்கனவே உள்ள திட்டப்பணிகள்:" #. TRANSLATORS: Window title when creating a new project. #: ../AMC-gui.pl:1514 msgid "New AMC project" msgstr "புதிய தன்னியக்க பல தெரிவு திட்டப்பணி" #: ../AMC-gui.pl:1519 msgid "Projects management:" msgstr "திட்டப்பணிகள் மேலாண்மை:" #: ../AMC-gui.pl:1520 msgid "Change project name:" msgstr "திட்டப்பணியின் பெயரை மாற்று:" #: ../AMC-gui.pl:1525 msgid "Back" msgstr "பின்" #. TRANSLATORS: Window title when managing projects. #: ../AMC-gui.pl:1528 msgid "AMC projects management" msgstr "தன்னியக்க பல தெரிவு திட்டப்பணிகள் மேலாண்மை" #: ../AMC-gui.pl:1550 #, perl-format msgid "You don't have any MC project in directory %s!" msgstr "இந்த %s அடைவில் எந்தவொரு பல தெரிவு திட்டப்பணியும் இல்லை!" #: ../AMC-gui.pl:1559 ../AMC-gui-choix_projet.glade:260 msgid "Choose directory" msgstr "அடைவைத் தேர்ந்தெடுக்கவும்" #: ../AMC-gui.pl:1604 #, perl-format msgid "You can't change project %s since it's open." msgstr "இந்த %s திட்டப்பணியானது திறந்திருப்பதால் நீங்கள் அதனை மாற்ற முடியாது." #: ../AMC-gui.pl:1626 #, perl-format msgid "This will clone project %s to a new project %s." msgstr "" "இது திட்டப்பணி %s யை ஒரு புதிய திட்டப்பணி %s க்கு படி " "எடுக்கும்." #. TRANSLATORS: Message when you want to create an AMC project with name xxx, #. but there already exists a directory in the projects directory with this #. name! #: ../AMC-gui.pl:1697 #, perl-format msgid "Directory %s already exists, so you can't choose this name." msgstr "" "%s என்கிற அடைவு ஏற்கனவே உள்ளதால், நீங்கள் இந்த பெயரை தொிவு செய்ய " "முடியாது." #: ../AMC-gui.pl:1743 msgid "Destination project directory already exists" msgstr "சோிடத்தில் ஏற்கனவே திட்டப்பணி அடைவு இருக்கிறது" #: ../AMC-gui.pl:1755 msgid "Copying project..." msgstr "திட்டப்பணியை நகலெடுக்கிறது..." #: ../AMC-gui.pl:1780 msgid "Your project has been copied" msgstr "உங்களது திட்டப்பணியானது நகலெடுக்கப்பட்டுவிட்டது" #: ../AMC-gui.pl:1781 #, perl-format msgid "(%d files out of %d)" msgstr "(%d கோப்புகள் %d ல் இருந்து)" #: ../AMC-gui.pl:1788 msgid "Source project directory not found" msgstr "மூல திட்டப்பணி அடைவை காணவில்லை" #: ../AMC-gui.pl:1796 #, perl-format msgid "An error occuried during project copy: %s." msgstr "திட்டப்பணியை நகலெடுக்கும் போது ஒரு பிழை ஏற்பட்டது:%s." #: ../AMC-gui.pl:1817 #, perl-format msgid "You asked to remove project %s." msgstr "இந்த %sதிட்டப்பணியை நீக்குமாறு நீங்கள் கேட்டுள்ளீா்கள்." #: ../AMC-gui.pl:1818 msgid "" "This will permanently erase all the files of this project, including the " "source file as well as all the files you put in the directory of this " "project, as the scans for example." msgstr "" "இது திட்டப்பணியின் மூல கோப்பு மற்றும் திட்டப்பணி அடைவில் உள்ள அனைத்து " "கோப்புகளையும் நிரந்தரமாக நீக்கிவிடும். உதாரணமாக அலகீடுக் கோப்பு." #: ../AMC-gui.pl:1819 msgid "Is this really what you want?" msgstr "உறுதியாக இது உங்கள் விருப்பமா?" #: ../AMC-gui.pl:1876 #, perl-format msgid "You selected directory %s as a project to open." msgstr "%s என்கிற அடைவு திட்டப்பணி போல் திறக்க தேர்வு செய்யப்பட்டது." #: ../AMC-gui.pl:1877 msgid "" "However, this directory does not seem to contain a project. Do you still " "want to try?" msgstr "" "எனினும், இந்த அடைவில் ஒரு திட்டப்பணி கூட இருப்பதாக தொியவில்லை. நீங்கள் " "இன்னும் முயற்சி செய்ய விரும்புகிறீா்களா?" #: ../AMC-gui.pl:1894 #, perl-format msgid "You selected project %s from directory %s." msgstr "" "நீங்கள் %s இந்த அடைவிலிருந்து %s என்ற திட்டப்பணியைத் " "தேர்ந்தெடுத்துள்ளீா்கள்." #: ../AMC-gui.pl:1895 msgid "" "Do you want to copy this project to your projects directory before opening " "it?" msgstr "" "இந்த திட்டப்பணியை திறக்கும் முன் உங்கள் திட்டப்பணி அடைவில் நகலெடுக்க " "விரும்புகிறீர்களா?" #: ../AMC-gui.pl:1965 #, perl-format msgid "The name %s is already used in the projects directory." msgstr "" "%s இந்தப் பெயர் ஏற்கனவே திட்டப்பணி அடைவில் பயன்படுத்தப்பட்டுள்ளது." #: ../AMC-gui.pl:1966 msgid "You must choose another name to create a project." msgstr "" "ஒரு திட்டப்பணியை உருவாக்க நீங்கள் வேறொரு பெயரை தேர்ந்தெடுக்க வேண்டும்." #: ../AMC-gui.pl:2005 msgid "LaTeX packages:" msgstr "LaTeX தொகுப்பு:" #: ../AMC-gui.pl:2006 msgid "Commands:" msgstr "கட்டளைகள்:" #: ../AMC-gui.pl:2007 msgid "Fonts:" msgstr "எழுத்துருக்கள்:" #: ../AMC-gui.pl:2022 msgid "" "Your AMC version and LaTeX style file version differ. Even if the documents " "are properly generated, this can lead to many problems using AMC.\n" msgstr "" "உங்கள் AMC பதிப்பு மற்றும் LaTeX பாணி கோப்பு பதிப்பு வேறுபடுகின்றன. ஆவணங்கள்" " சரியாக உருவாக்கப்பட்டாலும், இது AMC ஐப் பயன்படுத்தும் போது பல " "சிக்கல்களுக்கு வழிவகுக்கும்.\n" #: ../AMC-gui.pl:2023 msgid "" "Please check your installation to get matching AMC and LaTeX style file " "versions.\n" msgstr "" "AMC மற்றும் LaTeX பாணி கோப்பு பதிப்புகள் பொருந்துவதற்கு உங்கள் நிறுவலை " "சரிபார்க்கவும்.\n" #: ../AMC-gui.pl:2024 #, perl-format msgid "" "AMC version: %s\n" "sty version: %s\n" "sty path: %s" msgstr "" "AMC பதிப்பு: %s\n" "sty பதிப்பு: %s\n" "sty பாதை: %s" #: ../AMC-gui.pl:2052 msgid "Documents update..." msgstr "ஆவணங்கள் புதுப்பி..." #: ../AMC-gui.pl:2076 msgid "Problems while preparing documents" msgstr "ஆவணங்களை ஆயத்தமாக்கும் போது ஏற்பட்ட சிக்கல்கள்" #: ../AMC-gui.pl:2078 msgid "Problems while processing the source file." msgstr "மூல கோப்புகளை செயலாக்கும் போது ஏற்பட்ட சிக்கல்கள்" #: ../AMC-gui.pl:2081 msgid "You have to correct the source file and re-run documents update." msgstr "நீங்கள் மூல கோப்பை சாி செய்து மீண்டும் ஆவண புதுப்பியை இயக்கவும்." #: ../AMC-gui.pl:2085 msgid "Errors" msgstr "பிழைகள்" #: ../AMC-gui.pl:2086 msgid "Only first ten errors written" msgstr "முதல் பத்து பிழைகள் மட்டுமே எழுதப்பட்டுள்ளது" #: ../AMC-gui.pl:2089 msgid "Warnings" msgstr "எச்சாிக்கைகள்" #: ../AMC-gui.pl:2090 msgid "Only first ten warnings written" msgstr "முதல் பத்து எச்சாிக்கைகள் மட்டுமே எழுதப்பட்டுள்ளது" #. TRANSLATORS: Here, %s will be replaced with the translation of "Command #. output details", and refers to the small expandable part at the bottom of #. AMC main window, where one can see the output of the commands lauched by #. AMC. #: ../AMC-gui.pl:2095 #, perl-format msgid "See also the processing log in '%s' below." msgstr "கீழே உள்ள செயலாக்க பதிவினை '%s' பார்க்கவும்." #. TRANSLATORS: Title of the small expandable part at the bottom of AMC main #. window, where one can see the output of the commands lauched by AMC. #: ../AMC-gui.pl:2097 ../AMC-gui-main_window.glade:2570 msgid "Command output details" msgstr "கட்டளை வெளியீட்டு விவரங்கள்" #: ../AMC-gui.pl:2098 msgid "Use LaTeX editor or latex command for a precise diagnosis." msgstr "" "ஒரு துல்லிய குறையறிதலுக்கு LaTeX பதிப்பான் அல்லது LaTeX கட்டளையைப் " "பயன்படுத்தவும்." #: ../AMC-gui.pl:2113 msgid "Documents have been prepared" msgstr "ஆவணங்கள் ஆயத்தமாக்கப்பட்டது" #: ../AMC-gui.pl:2143 msgid "Working documents successfully generated." msgstr "வேலை ஆவணங்கள் வெற்றிகரமாக உருவாக்கப்பட்டன." #. TRANSLATORS: Here, "them" refers to the working documents. #: ../AMC-gui.pl:2145 msgid "You can take a look at them double-clicking on the list." msgstr "பட்டியலை இரட்டை சுட்டி செய்து அவற்றை பாருங்கள்." #. TRANSLATORS: Here, "they" refers to the working documents. #: ../AMC-gui.pl:2147 msgid "If they are correct, proceed to layouts detection..." msgstr "அவைகள் சரியாக இருந்தால், அமைவுகளை கண்டறிவதை தொடரவும்..." #: ../AMC-gui.pl:2169 msgid "Your question has a separate answers sheet." msgstr "உங்கள் கேள்வித்தாளுக்கு தனியான பதில் தாள் உள்ளது." #: ../AMC-gui.pl:2170 msgid "In this case, letters are shown inside boxes." msgstr "இந்த விடயத்தில், எழுத்துகள் கட்டங்களின் உள்ளே காட்டப்பட்டுள்ளன." #: ../AMC-gui.pl:2171 msgid "Your question is set to present labels inside the boxes to be ticked." msgstr "" "உங்கள் வினாத்தாளில் விவரத்துணுக்குகள் அமைக்கப்பட்டு, கட்டங்களுக்கு உள்ளே " "நிறத்திண்மையாக்கும்படியாக உள்ளது." #. TRANSLATORS: Here, %s will be replaced with the translation of "darkness #. threshold". #: ../AMC-gui.pl:2174 #, perl-format msgid "" "For better ticking detection, ask students to fill out completely boxes, and" " choose parameter \"%s\" around 0.5 for this project." msgstr "" "சிறந்த முறையில் நிறத்திண்மையை கண்டறிவதற்கு, முழுமையாக கட்டங்களை நிரப்ப " "மாணவர்கள் அறிவுறுத்தவும். மேலும் இந்த திட்டப்பணியின் அளபுரு \"%s\" மதிப்பை " "0.5 க்கு அமைக்கவும்." #: ../AMC-gui.pl:2175 #, perl-format msgid "At the moment, this parameter is set to %.02f." msgstr "இந்தக் கணத்தில் அளபுரு %.02f ல் அமைக்கப்படுகிறது." #: ../AMC-gui.pl:2176 msgid "Would you like to set it to 0.5?" msgstr "இதை 0.5 என அமைக்க விரும்புகிறீா்களா?" #. TRANSLATORS: This parameter is the ratio of dark pixels number over total #. pixels number inside box above which a box is considered to be ticked. #: ../AMC-gui.pl:2178 msgid "darkness threshold" msgstr "இருள் நிலையெல்லை" #: ../AMC-gui.pl:2199 msgid "" "Papers analysis was already made on the basis of the current working " "documents." msgstr "" "நடப்பு வேலை ஆவணங்களின் அடிப்படையில் தாள்களில் ஏற்கனவே பகுப்பாய்வு " "செய்யப்பட்டது." #: ../AMC-gui.pl:2200 msgid "You already made the examination on the basis of these documents." msgstr "" "இந்த ஆவணங்களின் அடிப்படையில் நீங்கள் ஏற்கனவே தோ்வு நடத்தியுள்ளீர்கள்." #: ../AMC-gui.pl:2201 msgid "" "If you modify working documents, you will not be capable any more of " "analyzing the papers you have already distributed!" msgstr "" "வேலை செய்துகொண்டிருக்கும் ஆவணங்களை நீங்கள் மாற்றியமைத்தால், உங்களால் ஏற்கனவே" " விநியோகித்த தாள்களை பகுப்பாய்வு செய்ய முடியாது." #: ../AMC-gui.pl:2202 ../AMC-gui.pl:2229 msgid "Do you wish to continue?" msgstr "தொடர விரும்புகிறீா்களா?" #: ../AMC-gui.pl:2203 ../AMC-gui.pl:2230 msgid "" "Click on OK to erase the former layouts and update working documents, or on " "Cancel to cancel this operation." msgstr "" "முன்னாளுள்ள அமைவுகளை அழித்து, பணி ஆவணங்களைப் புதுப்பிக்க சாி ஐ சுட்டவும் " "அல்லது இரத்து ஐ சுட்டி இரத்து செய்யவும்." #: ../AMC-gui.pl:2204 ../AMC-gui.pl:2231 msgid "To allow the use of an already printed question, cancel!" msgstr "ஏற்கனவே அச்சிட்ட வினாத்தாளை பயன்படுத்துவதற்கு, இரத்து செய்யவும்!" #: ../AMC-gui.pl:2227 msgid "Layouts are already calculated for the current documents." msgstr "நடப்பு ஆவணங்களுக்கான அமைவுகள் ஏற்கனவே கணக்கிடப்பட்டுள்ளது." #: ../AMC-gui.pl:2228 msgid "" "Updating working documents, the layouts will become obsolete and will thus " "be erased." msgstr "" "பணி ஆவணங்கள் புதுப்பிக்கப்படுவதால் அமைவுகள் வழக்கொழிந்து போய் " "அழிக்கப்பட்டுவிடும்." #: ../AMC-gui.pl:2258 #, perl-format msgid "" "To handle properly %s files, AMC needs the following components, that" " are currently missing:" msgstr "" "%s இந்த கோப்புகளை கையாள, AMC க்கு பின்வரும் கூறுகள் தேவைப்படுகிறது, " "அவை தற்போது காணவில்லை:" #: ../AMC-gui.pl:2270 msgid "Install these components on your system and try again." msgstr "உங்கள் கணினியில் இந்த கூறுகளை நிறுவிய பின்பு மீண்டும் முயற்சிக்கவும்." #. TRANSLATORS: Message when the user required printing the question paper, #. but it is not present (probably the working documents have not been #. properly generated). #: ../AMC-gui.pl:2405 msgid "" "You don't have any question to print: please check your source file and " "update working documents first." msgstr "" "உங்களிடம் அச்சிட எந்த வினாத்தாளும் இல்லை: தயவு செய்து உங்கள் மூல கோப்பை " "சாிபாா்த்து, முதலில் பணி ஆவணங்களைப் புதுப்பிக்கவும்." #. TRANSLATORS: Message when AMC does not know about the subject pages that #. has been generated. Usualy this means that the layout computation step has #. not been made. #: ../AMC-gui.pl:2422 msgid "Question's pages are not detected." msgstr "வினாத்தாளின் பக்கங்களை காணவில்லை." #: ../AMC-gui.pl:2423 msgid "Perhaps you forgot to compute layouts?" msgstr "ஒருவேளை நீங்கள் அமைவுகளை கணக்கிட மறந்துவிட்டீா்களா?" #: ../AMC-gui.pl:2445 #, perl-format msgid "" "You chose the printing method '%s' but it is not available (%s). Please " "install the missing dependencies or switch to another printing method." msgstr "" "நீங்கள் '%s' என்ற அச்சிடும் முறையை தொிவு செய்துள்ளீா்கள், ஆனால் அது " "கிடைக்கவில்லை (%s). தயவுசெய்து இல்லாது போன சாா்புகளை நிறுவவும் அல்லது வேறொரு" " அச்சிடும் முறையை மாற்றவும்." #: ../AMC-gui.pl:2466 msgid "" "You chose a printing method using CUPS but there are no configured printer " "in CUPS. Please configure some printer or switch to another printing method." msgstr "" "நீங்கள் CUPS ஐப் பயன்படுத்தி அச்சிடும் முறையைத் தொிவு செய்துள்ளீா்கள் ஆனால்" " CUPS இல் கட்டமைக்கப்பட்ட அச்சுப்பொறி இல்லை. தயவுசெய்து ஏதேனும் " "அச்சுப்பொறிகயை கட்டமைக்கவும் அல்லது வேறொரு அச்சிடும் முறைக்கு மாற்றவும். " #. TRANSLATORS: This is the title of the column containing the paper's numbers #. (1,2,3,...) in the table showing all available papers, from which the user #. will choose those he wants to print. #: ../AMC-gui.pl:2533 msgid "papers" msgstr "தாள்கள்" #: ../AMC-gui.pl:2622 msgid "You did not select any exam to print..." msgstr "அச்சிட எந்த தேர்வையும் தேர்ந்தெடுக்கவில்லை..." #: ../AMC-gui.pl:2641 ../AMC-gui.pl:2657 msgid "You selected only a few sheets to print." msgstr "அச்சிட சில தாள்களை மட்டும் தோ்ந்தெடுத்துள்ளீா்கள்." #: ../AMC-gui.pl:2642 msgid "" "As students are requested to write on more than one page, you must create as" " many exam sheets as necessary for all your students, with different sheets " "numbers, and print them all." msgstr "" "மாணவா்கள் ஒன்றுக்கு மேற்பட்ட பக்கங்களில் எழுதும்படி கேட்டுக் " "கொள்ளப்படுவதால், வெவ்வேறு தாள் எண்ணோடு வெவ்வேறு வினாத்தாள்களை உருவாக்கி " "அவையனைத்தையும் அச்சிட வேண்டும்." #: ../AMC-gui.pl:2643 msgid "" "If you print one or several sheets and photocopy them to have enough for all" " the students, you won't be able to continue with AMC!" msgstr "" "நீங்கள் ஒன்று அல்லது பல தாள்கள் அச்சிட்டு, அனைத்து மாணவர்களுக்கும் போதுமான " "அளவுக்கு அவற்றை நகலெடுத்தால், நீங்கள் தன்னியக்க பல தெரிவை தொடர " "முடியாது!" #: ../AMC-gui.pl:2644 msgid "Do you want to print the selected sheets anyway?" msgstr "தேர்ந்தெடுக்கப்பட்ட தாள்களை எப்படியாவது அச்சிட வேண்டுமா?" #: ../AMC-gui.pl:2658 msgid "" "Are you going to photocopy some printed subjects before giving them to the " "students?" msgstr "" "நீங்கள் அச்சிட்ட வினாத்தாள்களை மாணவர்களுக்கு தரும் முன் நகலெடுக்க " "போகிறீா்களா?" #: ../AMC-gui.pl:2659 msgid "If so, the corresponding option will be set for this project." msgstr "" "அப்படியானால், தொடர்புடைய விருப்பமானது இந்த திட்டப்பணிக்கு அமைக்கப்படும்." #: ../AMC-gui.pl:2660 msgid "" "However, you will be able to change this when giving your first scans to " "AMC." msgstr "" "எனினும், உங்கள் முதல் அலகீடுகளை AMC க்கு கொடுக்கும்போது இதை மாற்றிக்கொள்ள " "முடியும்." #. TRANSLATORS: the two %s will be replaced by the translations of "Answer #. sheet first" and "Extracting method". #: ../AMC-gui.pl:2682 #, perl-format msgid "" "You selected the '%s' option, that uses '%s', so the %s has been set to '%s'" " for you." msgstr "" "நீங்கள் தேர்ந்தெடுத்த '%s' விருப்பமானது '%s' ஐப் பயன்படுத்துவதால் %s ஆனது " "'%s' ல் அமைக்கப்படுகிறது." #: ../AMC-gui.pl:2684 ../AMC-gui-edit_preferences.glade:902 msgid "Extracting method" msgstr "பிரித்தெடுக்கும் முறை" #: ../AMC-gui.pl:2700 #, perl-format msgid "" "You selected the '%s' option, but this option needs 'qpdf' or 'pdftk' to be " "installed on your system. Please install one of these and try again." msgstr "" "நீங்கள் தேர்ந்தெடுத்த '%s' என்ற விருப்பத்திற்க்கு தேவையான 'qpdf' அல்லது " "'pdftk' ஐ நிறுவப்பட வேண்டும். இவற்றில் ஒன்றை நிறுவி மீண்டும் முயற்சிக்கவும்." #: ../AMC-gui.pl:2741 msgid "Print papers one by one..." msgstr "ஒன்றன் பின் ஒன்றாக தாள்களை அச்சிடு..." #: ../AMC-gui.pl:2790 msgid "" "Working documents are in an old format, which is not supported anymore." msgstr "" "பணி ஆவணங்கள் பழைய வடிவமைப்பில் உள்ளன. இவ்வடிவமைப்பு இனி ஆதரிக்கப்படாது." #: ../AMC-gui.pl:2791 msgid "Please generate again the working documents!" msgstr "மீண்டும் பணி ஆவணங்களை உருவாக்கவும்!" #: ../AMC-gui.pl:2805 msgid "Detecting layouts..." msgstr "அமைவுகளைக் கண்டறிதல்..." #: ../AMC-gui.pl:2823 msgid "No layout detected." msgstr "அமைவினைக் காணவில்லை." #: ../AMC-gui.pl:2824 msgid "" "Don't go through the examination before fixing this problem, " "otherwise you won't be able to use AMC for correction." msgstr "" "இந்த சிக்கலை சாிசெய்யும் முன் நீங்கள் தோ்வினை நடத்த வேண்டாம். " "அப்படி நடத்தினால், திருத்தம் செய்வதற்க்கு தன்னியக்க பல தெரிவைப் பயன்படுத்த " "முடியாது." #: ../AMC-gui.pl:2830 msgid "Layouts are detected." msgstr "அமைவுகள் கண்டறியப்பட்டன." #: ../AMC-gui.pl:2831 #, perl-format msgid "" "You can check all is correct clicking on button %s and looking at " "question pages to see if red boxes are well positioned." msgstr "" "%sஇந்த பொத்தானை சுட்டி எல்லா சிகப்பு கட்டங்களும் சாியாகப் " "பொருந்தியுள்ளதா என பாா்க்கலாம்." #: ../AMC-gui.pl:2831 ../AMC-gui-main_window.glade:560 msgid "Check layouts" msgstr "அமைவுகளைச் சாிபாா்க்க" #: ../AMC-gui.pl:2832 msgid "Then you can proceed to printing and to examination." msgstr "அடுத்து நீங்கள் அச்சிட்டு தோ்வை நடத்தலாம்." #: ../AMC-gui.pl:2905 msgid "No layout for this project." msgstr "இந்த திட்டப்பணிக்கான அமைவினைக் காணவில்லை." #. TRANSLATORS: Here, the first %s will be replaced with "Layout detection" (a #. button title), and the second %s with "Preparation" (the tab title where #. one can find this button). #: ../AMC-gui.pl:2907 #, perl-format msgid "Please use button %s in %s before manual data capture." msgstr "" "கைமுறை தரவு உள்ளீட்டிற்க்கு முன் %s இந்த பொத்தானை %sல் " "பயன்படுத்தவும்." #: ../AMC-gui.pl:2908 ../AMC-gui-main_window.glade:508 msgid "Layout detection" msgstr "அமைவைக் கண்டறிதல்" #: ../AMC-gui.pl:2909 ../AMC-gui-main_window.glade:684 msgid "Preparation" msgstr "ஆயத்தப்படுத்துதல்" #: ../AMC-gui.pl:2947 #, perl-format msgid "Pre-allocate sheet ids from the page numbers, starting at %d" msgstr "தாள் அடையாள எண் பக்க எண் %d ல் இருந்து தொடங்கும்படி முன்பே ஒதுக்கவும்" #: ../AMC-gui.pl:2978 msgid "Automatic data capture can be done in two different modes:" msgstr "தானியங்கி தரவு உள்ளீட்டை இரண்டு பாணிகளில் செய்ய முடியும்:" #: ../AMC-gui.pl:2983 msgid "" "In the most robust one, you give a different exam (with a different exam " "number) to every student. You must not photocopy subjects before " "distributing them." msgstr "" "முதல் பாணியில், நீங்கள் ஒவ்வொரு மாணவருக்கும் வேறுபட்ட தோ்வை (வேறுபட்ட " "தோ்வெண்ணுடன்) கொடுக்கிறீா்கள். நீங்கள் கேள்வித்தாளை நகலெடுக்கக்கூடாது." #: ../AMC-gui.pl:2988 msgid "" "In the second one (which can be used only if answer sheets to be scanned " "have one page per candidate) you can photocopy answer sheets and give the " "same subject to different students." msgstr "" "இரண்டாவது பாணியில், நீங்கள் கேள்வித்தாளை நகலெடுக்கலாம் (சில மாணவா்களுக்கு " "ஒரே மாதிாியான பதில் தாள் கிடைக்கலாம்). " #: ../AMC-gui.pl:2989 msgid "After the first automatic capture, you can't switch to the other mode." msgstr "" "முதல் முறை தானியங்கி தரவு உள்ளீட்டிற்க்குப் பிறகு நீங்கள் வேறு பாணிக்கு மாற " "முடியாது." #: ../AMC-gui.pl:3163 msgid "Automatic data capture..." msgstr "தானியங்கி தரவு உள்ளீடு..." #: ../AMC-gui.pl:3174 msgid "Automatic data capture has been completed" msgstr "தானியங்கி தரவு உள்ளீடு நிறைவடைந்தது" #: ../AMC-gui.pl:3183 #, perl-format msgid "" "Some of the pages you submitted (%d of them) have already been processed " "before. Old data has been overwritten." msgstr "" "நீங்கள் சமர்ப்பித்த பக்கங்களில் சில (%d) ஏற்கனவே பக்குவப்படுத்தப்பட்டுள்ளன. " "பழைய தரவுகள் மேலெழுதப்பட்டது." #. TRANSLATORS: Names list file : (none) #: ../AMC-gui.pl:3271 msgid "(none)" msgstr "(ஒன்றுமில்லை)" #: ../AMC-gui.pl:3292 #, perl-format msgid "Unsuitable names file: %d errors, first on line %d." msgstr "பெருத்தமற்ற கோப்பு பெயா்கள்: %d பிழைகள், வாிசை %d ல் முதல் பிழை." #. TRANSLATORS: Here, do not translate 'name' and 'surname' (except in #. french), as the column names in the students list file has to be named in #. english in order to be properly detected. #: ../AMC-gui.pl:3309 #, perl-format msgid "" "Found %d empty names in names file %s. Check that name or " "surname column is present, and always filled." msgstr "" "மாணவா்கள் பெயருள்ள கோப்பு %s ல் %d ஐ வெற்றுப் பெயா்கள் உள்ளது. " "பெயா் அல்லது குடும்பப் பெயா் நெடுவாிசைகள் உள்ளதா என " "சரிபாா்க்கவும், அவைகள் முழுவதும் நிரம்பியருக்க வேண்டும்." #: ../AMC-gui.pl:3310 ../AMC-gui.pl:3326 msgid "Edit the names file to correct it, and re-read." msgstr "மாணவா்கள் பெயருள்ள கோப்பினை பதிப்பித்து சாிசெய்யவும்." #: ../AMC-gui.pl:3326 #, perl-format msgid "Found duplicate names: %s. Check that all names are different." msgstr "" "சில பெயா்கள் ஒரு முறைக்கு மேல் காணப்படுகிறது: %s. அனைத்து பெயா்களும் " "வேறுபட்டு இருப்பதை உறுதி செய்யவும். " #. TRANSLATORS: Here, %s will be replaced with the name of the tab "Data #. capture". #: ../AMC-gui.pl:3358 #, perl-format msgid "" "Before associating names to papers, you must choose a students list file in " "tab \"%s\"." msgstr "" "பெயா்களைப் பதில் தாளுடன் இணைக்கும் முன்பு, தத்தல் \"%s\" லிருந்து " "மாணவா்களின் ஒரு பெயா் பட்டியல் கோப்பினைத் தொிவு செய்யவும்." #. One of the "notify the user at the end of the following actions" checkbox: #. for automatic data capture. #: ../AMC-gui.pl:3359 ../AMC-gui-edit_preferences.glade:1584 #: ../AMC-gui-main_window.glade:1286 msgid "Data capture" msgstr "தரவு உள்ளீடல்" #: ../AMC-gui.pl:3368 msgid "" "Please choose a key from primary keys in students list before association." msgstr "" "தயவுசெய்து மாணவர்கள் பட்டியலில் இருந்து முதன்மை குறிக்கான புலத்தைத் தொிவு " "செய்யவும். " #: ../AMC-gui.pl:3377 msgid "" "Please choose a code (made with LaTeX command \\AMCcodeGrid or equivalent) " "before automatic association." msgstr "" "தானியக்கப் பெயரிணைப்புக்கு முன் தயவுசெய்து ஒரு குறிமுறையைத் தெரிவு செய்யவும்" " (LaTeX கட்டளை \\ AMCcodeGrid அல்லது அதற்கு ஈடான)." #. TRANSLATORS: Here, %s will be replaced with "Students identification", #. which refers to a paragraph in the tab "Marking" from AMC main window. #: ../AMC-gui.pl:3422 #, perl-format msgid "" "Before associating names to papers, you must choose a students list file in " "paragraph \"%s\"." msgstr "" "பெயா்களைப் பதில் தாளுடன் இணைக்கும் முன்பு, பத்தி \"%s\" லிருந்து மாணவா்களின்" " ஒரு பெயா் பட்டியல் கோப்பினைத் தொிவு செய்யவும்." #: ../AMC-gui.pl:3423 msgid "Students identification" msgstr "மாணவா்களின் அடையாளமறிதல்" #: ../AMC-gui.pl:3446 msgid "Automatic association..." msgstr "தானியக்க பெயாிணைப்பு..." #: ../AMC-gui.pl:3468 #, perl-format msgid "Automatic association completed: %d students recognized." msgstr "தானியக்க பெயாிணைப்பு முடிந்தது: %d மாணவா்கள் கண்டுணரப்பட்டனா்." #. TRANSLATORS: Here %s and %s will be replaced with two parameters names: #. "Primary key from this list" and "Code name for automatic association". #: ../AMC-gui.pl:3470 #, perl-format msgid "Please check \"%s\" and \"%s\" values and try again." msgstr "" "\"%s\" மற்றும் \"%s\" னுடைய மதிப்புகளைச் சாிபாா்த்து திரும்ப " "முயற்ச்சிக்கவும்." #: ../AMC-gui.pl:3471 msgid "Primary key from this list" msgstr "முதன்மைக்குறி " #: ../AMC-gui.pl:3472 msgid "Code name for automatic association" msgstr "தானியக்க பெயாிணைப்பிற்கான குறிப்பெயா்" #: ../AMC-gui.pl:3478 msgid "" "Automatic association is now finished. You can ask for manual association to" " check that all is fine and, if necessary, read manually students names " "which have not been automatically identified." msgstr "" "தானியங்கி பெயாிணைப்பு இப்போது முடிக்கப்பட்டுள்ளது. கைமுறை பெயாிணைப்பை " "பயன்படுத்தி எல்லாம் சாியாக இணைக்கப்பட்டதா என காணலாம். தேவைப்பட்டால், தானாக " "அடையாளம் காணாத மாணவா்களின் பெயர்களை கைமுறையால் இணைக்கலாம்." #: ../AMC-gui.pl:3640 #, perl-format msgid "" "Some manual association data has be found, which will be lost if the primary" " key is changed. Do you want to switch back to the primary key \"%s\" and " "keep association data?" msgstr "" "முதன்மைக்குறியை மாற்றினால், காணப்படும் சில கைமுறை பெயாிணைப்புத் தரவு " "இழக்கப்படும். பெயாிணைப்புத் தரவை காக்க முதன்மைக்குறியை திரும்ப \"%s\" ல் " "அமைக்கவா?" #: ../AMC-gui.pl:3666 #, perl-format msgid "" "The primary key from the students list has been set to \"%s\", which is not " "the value from the association data." msgstr "" "மாணவா்களின் பட்டியலின் முதன்மைக்குறி \"%s\" ஆக உள்ளது, ஆனால் இது " "பெயாிணைப்புத் தரவின் மதிப்பு அல்ல." #: ../AMC-gui.pl:3667 msgid "" "Automatic papers/students association will be re-run to update the " "association data." msgstr "" "பெயாிணைப்புத் தரவைப் புதுப்பிப்பதற்கு தானியங்கு தாள்கள்-மாணவா்கள் " "பெயாிணைப்பு மீண்டும் இயக்கப்படும்." #: ../AMC-gui.pl:3693 #, perl-format msgid "Papers are not yet corrected: use button \"%s\"." msgstr "பதில்தாள்கள் இன்னும் திருத்தப்படவில்லை: \"%s\" பொத்தானைப் பயன்படுத்தவும்." #. TRANSLATORS: This is a button: "Mark" is here an action to be called by the #. user. When clicking this button, the user requests scores to be computed #. for all students. #: ../AMC-gui.pl:3695 ../AMC-gui-main_window.glade:1363 msgid "Mark" msgstr "திருத்த" #: ../AMC-gui.pl:3736 msgid "Extracting marking scale..." msgstr "கேள்விக்கான மதிப்பெண் அளவை எடுத்தல்..." #: ../AMC-gui.pl:3940 msgid "Computing marks..." msgstr "மதிப்பெண்ணைக் கணக்கீடுதல்..." #: ../AMC-gui.pl:3945 msgid "Grading has been completed" msgstr "மதிப்பிடல் முடிவடைந்தது" #. TRANSLATORS: This is the marks mean for all students. #: ../AMC-gui.pl:3961 #, perl-format msgid "Mean: %.2f" msgstr "சராசாி: %.2f" #: ../AMC-gui.pl:3964 msgid "No marks computed" msgstr "மதிப்பெண்கள் கணக்கிடப்படவில்லை" #: ../AMC-gui.pl:3983 msgid "Pre-association" msgstr "முன்னிணைப்பு" #: ../AMC-gui.pl:3997 msgid "No students list file" msgstr "மாணவா்கள் பெயா் பட்டியல் கோப்பு இல்லை" #: ../AMC-gui.pl:3999 msgid "No primary key from students list file" msgstr "மாணவா்கள் பெயா் பட்டியல் கோப்பில் முதன்மைக்குறி இல்லை" #: ../AMC-gui.pl:4005 #, perl-format msgid "Missing identification for %d answer sheets" msgstr "%d இந்த பதில்தாள்களின் அடையாளமறிதல் விடுபட்டுள்ளது" #: ../AMC-gui.pl:4007 msgid "All completed answer sheets are associated with a student name" msgstr "" "மாணவா்களின் பெயா்களோடு அவா்களின் முடிக்கப்பெற்ற பதில் தாள்கள் இணைக்கப்பட்டது" #: ../AMC-gui.pl:4061 msgid "exam ID" msgstr "தோ்வு அடையாளம்" #: ../AMC-gui.pl:4076 msgid "student" msgstr "மாணவா்" #. TRANSLATORS: File name for single annotated answer sheets with only some #. selected students. Please use simple characters. #: ../AMC-gui.pl:4207 msgid "Selected_students" msgstr "குறிப்பிட்ட_மாணவா்கள்" #. TRANSLATORS: File name for single annotated answer sheets with all #. students. Please use simple characters. #: ../AMC-gui.pl:4209 msgid "All_students" msgstr "அனைத்து_மாணவா்கள்" #: ../AMC-gui.pl:4257 msgid "Annotating papers..." msgstr "பதில்தாள்கள் சுட்டுவிளக்கப்பட்டுக் கொண்டிருக்கிறது..." #: ../AMC-gui.pl:4261 msgid "Annotations have been completed" msgstr "சுட்டுவிளக்கப்படுத்தல் முடிவடைந்தது" #: ../AMC-gui.pl:4375 #, perl-format msgid "Project \"%s\" preferences" msgstr "திட்டப்பணி \"%s\" ன் முன்மதிப்பீடுகள்" #: ../AMC-gui.pl:4378 msgid "Project preferences" msgstr "திட்டப்பணி முன்மதிப்பீடுகள்" #: ../AMC-gui.pl:4484 #, perl-format msgid "" "You modified \"%s\" value, which is the default value used when " "creating new projects. Do you want to change also \"%s\" for the " "opened %s project?" msgstr "" "புதிய திட்டப்பணி உருவாக்கும் போது பயன்படுத்திய \"%s\" ன் இயல்பான " "மதிப்பை நீங்கள் மாற்றியுள்ளீா்கள். திறக்கப்பட்ட திட்டப்பணி \"%s\" ல் " "இதையும் \"%s\" மாற்ற விரும்புகிறீா்களா?" #: ../AMC-gui.pl:4600 msgid "Working documents are not readable" msgstr "பணி ஆவணங்களைப் படிக்க முடியவில்லை" #: ../AMC-gui.pl:4603 msgid "No working documents" msgstr "பணி ஆவணங்கள் இல்லை" #: ../AMC-gui.pl:4606 msgid "Working documents last update:" msgstr "பணி ஆவணங்கள் இறுதியாக புதுப்பிக்கப்படுகிறது:" #: ../AMC-gui.pl:4662 msgid "No layout" msgstr "அமைவு இல்லை" #: ../AMC-gui.pl:4665 #, perl-format msgid "Processed %d pages" msgstr "%d பக்கங்கள் செயல்முறைக்குள்ளாக்கப்பட்டது" #: ../AMC-gui.pl:4668 msgid "but some defects were detected." msgstr "ஆனால் சில குறைபாடுகள் கண்டறியப்பட்டன." #: ../AMC-gui.pl:4680 msgid "" "The \\namefield command is not used. Writing subjects without name field is " "not recommended" msgstr "" "கட்டளை \\namefield ஐப் பயன்படுத்தவில்லை. \\namefield இல்லாமல் பாடங்களை " "எழுதுவது பாிந்துரைக்கப்படவில்லை" #: ../AMC-gui.pl:4681 msgid "" "The \\namefield command is used several times for the same subject. This " "should not be the case, as each student should write his name only once" msgstr "" "கட்டளை \\namefield பலமுறை ஒரே பாடத்திற்கு பயன்படுத்தப்பட்டுள்ளது. ஆனால் " "மாணவா்கள் தங்கள் பெயரை ஒரு முறை எழுதினால் போதுமானது" #: ../AMC-gui.pl:4682 msgid "No box to be ticked" msgstr "எந்த கட்டத்திலும் சுட்டத் தேவையில்லை" #: ../AMC-gui.pl:4683 msgid "" "The corner marks and binary boxes are not at the same location on all pages" msgstr "" "அனைத்துப் பக்கங்களிலும் இருமக் கட்டங்களும் மூலைகளிலுள்ள வட்டக்குறியும் ஒரே " "இடத்தில் அமையவில்லை" #: ../AMC-gui.pl:4684 msgid "" "Some material has been placed out of the page. This is often a result of a " "multiple columns question group starting too close from the page bottom. In " "such a case, use \"needspace\"." msgstr "" "பக்கத்திற்க்கு வெளியே சில பொருள் வைக்கப்பட்டுள்ளது. பல் நெடுவரிசைகளின் " "கேள்விக்குழுவானது பக்கத்தின் கீழே மிக நெருக்கமாக தொடங்குவதால் ஏற்ப்பட்ட " "விளைவு. அத்தகைய நிலையில், \"தேவையான இடத்தைப்\" பயன்படுத்தவும்." #: ../AMC-gui.pl:4705 msgid "" "Some potential defects were detected for this subject. Correct them in the " "source and update the working documents." msgstr "" "இந்த பாடத்தில் சில சாத்தியமான குறைபாடுகள் கண்டறியப்பட்டன. மூலத்தில் அவற்றை " "சாிசெய்து, பணி ஆவணங்களை புதுப்பிக்கவும்." #: ../AMC-gui.pl:4711 #, perl-format msgid "(See for example pages %s and %s)" msgstr "(எடுத்துக்காட்டாக பக்கங்கள் %s மற்றும் %s ஐப் பாா்க்கவும்)" #: ../AMC-gui.pl:4716 #, perl-format msgid "(Concerns %1$d pages, see for example page %2$s)" msgstr "" "( தொடர்பான பக்கங்கள் %1$d, எடுத்துக்காட்டாக %2$s பக்கத்தைப் பார்க்கவும்)" #: ../AMC-gui.pl:4723 #, perl-format msgid "(Concerns %1$d exams, see for example sheet %2$d)" msgstr "(%1$d தோ்வுகள் தெடா்பாக தாள் %2$d ஐ உதாரணமாகப் பாா்க்கவும்)" #: ../AMC-gui.pl:4840 #, perl-format msgid "Data capture from %d complete papers and %d incomplete papers" msgstr "%d முழுமையான மற்றும் %d முழுமையற்ற தாள்களில் இருந்து தரவை எடுத்தல்" #: ../AMC-gui.pl:4844 #, perl-format msgid "Data capture from %d complete papers" msgstr "%d முழுமையான தாள்களில் இருந்து தரவை எடுத்தல்" #. TRANSLATORS: this text points out that no data capture has been made yet. #: ../AMC-gui.pl:4849 msgid "No data" msgstr "தரவு இல்லை" #: ../AMC-gui.pl:4856 #, perl-format msgid "Overwritten pages: %d" msgstr "மேலெழுதப்பட்ட பக்கங்கள்: %d" #: ../AMC-gui.pl:4864 msgid "All scans were properly recognized." msgstr "அனைத்து அலகீடுகளும் ஒழுங்காக கண்டுணரப்பட்டது." #: ../AMC-gui.pl:4871 #, perl-format msgid "%d scans were not recognized." msgstr "%d அலகீடுகள் ஒழுங்காக கண்டுணரப்படவில்லை." #. TRANSLATORS: column title for the list of overwritten pages. This refers to #. the page from the question #: ../AMC-gui.pl:4895 msgid "Page" msgstr "பக்கம்" #. TRANSLATORS: column title for the list of overwritten pages. This refers to #. the number of times the page has been overwritten. #: ../AMC-gui.pl:4900 msgid "count" msgstr "எண்ணிக்கை" #. TRANSLATORS: column title for the list of overwritten pages. This refers to #. the date of the last data capture for the page. #: ../AMC-gui.pl:4905 msgid "Date" msgstr "கிழமை" #: ../AMC-gui.pl:4946 msgid "Looking for analysis..." msgstr "பகுப்பாய்விற்க்காக பாா்த்துக்கொண்டிருக்கிறது..." #: ../AMC-gui.pl:4988 msgid "Automatic data capture now completed." msgstr "தானியக்க தரவு எடுத்தல் இப்போது முடிவடைந்தது." #: ../AMC-gui.pl:4989 #, perl-format msgid "It is not complete (missing pages from %d papers)." msgstr "இது முடிவடையவில்லை (விடுபட்ட பக்கங்கள் %d ஐ தாளிலிருந்து)." #: ../AMC-gui.pl:4990 msgid "" "You can analyse data capture quality with some indicators values in analysis" " list:" msgstr "" "பகுப்பாய்வு பட்டியலில் சில குறிகாட்டிகளின் மதிப்புகளைக்கொண்டு உள்ளிட்ட " "தரவுகளின் தரத்தை நீங்கள் பகுப்பாய்வு செய்யலாம்:" #: ../AMC-gui.pl:4992 #, perl-format msgid "" "- %s represents positioning gap for the four corner marks. Great " "value means abnormal page distortion." msgstr "" "- %s நான்கு மூலையில் வட்டகுறிகளுக்கிடையே உள்ள இடைவெளி இருப்பதை " "குறிக்கிறது. இதன் மதிப்பு அதிகமெனில் இயல்பற்ற பக்க உருக்குலைவு என்று பொருள்." #: ../AMC-gui.pl:4994 #, perl-format msgid "" "- great values of %s are seen when darkness ratio is very close to " "the threshold for some boxes." msgstr "" "- சில கட்டங்களின் இருள் விகிதம் நிலையெல்லைக்கு அருகில் இருந்தால் இதன் " "%s மதிப்பு அதிகமாகும்." #: ../AMC-gui.pl:4996 #, perl-format msgid "" "You can also look at the scan adjustment (%s) and ticked and unticked" " boxes (%s) using right-click on lines from table %s." msgstr "" "நீங்கள் அலகீடு சாியமைப்பைப் பாா்க்கலாம் (%s) மற்றும் %sஎன்ற " "அட்டவணையிலுள்ள கோடுகளின் மேல் வலது-சுட்டியை அழுத்தி நிரப்பப்பட்ட மற்றும் " "நிரப்பப்படாத கட்டங்களை (%s) பாா்க்கலாம்." #: ../AMC-gui.pl:4996 msgid "Diagnosis" msgstr "குறையறிதல்" #: ../AMC-gui.pl:5024 msgid "Pages that miss data capture to complete students sheets:" msgstr "" "மாணவா்கள் தாள்களைத் திருத்தி முடிக்கத் தேவையான தரவு உள்ளீடு விடுபட்டுள்ள " "பக்கங்கள்:" #: ../AMC-gui.pl:5145 #, perl-format msgid "Error loading scan %s" msgstr "அலகீடை சுமையேற்றுவதில் பிழை %s" #: ../AMC-gui.pl:5151 msgid "No scan selected" msgstr "ஒரு அலகீடும் தோ்வு செய்யப்படவில்லை" #: ../AMC-gui.pl:5156 msgid "No more unrecognized scans" msgstr "கண்டறியப்படாத அலகீடுகள் இல்லை" #: ../AMC-gui.pl:5234 msgid "Making diagnostic image..." msgstr "குறையறியும் படத்தை உருவாக்குகிறது..." #: ../AMC-gui.pl:5304 msgid "(no description)" msgstr "(ஒரு குறிப்புமில்லை)" #. TRANSLATORS: This is a column title for the list of files to be included in #. a template being created. #. TRANSLATORS: This is the title of a column containing attachments file #. paths in a table showing all attachments, when sending them to the students #. by email. #: ../AMC-gui.pl:5389 ../AMC-gui.pl:6336 msgid "file" msgstr "கோப்பு" #: ../AMC-gui.pl:5469 msgid "Add files to template" msgstr "வாா்ப்புருவில் கோப்புகளைச் சோ்" #: ../AMC-gui.pl:5490 msgid "" "When making a template, you can only add files that are within the project " "directory." msgstr "" "வாா்ப்புருவை உருவாக்கும் போது திட்டப்பணி அடைவிலுள்ள கோப்புகளை மட்டுமே " "சோ்க்க முடியும்." #. TRANSLATORS: This is a column name for the list of available templates, #. when creating a new project based on a template. #: ../AMC-gui.pl:5613 msgid "template" msgstr "வாா்ப்புரு" #: ../AMC-gui.pl:5658 msgid "All source files" msgstr "அனைத்து மூலக்கோப்புகள்" #: ../AMC-gui.pl:5676 #, perl-format msgid "%s files" msgstr "%s கோப்புகள்" #: ../AMC-gui.pl:5710 msgid "Archive (zip, tgz)" msgstr "காப்பகக் கோப்பு (zip, tgz)" #: ../AMC-gui.pl:5739 #, perl-format msgid "Nothing extracted from archive %s. Check it." msgstr "" "%s காப்பகக் கோப்பிலிருந்து எதையுமே எடுக்கவில்லை. அதைச் சரிபாா்க்கவும்." #: ../AMC-gui.pl:5868 #, perl-format msgid "" "File %s already exists in project directory: do you want to replace it?" msgstr "" "திட்டப்பணி அடைவில் கோப்பு %s ஏற்கனவே உள்ளது: நீங்கள் அதை மாற்றிட " "விரும்புகிறீர்களா?" #: ../AMC-gui.pl:5869 msgid "" "Click yes to replace it and loose pre-existing contents, or No to cancel " "source file import." msgstr "" "அதை மாற்றுவதற்கு ஆம் என்பதைச் சுட்டவும் முன்புள்ள உள்ளடக்கங்கள் " "இழக்கப்படும், அல்லது மூல கோப்பு இறக்குமதியை இரத்து செய்ய இல்லை என்பதைச் " "சுட்டவும்." #: ../AMC-gui.pl:5885 msgid "The source file has been copied to project directory." msgstr "திட்டப்பணி அடைவிற்கு மூல கோப்பு நகலெடுக்கப்பட்டுள்ளது." #: ../AMC-gui.pl:5885 #, perl-format msgid "You can now edit it with button \"%s\" or with any editor." msgstr "" "நீங்கள் இப்போது \"%s\" பொத்தானுடன் பதிப்பிக்கலாம் அல்லது எந்த பதிப்பியுடனும்" " திருத்தலாம்." #: ../AMC-gui.pl:5885 ../AMC-gui-main_window.glade:241 msgid "Edit source file" msgstr "மூலக்கோப்பினை பதிப்பி" #: ../AMC-gui.pl:5893 #, perl-format msgid "Error copying source file: %s" msgstr "மூலக்கோப்பினை நகலெடுக்கும் போது பிழை: %s" #: ../AMC-gui.pl:6078 msgid "" "In order to send a useful bug report, please attach the following documents:" msgstr "பயனுள்ள பிழை அறிக்கையை அனுப்ப, பின்வரும் ஆவணங்களை இணைக்கவும்:" #: ../AMC-gui.pl:6079 msgid "" "an archive (in some compressed format, like ZIP, 7Z, TGZ...) containing the " "project directory, scan files and configuration " "directory (.AMC.d in home directory), so as to reproduce and analyse " "this problem." msgstr "" "திட்டப்பணி அடைவு,அலகீடு கோப்புகள் மற்றும் உருப்படுத்தல் " "அடைவுஆகியவற்றை உள்ளடக்கிய ஒரு ஆவண காப்பகம் (சில சுருக்கப்பட்ட " "வடிவத்தில், எ.கா. ZIP, 7Z, TGZ...) (முகப்பு அடைவில் .AMC.d), அதை " "மறுஉருவாக்கம் செய்து இந்த பிரச்சினையை ஆய்வு செய்ய வேண்டும்." #: ../AMC-gui.pl:6080 msgid "" "the log file produced when the debugging mode (in Help menu) is " "checked. Please try to reproduce the bug with this mode activated." msgstr "" "(உதவிப் பட்டியில்) வழுநீக்கி பாணியை தொிவு செய்திருந்தால் பதிவு " "கோப்பு உருவாக்கப்படும். இந்த பாணியை செயலூக்கி பிழைப் பதிவை " "மறுஉருவாக்கம் செய்யவும். " #: ../AMC-gui.pl:6081 #, perl-format msgid "Bug reports can be filled at %s or sent to the address below." msgstr "" "பிழை அறிக்கைகளை %s இல் நிரப்பலாம் அல்லது கீழே உள்ள முகவாிக்கு அனுப்பலாம்." #: ../AMC-gui.pl:6082 ../AMC-gui.pl:6086 msgid "AMC community site" msgstr "தானியக்க பல தொிவின் சமூக தளம்" #: ../AMC-gui.pl:6149 msgid "Attach file" msgstr "கோப்பினை இணைக்க" #: ../AMC-gui.pl:6183 msgid "There are no annotated corrected answer sheets to send." msgstr "அனுப்பப்படாத சுட்டுவிளக்கப்பட்ட பதில் தாள்கள் எதுவும் இல்லை." #: ../AMC-gui.pl:6186 msgid "" "Please group the annotated sheets to PDF files to be able to send them." msgstr "" "தயவு செய்து சுட்டுவிளக்கத் தாள்களை PDF கோப்புக் குழுவாக்கி அவைகளை அனுப்ப " "முடியும்படி செய்யவும்." #: ../AMC-gui.pl:6187 msgid "" "Please annotate answer sheets and group them to PDF files to be able to send" " them." msgstr "" "தயவு செய்து பதில் தாள்களில் சுட்டுவிளக்கம் இட்டு PDF கோப்புக் குழுவாக்கி " "அவைகளை அனுப்ப முடியும்படி செய்யவும்." #: ../AMC-gui.pl:6218 #, perl-format msgid "" "Sending emails requires some perl modules that are not installed: %s. Please" " install these modules and try again." msgstr "" "மின்னஞ்சல்களை அனுப்பத் தேவையான சில perl கூறுகள் நிறுவப்படவில்லை:%s. இந்த " "கூறுகளை நிறுவிய பின்பு மீண்டும் முயற்சிக்கவும்." #: ../AMC-gui.pl:6239 msgid "" "SMTP security mode \"STARTTLS\" is only available with Email::Sender version" " 1.300027 and over. Please install a newer version of this perl module or " "change SMTP security mode, and try again." msgstr "" "SMTP பாதுகாப்பு முறை \"STARTTLS\" ஆனது Email::Sender பதிப்பு 1.300027 " "மற்றும் அதற்கு மேல் மட்டுமே கிடைக்கும். இந்த perl கூறின் புதிய பதிப்பை " "நிறுவி அல்லது SMTP பாதுகாப்பு முறைமையை மாற்றி, மீண்டும் முயற்சிக்கவும்." #: ../AMC-gui.pl:6255 #, perl-format msgid "The email address you entered (%s) is not correct." msgstr "நீங்கள் உள்ளிட்ட மின்னஞ்சல் முகவாி (%s) சாியானது அல்ல." #: ../AMC-gui.pl:6257 msgid "Please edit your preferences to correct your email address." msgstr "" "தயவுசெய்து உங்கள் மின்னஞ்சல் முகவாியை சாிசெய்ய முன் மதிப்பீடுகளைப் " "பதிப்பிக்கவும்." #: ../AMC-gui.pl:6259 msgid "You did not enter your email address." msgstr "நீங்கள் உங்கள் மின்னஞ்சல் முகவாியை உள்ளிடவில்லை." #: ../AMC-gui.pl:6260 msgid "Please edit the preferences to set your email address." msgstr "" "தயவுசெய்து உங்கள் மின்னஞ்சல் முகவாியை அமைக்க முன் மதிப்பீடுகளைப் " "பதிப்பிக்கவும்." #: ../AMC-gui.pl:6283 #, perl-format msgid "" "The sendmail program cannot be found at the location you specified in" " the preferences (%s). Please update your configuration." msgstr "" "முன்மதிப்பீடுகளில் (%s) நீங்கள் குறிப்பிட்ட இடத்தில் sendmail நிரலைக்" " காணவில்லை. தயவுசெய்து உங்கள் உருப்படுத்தலைப் புதுப்பிக்கவும்." #: ../AMC-gui.pl:6303 msgid "" "No email addresses has been found in the students list file. You need to " "write the students addresses in a column of this file." msgstr "" "மாணவா்கள் பட்டியல் கோப்பில் எந்த மின்னஞ்சல் முகவாிகளும் இல்லை. இந்த கோப்பின்" " ஒரு நெடுவாிசையில் மாணவா்களின் மின்னஞ்சல் முகவாிகளை எழுதவும்." #. TRANSLATORS: This is the title of a column containing copy numbers in a #. table showing all annotated answer sheets, when sending them to the #. students by email. #: ../AMC-gui.pl:6351 msgid "copy" msgstr "நகல்" #. TRANSLATORS: This is the title of a column containing students email #. addresses in a table showing all annotated answer sheets, when sending them #. to the students by email. #: ../AMC-gui.pl:6363 msgid "email" msgstr "மின்னஞ்சல்" #. TRANSLATORS: This is the title of a column containing mailing status (not #. sent, already sent, failed) in a table showing all annotated answer sheets, #. when sending them to the students by email. #: ../AMC-gui.pl:6369 msgid "status" msgstr "நிலமை" #: ../AMC-gui.pl:6388 msgid "failed" msgstr "தோல்வியடைந்தது" #: ../AMC-gui.pl:6446 msgid "Some files you asked to be attached to the emails are missing:" msgstr "" "நீங்கள் மின்னஞ்சல்களுடன் இணைக்கக் கேட்டுக் கொண்ட சில கோப்புகளைக் காணவில்லை:" #: ../AMC-gui.pl:6447 msgid "Please create them or remove them from the list of attached files." msgstr "" "தயவுசெய்து அவற்றை உருவாக்கவும் அல்லது இணைக்கப்பட வேண்டிய கோப்புகளின் " "பட்டியலில் இருந்து அவற்றை நீக்கவும்." #: ../AMC-gui.pl:6499 msgid "Sending emails..." msgstr "மின்னஞ்சல்களை அனுப்புகிறது..." #: ../AMC-gui.pl:6508 msgid "Cancelled." msgstr "இரத்தானது." #: ../AMC-gui.pl:6510 msgid "SMTP authentication failed: check SMTP configuration and password." msgstr "" "SMTP அங்கீகரிப்பு தோல்வியுற்றது: SMTP உருப்படுத்தல் மற்றும் கடவுச்சொல்லை " "சோதிக்கவும்." #: ../AMC-gui.pl:6512 #, perl-format msgid "%d message(s) has been sent." msgstr "%d செய்தி(கள்) அனுப்பப்பட்டது." #: ../AMC-gui.pl:6552 msgid "Set exam name" msgstr "தோ்வுப் பெயரை அமை" #: ../AMC-gui.pl:6559 ../AMC-gui-edit_preferences.glade:4154 msgid "Examination name" msgstr "தோ்வுப் பெயா்" #: ../AMC-gui.pl:6563 ../AMC-gui-edit_preferences.glade:4165 msgid "Code (short name) for examination" msgstr "தோ்வுக்கான குறிமுறை (குறுகிய பெயா்)" #. TRANSLATORS: This is the title of a column containing all columns names #. from the students list file, when choosing which columns has to be exported #. to the spreadsheets. #: ../AMC-gui.pl:6613 msgid "column" msgstr "நெடுவாிசை" #: ../AMC-gui.pl:6621 msgid "" msgstr "" #: ../AMC-gui.pl:6622 msgid "" msgstr "" #: ../AMC-gui.pl:6623 msgid "" msgstr "" #: ../AMC-gui.pl:6657 msgid "Install an AMC plugin" msgstr "ஒரு தானியக்க பல தொிவு சொருகியை நிறுவவும்" #: ../AMC-gui.pl:6662 msgid "Plugins (zip, tgz)" msgstr "சொருகிகள் (zip, tgz) " #: ../AMC-gui.pl:6682 #, perl-format msgid "" "An error occured while trying to extract files from the plugin archive: %s." msgstr "" "சொருகி ஆவணகாப்பகத்திலிருந்து கோப்புகளை பிாித்தெடுக்க முயற்சிக்கும் போது " "பிழை நோ்ந்துவிட்டது: %s." #: ../AMC-gui.pl:6696 msgid "Nothing extracted from the plugin archive. Check it." msgstr "" "சொருகி ஆவணகாப்பகத்திலிருந்து எதையுமே பிாித்தெடுக்கவில்லை. அதைச் " "சாிபாா்க்கவும்." #: ../AMC-gui.pl:6706 msgid "" "This is not a valid plugin, as it contains more than one directory at the " "first level." msgstr "" "முதல் நிலையில் ஒன்றுக்கும் மேற்பட்ட அடைவைக் கொண்டிருப்பதால், இது " "செல்லுபடியாகும் சொருகியல்ல." #: ../AMC-gui.pl:6717 msgid "" "This is not a valid plugin, as it does not contain a perl/AMC subdirectory." msgstr "" "இது ஒரு செல்லுபடியாகும் சொருகியல்ல, ஏனெனில் இதில் ஒரு perl/AMC துணை அடைவு " "இல்லை." #: ../AMC-gui.pl:6734 #, perl-format msgid "" "A plugin is already installed with the same name (%s). Do you want to delete" " the old one and overwrite?" msgstr "" "(%s) இந்தப் பெயாில் ஏற்கனவே ஒரு சொருகி நிறுவப்பட்டுள்ளது. பழையதை அழித்து " "அதன் மேலெழுதவா?" #: ../AMC-gui.pl:6752 #, perl-format msgid "Error while moving the plugin to the user plugin directory: %s" msgstr "சொருகியை பயனர் சொருகி அடைவுக்கு நகா்த்தும் போது ஏற்பட்ட பிழை: %s" #: ../AMC-gui.pl:6762 msgid "Please restart AMC before using the new plugin..." msgstr "" "புதிய சொருகி பயன்படுத்துவதற்கு முன் தானியக்க பல தொிவை மீண்டும் இயக்கவும்..." #: ../AMC-gui.pl:6814 msgid "zooms" msgstr "பொிதாக்கல்" #: ../AMC-gui.pl:6815 msgid "" "boxes images are extracted from the scans while processing automatic data " "capture. They can be removed if you don't plan to use the zooms dialog to " "check and correct boxes categorization. They can be recovered processing " "again automatic data capture from the same scans." msgstr "" "தானியங்கு தரவு உள்ளீடுகளைச் செயலாக்கும்போது, அலகீடுகளில் இருந்து கட்டங்களின்" " உருவங்கள் பிாித்தெடுக்கப்பட்டன. பொிதாக்கல் உரையாடலைப் பயன்படுத்தி கட்ட " "வகைப்படுத்தலைச் சாிபாா்த்து, திருத்த நீங்கள் திட்டமிடவில்லை என்றால் அவைகளை " "அகற்றலாம். தானியங்கு தரவு உள்ளீடைப் பயன்படுத்தி அதே அலகீட்டிலிருந்து தானாகவே" " மீண்டும் தரவை மீட்டெடுக்க முடியும்." #: ../AMC-gui.pl:6827 msgid "layout reports" msgstr "அமைவு அறிக்கைகள்" #: ../AMC-gui.pl:6828 msgid "" "these images are intended to show how the corner marks have been recognized " "and positioned on the scans. They can be safely removed once the scans are " "known to be well-recognized. They can be recovered processing again " "automatic data capture from the same scans." msgstr "" "இந்த படங்கள் அலகீடுகளின் மூலையில் வட்டக்குறி எவ்வாறு அடையாளம் காணப்படுகிறது " "என்பதைக் காண்பிக்கிறது. அலகீடுகள் நன்கு கண்டுணரப்பட்டதாக அறிந்ததும் அவை " "பாதுகாப்பாக நீக்கப்படும். தானியங்கு தரவு உள்ளீடைப் பயன்படுத்தி அதே " "அலகீட்டிலிருந்து தானாகவே மீண்டும் தரவை மீட்டெடுக்க முடியும்." #: ../AMC-gui.pl:6843 msgid "annotated pages" msgstr "சுட்டுவிளக்கப்பட்ட பக்கங்கள்" #: ../AMC-gui.pl:6844 msgid "" "jpeg annotated pages are made before beeing assembled to PDF annotated " "files. They can safely be removed, and will be recovered automatically the " "next time annotation will be requested." msgstr "" "jpeg சுட்டுவிளக்க தாள்கள் PDF சுட்டுவிளக்க கோப்புகள் தொகுக்கப்படும் முன் " "உருவாக்கப்பட்டன. அவைகள் பாதுகாப்பாக அகற்றப்படலாம், மேலும் அடுத்த முறை " "சுட்டுவிளக்கம் கோரப்படும் போது தானாகவே மீட்டெடுக்கப்படும்." #: ../AMC-gui.pl:6874 msgid "Total size of concerned files:" msgstr "சம்பந்தப்பட்ட கோப்புகளின் மொத்த அளவு:" #: ../AMC-gui.pl:6923 #, perl-format msgid "%s files were removed." msgstr "%sகோப்புகள் அகற்றப்பட்டன. " #: ../AMC-gui.pl:6949 #, perl-format msgid "I don't find the command %s." msgstr "நான் %s என்ற கட்டளையைக் கண்டுபிடிக்கவில்லை." #: ../AMC-gui.pl:6950 msgid "Perhaps LaTeX is not installed?" msgstr "ஒருவேளை LaTeX நிறுவப்படவில்லையா?" #. TRANSLATORS: Do not translate 'auto-multiple-choice latex-link', which is a #. command to be typed on MacOsX #: ../AMC-gui.pl:6954 msgid "" "The style file automultiplechoice.sty seems to be unreachable. Try to use " "command 'auto-multiple-choice latex-link' as root to fix this." msgstr "" "automultiplechoice.sty என்ற பாங்கு கோப்பை அடையமுடியவில்லை. இதைச் சாிசெய்ய " "'auto-multi-choice latex-link' கட்டளையைப் பயன்படுத்த முயற்சிக்கவும்." #: ../AMC-prepare.pl:274 #, perl-format msgid "%d/%d good answers not coherent for a simple question" msgstr "%d/%d நல்ல பதில்கள் ஒரு எளிய கேள்விக்கு ஒத்துப்போகவில்லை" #: ../AMC-prepare.pl:357 #, perl-format msgid "question ID used several times for the same paper: \"%s\"" msgstr "" "கேள்வி அடையாளம் பல முறை அதே கேள்வித்தாளிற்க்கு பயன்படுத்தப்பட்டுள்ளது: " "\"%s\"" #: ../AMC-prepare.pl:444 #, perl-format msgid "" "An answer appears to be given outside a question environment, after question" " \"%s\"" msgstr "" "\"%s\" கேள்விக்குப் பிறகு, ஒரு பதில் கேள்விச் சூழலுக்கு வெளியே " "கொடுக்கப்பட்டதாக தோன்றுகிறது " #: ../AMC-prepare.pl:453 #, perl-format msgid "Answer number ID used several times for the same question: %s" msgstr "ஒரே கேள்விக்கு பல முறை பதில் எண் அடையாளம் பயன்படுத்தப்பட்டுள்ளது: %s" #: ../AMC-prepare.pl:708 #, perl-format msgid "%d errors during LaTeX compiling" msgstr "LaTeX ஐத் தொகுக்கும் போது ஏற்பட்ட பிழைகள் %d" #: ../AMC-prepare.pl:768 #, perl-format msgid "" "LaTeX command configured is not present (%s). Install it or change " "configuration, and then rerun." msgstr "" "LaTeX கட்டளை உருப்படுத்தலைக் காணவில்லை (%s). அதை நிறுவவும் அல்லது " "உருப்படுத்தலை மாற்றவும், பின்பு மீண்டும் இயக்கவும்." #: ../AMC-prepare.pl:797 msgid "solution" msgstr "தீர்வு" #: ../AMC-prepare.pl:812 msgid "catalog" msgstr "பெயர்ப் பட்டியல் வரிசை" #: ../AMC-prepare.pl:845 msgid "question sheet" msgstr "கேள்வித் தாள்" #: ../AMC-prepare.pl:873 #, perl-format msgid "" "please remove accentuated or non-standard characters from the following " "question ID: \"%s\"" msgstr "" "தயவுசெய்து பின்வரும் கேள்வியிலுள்ள அசையழுத்தக்குறி அல்லது வரையளவற்ற " "எழுத்துக்களை நீக்கவும்: \"%s\"" #: ../AMC-prepare.pl:875 msgid "" "some question IDs seems to have accentuated or non-standard characters. This" " may break future processings." msgstr "" "சில கேள்வி அடையாளங்கள் வரைவளவற்ற எழுத்துகளைக் கொண்டிருக்கின்றன. இது எதிா்கால" " செயல்களை உடைக்கலாம்." #: ../AMC-read-pdfform.pl:136 msgid "Reading PDF forms..." msgstr "PDF படிவங்களைப் படித்தல்..." #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:592 msgid "Name [name column title in exported spreadsheet]" msgstr "பெயா் [ஏற்றுமதி செய்யப்பட்ட விாிதாளில் பெயா் நெடுவாிசையின் தலைப்பு]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:594 msgid "Mark [mark column title in exported spreadsheet]" msgstr "" "மதிப்பெண் [ஏற்றுமதி செய்யப்பட்ட விாிதாளில் மதிப்பெண் நெடுவாிசையின் தலைப்பு]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:596 msgid "Exam [exam number column title in exported spreadsheet]" msgstr "" "தோ்வு எண் [ஏற்றுமதி செய்யப்பட்ட விாிதாளில் தோ்வு எண் நெடுவாிசையின் " "தலைப்பு]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:598 msgid "Score [total score column title in exported spreadsheet]" msgstr "" "மொத்த மதிப்பெண் [ஏற்றுமதி செய்யப்பட்ட விாிதாளில் மொத்த மதிப்பெண் " "நெடுவாிசையின் தலைப்பு]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:600 msgid "Max [maximum score column title in exported spreadsheet]" msgstr "" "அதிகபட்ச மதிப்பெண் [ஏற்றுமதி செய்யப்பட்ட விாிதாளில் அதிகபட்ச மதிப்பெண் " "நெடுவாிசையின் தலைப்பு]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:604 msgid "max [maximum score row name in exported spreadsheet]" msgstr "" "அதிகபட்ச மதிப்பெண் [ஏற்றுமதி செய்யப்பட்ட விாிதாளில் அதிகபட்ச மதிப்பெண் " "கிடைவாிசையின் பெயா்]" #. TRANSLATORS: you can omit the [...] part, just here to explain context #: ../AMC-perl/AMC/Basic.pm:606 msgid "mean [means of scores row name in exported spreadsheet]" msgstr "" "சராசாி [ஏற்றுமதி செய்யப்பட்ட விாிதாளில் சராசாி மதிப்பெண் கிடைவாிசையின் " "பெயா்]" #. TRANSLATORS: This is the default text to be written on the top of the first #. page of each paper when annotating. From this string, %s will be replaced #. with the student final mark, %m with the maximum mark he can obtain, %S #. with the student total score, and %M with the maximum score the student can #. obtain. #: ../AMC-perl/AMC/Config.pm:319 msgid "Mark: %s/%m (total score: %S/%M)" msgstr "மதிப்பெண்: %s/%m (மொத்தம் எடுத்தது : %S/%M)" #. TRANSLATORS: Subject of the emails which can be sent to the students to #. give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:344 msgid "Exam result" msgstr "தேர்வு முடிவு" #. TRANSLATORS: Body text of the emails which can be sent to the students to #. give them their annotated completed answer sheet. #: ../AMC-perl/AMC/Config.pm:346 msgid "" "Please find enclosed your annotated completed answer sheet.\n" "Regards." msgstr "" "உங்களது தோ்வின் திருத்தப்பட்ட பதில் தாள் இணைக்கப்பட்டுள்ளது. தயவுசெய்து பாா்க்கவும்.\n" " இப்படிக்கு," #. TRANSLATORS: Message (first part) when some of the commands that are given #. in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:598 msgid "Some commands allowing to open documents can't be found:" msgstr "ஆவணங்களைத் திறக்க அனுமதிக்கும் சில கட்டளைகளை காணவில்லை:" #. TRANSLATORS: Message (second part) when some of the commands that are given #. in the preferences cannot be found. #: ../AMC-perl/AMC/Config.pm:601 msgid "Please check its correct spelling and install missing software." msgstr "" "தயவு செய்து அதனுடைய எழுத்தாக்கத்தைச் சரிபார்க்கவும். மேலும் விடுபட்டுப்போன " "மென்பொருளை நிறுவவும்." #. TRANSLATORS: Message (third part) when some of the commands that are given #. in the preferences cannot be found. The %s will be replaced with the name #. of the menu entry "Preferences" and the name of the menu "Edit". #: ../AMC-perl/AMC/Config.pm:603 #, perl-format msgid "You can change used commands following %s from menu %s." msgstr "" "%s இந்தப் பட்டியலில் பயன்படுத்தியுள்ள கட்டளைகளை %sஇலிருந்து " "மாற்றலாம்." #. TRANSLATORS: "Preferences" menu #: ../AMC-perl/AMC/Config.pm:605 ../AMC-gui-main_window.glade:2706 msgid "Preferences" msgstr "முன்மதிப்பீடு" #. TRANSLATORS: "Edit" menu #: ../AMC-perl/AMC/Config.pm:607 msgid "Edit" msgstr "பதிப்பி" #. TRANSLATORS: Error writing one of the configuration files (global or #. project). The first %s will be replaced with the path of that file, and the #. second with the error text. #: ../AMC-perl/AMC/Config.pm:841 #, perl-format msgid "Error writing configuration file %s: %s" msgstr "பிழை எழுதிக்கொண்டிருக்கும் உருப்படுத்தல் கோப்பு %s:%s" #: ../AMC-perl/AMC/DataModule/association.pm:103 msgid "Fetching association results from old format XML files..." msgstr "பழைய வடிவ XML கோப்புகளிலிருந்து இணைக்கப்பட்ட முடிவுகளைப் பெறுகிறது..." #: ../AMC-perl/AMC/DataModule/capture.pm:210 msgid "Including zooms in the database..." msgstr "தரவுத்தளத்திலுள்ள பொிதாக்கங்களை உள்ளடக்கியது..." #: ../AMC-perl/AMC/DataModule/capture.pm:229 #: ../AMC-perl/AMC/DataModule/capture.pm:237 msgid "Building capture database indexes..." msgstr "உள்ளிடப்பட்ட தரவுத்தள குறியீடுகளைக் கட்டமைத்தல்..." #: ../AMC-perl/AMC/DataModule/capture.pm:279 msgid "Fetching data capture results from old format XML files..." msgstr "" "பழைய வடிவ XML கோப்புகளிலிருந்து உள்ளிடப்பட்ட தரவு முடிவுகளைப் பெறுகிறது..." #: ../AMC-perl/AMC/DataModule/layout.pm:222 msgid "Building layout database indexes..." msgstr "அமைவுத் தரவுத்தள குறியீடுகளைக் கட்டமைத்தல்..." #: ../AMC-perl/AMC/DataModule/layout.pm:288 msgid "Fetching layout data from old format XML files..." msgstr "பழைய வடிவ XML கோப்புகளிலிருந்து அமைவுத் தரவைப் பெறுகிறது..." #: ../AMC-perl/AMC/DataModule/scoring.pm:256 msgid "Fetching scoring data from old format XML files..." msgstr "பழைய வடிவ XML கோப்புகளிலிருந்து மதிப்பிடும் தரவைப் பெறுகிறது..." #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the total number of sheets. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:236 msgid "ALL" msgstr "அனைத்தும்" #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the number of sheets for which the question did not get an answer. Please #. let this label short. #: ../AMC-perl/AMC/Export/ods.pm:238 msgid "NA" msgstr "பொருந்தாது" #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the number of sheets for which the question got an invalid answer. Please #. let this label short. #: ../AMC-perl/AMC/Export/ods.pm:240 msgid "INVALID" msgstr "செல்லாதது" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains the reference of the boxes. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:268 msgid "Box" msgstr "கட்டம்" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains the number of items (ticked boxes, or invalid or empty questions). #. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:271 msgid "Nb" msgstr "மதிப்பெண்" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains percentage of questions for which the corresponding box is ticked #. over all questions. Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:274 msgid "/all" msgstr "/அனைத்து" #. TRANSLATORS: this is a head name in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding column #. contains percentage of questions for which the corresponding box is ticked #. over the expressed questions (counting only questions that did not get #. empty or invalid answers). Please let this name short. #: ../AMC-perl/AMC/Export/ods.pm:277 msgid "/expr" msgstr "/ஏற்று" #. TRANSLATORS: this is a row label in the table with questions basic #. statistics in the ODS exported spreadsheet. The corresponding row contains #. the number of sheets for which the question got the "none of the above are #. correct" answer. Please let this label short. #: ../AMC-perl/AMC/Export/ods.pm:305 msgid "NONE" msgstr "ஏதுமில்லை" #. TRANSLATORS: table name in the exported ODS spreadsheet for the table that #. contains the marks. #: ../AMC-perl/AMC/Export/ods.pm:883 ../AMC-perl/AMC/Gui/Notes.glade:8 msgid "Marks" msgstr "மதிப்பெண்கள்" #. TRANSLATORS: Label of the table with questions basic statistics in the #. exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1310 msgid "Questions statistics" msgstr "கேள்விகளுக்கான புள்ளிவிவரங்கள்" #. TRANSLATORS: Label of the table with indicative questions basic statistics #. in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1317 msgid "Indicative questions statistics" msgstr "சுட்டிக்காட்டுகிற கேள்விகளுக்கான புள்ளிவிவரங்கள்" #. TRANSLATORS: Label of the table with a legend (explaination of the colors #. used) in the exported ODS spreadsheet. #: ../AMC-perl/AMC/Export/ods.pm:1327 ../AMC-perl/AMC/Export/ods.pm:1331 msgid "Legend" msgstr "குறி விளக்கம்" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that have not been asked to some students. #: ../AMC-perl/AMC/Export/ods.pm:1337 msgid "Non applicable" msgstr "பொருந்தாது" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that have not been answered. #: ../AMC-perl/AMC/Export/ods.pm:1341 msgid "No answer" msgstr "பதிலில்லை" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that have not been answered, but are cancelled by the use #. of allowempty scoring strategy. #: ../AMC-perl/AMC/Export/ods.pm:1345 msgid "Cancelled" msgstr "நீக்கப்பட்டது" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1349 msgid "Invalid answer" msgstr "செல்லாத பதில்" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1354 msgid "Correct answer" msgstr "சாியான பதில்" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the questions that got an invalid answer. #: ../AMC-perl/AMC/Export/ods.pm:1358 msgid "Wrong answer" msgstr "தவறான பதில்" #. TRANSLATORS: From the legend in the exported ODS spreadsheet. This refers #. to the indicative questions. #: ../AMC-perl/AMC/Export/ods.pm:1363 msgid "Indicative" msgstr "சுட்டிக்காட்டுகிற" #: ../AMC-perl/AMC/Export/ods.pm:1391 msgid "" "An old state of the exported file seems to be already opened. Use " "File/Reload from OpenOffice/LibreOffice to refresh." msgstr "" "ஏற்றுமதி செய்யப்பட்ட கோப்புகளின் பழைய நிலை ஏற்கனவே திறக்கப்பட்டுள்ளது. " "OpenOffice/LibreOffice இலிருந்து File/Reload ஐப் பயன்படுத்தி " "புத்துணா்வூட்டவும்." #: ../AMC-perl/AMC/Filter/plain.pm:92 msgid "" "Please code your student number opposite, and write your name in the box " "below." msgstr "" "தயவுசெய்து உங்கள் மாணவர் எண்ணை எதிரே குறிமுறைப்படுத்தி, கீழே உள்ள பெட்டியில்" " உங்கள் பெயரை எழுதவும்." #. TRANSLATORS: Message when the Pages option used in AMC-TXT can't be parsed. #. %s will be replaced with the option value #: ../AMC-perl/AMC/Filter/plain.pm:209 #, perl-format msgid "Pages option value can't be understood: %s" msgstr "பக்கங்களின் விருப்ப மதிப்பை புரிந்து கொள்ள முடியாது: %s" #: ../AMC-perl/AMC/Filter/plain.pm:238 #, perl-format msgid "Line %d" msgstr "கீற்று வரி%d" #. TRANSLATORS: Error text for AMC-TXT parsing, when opening a new question #. whereas the previous question has less than two choices #: ../AMC-perl/AMC/Filter/plain.pm:249 msgid "Previous question has less than two choices" msgstr "இரு தொிவுகளுக்கும் குறைவாக முந்தைய கேள்வியில் உள்ளது" #. TRANSLATORS: Error text for AMC-TXT parsing #: ../AMC-perl/AMC/Filter/plain.pm:258 #, perl-format msgid "Previous question is a simple question but has %d correct choice(s)" msgstr "முந்தைய கேள்வி ஒரு எளிய கேள்வி ஆனால் %d சாியான தொிவு(களு)ள்ளது" #: ../AMC-perl/AMC/Filter/plain.pm:342 msgid "" "Invalid encoding: you must use UTF-8, but your source file was saved using " "another encoding" msgstr "" "செல்லாத குறியாக்கம்: நீங்கள் UTF-8 ஐப் பயன்படுத்த வேண்டும், ஆனால் உங்கள் மூல" " கோப்பு வேறொரு குறியாக்க முறையைப் பயன்படுத்தி சேமிக்கப்பட்டுள்ளது" #: ../AMC-perl/AMC/Filter/plain.pm:368 #, perl-format msgid "File not found: %s" msgstr "கோப்பைக் காணவில்லை: %s" #. TRANSLATORS: Error text for AMC-TXT parsing, when an unknown option is #. given a value #: ../AMC-perl/AMC/Filter/plain.pm:386 #, perl-format msgid "Unknown option: %s" msgstr "தொியாத விருப்பம்: %s" #. TRANSLATORS: Error text for AMC-TXT parsing when a choice is given but no #. question were opened #: ../AMC-perl/AMC/Filter/plain.pm:456 msgid "Choice outside question" msgstr "கேள்விக்கு வெளியில் தொிவு" #: ../AMC-perl/AMC/Filter/plain.pm:1240 #, perl-format msgid "" "The following fonts does not seem to be installed on the system: %s." msgstr "" "பின்வரும் எழுத்துருக்கள் கணினியில் நிறுவப்பட்டதாக தொியவில்லை: %s." #: ../AMC-perl/AMC/Filter/register.pm:78 msgid "No description available." msgstr "விளக்கம் கிடைக்கவில்லை." #: ../AMC-perl/AMC/Gui/Association.pm:133 msgid "" "Names images not found... Maybe you forgot using \\namefield command in " "LaTeX source?" msgstr "" "பெயா்கள் படங்கள் காணப்படவில்லை... LaTeX மூலத்தில் \\namefield கட்டளைகளை " "நீங்கள் மறந்துவிட்டீா்களா?" #: ../AMC-perl/AMC/Gui/Association.pm:690 msgid "Sheet" msgstr "தாள்" #: ../AMC-perl/AMC/Gui/Association.pm:728 msgid "End" msgstr "முடிவு" #: ../AMC-perl/AMC/Gui/Manuel.pm:117 msgid "Page layout" msgstr "பக்க அமைவு" #: ../AMC-perl/AMC/Gui/Manuel.pm:125 msgid "Original" msgstr "அசல்" #: ../AMC-perl/AMC/Gui/Manuel.pm:126 ../AMC-gui-edit_preferences.glade:2138 msgid "Scan" msgstr "அலகீடு" #. TRANSLATORS: This is one of the choices for pages navigation in manual data #. capture window. Here, navigation goes through all pages. Please keep this #. text very short (say less than 5 letters) so that the window is not too #. large #: ../AMC-perl/AMC/Gui/Manuel.pm:130 ../AMC-perl/AMC/Gui/Manuel.pm:146 msgid "all" msgstr "அனைத்து" #. TRANSLATORS: This is one of the choices for pages navigation in manual data #. capture window. Here, navigation goes through pages with some invalid #. answers. Please keep this text very short (say less than 5 letters) so that #. the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:132 msgid "inv" msgstr "செல்லா" #. TRANSLATORS: This is one of the choices for pages navigation in manual data #. capture window. Here, navigation goes through pages with empty or invalid #. answers. Please keep this text very short (say less than 5 letters) so that #. the window is not too large #: ../AMC-perl/AMC/Gui/Manuel.pm:134 msgid "i&e" msgstr "காலி&செல்லா" #: ../AMC-perl/AMC/Gui/Manuel.pm:184 msgid "page" msgstr "பக்கம்" #: ../AMC-perl/AMC/Gui/Manuel.pm:531 #, perl-format msgid "" "This is a template exam that you cannot edit. To create a new exam from this" " one to be edited, use the '%s' button." msgstr "" "இந்த வாா்ப்புரு தோ்வை நீங்கள் திருத்த முடியாது. '%s' இந்த பொத்தானைப் " "பயன்படுத்தி வாா்ப்புருவில் இருந்து ஒரு புதிய தோ்வை உருவாக்கி அதை " "பதிப்பிக்கலாம்." #: ../AMC-perl/AMC/Gui/Manuel.pm:531 ../AMC-perl/AMC/Gui/Manuel.glade:406 msgid "Add photocopy" msgstr "நகலைச் சோ்க்கவும்" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms #. window #: ../AMC-perl/AMC/Gui/Zooms.pm:76 msgid "drag and drop" msgstr "இழுத்து விடு" #. TRANSLATORS: One of the ways to change a box's ticked state in the zooms #. window #: ../AMC-perl/AMC/Gui/Zooms.pm:78 msgid "click" msgstr "சொடுக்கு" #: ../AMC-perl/AMC/Gui/Zooms.pm:126 ../AMC-perl/AMC/Gui/Zooms.pm:413 #, perl-format msgid "Boxes zooms for page %s" msgstr "%s ம் பக்கம் கட்டங்களில் பெரிதாக்குகிறது" #: ../AMC-perl/AMC/Gui/Zooms.pm:402 ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "" "You moved some boxes to correct automatic data query, but this work is not " "saved yet." msgstr "" "தானியங்கி தரவு வினவலைச் சாிசெய்ய சில கட்டங்களை நீங்கள் நகா்த்தினீா்கள், " "ஆனால் இந்த வேலை இன்னும் சேமிக்கப்படவில்லை." #: ../AMC-perl/AMC/Gui/Zooms.pm:402 msgid "" "Do you want to save these modifications before looking at another page?" msgstr "வேறொரு பக்கத்தைப் பாா்க்கும் முன் இந்த மாற்றங்களைச் சேமிக்க வேண்டுமா?" #: ../AMC-perl/AMC/Gui/Zooms.pm:629 msgid "Dou you really want to close and ignore these modifications?" msgstr "" "நீங்கள் உண்மையிலே இந்த மாற்றங்களை மூடிவிட்டு புறக்கணிக்க விரும்புகிறீா்களா?" #: ../AMC-perl/AMC/Print/cups.pm:71 #, perl-format msgid "Perl module(s) missing: %s" msgstr "Perl கூறு(கள்) காணவில்லை: %s" #: ../AMC-perl/AMC/Print/cupslp.pm:47 #, perl-format msgid "The following commands are missing: %s." msgstr "பின்வரும் கட்டளைகளைக் காணவில்லை: %s." #: ../AMC-perl/AMC/Export/register/CSV.pm:70 msgid "Separator" msgstr "பிாிப்பான்" #: ../AMC-perl/AMC/Export/register/CSV.pm:83 msgid "Ticked boxes" msgstr "குறிக்கப்பட்ட கட்டங்கள்" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'No, don't group questions by scope in the exported ODS #. file' #: ../AMC-perl/AMC/Export/register/CSV.pm:89 #: ../AMC-perl/AMC/Export/register/ods.pm:124 msgid "No" msgstr "இல்லை" #: ../AMC-perl/AMC/Export/register/CSV.pm:90 #: ../AMC-perl/AMC/Export/register/CSV.pm:91 msgid "Yes:" msgstr "ஆம்:" #: ../AMC-perl/AMC/Export/register/CSV.pm:97 #: ../AMC-perl/AMC/Export/register/ods.pm:152 msgid "Choose columns" msgstr "நெடுவாிசைகளைத் தொிவு செய்யவும்" #. TRANSLATORS: List of students with their scores: one of the export formats. #: ../AMC-perl/AMC/Export/register/List.pm:37 msgid "PDF list" msgstr "PDF பட்டியல்" #: ../AMC-perl/AMC/Export/register/List.pm:64 msgid "Number of columns" msgstr "நெடுவாிசைகளின் எண்" #: ../AMC-perl/AMC/Export/register/List.pm:67 msgid "Long list is divided into this number of columns on each page." msgstr "" "ஒவ்வொரு பக்கத்திலும் நீண்ட பட்டியலானது நெடுவாிசைகளின் எண்ணாக " "பிாிக்கப்பட்டுள்ளது." #: ../AMC-perl/AMC/Export/register/List.pm:71 msgid "Paper size" msgstr "காகித அளவு" #. TRANSLATORS: Check button label in the exports tab. If checked, a table #. with questions basic statistics will be added to the ODS exported #. spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:82 msgid "Stats table" msgstr "புள்ளிவிவர அட்டவணை" #. TRANSLATORS: Menu to export statistics table in the exports tab. The first #. menu entry means 'do not build a stats table' in the exported ODS file. You #. can omit the [...] part, that is here only to state the context. #: ../AMC-perl/AMC/Export/register/ods.pm:89 msgid "None [no stats table to export]" msgstr "ஏதுமில்லை [ஏற்றுவதற்கு புள்ளிவிவர அட்டவணை இல்லை]" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second #. menu entry means 'build a stats table, with a horizontal flow' in the #. exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:91 #: ../AMC-perl/AMC/Export/register/ods.pm:106 msgid "Horizontal flow" msgstr "கிடைமட்ட ஓட்டம்" #. TRANSLATORS: Menu to export statistics table in the exports tab. The second #. menu entry means 'build a stats table, with a vertical flow' in the #. exported ODS file. #: ../AMC-perl/AMC/Export/register/ods.pm:93 #: ../AMC-perl/AMC/Export/register/ods.pm:107 msgid "Vertical flow" msgstr "செங்குத்து ஓட்டம்" #. TRANSLATORS: Check button label in the exports tab. If checked, a table #. with indicative questions basic statistics will be added to the ODS #. exported spreadsheet. #: ../AMC-perl/AMC/Export/register/ods.pm:99 msgid "Indicative stats table" msgstr "சுட்டிக்காட்டுகிற புள்ளிவிவர அட்டவணை" #: ../AMC-perl/AMC/Export/register/ods.pm:105 msgid "None" msgstr "ஏதுமில்லை" #: ../AMC-perl/AMC/Export/register/ods.pm:110 msgid "" "Create a table with basic statistics about answers for each indicative " "question?" msgstr "" "ஒவ்வொரு சுட்டிக்காட்டுகிற கேள்விக்குமான பதில்களைப் பற்றிய அடிப்படை " "புள்ளிவிவரங்களைக் கொண்டு ஒரு அட்டவணையை உருவாக்கவா?" #. TRANSLATORS: Check button label in the exports tab. If checked, sums of the #. scores for groups of questions will be added to the exported table. #: ../AMC-perl/AMC/Export/register/ods.pm:114 msgid "Score groups" msgstr "மதிப்பெண் குழுக்கள்" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'Yes, group questions by scope in the exported ODS file, and #. report total scores' #: ../AMC-perl/AMC/Export/register/ods.pm:126 msgid "Yes (values)" msgstr "ஆமாம் (மதிப்புகள்)" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'Yes, group questions by scope in the exported ODS file, and #. report total scores as percentages.' #: ../AMC-perl/AMC/Export/register/ods.pm:128 msgid "Yes (percentages)" msgstr "ஆமாம் (விழுக்காடுகள்)" #: ../AMC-perl/AMC/Export/register/ods.pm:131 msgid "Add sums of the scores for each question group?" msgstr "ஒவ்வொரு கேள்வி குழுவுக்குமான மதிப்பெண்களின் தொகைகளைச் சேர்க்கவா?" #: ../AMC-perl/AMC/Export/register/ods.pm:134 msgid "with scope separator" msgstr "வரையெல்லைப் பிரிப்பானுடன்" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'No, don't group questions by scope in the exported ODS #. file' #: ../AMC-perl/AMC/Export/register/ods.pm:141 msgid "':'" msgstr "':'" #. TRANSLATORS: Option for ODS export: group questions by scope? This is the #. menu entry for 'Yes, group questions by scope in the exported ODS file, and #. you can detect the scope from a question ID using the text before the #. separator .' #: ../AMC-perl/AMC/Export/register/ods.pm:143 msgid "'.'" msgstr "'.'" #: ../AMC-perl/AMC/Export/register/ods.pm:146 msgid "" "To define groups, use question ids in the form \"group:question\" or " "\"group.question\", depending on the scope separator." msgstr "" "\"குழு: கேள்வி\" அல்லது \"குழு. கேள்வி\" குழுக்களை வரையறுக்க, வரையெல்லை " "பிரிப்பானைப் பொறுத்து படிவத்தினுள் கேள்வி அடையாளங்களைப் பயன்படுத்தவும்." #: ../AMC-perl/AMC/Filter/register/latex.pm:54 msgid "" "This is the native format for AMC. LaTeX is not so easy to use for unexperienced users, but the LaTeX power allows the user to build any multiple choice subject. As an example, the following is possible with LaTeX but not with other formats:\n" "* any kind of layout,\n" "* questions with random numerical values,\n" "* use of figures, mathematical formulas\n" "* and much more!" msgstr "" "இது தானியக்க பல தொிவின் சொந்த வடிவமைப்பாகும். LaTeX ல் அனுபவமற்ற பயனர்களுக்கு அதை பயன்படுத்துவது எளிதானதல்ல, ஆனால் LaTeX ன் திறனால் பயனர் எந்தவொரு பல தொிவு பாடங்களையும் உருவாக்க அனுமதிக்கிறது. உதாரணமாக, பின்வருபவைகள் LaTeX உடன் சாத்தியமாகும் ஆனால் மற்ற வடிவமைப்புகளால் முடியாது:\n" "* எந்த வகையிலான அமைவுகளும்,\n" "* தற்போக்கான எண் மதிப்புகளுடன் கூடிய கேள்விகள்,\n" "* படங்களின் பயன்பாடு, கணித வாய்ப்பாடுகள்\n" "* இன்னும் பற்பல!" #: ../AMC-perl/AMC/Filter/register/plain.pm:51 msgid "" "This is a plain text format for easy question writting. See the following minimal example:\n" "\n" "Title: Paper title\n" "\n" "* Which is the capital city of Cameroon?\n" "+ Yaounde\n" "- Douala\n" "- Kribi" msgstr "" "இது எளிதாக கேள்வி எழுதுவதற்கு ஒரு வெற்று உரை வடிவம். பின்வரும் குறைந்தபட்ச எடுத்துக்காட்டுகளைப் பார்க்கவும்: \n" "\n" "தலைப்பு: கேள்வித்தாள் தலைப்பு\n" "\n" "* பாண்டியா்களின் தலைநகரம் எது?\n" "+மதுரை\n" "+சென்னை\n" "+உறையூா்" #: ../AMC-gui-apropos.glade:8 msgid "AMC A propos" msgstr "AMC ஒரு முன்மொழிவு" #: ../AMC-gui-apropos.glade:17 msgid "" "Copyright (C) 2008-2018\n" "Alexis Bienvenüe and the AMC development team" msgstr "" "பதிப்புரிமை (C) 2008-2018\n" "Alexis Bienvenüe மற்றும் AMC வளர்ச்சிக் குழு" #: ../AMC-gui-apropos.glade:19 msgid "Automatic multiple choice questionnaires management" msgstr "தானியக்க பல தொிவு கேள்விப் பட்டியல்கள் மேலாண்மை" #: ../AMC-gui-apropos.glade:21 msgid "Visit the AMC website" msgstr "AMC வலைத்தளத்தைப் பார்வையிடவும்" #: ../AMC-gui-choix_pages_impression.glade:33 msgid "Papers printing" msgstr "காகிதங்கள் அச்சாகிறது" #: ../AMC-gui-choix_pages_impression.glade:98 msgid "Please select papers you wish to print:" msgstr "நீங்கள் அச்சிட விரும்பும் காகிதங்களைத் தோ்ந்தெடுக்கவும்:" #: ../AMC-gui-choix_pages_impression.glade:116 msgid "Select papers you wish to print (ctrl-a for all), then confirm..." msgstr "" "நீங்கள் அச்சிட விரும்பும் காகிதங்களைத் தோ்ந்தெடுக்கவும் (அனைத்துக்கும் " "ctrl+a), பின்னா் உறுதிப்படுத்தவும்..." #: ../AMC-gui-choix_pages_impression.glade:144 msgid "Answer sheet printing" msgstr "பதில் தாள் அச்சாகிறது" #: ../AMC-gui-choix_pages_impression.glade:190 msgid "Printer:" msgstr "அச்சுப்பொறி:" #: ../AMC-gui-choix_pages_impression.glade:243 msgid "two-side printing" msgstr "இரு பக்க அச்சிடல்" #: ../AMC-gui-choix_pages_impression.glade:319 msgid "printing options" msgstr "அச்சிடுவதற்கான விருப்பங்கள்" #: ../AMC-gui-choix_pages_impression.glade:343 msgid "Destination directory" msgstr "சோிட அடைவு" #: ../AMC-gui-choix_pages_impression.glade:356 msgid "Select destination directory for printable files" msgstr "அச்சிடத்தக்க கோப்புகளுக்கான சோிட அடைவைத் தோ்ந்தெடுக்கவும்" #: ../AMC-gui-choix_postcorrect.glade:20 msgid "Post-correction" msgstr "பிந்தைய திருத்தம்" #: ../AMC-gui-choix_postcorrect.glade:95 msgid "" "Please enter the teacher score sheet number and copy number to get the " "correct answers from:" msgstr "" "சாியான பதில்களைப் பெற ஆசிாியாின் மதிப்பெண் தாளின் எண் மற்றும் நகல் எண்ணை " "உள்ளிடுக:" #: ../AMC-gui-choix_postcorrect.glade:189 msgid "Guess simple/multiple status" msgstr "எளிய/பல நிலைகளா என ஊகிக்கவும்" #: ../AMC-gui-choix_postcorrect.glade:194 msgid "" "Sets type of all questions for which 2 or more answers are ticked on the " "teacher answer sheet to multiple" msgstr "" "ஆசிாியாின் பதில் தாளில் 2 அல்லது அதற்கு மேற்பட்ட பதில்களுள்ள எல்லா " "கேள்விகளையும் multiple ஆக அமைக்கிறது" #: ../AMC-gui-choix_projet.glade:18 msgid "Open a MC project" msgstr "ஒரு பல தொிவு திட்டப்பணியைத் திறக்க" #: ../AMC-gui-choix_projet.glade:61 ../AMC-gui-liste_dialog.glade:91 msgid "Cancel" msgstr "இரத்து" #: ../AMC-gui-choix_projet.glade:104 ../AMC-gui-main_window.glade:2665 msgid "New project" msgstr "புதிய திட்டப்பணி" #: ../AMC-gui-choix_projet.glade:163 msgid "Rename" msgstr "மறுபெயாிடு" #: ../AMC-gui-choix_projet.glade:182 msgid "Clone" msgstr "நகலி" #: ../AMC-gui-choix_projet.glade:278 msgid "Open an existing MC project:" msgstr "ஏற்கனவேயுள்ள ஒரு பல தொிவு திட்டப்பணியைத் திற:" #: ../AMC-gui-choix_projet.glade:345 msgid "Create an new project:" msgstr "ஒரு புதிய திட்டப்பணியை உருவாக்கவும்:" #: ../AMC-gui-choix_projet.glade:364 msgid "Project name:" msgstr "திட்டப்பணியின் பெயா்:" #: ../AMC-gui-choix_projet.glade:398 msgid "" "Note : a project name can only contain alphanumeric characters, plus " "some simple characters (-_+.:)." msgstr "" "குறிப்பு : திட்டப்பணியின் பெயரானது எழுத்தெண் குறிகள் மற்றும் சில எளிய" " குறியீடுகள் (-_+.:) ஐ மட்டுமே கொண்டிருக்க வேண்டும்." #: ../AMC-gui-choose-mode.glade:10 msgid "" "Before starting data capture, please choose the mode corresponding to what " "you did with the printed questions." msgstr "" "தரவு உள்ளீட்டிற்கு முன், அச்சிடப்பட்ட கேள்விகளில் நீங்கள் செய்ததைப் பொருத்து" " பாணியைத் தொிவு செய்யவும்." #: ../AMC-gui-choose_columns.glade:8 msgid "Choose columns to export" msgstr "ஏற்றுமதி செய்ய நெடுவரிசைகளைத் தொிவு பண்ணவும்" #: ../AMC-gui-choose_columns.glade:65 msgid "Order and select the columns to include in the exported file:" msgstr "" "ஏற்றுமதி செய்யப்பட்ட கோப்பில் சோ்க்க நெடுவாிசைகளைத் வாிசைப்படுத்தி " "தோ்ந்தெடுக்கவும்:" #: ../AMC-gui-choose_students.glade:13 msgid "Choose students" msgstr "மாணவா்களைத் தொிவு செய்யவும்" #: ../AMC-gui-choose_students.glade:70 msgid "Select the students for which you want to annotate the score sheet:" msgstr "" "மதிப்பெண் தாளிற்கு சுட்டுவிளக்கம் செய்ய விரும்பும் மாணவா்களைத் " "தோ்ந்தெடுக்கவும்:" #: ../AMC-gui-choose_students.glade:114 msgid "Search:" msgstr "தேடு:" #: ../AMC-gui-cleanup.glade:13 ../AMC-gui-main_window.glade:2939 msgid "Cleanup" msgstr "சுத்தம் செய்" #: ../AMC-gui-cleanup.glade:40 msgid "Remove selected files" msgstr "தோ்ந்தெடுத்த கோப்புகளை நீக்கு" #: ../AMC-gui-cleanup.glade:71 msgid "" "To save disk space, you can remove some intermediate files from your project" " directory." msgstr "" "வட்டு இடத்தைச் சேமிக்க, உங்கள் திட்டப்பணி அடைவிலிருந்து சில இடைநிலைக் " "கோப்புகளை நீக்கலாம்." #: ../AMC-gui-edit_preferences.glade:230 ../AMC-gui-edit_preferences.glade:243 msgid "LaTeX models directory" msgstr "LaTeX கூறுகளின் அடைவு" #: ../AMC-gui-edit_preferences.glade:232 msgid "" "Please select a directory containing LaTeX models for AMC, with their " "descriptions" msgstr "" "தானியக்க பல தொிவுக்கான LaTeX மாதிாிகள் உள்ள அடைவுகளை அவற்றின் " "விளக்கங்களுடன் தோ்ந்தெடுக்கவும்" #: ../AMC-gui-edit_preferences.glade:255 msgid "" "Projects directory. May be modified only if there are no opened projects." msgstr "" "திட்டப்பணிகள் திறக்கப்படாமல் இருந்தால் மட்டுமே திட்டப்பணிகள் அடைவு " "மாற்றியமைக்கப்படலாம்." #: ../AMC-gui-edit_preferences.glade:257 msgid "Please select the projects directory" msgstr "திட்டப்பணிகளுள்ள அடைவைத் தோ்ந்தெடுக்கவும்" #: ../AMC-gui-edit_preferences.glade:268 msgid "Projects directory" msgstr "திட்டப்பணி அடைவு" #: ../AMC-gui-edit_preferences.glade:283 msgid "Directories" msgstr "அடைவுகள்" #: ../AMC-gui-edit_preferences.glade:315 msgid "PDF files" msgstr "PDF கோப்புகள்" #: ../AMC-gui-edit_preferences.glade:326 msgid "Images" msgstr "படங்கள்" #: ../AMC-gui-edit_preferences.glade:337 msgid "CSV data files" msgstr "CSV தரவு கோப்புகள்" #: ../AMC-gui-edit_preferences.glade:348 msgid "OpenOffice files" msgstr "திறந்த அலுவலக கோப்புகள்" #: ../AMC-gui-edit_preferences.glade:359 msgid "XML files" msgstr "XML கோப்புகள்" #: ../AMC-gui-edit_preferences.glade:370 msgid "Command to edit LaTeX files" msgstr "LaTeX கோப்புகளை பதிப்பிக்கும் கட்டளை" #: ../AMC-gui-edit_preferences.glade:371 msgid "LaTeX editor" msgstr "LaTeX பதிப்பி" #: ../AMC-gui-edit_preferences.glade:382 msgid "Plain text editor" msgstr "உரைப் பதிப்பான்" #: ../AMC-gui-edit_preferences.glade:393 msgid "" "Command for directory browsing (string %d will be replaced by the directory " "path before execution)" msgstr "" "அடைவு உலாவிற்கான கட்டளை (சரம் %d அடைவு பாதையால் செயல்படுத்தும் முன் " "மாற்றப்படும்)" #: ../AMC-gui-edit_preferences.glade:394 msgid "File browser" msgstr "கோப்பு உலாவி" #: ../AMC-gui-edit_preferences.glade:405 msgid "Web browser" msgstr "வலை உலாவி" #: ../AMC-gui-edit_preferences.glade:534 msgid "Visualisation commands" msgstr "காட்சிப்படுத்தும் கட்டளைகள்" #: ../AMC-gui-edit_preferences.glade:565 msgid "Default LaTeX engine" msgstr "இயல்பான LaTeX இயந்திரம்" #: ../AMC-gui-edit_preferences.glade:576 msgid "" "Default command to compile LaTeX file and make PDF, PS or DVI output (may be" " changed for each project)." msgstr "" "LaTeX கோப்பைத் தொகுக்க மற்றும் PDF, PS அல்லது DVI வெளியீட்டை " "உருவாக்குவதற்கான இயல்புநிலை கட்டளை (ஒவ்வொரு திட்டப்பணிக்கும் மாற்றப்படலாம்)." #: ../AMC-gui-edit_preferences.glade:599 msgid "External programs" msgstr "வெளிப்புற நிரல்கள்" #: ../AMC-gui-edit_preferences.glade:631 #: ../AMC-gui-edit_preferences.glade:4238 msgid "Students list charset" msgstr "மாணவா்கள் பட்டியல் எழுத்துதொகுப்பு" #: ../AMC-gui-edit_preferences.glade:642 msgid "CSV charset" msgstr "CSV எழுத்துதொகுப்பு" #: ../AMC-gui-edit_preferences.glade:653 msgctxt "" "option name. Refers to a list of headers that may contain surnames in the " "CSV names list" msgid "CSV surname headers" msgstr "CSV குடும்பப்பெயா் தலைப்புகள்" #: ../AMC-gui-edit_preferences.glade:664 msgctxt "" "option name. Refers to a list of headers that may contain names in the CSV " "names list." msgid "CSV name headers" msgstr "CSV பெயா் தலைப்புகள்" #: ../AMC-gui-edit_preferences.glade:675 msgid "LaTeX files charset" msgstr "LaTeX கோப்புகள் எழுத்துதொகுப்பு" #: ../AMC-gui-edit_preferences.glade:686 msgid "Default encoding for the students list file." msgstr "மாணவா்கள் பட்டியல் கோப்பின் இயல்புநிலை குறியாக்கம்." #: ../AMC-gui-edit_preferences.glade:705 msgid "Default charset for AMC CSV output." msgstr "தானியக்க பல தொிவுக்கான இயல்பு CSV எழுத்துதொகுப்பு" #: ../AMC-gui-edit_preferences.glade:724 msgid "" "Comma separated list of CSV headers of columns that may contain the surnames" " of the students in the names list file." msgstr "" "காற்புள்ளியால் பிாிக்கப்பட்டCSV நெடுவாிசைகளின் தலைப்புகளில், பெயா்கள் " "பட்டியல் கோப்பிலுள்ள மாணவா்களின் குடும்பப் பெயா்களைக் கொண்டிருக்கலாம். " #: ../AMC-gui-edit_preferences.glade:738 msgid "" "Comma separated list of CSV headers of columns that may contain the names of" " the students in the names list file." msgstr "" "காற்புள்ளியால் பிாிக்கப்பட்டCSV நெடுவாிசைகளின் தலைப்புகளில், பெயா்கள் " "பட்டியல் கோப்பிலுள்ள மாணவா்களின் பெயா்களைக் கொண்டிருக்கலாம். " #: ../AMC-gui-edit_preferences.glade:752 msgid "Charset used when producing LaTeX files from models." msgstr "" "LaTeX கோப்புகளை மாதிாிகளிலிருந்து உருவாக்கும் போது எழுத்துதொகுப்பு " "பயன்படுத்தப்பட்டுள்ளது." #: ../AMC-gui-edit_preferences.glade:769 msgid "Decimal delimiter" msgstr "பதின்ம வரம்புச் சுட்டி" #: ../AMC-gui-edit_preferences.glade:797 msgid "ASCII filenames" msgstr "ASCII கோப்பு பெயா்கள்" #: ../AMC-gui-edit_preferences.glade:809 msgid "" "Force all annotated completed student sheets to have only ASCII characters " "in their file names. When set, all non-ASCII characters will be replaced by " "underscores." msgstr "" "சுட்டு விளக்கப்பட்ட மாணவா் தாள்களின் கோப்புப் பெயர்கள் ASCII " "குறியுருத்தொகுதிகளை மட்டுமே கொண்டிருக்கும்படி வலியுறுத்துகிறது. ASCII " "குறியுருத்தொகுதியில் இல்லாத எல்லா எழுத்துகளும் அடிக்கோடுகளால் " "இடமாற்றப்படும்." #: ../AMC-gui-edit_preferences.glade:821 msgid "Accept non-ASCII project names" msgstr "ASCII அல்லாத திட்டப்பணி பெயர்களை ஏற்கவும்" #: ../AMC-gui-edit_preferences.glade:848 msgid "Internationalization" msgstr "பன்னாட்டு மயமாக்குதல்" #: ../AMC-gui-edit_preferences.glade:880 msgid "Printing method" msgstr "அச்சிடும் முறை" #: ../AMC-gui-edit_preferences.glade:891 msgid "Printing command" msgstr "அச்சிடும் கட்டளை" #: ../AMC-gui-edit_preferences.glade:913 msgid "Useful printing options" msgstr "பயனுள்ள அச்சிடும் தொிவுகள்" #: ../AMC-gui-edit_preferences.glade:941 msgid "" "Command to print one paper (with stapling). String %f will be replaced by " "the PDF file to be printed." msgstr "" "ஒரு தாளை அச்சிடும் கட்டளை (தைப்புமுள்ளுடன்). சரம் %f க்குப் பதிலாக " "அச்சிடப்பட வேண்டிய PDF கோப்பு இடங்கொள்ளும்." #: ../AMC-gui-edit_preferences.glade:984 msgid "Printing" msgstr "அச்சிடுகிறது" #: ../AMC-gui-edit_preferences.glade:1016 msgid "Number of processes" msgstr "செயல்முறைகளின் எண்ணிக்கை" #: ../AMC-gui-edit_preferences.glade:1027 msgid "" "Number of processes to be run in parallel. Default value is 0, which allows " "to start as many processes as processors." msgstr "" "இணையொத்து இயங்க வேண்டிய செயல்முறைகளின் எண்ணிக்கை. இயல்புநிலை மதிப்பானது 0 " "ஆகும், இது செயலிகளால் முடிகிற அளவுக்கு பல செயல்பாடுகளைத் தொடங்க " "அனுமதிக்கிறது." #: ../AMC-gui-edit_preferences.glade:1044 msgid "System" msgstr "அமைப்பு" #: ../AMC-gui-edit_preferences.glade:1065 msgid "Main" msgstr "முதன்மை" #: ../AMC-gui-edit_preferences.glade:1094 ../AMC-gui-main_window.glade:2771 msgid "Solution" msgstr "தீா்வு" #: ../AMC-gui-edit_preferences.glade:1110 ../AMC-gui-main_window.glade:2783 msgid "Individual solution" msgstr "தனித்தனியான தீா்வு" #: ../AMC-gui-edit_preferences.glade:1125 ../AMC-gui-main_window.glade:2759 msgid "Catalog" msgstr "அட்டவணை" #: ../AMC-gui-edit_preferences.glade:1147 msgid "Optional working documents to build" msgstr "கட்டாயமற்ற வேலை ஆவணங்களை கட்டமைக்க" #: ../AMC-gui-edit_preferences.glade:1170 ../AMC-gui-main_window.glade:394 msgid "Documents" msgstr "ஆவணங்கள்" #: ../AMC-gui-edit_preferences.glade:1213 msgid "Limit MSE" msgstr "சராசாி இருபடிப்பிழையின் வரம்பு" #: ../AMC-gui-edit_preferences.glade:1224 msgid "Limit sensitivity" msgstr "ஒளிக்கூருணர்திறன் வரம்பு" #: ../AMC-gui-edit_preferences.glade:1265 msgid "Colouring thresholds" msgstr "நிறமேற்றுதலின் நிலையெல்லைகள்" #: ../AMC-gui-edit_preferences.glade:1299 msgid "No answers color" msgstr "பதில்கள் இல்லாதனவற்றின் நிறம்" #: ../AMC-gui-edit_preferences.glade:1310 msgid "Invalid answers color" msgstr "செல்லாத பதில்களின் நிறம்" #: ../AMC-gui-edit_preferences.glade:1347 msgid "Scan view" msgstr "அலகீடு பாா்வை" #: ../AMC-gui-edit_preferences.glade:1379 msgid "Maximum density for manual data capture question paper rendering (DPI)" msgstr "கைமுறை தரவு உள்ளீட்டில் கேள்வித்தாளின் அதிகபட்ச அடா்த்தி (DPI) " #: ../AMC-gui-edit_preferences.glade:1380 msgid "Manual capture density (DPI)" msgstr "கைமுறை உள்ளீட்டின் அடா்த்தி (DPI)" #: ../AMC-gui-edit_preferences.glade:1391 msgid "Image type" msgstr "பட வகை" #: ../AMC-gui-edit_preferences.glade:1402 msgid "Remember window size" msgstr "சாளர அளவை நினைவில் கொள்ளவும்" #. Label in the preferences window, corresponding to "Starting number of #. columns for names in the manual association window". #: ../AMC-gui-edit_preferences.glade:1413 msgid "Number of columns for names" msgstr "பெயா்களுக்கான நெடுவாிசைகளின் எண்ணிக்கை" #. Label in the preferences window, corresponding to the "Number of columns #. for zoomed boxes in the zooms window (opened from the Diagnosis list in the #. Data capture tab)". #: ../AMC-gui-edit_preferences.glade:1424 msgid "Number of columns for zoomes boxes" msgstr "பொிதாக்க கட்டங்களுக்கான நெடுவாிசைகளின் எண்ணிக்கை" #: ../AMC-gui-edit_preferences.glade:1448 msgid "" "Temporary file type used for manual data capture. Fastest choice is (none), " "but this seems to be problematic in some environments." msgstr "" "கைமுறை தரவு உள்ளீட்டுக்கு தற்காலிக கோப்பு வகை பயன்படுத்தப்பட்டுள்ளது. வேகமான" " தொிவு (ஒன்றுமில்லை), ஆனால் இது சில சூழல்களில் சிக்கல் வாய்ந்ததாக " "தோன்றுகிறது." #: ../AMC-gui-edit_preferences.glade:1467 msgid "Do you want to keep the same window size each time you start AMC?" msgstr "" "ஒவ்வொரு முறையும் நீங்கள் தானியக்க பல தொிவை ஆரம்பிக்கும் போது அதே சாளர அளவு " "இருக்க வேண்டுமா?" #: ../AMC-gui-edit_preferences.glade:1480 msgid "Starting number of columns for names in the manual association window." msgstr "கைமுறை இணைப்பு சாளரத்திலுள்ள பெயா்கள் நெடுவாிசைகளின் தொடக்க எண்." #: ../AMC-gui-edit_preferences.glade:1497 msgid "" "Number of columns for zoomed boxes in the zooms window (opened from the " "Diagnosis list in the Data capture tab)." msgstr "" "பொிதாக்கம் சாளரத்தில் பொிதுபடுத்தப்பட்ட கட்டங்களுக்கான நெடுவாிசைகளின் " "எண்ணிக்கை (தரவு உள்ளீட்டு கீற்றிலுள்ள குறையறிதல் பட்டியலிலிருந்து " "திறக்கப்பட்டது)" #: ../AMC-gui-edit_preferences.glade:1518 msgid "Miscellaneous" msgstr "இதர" #: ../AMC-gui-edit_preferences.glade:1549 msgid "Notify the user at the end of the following actions:" msgstr "பின்வரும் செயல்களின் முடிவில் பயனருக்கு தொிவிக்க:" #. One of the "notify the user at the end of the following actions" checkbox: #. for documents update. #: ../AMC-gui-edit_preferences.glade:1568 msgid "Documents update" msgstr "ஆவணங்கள் புதுப்பிப்பு" #. One of the "notify the user at the end of the following actions" checkbox: #. for computing marks. #: ../AMC-gui-edit_preferences.glade:1600 msgid "Grading" msgstr "மதிப்பிடல்" #. One of the "notify the user at the end of the following actions" checkbox: #. for completed answer sheets annotation. #: ../AMC-gui-edit_preferences.glade:1616 #: ../AMC-gui-edit_preferences.glade:3137 msgid "Annotation" msgstr "சுட்டு விளக்கம்" #: ../AMC-gui-edit_preferences.glade:1641 msgid "Notify using:" msgstr "தெரிவிக்க பயன்படுத்து:" #: ../AMC-gui-edit_preferences.glade:1660 msgid "Desktop notifications" msgstr "கணினி அறிவிப்புகள்" #: ../AMC-gui-edit_preferences.glade:1696 msgid "Command:" msgstr "கட்டளை:" #: ../AMC-gui-edit_preferences.glade:1708 msgid "" "Command that will be called as a user notification. %m will be replaced by " "AMC's message, and %a by AMC completed action." msgstr "" "ஒரு பயனா் அறிவிப்பாக அழைக்கப்படும் கட்டளை. %m க்குப் பதிலாக தானியக்க பல " "தொிவின் செய்தியும் மற்றும் %a க்குப் பதிலாக தானியக்க பல தொிவின் " "முடிக்கப்பட்ட செயலும் இடங்கொள்ளப்படும்." #: ../AMC-gui-edit_preferences.glade:1737 msgid "Notifications" msgstr "அறிவிப்புகள்" #: ../AMC-gui-edit_preferences.glade:1761 msgid "Display" msgstr "காட்டு" #: ../AMC-gui-edit_preferences.glade:1804 msgid "Vector formats density (DPI)" msgstr "திசையன் வடிவங்களின் அடா்த்தி (DPI)" #: ../AMC-gui-edit_preferences.glade:1815 msgid "Black&white conversion threshold" msgstr "கருப்பு-வெள்ளை நிறமாற்றுக்கான நிலையெல்லை" #: ../AMC-gui-edit_preferences.glade:1826 msgid "Erease red from scans" msgstr "அலகீடுகளிலிருந்து சிவப்பை அழி" #: ../AMC-gui-edit_preferences.glade:1837 msgid "Force conversion" msgstr "கட்டாய மாற்றல்" #: ../AMC-gui-edit_preferences.glade:1848 msgid "" "Density used when converting vector format scans (PDF, EPS) into bitmap." msgstr "" "திசையன் வடிவ அலகீடுகளை (PDF, EPS) பிட்மேப்பாக மாற்றும் போது பயன்படுத்தப்பட்ட" " அடா்த்தி. " #: ../AMC-gui-edit_preferences.glade:1863 msgid "" "Threshold used when converting scans to black and white. Value 0.0 means all" " white, value 1.0 means all black." msgstr "" "கருப்பு வெள்ளை அலகீடுகளாக மாற்றும் போது நிலையெல்லை பயன்படுத்தப்படுகிறது. " "மதிப்பு 0.0 எனில் அனைத்தும் வெள்ளை, மதிப்பு 1.0 எனில் அனைத்தும் கருப்பு." #: ../AMC-gui-edit_preferences.glade:1881 msgid "" "When set, AMC will erease red color from the color scans before automatic " "data capture. This can be useful if the boxes are drawn in red." msgstr "" "அமைக்கப்படும்போது, தானியங்கு தரவு உள்ளீட்டுக்கு முன்பாக வண்ண அலகீடுகளில் " "இருந்து சிவப்பு நிறம் அழிக்கப்படும். பெட்டிகள் சிவப்பில் நிரப்பப்பட்டால் இது" " பயனுள்ளதாக இருக்கும்." #: ../AMC-gui-edit_preferences.glade:1896 msgid "" "With this option, all scan files will be converted with ImageMagick. This " "can slow down scans processing, but may allow some unusual file formats to " "be processed successfully." msgstr "" "இந்த விருப்பத்தில், அனைத்து அலகீடு கோப்புகளும் ImageMagick ஐ பயன்படுத்தி " "மாற்றப்படும். அலகீடுகள் செயலாக்கத்தை இது மெதுவாக்கலாம், ஆனால் சில " "வழக்கத்திற்கு மாறான கோப்பு வடிவங்கள் வெற்றிகரமாக செயலாக்கப்படலாம்." #: ../AMC-gui-edit_preferences.glade:1913 msgid "Scans conversion" msgstr "அலகீடுகள் மாற்றல்" #: ../AMC-gui-edit_preferences.glade:1945 msgid "Marks size max increase" msgstr "மதிப்பெண்கள் அளவு அதிகபட்ச அதிகாிப்பு" #: ../AMC-gui-edit_preferences.glade:1956 msgid "Marks size max decrease" msgstr "மதிப்பெண்கள் அளவு அதிகபட்ச குறைப்பு" #: ../AMC-gui-edit_preferences.glade:1967 #: ../AMC-gui-edit_preferences.glade:2490 msgid "Can be customized on a per-project basis in the Project tab." msgstr "" "திட்டப்பணி கீற்றில் ஒரு திட்டப்பணிக்கு ஒன்று என்ற அடிப்படையில் தனிப்பயனாக்க " "முடியும்." #: ../AMC-gui-edit_preferences.glade:1968 msgid "Default darkness threshold" msgstr "இயல்பான இருள் நிலையெல்லை" #: ../AMC-gui-edit_preferences.glade:1979 msgid "Default upper darkness threshold" msgstr "இயல்பான மேல் இருள் நிலையெல்லை" #: ../AMC-gui-edit_preferences.glade:1990 msgid "" "Proportion of the box (on the scan) that is measured to compute its " "blackness." msgstr "" "கட்டத்தின் கருப்புத்தன்மையைக் கணக்கிடும் அளவிடப்பட்ட விகிதப்பொருத்தம் " "(அலகீட்டின் மேல்)." #: ../AMC-gui-edit_preferences.glade:1991 msgid "Measured box proportion" msgstr "அளவிடப்பட்ட கட்ட விகிதப்பொருத்தம்" #: ../AMC-gui-edit_preferences.glade:2002 msgid "Process scans with 3 corner marks" msgstr "அலகீடுகளை 3 மூலையில் வட்டங்களுடன் செயல்முறைக்குள்ளாக்கு" #: ../AMC-gui-edit_preferences.glade:2013 msgid "" "Maximum increase (proportion: 0.1 means 10%) allowed for corner marks after " "printing/scanning process." msgstr "" "அச்சிடுதல்/அலகிடுதல் செயல்முறைகளுக்குப் பிறகு மூலையிலுள்ள வட்டக்குறியை " "அதிகபட்சமாக அதிகாிக்க (விகிதம்: 0.1 என்றால் 10%) அனுமதிக்கப்படுகிறது." #: ../AMC-gui-edit_preferences.glade:2030 msgid "" "Maximum decrease (proportion: 0.1 means 10%) allowed for corner marks after " "printing/scanning process." msgstr "" "அச்சிடுதல்/அலகிடுதல் செயல்முறைகளுக்குப் பிறகு மூலையிலுள்ள வட்டக்குறியை " "அதிகபட்சமாக குறைக்க (விகிதம்: 0.1 என்றால் 10%) அனுமதிக்கப்படுகிறது." #: ../AMC-gui-edit_preferences.glade:2047 msgid "" "If black proportion is greater than this value, the box will be considered " "as beeing ticked. This is a default value, it can be changed in each " "project." msgstr "" "கருப்பு விகிதசமம் இந்த மதிப்பை விட அதிகமானால், கட்டம் நிரப்பப்பட்டதாக " "கருதப்படும். இது ஒரு இயல்பான மதிப்பு, ஒவ்வொரு திட்டப்பணிக்கும் இதை " "மாற்றலாம்." #: ../AMC-gui-edit_preferences.glade:2093 msgid "Do you want to process scans with 3 corner circles only?" msgstr "3 மூலை வட்டங்களுடன் மட்டுமே அலகீடுகளை செயல்முறைக்குள்ளாக்கவா?" #: ../AMC-gui-edit_preferences.glade:2110 msgid "Detection parameters" msgstr "அளபுருக்களைக் கண்டறிதல்" #: ../AMC-gui-edit_preferences.glade:2166 msgid "" "These options are used when creating a new project. See the project tab for " "more details." msgstr "" "ஒரு புதிய திட்டப்பணியை உருவாக்கும் போது இந்த விருப்பங்கள் " "பயன்படுத்தப்படுகின்றன. மேலும் விவரங்களுக்கு திட்டப்பணிக் கீற்றைப் " "பார்க்கவும்." #: ../AMC-gui-edit_preferences.glade:2173 #: ../AMC-gui-edit_preferences.glade:3760 msgid "Minimal mark" msgstr "குறைந்தபட்ச மதிப்பெண்" #: ../AMC-gui-edit_preferences.glade:2184 #: ../AMC-gui-edit_preferences.glade:3771 msgid "Floor mark" msgstr "தரை மதிப்பெண்" #: ../AMC-gui-edit_preferences.glade:2195 #: ../AMC-gui-edit_preferences.glade:3782 msgid "Maximal mark" msgstr "அதிகபட்ச மதிப்பெண்" #: ../AMC-gui-edit_preferences.glade:2206 #: ../AMC-gui-edit_preferences.glade:3793 msgid "Grain" msgstr "துகள்" #: ../AMC-gui-edit_preferences.glade:2217 #: ../AMC-gui-edit_preferences.glade:3804 msgid "Rounding type" msgstr "முழு எண்ணாக்கும் முறை" #: ../AMC-gui-edit_preferences.glade:2272 #: ../AMC-gui-edit_preferences.glade:3891 msgid "ceil" msgstr "கூரை" #: ../AMC-gui-edit_preferences.glade:2312 msgid "Default marking options" msgstr "இயல்பான மதிப்பிடும் விருப்பங்கள்" #: ../AMC-gui-edit_preferences.glade:2329 ../AMC-gui-main_window.glade:1943 msgid "Marking" msgstr "மதிப்பிடல்" #: ../AMC-gui-edit_preferences.glade:2372 msgid "Max size" msgstr "அதிகபட்ச அளவு" #: ../AMC-gui-edit_preferences.glade:2383 msgid "Image format" msgstr "பட வடிவம்" #: ../AMC-gui-edit_preferences.glade:2394 msgid "JPEG quality" msgstr "JPEG தரம்" #: ../AMC-gui-edit_preferences.glade:2454 msgid "Scans" msgstr "அலகீடுகள்" #: ../AMC-gui-edit_preferences.glade:2492 msgid "Default header text" msgstr "இயல்பான தலைப்பு உரை" #: ../AMC-gui-edit_preferences.glade:2513 #: ../AMC-gui-edit_preferences.glade:3976 msgid "" "Text to be written on annotated sheets header. Use %S for score, %M for max " "score, %s for grade, %m for max grade, and %(col) for content of the column " "col in the students list file." msgstr "" "சுட்டுவிளக்கத் தாள்களின் தலைப்பில் எழுதப்பட வேண்டிய உரை. மாணவா்களின் " "பட்டியல் கோப்பிலுள்ள நெடுவாிசையின் உள்ளடக்கத்திற்கு %(col) ஐயும், பெற்ற " "மதிப்பெண்ணிற்கு %S ஐயும், அதிகபட்ச மதிப்பெண்ணிற்கு %M ஐயும், கொடுக்கப்பட்ட " "மதிப்பெண்ணிற்கு %s ஐயும் மற்றும் அதிகபட்ச மதிப்பெண்ணிற்கு %m ஐயும் " "பயன்படுத்தவும்." #: ../AMC-gui-edit_preferences.glade:2553 msgid "Default writing direction" msgstr "இயல்பான எழுதும் திசை" #: ../AMC-gui-edit_preferences.glade:2564 msgid "Default questions annotation" msgstr "இயல்பான கேள்வி சுட்டுவிளக்கம்" #: ../AMC-gui-edit_preferences.glade:2575 msgid "Default cancelled questions annotation" msgstr "இயல்பான நீக்கப்பட்ட கேள்வி சுட்டுவிளக்கம்" #: ../AMC-gui-edit_preferences.glade:2585 #: ../AMC-gui-edit_preferences.glade:4050 msgid "right to left" msgstr "வலமிருந்து இடது" #: ../AMC-gui-edit_preferences.glade:2639 msgid "Header" msgstr "தலைப்பு" #: ../AMC-gui-edit_preferences.glade:2671 msgid "Significant digits" msgstr "முக்கியமான இலக்கங்கள்" #: ../AMC-gui-edit_preferences.glade:2682 msgid "" "Number of significant digits to display for marks when annotating papers." msgstr "" "பதில் தாள்களைச் சுட்டு விளக்கும் போது, மதிப்பெண்களில் காண்பிக்க வேண்டிய " "முக்கியமான இலக்கங்களின் எண்ணிக்கை." #: ../AMC-gui-edit_preferences.glade:2703 msgid "Marks" msgstr "மதிப்பெண்கள்" #: ../AMC-gui-edit_preferences.glade:2740 msgid "Line width" msgstr "கோட்டுத் தடிப்பு" #: ../AMC-gui-edit_preferences.glade:2751 msgid "Font" msgstr "எழுத்துரு" #: ../AMC-gui-edit_preferences.glade:2762 msgid "Marks shift" msgstr "மதிப்பெண்களை நகா்த்தல்" #: ../AMC-gui-edit_preferences.glade:2803 msgid "" "When marks are written on annotated papers left to the boxes, shifts to the " "left marks by this value. You can use mm or in as a unit." msgstr "" "சுட்டு விளக்கப்பட்ட தாள்களிலுள்ள கட்டங்களுக்கு இடதுபுறம் மதிப்பெண்கள் " "எழுதப்பட்டால், இந்த மதிப்பிற்கு இடமாக நகா்த்தும். mm அல்லது inch ஐ ஒரு அலகு " "என நீங்கள் பயன்படுத்தலாம்." #: ../AMC-gui-edit_preferences.glade:2832 msgid "To be ticked" msgstr "குறிக்கப்பட வேண்டியவை" #: ../AMC-gui-edit_preferences.glade:2844 msgid "Ticked" msgstr "குறிக்கப்பட்டது" #: ../AMC-gui-edit_preferences.glade:2856 msgid "type" msgstr "வகை" #: ../AMC-gui-edit_preferences.glade:2868 msgid "colour" msgstr "நிறம்" #: ../AMC-gui-edit_preferences.glade:2880 #: ../AMC-gui-edit_preferences.glade:2891 #: ../AMC-gui-edit_preferences.glade:2924 #: ../AMC-gui-edit_preferences.glade:2946 msgid "no" msgstr "இல்லை" #: ../AMC-gui-edit_preferences.glade:2902 #: ../AMC-gui-edit_preferences.glade:2913 #: ../AMC-gui-edit_preferences.glade:2935 #: ../AMC-gui-edit_preferences.glade:2957 msgid "yes" msgstr "ஆம்" #: ../AMC-gui-edit_preferences.glade:3088 msgid "Also annotate informative questions" msgstr "விளக்கமான பதில்களுக்கும் சுட்டு விளக்கம் கொடுக்க" #: ../AMC-gui-edit_preferences.glade:3110 msgid "Symbols" msgstr "குறியீடு" #: ../AMC-gui-edit_preferences.glade:3185 msgid "Sender email" msgstr "அனுப்புபவாின் மின்னஞ்சல்" #: ../AMC-gui-edit_preferences.glade:3196 msgid "Carbon copy address" msgstr "நகலை பெறுபவாின் முகவாி" #: ../AMC-gui-edit_preferences.glade:3207 msgid "Blind Carbon copy address" msgstr "நகலை பெறுபவாின் முகவாி-மறைக்கப்பட்டது " #: ../AMC-gui-edit_preferences.glade:3260 msgid "Delay between sendings" msgstr "அனுப்புதல்களுக்கு இடைப்பட்ட காலதாமதம்" #: ../AMC-gui-edit_preferences.glade:3295 msgid "Mail delivery method:" msgstr "மின்னஞ்சல் ஒப்படைப்பு முறை:" #: ../AMC-gui-edit_preferences.glade:3337 msgid "sendmail path" msgstr "sendmail பாதை" #: ../AMC-gui-edit_preferences.glade:3373 msgid "SMTP host" msgstr "SMTP host" #: ../AMC-gui-edit_preferences.glade:3384 msgid "SMTP port" msgstr "SMTP port" #: ../AMC-gui-edit_preferences.glade:3424 msgid "SMTP security" msgstr "SMTP பாதுகாப்பு" #: ../AMC-gui-edit_preferences.glade:3435 msgid "SMTP user" msgstr "SMTP பயனர்" #: ../AMC-gui-edit_preferences.glade:3472 msgid "SMTP password" msgstr "SMTP கடவுச்சொல்" #: ../AMC-gui-edit_preferences.glade:3509 msgid "Sending emails" msgstr "மின்னஞ்சல்களை அனுப்புகிறது" #: ../AMC-gui-edit_preferences.glade:3546 msgid "Default subject" msgstr "இயல்பான பொருள்" #: ../AMC-gui-edit_preferences.glade:3588 msgid "Default content" msgstr "இயல்பான உள்ளடக்கம்" #: ../AMC-gui-edit_preferences.glade:3612 msgid "Email" msgstr "மின்னஞ்சல்" #: ../AMC-gui-edit_preferences.glade:3638 msgid "Project preferences" msgstr "திட்டப்பணியின் முன்மதிப்பீடுகள்" #: ../AMC-gui-edit_preferences.glade:3670 msgid "Darkness threshold" msgstr "இருள் நிலையெல்லை" #: ../AMC-gui-edit_preferences.glade:3681 msgid "" "If black proportion is greater than this value, the box will be considered " "as beeing ticked. If students have been told to darken the boxes entirely, " "one can choose value 0.5. If students have been told to tick the boxes, " "values around 0.15 seems appropriate." msgstr "" "கருப்பு விகிதசமம் இந்த மதிப்பை விட அதிகமானால், கட்டம் நிரப்பப்பட்டதாக " "கருதப்படும். மாணவா்களைக் கட்டங்கள் முழுதும் கருமையாக்கும்படி கூறியிருந்தால்," " இதன் மதிப்பை 0.5 ஆகத் தொிவு செய்யலாம். மாணவா்களைக் கட்டங்களில் " "குறிக்கும்படி கூறியிருந்தால், இதன் மதிப்பை 0.15 க்கு அருகில் தொிவு செய்வது " "பொருத்தமாக இருக்கும்." #: ../AMC-gui-edit_preferences.glade:3697 msgid "Upper darkness threshold" msgstr "உச்சகட்ட இருள் நிலையெல்லை" #: ../AMC-gui-edit_preferences.glade:3708 msgid "" "If black proportion is greater than this value, the box is considered as not" " ticked. Setting this threshold to a value less than one allows the students" " to cancel ticked boxes by filling them completely." msgstr "" "கருப்பு விகிதசமம் இந்த மதிப்பை விட அதிகமானால், கட்டம் நிரப்பப்படாததாக " "கருதப்படும். இதன் மதிப்பை ஒன்றுக்கு குறைவாக தொிவு செய்திருந்தால், முழுதும் " "கருமையாக்கப்பட்ட கட்டங்கள் நிரப்பப்படாததாக கருதப்படும்." #: ../AMC-gui-edit_preferences.glade:3728 msgid "Automatic data capture" msgstr "தானியக்க தரவு உள்ளீடு" #: ../AMC-gui-edit_preferences.glade:3815 msgid "Mark associated with null score" msgstr "சுழிய மதிப்போடு தொடர்புடைய மதிப்பெண்" #: ../AMC-gui-edit_preferences.glade:3829 msgid "" "Floor mark: any exam with a global mark less than this value will be given " "this mark. Let empty for no floor mark." msgstr "" "தரை மதிப்பெண்: இந்த மதிப்பைக் காட்டிலும் குறைவான மதிப்பெண் பெற்றால் தரை " "மதிப்பெண் கொடுக்கப்படும். எந்த தரை மதிப்பெண்ணும் இல்லையெனில் வெறுமையாக " "விடவும்." #: ../AMC-gui-edit_preferences.glade:3879 msgid "" "Mark to be given to a perfect sheet with all good answers (scaling the " "marks). Value 0 meens that you don't want to scale the marks." msgstr "" "ஒரு சாியான தாளின் அனைத்து நல்ல பதில்களுக்கும் (மதிப்பெண்களை அளவிடுதல்) " "மதிப்பெண்கள் வழங்க வேண்டும். மதிப்பு 0 என்பதற்கு மதிப்பெண்களை அளவிட வேண்டாம்" " என்று அா்த்தம்." #: ../AMC-gui-edit_preferences.glade:3896 msgid "" "When using SUF option in general grading scale, should marks be ceiled not " "to be larger than the maximum mark ?" msgstr "" "SUF விருப்பத்தைப் பொதுவான மதிப்பிடும் அளவிலேயே பயன்படுத்தும் போது, பெற்ற " "மதிப்பெண் ஆனது அதிகபட்ச மதிப்பெண்ணைக் காட்டிலும் பொியதாக இருக்கக்கூடாது " "என்பதை குறிக்க வேண்டும்?" #: ../AMC-gui-edit_preferences.glade:3920 msgid "Global mark rules" msgstr "முழுதளாவிய மதிப்பெண் விதிகள்" #: ../AMC-gui-edit_preferences.glade:3956 msgid "Header text" msgstr "தலைப்பு உரை" #: ../AMC-gui-edit_preferences.glade:4007 msgid "Writing direction" msgstr "எழுதும் திசை" #: ../AMC-gui-edit_preferences.glade:4018 msgid "Questions marks position" msgstr "ஒவ்வொரு கேள்விக்கும் மதிப்பெண் இடுமிடம்" #: ../AMC-gui-edit_preferences.glade:4029 msgid "Questions annotation text" msgstr "ஒவ்வொரு கேள்விகளுக்கான சுட்டு விளக்க உரை" #: ../AMC-gui-edit_preferences.glade:4040 msgid "Cancelled questions annotation text" msgstr "நீக்கப்பட்ட கேள்விகளுக்கான சுட்டு விளக்க உரை" #: ../AMC-gui-edit_preferences.glade:4083 msgid "" "Text to be written for each question. This will be evaluated by perl, so " "quote it to make a single string. Use %S for score, %M for max score, and %s" " and %m for these values truncated to the requested number of significant " "digits." msgstr "" "ஒவ்வொரு கேள்விக்கும் எழுத வேண்டிய உரை. இது perl மூலம் மதிப்பீடு " "செய்யப்படும், எனவே அதை மேற்கோளிட்டு ஒற்றைச் சரமாக்கவும். மதிப்பெண்ணிற்கு %S " "ஐயும் அதிகபட்ச மதிப்பெண்ணிற்கு% M ஐயும் பயன்படுத்தவும் மேலும் %s மற்றும் %m " "ஆனது கோரப்பட்ட முதன்மை இலக்கங்களின் எண்ணிக்கைக்கு குறைக்கப்பட்ட " "மதிப்பெண்களாகும்." #: ../AMC-gui-edit_preferences.glade:4097 msgid "Same as above, but for cancelled questions (when using allowempty)." msgstr "" "மேலே உள்ளது போல், ஆனால் நீக்கப்பட்ட கேள்விகளுக்கு (வெற்று அனுமதியைப் " "பயன்படுத்தும் போது)." #: ../AMC-gui-edit_preferences.glade:4122 msgid "Papers annotation" msgstr "தாள்களுக்கான சுட்டு விளக்கம்" #: ../AMC-gui-edit_preferences.glade:4206 msgid "Examination description" msgstr "தோ்வு வரையறை:" #: ../AMC-gui-edit_preferences.glade:4249 msgid "CSV files charset" msgstr "CSV கோப்புகளுக்கான எழுத்துதொகுப்பு" #: ../AMC-gui-edit_preferences.glade:4260 msgid "Charset used for the students list file" msgstr "மாணவா்களின் பட்டியல் கோப்பிற்கு பயன்படுத்தப்பட்ட எழுத்துதொகுப்பு" #: ../AMC-gui-edit_preferences.glade:4279 msgid "Charset for the CSV marks file produced by AMC." msgstr "" "CSV மதிப்பெண்கள் கோப்பிற்கு தானியக்க பல தொிவால் உருவாக்கப்பட்ட " "எழுத்துதொகுப்பு" #: ../AMC-gui-edit_preferences.glade:4302 msgid "Internationnalization" msgstr "பன்னாட்டு மயமாக்குதல்" #: ../AMC-gui-edit_preferences.glade:4334 msgid "LaTeX engine" msgstr "LaTeX இயந்திரம்" #: ../AMC-gui-edit_preferences.glade:4345 msgid "Command to compile LaTeX file and make PDF, PS or DVI output." msgstr "LaTeX கோப்பைத் தொகுத்து PDF, PS அல்லது DVI கோப்பை உருவாக்கும் கட்டளை." #: ../AMC-gui-edit_preferences.glade:4368 msgid "External commands" msgstr "வெளிப்புற கட்டளைகள்" #: ../AMC-gui-edit_preferences.glade:4393 ../AMC-gui-main_window.glade:2923 #: ../AMC-gui-main_window.glade:3239 msgid "Project" msgstr "திட்டப்பணிகள்" #: ../AMC-gui-edit_preferences.glade:4413 msgid "AMC Preferences" msgstr "தானியக்க பல தொிவின் முன் மதிப்பீடுகள்" #: ../AMC-gui-filter_details.glade:7 msgid "Formats details" msgstr "வடிவமைப்புகளின் விவரங்கள்" #: ../AMC-gui-filter_details.glade:66 msgid "" "AMC supports different formats for the source file. Here are some details " "about each of them." msgstr "" "தானியக்க பல தொிவு மூல கோப்பிற்கான பல்வேறு வடிவங்களை ஆதாிக்கிறது. அவை " "ஒவ்வொன்றைப் பற்றியும் சில விவரங்கள் உள்ளன." #: ../AMC-gui-filter_details.glade:115 msgid "Description:" msgstr "வரையறை:" #: ../AMC-gui-liste_dialog.glade:48 msgid "No names list" msgstr "பெயா்கள் பட்டியல் இல்லை" #: ../AMC-gui-liste_dialog.glade:134 msgid "Apply" msgstr "இடு" #: ../AMC-gui-liste_dialog.glade:163 msgid "Choose your students names list file" msgstr "உங்கள் மாணவர்களின் பெயா்கள் பட்டியல் கோப்பைத் தொிவு செய்யவும்" #: ../AMC-gui-mailing.glade:13 msgid "Mailing" msgstr "மின்னஞ்சலிடல்" #: ../AMC-gui-mailing.glade:40 msgid "Send" msgstr "அனுப்பு" #: ../AMC-gui-mailing.glade:75 msgid "Current project name %n:" msgstr "தற்போதைய திட்டப்பணியின் பெயா் %n:" #: ../AMC-gui-mailing.glade:149 msgid "Emails column:" msgstr "மின்னஞ்சல்களுக்கான நெடுவாிசை:" #: ../AMC-gui-mailing.glade:184 msgid "Select failed" msgstr "தோல்வியடைந்ததைத் தோ்ந்தெடு" #: ../AMC-gui-mailing.glade:237 msgid "Addressees" msgstr "பெறுநா்கள்" #: ../AMC-gui-mailing.glade:274 msgid "Subject" msgstr "பொருள்" #: ../AMC-gui-mailing.glade:303 msgid "Enable HTML Tags" msgstr "HTML குறிச்சொற்களை இயக்கு" #: ../AMC-gui-mailing.glade:345 msgid "Body" msgstr "செய்தி" #: ../AMC-gui-mailing.glade:437 msgid "Attachments" msgstr "இணைப்புகள்" #: ../AMC-gui-main_window.glade:126 msgid "Updated" msgstr "மேம்படுத்தப்பட்டது" #: ../AMC-gui-main_window.glade:146 msgid "Sensitivity" msgstr "கூருணர்வுத்திறம்" #: ../AMC-gui-main_window.glade:156 msgid "Scan file" msgstr "அலகீட்டுக் கோப்பு" #: ../AMC-gui-main_window.glade:294 msgid "Number of papers:" msgstr "தாள்களின் எண்ணிக்கை:" #: ../AMC-gui-main_window.glade:308 msgid "" "Number of papers to produce. Zero means taking into account the number " "written in the LaTeX source file." msgstr "" "தயாாிப்பதற்கான தாள்களின் எண்ணிக்கை. சுழியம் என்பது LaTeX மூல கோப்பில் " "எழுதப்பட்ட எண்ணை கணக்கில் எடுத்துக்கொள்வதாகும்." #. TRANSLATORS: Use the character '_' before the key that can be used as a #. mnemonic (to activate documents update with Alt+key) #: ../AMC-gui-main_window.glade:343 msgid "_Update documents" msgstr "_ஆவணங்களை மேம்படுத்த" #: ../AMC-gui-main_window.glade:377 msgid "Question" msgstr "கேள்வி-பதில் தாள்" #: ../AMC-gui-main_window.glade:543 msgid "Warnings" msgstr "எச்சாிக்கைகள்" #: ../AMC-gui-main_window.glade:654 msgid "Print papers" msgstr "தாள்களை அச்சிடு" #: ../AMC-gui-main_window.glade:718 msgid "From papers' scans" msgstr "தாள்களின் அலகீடுகளிலிருந்து" #: ../AMC-gui-main_window.glade:740 ../AMC-gui-main_window.glade:1776 msgid "Automatic" msgstr "தானியக்கம்" #: ../AMC-gui-main_window.glade:762 msgid "On screen with mouse" msgstr "சுட்டியைக் கொண்டு திரையில்" #: ../AMC-gui-main_window.glade:784 ../AMC-gui-main_window.glade:1819 msgid "Manual" msgstr "கைமுறை" #: ../AMC-gui-main_window.glade:809 msgid "Data capture after examination" msgstr "தோ்வுக்குப் பிறகான தரவு உள்ளீடு" #: ../AMC-gui-main_window.glade:841 msgid "Missing pages" msgstr "காணப்படாத பக்கங்கள்" #: ../AMC-gui-main_window.glade:913 msgid "Look at scans" msgstr "அலகீடுகளைப் பாா்க்கவும்" #: ../AMC-gui-main_window.glade:984 msgid "Forget" msgstr "மறந்துவிடு" #: ../AMC-gui-main_window.glade:1001 msgid "Look at pages" msgstr "இந்தப் பக்கங்களைப் பாருங்கள்" #: ../AMC-gui-main_window.glade:1086 msgid "Pages:" msgstr "பக்கங்கள்:" #: ../AMC-gui-main_window.glade:1144 msgid "Columns" msgstr "நெடுவரிசைகள்" #. Label on the button used to open a window with the images of the boxes #. taken from the scan. This window can be used th check boxes categorization. #: ../AMC-gui-main_window.glade:1183 ../AMC-perl/AMC/Gui/Zooms.glade:13 msgid "Zooms" msgstr "பொிதாக்கு" #: ../AMC-gui-main_window.glade:1188 msgid "" "Show images of the boxes from the scan, and check their categorization." msgstr "" "அலகீடுகளிலிருந்து கட்டங்களின் படங்களைக் காட்டு, மேலும் அவற்றின் " "வகைப்படுத்தலைச் சாிபாா்க்க." #. Label of the button used to open a window showing a scan with the place #. where corner marks have been detected, and the position where the boxes are #. supposed to be. #: ../AMC-gui-main_window.glade:1202 msgid "Layout" msgstr "அமைவு" #: ../AMC-gui-main_window.glade:1207 msgid "" "Show where corner marks have been detected on the scan, and where boxes are " "supposed to be." msgstr "" "அலகீட்டின் மூலையிலுள்ள வட்டக்குறிகள் கண்டறியப்பட்டிருக்கிறதா என்பதையும், " "கட்டங்கள் எங்கிருக்க வேண்டும் என்பதையும் காட்டுகின்றன." #. Label of the button used to delete data capture for selected pages. #: ../AMC-gui-main_window.glade:1221 msgid "Remove" msgstr "நீக்கு" #: ../AMC-gui-main_window.glade:1225 msgid "Remove data capture for selected pages." msgstr "தோ்ந்தெடுக்கப்பட்ட பக்கங்களுக்கான தரவுகளை நீக்கு." #: ../AMC-gui-main_window.glade:1266 msgid "Diagnosis" msgstr "குறையறிதல்" #: ../AMC-gui-main_window.glade:1323 msgid "Update marking scale" msgstr "மதிப்பெண் அளவைப் புதுப்பி" #: ../AMC-gui-main_window.glade:1327 msgid "Also update marking scale extraction from LaTeX source file" msgstr "மேலும் LaTeX மூல கோப்பிலிருந்து மதிப்பெண் அளவீடுகளை எடுத்தல்" #: ../AMC-gui-main_window.glade:1341 msgid "Mark papers" msgstr "பதில் தாள்களைத் திருத்த" #: ../AMC-gui-main_window.glade:1394 msgid "Marking" msgstr "மதிப்பிடுதல்" #: ../AMC-gui-main_window.glade:1419 msgid "Look at marks" msgstr "மதிப்பெண்களைக் காண" #: ../AMC-gui-main_window.glade:1500 msgid "Students list:" msgstr "மாணவா்கள் பட்டியல்:" #: ../AMC-gui-main_window.glade:1548 msgid "Set file" msgstr "கோப்பைத் தொிவு செய்" #: ../AMC-gui-main_window.glade:1596 msgid "Edit list" msgstr "பட்டியலைத் திருத்து" #: ../AMC-gui-main_window.glade:1638 msgid "Re-read" msgstr "மீண்டும் படிக்க" #: ../AMC-gui-main_window.glade:1704 msgid "Code name for automatic association:" msgstr "தானியக்க இணைப்பிற்கான குறிப்பெயா்:" #: ../AMC-gui-main_window.glade:1715 msgid "Primary key from this list:" msgstr "இந்த பட்டியலில் இருந்து முதன்மைக்குறி" #: ../AMC-gui-main_window.glade:1738 msgid "Papers/students association:" msgstr "தாள்கள்-மாணவா்கள் இணைப்பு:" #: ../AMC-gui-main_window.glade:1858 msgid "Students identification" msgstr "மாணவர்கள் அடையாளமறிதல்" #: ../AMC-gui-main_window.glade:2020 msgid "Export" msgstr "ஏற்றுமதி" #: ../AMC-gui-main_window.glade:2041 msgid "and" msgstr "மற்றும்" #: ../AMC-gui-main_window.glade:2095 msgid "Sorting:" msgstr "வாிசைப்படுத்து:" #: ../AMC-gui-main_window.glade:2121 msgid "include absentees" msgstr "வராதவா்களையும் உள்ளடக்கு" #: ../AMC-gui-main_window.glade:2127 msgid "Should exported data include absentees?" msgstr "வராதவா்களையும் உள்ளடக்கி தரவை ஏற்றுமதி செய்யவா?" #: ../AMC-gui-main_window.glade:2207 msgid "Exports dir" msgstr "ஏற்றுமதிகளின் அடைவு" #: ../AMC-gui-main_window.glade:2239 msgid "Marks export" msgstr "மதிப்பெண்கள் ஏற்றுமதி" #: ../AMC-gui-main_window.glade:2322 msgid "File name model:" msgstr "கோப்பு பெயா் மாதிாி:" #: ../AMC-gui-main_window.glade:2336 msgid "" "File name model used to make file names for PDF annotated papers, one by " "student. Keep empty in order to use student name." msgstr "" "சுட்டு விளக்கப்பட்ட தாள்களுள்ள PDF கோப்பிற்கு பெயா்களை உருவாக்குவதற்கான " "மாதிாி கோப்பு பெயா், மாணவா் ஒவ்வொருவருக்கும். கோப்பிற்கு மாணவா் பெயரைப் " "பயன்படுத்த இதை வெறுமையாக வைக்கவும்." #: ../AMC-gui-main_window.glade:2382 msgid "Annotate papers' scans with marking details." msgstr "மதிப்பெண் விவரங்களுடன் பதில்தாள் அலகீடுகளை சுட்டு விளக்கமிடல் " #: ../AMC-gui-main_window.glade:2404 msgid "Annotate papers" msgstr "தாள்களை சுட்டு விளக்கமிடு" #: ../AMC-gui-main_window.glade:2428 msgid "Look at grouped files" msgstr "சுட்டு விளக்கப்பட்ட கோப்புகளைப் பாா்க்க" #: ../AMC-gui-main_window.glade:2451 msgid "Look" msgstr "பாா்க்க" #: ../AMC-gui-main_window.glade:2482 msgid "Send..." msgstr "அனுப்பு..." #: ../AMC-gui-main_window.glade:2511 msgid "Annotated papers" msgstr "சுட்டு விளக்கப்பட்ட தாள்கள்" #: ../AMC-gui-main_window.glade:2534 msgid "Reports" msgstr "அறிக்கைகள்" #: ../AMC-gui-main_window.glade:2650 msgid "Open project" msgstr "திட்டப்பணியைத் திற" #: ../AMC-gui-main_window.glade:2691 msgid "Save project" msgstr "திட்டப்பணியைச் சேமி" #: ../AMC-gui-main_window.glade:2721 msgid "Menu" msgstr "பட்டி" #: ../AMC-gui-main_window.glade:2799 ../AMC-gui-main_window.glade:2838 #: ../AMC-gui-main_window.glade:2877 msgid "Update the document" msgstr "ஆவணத்தை மேம்படுத்த" #: ../AMC-gui-main_window.glade:2813 ../AMC-gui-main_window.glade:2852 #: ../AMC-gui-main_window.glade:2891 msgid "Open the document" msgstr "ஆவணத்தைத் திற" #: ../AMC-gui-main_window.glade:2953 msgid "Export as template" msgstr "வாா்ப்புருவாக ஏற்றுமதி செய்" #: ../AMC-gui-main_window.glade:2967 msgid "User templates" msgstr "பயனா் வாா்ப்புருக்கள்" #: ../AMC-gui-main_window.glade:2992 msgid "Manage" msgstr "நிா்வகி" #: ../AMC-gui-main_window.glade:3017 ../AMC-gui-main_window.glade:3267 msgid "Help" msgstr "உதவி" #: ../AMC-gui-main_window.glade:3033 msgid "About" msgstr "குறித்து" #: ../AMC-gui-main_window.glade:3047 msgid "Cancel learning…" msgstr "கற்பதை நீக்கு..." #: ../AMC-gui-main_window.glade:3058 msgid "Debugging" msgstr "வழுநீக்கம்" #: ../AMC-gui-main_window.glade:3076 msgid "Bug report" msgstr "பிழை அறிக்கை" #: ../AMC-gui-main_window.glade:3090 ../AMC-gui-main_window.glade:3115 msgid "Documentation" msgstr "ஆவணமாக்கம்" #: ../AMC-gui-main_window.glade:3184 ../AMC-gui-main_window.glade:3253 msgid "Plugins" msgstr "சொருகிகள்" #: ../AMC-gui-main_window.glade:3200 msgid "Browse" msgstr "உலாவு" #: ../AMC-gui-main_window.glade:3214 msgid "Install plugin" msgstr "சொருகியை நிறுவவும்" #: ../AMC-gui-make_template.glade:8 msgid "Save as a template" msgstr "ஒரு வாா்ப்புருவாக சேமிக்க" #: ../AMC-gui-make_template.glade:64 msgid "To make a new template from your project, describe it below:" msgstr "" "உங்கள் திட்டப்பணியிலிருந்து ஒரு புதிய வாா்ப்புருவை உருவாக்க அதைக் கீழே " "விளக்கவும்:" #: ../AMC-gui-make_template.glade:86 msgid "File name:" msgstr "கோப்பு பெயா்:" #: ../AMC-gui-make_template.glade:117 msgid "" "Note: please use only alphanumeric characters and characters from " "\"-_+\" for the template file name." msgstr "" "குறிப்பு: தயவுசெய்து வாா்ப்புரு கோப்பு பெயருக்கு எண்ணெழுத்து " "உருவடிவங்கள் மற்றும் \"-_ +\" இலுள்ள உருவடிவங்கள் ஆகியவற்றை மட்டுமே " "பயன்படுத்தவும்." #: ../AMC-gui-make_template.glade:143 msgid "Short name:" msgstr "சுருக்கமான பெயா்:" #: ../AMC-gui-make_template.glade:202 msgid "Description:" msgstr "விளக்கவுரை:" #: ../AMC-gui-make_template.glade:304 msgid "Included files:" msgstr "உள்ளடக்கப்பட்ட கோப்புகள்:" #: ../AMC-gui-overwritten.glade:49 msgid "List of pages with overwritten data:" msgstr "மேலெழுதப்பட்ட தரவுடன் கூடிய பக்கங்களின் பட்டியல்:" #: ../AMC-gui-saisie_auto.glade:8 msgid "Please select all papers' scans" msgstr "தயவுசெய்து அனைத்து தாள்களின் அலகீடுகளையும் தோ்ந்தெடுக்கவும்" #: ../AMC-gui-saisie_auto.glade:10 msgid "Automatic data capture" msgstr "தானியக்க தரவு உள்ளீடு" #: ../AMC-gui-saisie_auto.glade:27 msgid "Proceed to data capture from scans with button OK" msgstr "அலகீடுகளிலிருந்து தரவு உள்ளீடைத் தொடர சாியை அழித்தவும்" #: ../AMC-gui-saisie_auto.glade:82 msgid "Copy to project directory (recommended)" msgstr "திட்டப்பணி அடைவிற்கு நகலெடு (பரிந்துரைக்கப்பட்டது)" #: ../AMC-gui-saisie_auto.glade:88 ../AMC-gui-saisie_auto.glade:89 msgid "Copy all scans to scans sub-directory in project directory" msgstr "" "திட்டப்பணி அடைவிலுள்ள அலகீடுகள் துணை-அடைவுக்கு எல்லா அலகீடுகளையும் " "நகலெடுக்கவும்" #: ../AMC-gui-saisie_auto.glade:156 msgid "" "Use this setting to be sure that the exam copy IDs allocated to the pages of" " the scans you selected will be consecutive numbers, in the same " "order as the pages." msgstr "" "நீங்கள் தோ்ந்தெடுத்த அலகீடுகளின் பக்கங்களுக்கு ஒதுக்கப்பட்ட பரீட்சை நகல் " "அடையாளங்கள் தொடா்ச்சியான எண்களாக இருக்கும் என்பதை உறுதிப்படுத்த இந்த " "அமைப்பைப் பயன்படுத்தவும், பக்கத்தைப்போல அதே வாிசையில்." #: ../AMC-gui-saisie_auto.glade:172 msgid "Options" msgstr "விருப்பங்கள்" #: ../AMC-gui-source_latex_choix.glade:8 msgid "Choose LaTeX source file" msgstr "LaTeX மூல கோப்பினைத் தொிவு செய்யவும்" #: ../AMC-gui-source_latex_choix_zip.glade:8 msgid "ZIP file choice" msgstr "ZIP கோப்பு தொிவு" #: ../AMC-gui-source_latex_dialog.glade:7 msgid "Choose LaTeX source" msgstr "LaTeX மூலத்தை தொிவு செய்யவும்" #: ../AMC-gui-source_latex_dialog.glade:62 msgid "" "A multiple choice project is mainly made of a source file, which describes the questionnaire.\n" "Please choose your situation:" msgstr "" "ஒரு பல தெரிவு திட்டப்பணியானது வினாத்தெகுப்பை வரையறுக்கும் மூலக் கோப்பால் உருவாக்கப்படுகிறது.\n" "தயவுசெய்து உங்கள் நிலைமையைத் தேர்ந்தெடுங்கள்:" #: ../AMC-gui-source_latex_dialog.glade:105 msgid "Template" msgstr "வார்ப்புரு" #: ../AMC-gui-source_latex_dialog.glade:119 msgid "" "You did not write any description of the questionnaire, and want to start " "from a template." msgstr "" "நீங்கள் எந்தவொரு வினாப்பட்டியல் விவரத்தையும் எழுதவில்லை, மற்றும் ஒரு " "வாா்ப்புருவிலிருந்து ஆரம்பிக்க விரும்புகிறீா்கள்." #: ../AMC-gui-source_latex_dialog.glade:171 msgid "File" msgstr "கோப்பு" #: ../AMC-gui-source_latex_dialog.glade:185 msgid "" "You already wrote a questionnaire description, and want to use it for this " "project." msgstr "" "நீங்கள் ஏற்கனவே எழுதிய ஒரு வினாப்பட்டியல் விவரத்தை இந்த திட்டப்பணிக்காக " "பயன்படுத்த விரும்புகிறீா்கள்." #: ../AMC-gui-source_latex_dialog.glade:237 msgid "Empty" msgstr "வெறுமை" #: ../AMC-gui-source_latex_dialog.glade:251 msgid "You want to write the description from zero." msgstr "நீங்கள் விளக்கத்தை சுழியத்திலிருந்து எழுத வேண்டும்." #: ../AMC-gui-source_latex_dialog.glade:303 msgid "Archive" msgstr "ஆவணக் காப்பகம்" #: ../AMC-gui-source_latex_dialog.glade:317 msgid "" "You have a .tgz or .zip file containing the questionnaire and " "other related stuff, coming from a third party software or a backup." msgstr "" "உங்களிடமுள்ள .tgz அல்லது .zip கோப்பு உள்ளடக்கியுள்ள " "வினாத்தொகுப்பு மற்றும் பிற தொடர்புடையனவைகள், ஒரு மூன்றாம் தரப்பு " "மென்பொருளிலிருந்து அல்லது ஒரு காப்புப்பிரதியிலிருந்து வந்துள்ளது." #: ../AMC-gui-source_latex_modele.glade:8 msgid "Template selection" msgstr "வாா்ப்புரு தோ்வு" #: ../AMC-gui-unrecognized.glade:8 msgid "Preprocess" msgstr "முன்செயலி" #: ../AMC-gui-unrecognized.glade:14 msgid "Delete" msgstr "அழி" #: ../AMC-gui-unrecognized.glade:29 msgid "Unrecognized scans" msgstr "அங்கீகாிக்கப்படாத அலகீடுகள்" #: ../AMC-gui-unrecognized.glade:71 msgid "Scans list" msgstr "அலகீடுகள் பட்டியல்" #: ../AMC-gui-unrecognized.glade:237 msgid "Original scan" msgstr "அசல் அலகீடு" #: ../AMC-gui-unrecognized.glade:266 msgid "Preprocessed" msgstr "முன்-பக்குவப்படுத்தப்பட்ட" #: ../AMC-perl/AMC/Gui/Association.glade:14 msgid "Manual association" msgstr "கைமுறைப் பெயாிணைப்பு" #. This is the label of the check button that controls wheter the auto- #. completion for students names will be made looking at the beginnig of the #. names or at the whole names. #: ../AMC-perl/AMC/Gui/Association.glade:84 msgid "beginning" msgstr "தொடக்கத்திலிருந்து" #: ../AMC-perl/AMC/Gui/Association.glade:89 msgid "Is auto-completion looking at the beginning of the names only?" msgstr "தானியக்க பெயாிணைப்பானது பெயா்களின் தொடக்கத்தை மட்டும் பாா்க்கவா?" #: ../AMC-perl/AMC/Gui/Association.glade:157 msgid "Show all" msgstr "அனைத்தையும் காட்டு" #: ../AMC-perl/AMC/Gui/Association.glade:361 msgid "associated" msgstr "இணைக்கப்பட்டது" #: ../AMC-perl/AMC/Gui/Association.glade:366 msgid "" "Unticking this box, you see only non-associated papers. Tick it to be able " "to check already associated papers." msgstr "" "இந்த கட்டம் குறியிடப்பட்டால், ஏற்கனவே பெயரிணைக்கப்பட்ட பதில்தாள்களை நீங்கள் " "சரிபார்க்க முடியும். இல்லையெனில், பெயரிணைக்கப்படாத பதில்தாள்களை மட்டுமே " "நீங்கள் பார்க்க முடியும்." #: ../AMC-perl/AMC/Gui/Association.glade:411 msgid "Remove manual association for this paper" msgstr "இந்த தாளிற்கு கைமுறைப் பெயாிணைப்பை நீக்கு" #: ../AMC-perl/AMC/Gui/Association.glade:427 msgid "" "Tell the system that this papers does not correspond to any of the students " "from the list." msgstr "" "இந்தத் தாள்கள் பட்டியலிலுள்ள எந்த மாணவருக்கும் தொடா்பில்லாதது என கணினிக்கு " "சொல்லுங்கள்." #: ../AMC-perl/AMC/Gui/Association.glade:449 msgid "Unknown" msgstr "தொியாதவை" #: ../AMC-perl/AMC/Gui/Association.glade:509 msgid "Save associations." msgstr "பெயாிணைப்புகளைச் சேமிக்க." #: ../AMC-perl/AMC/Gui/Manuel.glade:18 msgid "Paper data capture" msgstr "தாள் தரவு உள்ளீடு" #: ../AMC-perl/AMC/Gui/Manuel.glade:39 ../AMC-perl/AMC/Gui/Manuel.glade:236 msgid "Go to:" msgstr "செல்க:" #: ../AMC-perl/AMC/Gui/Manuel.glade:51 ../AMC-perl/AMC/Gui/Manuel.glade:248 msgid "" "Enter paper number, or page number like 102/4 (page 4 from paper 102), then " "press enter." msgstr "" "தாள் எண் மற்றும் பக்க எண்ணை (எ.கா. தாள் 102 ல் இருந்து பக்கம் 4) 102/4 " "உள்ளிட்டு, பின்னர் Enter பொத்தானை அழுத்தவும்." #: ../AMC-perl/AMC/Gui/Manuel.glade:82 msgid "Go to the previous page." msgstr "முந்தைய பக்கத்திற்குச் செல்க." #: ../AMC-perl/AMC/Gui/Manuel.glade:100 msgid "Quit" msgstr "வெளியேறு" #: ../AMC-perl/AMC/Gui/Manuel.glade:118 msgid "Go to next page." msgstr "அடுத்த பக்கத்திற்குச் செல்க." #: ../AMC-perl/AMC/Gui/Manuel.glade:282 msgid "Save this page modifications, then go to the previous page." msgstr "" "இந்தப் பக்கத்தின் மாற்றங்களைச் சேமித்து, முந்தைய பக்கத்திற்குச் செல்லவும்." #: ../AMC-perl/AMC/Gui/Manuel.glade:296 msgid "" "Choose if you want to navigate through all pages, through pages with invalid" " answers, or through pages with invalid or empty answers." msgstr "" "அனைத்து பக்கங்களினூடாக செல்ல அல்லது செல்லுபடியாகாத பக்கங்களினூடாக செல்ல " "அல்லது வெற்று மற்றும் செல்லுபடியாகாத பக்கங்களினூடாக செல்ல ஆகியவற்றில் " "ஒன்றைத் தொிவு செய்யவும்." #: ../AMC-perl/AMC/Gui/Manuel.glade:318 msgid "Save this page modifications, then go to next page." msgstr "" "இந்தப் பக்கத்தின் மாற்றங்களைச் சேமித்து, அடுத்த பக்கத்திற்குச் செல்லவும்." #: ../AMC-perl/AMC/Gui/Manuel.glade:344 msgid "Focus on question:" msgstr "கேள்வியைக் கவனிக்க:" #: ../AMC-perl/AMC/Gui/Manuel.glade:429 msgid "" "Remove manual modifications for this page. Automatic data capture for this " "page, if any, won't be changed." msgstr "" "இந்தப் பக்கத்தின் கைமுறை மாற்றங்களை நீக்கவும். இந்தப் பக்கத்தின் தானியக்க " "தரவு உள்ளீடை மாற்றக்கூடாது." #: ../AMC-perl/AMC/Gui/Manuel.glade:458 msgid "Cancel modifications for this page" msgstr "இந்தப் பக்கத்தின் மாற்றங்களை நீக்கவும்" #: ../AMC-perl/AMC/Gui/Manuel.glade:476 msgid "Save and quit" msgstr "சேமித்து வெளியேறு" #: ../AMC-perl/AMC/Gui/Zooms.glade:135 msgid "Unchecked boxes" msgstr "நிரப்பப்படாத கட்டங்கள்" #: ../AMC-perl/AMC/Gui/Zooms.glade:203 msgid "Checked boxes" msgstr "நிரப்பப்பட்ட கட்டங்கள்" #: ../AMC-perl/AMC/Gui/Zooms.glade:281 msgid "" "Toggle mode. With 'click', left-click to toggle and right-click to toggle a " "group." msgstr "" " இருநிலைமாற்றி பாணி. இருநிலைமாற்றிக்கு இடது பொத்தானையும் ஒரு குழுவில் " "இருநிலைமாற்றிக்கு வலது பொத்தானையும் சுட்டவும். " auto-multiple-choice-1.4.0/I18N/po-clean.pl000066400000000000000000000033121341176102400202550ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2010-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use Locale::PO; use Encode; use utf8; use Getopt::Long; my $comment_only=''; GetOptions("comment-only!"=>\$comment_only); my ($from,$to)=@ARGV; $v="1.4.0~beta1 (r:a488cdb)"; chomp($date=`date "+%Y-%m-%d %H:%M %z"`); my $aref = Locale::PO->load_file_asarray($from); my @ok=grep { $_->msgid() !~ /^\"?gtk-/ } @$aref; $ok[0]->comment(encode_utf8("Auto Multiple Choice\nCopyright 2008-2016 Alexis Bienvenue\nThis file is distributed under the same license as the AMC software")); if(!$comment_only) { $ok[0]->msgstr("Project-Id-Version: $v\n" . "Report-Msgid-Bugs-To: paamc\@passoire.fr\n" . "POT-Creation-Date: $date\n" . "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" . "Last-Translator: FULL NAME \n" . "Language-Team: LANGUAGE \n" . "MIME-Version: 1.0\n" . "Content-Type: text/plain; charset=CHARSET\n" . "Content-Transfer-Encoding: 8bit"); } Locale::PO->save_file_fromarray($to,\@ok); auto-multiple-choice-1.4.0/I18N/po-clean.pl.in000077500000000000000000000033271341176102400206730ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2010-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use Locale::PO; use Encode; use utf8; use Getopt::Long; my $comment_only=''; GetOptions("comment-only!"=>\$comment_only); my ($from,$to)=@ARGV; $v="@/PACKAGE_V_DEB/@ (@/PACKAGE_V_VC/@)"; chomp($date=`date "+%Y-%m-%d %H:%M %z"`); my $aref = Locale::PO->load_file_asarray($from); my @ok=grep { $_->msgid() !~ /^\"?gtk-/ } @$aref; $ok[0]->comment(encode_utf8("Auto Multiple Choice\nCopyright 2008-2016 Alexis Bienvenue\nThis file is distributed under the same license as the AMC software")); if(!$comment_only) { $ok[0]->msgstr("Project-Id-Version: $v\n" . "Report-Msgid-Bugs-To: paamc\@passoire.fr\n" . "POT-Creation-Date: $date\n" . "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" . "Last-Translator: FULL NAME \n" . "Language-Team: LANGUAGE \n" . "MIME-Version: 1.0\n" . "Content-Type: text/plain; charset=CHARSET\n" . "Content-Transfer-Encoding: 8bit"); } Locale::PO->save_file_fromarray($to,\@ok); auto-multiple-choice-1.4.0/Makefile000066400000000000000000000403671341176102400172160ustar00rootroot00000000000000# # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . # Loads separate configuration file include Makefile-all.conf PACKAGE_DEB_TARGET = unstable PACKAGE_DEB_DV ?= -1 # DATE/TIME to be substituted DATE_RPMCHL:=$(shell LC_TIME=en date +"%a %b %e %Y") DATE_DEBCHL:=$(shell LANG=en date "+%a, %d %b %Y %H:%M:%S %z") # list variables to be substituted in *.in files SUBST_VARS:=$(sort $(shell grep -h '=' $(SUB_MAKEFILES) | $(PERLPATH) -pe 's/\#.*//;s/\??\+?=.*//;' ) PACKAGE_DEB_DV PACKAGE_DEB_TARGET PERLPATH DATE_DEBCHL DATE_RPMCHL) SUBST_VARS_FOR_TEX = PACKAGE_V_STY PACKAGE_V_DEB # Some default values GCC ?= gcc GCC_PP ?= gcc CFLAGS ?= -O2 CXXFLAGS ?= -O2 # try to find right names for OpenCV libs ifeq ($(GCC_OPENCV_LIBS),auto) ifeq ($(shell echo 'int main(){}' | gcc -xc -lopencv_imgcodecs - && ( rm -f a.out ; echo "OK")),OK) GCC_OPENCV_LIBS:=-lopencv_core -lopencv_imgproc -lopencv_imgcodecs else ifeq ($(shell echo 'int main(){}' | gcc -xc -lopencv_core - && ( rm -f a.out ; echo "OK")),OK) GCC_OPENCV_LIBS:=-lopencv_core -lopencv_highgui -lopencv_imgproc else GCC_OPENCV_LIBS:=-lcv -lhighgui -lcxcore endif endif GCC_OPENCV ?= $(shell pkg-config --cflags opencv) GCC_OPENCV_LIBS ?= $(shell pkg-config --libs opencv) GCC_PDF ?= $(shell pkg-config --cflags --libs cairo pangocairo poppler-glib) GCC_POPPLER ?= $(shell pkg-config --cflags --libs poppler-glib gio-2.0) # SHELL=/bin/sh DESTDIR ?= # debug... print-%: FORCE @echo "$*=$($*)" # AMC components to build BINARIES ?= AMC-detect AMC-buildpdf AMC-pdfformfields MODS=AMC-*.pl GLADE_FROMIN:=$(basename $(wildcard AMC-gui-*.glade.in)) GLADE_SIMPLE:=$(filter-out $(GLADE_FROMIN),$(wildcard AMC-gui-*.glade)) GLADE=$(GLADE_FROMIN) $(GLADE_SIMPLE) STY=doc/sty/automultiplechoice.sty DTX=doc/sty/automultiplechoice.dtx MOS=$(wildcard I18N/lang/*.mo) LANGS=$(notdir $(basename $(MOS))) SUBMODS=$(notdir $(shell ls doc/modeles)) DOC_XML_IN=$(wildcard doc/auto-multiple-choice.*.in.xml) # list *.in files for @/VAR/@ substitution FROM_IN=auto-multiple-choice auto-multiple-choice.desktop $(GLADE_FROMIN) AMC-gui.pl AMC-latex-link.pl AMC-perl/AMC/Basic.pm doc/doc-xhtml-site.fr.xsl doc/doc-xhtml-site.ja.xsl doc/doc-xhtml-site.en.xsl doc/amcdocstyle.sty doc/doc-xhtml.xsl $(DOC_XML_IN:.in.xml=.xml) $(DTX) # Is this a precomp tarball? If so, the PRECOMP file is present. PRECOMP_FLAG_FILE=PRECOMP PRECOMP_ARCHIVE:=$(wildcard $(PRECOMP_FLAG_FILE)) MAIN_LOGO=icons/auto-multiple-choice # Sets user and group flags for install command ifeq ($(INSTALL_USER),) else USER_GROUP = -o $(INSTALL_USER) endif ifeq ($(INSTALL_GROUP),) else USER_GROUP += -g $(INSTALL_GROUP) endif # Target switch (precomp archive or not) ifeq ($(PRECOMP_ARCHIVE),) all: $(MAKE) $(FROM_IN) $(MAKE) $(BINARIES) $(MAIN_LOGO).xpm $(MAIN_LOGO).svgz doc I18N chmod a+x auto-multiple-choice else all: all_precomp chmod a+x auto-multiple-choice endif all_precomp: $(MAKE) $(FROM_IN) $(MAKE) $(BINARIES) MAJ: $(FROM_IN) ; # Binaries AMC-detect: AMC-detect.cc Makefile $(GCC_PP) -o $@ $< $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(CXXLDFLAGS) -lstdc++ -lm $(GCC_OPENCV) $(GCC_OPENCV_LIBS) AMC-buildpdf: AMC-buildpdf.cc buildpdf.cc Makefile $(GCC_PP) -o $@ $< $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(CXXLDFLAGS) -lstdc++ -lm $(GCC_PDF) $(GCC_OPENCV) $(GCC_OPENCV_LIBS) AMC-pdfformfields: pdfformfields.c Makefile $(GCC_PP) -o $@ $< $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(CXXLDFLAGS) -lstdc++ -lm $(GCC_POPPLER) rebuild: FORCE $(MAKE) $(BINARIES) -W Makefile # substitution in *.in files vars-subs.pl: $(SUB_MAKEFILES) authors-subs.xsl authors.xml @echo "Recording substitution variables from $(SUB_MAKEFILES)" $(file > $@,# Variables:) $(foreach varname,$(SUBST_VARS), $(file >> $@,s|@/$(varname)/@|$($(varname))|g;) ) $(foreach varname,$(SUBST_VARS_FOR_TEX), $(file >> $@,s|@/$(varname)_TEX/@|$(subst ~,\\string~,$($(varname)))|g;) ) $(file >> $@,s+/usr/share/xml/docbook/schema/dtd/4.5/docbookx.dtd+$(DOCBOOK_DTD)+g;) $(file >> $@,# From authors.xml:) xsltproc --nonet authors-subs.xsl authors.xml >> $@ %.xml: %.in.xml vars-subs.pl $(PERLPATH) -p vars-subs.pl $< > $@ %: %.in vars-subs.pl $(PERLPATH) -p vars-subs.pl $< > $@ # some components doc: $(MAKE) -C doc $(MAKE) -C doc/sty I18N: $(MAKE) -C I18N sync: $(MAKE) -C download-area all # Individual rules %.ps: %.dvi dvips $< -o $@ %.ppm: %.ps convert -density 300 $< $*-%03d.ppm %.png: %.svg rsvg-convert -w 32 -h 32 $< -o $@ %.xpm: %.png pngtopnm $< | ppmtoxpm > $@ $(MAIN_LOGO).svgz: $(MAIN_LOGO).svg gzip -k -S z $< $(foreach SIZE, $(APPICONSIZES), rsvg-convert -a -w $(SIZE) -h $(SIZE) $< -o $(MAIN_LOGO)-$(SIZE).png ;) # CLEAN clean_IN: FORCE rm -rf debian/auto-multiple-choice rm -f local/deb-auto-changelog rm -f $(FROM_IN) # When we are inside an extracted dist tarball, 'clean' will only remove the # files that did not come with in the dist tarball (we keep Makefile.versions # and doc/ for example). Otherwise, we remove everything. clean: clean_IN $(if $(PRECOMP_ARCHIVE),,distclean) -rm -f $(BINARIES) -rm -f vars-subs.pl distclean: clean_IN clean -rm -f $(MAIN_LOGO).xpm $(MAIN_LOGO).svgz $(MAIN_LOGO)-*.png -rm -f auto-multiple-choice.spec $(MAKE) -C doc/sty clean $(MAKE) -C doc clean $(MAKE) -C I18N clean # INSTALL install_lang_%: FORCE install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(LOCALEDIR)/$*/LC_MESSAGES install -m 0644 $(USER_GROUP) I18N/lang/$*.mo $(DESTDIR)/$(LOCALEDIR)/$*/LC_MESSAGES/auto-multiple-choice.mo install_lang: $(addprefix install_lang_,$(LANGS)) ; install_models_%: FORCE install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(MODELSDIR)/$* -install -m 0644 $(USER_GROUP) doc/modeles/$*/*.tgz $(DESTDIR)/$(MODELSDIR)/$* -install -m 0644 $(USER_GROUP) doc/modeles/$*/*.xml $(DESTDIR)/$(MODELSDIR)/$* install_models: $(addprefix install_models_,$(SUBMODS)) ; install_nodoc: install_lang install_models FORCE ifneq ($(SYSTEM_TYPE),deb) # with debian, done with dh_installmime ifneq ($(SHARED_MIMEINFO_DIR),) install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(SHARED_MIMEINFO_DIR) install -m 0644 $(USER_GROUP) interfaces/auto-multiple-choice.xml $(DESTDIR)/$(SHARED_MIMEINFO_DIR) endif endif ifneq ($(LANG_GTKSOURCEVIEW_DIR),) install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(LANG_GTKSOURCEVIEW_DIR) install -m 0644 $(USER_GROUP) interfaces/amc-txt.lang $(DESTDIR)/$(LANG_GTKSOURCEVIEW_DIR) endif install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(MODSDIR) install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(MODSDIR)/perl install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(MODSDIR)/exec install -m 0755 $(USER_GROUP) $(MODS) $(DESTDIR)/$(MODSDIR)/perl install -m 0755 $(USER_GROUP) $(BINARIES) $(DESTDIR)/$(MODSDIR)/exec install -m 0644 $(USER_GROUP) $(GLADE) $(DESTDIR)/$(MODSDIR)/perl install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(TEXDIR) install -m 0644 $(USER_GROUP) $(STY) $(DESTDIR)/$(TEXDIR) ifneq ($(DESKTOPDIR),) install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(DESKTOPDIR) install -m 0644 $(USER_GROUP) -T auto-multiple-choice.desktop $(DESTDIR)/$(DESKTOPDIR)/auto-multiple-choice.desktop endif install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(BINDIR) install -m 0755 $(USER_GROUP) auto-multiple-choice $(DESTDIR)/$(BINDIR) install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(ICONSDIR) install -m 0644 $(USER_GROUP) icons/*.svg $(DESTDIR)/$(ICONSDIR) ifneq ($(APPICONDIR),) install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(APPICONDIR)/scalable/apps install -m 0644 $(USER_GROUP) $(MAIN_LOGO).svgz $(DESTDIR)/$(APPICONDIR)/scalable/apps $(foreach SIZE, $(APPICONSIZES),\ install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(APPICONDIR)/$(SIZE)x$(SIZE)/apps ; \ install -m 0644 $(USER_GROUP) -T $(MAIN_LOGO)-$(SIZE).png $(DESTDIR)/$(APPICONDIR)/$(SIZE)x$(SIZE)/apps/auto-multiple-choice.png ; ) endif ifneq ($(PIXDIR),) install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(PIXDIR) install -m 0644 $(USER_GROUP) -T $(MAIN_LOGO).xpm $(DESTDIR)/$(PIXDIR)/auto-multiple-choice.xpm endif install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(PERLDIR)/AMC install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(PERLDIR)/AMC/Export install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(PERLDIR)/AMC/Export/register install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(PERLDIR)/AMC/Filter install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(PERLDIR)/AMC/Filter/register install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(PERLDIR)/AMC/DataModule install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(PERLDIR)/AMC/Gui install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(PERLDIR)/AMC/Print install -m 0644 $(USER_GROUP) AMC-perl/AMC/*.pm $(DESTDIR)/$(PERLDIR)/AMC install -m 0644 $(USER_GROUP) AMC-perl/AMC/Export/*.pm $(DESTDIR)/$(PERLDIR)/AMC/Export install -m 0644 $(USER_GROUP) AMC-perl/AMC/Export/register/*.pm $(DESTDIR)/$(PERLDIR)/AMC/Export/register install -m 0644 $(USER_GROUP) AMC-perl/AMC/Filter/*.pm $(DESTDIR)/$(PERLDIR)/AMC/Filter install -m 0644 $(USER_GROUP) AMC-perl/AMC/Filter/register/*.pm $(DESTDIR)/$(PERLDIR)/AMC/Filter/register install -m 0644 $(USER_GROUP) AMC-perl/AMC/DataModule/*.pm $(DESTDIR)/$(PERLDIR)/AMC/DataModule install -m 0644 $(USER_GROUP) AMC-perl/AMC/Gui/*.pm $(DESTDIR)/$(PERLDIR)/AMC/Gui install -m 0644 $(USER_GROUP) AMC-perl/AMC/Gui/*.glade $(DESTDIR)/$(PERLDIR)/AMC/Gui install -m 0644 $(USER_GROUP) AMC-perl/AMC/Print/*.pm $(DESTDIR)/$(PERLDIR)/AMC/Print install_doc: FORCE @echo "Installing doc..." ifneq ($(TEXDOCDIR),) install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(TEXDOCDIR) install -m 0644 $(USER_GROUP) doc/sty/*.pdf doc/sty/*.tex $(DESTDIR)/$(TEXDOCDIR) endif ifneq ($(SYSTEM_TYPE),deb) # with debian, done with dh_install{doc,man} install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(DOCDIR) install -m 0644 $(USER_GROUP) $(wildcard doc/auto-multiple-choice.??.xml doc/auto-multiple-choice.??.pdf) $(DESTDIR)/$(DOCDIR) cp -r doc/html $(DESTDIR)/$(DOCDIR) ifeq ($(INSTALL_USER),) else chown -hR $(INSTALL_USER) $(DESTDIR)/$(DOCDIR) endif ifeq ($(INSTALL_GROUP),) else chgrp -hR $(INSTALL_GROUP) $(DESTDIR)/$(DOCDIR) endif install -d -m 0755 $(USER_GROUP) $(DESTDIR)/$(MAN1DIR) install -m 0644 $(USER_GROUP) doc/*.1 $(DESTDIR)/$(MAN1DIR) endif install: install_nodoc install_doc ; # Test manual-test: $(MAKE) -C tests test ############################################################################## # Following lines are only helpfull for source tarball and package building # These targets run only with source from git checkout ############################################################################## LOCALDIR=$(shell pwd) global: FORCE $(MAKE) -C I18N global LOCALEDIR=$(LOCALEDIR) LOCALDIR=$(LOCALDIR) -sudo rm /usr/share/perl5/AMC $(ICONSDIR) /usr/share/doc/auto-multiple-choice /usr/share/doc/auto-multiple-choice-doc $(LOCALEDIR)/fr/LC_MESSAGES/auto-multiple-choice.mo $(DESKTOPDIR)/auto-multiple-choice.desktop $(MODELSDIR) /usr/bin/auto-multiple-choice $(TEXDIR)/automultiplechoice.sty $(SHARED_MIMEINFO_DIR)/auto-multiple-choice.xml $(LANG_GTKSOURCEVIEW_DIR)/amc-txt.lang $(APPICONDIR)/auto-multiple-choice.svgz -sudo rm -r /usr/lib/AMC local: global $(MAKE) -C I18N local LOCALEDIR=$(LOCALEDIR) LOCALDIR=$(LOCALDIR) test -d /usr/lib/AMC || sudo mkdir -p /usr/lib/AMC test -d /usr/lib/AMC/perl || sudo mkdir -p /usr/lib/AMC/perl test -d /usr/lib/AMC/exec || sudo mkdir -p /usr/lib/AMC/exec test -d /usr/share/auto-multiple-choice || sudo mkdir -p /usr/share/auto-multiple-choice test -d $(TEXDIR) || sudo mkdir $(TEXDIR) sudo ln -s $(LOCALDIR)/AMC-perl/AMC /usr/share/perl5/AMC sudo ln -s $(LOCALDIR)/AMC-detect /usr/lib/AMC/exec/AMC-detect sudo ln -s $(LOCALDIR)/AMC-buildpdf /usr/lib/AMC/exec/AMC-buildpdf sudo ln -s $(LOCALDIR)/AMC-pdfformfields /usr/lib/AMC/exec/AMC-pdfformfields sudo ln -s $(LOCALDIR)/AMC-*.pl $(LOCALDIR)/AMC-*.glade /usr/lib/AMC/perl sudo ln -s $(LOCALDIR)/auto-multiple-choice /usr/bin sudo ln -s $(LOCALDIR)/icons $(ICONSDIR) sudo ln -s $(LOCALDIR)/doc /usr/share/doc/auto-multiple-choice-doc sudo ln -s $(LOCALDIR)/auto-multiple-choice.desktop $(DESKTOPDIR)/auto-multiple-choice.desktop sudo ln -s $(LOCALDIR)/doc/modeles $(MODELSDIR) sudo ln -s $(LOCALDIR)/$(STY) $(TEXDIR)/automultiplechoice.sty sudo ln -s $(LOCALDIR)/interfaces/amc-txt.lang $(LANG_GTKSOURCEVIEW_DIR) sudo ln -s $(LOCALDIR)/interfaces/auto-multiple-choice.xml $(SHARED_MIMEINFO_DIR) sudo ln -s $(LOCALDIR)/$(MAIN_LOGO).svgz $(APPICONDIR) ifdef DEBSIGN_KEY DEBSIGN=-k$(DEBSIGN_KEY) else DEBSIGN=--no-sign endif BUILDOPTS=-I.svn -Idownload_area -Ilocal $(DEBSIGN) TMP_DIR=tmp SOURCE_DIR=auto-multiple-choice-$(PACKAGE_V_DEB) TMP_SOURCE_DIR=$(TMP_DIR)/$(SOURCE_DIR) TARBALLS_DIR=tarballs ORIG_SOURCES=$(TMP_DIR)/auto-multiple-choice_$(PACKAGE_V_DEB).orig.tar.gz SRC_EXCL=--exclude debian '--exclude=*~' --exclude .hgignore --exclude .hgtags --exclude .gitignore --exclude .gitlab-ci.yml version_files: $(PERLPATH) local/versions.pl $(MAKE) auto-multiple-choice.spec tmp_copy: rm -rf $(TMP_SOURCE_DIR) mkdir $(TMP_SOURCE_DIR) rsync -aC --exclude '*~' --exclude .hg --exclude .git --exclude .gitlab-ci.yml --exclude download_area --exclude local --exclude tmp --exclude tarballs . $(TMP_SOURCE_DIR) $(MAKE) -C $(TMP_SOURCE_DIR) clean portable_vok: $(eval TMP_PORTABLE:=$(shell mktemp -d /tmp/portable.XXXXXXXXXX)) $(MAKE) tmp_copy make AMCCONF=portable INSTREP=$(TMP_PORTABLE)/AMC -C $(TMP_SOURCE_DIR) make AMCCONF=portable INSTREP=$(TMP_PORTABLE)/AMC -C $(TMP_SOURCE_DIR) install cd $(TMP_PORTABLE) ; tar cvzf auto-multiple-choice_$(PACKAGE_V_DEB)_portable.tar.gz $(SRC_EXCL) AMC mv $(TMP_PORTABLE)/auto-multiple-choice_$(PACKAGE_V_DEB)_portable.tar.gz $(TARBALLS_DIR) rm -rf $(TMP_PORTABLE) ssources_vok: $(MAKE) tmp_copy cd $(TMP_DIR) ; tar cvzf auto-multiple-choice_$(PACKAGE_V_DEB)_sources.tar.gz $(SRC_EXCL) $(SOURCE_DIR) rm -rf $(TMP_SOURCE_DIR) sources_vok: $(MAKE) tmp_copy cd $(TMP_DIR) ; tar cvzf auto-multiple-choice_$(PACKAGE_V_DEB)_sources.tar.gz $(SRC_EXCL) $(SOURCE_DIR) $(MAKE) -C $(TMP_SOURCE_DIR) MAJ $(MAKE) -C $(TMP_SOURCE_DIR) $(MAIN_LOGO).xpm $(MAIN_LOGO).svgz I18N doc $(MAKE) -C $(TMP_SOURCE_DIR) clean_IN $(MAKE) -C $(TMP_SOURCE_DIR) auto-multiple-choice.spec touch $(TMP_SOURCE_DIR)/$(PRECOMP_FLAG_FILE) cd $(TMP_DIR) ; tar cvzf auto-multiple-choice_$(PACKAGE_V_DEB)_precomp.tar.gz $(SRC_EXCL) $(SOURCE_DIR) mv $(TMP_DIR)/auto-multiple-choice_$(PACKAGE_V_DEB)_*.tar.gz $(TARBALLS_DIR) rm -rf $(TMP_SOURCE_DIR) tmp_deb: $(MAKE) local/deb-auto-changelog $(MAKE) tmp_copy cd $(TMP_SOURCE_DIR) ; cp -r ppa debian cp local/deb-auto-changelog $(TMP_SOURCE_DIR)/debian/changelog $(PERLPATH) -pi -e 's/^DL=.*/DL=$(SRC_DOC_LANG)/' $(TMP_SOURCE_DIR)/debian/rules ifneq (,$(SKIP_DEP)) $(foreach onedep,$(SKIP_DEP),$(PERLPATH) -pi -e 's/(,\s*$(onedep)|$(onedep),)//' $(TMP_SOURCE_DIR)/debian/control) endif ifneq (,$(ADD_BUILD_DEP)) $(foreach onedep,$(ADD_BUILD_DEP),$(PERLPATH) -pi -e 's/(?<=Build-Depends: )/$(onedep), /' $(TMP_SOURCE_DIR)/debian/control) endif debsrc_vok: ssources tmp_deb test -f $(ORIG_SOURCES) || cp $(TMP_DIR)/auto-multiple-choice_$(PACKAGE_V_DEB)_sources.tar.gz $(ORIG_SOURCES) cd $(TMP_SOURCE_DIR) ; dpkg-buildpackage -S $(BUILDOPTS) $(MORE_BUILDOPTS) rm -rf $(TMP_SOURCE_DIR) deb_vok: tmp_deb cd $(TMP_SOURCE_DIR) ; dpkg-buildpackage -b $(BUILDOPTS) $(MORE_BUILDOPTS) rm -rf $(TMP_SOURCE_DIR) # % : make sure version_files are rebuilt before calling target %_vok $(foreach key,deb debsrc sources ssources portable,$(eval $(key): clean version_files ; $$(MAKE) $(key)_vok)) # debian repository unstable: $(MAKE) -C download_area unstable sync re_unstable: $(MAKE) -C download_area re_unstable sync FORCE: ; .PHONY: all all_precomp install version_files deb deb_vok debsrc debsrc_vok sources sources_vok clean clean_IN global local doc I18N tmp_copy tmp_deb unstable re_unstable FORCE MAJ manual-test auto-multiple-choice-1.4.0/Makefile-all.conf000066400000000000000000000020721341176102400206770ustar00rootroot00000000000000# # Copyright (C) 2015-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . # Loads separate configuration files TOP_DIR := $(dir $(lastword $(MAKEFILE_LIST))) ifneq ($(AMCCONF),) AMCCONFFILE = $(TOP_DIR)Makefile-$(AMCCONF).conf endif SUB_MAKEFILES=$(wildcard $(TOP_DIR)Makefile.versions $(TOP_DIR)Makefile.conf $(AMCCONFFILE)) include $(SUB_MAKEFILES) PERLPATH ?= /usr/bin/perl auto-multiple-choice-1.4.0/Makefile-brew.conf000066400000000000000000000075621341176102400210770ustar00rootroot00000000000000# -*- makefile -*- # # Copyright (C) 2011-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . # SYSTEM FOR INSTALLATION SYSTEM_TYPE = brew # Inside the Homebrew formula, it is recommanded to pass the following vars: # - PREFIX (the formula's private prefix) # - PERLPATH is the path to the perl binary installed by Homebrew # - DOCBOOK_MAN_XSL should point to Homebrew's docbook-xsl # - DOCBOOK_XHTML_XSL # - DOCBOOK_DTD should point to Homebrew's docbook ifndef PREFIX $(error PREFIX must be set by hand for Homebrew as every formula has his own private PREFIX.) endif # If LATEX_FREE is set, the only thing that will change is that when launching # AMC, it will check if you have latex and that automultiplechoice.sty is # reachable. LATEX_FREE = 1 # The PERLPATH must be Homebrew's Perl, not the system one (too old). PERLPATH = /usr/local/opt/perl/bin/perl # This variable allows us to tell where the opencv and netpbm libraries are. LIBS_PREFIX = /usr/local CFLAGS = -O2 -I$(LIBS_PREFIX)/include -I. -DNEEDS_GETLINE CXXFLAGS = -O2 -I$(LIBS_PREFIX)/include -I. -DNEEDS_GETLINE LDFLAGS += -L$(LIBS_PREFIX)/lib # INSTALLATION : where to install parts of the package ? # directory for executable BINDIR=$(PREFIX)/bin # directory for perl modules PERLDIR=$(PREFIX)/libexec/lib/perl5 # directory for some AMC executables, not to be used by end-user MODSDIR=$(PREFIX)/lib/AMC # directory for LaTeX style file TEXDIR=$(PREFIX)/share/texmf-local/tex/latex/AMC # directory for LaTeX doc TEXDOCDIR=$(PREFIX)/share/texmf-local/doc/latex/AMC/ # directory for man (1) files MAN1DIR=$(PREFIX)/share/man/man1 # directory for desktop file DESKTOPDIR= # directory for icons (svg) ICONSDIR=$(PREFIX)/share/auto-multiple-choice/icons # directory for the main (svg) icon APPICONDIR= # directory for icons (xpm) PIXDIR= # directory for locales (MO files will be put in # $(LOCALEDIR)/fr/LC_MESSAGES for example) LOCALEDIR=$(PREFIX)/share/locale # directory for AMC packaged models MODELSDIR=$(PREFIX)/share/auto-multiple-choice/models # directory for documentation (will use html/auto-multiple-choice.* subdirs for HTML docs) DOCDIR=$(PREFIX)/share/doc/auto-multiple-choice # No syntax highlighting gor gedit SHARED_MIMEINFO_DIR= LANG_GTKSOURCEVIEW_DIR= # BUILD : where to find some files used for building AMC ? # URLs can be used if XML catalogs are present. #DOCBOOK_MAN_XSL=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl DOCBOOK_MAN_XSL = /usr/local/opt/docbook-xsl/docbook-xsl/manpages/docbook.xsl #DOCBOOK_XHTML_XSL=/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/chunk.xsl DOCBOOK_XHTML_XSL = /usr/local/opt/docbook-xsl/docbook-xsl/xhtml/chunk.xsl #DOCBOOK_DTD=/usr/share/xml/docbook/schema/dtd/4.5/docbookx.dtd DOCBOOK_DTD = /usr/local/opt/docbook/docbook/xml/4.5/docbookx.dtd # BUILD : options to compile with netpbm / opencv libraries GCC_NETPBM=-I$(LIBS_PREFIX)/include/netpbm -lnetpbm GCC_OPENCV = -I$(LIBS_PREFIX)/include/opencv GCC_OPENCV_LIBS = -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs # INFO IN DESKTOP FILE DESKTOP_CAT=Education; # INSTALL USER AND GROUP INSTALL_USER= INSTALL_GROUP= TAR_REPRODUCIBLE_ARGS=nonreproducible GZIP_REPRODUCIBLE_ARGS= SKIP_REPRODUCIBLE_PDF=1 auto-multiple-choice-1.4.0/Makefile-macports.conf000066400000000000000000000062211341176102400217570ustar00rootroot00000000000000# -*- makefile -*- # # Copyright (C) 2011-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . # SYSTEM FOR INSTALLATION SYSTEM_TYPE ?= macports BASEPATH ?= /opt/local LATEX_FREE ?= 0 PERLPATH=$(BASEPATH)/bin/perl CFLAGS = -O2 -I$(BASEPATH)/include -I. -DNEEDS_GETLINE CXXFLAGS = -O2 -I$(BASEPATH)/include -I. -DNEEDS_GETLINE LDFLAGS += -L$(BASEPATH)/lib # INSTALLATION : where to install parts of the package ? # directory for executable BINDIR=$(BASEPATH)/bin # directory for perl modules PERLDIR=$(PERLVENDORLIB) # directory for some AMC executables, not to be used by end-user MODSDIR=$(BASEPATH)/lib/AMC # directory for LaTeX style file TEXDIR=$(BASEPATH)/share/texmf-local/tex/latex/AMC # directory for LaTeX doc TEXDOCDIR=$(BASEPATH)/share/texmf-local/doc/latex/AMC/ # directory for man (1) files MAN1DIR=$(BASEPATH)/share/man/man1 # directory for desktop file DESKTOPDIR= # directory for icons (svg) ICONSDIR=$(BASEPATH)/share/auto-multiple-choice/icons # directory for the main (svg) icon APPICONDIR= # directory for icons (xpm) PIXDIR= # directory for locales (MO files will be put in # $(LOCALEDIR)/fr/LC_MESSAGES for example) LOCALEDIR=$(BASEPATH)/share/locale # directory for AMC packaged models MODELSDIR=$(BASEPATH)/share/auto-multiple-choice/models # directory for documentation (will use html/auto-multiple-choice.* subdirs for HTML docs) DOCDIR=$(BASEPATH)/share/doc/auto-multiple-choice # No syntax highlighting gor gedit SHARED_MIMEINFO_DIR= LANG_GTKSOURCEVIEW_DIR= # BUILD : where to find some files used for building AMC ? # URLs can be used if XML catalogs are present. #DOCBOOK_MAN_XSL=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl DOCBOOK_MAN_XSL=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl #DOCBOOK_XHTML_XSL=/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/chunk.xsl DOCBOOK_XHTML_XSL=http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl #DOCBOOK_DTD=/usr/share/xml/docbook/schema/dtd/4.5/docbookx.dtd DOCBOOK_DTD=http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd # BUILD : options to compile with netpbm / opencv libraries GCC_NETPBM=-I$(BASEPATH)/include/netpbm -lnetpbm GCC_OPENCV = -I$(BASEPATH)/include/opencv GCC_OPENCV_LIBS = -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs # INFO IN DESKTOP FILE DESKTOP_CAT=Education; # INSTALL USER AND GROUP INSTALL_USER= INSTALL_GROUP= TAR_REPRODUCIBLE_ARGS=nonreproducible GZIP_REPRODUCIBLE_ARGS= SKIP_REPRODUCIBLE_PDF=1 auto-multiple-choice-1.4.0/Makefile-portable.conf000066400000000000000000000053761341176102400217510ustar00rootroot00000000000000# -*- makefile -*- # # Copyright (C) 2011-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . # SYSTEM FOR INSTALLATION SYSTEM_TYPE ?= portable LATEX_FREE=0 INSTREP ?= /tmp/AMC # INSTALLATION : where to install parts of the package ? # directory for executable BINDIR=$(INSTREP)/bin # directory for perl modules PERLDIR=$(INSTREP)/perl # directory for some AMC executables, not to be used by end-user MODSDIR=$(INSTREP)/lib # directory for LaTeX style file TEXDIR=$(INSTREP)/latex # directory for LaTeX doc TEXDOCDIR=$(INSTREP)/doc # directory for man (1) files MAN1DIR=$(INSTREP)/doc/man/man1 # directory for desktop file DESKTOPDIR=$(INSTREP)/applications # directory for icons (svg) ICONSDIR=$(INSTREP)/icons # directory for the main (svg) icon APPICONDIR= # directory for icons (xpm) PIXDIR=$(INSTREP)/icons # directory for locales (MO files will be put in # $(LOCALEDIR)/fr/LC_MESSAGES for example) LOCALEDIR=$(INSTREP)/locale # directory for AMC packaged models MODELSDIR=$(INSTREP)/models # directory for documentation (will use html/auto-multiple-choice.* subdirs for HTML docs) DOCDIR=$(INSTREP)/doc/auto-multiple-choice # BUILD : where to find some files used for building AMC ? # URLs can be used if XML catalogs are present. #DOCBOOK_MAN_XSL=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl DOCBOOK_MAN_XSL=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl #DOCBOOK_XHTML_XSL=/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/chunk.xsl DOCBOOK_XHTML_XSL=http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl #DOCBOOK_DTD=/usr/share/xml/docbook/schema/dtd/4.5/docbookx.dtd DOCBOOK_DTD=http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd # No syntax highlighting gor gedit SHARED_MIMEINFO_DIR= LANG_GTKSOURCEVIEW_DIR= # BUILD : options to compile with netpbm / opencv libraries #CFLAGS=-O2 -m32 -march=i386 #CXXFLAGS=-O2 -m32 -march=i386 GCC_NETPBM=-lnetpbm GCC_OPENCV=-I /usr/include/opencv -lcv -lhighgui -lcxcore # INFO IN DESKTOP FILE DESKTOP_CAT=Education; # INSTALL USER AND GROUP INSTALL_USER= INSTALL_GROUP= auto-multiple-choice-1.4.0/Makefile.conf000066400000000000000000000065471341176102400201440ustar00rootroot00000000000000# -*- makefile -*- # # Copyright (C) 2010-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . # SYSTEM FOR INSTALLATION SYSTEM_TYPE ?= debian # If TEXDIR is in LaTeX search dirs, set this to 0. If the user is # allowd to install any LaTeX variant, with texmf trees somewhere we # can't know, set this to 1. LATEX_FREE=0 # INSTALLATION : where to install parts of the package ? # directory for executable BINDIR=/usr/bin # directory for perl modules PERLDIR=/usr/share/perl5 # directory for some AMC executables, not to be used by end-user MODSDIR=/usr/lib/AMC # directory for LaTeX style file TEXDIR=/usr/share/texmf/tex/latex/AMC # directory for LaTeX doc TEXDOCDIR=/usr/share/doc/texmf/AMC/ # directory for man (1) files MAN1DIR=/usr/share/man/man1 # directory for desktop file DESKTOPDIR=/usr/share/applications # directory for icons (svg) ICONSDIR=/usr/share/auto-multiple-choice/icons # directory for the main (svg) icon APPICONDIR=/usr/share/icons/hicolor # sizes for the application icon APPICONSIZES= 16 22 24 32 48 256 512 # directory for icons (xpm) PIXDIR= # directory for locales (MO files will be put in # $(LOCALEDIR)/fr/LC_MESSAGES for example) LOCALEDIR=/usr/share/locale # directory for AMC packaged models MODELSDIR=/usr/share/auto-multiple-choice/models # directory for documentation (will use html/auto-multiple-choice.* subdirs for HTML docs) DOCDIR=/usr/share/doc/auto-multiple-choice # directory for Shared MIME-info Database SHARED_MIMEINFO_DIR=/usr/share/mime/packages # directory for gtksourceview/gedit languages highlighting syntax LANG_GTKSOURCEVIEW_DIR=/usr/share/gtksourceview-3.0/language-specs # BUILD : where to find some files used for building AMC ? # URLs can be used if XML catalogs are present. #DOCBOOK_MAN_XSL=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl DOCBOOK_MAN_XSL=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl #DOCBOOK_XHTML_XSL=/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/chunk.xsl DOCBOOK_XHTML_XSL=http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl #DOCBOOK_DTD=/usr/share/xml/docbook/schema/dtd/4.5/docbookx.dtd DOCBOOK_DTD=http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd # BUILD : options to compile with netpbm / opencv libraries GCC_NETPBM=-lnetpbm # INFO IN DESKTOP FILE DESKTOP_CAT=Education; # args to use with tar for a reproducible build. In some systems, # these arguments are not available with tar: use an empty # TAR_REPRODUCIBLE_ARGS TAR_REPRODUCIBLE_ARGS=--owner=root --group=root --numeric-owner --mtime=@1451602800 # same for gzip GZIP_REPRODUCIBLE_ARGS=-n # INSTALL USER AND GROUP ifneq ($(SYSTEM_TYPE),rpm) INSTALL_USER=root INSTALL_GROUP=root endif auto-multiple-choice-1.4.0/Makefile.versions000066400000000000000000000002561341176102400210560ustar00rootroot00000000000000PACKAGE_V_DEB=1.4.0 PACKAGE_V_VC=r:c6041a1 PACKAGE_V_PDFDATE=20181229000000 PACKAGE_V_ISODATE=2018-12-29 PACKAGE_V_STY=2018/12/29 v1.4.0 r:c6041a1 PACKAGE_V_EPOCH=1546041600 auto-multiple-choice-1.4.0/README000066400000000000000000000005221341176102400164230ustar00rootroot00000000000000To install AMC from the development tree: # clone the repository on your machine git clone https://gitlab.com/jojo_boulix/auto-multiple-choice.git cd auto-multiple-choice # Check for dependencies (you can find them as debian packages in # Build-Depends from ppa/control) # build make version_files make # install sudo make install auto-multiple-choice-1.4.0/README.md000066400000000000000000000026631341176102400170320ustar00rootroot00000000000000## Overview Auto Multiple Choice is a piece of software that can help you create and manage [multiple choice] questionnaires (MCQ), with automated marking. AMC is a free software, distributed under the [GPLv2+] license. ### Features #### LaTeX formatting Answers sheets are formatted with [LaTeX], allowing mathematical formulas and many other potential uses. #### Shuffled questions and answers AMC allows to shuffle randomly questions and answers within each question, so that each answer sheet is unique. Using this feature, it is more difficult for students to copy on their neighbour's sheets. #### Automated marking from completed answers sheets scans After the exam, AMC can mark the scanned answers sheets using its in-built Optical Mark Recognition (OMR). Without any scanner, or for sheets for which automated marking is not efficient, manual computer-aided data capture is available. One just has to click on boxes that are ticked on the completed sheets. #### Marking Even if a default scoring strategy is defined, very fine customisation is available for each question. AMC then outputs an OpenDocument sheet (for use with [LibreOffice.org] or [OpenOffice.org]) with all the results. [multiple choice]:http://en.wikipedia.org/wiki/Multiple_choice [GPLv2+]:http://www.gnu.org/licenses/old-licenses/gpl-2.0.html [LaTeX]:http://en.wikipedia.org/wiki/LaTeX [LibreOffice.org]:http://libreoffice.org/ [OpenOffice.org]:http://openoffice.org/ auto-multiple-choice-1.4.0/authors-subs.xsl000066400000000000000000000026501341176102400207360ustar00rootroot00000000000000 s|@/CREATORS/@| |; s|@/AUTHORS/@| |; s|@/TRANSLATORS/@| |; s|@/DOCUMENTERS/@| |; auto-multiple-choice-1.4.0/authors.xml000066400000000000000000000024131341176102400177530ustar00rootroot00000000000000 Alexis Bienvenüe Benjamin Abel Hatim Alahmadi Andrés Alvarado Jean Bérard Balaganesh Boomiraja Frédéric Bréal Mónico Briseño Pedro Cruz Hiroto Kagotani Georges Khaznadar Milana Lima dos Santos Rafael R. Pappalardo Tobias Rad Anirvan Sarkar Karoline Schölzke Florian Schöngaßner Maël Valais Dominik Vogel auto-multiple-choice-1.4.0/auto-multiple-choice.desktop.in000066400000000000000000000010251341176102400235730ustar00rootroot00000000000000[Desktop Entry] Name=Auto Multiple Choice Name[fr]=QCM automatique Type=Application Exec=auto-multiple-choice Icon=auto-multiple-choice Terminal=false Categories=@/DESKTOP_CAT/@ GenericName=Auto Multiple Choice GenericName[fr]=QCM automatique Comment=Manage multiple choice questionnaires, with automatic marking from papers' scans Comment[fr]=Conception et correction automatique de QCM en LaTeX Keywords=multiple;choice;questionnaire;exam;grading;marking;MCQ;AMC Keywords[fr]=questionnaire;choix;multiple;examen;correction;QCM;AMC auto-multiple-choice-1.4.0/auto-multiple-choice.in000077500000000000000000000040361341176102400221330ustar00rootroot00000000000000#! @/PERLPATH/@ # # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . # Local Variables: # mode:perl # End: use File::Spec::Functions qw/catfile catpath splitpath updir/; use Cwd; $mods_dir="@/MODSDIR/@"; $ENV{'LC_NUMERIC'}="C"; sub mod_path { my ($action)=@_; my $f; $f=catfile($mods_dir,"perl","AMC-$action.pl"); return($f) if(-f $f); $f=catfile($mods_dir,"exec","AMC-$action"); return($f) if(-f $f); return(''); } # For portable distribution if(! -d $mods_dir) { ($volume,$directory,$file) = splitpath(__FILE__); my $wd=getcwd(); $base_dir=catfile(catpath( $volume, $directory ),updir); chdir($base_dir); $base_dir=getcwd(); chdir($wd); $mods_dir=catfile($base_dir,'lib'); if(! -d $ENV{'AMCBASEDIR'}) { $ENV{'PERL5LIB'}=catfile($base_dir,'perl').":".$ENV{'PERL5LIB'}; $ENV{'TEXINPUTS'}=catfile($base_dir,'latex').":".$ENV{'TEXINPUTS'}; $ENV{'AMCBASEDIR'}=$base_dir; $ENV{'PATH'}=$ENV{'PATH'}.":".catfile($base_dir,'bin'); } } if($#ARGV==0) { if(mod_path($ARGV[0])) { $action=shift; } else { $action='gui'; } } elsif($#ARGV>0) { $action=shift; } else { $action='gui'; } my $f=mod_path($action); if($f) { if($f =~ /\.pl$/) { exec($^X,$f,@ARGV); } else { exec($f,@ARGV); } } else { die "Unknown action $action"; } die "Exec $f failed: $!"; auto-multiple-choice-1.4.0/auto-multiple-choice.spec.in000066400000000000000000000200211341176102400230510ustar00rootroot00000000000000# -*- coding:utf-8 -*- %define AMC_modsdir %{_libdir}/AMC %define AMC_modelsdir /usr/share/auto-multiple-choice/models %define AMC_texdocdir /usr/share/texmf/doc/latex/AMC %define AMC_texdir /usr/share/texmf/tex/latex/AMC %define AMC_bindir %{_bindir} %define AMC_pixdir /usr/share/pixmaps %define AMC_iconsdir /usr/share/auto-multiple-choice/icons %define AMC_texdocdir /usr/share/texmf-texlive/doc/AMC %if 0%{?suse_version} %define AMC_texdocdir /usr/lib/texmf/doc/AMC %else %define AMC_texdocdir /usr/share/texmf/doc/latex/AMC %endif %if 0%{?fedora} %define AMC_perldir %{perl_privlib} %else %define AMC_perldir %{perl_vendorlib} %endif %define AMC_man1dir %{_mandir}/man1 %define AMC_docdir %{_docdir}/%{name} %define AMC_OPENCV -I /usr/include/opencv %if 0%{?suse_version} %define AMC_cat Education;Teaching; %else %define AMC_cat Education; %endif %define AMC_makepass SYSTEM_TYPE=rpm MODSDIR=%{AMC_modsdir} MODELSDIR=%{AMC_modelsdir} TEXDOCDIR=%{AMC_texdocdir} TEXDIR=%{AMC_texdir} BINDIR=%{AMC_bindir} ICONSDIR=%{AMC_iconsdir} PIXDIR=%{AMC_pixdir} PERLDIR=%{AMC_perldir} MAN1DIR=%{AMC_man1dir} DOCDIR=%{AMC_docdir} DESKTOPDIR="" DESKTOP_CAT="%{AMC_cat}" GCC_OPENCV="%{AMC_OPENCV}" Name: auto-multiple-choice Summary: Auto Multiple Choice - Multiple Choice Papers Management Version: @/PACKAGE_V_DEB/@ Release: 1%{?dist} License: GPLv2+ Group: Productivity/Other Source: auto-multiple-choice_@/PACKAGE_V_DEB/@_precomp.tar.gz %if 0%{?fedora} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} %else BuildRoot: %{_tmppath}/%{name}-%{version}-build %endif URL: https://www.auto-multiple-choice.net/ Packager: Alexis Bienvenüe BuildRequires: gcc-c++ %if 0%{?suse_version} BuildRequires: update-desktop-files, libnetpbm-devel, texlive, fontconfig-devel, opencv-devel %endif %if 0%{?fedora} BuildRequires: desktop-file-utils, netpbm-devel, texlive, fontconfig-devel, opencv-devel %endif %if 0%{?mandriva_version} BuildRequires: desktop-file-utils, libnetpbm-devel, libfontconfig-devel, opencv-devel %endif %if 0%{?suse_version} %if 0%{?suse_version} < 1140 Requires: perl = %{perl_version} %else %{perl_requires} %endif %else Requires: perl >= 5.8 %endif Requires: ghostscript Requires: /usr/bin/ppmtoxpm Requires: /usr/bin/dvipdfm %if 0%{?suse_version} > 1000 Suggests: perl(Email::Simple), perl(Email::MIME), perl(Email::Address), perl(Email::Sender), perl(Email::Sender::Simple), perl(Email::Date::Format) %else Requires: perl(Email::Simple), perl(Email::MIME), perl(Email::Address), perl(Email::Sender), perl(Email::Sender::Simple), perl(Email::Date::Format) %endif Requires: perl(DBI), perl(DBD::SQLite) %if 0%{?mandriva_version} Requires: poppler, graphicsmagick, imagemagick, tetex-cmsuper %else Requires: /usr/bin/pdftoppm, GraphicsMagick, ImageMagick %endif %if 0%{?suse_version} Requires: poppler >= 0.12.3, poppler-tools >= 0.12.3 Requires: texlive, texlive-bin-latex, texlive-latex BuildRequires: texlive, texlive-bin-latex, texlive-latex Requires: perl(Archive::Tar), perl(Data::Dumper), perl(Encode), perl(Exporter), perl(Fcntl), perl(File::Copy), perl(File::Path), perl(File::Spec), perl(File::Spec::Functions), perl(File::Temp), perl(Getopt::Long), perl(Gtk2), perl(I18N::Langinfo), perl(IO::File), perl(IO::Select), perl(IPC::Open2), perl(Locale::gettext), perl(Module::Load), perl(Module::Load::Conditional), perl(POSIX), perl(Unicode::Normalize), perl(Time::Local), perl(XML::Simple), perl(XML::Writer), perl(constant), perl(encoding), perl(Digest::MD5), perl(Archive::Zip), perl(Text::CSV), perl(List::Util), perl(Text::ParseWords), perl(Cwd) %endif %if 0%{?fedora} Requires: perl(Image::Magick) %else Requires: perl(Graphics::Magick) %endif %if 0%{?fedora} Requires: texlive-latex, perl(Net::CUPS), perl(Net::CUPS::PPD), perl(Gtk2::Notify) BuildRequires: texlive-latex %if 0%{?fedora} < 18 Requires: texlive-texmf-latex BuildRequires: texlive-texmf-latex %endif %endif %if 0%{?mandriva_version} Requires: tetex, tetex-latex, perl(Net::CUPS), perl(Net::CUPS::PPD), perl(Gtk2::Notify) BuildRequires: tetex, tetex-latex %endif %if 0%{?mandriva_version} Requires(post): tetex Requires(postun): tetex %else Requires(post): texlive Requires(postun): texlive %endif ################################################################# # DESCRIPTION # ################################################################# %{?perl_default_filter} %description Utility to manage multiple choice questionnaires, with optionnaly mixed questions and answers. AMC provides automatic marking from papers' scans. Annotated papers are produced. Marks can be exported as a OpenOffice.org sheet file. #' %prep ################################################################# # SETUP # ################################################################# %setup %if 0%{?fedora} # filter out package Perl modules, and optional OpenOffice::OODoc module. cat << \EOF > %{name}-req #!/bin/sh %{__perl_requires} $* |\ sed -e '/perl(OpenOffice::OODoc)/d' -e '/perl(AMC::.*)/d' EOF %global __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req chmod +x %{__perl_requires} %endif ################################################################# # BUILD # ################################################################# %build make %{AMC_makepass} GCC_NETPBM="-I /usr/include/netpbm -lnetpbm" GCC="gcc" GCC_PP="g++" CFLAGS="$RPM_OPT_FLAGS -Wall" CXXFLAGS="$RPM_OPT_FLAGS -Wall" ################################################################# # INSTALL # ################################################################# %install make DESTDIR=$RPM_BUILD_ROOT %{AMC_makepass} install %if 0%{?fedora:1}%{?mandriva_version:1} desktop-file-install --delete-original --dir=%{buildroot}%{_datadir}/applications auto-multiple-choice.desktop %endif %if 0%{?suse_version} %suse_update_desktop_file -i %{name} %endif %find_lang %{name} ################################################################# # CLEAN # ################################################################# %clean rm -rf $RPM_BUILD_ROOT ################################################################# # FILES # ################################################################# %files -f %{name}.lang %defattr(-,root,root,-) %doc COPYING ChangeLog doc/html doc/auto-multiple-choice.??.xml doc/auto-multiple-choice.??.pdf %doc %{AMC_texdocdir} %doc %{AMC_docdir} %dir /usr/share/auto-multiple-choice %dir /usr/share/texmf %dir /usr/share/texmf/tex %dir /usr/share/texmf/tex/latex %if 0%{?suse_version} %dir /usr/lib/texmf/doc %endif %{AMC_modsdir} %{AMC_modelsdir} %{AMC_iconsdir} %{AMC_texdir} %{AMC_bindir}/auto-multiple-choice %{AMC_pixdir}/auto-multiple-choice.xpm %{AMC_perldir}/AMC %{_datadir}/applications/auto-multiple-choice.desktop %{AMC_man1dir}/auto-multiple-choice.*.1* %{AMC_man1dir}/auto-multiple-choice.1* %{AMC_man1dir}/AMC-*.1* /usr/share/gtksourceview-3.0 /usr/share/gtksourceview-3.0/language-specs /usr/share/gtksourceview-3.0/language-specs/amc-txt.lang /usr/share/mime/packages/auto-multiple-choice.xml ################################################################# # POST # ################################################################# %post %if 0%{?fedora} texhash %endif %if 0%{?suse_version} texconfig-sys rehash %endif %if 0%{?mandriva_version} texconfig-sys rehash %endif %postun %if 0%{?fedora} texhash %endif %if 0%{?suse_version} texconfig-sys rehash %endif %if 0%{?mandriva_version} texhash %endif ################################################################# # CHANGELOG # ################################################################# %changelog * @/DATE_RPMCHL/@ Alexis Bienvenue @/PACKAGE_V_DEB/@-1 - auto spec file for Fedora and SUSE. See ChangeLog for information. auto-multiple-choice-1.4.0/buildpdf.cc000066400000000000000000001045451341176102400176550ustar00rootroot00000000000000/* Copyright (C) 2013-2017 Alexis Bienvenue This file is part of Auto-Multiple-Choice Auto-Multiple-Choice is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. Auto-Multiple-Choice is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Auto-Multiple-Choice. If not, see . */ #ifndef __BUILDPDF__ #define __BUILDPDF__ 1 #include #include #include #include #include #include #include #include #ifdef DEBUG #include #include #endif #include "opencv2/core/core.hpp" #if CV_MAJOR_VERSION > 2 #define OPENCV_23 1 #define OPENCV_21 1 #define OPENCV_20 1 #define OPENCV_30 1 #else #if CV_MAJOR_VERSION == 2 #define OPENCV_20 1 #if CV_MINOR_VERSION >= 1 #define OPENCV_21 1 #endif #if CV_MINOR_VERSION >= 3 #define OPENCV_23 1 #endif #endif #endif #include "opencv2/imgproc/imgproc.hpp" #ifdef OPENCV_30 #include "opencv2/imgcodecs/imgcodecs.hpp" #else #include "opencv2/highgui/highgui.hpp" #endif #define FORMAT_JPEG 1 #define FORMAT_PNG 2 /* Helpers to read PNG files from memory (as an array or as a vector) with Cairo */ struct buffer_closure { uchar *buffer; unsigned long int length; unsigned long int offset; }; #define BUFFER_CLOSURE(ptr) ((buffer_closure*) (ptr)) static cairo_status_t read_buffer(void *closure, uchar *data, unsigned int length) { if(BUFFER_CLOSURE(closure)->offset + length > BUFFER_CLOSURE(closure)->length) { return(CAIRO_STATUS_READ_ERROR); } memcpy(data,BUFFER_CLOSURE(closure)->buffer + BUFFER_CLOSURE(closure)->offset,length); BUFFER_CLOSURE(closure)->offset += length; return(CAIRO_STATUS_SUCCESS); } struct vector_closure { std::vector::iterator iterator; unsigned long int length; }; #define VECTOR_CLOSURE(ptr) ((vector_closure*) (ptr)) static cairo_status_t read_vector(void *closure, uchar *data, unsigned int length) { if(VECTOR_CLOSURE(closure)->length < length) { return(CAIRO_STATUS_READ_ERROR); } std::copy(VECTOR_CLOSURE(closure)->iterator, VECTOR_CLOSURE(closure)->iterator+length, (uchar*)data); VECTOR_CLOSURE(closure)->iterator += length; VECTOR_CLOSURE(closure)->length -= length; return(CAIRO_STATUS_SUCCESS); } /* BuildPdf This class is used by AMC-annotate to build a pdf from image files (scans), PDF files (subject pages), with transformation matrix support and drawing support (rectangles, circles, marks, text). */ /* COORDINATE SYSTEMS: All coordinate systems has top-left (0,0). - LAYOUT/SUBJECT coordinates are pixel-based coordinates of an image with density given with dpi, that corresponds to a question page. So (0,0) is the top-left corner of the page, and the bottom-right corner of the page is (,). - SCAN coordinates are pixel-based coordinates on the scan image. - PDF coordinates are point(=1/72 inch)-based coordinates of the PDF page. Note that when drawing, all coordinates will be given to BuildPdf in pixels (with (0,0) = top-left corner), usually in LAYOUT coordinates, but possibly also in PDF coordinates. These coordinates will be mapped to PDF coordinates using a transformation matrix. */ class BuildPdf { public: /* constructor: w and h are the page size in pixels (in the layout coordinate system), and d the "dots per point", that is the number of pixels in one pt (1pt is 1/72 inches). */ BuildPdf(double w, double h, double d): width_in_pixels(w), height_in_pixels(h), dppt(d), n_pages(-1), user_one_point(0), margin(0), document(NULL), layout(NULL), surface(NULL), cr(NULL), image_cr(NULL), image_surface(NULL), fake_image_buffer(NULL), font_description(NULL), line_width(1.0), font("Linux Libertine O 12"), debug(0), scan_expansion(1.0), scan_resize_factor(1.0), embedded_image_format(FORMAT_JPEG), image_buffer(), scan_max_width(0), scan_max_height(0), png_compression_level(9), jpeg_quality(75) { printf(": w_pix=%g h_pix=%g dppt=%g\n", width_in_pixels, height_in_pixels, dppt); }; ~BuildPdf(); /* call set_debug(1) to get more debugging output on stderr. */ void set_debug(int d) { debug = d; } /* **************************************************************** */ /* METHODS TO INSERT SCANS (AS BACKGROUND) */ /* **************************************************************** */ /* the set_* functions can be used to set some parameters' values: - embedded_image_format is the format scans will be converted to before including them to the PDF file. There are currently two choices: FORMAT_PNG or FORMAT_JPEG. - jpeg_quality is the JPEG quality (between 0 and 100) used in FORMAT_JPEG mode. A small value will lead to small PDF size, but with small image quality... - png_compression is the PNG compression level (from 1 to 9). Use default value 9 for small PDF size (with images longer to encode/decode). - scan_max_height and scan_max_width define a maximum size for the scans: scans which are larger will be resized so that their dimensions don't exceed these values. This can allow to get smaller PDF files. - margin is the margin size in points, used for the global verdict text and the questions scores. */ void set_embedded_image_format(int format) { embedded_image_format = format; } void set_embedded_png() { embedded_image_format = FORMAT_PNG; } void set_embedded_jpeg() { embedded_image_format = FORMAT_JPEG; } void set_jpeg_quality(int quality) { jpeg_quality = quality; } void set_png_compression_level(int l) { png_compression_level = l; } void set_scan_max_height(int mh) { scan_max_height = mh; } void set_scan_max_width(int mw) { scan_max_width = mw; } void set_margin(double m) { margin = m; } /* start_output starts to build a PDF into file output_filename. Call it once for each PDF to create, before addind images or drawing on it */ int start_output(char* output_filename); /* close_output finishes with building the PDF, and closes the file. */ void close_output(); /* next_page begins with another blank page. */ int next_page(); /* new_page_from_png begins with another page, with the PNG image as a background. The PNG image can be given with its filename, as a memoty buffer (pointer and lenght), or as a std::vector memory buffer. next_page() is called first, unless skip_show_page is set. */ int new_page_from_png(const char* filename); int new_page_from_png(void *buffer, unsigned long int buffer_length); int new_page_from_png(std::vector &buf, int skip_show_page = 0); /* resize_scan resizes the cv::Mat image so that its dimensions does not exceed scan_max_height and scan_max_width. The scaling factor is saved for later use (we need to know it to get the right scaling factor between PDF coordinates and scan coordinates) */ void resize_scan(cv::Mat &image); /* new_page_from_image begins with another page, with the image as a background. The first version will first converted to PNG or JPEG (depending on embedded_image_format) using OpenCV. With the two latter versions, the image is given as a memory buffer, and is attached to the PDF file using the specified mime_type (which can be either image/png or image/jpeg). */ int new_page_from_image(const char* filename); int new_page_from_image(std::vector &image_data, const char* mime_type, int width, int height); int new_page_from_image(unsigned char *data, unsigned int size, const char* mime_type, int width, int height); /* load_pdf loads a PDF file, to be used later by new_page_from_pdf. */ int load_pdf(char* filename); /* new_page_from_pdf begins with another page, using page page_nb of the loaded PDF as a background. */ int new_page_from_pdf(int page_nb); /* **************************************************************** */ /* METHODS TO DRAW ON THE PAGE */ /* **************************************************************** */ /* set_line_width sets the line width (in points) for next drawings. */ void set_line_width(double lw); /* set_font sets the font for next drawings. It then calls validate_font, which updates the font description with this new font. */ int set_font(const char* font); int validate_font(); /* color sets the color for next drawings, either with RBG or RGBA. Color values must be between 0.0 and 1.0. */ void color(double r,double g, double b, double a) { cairo_set_source_rgba(cr, r, g, b, a); } void color(double r,double g, double b) { cairo_set_source_rgb(cr, r, g, b); } /* set_matrix_to_scan sets the matrix that transforms layout (subject) coordinates to scan coordinates (as recorded in the layout AMC database). */ void set_matrix_to_scan(double a, double b, double c ,double d, double e, double f); /* identity_matrix sets the matrix to identity. It can be used when the background is the question page, not a scan, or when the following drawings will be done with subject/layout coordinates. */ void identity_matrix(); /* keep_on_scan moves the (x,y) point (in layout/subject coordinates) so that the corresponding point stays on the scan */ void keep_on_scan(double *x, double *y); /* drawing symbols (the rectangle on which the symbol should be based is given): */ void draw_rectangle(double xmin, double xmax, double ymin, double ymax); void fill_rectangle(double xmin, double xmax, double ymin, double ymax); void draw_mark(double xmin, double xmax, double ymin, double ymax); void draw_circle(double xmin, double xmax, double ymin, double ymax); /* draw_text draws the UTF8 string at (x,y), with x-anchor and y-anchor given by xpos and ypos. When xpos=0.0, the text is written at the right of (x,y). When xpos=1.0, the text is written at the left of (x,y). When 0.5 for exemple, the text is x-centered at (x,y). The same applies for ypos in the y-direction. */ void draw_text(double x, double y, double xpos, double ypos, const char *text); /* draw_text_margin writes a text in the margin (left margin if xside=0, and right margin if xside=1). The point used is a point at the border of the margin, so that xpos=0.0 should be used for left margin, and xpos=1.0 for tight margin. */ void draw_text_margin(int xside, double y, double xpos, double ypos, const char *text); /* draw_text_rectangle writes a text in the given rectangle (the text is scaled down if necessary to fit in the rectangle). */ int draw_text_rectangle(double xmin, double xmax, double ymin, double ymax, const char *text); private: // dimensions of one subject page in the layout coordinate system double width_in_pixels; double height_in_pixels; // dots per pt for the layout double dppt; // number of pages created so far for current PDF file. Equals -1 if // no PDF file is opened for output int n_pages; // PDF document loaded (usualy the subject), from which one can copy // pages to the output PDF PopplerDocument *document; // Pango layout used to write texts PangoLayout *layout; // Cairo environment used to draw on the page cairo_surface_t *surface; cairo_t *cr; cairo_matrix_t matrix; // Cairo environment used to draw the background image (scan) cairo_t *image_cr; cairo_surface_t *image_surface; // Fake PNG image used to attach images to the PDF file. It will // never contain any particular image, only random stuff, but is // needed to attach images properly to the PDF output. unsigned char *fake_image_buffer; // Image currently been attached to the PDF output std::vector image_buffer; // use this dimension in Cairo user coordinate system to get one // point (1/72 inch) in the PDF coordinate system double user_one_point; // scaling factor used to expand or shrink the scan to make it the // same size as the PDF output. double scan_expansion; // scaling factor used when resizing the scan (when its dimensions // exceed the scan_max_* values) double scan_resize_factor; // drawing parameters double margin; double line_width; std::string font; // debuging? int debug; // image parameters int embedded_image_format; int png_compression_level; int jpeg_quality; int scan_max_height; int scan_max_width; void set_matrix(double a, double b, double c ,double d, double e, double f); void set_matrix(cairo_matrix_t *m); double normalize_distance(); double normalize_matrix_distance(cairo_matrix_t *m); PangoLayout* r_font_size_layout(double ratio); PangoFontDescription *font_description; int new_page_from_image_surface(cairo_surface_t *is); void draw_text(PangoLayout* local_layout, double x, double y, double xpos, double ypos, const char *text); void free_buffer(); }; BuildPdf::~BuildPdf() { close_output(); if(document != NULL) g_object_unref(document); } int BuildPdf::start_output(char* output_filename) { // close current PDF document, if one close_output(); printf(": opening -> %s\n", output_filename); if(debug) { printf("; Create main surface\n"); } // create a new PDF Cairo surface, with dimensions in points surface = cairo_pdf_surface_create(output_filename, width_in_pixels / dppt, height_in_pixels / dppt); cairo_status_t status = cairo_surface_status(surface); if(status != CAIRO_STATUS_SUCCESS) { printf("! ERROR : creating surface - %s\n", cairo_status_to_string(status)); cairo_surface_destroy(surface); surface = NULL; return(1); } // Create Cairo context for drawings and texts (will not be used for // images) if(debug) { printf("; Create cr\n"); } cr = cairo_create(surface); if(cairo_status(cr) != CAIRO_STATUS_SUCCESS) { printf("! ERROR : creating cairo - %s\n", cairo_status_to_string(cairo_status(cr))); cairo_surface_destroy(surface); cairo_destroy(cr); surface = NULL; cr = NULL; return(1); } // Create Pango Cairo layout for texts if(debug) { printf("; Create layout\n"); } layout = pango_cairo_create_layout(cr); if(layout == NULL) { printf("! ERROR : creating pango/cairo layout - %s\n", cairo_status_to_string(status)); cairo_surface_destroy(surface); cairo_destroy(cr); surface = NULL; cr = NULL; return(1); } // Updates the font description with the right font and uses it // for the new layout if(validate_font()) { return(2); } // initialization. user_one_point will be set when using set_matrix n_pages = 0; user_one_point = 0; if(debug) { printf(": OK\n"); } return(0); } void BuildPdf::close_output() { if(n_pages >= 0) { // free all allocated objects... printf(": closing...\n"); next_page(); cairo_surface_finish(surface); cairo_surface_destroy(surface); surface = NULL; cairo_destroy(cr); cr = NULL; if(image_cr != NULL) cairo_destroy(image_cr); image_cr = NULL; if(layout != NULL) { g_object_unref(layout); layout = NULL; } n_pages = -1; } } int BuildPdf::next_page() { if(n_pages<0) { printf("! ERROR: next_page in closed document\n"); return(1); } if(n_pages >= 1) { // Adds current page to PDF output cairo_show_page(cr); if(debug) { printf("; Show page\n"); } // Destroy objects used to insert the background scan if(image_cr != NULL) { if(debug) { printf("; Destroy image_cr\n"); } cairo_destroy(image_cr); image_cr = NULL; } if(image_surface != NULL) { if(debug) { printf("; Destroy image_surface\n"); } cairo_surface_finish(image_surface); cairo_surface_destroy(image_surface); image_surface = NULL; } if(fake_image_buffer != NULL) { free_buffer(); } scan_resize_factor = 1.0; scan_expansion = 1.0; } n_pages++; return(0); } int BuildPdf::new_page_from_png(const char* filename) { if(next_page()) return(1); if(debug) { printf(": PNG < %s\n", filename); printf("; Create image_surface from PNG\n"); } cairo_surface_t *is = cairo_image_surface_create_from_png(filename); return(new_page_from_image_surface(is)); } int BuildPdf::new_page_from_png(void *buffer, unsigned long int buffer_length) { if(next_page()) return(1); buffer_closure closure; closure.buffer = (uchar*) buffer; closure.length = buffer_length; closure.offset = 0; if(debug) { printf(": PNG < BUFFER\n"); printf("; Create image_surface from PNG stream\n"); } cairo_surface_t *is = cairo_image_surface_create_from_png_stream(read_buffer, &closure); return(new_page_from_image_surface(is)); } int BuildPdf::new_page_from_png(std::vector &buf, int skip_show_page) { if(!skip_show_page) { if(next_page()) return(1); } vector_closure closure; closure.iterator = buf.begin(); closure.length = buf.size(); if(debug) { printf(": PNG < BUFFER\n"); printf("; Create image_surface from PNG stream\n"); } cairo_surface_t *is = cairo_image_surface_create_from_png_stream(read_vector, &closure); return(new_page_from_image_surface(is)); } // Free buffer used for the fake image void BuildPdf::free_buffer() { if(debug) { printf("; Free fake_image_buffer\n"); } free(fake_image_buffer); fake_image_buffer = NULL; } void detach(void* args) { if(*((int*) args)) { printf("; DETACH\n"); } } #define ZFORMAT CAIRO_FORMAT_A1 int BuildPdf::new_page_from_image(unsigned char *data, unsigned int size, const char* mime_type, int width, int height) { if(data == NULL) { printf("! ERROR : new_page_from_image from null data\n"); return(1); } if(fake_image_buffer != NULL) { printf("! ERROR : fake_image_buffer already present\n"); return(1); } #ifdef DEBUG std::ofstream outfile("/tmp/opencv-exported", std::ios::out | std::ios::binary); outfile.write((const char*) data, size); #endif // Creates a fake image surface (to get minimal memory size, we use // CAIRO_FORMAT_A1 format) with associated memory buffer. int stride = cairo_format_stride_for_width(ZFORMAT, width); if(debug) { printf("; Create fake_image_buffer\n"); } fake_image_buffer = (unsigned char*) malloc(stride * height); if(debug) { printf("; Create image_surface for DATA\n"); } cairo_surface_t *is = cairo_image_surface_create_for_data(fake_image_buffer, ZFORMAT, width, height, stride); if(debug) { printf("; Attach mime %s to image_surface\n", mime_type); } #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) if(!cairo_surface_supports_mime_type(surface, mime_type)) { printf("! ERROR: surface does not handle %s\n", mime_type); return(1); } #endif // Attach the real image to the surface cairo_status_t status = cairo_surface_set_mime_data(is, mime_type, data, size, detach, (void*) (&debug)); if(status != CAIRO_STATUS_SUCCESS) { printf("! ERROR : setting mime data - %s\n", cairo_status_to_string(status)); cairo_surface_destroy(is); free_buffer(); return(-2); } // Uses the surface to create a new page int status_np = new_page_from_image_surface(is); return(status_np); } int BuildPdf::new_page_from_image(std::vector &image_data, const char* mime_type, int width, int height) { return(new_page_from_image(image_data.data(), image_data.size(), mime_type, width, height)); } void BuildPdf::resize_scan(cv::Mat &image) { cv::Size s = image.size(); // compute the resize factor to be used to get dimensions no more // than scan_max_* double fx = 2; double fy = 2; if(scan_max_width > 0) { fx = (double) scan_max_width / s.width; } if(scan_max_height > 0) { fy = (double) scan_max_height / s.height; } if(debug) { printf(": fx=%g fy=%g.\n", fx, fy); } if(fx < fy) { scan_resize_factor = fx; } else { scan_resize_factor = fy; } // resize the image if needed if(scan_resize_factor < 1.0) { cv::resize(image, image, cv::Size(), scan_resize_factor, scan_resize_factor, cv::INTER_AREA); } else { scan_resize_factor = 1.0; if(debug) { printf(": No need to resize.\n"); } } } int BuildPdf::new_page_from_image(const char* filename) { if(next_page()) return(1); int direct_png = 0; if(debug) { printf(": IMAGE < %s\n", filename); } // read the image from disk to memory cv::Mat image = cv::imread(filename); const char* mime_type; if(debug) { printf(": type=%d depth=%d channels=%d\n", image.type(), image.depth(), image.channels()); } // resize it if needed resize_scan(image); // encode the image to a PNG or JPEG image buffer if(embedded_image_format == FORMAT_JPEG) { std::vector params; params.push_back(cv::IMWRITE_JPEG_QUALITY); params.push_back(jpeg_quality); imencode(".jpg", image, image_buffer, params); mime_type = CAIRO_MIME_TYPE_JPEG; } else if(embedded_image_format == FORMAT_PNG) { std::vector params; params.push_back(cv::IMWRITE_PNG_COMPRESSION); params.push_back(png_compression_level); imencode(".png", image, image_buffer, params); mime_type = CAIRO_MIME_TYPE_PNG; direct_png = 1; } else { printf("! ERROR: invalid embedded_image_format - %d\n", embedded_image_format); return(3); } cv::Size s = image.size(); if(debug) { printf(": converted to %s [Q=%d C=%d] (%.1f KB) w=%d h=%d\n", mime_type, jpeg_quality, png_compression_level, (double) image_buffer.size() / 1024, s.width, s.height); } int r; if(direct_png) { // PNG images can't be "attached" // (cairo_surface_supports_mime_type would return FALSE), so we // directly insert them into the PDF output r = new_page_from_png(image_buffer, 1); } else { // JPEG images are attached to the image surface, and then // inserted to the PDF output r = new_page_from_image(image_buffer, mime_type, s.width, s.height); } if(debug) { printf("; Image buffer exit\n"); } return(r); } int BuildPdf::new_page_from_image_surface(cairo_surface_t *is) { if(debug) { printf("; Entering new_page_from_image_surface\n"); } if(image_surface != NULL) { printf("! ERROR : image_surface already in use\n"); return(1); } else { if(is == NULL) { printf("! ERROR : NULL image_surface\n"); return(1); } image_surface = is; } cairo_status_t image_surface_status = cairo_surface_status(image_surface); if(image_surface_status != CAIRO_STATUS_SUCCESS) { printf("! ERROR : creating image surface / %s\n", cairo_status_to_string(image_surface_status)); cairo_surface_destroy(image_surface); return(1); } int w = cairo_image_surface_get_width(image_surface); int h = cairo_image_surface_get_height(image_surface); if(w <= 0 || h <= 0) { printf("! ERROR : image dimensions should be positive (%dx%d)\n", w, h); cairo_surface_destroy(image_surface); return(1); } // rx and ry are the scaling factors that has to be used to set the // image surface with the same dimensions as the PDF output double rx = width_in_pixels / dppt / w; double ry = height_in_pixels / dppt / h; if(rx < ry) { scan_expansion = rx; } else { scan_expansion = ry; } if(debug) { printf(": R=%g (%g,%g)\n", scan_expansion, rx, ry); printf("; Create and scale image_cr\n"); } // Create the Cairo surface that will contain the image, with a // matrix that will scale the image to the PDF output dimensions image_cr = cairo_create(surface); cairo_identity_matrix(image_cr); cairo_scale(image_cr, scan_expansion, scan_expansion); if(debug) { printf("; set_source_surface\n"); } // paint the image using context image_cr cairo_set_source_surface(image_cr, image_surface, 0, 0); if(debug) { printf("; paint from image_cr\n"); } cairo_paint(image_cr); if(debug) { printf("; Exit new_page_from_image_surface: OK\n"); } return(0); } int BuildPdf::load_pdf(char* filename) { GError *error = NULL; gchar *uri; if(document != NULL) g_object_unref(document); uri = g_filename_to_uri(filename, NULL, &error); if(uri == NULL) { printf("! ERROR: poppler fail: %s\n", error->message); return 1; } // loads the PDF document using Poppler document = poppler_document_new_from_file(uri, NULL, &error); if(document == NULL) { printf("! ERROR: poppler fail: %s\n", error->message); return 1; } identity_matrix(); return(0); } int BuildPdf::new_page_from_pdf(int page_nb) { if(next_page()) { return(1); } if(document == NULL) { printf("! ERROR: no pdf loaded.\n"); return(1); } // Inserts one page from pre-loaded PDF document, using // Poppler/Cairo PopplerPage *page = poppler_document_get_page(document, page_nb-1); if(page == NULL) { printf("! ERROR:poppler fail: page not found.\n"); return 1; } cairo_identity_matrix(cr); poppler_page_render_for_printing(page, cr); g_object_unref(page); identity_matrix(); return(0); } /* normalize_distance returns a user distance that will be mapped to a one point (=1/72 inch) distance on the PDF output, using current transformation matrix. */ double BuildPdf::normalize_distance() { double dx, dy; dx = 1.0; dy = 1.0; cairo_device_to_user_distance(cr, &dx, &dy); return( sqrt((dx * dx + dy * dy) / 2.0) ); } /* the same, with any matrix */ double BuildPdf::normalize_matrix_distance(cairo_matrix_t *m) { double dx, dy; dx = 1.0; dy = 1.0; cairo_matrix_transform_distance(m, &dx, &dy); return( sqrt((dx * dx + dy * dy) / 2.0) ); } void BuildPdf::set_line_width(double lw) { if(lw >= 0) { line_width = lw; if(line_width * user_one_point > 0) cairo_set_line_width(cr, line_width * user_one_point); } } int BuildPdf::set_font(const char* f) { font = ""; font.append(f); return(validate_font()); } int BuildPdf::validate_font() { font_description = pango_font_description_from_string(font.c_str()); if(font_description == NULL) { printf("! ERROR : font description creation\n"); return(1); } pango_layout_set_font_description(layout, font_description); return(0); } /* r_font_size_layout creates a new Pango layout with a font size the is scaled with ratio.*/ PangoLayout* BuildPdf::r_font_size_layout(double ratio) { PangoLayout *local_layout = pango_layout_copy(layout); if(local_layout == NULL) { printf("! ERROR : creating local pango layout.\n"); return(NULL); } const PangoFontDescription *desc = pango_layout_get_font_description(layout); if(desc == NULL) { printf("! ERROR : creating pango font description.\n"); g_object_unref(local_layout); return(NULL); } gint size = pango_font_description_get_size(desc); PangoFontDescription *new_desc = pango_font_description_copy(desc); if(new_desc == NULL) { printf("! ERROR : creating local pango font description.\n"); g_object_unref(local_layout); return(NULL); } if(pango_font_description_get_size_is_absolute(desc)) { pango_font_description_set_absolute_size(new_desc, size * ratio); } else { pango_font_description_set_size(new_desc, size * ratio); } pango_layout_set_font_description(local_layout, new_desc); return(local_layout); } /* cairo_matrix_scale_after makes the transformation matrix m to be composed with scaling with factor r, so that the resulting transformation is the same as 1) using matrix m 2) scaling. It seems from documentation that cairo_matrix_scale does it, but this is not: the resulting transformation with cairo_matrix_scale is the same as 1) scaling 2) using m. */ void cairo_matrix_scale_after(cairo_matrix_t *m, double r) { m->xx *= r; m->xy *= r; m->yx *= r; m->yy *= r; m->x0 *= r; m->y0 *= r; } /* same, but for a context matrix */ void cairo_scale_after(cairo_t *cr, double r) { cairo_matrix_t m; cairo_get_matrix(cr, &m); cairo_matrix_scale_after(&m, r); cairo_set_matrix(cr, &m); } /* set_matrix_to_scan gives the matrix that transforms layout coordinates to scan coordinates. This matrix is composed with a scaling so that layout coordinates are mapped to resized and expanded scan coordinates. Then, the matrix is used for drawings */ void BuildPdf::set_matrix_to_scan(double a, double b, double c ,double d, double e, double f) { if(debug) { printf("; Set matrix to scan coordinates\n; resize_factor=%g expansion=%g\n", scan_resize_factor, scan_expansion); } cairo_matrix_init(&matrix, a, c, b, d, e, f); cairo_matrix_scale_after(&matrix, dppt * scan_resize_factor * scan_expansion); set_matrix(&matrix); } /* These two test_* functions are used for debugging */ void test_point(cairo_matrix_t *m, double x, double y) { double tx = x; double ty = y; printf("; (%g,%g) ->", tx, ty); cairo_matrix_transform_point(m, &tx, &ty); printf(" (%g,%g)\n", tx, ty); } void test_matrix(cairo_matrix_t *m, double xmax, double ymax) { printf("; x'=%7.3f x + %7.3f y + %6.3f\n", m->xx, m->xy, m->x0); printf("; y'=%7.3f x + %7.3f y + %6.3f\n", m->yx, m->yy, m->y0); test_point(m, 0, 0); test_point(m, xmax, 0); test_point(m, 0, ymax); test_point(m, xmax, ymax); } void BuildPdf::set_matrix(double a, double b, double c ,double d, double e, double f) { if(debug) { printf("; Set matrix\n"); } cairo_matrix_init(&matrix, a, c, b, d, e, f); set_matrix(&matrix); } /* set_matrix sets up transformations that will be used when drawing. The matrix m maps layout coordinates to pixel-based PDF coordinates. So it is scaled to get pt-based PDF coordinates before beeing used. */ void BuildPdf::set_matrix(cairo_matrix_t *m) { cairo_set_matrix(cr, m); cairo_scale_after(cr, 1 / dppt); // updates user_one_point, and the line width user_one_point = normalize_distance(); set_line_width(line_width); // debugging... if(debug) { cairo_matrix_t ctm; cairo_get_matrix(cr, &ctm); double tx, ty; printf("; subject to scan matrix:\n"); printf("; dppt=%g\n", dppt); test_matrix(m, width_in_pixels, height_in_pixels); printf("; cr matrix:\n"); printf("; user 1pt=%g\n", user_one_point); test_matrix(&ctm, width_in_pixels, height_in_pixels); } #ifdef DEBUG color(0.0, 0.5, 0.2, 0.5); draw_rectangle(0, width_in_pixels, 0, height_in_pixels); #endif // updates Pango layout with new scaling factors pango_cairo_context_set_resolution(pango_layout_get_context(layout), user_one_point * 72.); pango_cairo_update_layout(cr, layout); validate_font(); } void BuildPdf::identity_matrix() { set_matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0); } #define FIXX(xp) ((xp) - matrix.xy * *y - matrix.x0) / matrix.xx void BuildPdf::keep_on_scan(double *x, double *y) { double xp = *x; double yp = *y; double margin_in_pixels = margin * dppt * 72.; cairo_matrix_transform_point(&matrix, &xp, &yp); if(xp < margin_in_pixels) { *x = FIXX(margin_in_pixels); } else if(xp > width_in_pixels - margin_in_pixels) { *x = FIXX(width_in_pixels - margin_in_pixels); } } void BuildPdf::draw_rectangle(double xmin, double xmax, double ymin, double ymax) { if(debug) { printf("; draw rectangle\n"); } cairo_rectangle(cr, xmin, ymin, xmax - xmin, ymax - ymin); cairo_stroke(cr); } void BuildPdf::fill_rectangle(double xmin, double xmax, double ymin, double ymax) { if(debug) { printf("; fill rectangle\n"); } cairo_rectangle(cr, xmin, ymin, xmax - xmin, ymax - ymin); cairo_fill(cr); } void BuildPdf::draw_mark(double xmin, double xmax, double ymin, double ymax) { if(debug) { printf("; draw mark\n"); } cairo_move_to(cr, xmin, ymin); cairo_line_to(cr, xmax, ymax); cairo_move_to(cr, xmin, ymax); cairo_line_to(cr, xmax, ymin); cairo_stroke(cr); } void BuildPdf::draw_text(PangoLayout* local_layout, double x, double y, double xpos, double ypos, const char *text) { if(debug) { printf("; draw text\n"); } PangoRectangle extents; if(x<0) x += width_in_pixels; if(y<0) y += height_in_pixels; pango_layout_set_text(local_layout, text, -1); pango_layout_get_pixel_extents(local_layout, &extents, NULL); if(debug) { printf("TEXT=\"%s\" X=%d Y=%d W=%d H=%d\n", text, extents.x, extents.y, extents.width, extents.height); } cairo_move_to(cr, x - xpos * extents.width - extents.x, y - ypos * extents.height - extents.y); pango_cairo_show_layout(cr, local_layout); } void BuildPdf::draw_text(double x, double y, double xpos, double ypos, const char *text) { draw_text(layout, x, y, xpos, ypos, text); } void BuildPdf::draw_text_margin(int xside, double y, double xpos, double ypos, const char *text) { double x; if(xside == 1) { x = width_in_pixels; } else { x = 0; } keep_on_scan(&x, &y); draw_text(x, y, xpos, ypos, text); } int BuildPdf::draw_text_rectangle(double xmin, double xmax, double ymin, double ymax, const char *text) { double r, rp; PangoRectangle extents; PangoLayout* local_layout; pango_layout_set_text(layout, text, -1); pango_layout_get_pixel_extents(layout, &extents, NULL); if(debug) { printf("TEXT=\"%s\" X=%d Y=%d W=%d H=%d\n", text, extents.x, extents.y, extents.width, extents.height); } r = (xmax - xmin) / extents.width; rp = (ymax - ymin) / extents.height; if(rp < r) r = rp; if(debug) { printf(": ratio=%g\n", r); } local_layout = r_font_size_layout(r); if(local_layout == NULL) { printf("! ERROR: r_font_size_layout failed."); return(1); } draw_text(local_layout, (xmin + xmax) / 2, (ymin + ymax) / 2, 0.5, 0.5, text); g_object_unref(local_layout); return(0); } void BuildPdf::draw_circle(double xmin, double xmax, double ymin, double ymax) { if(debug) { printf("; draw circle\n"); } cairo_new_path(cr); cairo_arc(cr, (xmin + xmax) / 2, (ymin + ymax) / 2, sqrt((xmax - xmin) * (xmax - xmin) + (ymax - ymin) * (ymax - ymin)) / 2, 0.0, 2 * M_PI); cairo_stroke(cr); } #endif auto-multiple-choice-1.4.0/doc/000077500000000000000000000000001341176102400163115ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/Makefile000066400000000000000000000065241341176102400177600ustar00rootroot00000000000000# # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . SHELL=/bin/sh include ../Makefile-all.conf ALL_DOCBOOKS = $(filter-out $(wildcard *.in.xml),$(wildcard auto-multiple-choice.*.xml)) DOC_LANG ?= $(patsubst auto-multiple-choice.%.xml,%,$(ALL_DOCBOOKS)) SELECTED_DOCBOOKS = $(foreach onelang,$(DOC_LANG),auto-multiple-choice.$(onelang).xml) IMAGES=$(addprefix html/images/,$(notdir $(wildcard img_src/*.svg))) $(addprefix html/images/callouts/,$(notdir $(wildcard img_src/callouts/*.svg))) BLOCK_IMAGES=$(addprefix img_pdf/,$(notdir $(wildcard img_src/*.svg))) MODELS=$(wildcard modeles/*/*.d) all: $(SELECTED_DOCBOOKS:.xml=.pdf) $(SELECTED_DOCBOOKS:.xml=.x) $(IMAGES:.svg=.png) $(MODELS:.d=.tgz) html/index.html; show_doc_lang: @echo "DOC_LANG = $(DOC_LANG)" images: $(IMAGES:.svg=.png) clean: rm -f $(foreach ext,1 aux cb cb2 glo idx log out toc tex html pdf ext man,*.$(ext)) rm -f modeles/*.tgz rm -f modeles/**/*.tgz rm -f html/auto-multiple-choice.**/*.html rm -f html/images/callouts/*.png html/images/*.png img_pdf/*.pdf rm -f *~ html/images/callouts/%.png: img_src/callouts/%.svg rsvg-convert -w 12 -h 12 $< -o $@ html/images/%.png: img_src/%.svg rsvg-convert -w 24 -h 24 $< -o $@ img_pdf/%.pdf: img_src/%.svg rsvg-convert -f pdf $< -o $@ html/index.html: FORCE $(PERLPATH) ./index.pl $(SELECTED_DOCBOOKS:.xml=) > $@ %.tex: %.xml amcdocstyle.sty dblatex -P latex.encoding=utf8 -b xetex -t tex -p custom.xsl --texstyle=amcdocstyle --xslt-opts="--nonet" --xslt-opts="--catalogs" $(DBLATEX_OPT) $< -o $@ XELATEX=xelatex -halt-on-error -interaction=nonstopmode %.pdf: export SOURCE_DATE_EPOCH=$(PACKAGE_V_EPOCH) %.pdf: export SOURCE_DATE_EPOCH_TEX_PRIMITIVES=1 %.pdf: export FORCE_SOURCE_DATE=1 %.pdf: export TEXINPUTS=./img_pdf/: %.pdf: %.tex $(BLOCK_IMAGES:.svg=.pdf) set -e ; $(XELATEX) $<; $(XELATEX) $< rm -f $(foreach ext,aux cb cb2 glo idx log out toc,$*.$(ext)) %.x: %.ext %.man %.html ; %.ext: %.xml $(PERLPATH) extrait-fichiers.pl --liste $@ $< %.man: %.xml xsltproc --nonet --catalogs --param man.charmap.use.subset "0" --param make.year.ranges "1" --param make.single.year.ranges "1" --param man.output.lang.in.name.enabled "1" $(DOCBOOK_MAN_XSL) $< date > $@ %.html: %.xml doc-xhtml.xsl rm -f html/$*/*.html xsltproc --nonet --catalogs --stringparam base.dir html/$*/ doc-xhtml.xsl $< date > $@ %.tgz: %.d find $< -type d -exec chmod 0755 '{}' \; find $< -type f -exec chmod 0644 '{}' \; ifeq ($(TAR_REPRODUCIBLE_ARGS),nonreproducible) tar -cz -f $@ -C $< . else tar cn -C $< $(TAR_REPRODUCIBLE_ARGS) -O . | gzip $(GZIP_REPRODUCIBLE_ARGS) -c > $@ endif check: FORCE ./check_xml FORCE: ; .PHONY: FORCE all images clean check auto-multiple-choice-1.4.0/doc/Makefile-site000066400000000000000000000021211341176102400207070ustar00rootroot00000000000000# -*- Makefile -*- SHELL=/bin/sh HVERSION=htdocs/version.shtml TMPDIR:=$(shell mktemp -d) STABLEVERSION=1.3.0 STABLESRC=../download_area/files/auto-multiple-choice_$(STABLEVERSION)_sources.tar.gz DOCVERSION=1.3.0 SRC=/tmp/auto-multiple-choice_$(DOCVERSION)_sources.tar.gz BASEDIR=$(TMPDIR)/auto-multiple-choice-$(DOCVERSION) DOCDIR=$(BASEDIR)/doc XML=$(DOCDIR)/auto-multiple-choice SITEDOC=htdocs/auto-multiple-choice version: ../work/local/derniere-version.pl --mode h --fich $(STABLESRC) --ext _sources.tar.gz > $(HVERSION) echo '' >> $(HVERSION) map: FORCE ./sitemap.pl --repertoire htdocs --root https://www.auto-multiple-choice.net/ --o htdocs/sitemap.xml xml: FORCE tar xvzf $(SRC) -C $(TMPDIR) $(MAKE) -C $(BASEDIR) MAJ %.html: xml xsltproc --nonet --stringparam base.dir $(SITEDOC).$*/ $(DOCDIR)/doc-xhtml-site.$*.xsl $(XML).$*.xml # doc a partir de la derniere version dans testing doc: FORCE fr.html en.html ja.html ; site: version doc map $(MAKE) -C ../download_area signe sync FORCE: ; .PHONY: site version map xml FORCE auto-multiple-choice-1.4.0/doc/amcdocstyle.sty.in000066400000000000000000000027521341176102400217740ustar00rootroot00000000000000% % Copyright (C) 2008-2017 Alexis Bienvenue % % This file is part of Auto-Multiple-Choice % % Auto-Multiple-Choice is free software: you can redistribute it % and/or modify it under the terms of the GNU General Public License % as published by the Free Software Foundation, either version 2 of % the License, or (at your option) any later version. % % Auto-Multiple-Choice is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details. % % You should have received a copy of the GNU General Public License % along with Auto-Multiple-Choice. If not, see % . \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{amcdocstyle} \RequirePackageWithOptions{docbook} \RequirePackage[USenglish]{isodate} \RequirePackage{ifxetex} \AtBeginDocument{ \ifx\pdfinfo\undefined \hypersetup{pdfcreationdate=D:@/PACKAGE_V_PDFDATE/@,pdfmoddate=D:@/PACKAGE_V_PDFDATE/@} \else \pdfinfo{/CreationDate (D:@/PACKAGE_V_PDFDATE/@) /ModDate (D:@/PACKAGE_V_PDFDATE/@)} \fi \renewcommand{\DBKdate}{\printdate{@/PACKAGE_V_ISODATE/@}} \expandafter\def\expandafter\DBKsubtitle\expandafter{\DBKsubtitle{} \href{https://www.auto-multiple-choice.net/}{https://www.auto-multiple-choice.net/}} } \ifxetex% \RequirePackage{xeCJK}% \setCJKmainfont{IPAexMincho}% \setCJKsansfont{IPAexGothic}% \setCJKmonofont{IPAexGothic}% \fi auto-multiple-choice-1.4.0/doc/auto-multiple-choice.en.in.xml000066400000000000000000011311231341176102400240740ustar00rootroot00000000000000

    Auto Multiple Choice Auto Multiple Choice Design of MCQ tests with automated correction and grading @/PACKAGE_V_ISODATE/@ AMC is a set of utilities allowing the use of MCQ written in plain text or LaTeX, and their automated correction and grading from scans of the answer sheets using Optical Mark Recognition (OMR). This document describes its use (for the version @/PACKAGE_V_DEB/@~@/PACKAGE_V_VC/@). You can find the AMC web-site at https://www.auto-multiple-choice.net/, and the source code at https://gitlab.com/jojo_boulix/auto-multiple-choice/. Alexis
    paamc@passoire.fr
    Bienvenüe Main author
    Anirvan Sarkar Author and Editor Hiroto Kagotani Editor Frédéric Bréal Author and Editor 2008-2018 Alexis Bienvenüe Bérard Jean Translation from French Khaznadar Georges Translation from French This document can be used according to the terms of the GNU General Public License, version 2 or later.
    License Auto Multiple Choice is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. Prerequisites Operating system The AMC utilities have been written for Linux. They can also be installed on MAC OS X using MacPorts. Software If you install AMC with deb or RPM package (on debian, Ubuntu and derivatives, Mandriva, openSUSE, Fedora), every software used by AMC will be automatically installed. The main packages/software that are required for the use of AMC are the following: LaTeX image processing libraries ImageMagick and OpenCV Perl, together with Gtk2-Perl and Glade::XML for the graphical user interface Recommended versions for software used by AMC A few bugs in old versions of software used by AMC are particularly detrimental to its operating normally: With old versions of Net::CUPS (debian package libnet-cups-perl), the command for printing the test sheets leads to a premature exit from the AMC graphical user interface. This bug is fixed in versions 0.61 and later of Net::CUPS. With old versions of ImageMagick, the merging of corrected answer sheets into a single PDF file per student does not work when answer sheets comprise more than one page. This bug is fixed in versions 6.5.5 ad later of ImageMagick. LaTeX From version 1.1 of AMC, it is not mandatory anymore to write your questionnaires using LaTeX language (see for a plain text alternative syntax). However, LaTeX is still the native AMC language for questionnaires descriptions, and allows the user to design his questionnaires with tremendous freedom. The templates that are provided should allow those who are not deterred by LaTeX format to quickly start writing their own MCQs. Usage notes Numerical limitations In the present version (starting with version 0.156), the maximum number of students per test is limited to 4 095, and the maximum number of pages per test is limited to 63 ( Modifiable default values, see ). The maximum number of answers for a given question is limited to 199 (Unmodifiable default value). LaTeX's own limitations may make compilation impossible, producing e.g. a « No room for a new \toks » error. In that case, try again using the package etex, thanks to the \usepackage{etex} command. Versions Even though it should not have too many consequences, it is recommended not to change the program version while working with a given project (between the time when the test sheets are printed and the time when tests are corrected and graded). There are a few modifications which may interfere with AMC operating normally if you apply them while working with a given project: If you have compiled and printed with a version of AMC earlier than 0.155, and then handle the project with version 0.156 or later, add the option in the reference to the package automultiplechoice in the LaTeX file. Example: \usepackage[box,completemulti,versionA]{automultiplechoice} From version 0.262 on, the drawing of the checkboxes changed to be slightly larger, which may alter the layout of the test sheets. From version 0.267, if you want to produce A4 format test sheets, you have to state it explicitly in the LaTeX file: \documentclass[a4paper]{article} From version 0.394, if your LaTeX code needs package graphicx, you have to load it explicitly (earlier versions of AMC loaded it). The LaTeX command \AMCcode was rewritten in version 0.518. It is now more robust and configurable, but you will have to adapt the LaTeX sources you wrote for older versions to keep the same layout. From version 1.1.0, all AMC data is stored in SQLite databases instead of lots of XML files. The first time you open a project, old XML files will be converted to the new format. Installation With debian, Ubuntu, or a derived operating system, you can use the debian official repository and ubuntu AMC repositories. On Mandriva, openSUSE or Fedora, you can use prebuilt RPM packages. The installation procedure is described on the AMC web-site. You can also download the source code archive on the project download space, then use the following commands in a terminal: tar xvzf auto-multiple-choice_xxxx_precomp.tar.gz cd auto-multiple-choice-xxx make sudo make install Access Once the installation is made, the graphical user interface can be launched by choosing Applications Education Auto Multiple Choice in the Gnome general menu (or its KDE or other analog), but one can also use the auto-multiple-choice command. AMC-TXT syntax For users who are not ready to learn LaTeX (if not already familiar with this language), AMC includes a filter to process simple plain text files in a particular format, named AMC-TXT. This section is devoted to detail the syntax of AMC-TXT files. If you prefer use LaTeX to gain a fine-control over your questionnaires, skip to next section. Let us begin with a simple example: # AMC-TXT source file Title: My first AMC questionnaire Presentation: Please answer the following questions the best you can. * What is the capital city of Cameroon? + Yaounde - Douala - Kribi ** From the following numbers, which are positive? - -2 + 2 + 10 The file that contains your questionnaire must be a plain text file, UTF-8 encoded. This is the default encoding of several text editors, like gedit. Don't use a text editor that can format your text with bold, images, and so on, like OpenOffice/LibreOffice, or equivalent: these save your text with a lot of other data, and AMC won't be able to read it. The default font that will be used is libertine, an open source font that contains characters for a lot of languages. You have to install this font or choose another one (see options below). If you install AMC with a debian/ubuntu package, this font will be install together as a recommended package. You already understand AMC-TXT structure: some general options first, and then questions. Comments You can write some comments inside your AMC-TXT source file in lines beginning with a `#'. These lines won't be considered by AMC. General options Here are the options you can use (in any order): Lang: use it to specify a language the questionnaire is written in. At present, only DE (German), ES (Spanish), FR (French), IT (Italian), NL (Dutch), NO (Norwegian), PT (portuguese), JA (Japanese, see ) and AR (Arabic, see ) are supported. Without this option, English will be selected. You can also define the localized string used for another language (see the options). PaperSize: Sets the paper size. Possible values are A3, A4, A5, A6, B3, B4, B5, B6, letter, legal, ANSIA, ANSIB, ANSIC, ANSID, ANSIE. Title: The exam title, written on top of the sheet. Presentation: A text that presents the exam (length, rules...). ShuffleQuestions: If 1 (default), questions will be shuffled so that their order is different from one sheet to the other. If 0, the questions will always show with the same order as in your file. RandomSeed: One can modify the seed of the random number generator used to produce the shuffle, thanks to the option. If the value that is assigned ( to be chosen between 1 and 4194303) is modified, then the shuffling will differ. Of course, one must not modify this value after the test sheets have been printed. The value is recorded in the xy file (as \rngstate{1}{1527384}). The default value is equal to 1527384. Code: Give a positive integer value n to add boxes so that students will be able to code their student number on their sheets, with n digits. CodeDigitsDirection: Sets the direction for code's digits boxes (either vertical or horizontal). If unset, AMC will choose the direction from the number of digits (horizontal for small number of digits, and vertical for high number of digits). Columns: Give a positive integer value n to get a subject with n columns. CompleteMulti: If 1 (default), for multiple questions (those for which zero, one or several answers are correct), an answer "None of these answers are correct" will be added. Without it, it should be impossible to make a difference between "the student didn't answer for this question" and "the student thinks no answer is correct for this question". If you don't want this answer to be added, set this option to 0. L-None: Give a string to replace None of these answers are correct (see previous option). QuestionBlocks: If 1 (default), all questions will be enclosed in a invisible frame that prevents it to be split across several columns or pages. If 0, questions are allowed to be split if necessary: that can save pages at the cost of readability. L-Question: Give a translation of Question in your questionnaire, if you need. L-Name: Give a translation of Name and surname, a text written in the box where students are to write their identity. L-Student: Small text that asks students to code their student numbers and write their name, when option is used. TitleWidth: Width of the title zone, when is not used. Default value is .47\linewidth. NameFieldWidth: Width of the name field part. Usual LaTeX dimensions can be used. The default value is 5.8cm when is used, and .47\linewidth without . NameFieldLines: Number of lines in the name field box. Default is 2 when is used, and 1 otherwise. NameFieldLinespace: Line space in the name field box. Defaut value is .5em. Pages: Gives a minimal number of pages for each question sheet. If a question has less pages, some white pages will be added. When using a separate answer sheet, this option can be written (eg. ), where q will be the minimum number of pages for the question itself, and q+a the minimum number of pages for the whole sheet. ManualDuplex: If 1 (this is not the default value), each subject will consist of an even number of pages, so that the user can manually print the PDF subject for all students in one go in duplex mode. SingleSided: If 1 (this is not the default value), no blank page will be added between the question and the separate answer sheet, even if the question has an odd number of pages. This mode can be useful when the subjects are printed single-sided, or when it is not necessary to separate question and answer sheet. BoxColor: Color of the boxes to be filled by the students. This allows to print the boxes with some color that won't disturb too much the data capture (for example red, but some light gray can also be considered). The color has to be given as a valid xcolor color (see xcolor LaTeX package documentation for details), such as red, magenta, pink, lightgray, cyan, or in the form #RRGGBB, like #FFBEC8 for some light red. DefaultScoringS: Default scoring strategy for simple questions (questions for which one and only one answer is correct). See for details. The default value gives one point for the right answer, and zero for others. DefaultScoringM: Default scoring strategy for multiple questions (questions for which there can be zero, one or several correct answers). See for details. The default value is haut=2, so that a perfect answer gives 2 points, and each error (ticking a box that should not be ticked, or leaving a box that should be ticked unticked) takes one point off (keeping the score non-negative). LaTeX: Set this option to 1 if you want to use LaTeX commands in your texts. This allows for example to insert mathematical formulas, like $\sqrt{a+b}$. If 0 (default), all your texts will be written unmodified. LaTeX-Preambule: Give commands you want to be added to the LaTeX preambule (for example \usepackage commands). LaTeX-BeginDocument: Give commands to be inserted at the beginning of the LaTeX document environment (for example macro definitions). Disable: Gives a comma-separated list of features to disable. Current implemented features are verbatim (see ), images (see ), embf (see ) and local_latex (see ). PackageOptions: Gives some more options to pass to the automultiplechoice LaTeX package (see . Separate answer sheet To use separate answer sheets for your questionnaire, consider the following options: SeparateAnswerSheet: If 1, a separate answer sheet will be added. AnswerSheetTitle: Title of the answer sheet. AnswerSheetPresentation: Presentation of the answer sheet. For example, remind the students that the answers are to be given on this sheet only. AnswerSheetColumns: Number of columns for the answer sheet. AutoMarks: If 1, uses option (see ). Questions Simple questions (questions for which one and only one answer is correct) begin with a * at the beginning of the line, and multiple questions (questions for which there can be zero, one or several correct answers) begin with a **. Insert then the question itself, and the choices, introduced with a + for correct ones and with a - for wrong ones. Questions options Some options are available for questions. They must be separated by commas and enclosed by square brackets just after the leading *'s, as in the following example: *[ordered,horiz,id=sum] How much are one plus one? - 0 - 1 + 2 Available options for questions: horiz present choices horizontally, not on separated lines. columns=n make n columns for the choices. ordered don't shuffle the choices, keep the same order as in the description file. id=xxxx Give a name to the question, so as to locate the corresponding results easily in the exported spreadsheets. This name must contain only simple characters, without accents and LaTeX special characters such as _, ^, %... can also be used instead of for compatibility with old versions, but you should prefer using . indicative don't use this question score to compute the global student's score. next Use this option if you want the question to stay next to the previous one, even when using questions shuffling with general option. first Use this option to place the question always at the beginning of the group (see ). last Use this option to place the question always at the end of the group (see ). Scoring strategy You can set the scoring strategy for a particular question or choice enclosing it with braces just after the leading characters (*, **, + or -) and the possible options, as in the following example. See for details about the scoring strategy syntax. *{b=2,m=-1} What is the capital city of France? + Paris - Lille - Marseille - Ouagadougou -{-2} New York **[ordered,horiz,id=positive]{haut=1} From the following numbers, which are positive? - -2 + 2 + 10 Open questions You can define open question giving options (see ) enclosed with < and >, as in the following example: *<lines=4> Describe the moon. -[O]{0} O -[P]{1} P +[V]{2} V You should also consider using the following global options: L-OpenText: Text used to tell the student to write the answer on the separate answer sheet (if relevant). L-OpenReserved: Text to be written along the open questions boxes to tell the student not to consider these boxes. Multi-line You can always continue some text on the next lines (even if some of them are empty), provided that these following lines cannot be considered as the beginning of an option definition, of a question or of a choice. As an example, consider the following question: * How much are 2 + 2? - 0 + 4 - 10 This is a correct AMC-TXT question. However, it won't be treated as you'd like to, because here the second line is not considered as being the following of the first one, but form the first choice of the question! A similar problem arises from the following AMC-TXT question, where `Gershwin:' is considered as a general option definition... * You all know Georges Gershwin: he is a composer. When was he born? + in 1898 - in 1892 - in 1902 This is a correct way to write it: * You all know Georges Gershwin: he is a composer. When was he born? + in 1898 - in 1892 - in 1902 Note that line breaks can be inserted leaving an empty line, as: Presentation: Title Description of the exam. ** Difficult question. How many stars in the sky? - one - two - ten millions Title To get a title, enclose it between [== and ==]. Verbatim content To get a verbatim block (as computer code), enclose it between [verbatim] and [/verbatim]: * What does this program print? [verbatim] main( ) { printf("hello, world\n"); } [/verbatim] + [| hello, world |] - [| hello |] - [| world |] Bold, italic, typewriter, underlined To get bold text, enclose it between [* and *]. To get italic text, enclose it between [_ and _]. To get typewriter text, enclose it between [| and |]. To get underlined text, enclose it between [/ and /]. * What is the [*capital city*] of [_France_]? + Paris - Lille - Marseille Images You can add images in your document using the following syntax: ![height=2cm]images/bird.png! Here, the image images/bird.png that is located in the project directory will be appended with 2cm height. Options that can be used inside the square brackets are those from the \includegraphics LaTeX command (width=3cm or keepaspectratio for example). To get a centered image that is three quarters of the line width, use !{center}[width=.75\linewidth]images/map.pdf! Pieces of LaTeX code You can include some small parts of LaTeX code in your document, including it in double square brackets, as in: Questions with a [[\multiSymbole{}]] may have zero, one or more right answers. Questions groups You can group some question so that they stay together even when shuffling, with the following syntax: *( Questions about Martin Luther King. * When was he born? - in 1901 + in 1929 - in 1968 * When did he die? - in 1945 - in 1515 + in 1968 - in 1999 * Where was he born? + Atlanta - Memphis - New York *) End of questions on Martin Luther King. You can specify some options on groups, like: *([shuffle=false,columns=2] Questions about Martin Luther King. The following options are available: shuffle=xxx Give true or false to tell if you want to shuffle the questions inside the group. The default value if the global one, from the option. columns=n Number of columns for the group's questions. group=nom Give a name for the group (for internal matter). numquestions=n With this option, only the first n questions of the group will be used. If the questions are shuffled, this allows to get n questions chosen at random from the group. Question with option or are not affected (they are always inserted). Moreover, questions stuck together with option count as one single question. needspace=dimen Gives a height (dimension with unit, such as 4cm) necessary to begin with the group. If the remaining vertical space on the current page is lower than this value, the group will begin on the next page. Arabic language Writing a questionnaire in Arabic is a little special. Use of course option Lang: AR You can also consider the following global options: ArabicFont: This is the font used for Arabic text. Default value is Rasheeq, a font from the project ArabEyes (you can find it on debian/ubuntu in the ttf-arabeyes package). To insert texts with non-Arabic characters, you must turn on option and enclose these texts as a \textLR LaTeX command argument, as in \textLR{xelatex command}. Japanese language Japanese language questionnaires can be produced with option Lang: JA AMC will make some adjustments on the produced LaTeX source to allow Japanese characters to be included. In this case, AMC will use pTex to process the LaTeX file made from your AMC-TXT source file. AMC needs a recent version of pTex to work. Versions of pTex from texlive 2009, that can be found on old versions of some linux distributions, are not compatible. Including other files You can include other files with: IncludeFile: file-to-include.txt Be very careful when including a single file from different projects! Suppose for example that /home/alexis/questions-a.txt is included from projects A and B. You already processed project A, and you are currently working on project B. You update the scoring strategy of a question in /home/alexis/questions-a.txt, and also add another question. If you need to update the marks in project A with this new scoring strategy, AMC will also see a new question for which no data capture has been made, and this will spoil all your marks in A... LaTeX source file This section describes the LaTeX commands that allows you to design your exam answer sheets from a LaTeX source file. If you chose another format for your source file, you can skip this section. The MCQ can be described as a LaTeX file using the automultiplechoice package. You can check the LaTeX file you are designing at any moment by compiling it with the latex command, then visualizing the resulting dvi file. We start with a few examples giving quick illustrations of how to build LaTeX files for MCQs; the corresponding tex file are available as templates, so that one can create a new MCQ project starting with one of these templates. A simple example \documentclass[a4paper]{article} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[box,completemulti]{automultiplechoice} \begin{document} \onecopy{10}{ %%% beginning of the test sheet header: \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf Test\\ Examination on Jan., 1st, 2008\end{minipage} \namefield{\fbox{ \begin{minipage}{.5\linewidth} Firstname and lastname: \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }} \begin{center}\em Duration : 10 minutes. No documents allowed. The use of electronic calculators is forbidden. Questions using the sign \multiSymbole{} may have zero, one or several correct answers. Other questions have a single correct answer. Negative points may be attributed to \emph{very bad} answers. \end{center} \vspace{1ex} %%% end of the header \begin{question}{prez} Among the following persons, which one has ever been a President of the French Republic? \begin{choices} \correctchoice{René Coty} \wrongchoice{Alain Prost} \wrongchoice{Marcel Proust} \wrongchoice{Claude Monet} \end{choices} \end{question} \begin{questionmult}{pref} Among the following cities, which ones are French prefectures? \begin{choices} \correctchoice{Poitiers} \wrongchoice{Sainte-Menehould} \correctchoice{Avignon} \end{choices} \end{questionmult} % \AMCaddpagesto{3} } \end{document} A few extra details on this example: The packages inputenc and fontenc allow one to use the UTF-8 encoding. You can of course modify them depending on the encoding you want to use. The options used here for the automultiplechoice LaTeX package prevent questions from being split between two pages () and to automatically complete any multiple choice question by a standard answer allowing the student to mention that, in her/his opinion, none of the listed answers is correct (). The onecopy command produces as many (distinct) realizations of the MCQ test as desired (here 10). See  for an alternative syntax using an environment. Lines that start here describe the header of the test-sheet. The namefield command specifies where students write their name. The environments question and choices allow one to build a multiple choice question for which there is a single correct answer. A unique identifier for the question has to be specified (here: prez). The environments questionmult and choices allow one to build a multiple choice question that may have zero, one or several correct answers. Student are asked to check all the boxes corresponding to an answer that she/he thinks is correct, or the last box (added automatically thanks to the option used in the reference to the package in line 6). Uncomment this line to add enough blank pages to get a 3-pages copy (see). This marks the end of the onecopy command (started at line 9). An example with groups of questions and shuffling In this example, we want the order in which questions appear in the MCQ test to be different from one realization of the test to the other, but still keeping together questions dealing with the same subject. To this end, we create two groups of questions, within which questions are shuffled at random. \documentclass[a4paper]{article} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[box,completemulti]{automultiplechoice} \begin{document} %%% preparation of the groups \setdefaultgroupmode{withoutreplacement} \element{geographie}{ \begin{question}{Paris} In which continent is Paris? \begin{choices} \correctchoice{Europe} \wrongchoice{Africa} \wrongchoice{Asia} \wrongchoice{planet Mars} \end{choices} \end{question} } \element{geographie}{ \begin{question}{Cameroon} Which is the capital city of Cameroon? \begin{choices} \correctchoice{Yaoundé} \wrongchoice{Douala} \wrongchoice{Abou-Dabi} \end{choices} \end{question} } \element{histoire}{ \begin{question}{Marignan} In which year did the battle of Marignan take place? \begin{choiceshoriz} \correctchoice{1515} \wrongchoice{1915} \wrongchoice{1519} \end{choiceshoriz} \end{question} } \element{histoire}{ \begin{questionmult}{Nantes} What can be said about the \emph{Édit de Nantes}? \begin{choices} \correctchoice{It was signed in 1598} \correctchoice{Il has been revoked by Louis XIV} \wrongchoice{It was signed by Henri II} \end{choices} \end{questionmult} } %%% copies \onecopy{10}{ %%% beginning of the test sheet header: \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf History and geography\\ Examination on Jan. 1st, 2008 \end{minipage} \namefield{\fbox{\begin{minipage}{.5\linewidth} Firstname and lastname: \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage}}} %%% end of the header \begin{center} \hrule\vspace{2mm} \bf\Large Geography \vspace{1mm}\hrule \end{center} \insertgroup{geographie} \begin{center} \hrule\vspace{2mm} \bf\Large History \vspace{2mm}\hrule \end{center} \insertgroup{histoire} } \end{document} An example with a separate answer sheet In this example, one wants the check-boxes to be put together in a separate sheet. This makes cheating more difficult, and, more importantly, it is enough to scan a single sheet per student, which makes things easier if one has to do a manual scan. In this example, the number of questions is limited: they fit into a single page, so that such a layout would not be really useful in this particular case. It is up to you to modify this example in order to use this layout with a large number of questions! \documentclass[a4paper]{article} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[box,completemulti,separateanswersheet]{automultiplechoice} \begin{document} \AMCrandomseed{1237893} \def\AMCformQuestion#1{{\sc Question #1:}} \setdefaultgroupmode{withoutreplacement} \element{general}{ \begin{question}{prez} Among the following persons, which one has ever been a President of the French Republic? \begin{choices} \correctchoice{René Coty} \wrongchoice{Alain Prost} \wrongchoice{Marcel Proust} \wrongchoice{Claude Monet} \end{choices} \end{question} } \element{general}{ \begin{questionmult}{pref} Among the following cities, which ones are French prefectures? \begin{choices} \correctchoice{Poitiers} \wrongchoice{Sainte-Menehould} \correctchoice{Avignon} \end{choices} \end{questionmult} } \element{general}{ \begin{question}{nb-ue} How many different states were members of the European Union in Jan. 2009? \begin{choiceshoriz}[o] \wrongchoice{15} \wrongchoice{21} \wrongchoice{25} \correctchoice{27} \wrongchoice{31} \end{choiceshoriz} \end{question} } \onecopy{5}{ %%% beginning of the test sheet header: \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf Test\\ Examination on Jan. 1st, 2008 \end{minipage} \begin{center}\em Duration : 10 minutes. No documents allowed. The use of electronic calculators is forbidden. Questions using the sign \multiSymbole{} may have zero, one or several correct answers. Other questions have a single correct answer. Negative points may be attributed to \emph{very bad} answers. \end{center} \vspace{1ex} %%% end of the header \insertgroup{general} \AMCcleardoublepage % \AMCaddpagesto{3} \AMCformBegin %%% beginning of the answer sheet header {\large\bf Answer sheet:} \hfill \namefield{\fbox{ \begin{minipage}{.5\linewidth} Firstname and lastname: \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }} \begin{center} \bf\em Answers must be given exclusively on this sheet: answers given on the other sheets will be ignored. \end{center} %%% end of the answer sheet header \AMCform % \AMCaddpagesto{5} } \end{document}The following remarks should make the above example clearer : The option is what allows us to do what we wanted. One can re-define in this manner the way the questions are identified on the answer sheet (this line is optional). This page break is put before the special page where the check-boxes are put together. If one does recto-verso printing, it is preferable to use \AMCcleardoublepage so that this page is printed apart from the others. In the case of recto printing, one can simply use \clearpage. Uncomment to get three pages for the question part of each copy, see . (Here, the command is commented so no effect.) This command marks the beginning of the answer sheet part. Its use is necessary for the appropriate treatment of the questions which appear only in that part, e.g. those generated by \AMCcodeGrid. Students should normally write their name on the answer sheet! The LaTeX command AMCform writes all the check-boxes. Uncomment to get five pages for the whole copy (question+answer sheet), see . When one uses a separate answer sheet, letters (or digits, if one uses the option , see ) are written in the check-boxes. To achieve a correct detection of the checked boxes, one has to ask students to completely fill the relevant boxes (checking by simply drawing a cross would not suffice). One also has to tune the gray level threshold (defining the proportion of black dots in a box above which that box is considered to be checked) to a value of order 0.5. Description of the LaTeX commands Package options To use the automultiplechoice package, one uses the line \usepackage[...]{automultiplechoice}where the dots are replaced by a list of options separated by commas. Here are the available options: : sets the subject language to XX. At present, only DE (German), ES (Spanish), FR (French), IT (Italian), JA (Japanese), NL (Dutch), NO (Norwegian) and PT (Portuguese) are available. Several strings added by automultiplechoice will be translated, such as "None of these answers are correct", see option . : create a pdf file to fill. AMC does not automatically manage sending topics. : puts every question in a block, so that it cannot be split by a page break. You may occasionally cancel this option for each question with the command \AMCnobloc. {\AMCnobloc% \begin{question}{nb-ue} How many different states were members of the European Union in Jan. 2009? \begin{choiceshoriz}[o] \wrongchoice{15} \wrongchoice{21} \wrongchoice{25} \correctchoice{27} \wrongchoice{31} \end{choiceshoriz} \end{question} }% : same as , but inside the separate answer sheet. : automatically adds a "None of these answers are correct" choice at the end of each multiple question. Thus, for these questions, a distinction can be made between no answer and the answer consisting in treating none of the listed answers as correct. This behavior can be forced or canceled for a particular question using one of the commands \AMCcompleteMulti or \AMCnoCompleteMulti inside the corresponding questionmult environment. : stops the automatic shuffling of the answers for every question : stops the automatic shuffling of the group for the test (see ) : produces the corrected version of the MCQ test, not the test sheet itself.  : produces the corrected version of each MCQ test. : requires that all check-boxes be put together at the end of the test sheet (usually, this option is used when one wants to have only one sheet to scan per student - see the example in ). : if one uses the option, the option requires the question to be identified with digits rather than with letters (which corresponds to the default setting). : when using , this option asks to print letters (or digits) outside the boxes on the answer sheet.  : initializes the random generator from time. This option is only for testing: don’t use it for a real exam! : when not using , this options asks to print letters (or digits) inside the boxes to be filled by the students. : use this option to make a catalog of your questions to be used to compose future exams. No need to use \onecopy with this layout. : use this option if you want to give the correct answers after scans analysis, from a teacher completed answer sheet - see for details.  : cancels the use of the optional parameter of \insertgroup and \copygroup, so that each group is always fully inserted and fully copied. (see )  :If you choose to change the boxes' shape (square by default, see ) as ovals or circles, you may communicate this option to automultiplechoice to use rather than to store the design of the boxes. : in mode, use this option if you want to cancel marks printing on the subject pages. They will only be print on the answer sheet pages. To change the way pages numbers are print on the subject pages, redefine the \AMCsubjectPageTag command: \renewcommand\AMCsubjectPageTag{% \fbox{\texttt{\the\AMCid@etud:\thepage}}% } Only use option if no data are to be collected on the subjects pages, as AMC won't be able to process these pages. : use this option if you don't need margins, corner circles and page identification boxes, that is if the document is not intended to be used with AMC (for example to produce exercises lists). Description of a copy The LaTeX source code describing the content of the test sheet has to be included in a call to the command \onecopy, the first argument being the number of distinct realizations to be produced, and the second argument being the code used to generate a realization. \onecopy{50}{ ... } An alternative syntax is available, using the examcopy environment, where the number of realizations is an option (default is 5). \begin{examcopy}[50] ... \end{examcopy} To use examcopy, you need the environ package to be installed, which is not available in the TeX Live 2007 distribution, still used in Ubuntu distributions up to version 9.10 (Karmic Koala). To differentiate between odd and even-numbered copy, use \exemplairepair command. The command \AMCStudentNumber get the copy number. Questions and answers For simple questions (a single correct answer), one uses the following model: \begin{question}{identifier} Here is the question... \begin{choices} \correctchoice{The correct answer} \wrongchoice{A wrong answer} \wrongchoice{Another wrong answer} \end{choices} \end{question} One must use a different identifier for every question. An identifier can be made of digits, letters, and simple characters (but do not use e.g. underscores, braces or brackets, that have a special meaning in LaTeX files). Don't end your question identifier with an integer enclosed in square brackets, as this syntax is reserved to codes input. The maximum number of answers for a given question is limited to 199. Do not nest a question in a another environment question otherwise the notes' export will be incomplete (see ). To keep the original order of the answers and prevent shuffling for this specific question, one can use the option of the environment, replacing line 3 by the following:\begin{choices}[o] To put the answers on two columns, one can use the multicol package: load it in the preamble (just after the reference to the package automultiplechoice for instance) with \usepackage{multicol}and include the choices environment inside a multicols environment in the following manner:\begin{multicols}{2} \begin{choices} \correctchoice{The correct answer} \wrongchoice{A wrong answer} \wrongchoice{Another wrong answer} \end{choices} \end{multicols} For even shorter answers, one can require questions to be printed following one another, using the environment instead of . Multiple questions (those for which no, one, or several answers can be correct) use the environment instead of . When the answer to the question is not supposed to be taken into account in the grading, one uses the \QuestionIndicative command, as in the following example: \begin{question}{difficulty}\QuestionIndicative \scoring{auto=0,v=-1,e=-2} Did you find this class easy or difficult? Please answer on a scale from 0 (very difficult) to 5 (very easy). \begin{choiceshoriz}[o] \correctchoice{0} \correctchoice{1} \correctchoice{2} \correctchoice{3} \correctchoice{4} \correctchoice{5} \end{choiceshoriz} \end{question} Last choice You may force AMC to let one or more answers as last choices with the command \lastchoices. \begin{question}{color} Which color? \begin{choiceshoriz} \wrongchoice{red} \wrongchoice{blue} \wrongchoice{yellow} \lastchoices \correctchoice{transparent} \wrongchoice{can't say} \end{choiceshoriz} \end{question} \begin{questionmult}{number} How many? \begin{choiceshoriz} \wrongchoice{none} \correctchoice{one} \wrongchoice{two} \wrongchoice{three} \lastchoices \correctchoice{not so much} \wrongchoice{a lot} \end{choiceshoriz} \end{questionmult} Question numbers One can modify the number of the next question with the \AMCnumero command. At the beginning of each realization of the test, a call to \AMCnumero{1} is performed, but this command can be used at any place. When you want to hide the number for a particular question and do not want to increase the question number, use \AMCquestionNumberfalse command as in the following example: { \AMCquestionNumberfalse \def\AMCbeginQuestion#1#2{} \begin{question} ... \end{question} } Explanation for the answers of a question To provide explanation for the answers of a question, one can use the \explain command. The explanations are optional and are only displayed in the Solution and Catalog file. Not displayed in the individual solution Here is a simple example: \begin{question}{explanation} Which has the highest elevation among the following? \begin{choices} \correctchoice{Sagarmatha} \wrongchoice{K2} \wrongchoice{Mont Blanc} \wrongchoice{Aconcagua} \end{choices} \explain{Sagarmatha which literally means `Head of sky' is the native name of Mount Everest, the highest mountain in the world.} \end{question} The explain command can be used inside like environments only. This includes , and environments. By default this command prints Explanation: before each explanations. This behavior can be changed using the \AMCtext command (see section ). If you want to change this default behavior only for some questions and not for all just use the \AMCtext command before the \explain command as in the following example: \begin{question}{elevation} Which has the highest elevation among the following? \begin{choices} \correctchoice{Sagarmatha} \wrongchoice{K2} \wrongchoice{Mont Blanc} \wrongchoice{Aconcagua} \end{choices} \explain{Sagarmatha which literally means `Head of sky' is the native name of Mount Everest, the highest mountain in the world.} \end{question} \begin{question}{odd} Pick the odd one out. \begin{choices} \correctchoice{Kilimanjaro} \wrongchoice{Himalayas} \wrongchoice{Alps} \wrongchoice{Andes} \end{choices} \AMCtext{explain}{\textit{\textbf{Reason: }}} \explain{Kilimanjaro is a mountain while the rest are mountain ranges.} \end{question} \begin{questionmult}{himalaya} Among the following which is in the Himalayas? \begin{choices} \correctchoice{Mount Everest} \correctchoice{K2} \wrongchoice{Mont Blanc} \wrongchoice{Aconcagua} \end{choices} \explain{Aconcagua is located in the Andes mountain range while Mont Blanc is located in the Alps.} \end{questionmult} This will now print Explanation: before the explanations of first and third question but Reason: before the explanation of second question. Putting answers on multiple columns To put answers on several columns (and thus save space), one can embed the environment in a environment, using the LaTeX package multicol. If, moreover, the answers do not fit into a single line, an answer might be split over several columns, which might be a little puzzling for the reader. The \AMCBoxedAnswers command was defined in order to prevent this phenomenon, by embedding each answer into a box. Here is an example of use: \begin{question}{two columns} What is a bird ? \begin{multicols}{2}\AMCBoxedAnswers \begin{choices} \correctchoice{It is an animal with wings, laying eggs. There are birds with all sorts of colors.} \wrongchoice{It is a large piece of furniture, made of wood, and used most of the time to store household linen} \wrongchoice{It is a steam machine devised to seal cans at high speed.} \end{choices} \end{multicols} \end{question} Let us note that it is also possible to parameterize the vertical space between two answer blocks, thanks to the dimension AMCinterBrep: \AMCinterBrep=.5ex Space between answers Let us note that it is also possible to parameterize the vertical space between many answer blocks, thanks to the dimension AMCinterIrep: \AMCinterIrep=.75ex Define the marks' display area You may add an additional option of marking area (see ) with the package tikz. \usepackage{tikz} Without the <option>separateanswersheet</option> option Type this command after \begin{document} and before the command \onecopy : \AMCsetScoreZone{width=1.5em,height=1.5ex,depth=.5ex,position=margins} The variables width, height, depth describe the dimensions of the box marking and its location on the sheet. The position value may be equal to : none, question, margin, margins. With the <option>separateanswersheet</option> option Type this command after \begin{document} and before the command \onecopy : \AMCsetScoreZoneAnswerSheet{width=1.5em,height=1.5ex,depth=.5ex,position=question} The variables width, height, depth describe the dimensions of the box marking and its location on the sheet. The position value may be equal to : none, question, margin, margins. The option does not work with AMC-TXT. Don't type one of those commands after printing. Groups of questions Putting questions into groups allows one to shuffle questions inside these groups, in a different way for each realization of the test. Every group of questions must have a name formed solely with plain letters. One can put questions in a group one by one, as in the following example. \element{mygroup}{ \begin{question}{easy} So, how much is one plus one? \begin{choiceshoriz} \correctchoice{two} \wrongchoice{zero} \wrongchoice{three} \end{choiceshoriz} \end{question} } The formation of the group, using the element commands, must be made only once: thus, these commands have to be used before the onecopy command, which repeats some actions for every realization. Finally, the group content can be output to the test sheet using command insertgroup, as in\insertgroup{mygroup} Group insertion can be controlled by the group mode, that can be set by the setgroupmode command (called after group creation, once for all, before onecopy): \setgroupmode{mygroup}{XXX} where XXX can be one of the following: fixed with this mode, group's elements are taken from the beginnig at each insertion. cyclic the elements will be taken from the group following the last call group’s use, recycling if necessary. withreplacement the same as fixed, but the group is shuffled before each use. withoutreplacement like cyclic, adding some shuffling when comming back to the beginning of the group. Note that a default group mode can be set for all groups that will be created next (a group is created at the first element call), using the command \setdefaultgroupmode{XXX} Without any mode definition, the fixed mode is used. Once a group is formed, it is possible to shuffle questions inside this group using the shufflegroup command. For instance\shufflegroup{mygroup} However, the command shufflegroup can always be replaced by a proper use of group modes. Delete the command \shufflegroup if you rerun created tests with a AMC version lower to 1.2.2014.111201 and if you change the default mode (fixed). Groups of questions can be manipulated more precisely thanks to the following commands: \insertgroup[n]{mygroup} (using optional parameter n) only inserts the n first elements from the group. \insertgroupfrom[n]{groupname}{i} The command does the same as \insertgroup[n]{groupname}, starting from element at index i (the first element has index 0). \cleargroup{mygroup} clears all group content. \copygroup{groupA}{groupB} copies all the elements from group groupA to the end of group groupB. With an optional argument n, only the n first elements will be copied: \copygroup[n]{groupA}{groupB}. With these commands, you can for example make a exam taking 4 questions from group GA at random, 5 questions from group GB at random, and all the questions from group GO, shuffling all these questions, with the following code (to be used inside the argument of the command onecopy, and supposing that the group mode of groups GA, GB and all is withoutreplacement or withreplacement): \cleargroup{all} \copygroup[4]{GA}{all} \copygroup[5]{GB}{all} \copygroup{GO}{all} \insertgroup{all} \copygroupfrom[n]{groupA}{groupB}{i} The command does the same as \copygroup[n]{groupA}{groupB} starting from element at index i (the first element has index 0). Page size, margins The automultiplechoice LaTeX package uses geometry to set the margins and page layout. You can overwrite its settings using the \geometry command just before the \begin{document} - see the geometry package documentation for details. The values initially set by AMC are: \geometry{hmargin=3cm,headheight=2cm,headsep=.3cm,footskip=1cm,top=3.5cm,bottom=2.5cm} When reducing the margins to gain some space, keep in mind that: The four corner marks must be printed entirely (they could disappear due to the printer margins). The four corner marks must be entirely visible on the scans (if they are too close from the border and the paper moved a little or turned a little during scanning, this could not be the case). It is also possible to set the paper size as an option to add to the list given as argument to the \geometry command. Available values include a4paper, a5paper, a6paper, b4paper, b5paper, ansibpaper, ansicpaper, ansidpaper, letterpaper, executivepaper, legalpaper. For small paper sizes, it may also be interesting to change the position of the human readable sheet IDs (like +1/1/53+) in the header. This can be done using the \AMCidsPosition command, in the form \AMCidsPosition{pos=p,width=w,height=h} where p can be none, top or side, and the dimensions w and h refers to the (invisible) box containing the ID. The default values are \AMCidsPosition{pos=side,width=4cm,height=3ex} Let us end with an example for A5 paper sheets: \geometry{a5paper,hmargin=1.6cm,top=2.5cm} \AMCidsPosition{pos=top} Do not load package pgfpages or any other layout applications Check-box presentation style The \AMCboxStyle (new name for the \AMCboxDimensions command which still compatible with the options) allows one to modify one or several dimensions of the check-boxes. Default values are : \AMCboxStyle{shape=square,size=2.5ex,down=.4ex,rule=.5pt,outsidesep=.1em,color=black} is the shape of the boxes. Use the value square to get squares or rectangles, and oval to get circles or ovals. Note that the LaTeX package tikz must be loaded for oval to work. is the width of the box; is the height of the box; is the size ( and ) of the box; is the thickness of the boundary of the box; controls by how much boxes are pushed down. for the distance between the box and the letter when printed outside the box when the option is choosen (see ). only displayed on the answer sheet, shows the good answer with a cross instead of filling in black the box only displayed on the answer sheet, is the thickness of the cross. gives the color to be used to draw boxes. The color col must be compatible with the xcolor package. For example, some names such as red can be used. You can also define your proper color, as in \definecolor{mylightgreen}{rgb}{0.67,0.88,0.5} \AMCboxStyle{color=mylightgreen} To obtain smaller boxes, one can e.g. use the command \AMCboxStyle{size=1.7ex,down=.2ex} When using package option, you can also customize the boxes labeling. The default behavior is to use uppercase alphabetical labeling, or arabic numbering if the package option is used. To use your own labeling, one has to redefine the \AMCchoiceLabel command which takes as argument the name of the counter used to number the choices. For example, the following code will ask for lowercase letters to label the boxes: \def\AMCchoiceLabel#1{\alph{#1}} As an other example, when using arabxetex package, the following code may be useful: \def\AMCchoiceLabel#1{\textLR{\Alph{#1}}} One can also change the style of the boxes labels redefining the \AMCchoiceLabelFormat command, as in the following example (here we need bold labels): \def\AMCchoiceLabelFormat#1{\textbf{#1}} One can also change the style of the outside labels redefining the \AMCoutsideLabelFormat command, as in the following example (here we need bold labels): \def\AMCoutsideLabelFormat#1{\textbf{#1}} The switch used to tick or not correct answers is \AMC@correctrue. You can define a command to set it to true, just after the \begin{document}. \makeatletter \def\AMCforcecorrect{\AMC@correctrue} \makeatother and then use it for a particular question (enclose in braces to limit its effect to one question): {\AMCforcecorrect\begin{questionmult}{test}\QuestionIndicative ..... \end{questionmult} } You should tell AMC not to count points for this question (with a 0-point scoring, or using \QuestionIndicative). Questions presentation style The way each question is presented can be modified by redefining the LaTeX command AMCbeginQuestion, whose default definition is the following: \def\AMCbeginQuestion#1#2{\par\noindent{\bf Question #1} #2\hspace*{1em}} The first parameter transmitted to this command is the number of the question to be displayed. The second parameter contains \multiSymbole in the case of a multiple question, and is void in all other cases. The \multiSymbole command too can be modified: its goal is to distinguish multiple questions from the others. By default, it displays a club. \def\multiSymbole{$\clubsuit$} With nominative sheets (see ), set up it with a new command in the preamble. \def\Iswitch{\def\AMCbeginQuestion##1##2{}\AMCquestionNumberfalse} and use it when you need it. (Do not forget to type inside brackets to limit the effect) : {\Iswitch \begin{question}{Number} Choose the greater. \begin{choiceshoriz}[o] \wrongchoice{200}\wrongchoice{2}\wrongchoice{20}\wrongchoice{200}\correctchoice{600} \end{choiceshoriz} \end{question} } The display of answers can be modified in the same fashion, if one uses the environment instead of or , redefining the three following LaTeX macros: \def\AMCbeginAnswer{} \def\AMCendAnswer{} \def\AMCanswer#1#2{#1 #2} Inside the commande \onecopy, double the #. \def\AMCanswer##1##2{##1 ##2} \def\AMCbeginQuestion##1##2{} One can also change spacing redefining the following dimensions (here are the default values): \AMCinterIrep=0pt \AMCinterBrep=.5ex \AMCinterIquest=0pt \AMCinterBquest=3ex \AMCpostOquest=7mm \setlength{\AMChorizAnswerSep}{3em plus 4em} \setlength{\AMChorizBoxSep}{1em} These dimensions are the vertical space between questions (quest) or answers (rep), in boxed mode (B, with \AMCBoxedAnswers or package option) or standard mode (I) and the space left after an open question. The two last lengths are used in environment: Layout Margins Margins were chosen so that the document prints correctly on most printers. If your printer reduces, you can use the command geometry from laTex package geometry. For example, In order to narrow the top margin's copies, we can use \geometry{top=3cm} instead the default value 3.5cm, just before \begin{document}. Number of pages AMC automatically handles the number of pages for each subject. You can choose to fix a identical number of pages for each subject with the command \AMCaddpagesto{integer} to be called at a place you need to reach this number of pages (usually at the end of the copy description or between the question and the answer sheet). Separate answer sheet presentation style It is also possible to modify the layout of the separate answer sheet produced with the option (see  ). If one only wants to modify the horizontal spacing between two check-boxes or the vertical spacing between two questions, one just has to redefine the following dimensions: \AMCformHSpace=.3em \AMCformVSpace=1.2ex For a deeper modification of the display settings, one can also redefine the commands that are used at the beginning of each question and for each answer: \def\AMCformBeforeQuestion{\vspace{\AMCformVSpace}\par} \def\AMCformQuestion#1{\textbf{Question #1:}} \def\AMCformAnswer#1{\hspace{\AMCformHSpace} #1} These definitions have to be inserted just after \begin{document} in the LaTeX file. You can force AMC not to respect the arrangement of the questions and to store the open questions in order to restore them together. This can be useful when you use package multicols, the answers to open questions needing more space when hand written. The command \AMCformFilter {!\AMCifcategory {open}} displays all questions except the open questions then the command \AMCformFilter {\AMCifcategory {open}} displays only the open questions. Both commands must be used together. %On two columns, the answers boxes are displayed %except the open questions. \begin{multicols}{2} \AMCformFilter{!\AMCifcategory{open}} \end{multicols} %All the open questions are displayed. \AMCformFilter{\AMCifcategory{open}} The ascending numbering is always respected. Code acquisition Code acquisition can be easily performed thanks to the LaTeX command \AMCcodeGridInt[options]{key}{n}, for instance to allow each student to enter her/his student number by herself/himself on the answer sheet. The two arguments of this command are a code/question key (identifier), and the number n of digits to be used by the code. One can e.g. use the following header {\setlength{\parindent}{0pt}\hspace*{\fill}\AMCcodeGridInt{etu}{8}\hspace*{\fill} \begin{minipage}[b]{6.5cm} $\longleftarrow{}$\hspace{0pt plus 1cm} please encode your student number below, and write your first and last names below. \vspace{3ex} \hfill\namefield{\fbox{ \begin{minipage}{.9\linewidth} Firstname and lastname: \vspace*{.5cm}\dotfill \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }}\hfill\vspace{5ex}\end{minipage}\hspace*{\fill} } If the option is used, the \AMCcodeGridInt command has to be placed after the \AMCformBegin command. Note that the codes rendering can be adapted modifying the lengths \AMCcodeHspace, \AMCcodeVspace representing the horizontal and vertical amount of space between boxes. Default values are set with the following commands: \AMCcodeHspace=.5em \AMCcodeVspace=.5em The command \AMCcodeGrid[options]{key}{description} can be used to handle more complex codes, as codes including letters. Here, description is a coma-separated list of character pools to offer. As an example, a client code formed with a lettre from A to E followed by three digits can be handled with \AMCcodeGrid{client}{ABCDE,0123456789,0123456789,0123456789}. The two commands \AMCcodeGrid and \AMCcodeGridInt accept the following options (coma-separated into the optional options argument): vertical=bool where bool is true or false, to indicate the direction to be used (the default value is true); v is an alias for vertical=true; h is an alias for vertical=false; top allows to get top-aligned columns in vertical direction. Open questions One can sometimes require some open questions to be added to the subject. One way to do so is to reserve boxes use to the teacher for these questions. After the exam, the teacher reads the completed answer sheets and tick the boxes according to the answers written by the students for open questions. He will then scan the sheets and let AMC correct the multiple choice questions and integrate the open questions scores into the marks.\begin{question}{open} Define \emph{inflation}. \AMCOpen{lines=5}{\wrongchoice[W]{w}\scoring{0}\wrongchoice[P]{p}\scoring{1}\correctchoice[C]{c}\scoring{2}} \end{question} In this example, the teacher will get three boxes. If the first (labeled W for wrong) is ticked, the student will get 0 points. If the second (labeled P for partial) is ticked, the student will get 1 point. If the third (labeled C for correct) is ticked, the student will get 2 points. The first argument to \AMCOpen is a comma separated list of options. The available options are: lineup=bool if true, the answering area and the scoring boxes will be on the same line. If false (this is default), the answering area is enclosed in a frame and placed below the scoring boxes. lineuptext=text if lineup=true, the text and ansewering area will be on the same line. lines=num sets the number of lines for the answer. Default value is 1. lineheight=dim sets the height of each line. Default value is 1cm. dots=bool if true (Default), each line will be realized by a line of dots. contentcommand=cmdname Use this option if you want to customize the content of the answer area. You will have to define a \cmdname command that has to produce the content. hspace=dim sets the space between boxes in the marking area. backgroundcol=color sets the background color of the marking area. foregroundcol=color sets the foreground color of the marking area. scan=bool if false, the boxes are not scanned (this can be useful if you plan to use manual data capture only to mark this question, and don't want to take into account the students drawings on the boxes). Defaults to true. annotate=bool if false (default value), the boxes from this question won't be annotated when annotating the answer sheets (only the score will be written). question=text sets a short text that helps the examiner to identify the question. This text will be written before the scoring boxes, only if a separate answer sheet is used. The question's identifier will be displayed if you type question in the options list. answer=text sets a short text that will be written in the answering area for corrected answer sheets. Use the command \savebox, outside the onecopy command, to display a longer text with linebreaks. \newsavebox{\correcbox} \savebox{\correcbox}{\parbox{5cm}{\color{red}{Here a linebreak\\or\\here...}}} Call out the boxe's contents: \AMCOpen{lines=4,lineheight=0.15cm, answer= \usebox{\correcbox}}{Question} width=dim sets the width of the frame enclosing the answering area when lineup=false. Default value is .95\linewidth. framerule=dim sets the line width for the frame enclosing the answering area. framerulecol=color sets the frame color for the answering area. boxmargin=dim sets the margin around the scoring boxes. boxframerule=dim sets the line width for the frame around the scoring boxes. boxframerulecol=color sets the color of the frame around the scoring boxes. You can set other default values (for the whole exam) for all these parameters using the command \AMCopenOpts, like \AMCopenOpts{boxframerule=2pt,boxframerulecol=red} Moreover, a little text can be written in the marking area to tell the students not to tick these boxes, redefining the \AMCotextReserved command, as: \def\AMCotextReserved{\emph{Reserved}} When using separate answer sheets, the text added to each open question can also be defined, as: \def\AMCotextGoto{\par{\bf\emph{Please write the answer on the separate answer sheet.}}} if the number of boxes is significant, use this tip (\parbox) to force a linebreak. \AMCOpen{lines=6}{ \hbox{\parbox{8.5cm}{ \correctchoice[1]{1}\scoring{b=1} \correctchoice[2]{2}\scoring{b=2} \correctchoice[3]{3}\scoring{b=3} \correctchoice[4]{4}\scoring{b=4} \correctchoice[5]{5}\scoring{b=5} \correctchoice[6]{6}\scoring{b=6} \correctchoice[7]{7}\scoring{b=7} \correctchoice[8]{8}\scoring{b=8} \correctchoice[9]{9}\scoring{b=9} \correctchoice[10]{10}\scoring{b=10} \wrongchoice[F]{F}\scoring{b=0} }} } One-letter answers Sometimes this is not necessary to write some long text to describe answers, and one letter or symbol is enough. When using a separate answer sheet, it is quite annoying to print the boxes both on the question and on the answer sheet. In such cases, use \AMCBoxOnly instead of the choices environment: \begin{question}{arm} Which letter shows the \textit{arm} on the diagram? \AMCBoxOnly{ordered=true}{\wrongchoice[A]{}\correctchoice[B]{}% \wrongchoice[C]{}\wrongchoice[D]{}} \end{question} The first argument to \AMCBoxOnly is a comma separated list of options. The available options are: help=text prints some reminder text before the boxes on the separate answer sheet. ordered=bool if true (the default value is false), the answers won't be shuffled. Choice of shuffling parameters One can modify the seed of the random number generator used to produce the shuffle, thanks to the following command (to be used just at the beginning of the document, and in any case outside the onecopy command): \AMCrandomseed{1527384} If the value that is assigned (to be chosen between 1 and 4194303) is modified, then the shuffling will differ. Of course, one must not modify this value after the test sheets have been printed. The value is recorded in the xy file (as \rngstate{1}{1515}). The default value is 1515. Using sectioning and separate answer sheet For sectioning to be also visible in the separate answer sheet (if any), use \AMCsection and \AMCsubsection instead of \section and \subsection (\AMCsection* and \AMCsubsection* are also defined, for unnumbered sectionning) Using references inside the test sheets Using LaTeX commands \label, \ref and \pageref within questions or answers is problematic since they will be called with the same arguments for every realization of the test, which will alter the numbering of references. To solve this problem, one should use instead the commands \AMClabel, \AMCref and \AMCpageref: they add the realization number to their argument before transmitting it to \label, \ref and \pageref. Since the version 1.2.2015.102901, you don't have to use the command \AMCqlabel to label a question but type \AMClabel. The old command remain compatible with your previous tex files/exams. One also has to reset counters to zero at the beginning of each realization. For instance, if one wants to include references to pictures that are put together in a separate page, one might write something like \element{animals}{ \begin{figure}[p] \centering \includegraphics[width=.6\linewidth]{tiger} \caption{An animal} \AMClabel{tiger} \end{figure} \begin{question}{tiger} Which is the animal on figure~\AMCref{tiger} page~\AMCpageref{tiger}? \begin{choices} \correctchoice{A tiger} \wrongchoice{A giraffe} \wrongchoice{An elephant} \wrongchoice{A cat} \end{choices} \end{question} } and it is then important to add, just after the command \onecopy the line \setcounter{figure}{0} so that the numbering of figures starts at 1 for every realization. Without that last command, the numbering of figures would go on from one realization to the next one, which is clearly not desirable. Using the package cleveref This package sort in an ascending order the questions' numbers, the questions' pages or the labels' pages (the documentation http://mirrors.ctan.org/macros/latex/contrib/cleveref/cleveref.pdf). This package must be loaded after the package automultiplechoice. To use this package, a new command was created: \AMCstudentlabel. \cref{\AMCstudentlabel{led},\AMCstudentlabel{lamp},\AMCstudentlabel{motor}} led, lamp, motor are the created labels to reference the questions with the command \AMClabel{}. Customizing some texts inserted by AMC Use \AMCtext for the following customizations: \AMCtext{none}{sentence} replaces « None of these answers are correct. » (the English default text) with the given sentence when using option . \AMCtext{corrected}{title} replaces « Corrected » (the English default text) with the given title on the corrected answer sheet. \AMCtext{catalog}{title} replaces « Catalog » (the English default text) with the given title on the questions catalog produced thanks to option . \AMCtext{explain}{title} replaces « Explanation » (the English default text) with the given title before the explanations produced due to the explain command. The default option for this command is: \AMCtext{explain}{\textit{\textbf{Explanation: }}} You can also consider using commands like the following ones (here the second argument is set to the default English value): \AMCtext{draft}{DRAFT} \AMCtext{message}{For your examination, preferably print documents compiled from auto-multiple-choice.} \AMCsetFoot{text} sets the footer. Use for example \AMCsetFoot{\thepage} to write the page number. Binary code AMC identifies each test and the page number of test with the binary code. First row : 12 boxes (default value) : maximum number of tests = 2^12-1 = 4 095. Second row : 6 first boxes (default value) : maximum number of pages per tests = 2^6-1 = 63. Second row : 6 last boxes (default value) : check code. To raise the number of tests and/or pages per test modify the commands' default values \AMC@NCBetud, \AMC@NCBpage et \AMC@NCBcheck. Load those commands below in the preambule (here with the default values). \makeatletter \def\AMC@NCBetud{12} \def\AMC@NCBpage{6} \def\AMC@NCBcheck{6} \makeatother Options for AMC You can add in the source file header (the first lines that begin with a '%') some options to be passed to AMC: %%AMC:preprocess_command=commandname tells AMC to run the commandname command before calling LaTeX to process the source file. This command will be run inside the project directory, and the name of a source file copy will be passed as an argument. There is no problem for commandname to change this file content, because this is only a copy. %%AMC:latex_engine=engine tells AMC to set the LaTeX engine to use for this file, regardless to the one entered as a preference by the user. Mathematical questions with randomized statements Using package fp Thanks to the LaTeX package fp, whose documentation is available at http://mirrors.ctan.org/macros/latex/contrib/fp/README, and which can be downloaded with the command \usepackage{fp}added before that corresponding to automultiplechoice, one can create exercises with randomized numerical data. Let us start with a simple example. \begin{question}{addition} \FPeval\VQa{trunc(1+random*8,0)} \FPeval\VQb{trunc(4+random*5,0)} \FPeval\VQsomme{clip(VQa+VQb)} \FPeval\VQnonA{clip(VQa+VQb-1)} \FPeval\VQnonB{clip(VQa*VQb)} \FPeval\VQnonC{clip(VQa-VQb)} What is the sum of \VQa{} and \VQb{} ? \begin{choiceshoriz} \correctchoice{\VQsomme} \wrongchoice{\VQnonA} \wrongchoice{\VQnonB} \wrongchoice{\VQnonC} \end{choiceshoriz} \end{question} The \FPeval command is used to perform computations: Since random returns a real number in the interval [0,1], this command sets VQa to a random integer value between 1 and 8. The next line sets VQb to a random integer value between 4 and 8. Putting the correct answer in the variable VQsomme. Putting wrong answers in variables VQnonA, VQnonB and VQnonC... Variable names beginning with VQ have been chosen so as to avoid interference with other LaTeX commands. You can set the random seed with \FPseed=integer integer must be fixed, and not computed from date/time values. Choosing an interval The automultiplechoice package moreover defines a \AMCIntervals command which makes this kind of construction simpler, as illustrated in the next example:\begin{question}{inf-expo-indep} \FPeval\VQa{trunc(2 + random * 4,0)} \FPeval\VQb{trunc(6 + random * 5,0)} \FPeval\VQr{VQa/(VQa+VQb)} Let $X$ and $Y$ be two independent random variables, following the exponential distribution with respective parameters \VQa{} and \VQb{}. To which interval does the probability $\mathbb{P}[X<Y]$ belong ? \begin{multicols}{5} \begin{choices}[o] \AMCIntervals{\VQr}{0}{1}{0.1} \end{choices} \end{multicols} \end{question} This lines inserts ten answers corresponding to the intervals [0,0.1[ [0.1,0.2[ ... [0.9,1[, while indicating that the correct interval is the one containing VQr. The arguments of the \AMCIntervals command are the following: The correct answer, The left point of the first interval, The right point of the last interval, The length of each interval. Note that the interval formatting can be changed redefining the \AMCintervalFormat command, which is originally defined as \def\AMCIntervalFormat#1#2{[#1,\,#2[} to follow local conventions (writing [a,b) instead of [a,b[ is for example a common usage). Coding the result The students can also be asked to code the numerical answer, using the \AMCnumericChoices command, as in the following example: \begin{questionmultx}{sqrt} \FPeval\VQa{trunc(5+random*15,0)} \FPeval\VQs{VQa^0.5} Compute $\sqrt{\VQa}$ and round it with two digits after period. \AMCnumericChoices{\VQs}{digits=3,decimals=2,sign=true, borderwidth=0pt,backgroundcol=lightgray,approx=5} \end{questionmultx} Note the use of questionmultx environment: we need this question to be multiple as several boxes has to be ticked, but we can’t say that several answers are correct, so we don’t show the symbol for multiple questions. Available options that can be used in the second argument of the \AMCnumericChoices command are the following (bool can be true or false, and color must be a color known by the xcolor package): digits=num gives the number of digits to request (defaults to 3). decimals=num gives the number of digits after period to request (defaults to 0). Note that when num is positive, the LaTeX package fp must be loaded. base=num gives the base for digits and decimals (defaults to 10). significant=bool if true, the numbers to code are the first significant digits from the first argument of \AMCnumericChoices. For example, the right answer to \AMCnumericChoices{56945.23}{digits=2,significant=true} is 57. exponent=num switch to scientific notation mode, with num digits for the exponent. nozero=bool if true, the choice 0 is removed for all digits. May be useful when using \AMCnumericChoices to enter small (<10) positive values. sign=bool requests (or not) a signed value (defaults to true). exposign=bool same for the exponent sign. strict=bool if true, a box has to be ticked for every digit (even null digits) and for the sign. If false, if some digits has no ticked box, they will be set to zero. Defaults to false. vertical=bool if true, each digit is represented on one raw. If false (default), each digit is represented on one line. expovertical=bool if true, the mantissa is above the exponent. If false (default), the mantissa is beside the exponent. reverse=bool if true, place higher values of the digits on the top in vertical mode (defaults to true). vhead=bool if true, in vertical mode, a header is placed over all digits rows, made using the command \AMCntextVHead that is originally defined as \def\AMCntextVHead#1{\emph{b#1}} This default value is useful to number the binary digits. Default value is false. hspace=space sets the horizontal space between boxes (defaults to .5em). vspace=space sets the vertical space between boxes (defaults to 1ex). borderwidth=space sets the width of the frame border around all the boxes (defaults to 1mm). bordercol=color sets the color of the frame (defaults to lightgray). backgroundcol=color sets the background color (defaults to white). Tsign=text sets the text to print at the top of the boxes to set the sign (Can also be redefined by \def\AMCntextSign{text}, and defaults to be empty). Tpoint=text sets the text for the period. Can also be redefined by \def\AMCdecimalPoint{text}, and defaults to \raisebox{1ex}{\bf .}. Texponent=text sets the text that separates mantissa and exponent. Can also be redefined by \def\AMCexponent{text}, and defaults to $\times10$\textasciicircum. scoring=bool if true, a scoring strategy is given to AMC for this question. Defaults to true. scoreexact=num gives the score for an exact answer (defaults to 2). exact=num sets the maximal distance to the correct integer value (value without the decimal point) for an answer to be said exact and be rewarded to scoreexact points (defaults to 0). scoreapprox=num gives the score for an approximative answer (defaults to 1). approx=num sets the maximal distance to the correct integer value (value without the decimal point) for an answer to be said approximative and be rewarded to scoreapprox points (defaults to 0). AMC converts all numbers (decimals included) to integers (simply removing the decimal point) before subtracting them and comparing with approx. As an example, with decimals=2, if the correct answer is 3.14 and the given answer is 3.2, then the integer difference is 320-314=6, so that the student gets scoreapprox points only if approx is 6 or greater. scorewrong=num gives the score for an wrong answer (defaults to 0). You can set other default values (for the whole exam) for all these parameters using the command \AMCnumericOpts, like \AMCnumericOpts{scoreexact=3,borderwidth=2pt} Moreover, the text added at the end of the questions using \AMCnumericChoices when not in the separate answer sheet (and when a separate answer sheet is requested by the separateanswersheet package option) can also be set redefining the \AMCntextGoto command, as: \def\AMCntextGoto{\par{\bf\emph{Please code the answer on the separate answer sheet.}}} Using package pgf/tikz This package must be declared after the package automultiplechoice. LaTeX package pgf/tikz (see http://www.ctan.org/tex-archive/graphics/pgf/base) provides mathematical functions that can be loaded with \usepackage{tikz} First of all, you must set the random seed to be sure to get the same result each time latex is run to compile the subject: \pgfmathsetseed{2056} A simple computation Here is an example with a simple computation: \begin{question}{inverse} \pgfmathrandominteger{\x}{1}{50} How much is the reciprocal of $x=\x$? \begin{choices} \correctchoice{\pgfmathparse{1/\x}\pgfmathresult } \wrongchoice{\pgfmathparse{1/(\x +1))}\pgfmathresult} \wrongchoice{\pgfmathparse{cos(\x)} \pgfmathresult} \wrongchoice{\pgfmathparse{\x^(-0.5)}\pgfmathresult} \end{choices} \end{question} Here, the command \pgfmathparse makes the computation, and \pgfmathresult outputs the result. Output formatting is also available with the command \pgfmathprintnumber, as in the following example (three digits after decimal point, and use of the comma as a decimal point). \begin{question}{inverse3} \pgfmathrandominteger{\x}{1}{50} \pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=3,use comma} How much is the reciprocal of $x=\pgfmathprintnumber{\x}$? \begin{choices} \correctchoice{\pgfmathparse{1/\x}\pgfmathprintnumber{\pgfmathresult}} \wrongchoice{\pgfmathparse{1/(\x +1))} \pgfmathprintnumber{\pgfmathresult}} \wrongchoice{\pgfmathparse{cos(\x)} \pgfmathprintnumber{\pgfmathresult}} \wrongchoice{\pgfmathparse{\x^(-0.5)} \pgfmathprintnumber{\pgfmathresult}} \end{choices} \end{question} You can also use the \AMCIntervals and \AMCnumericChoices commands (see and ) Graphics The tikz package also allows to make (random or not) graphs. \begin{questionmult}{graph} Let us consider the three functions which graphs are plotted below: \pgfmathrandominteger{\a}{2}{4} \begin{center} \begin{tikzpicture}[domain=0:4] \draw[very thin,color=gray] (-0.1,-4.1) grid (3.9,3.9); \draw[->] (-0.2,0) -- (4.2,0) node[right] {$x$}; \draw[->] (0,-4.2) -- (0,4.2) node[above] {$f(x)$}; \draw[color=red] plot (\x,{(1+\a/4)*\x-\a}) node[right] {$f_{1} (x)$}; \draw[color=blue] plot (\x,{\a*sin(\x r)}) node[right] {$f_{2}(x)$}; \draw[color=orange] plot (\x,{\a*cos(\x r)}) node[right] {$f_{3}(x)$}; \end{tikzpicture} \end{center} Then: \begin{choices} \pgfmathrandominteger{\x0}{2}{4} \correctchoice{$f_{2}(\x0)$=\pgfmathparse{\a*sin(\x0 r)} \pgfmathprintnumber{\pgfmathresult}.} \correctchoice{$f_{3}(\x0)$=\pgfmathparse{\a*cos(\x0 r)} \pgfmathprintnumber{\pgfmathresult}.} \wrongchoice{La fonction $f_{1}(x)$ est une fonction linéaire.} \end{choices} \end{questionmult} To make pretty graphs, package pgfplots can also be useful. With pgfmath, precision is limited, so that a "Arithmetic overflow" error can be encountered. Packages tikz and pgfplots allows to overcome this problem, using gnuplot as a backend. You need to install gnuplot on your system, and use LaTeX option . To this purpose, go to AMC preferences window, and set the LaTeX engine for your project to "" (without the quotes). Using LuaLaTeX LUA language can be used inside LaTeX documents thanks to the lualatex command. If you uses it, your document needs to be UTF-8 encoded, and you must not load the inputenc package. See http://www.luatex.org/documentation.html for some information. LUA commands are to be given as a \directlua argument. The most useful LUA function is tex.print, which will output results back to LaTeX. Once again, if you use random numbers, always fix the random seed to get the same results across different compilations: \directlua{math.randomseed (2048)} Here is a very simple sample source file: \documentclass[a4paper]{article} %\usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[box,completemulti]{automultiplechoice} \begin{document} \onecopy{10}{ %%% head \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf LuaLaTeX sample exam \end{minipage} \namefield{\fbox{\begin{minipage}{.5\linewidth} Name : \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage}}} %%% \directlua{math.randomseed (2048)} \directlua{a=math.random()} \begin{question}{square-root} How much is the square root of \directlua{tex.print(a)}? \begin{choices} \correctchoice{\directlua{tex.print(math.sqrt(a))}} \wrongchoice{\directlua{tex.print(math.sqrt(2*a))}} \wrongchoice{\directlua{tex.print(math.sqrt(a*1.001))}} \end{choices} \end{question} } \end{document} Output formatting can be obtained using lua functions, or with the siunitx package. You can also use the \AMCIntervals and \AMCnumericChoices commands (see and ) Use PSTricks Load this package after automultiplechoice. To use PSTricks, you have to configure AMC : Edit Preferences Main Default LaTex engine latex+dvipdf Usage - Graphical interface We shall describe here a usage example with the graphic interface from the conception of the multiple-choice test until the edition of students' scores. Creating a new project and subject Let's open the graphic interface. This can be done ordinarily by selecting Applications Education Auto Multiple Choice in the general menu of Gnome (or its equivalent in KDE or other), but the command auto-multiple-choice can be used directly. Let's now create a new project, thanks to Project New . A window opens and allows us to see existing project names (if any) and choose a name for our new project (made with simple characters; « test » will be OK for our short test), which we write in the field Project name. Then we push the New project button. Now we must choose a LaTeX file as a source for the multiple-choice. Several possibilities are shown: model: this choice allows to choose from models shipped with AMC an exam to customize later. file: this choice allows to choose a LaTeX file already prepared for this exam. Somebody may have prepared the exam for you, or you can have prepared the exam outside AMC, using your favorite LaTeX editor. empty: using this choice, an empty LaTeX file will be created. You have to edit it to compose the exam from zero. archive: use this choice if you have a zip or tgz archive containing the exam definition (LaTeX source file, along with image files, parameters file for example). This archive can be made by an external software. It can also be a backup of one of your AMC projects. For our test, let us choose model. The next window presents the models: choose for example Simple example from [EN] Documentation group. Now we can edit it to modify the shape of the document or the questions, thanks to the Edit LaTeX file button which launches the default editor. Preparing the subject Preparing a project is done in two steps. First we must make the reference documents from the LaTeX source file. This can be done by clicking the Update documents or Alt+U. The following documents are produced: The question. This file can be printed to distribute its pages to students (see below). The solution. We can check that the chosen responses there are the good ones. It is also made to be distributed to students. When produced, those documents can be viewed (and possibly printed) from the corresponding buttons. Now we can begin the last step of the preparation: analyzing the layout. It can be launched with the button Layout detection. This analysis detects, in every page of the subject, the exact position of every element which must be analyzed in the students' copies. To check whether the layouts have been correctly detected, we can use the button Check layouts. A short insight allows to check that red checkboxes are correctly located over the boxes of the subject. Printing and exam Two alternative workflows can be considered: For the most robust, create as many exam sheets as necessary for all your students, with different sheets numbers, and print them all. Each page can be identified by its numbers and boxes at the top, so that you can scan several times the same completed answer sheet page carefree. Secondly, you can print a few subjects (or only one if you want), and photocopy them to get one subject for all students. Questions shuffling will be less efficient, and if you give several times a scan of the same page, AMC won't be able to know about it and will create an unwanted duplicate. To use this second workflow using photocopies, there must be only one page for students to write on (using a separate answer sheet can help you for this). If not, you won't be able to continue with AMC! Indeed, it would be impossible for AMC to make the link between two pages from the same student. When the preparation is over, we can print the subject, and distribute it to the students... In simple cases, we can directly print from the viewer (after clicking the line Subject in the list of work documents). When it is better to print the copies separately (for example if copies contain multiple pages and when the printer allows to staple them together), we shall rather use the button Print copies after calculating the layout. Test Let the students pass the exam. When the subject is printed and distributed, we may no more modify the work documents because they must remain identical to distributed copies. It is preferable that students use a black or blue pen or B or HB pencil. Depending on the situation, you can ask the students to tick or fill the boxes. Tick the boxes If you ask the students to tick the correct boxes, they can correct a ticked box ereasing their mark with a eraser or white-out fluid. However, they must not try to draw the boxes back. Trying to do so, they could draw lines inside the boxes, that could then be considered as ticked boxes. You can also let the students correct ticked boxes filling them completely. If you choose this option, you have to set the upper darkness threshold (from Preferences menu, Project tab) to some value less than 1 (but not too low). If the darkness ratio of a box is between the darkness threshold and the upper darkness threshold, the box is considered as been ticked. If the darkness ratio is greater than the upper darkness ratio, the box is considered as not ticked. Fill the boxes When the letters (or numbers) referencing the answers are drawn inside the boxes, you must tell the students to fill the correct boxes, as AMC can't make the difference between a box with a letter and ticked box. The stiudents can correct a ticked box ereasing their mark with a eraser or white-out fluid, but they don't have any other solution to correct a ticked box. You must set the upper darkness threshold to 1. Reading the copies Now we shall describe the input from students' copies, which can be done automatically and/or manually. Let's move to the Data capture tab of the graphical interface. Automated input For automatic recognition of the checked boxes in the students' pages, they must be previously digitalized. I use a copier/scanner which does it automatically (all the pages in a bundle without interaction with me), with the following settings: 300 dpi, OCR mode (for the characters' recognition, black and white without grayscale - but the scanner does not process any character recognition), each scan delivered as a single TIFF file per page. To analyze the scans, we must have them in one or several image files (TIFF, JPG, PNG, etc.). Vector graphics formats (PDF, PS or EPS) are also suitable: scans will then be converted into PNG by AMC before analysis. When giving scans for automated data capture the first time, you will have tell AMC which method you used: either different papers printed, or photocopied papers (see ). Then we select this set of scan files in the dialog opened by the button Automated of the section Data capture after examination, then we validate with the OK button. AMC begins with Optical Mark Recognition to detect the position of the four circle corner marks on the scans, position the boxes, and detects the amount of black pixels in each box. The result of the analysis of each page is indicated in the lists of the section Diagnosis: The value displays the date the date the page was last modified. Hided by default. Click on the button columns to show it. The value MSD (mean square deviation) is an indication of the good framing of the marks (the four black dots surrounding each copy). When it is too great, the framing must be checked (right click on the page's line then choose page to view the scanned page and the boxes as they were detected). The value sensitivity is an indicator of proximity of the filling of the boxes with the threshold. If it is too great (from 8 to its max value 10), we must check whether the boxes recognized as checked are the good ones (a right click on the page's line the choose zoom to view the set of boxes in the copy, verify whether the detection worked correctly, and correct it if needed drag-and-dropping the boxes images). The value scan files displays the name of the handled page. Hided by default. Click on the button columns to show it. Manual input If we cannot use easily the scanner, or if, for a few copies, the automated input did not work as expected, we can manage the input manually. To do so, let's open the right window thanks to the button Manual of the section Input of the copies after exam. In that window, we can input the boxes which have been checked ourselves (by clicking them) on the wanted pages. Every manual input will overwrite results eventually coming from a previous or posterior automated input for the same page. Viewing empty or inavlid questions By clicking on the page numbers, AMC wrap the boxes answers with a colored square : cyan for empty answers, yellow for invalid answers. You may change this colors in the menu tab: Preferences Display Scan It is possible to search a specific question (see ) Select a specific question This option make it possible to manually mark on-screen a specific question. This save your having to search on each page the question if they are shuffled. Mark an open question on-screen open the manual input tab and select "scan" as background, select the question to mark (drop-down menu above the list of pages) . The open question's check-boxes are on the top of the window, and when you click next you move forward to the following student, always for the same question. All questions can be checked like this. Check on-screen pages with invalid or empty questions The marking must be ended before use (see section ), open the manual input tab and select "scan" as background, choose if you want to navigate through all pages, through pages with invalid answers (inv), or through pages with invalid or empty answers (i & e). Correction In the Marking tab of the graphic interface, the part Marking allows us to deduce the scores of the students from the inputs, but also to read the codes written by the students (see ). Process The computation of the scores is launched with the button Mark, but we must previously make the following choice: If we check the box Update marking scale, the scoring strategy will be first extracted from the LaTeX source file. This allows to try many strategies at the end of the correction process. This action also updates which answers are specified as correct or as wrong. Hence, potential mistakes in the answers can be easily fixed after the exam. The method to specify the strategy in the LaTeX file will be explained in the section  (a default scoring strategy is used when no indication is given). When we click the button Mark, the correction is made (this can take some time if we also asked for the reading of the scale). Scoring strategy The strategy used to score the copies is indicated in the LaTeX source file, with the command scoring. It can be used in an environment question or questionmult, to set it for every response, but also in the environment choices, to give scaling indications about a single response. The argument of the LaTeX command scoring is made of indications like parameter=value, separated by comas. The usable parameters are the following (the table shows also in which context those parameters can be used): parameter simple multiple value Q A Q A e The score given when responses are incoherent: many boxes checked for a simple question, or, for a multiple question, the box "none of the responses are correct" checked while another box is also checked. v The score given in case of no response (no box is checked). d An offset, i.e. a value added to every score not relevant of parameters e and v. p The bottom score. If the calculation of the score in that question yields a value below the bottom value, the sore is set to the bottom value. b Score for a good response to a question. m Score for a bad response to a question. Without parameter name (syntax: \scoring{2}), this indicates the score to give if the student has checked this response. auto With this parameter, the value of the response numbered i will be auto+i-1. This option is mainly used with \QuestionIndicative (see section ). mz This parameter is used for a "maximum or zero" scoring: if all the answers are correct, the score is mz. If not, the score is zero. haut When you give this parameter a value n, the score given for a perfect response will be n, and one point will be withdrawn for each error. MAX Gives the maximal value given for the question (for a "question scored 5", one can write MAX=5). To be used only when it is not the same value as when one replies every good response. formula Gives the score to be given for the question, often using a formula that uses some variables (see ), without taking b and m values into account. set.XXX Gives a particular value to the variable named XXX, that will be available in a formula. In an answer context, the value is associated to the variable only if the box is ticked. As a particular case, give a non-null value to the variable INVALID to declare the responses incoherent (so that the score will be given by the variable e). setglobal.XXX Gives a value to the variable XXX for all following questions (relative to the lexicographic order of IDs) default.XXX Gives a value to the variable XXX in the case when no ticked boxes gave a value to XXX. requires.XXX Tells that the variable XXX has to be defined, unless the data is told incoherent and the question scored with the value of e. haut=x has been written as d=x-N, p=0 If you use the parameter default, you have to type the variable's value XXX inside the scoring of the question, see below. \begin{questionmult}{03}\scoring{default.COMP=10,default.PROP=11,formula=(COMP==PROP ? 1 : 0),MAX=1} Name an important gas in the air and its percentage. \begin{multicols}{4} \begin{choices} \wrongchoice{steam} \wrongchoice{gas} \correctchoice{nitrogen}\scoring{set.COMP=1} \correctchoice{oxygen}\scoring{set.COMP=2} \wrongchoice{carbon dioxide} \correctchoice{20\%}\scoringset.PROP=2} \wrongchoice{40\%} \wrongchoice{60\%} \correctchoice{80\%}\scoring{set.PROP=1} \end{choices} \end{multicols} \end{questionmult} If you specify MAX = 3 to a matter that report 4 points, a student will have a score of 4/3 in this question The default scale for a simple question is e=0,v=0,b=1,m=0, which gives one point for a good response and no point in the other cases. The default scaling for a multiple question is e=0,v=0,b=1,m=0,p=-100,d=0, which gives a point for every checked box, either good or not (good box checked or wrong box not checked). You may assign the value set.XXX to the variables b and m. The LaTeX command \scoring can also be used outside question definitions, for whole examination parameters: SUF=x gives a total number of points sufficient to get the maximal mark. For example, with 10 for the maximal mark and parameter SUF=8, a student getting a total of 6 points will get mark 6/8*10=7.5, whatever the value of the total number of points for a perfect answer sheet. allowempty=x allows the student to leave x questions unanswered. When summing up questions scores, x unanswered questions will be canceled. Using all of these parameters in combination allows to define many kinds of scoring strategies, as in the following example: \documentclass{article} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[box,completemulti]{automultiplechoice} \begin{document} \element{qqs}{ \begin{question}{good choice} How many points would you like for this question? \begin{choices} \correctchoice{Maximum: 10}\scoring{10} \wrongchoice{Only 5}\scoring{5} \wrongchoice{Two will be enough}\scoring{2} \wrongchoice{None, thanks}\scoring{0} \end{choices} \end{question} } \element{qqs}{ \begin{questionmult}{added} Get free points checking the following boxes: \begin{choices} \correctchoice{2 points}\scoring{b=2} \wrongchoice{One negative point!}\scoring{b=0,m=-1} \correctchoice{3 points}\scoring{b=3} \correctchoice{1 point} \correctchoice{Half point}\scoring{b=0.5} \end{choices} \end{questionmult} } \element{qqs}{ \begin{questionmult}{3 or zero}\scoring{mz=3} Only a perfect response will be scored 3 points - otherwise, null score. \begin{choices} \wrongchoice{Wrong} \wrongchoice{Wrong} \correctchoice{Right} \correctchoice{Right} \end{choices} \end{questionmult} } \element{qqs}{ \begin{questionmult}{all for 2}\scoring{haut=2} Perfect response scored 2 points, and give back one point for any error... \begin{choices} \correctchoice{Right} \correctchoice{This one is OK} \correctchoice{Yes!} \wrongchoice{False!} \wrongchoice{Don't check!} \end{choices} \end{questionmult} } \element{qqs}{ \begin{question}{attention}\scoring{b=2} Some very bad answer yields here to a negative score (-2), but the correct answer is rewarded 2 points. \begin{choices} \correctchoice{Good!} \wrongchoice{Not correct} \wrongchoice{Not correct} \wrongchoice{Not correct} \wrongchoice{Very bad answer!}\scoring{-2} \end{choices} \end{question} } \element{qqs}{ \begin{questionmult}{as you like} Choose how much points you need: \begin{choices} \correctchoice{You take two points here}\scoring{b=2} \wrongchoice{Check to give 3 points}\scoring{b=0,m=3} \correctchoice{Get one if checked, but give one if not}\scoring{m=-1} \end{choices} \end{questionmult} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \onecopy{20}{ \noindent{\bf QCM \hfill Scoring strategy test} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf Test\\ Jan. 2008\end{minipage} \namefield{\fbox{\begin{minipage}{.5\linewidth} Name: \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \shufflegroup{qqs} \insertgroup{qqs} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% } \end{document} Global scoring strategy To use a strategy globally for a set of questions, one can define it in a LaTeX command, as in the following example: \def\barQmult{haut=3,p=-1} \begin{questionmult}\scoring{\barQmult} [...] \end{questionmult} Another possibility comes with the LaTeX commands \scoringDefaultS and \scoringDefaultM, to be used in the begin of the document (outside the command \onecopy), which allow to give default values for the scoring strategy of simple and multiple questions: \scoringDefaultM{haut=3,p=-1} If you use formula with \scoringDefautM or \scoringDefautS, you must cancel it to score different questions with a specific scoring. \begin{questionmult}\scoring{b=1,m=-0.5,formula=} [...] \end{questionmult} In some cases, defining a global strategy can be interesting depending of the number of proposed responses. To do so, just input the value N. For example, to get a scale yielding 4 as the maximal score and such as the mean expected score of a student checking randomly the boxes is 1, one can use the scale d=4,b=0,m=-(4-1)*2/N (which give the score -2 if every response is false, i.e. the wrong boxes have been checked and the right boxes are not). Operations allowed in those formulas are the four simple operations (+ - * /), test operator ( ? : ), parenthesis and all perl operators. The test operator is written( test ? if true: if false) The test part can use operators like > (greater), >= (greater or equal), < (lesser), <= (lesser or equal), == (equal), != (different), || (or), && (and). Other variables can also be used: N is the number of proposed responses, without counting the response eventually added by the option . NB is the number of correct responses to the question (without taking in account checked or non-checked boxes). NBC is the count of correct responses which have been checked. NM is the number of wrong responses to the question (without taking in account checked or non-checked boxes). NMC is the count of wrong responses which have been checked. IS is set to 1 if the question is simple and 0 if not. IMULT is set to 1 if the question is multiple and 0 if not. From scoring strategy to students marks Here is how students' marks are computed: for every student, The scoring strategy is applied for each question in turn, to get the questions scores. All questions (except indicative ones) scores are added to get the student total score. If a positive maximal mark is given as a parameter (in the Project tab of the Edit Preferences window), the total score of the student is divided by the maximum total score (which is the total score for a perfect copy), and multiplied by the difference (maximal mark - minimal mark), then added to the minimal mark to get the student's mark. This way, if the student answered perfectly to all questions, his mark will be the maximum mark, and a student with null score will get the minimal mark. If you set the maximal mark to 100 and the minimal mark to 0, the student's mark can be seen as a percentage of good answers. This mark is rounded using the following settings from Edit Preferences Project : Grain: set it to 1 if you need an integer value, set it to 0.25 if you need to round up to a quarter, etc. Set it to 0 if you want to cancel rounding. Rounding type: lower, normal, greater Correct the scoring errors You may, even after the test, change the scoring. However, you must not never update the document. It is better to open the file with a text editor to make changes and save it. You may : turn correct answer into wrong answers. turn wrong answer into correct answers. Modify the scoring scale for one or several question or the default scoring. You can not : Turn a simple question into a multiple choices question. Turn a multiple choices question into a simple question. Add questions, answers. Remove questions, answers. Modify the order of the questions and/or answers. If you want to cancel a question use this strategy \scoring{b=0,m=0,e=0,v=0} or this one \QuestionIndicative. Identification of the students This stage is not mandatory. It deals with associating each copy with a student. The name of the student is not read in an automated fashion, but two reasonable possibilities are proposed: It is possible to ask students to identify themselves on their copy with their student number, which will be written by checking one box per digit. A LaTeX command is designed to use this method on the copy (see the part ). After the exam, copies will be identified automatically taking into account a list matching the students' numbers and their names. With no input of the students' numbers, or in the case when the automated identification has not succeeded perfectly (for example when a student made a wrong input), the graphical interface allows an assisted manual association. Let's first move to the Marking tab of the graphical interface. List of the students We must previously supply a list of students. This list can obviously be used for many multiple-choices tests. This list is a CSV file with optional comments lines at the beginning with prefix `#', as in the following example:# STUDENTS / 1ST YEAR surname:name:id:email Bienvenüe:Alexis:001:paamc@passoire.fr Boulix:Jojo:002:jojo.boulix@rien.xx Noël:Père:003:pere.noel@pole-nord.xx The first lines of the file which begin with the character `#' are comments. The first of the other lines contains (separated by the character `:') the column titles. Then, with one line per student, we write the corresponding information. There must be at least one column named name or surname. One can replace the separator `:' by a comma, a semicolon or a tabulation. However the same separator must be used everywhere in the file which contains the list of students. The used separator is detected by taking the character (out of the four possible characters) which appears most frequently in the first line which is not a comment. Any CSV file should be suitable. Type carefully the CSV file to send the same test to multiple recipients. A semi-colon or colon or tabulation to separate the headers and a comma to separate the email adresses. A comma to separate the headers and email adresses between inverted comma/quotation marks. name,forenama,email Boulix,Jojo,"jojo@boulix.fr,parents@boulix.com" The prepared list of students will then be selected with the button Set file in the Students identification section. We must also choose one of the columns as a unique key which will identify the students (generally, one chooses the column containing the student's number). Last, to prepare an automated association, we must choose the name of the relevant code used in the LaTeX command \AMCcode (if used). Association Automated association When we push the button Automatic in the part Students identification, matching of the codes given by the students begins. We can watch or improve the result later with a (partial) manual association. To make an automated association, at least one command AMCcode is required (see ) in the LaTeX source file, as well as a list of students with a column containing a reference (generally a number of student) which will be identical to the input given in the boxes produced by the command AMCcode. Manual association To open the window allowing recognition of the students' names, let's click on Manual button in the Students identification section. This window is made of an upper part which presents in sequence images of the names written by the students, a lower part containing a button for each student from the list we supplied, and a right part allowing to browse easily the copies to be identified. Let's click the button matching the name written in the upper part for each presented page (by default, only the copies not or badly identified are presented - this can be changed by checking the box associated). When every page is read, a blue background appears instead of the names, and we just need to click the Save button to end with association. Exporting the scores list At this stage, we can get the list of scores under various formats (currently CSV and OpenOffice), with the button Export. This export will be followed by the opening of the produced file by the appropriate software (if available). Export to ODS (OpenOffice, LibreOffice) In the exported file, the following colors are used: gray is used for non applicable. This may be for example scores for absentees, or scores corresponding to a question that was not shown to the corresponding student. yellow is used for questions that has not been answered by the student. red is used for questions with an invalid answer: the student ticked several boxes in a simple question, or he ticked some boxes and the box None of these answers are correct. purple used for indicative questions. Annotation When we push the button Annotate papers, copies annotation will begin: on every scan, the following annotations will be made (these are the default annotations, they can be configured): The boxes wrongly checked by the student will be circled in red; the non-checked boxes which should have been are checked in red; the checked boxes which had to be checked are checked in blue; for each question, obtained and maximal scores are indicated; the global score of the copy is indicated on the first page of the copy. The text written on the first page of the copies can be configured ( Edit Preferences Annotation Header or Edit Preferences Project Papers annotation Header text ). Substitutions will be made within the provided text (please have a look at for some details on the meaning of those values): %S is replaced by the student's total score. %M is replaced by the maximum total score. %s is replaced by the student's mark. %m is replaced by the maximum mark. %(ID) is replaced by the student's name. %(COL) is replaced by the value of column COL in the students list for the current student. This operation is made for each page, giving as a result PDF annotated papers. The name of the PDF file which will contain the corrected copy of a student is based on the template indicated in the field File name model. In that template, every substring as « (col) » is replaced by the contents of the column named col in the file containing the list of students (see section ). If we let this field empty, a default value is built up based on the student's name and student number. Options with the option <option>separateanswersheet</option> Only pages with answers : the answer sheets will be annoted. Question pages from subject : the answer sheets will be annoted and the subject will be inclued to the pdf file. Question pages from correction : the answer sheets will be annoted and the corrected will be inclued to the pdf fil. Marks' position You may choose marks's position with the menu Edit Preference Project Marks position Default choices (none) In the margin. In the both margins Beside the boxes. Where defined in the source (see ). Default values edit menu Edit Preferences Scan Scans conversion Vector formats density (DPI) : 250 Black & white conversion threshold : 0.60 Erase red from scans : unticked Force conversion: unticked Detection parameters Marks size max increase: 0.20 Marks size max decrease : 0.20 Default darkness threshold : 0.15 Default upper darkness threshold : 1 Measured box proportion: 0.80 Process scans with 3 corner marks : unticked Alternative usages Photocopied subject As explained in , it is not always possible to photocopy one answer sheet to give to several students. However, when using a separate answer sheet and when questions and answers are not to be shuffled, you can photocopy the subject, and print all the answer sheets separately. We detail here the proper way to follow. Use package option (see ). Write the subject before calling onecopy command or outside examcopy environment. Use \AMCformS to output answer boxes in each answer sheet, inside onecopy/examcopy. Here is a minimal example: \documentclass[a4paper]{article} \usepackage[separateanswersheet]{automultiplechoice} \begin{document} \noindent{\bf Subject} \begin{question}{sum} How much are one plus one? \begin{choices} \wrongchoice{1} \correctchoice{2} \wrongchoice{3} \end{choices} \end{question} \begin{question}{k2} How high is the K2? \begin{choices} \wrongchoice{around 8000m} \correctchoice{around 8600m} \wrongchoice{around 9000m} \end{choices} \end{question} \AMCcleardoublepage \onecopy{5}{ \AMCformBegin {\large\bf Answer sheet:} \hfill \namefield{\fbox{ \begin{minipage}{.5\linewidth} Name: \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }} \AMCformS } \end{document} You will get from this LaTeX file one subject (sheet numbered 0) to print and photocopy to all students, and several answer sheets to print (one for each student). Post correcting Suppose you want to use a single generic answer sheet for all your exams. You simply print answer boxes on it (say 5 for each questions, and 40 questions), and give the students a subject that you wrote somewhere else. The point here is that the correct choices are not pointed out in the LaTeX file, so that AMC does not know about them. The solution is to give one answer sheet to the teacher to fill correct choices. Then, after scanning and AMC analysis, you simply have to tell AMC which is the teacher completed answer sheet. To implement this idea, follow these rules: Use , and package options (see ). Only use \wrongchoice for all your choices (never \correctchoice). Here is a minimal example: \documentclass[a4paper]{article} \usepackage{multicol} \usepackage[insidebox,noshuffle,postcorrect]{automultiplechoice} \begin{document} \onecopy{5}{ \noindent \begin{tabular}{|l|l|l|} \hline student number & class & subject\\ \hline \vspace{-0.25cm} & &\\ \AMCcode{StudentNum}{10}& \AMCcode{class}{2}& \AMCcode{subject}{3} \\ \hline \end{tabular} \hfill\namefield{\fbox{ \begin{minipage}{.25\linewidth} Name: \vspace*{.5cm}\dotfill \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }}\hfill \vspace{.5cm} \noindent\hrulefill \begin{multicols}{2}\columnseprule=.4pt \begin{question}{01} \begin{choicescustom} \wrongchoice{}% \wrongchoice{}% \wrongchoice{}% \wrongchoice{}% \wrongchoice{}% \end{choicescustom} \end{question} \begin{question}{02} \begin{choicescustom} \wrongchoice{}% \wrongchoice{}% \wrongchoice{}% \wrongchoice{}% \wrongchoice{}% \end{choicescustom} \end{question} % continue here to get as many questions as needed... \end{multicols} } \end{document} You can then process the LaTeX file in AMC, print the sheets, scan them after the exam, and start AMC automatic data capture (including the teacher sheet). When you click on Mark in the Marking tab, letting Update marking scale ticked, you will be prompted for the teacher answer sheet number. You can then continue as usual. You can also write the letters outside the boxes: replace the option with , and write your questions in the following way: \begin{question}{01} \begin{choicescustom} \wrongchoice{A }% \wrongchoice{B }% \wrongchoice{C }% \wrongchoice{D }% \wrongchoice{E }% \end{choicescustom} \end{question} To use this option only for the questions answers (and not for the student number), type, just after \begin{document} \makeatletter \def\setoutsidebox{\AMC@outside@boxtrue} \makeatother Then, use this command locally (inside braces) in the form : {\setoutsidebox\AMCform} Nominative sheets In some situations, it can be useful to prepare nominative sheets for all students, from a list of students. Let us see how this can be done. The students list has to be a CSV list. Suppose in the following that the file students.csv, in the project directory, is UTF8 encoded and that its content is like the following: name,forename,id Boulix,Jojo,001 Golin,André,002 Moniuszko,Stanisław,003 Do not use _ (underscore) with the student's name or forename. A compilation error will be displayed. The LaTeX source file has to load csvsimple package, with: \usepackage{csvsimple} In the LaTeX source file, define the subject as a command that produce a single subject. This command will be called once for each student by \csvreader (suppose here that the questions has already be defined and included in a group named general): \newcommand{\subject}{ \onecopy{1}{ \noindent{\bf AutoMultipleChoice \hfill TEST} \vspace*{.5cm} \begin{center}\em Pre-filled test. \end{center} \hfill \namefield{\fbox{ \begin{minipage}{.5\linewidth} Name: \Large\bf \name{} \surname{} \vspace*{1mm} \end{minipage} }} \noindent\hrulefill \vspace{1ex} \shufflegroup{general} \insertgroup{general} \AMCassociation{\id} } } \csvreader[head to column names]{students.csv}{}{\subject} %\csvreader[head to column names,separator=semicolon]{liste.csv}{}{\subject} The head to column names option for \csvreader defines commands \name, \surname and \id (named from the CSV headers), that can be used inside \subject. The \AMCassociation call tells AMC to associate the current sheet to student with id \id. Use this command if the CSV file contains only one email address per student. Use this command if the CSV file contains multiple email addresses per student. After printing, scanning, data capture and marking, when associating copies with students, choose value "pre-association" for field "code-name for automatic association", and "id" for field "Primary key". Commands manual You may skip this part if you want to use only the graphical user interface (and that should usually be the case). However, every action carried out with the graphical interface can also be performed using the various commands whose syntax is described here. auto-multiple-choice 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ auto-multiple-choice Automated treatment of MCQs auto-multiple-choice action arguments auto-multiple-choice project Description The auto-multiple-choice command transmits its arguments to the AMC-action.pl command. The second form, which does not mention any action, calls the graphical interface AMC-gui.pl, possibly with the name of a project to be opened. See also Different AMC actions: AMC-prepare 1 , AMC-imprime 1 , AMC-analyse 1 , AMC-note 1 , AMC-association-auto 1 , AMC-export 1 , AMC-annotate 1 , AMC-regroupe 1 . AMC-prepare 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-prepare prepares working documents from LaTeX source file auto-multiple-choice prepare --mode s --prefix project-dir mcq-source-file auto-multiple-choice prepare --mode b --data project-data-dir mcq-source-file Description The AMC-prepare.pl command extracts working documents from the source file describing the multiple choice questionnaire. Information to be extracted depends on the argument value. In any mode, the source filename must be given as an argument. with "", AMC-prepare.pl makes the subject file (answer sheet to be printed and given to the students), the correction (single corrected answer sheet) and the positions file (file containing information about the positions of the boxes on the pages). The following arguments can be used: sets the subject file to build. sets the correction to build. sets the positions file to build. this directory is only necessary if one or more of the three previous options are not used: default values are then directory/sujet.pdf, directory/corrige.pdf and directory/calage.xy. with "", AMC-prepare.pl extracts scoring data from the source file. In this mode, the argument must be used (see below). The following optional arguments can be used in any mode: gives the LaTeX engine (command) to be used. latex-engine can be pdflatex or xelatex for example. sets the filter name to transform the MCQ source file into a LaTeX file. Native filters are latex (no change at all) and plain (source is an AMC-TXT file). gives the LaTeX file to make from the source file using specified filter. If omitted, a filename derived from mcq-source-file adding _filtered.tex is used. sets the number of copies to produce, overriding the number given in the LaTeX source file (first argument of the \onecopy command). gives a file to fill with debugging information. gives an epoch (number of seconds since january 1, 1970) to get a reproducible pdf output. sets the directory where the project's SQLite data files are. AMC-meptex 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-meptex gets the layout information from the working document to the layout database auto-multiple-choice meptex --src calage.xy --data directory Description The AMC-meptex.pl command extracts the layout information (exact positions of the boxes, the marks, the name field on all the pages) from a working document calage.xy and fills the layout database (a SQLite file) in the data directory directory. AMC-imprime 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-imprime prints AMC multiple choice answer sheets to be distributed to the students auto-multiple-choice imprime --sujet subject.pdf --fich-nums numbers-file.txt --data data-dir --methode method where-to-print-arguments Description The AMC-imprime.pl command prints selected copies from a AMC multiple choice answer sheet. What to print The following arguments describe what to print: sets the subject file (prepared by AMC-prepare 1 ). gives a file where the numbers of the copies to be printed are written (one number per line). If this argument is not given, all the copies will be printed. gives the directory where data files are (see for example AMC-meptex 1 ). The layout database in the data directory is used to know at which page of the subject file each copy begins and ends. asks to print separate answer sheets separately. asks to reorder the pages of each copy to get the separate answer sheet first. Where to print Several printing methods are currently defined: with "", AMC-imprime.pl prints to a CUPS printer. One print job is sent for each copy, allowing for example to use stapling. Use the following options with this method: sets the CUPS printer name to print to. gives CUPS options, in the format. with "", AMC-imprime.pl outputs the answer sheets to files (one for each copy). sets the filename for outputs. The '%e' sequence will be replaced by a 4-digits copy number. If filename does not contain '%e', the string '-%e.pdf' will be added at its end. with "", AMC-imprime.pl will use a provided command for each copy. gives the command to be used for printing. The command string will be split at each space character (even when using quotes...). The sequence '%f' will be replaced by a PDF filename (containing the copy to print), and '%e' will be replaced by the copy number. Other options Other available options: --extract-with command gives the command to use to extract pages from the PDF subject. Currently, pdftk, gs and qpdf are available. The default value is pdftk, but qpdf and then gs will be used if the pdftk command is not installed. AMC-getimages 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-getimages prepares scan images before sending them to AMC-analyse 1 for analysis auto-multiple-choice getimages --copy-to project-scans-dir --vector-density density --list list-file scan-files Description The AMC-getimages.pl command prepares scan files before sending them to AMC-analyse 1 : multipage image files are split to get one file per page. vector images (such as PDF, EPS) are converted to bitmap images. The input images can be given either as arguments to AMC-getimages.pl, either as the name of a file which contains all the paths of the scan files. gives the name of the file that optionally contains (one per line) the paths of the scan files. This file will be cleared and filled with the paths of the scan files after processing, so that the same path can be passed to AMC-analyse.pl as the option value. gives a directory where to copy all the scans files. sets the density used to convert vector graphics scans to bitmap files. Defaults to 300. AMC-analyse 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-analyse automatic data capture from scans for AMC multiple choice exams. auto-multiple-choice analyse --projet project-dir --seuil-coche threshold --tol-marque tol --list-fichiers files-list.txt scan-files Description The AMC-analyse.pl command performs automatic data capture from scans of completed answer sheets of an AMC multiple choice questionnaire. Before calling AMC-analyse.pl, AMC-prepare 1 should have been called to make working documents () and the layout should have been processed with AMC-meptex 1 . gives the directory where data files are (see for example AMC-meptex 1 ). Defaults to project-dir/data. gives a directory where to create image reports of the data capture (zooms on the boxes in a zooms sub-directory, name filed extraction as a name-*.jpg file, and layout report as a page-*.jpg file). When using this option, if is not used, project-cr-dir will be set to project-dir/cr. Giving the names of the scan files to process can be done in two ways: these names can be given as arguments, these names can be written to a plain file (one filename per line), using the to give the name of this file. Some parameters for data capture may be set using the following options: sets the proportion of each box that will be measured to decide if the box is ticked or not. Default value is 0.8. This parameter is used when converting the grayscale scan file to black and white. To get more black pixels, use a greater value. To get more white pixels, use a smaller value. The threshold must be between 0 and 1. The default value is 0.6. With this option, only red channel will be used from color scans. This way, all that is written in red will be ignored in the scan. This can be useful when the boxes are printed in red. defines the tolerance when detecting the four marks in the scans corners. These marks are detected looking for black connected components which dimensions are closed to the target dimension target (exact dimensions of the marks if printing/scanning process where perfectly accurate). If tol is a real number, accepted dimensions are those between (1-tol)*target and (1+tol)*target. If tol is "tinf,tsup" (where tinf and tsup are real numbers), accepted dimensions are those between (1-tinf)*target and (1+tsup)*target. A standard value is 0.2. This option is to be used when the scans are photocopies from some subjects (different students can have the same subject). In this case, copy numbers are allocated to students so that their answer sheets, with the same subject number, can be differentiated. This option can be used in conjunction with . The copy numbers used for the scans will start from copy_id, in the same order than the scans given as arguments. --try-three | --no-try-three Use one of these options to tell if you allow processing of scans where only three corner marks are present. gives a file to fill with debugging information. AMC-note 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-note computes marks after scans data capture for AMC multiple choice exams. auto-multiple-choice note --data project-data-dir --seuil threshold --grain granularity --arrondi rounding --notemin min --notemax max --no-plafond --plafond Description The AMC-note.pl command computes marks for all students from the scoring strategy extracted from the LaTeX source file by AMC-prepare 1 and from the data capture reports made by AMC-analyse 1 . gives the directory where data files are (see for example AMC-meptex 1 ). gives the black ratio threshold for deciding whether a box is ticked or not. When deciding whether a box is checked or not, AMC-note.pl compares the black ratio (number of black pixels over total number of pixels) to threshold. If the black ratio is greater then threshold, the box is declared to be checked. Standard values can be 0.15 in the standard layout, or 0.5 for separate answer sheet layout (in this last case, letters are drawn in the boxes, and the students are told to fill the boxes entirely). gives the black ratio threshold over which a box is considered as not being ticked. You can set this value to (for example) 0.6 to allow students to cancel a ticked box filling it completely: if the black ratio is between threshold and upper_threshold, the box is considered as being ticked, but if the black ratio is greater than upper_threshold (for example when the box is filled), the box is considered as not being ticked. The default value is 1.0, so that this feature is disabled. ask marks to be rounded to a multiple of granularity. If rounding is 'i', rounding is done from below (as with floor 3 ). If rounding is 'n', rounding is done to the nearest multiple of granularity. If rounding is 's', rounding is done from above (as with ceil 3 ). For example, with options "", mark 6.285 is rounded to 6.5. with this option, all marks below min will be replaced by min. gives the mark to associate to a sheet where all answers are correct. If not used, marks are not scaled. with this option, all marks above max will be replaced by max. gives a file to fill with debugging information. requests port-correction from the completed answer sheet identified by student and copy numbers. In post-correction mode, correct answers are not extracted from the LaTeX source file, but taken from the answers given on this sheet. AMC-association-auto 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-association-auto automatic association between students and answer sheets for AMC multiple choice exams. auto-multiple-choice association-auto --data project-data-dir --notes-id id --liste students-list.csv --encodage-liste list-encoding --liste-key key Description The AMC-association-auto.pl command associates students with their answer sheet (when there are no errors from students when coding their student number and no error during data capture). See  from English user documentation for details. gives the directory where data files are (see for example AMC-prepare 1 ). gives the identification string of the code provided for student numbers (command \AMCcode in the LaTeX source file). if used, the option is ignored and the automatic association is made from the pre-association data (command \AMCassociation in the LaTeX source file). gives the students list. gives the students list file encoding (default is utf-8). gives the column name where to find the student number in the students list. gives a file to fill with debugging information. AMC-association 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-association manual association between students and answer sheets for AMC multiple choice exams. auto-multiple-choice association --data project-data-dir --list auto-multiple-choice association --data project-data-dir --set --student student-sheet-number --copy copy-number --id student-id Description The AMC-association.pl command handles association data between students and their answer sheet. gives the directory where data files are (see for example AMC-prepare 1 ). With option , all association data is output. With option , a manual association is updated. AMC-export 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-export exports marks for AMC multiple choice exams. auto-multiple-choice export --data project-data-dir --module module --fich-noms students-list.csv --noms-encodage list-encoding --o output-file Description The AMC-export.pl command exports marks from an Auto Multiple Choice exam. gives the directory where data files are (see for example AMC-prepare 1 ). selects a module for export. See below for the modules included in the AMC standard distribution. sets the students list file. selects an encoding for file students-list.csv (default is utf-8). gives the output file name. gives an option for selected module, in the form key=value (see below for possible options for each module). To specify multiple options, use several times. sort the students names, depending on sort-type. If sort-type is l, use line number from students list file to sort. If sort-type is m, use mark (and name if marks are equal) to sort. If sort-type is i, use student number to sort. If sort-type is n, use name to sort (or line from students list if equal). if all is 0 or empty, only students with a scanned answer sheet appears in the output. If all is 1, all students in the students list appears in the output. Modules OpenDocument With "", an OpenDocument (for use by OpenOffice or LibreOffice for example) is produced. The following options are recognized: nom gives a name for the exam, to be written on the beginning of the sheet. code gives an short name for the exam, to be used as a tab name. columns sets the list of columns that are to be added to each student. Default value is student.key,student.name. stats with a true value, a table will be added with statistics for all questions. statsindic with a true value, a table will be added with statistics for all indicative questions. CSV With "", a CSV file is produced. The following options are recognized: columns sets the list of columns that are to be added to each student. Default value is student.copy,student.key,student.name. decimal sets the decimal point (default is a dot). encodage sets the encoding to use for output (default is utf-8). separateur sets the character used between columns (default is a comma). entoure sets the character used to enclose strings (default is a double quote). ticked if not empty, additional columns (with "CHECKED:" prefix) are included to give all the checked boxes on all the sheets. This can be used by an external program to retrieve all the checked boxes when marks are not sufficient. Use value 01 to get 0;0;1;1;0 if boxes 3 and 4 are checked, and value AB to get CD if boxes 3 and 4 are checked. List With "", a PDF file is produced with a list of marks for all students. The following options are recognized: pagesize The page size. Default value is a4. nom gives the name of the exam, to be printed at the top of the page. ncols The number of columns. Default value is 2. decimal sets the decimal point (default is a dot). AMC-annotate 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-annotate completed answer sheets annotation after marking for AMC multiple choice exams. auto-multiple-choice annotate --project project-dir --names-file students.csv annotation options Description The AMC-annotate.pl command annotates papers scans with scores for all questions, global score and mark, resulting in PDF files (one for each student, or one single file). General options sets the project name or directory. gives the directory where data files are (default value is project-dir/data). sets the project pdf directory, where to output annotated scans (default value is project-dir/cr/corrections/pdf). sets the students list file name. selects an encoding for file students-list.csv (default is utf-8). sets the key (column name in the students list file) that is used for association. Default value is stored in the database from value actually used for association, so this option should not be used. sets the path to the PDF question file (default is project-dir/DOC-sujet.pdf). use this option if you want to take pages from the subject when there is no boxes to be filled on them (for example, question pages before the annotated answer sheet). When mode equals 1, the pages are taken from the subject, are filled or not according to the student's answers (the same as on the answer sheet), and the same correction marks are drawn as on the answer sheet. When mode equals 2, the pages are taken from the corrected answer sheet (so the ticked answers are the correct ones), and no correction marks are drawn. sets the path to the PDF corrected subject (default is project-dir/DOC-corrected.pdf). If not present, this file will be built using values from options , , and ). sets the darkness threshold. Default value is stored in the database from value actually used for scoring, so this option should not be used. sets the upper darkness threshold. Default value is stored in the database from value actually used for scoring, so this option should not be used. sets the model for building students names from the students list file. Default value is '(nom|surname) (prenom|name)', so that the name is built using the nom column content (or the surname column if the nom column does not exist), followed by the content of the prenom column (or the name column), so that the result should be OK for French or English simple CSV files. gives a filename where to find the ids of copies to annotate (one per line, either the student number if photocopy mode is off, or student:copy if the photocopy mode is on). If no file is given, then all copies will be annotated. gives a file to fill with debugging information. PDF output options use this option if you need all annotated copies in a single PDF file. Default behavior is to build one PDF file per student. sets the sort key (only useful when using ): use l to keep students in the same order as in the students list file. m to sort students according to their marks. i to sort students according to the copy id. n to sort students according to their names. sets a file name model for annotated PDFs. In this model, some sequences will be substituted: (N) is replaced by the student's name (see ). (ID) is replaced by the student number. (COL) is replaced by the value of column COL in the students list for the current student. The default value is '(N)-(ID).pdf'. Source file options These options are used when the path points to a non-existing file, so that this file can be rebuilt. see AMC-prepare 1 . Options for embedded scans When present, scans are embedded in the annotated PDF file. The following options control the quality of the embedded scans, to reduce the annotated file size. sets the maximal size for scans (in the format widthxheight, in pixels). Default value is the empty string, which means there is no maximum size. Scans that are larger will be reduced before being included in the annotated file. sets the format for scans inclusion: jpeg or png. sets the JPEG quality (from 1 to 100) for jpeg embedded scans. Annotation options These options controls what kind of annotations are being to be drawn. sets the font size, in points, for annotations. text color for annotations. Default value is red. sets the text header to be printed on each first page of the students copies. This text may contain CR characters for multi-line headers. Some sequences are substituted in it: %S is replaced by the student total score. %M is replaced by the maximum total score. %s is replaced by the student mark. %m is replaced by the maximum mark. %(ID) is replaced by the student's name. %(COL) is replaced by the value of column COL in the students list for the current student. sets the position where question scores are to be written: marge the scores will be written in the left margin marges the scores will be written in the closest margin (left or right). case the scores will be written near the boxes none the scores won't be written. --verdict-question perl-expression sets the text to be printed next to all questions, through a perl expression to be evaluated (if you need a simple text, simply quote it with "). Some sequences are substituted in it before evaluation: %S is replaced by the student score for this question. %M is replaced by the maximum score for this question. %s is the same as %S, but rounded to nc significant digits (see option ). %m is the same as %M, but rounded to nc significant digits (see option ). A standard value for this option is "\"%s/%m\"". You can also use tests (with the perl syntax ( TEST ? IF-YES : IF-NO )) to write Valid if the score is the maximal score, or Failed if not, using --verdict-question "(%S==%M ? \"Valid\" : \"Failed\")" --verdict-question-cancelled perl-expression same as , but applies for cancelled questions (see allowempty scoring strategy). The default value is "X". use this option to request boxes annotation for indicative questions (these questions' scores won't be taken into account while computing the global score. The correct/wrong status is often irrelevant for these questions, so there is no point correcting the corresponding boxes). sets the line width (in points) when drawing symbols to correct answers. defines how boxes will be annotated. symbols-definition is a comma separated list of H-A:shape:color constructs, where H is 0 or 1 depending on whether the box has to be checked or not, A is 0 or 1 depending on whether the box is actually checked or not, shape is one of none, circle, mark, box and color is a color (name or #RGB, see ImageMagick or GraphicsMagick documentation for details). Default value is "0-0:none,0-1:circle:red,1-0:mark:red,1-1:mark:blue". Lengths The following length can be given with a unit (in, ft, pt, cm or mm). sets the distance from the boxes (going left) where to write questions scores when using .Defaults to 1cm. sets the margin size. Defaults to 5mm. sets the margin size for the header. Defaults to 3mm. AMC-mailing 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-mailing mail PDF annotated completed answer sheets to students auto-multiple-choice mailing --xmlargs args.xml --project project-dir --students-list students-list.csv --list-encoding encoding --email-column col --sender sender-email --subject subject --text email-body --text-content-type content-type --debug file.log transport arguments Description The command AMC-mailing.pl sends by email the PDF annotated completed answer sheets to the students. Email addresses are taken from the students list file. Gives the project directory. sets the students list file name. selects an encoding for file students-list.csv (default is utf-8). sets the name of the column containing the email addresses of the students in the students list file. sets the sender email. sets the carbon copy email address. sets the blind carbon copy email address. sets the subject of the emails to send. sets the body text of the emails to send. sets the content-type of email text. content-type may be text/plain or text/html. adds file filename as an attachment to all emails sent. Use this option several times to attach multiple files. sets the transport to use. transport may be sendmail or SMTP. gives a file to fill with debugging information. sets a delay of time seconds between each sending. Transport arguments Depending on the value used for argument transport, the following arguments can be added: Transport sendmail sets the path to the sendmail command (defaults to /usr/sbin/sendmail). Transport SMTP sets the SMTP hostname (defaults to smtp). sets the port to use (default value is 25). sets the security mode for the SMTP connection. The option mode can be ssl, starttls, or 0 (unsecured). sets the username for authenticated SMTP. gives the path of a file containing the password (as the first line of the file) for authenticated SMTP. Arguments in a XML file To avoid encoding problems, one can place some arguments in a XML file and use the argument as the first command argument. Here is an example of such a file: <?xml version="1.0" encoding="UTF-8"?> <arguments> <arg>--sender</arg><arg>Bienvenüe &lt;paamc@passoire.fr&gt;</arg> <arg>--text</arg><arg>Voilà votre copie corrigée</arg> <arg>--subject</arg><arg>QCM</arg> </arguments> miscellaneous Configure AMC to use GMAIL Login to your gmail account then enable the option : Allowing less secure apps to access your account. Linux users (Ubuntu,Xubuntu,Lubuntu etc.) Type in a terminal : sudo apt-get install msmtp sudo gedit /etc/msmtprc add the following content to msmtprc file and save it. account gmail host smtp.gmail.com tls on tls_certcheck off port 587 auth login from your_user_name@gmail.com user your_user_name@gmail.com password your_password Set up AMC : Edit Preferences Email Mail delivery method , select sendmail and type the path : /usr/bin/msmtp Macintosh users Type in a terminal : sudo port install msmtp sudo pico ~/.msmtprc add the following content to msmtprc file and save it. account gmail host smtp.gmail.com tls on tls_certcheck off port 587 auth login from your_user_name@gmail.com user your_user_name@gmail.com password your_password Set up AMC : Edit Preferences Email Mail delivery method , select sendmail and type the path : /opt/local/bin/msmtp
    auto-multiple-choice-1.4.0/doc/auto-multiple-choice.fr.in.xml000066400000000000000000010115141341176102400241020ustar00rootroot00000000000000
    Auto Multiple Choice Auto Multiple Choice Conception et correction automatisée de QCM. AMC est un ensemble d'utilitaires permettant l'utilisation de QCM rédigés en texte simple ou en LaTeX et leur correction automatique à partir des scans des copies des étudiants, grâce à une reconnaissance optique de marques (OMR). Le présent document décrit son utilisation (pour la version @/PACKAGE_V_DEB/@~@/PACKAGE_V_VC/@). Le site d'AMC est hébergé à l'adresse https://www.auto-multiple-choice.net/, et vous trouverez le code source à l'adresse https://gitlab.com/jojo_boulix/auto-multiple-choice/. Alexis
    paamc@passoire.fr
    Bienvenüe
    Frédéric Bréal Abel Benjamin Paragraphes concernant l'usage de tikz et de lualatex. 2008-2018 Alexis Bienvenüe Ce document peut être utilisé selon les termes de la Licence publique générale de GNU version 2 ou suivante.
    Licence Le programme Auto Multiple Choice est un logiciel libre ; vous pouvez le redistribuer ou le modifier suivant les termes de la “GNU General Public License” telle que publiée par la Free Software Foundation : soit la version 2 de cette licence, soit (à votre gré) toute version ultérieure. Ce programme est distribué dans l’espoir qu’il vous sera utile, mais SANS AUCUNE GARANTIE : sans même la garantie implicite de COMMERCIALISABILITÉ ni d’ADÉQUATION À UN OBJECTIF PARTICULIER. Consultez la Licence Générale Publique GNU pour plus de détails. Vous devriez avoir reçu une copie de la Licence Générale Publique GNU avec ce programme ; si ce n’est pas le cas, consultez : http://www.gnu.org/licenses/. Prérequis Système d'exploitation Les utilitaires AMC ont été écrits pour Linux. Leur installation a par ailleurs été rendue possible sur MAC OS X grâce à l'utilisation de MacPorts. Logiciels Si vous installez AMC à l'aide d'un paquet debian (sur une distribution debian, ubuntu ou dérivés) ou RPM (distribution Mandriva, openSUSE, Fedora), tout ce dont AMC a besoin sera automatiquement installé. Les paquets/logiciels principaux requis pour l'utilisation d'AMC sont les suivants : LaTeX Les bibliothèques de traitement d'image ImageMagick et OpenCV Perl, ainsi que Gtk2-Perl et Glade::XML pour l'interface graphique Versions conseillées pour les logiciels utilisés par AMC Quelques anciens bugs des logiciels utilisés par AMC sont particulièrement préjudiciables à son bon fonctionnement : Avec d'anciennes versions de Net::CUPS (paquet debian libnet-cups-perl), la demande d'impression du sujet provoque la fermeture prématurée de toute l'interface graphique d'AMC. Ce bug a été corrigé à partir de la version 0.61 de Net::CUPS. Avec d'anciennes versions de ImageMagick, le regroupement des pages corrigées en un fichier PDF par étudiant ne fonctionne pas dans le cas où ces copies comprennent plusieurs pages. Ce bug a été corrigé à partie de la version 6.5.5 de ImageMagick. LaTeX À parti de la version 1.1.0 d'AMC, il n'est plus nécessaire de rédiger ses sujets de QCM en LaTeX (voir ). Cependant, ceci est toujours possible et permet une extraordinaire liberté dans la conception des sujets. Par ailleurs, les modèles fournis permettent à ceux qui ne sont pas réfractaires aux formats de documents du type LaTeX/XML/HTML d'écrire assez rapidement leurs premiers formulaires en LaTeX. Notes d'utilisation Limitations numériques Dans la version actuelle (à partir de la version 0.156), le nombre de copies est limité à 4 095 et le nombre de pages par copies est limité à 63 (valeurs par défaut mais modifiables voir ). Le nombre de réponses proposées pour une même question est limité à 199 (valeur par défaut non modifiable). Par ailleurs, les limitations de LaTeX pourront bloquer la compilation avant ces limites (erreur du type « No room for a new \toks »). Dans ce cas, essayez en utilisant le package etex, grâce à la commande \usepackage{etex}. Versions Même si cela ne devrait pas avoir trop de conséquences, il vaut mieux essayer de ne pas changer de version du programme en cours d'utilisation pour un projet donné (entre le moment où les copies sont imprimé et le moment où les notes sont calculées et les copies annotées). Il existe quelques modifications qui risquent de perturber le fonctionnement d'AMC si vous les appliquez au cours de la gestion d'un projet : Si vous avez compilé et imprimé un sujet avec une version d'AMC égale ou inférieure à 0.155, et que vous continuez la gestion du projet avec la version 0.156 ou postérieure, ajoutez l'option dans l'appel au paquet automultiplechoice dans le fichier LaTeX. Exemple : \usepackage[bloc,completemulti,versionA]{automultiplechoice} À partir de la version 0.262, le dessin des cases à cocher est différent, légèrement plus gros, ce qui risque de modifier la disposition de vos sujets. À partir de la version 0.267, si vous souhaitez produire vos sujets en format A4, vous devez l'indiquer explicitement dans le sujet LaTeX : \documentclass[a4paper]{article} À partir de la version 0.345, les commandes \AMCformulaireQuestion et \AMCformulaireReponse ont été renommées respectivement \AMCformQuestion et \AMCformAnswer. À partir de la version 0.394, vous devez indiquer explicitement si vous utilisez le paquet LaTeX graphicx (dans les versions précédentes, il était chargé par AMC). La commande \AMCcode a été réécrite au passage à la version 0.518. La nouvelle version est plus propre et mieux configurable, mais vous aurez sans doute à adapter légèrement votre code LaTeX pour que le résultat reste semblable. À partir de la version 1.1.0, le stockage de toutes les informations manipulées par AMC se fait dans des bases de données SQLite, au lieu des multiples fichiers XML utilisés par les versions précédentes. Lors de l'ouverture d'un projet créé par une version antérieure, AMC transforme toutes ces données dans le nouveau format, mais conserve les anciens fichiers XML. Installation Sur un système debian ou Ubuntu ou dérivés, Mandriva, openSUSE ou Fedora, l'installation est facilitée par l'utilisation des paquets deb et RPM contenant AMC. La procédure d'installation est décrite sur le site d'AMC. Vous pouvez aussi télécharger l'archive des sources dans l'espace de téléchargement du projet, puis utiliser les commandes suivantes dans un terminal : tar xvzf auto-multiple-choice_xxxx_precomp.tar.gz cd auto-multiple-choice-xxx make sudo make install Accès Une fois installé, l'interface graphique peut être appelée en choisissant Applications Éducation Auto Multiple Choice dans le menu général de Gnome (ou son équivalent dans KDE ou autre), mais on peut aussi utiliser la commande auto-multiple-choice. Source au format AMC-TXT Pour les utilisateurs qui ne souhaitent pas se mettre à LaTeX, AMC embarque un filtre qui rédige pour vous le fichier LaTeX à partir d'une représentation en texte simple de votre questionnaire. Ce format est appelé AMC-TXT, et ce chapitre détaille la syntaxe à utiliser. Si vous souhaitez profiter de la puissance de LaTeX pour la rédaction de vos questionnaires, passez au chapitre suivant. Commençons par un exemple simple de fichier source utilisable par AMC : # AMC-TXT source PaperSize: A4 Lang: FR Title: Mon premier questionnaire Presentation: Veuillez répondre aux questions ci-dessous du mieux que vous pouvez. * Quelle est la capitale du Cameroun ? + Yaoundé - Douala - Kribi ** Parmi les nombres suivants, lesquels sont positifs ? + 2 - -2 + 10 Le fichier qui contient la description de votre sujet doit être codé en UTF-8. C'est le codage par défaut de plusieurs éditeurs de texte, dont fait partie gedit par exemple. N'utilisez pas d'éditeur de texte permettant d'appliquer des mise en forme à votre texte, comme OpenOffice/LibreOffice ou abiword : ils n'enregistrent pas seulement votre texte, mais beaucoup d'autres informations de mise en forme qu'AMC ne sait pas lire... La police de caractères qui sera utilisée par défaut pour votre questionnaire est la police libertine. C'est une police libre qui définit un très grand nombre de caractères de toutes langues. Cette police doit être installée sur votre système pour que votre sujet puisse être préparé (c'est le cas si vous installez AMC sur debian ou Ubuntu avec les paquets qu'il recommande). Vous remarquez dès maintenant la structure du fichier de description du questionnaire : il commence par quelques définitions ou options générales de mise en forme, puis viennent les questions. Commentaires Vous pouvez écrire des commentaires dans votre fichier AMC-TXT sur des lignes commençant par le caractère #. Ces lignes seront tout simplement ignorées par AMC. Options générales Voici les options que vous pouvez utiliser au début de votre fichier (dans n'importe quel ordre) : PaperSize: Indique le format de papier utilisé. Parmi les valeurs possibles, on trouve A3, A4, A5, A6, B3, B4, B5, B6, letter, legal, ANSIA, ANSIB, ANSIC, ANSID, ANSIE. Lang: donne la langue dans laquelle le questionnaire est écrit. Pour l'instant, les seules langues disponibles sont FR (français), ES (espagnol), DE (allemand), IT (Italien), NL (Néerlandais), NO (Norvégien), PT (portugais), JA (Japonais, voir ) et AR (arabe, voir ). Si vous n'utilisez pas cette option, ce sera l'anglais qui sera choisi. Title: Le titre de l'examen, qui sera écrit en haut de la copie. Presentation: Un texte introductif pour l'examen, présentant par exemple la durée, les consignes... RandomSeed: Si le mélange des question et des réponses ne nous convient pas, on peut toujours en changer en modifiant la graine du générateur aléatoire utilisé pour le mélange, grâce à cette option. Si la valeur fournie (à choisir entre 1 et 4194303) est modifiée, alors le mélange sera différent. Bien entendu, une fois les copies d'examen imprimées, il ne faut surtout pas modifier cette valeur ! La valeur est enregistrée dans le fichier xy (sous la forme \rngstate{1}{1527384}). La valeur par défaut est 1527384. ShuffleQuestions: Si cette option est mise à 1 (c'est la valeur par défaut), les questions ne seront pas dans le même ordre dans chaque copie. Si vous lui donnez la valeur 0, les questions ne seront pas mélangées. Code: Affectez à cette option une valeur entière n (par exemple 8) pour demander la présence de cases à cocher pour que les étudiants codent leur numéro d'étudiant sur n chiffres. CodeDigitsDirection: Donnez à cette option la valeur horizontal ou vertical pour imposer la direction suivant laquelle les chiffres du code seront présentés. Si vous n'utilisez pas cette option, AMC choisira en fonction de la taille du code (direction horizontale pour un petit nombre de chiffres, et verticale pour un grand nombre de chiffres). Columns: Si vous donnez à cette option une valeur n entière supérieure à 1, le questionnaire sera écrit sur n colonnes. CompleteMulti: Cette option prend la valeur 1 par défaut, ce qui signifie qu'une réponse "Aucune des réponses ci-dessus n'est correcte" sera ajoutée à la fin de toutes les questions multiples de votre questionnaire. Sans celle-ci, il serait impossible de faire la différence entre "l'étudiant ne répond pas à cette question" et "l'étudiant pense qu'aucune des réponses proposées n'est exacte". Si vous ne souhaitez pas que cette dernière réponse soit ajoutée, donnez la valeur 0 à cette option. L-None: Cette option indique un texte qui remplacera Aucune des réponses ci-dessus n'est correcte (voir option précédente) pour votre questionnaire. QuestionBlocks: Si cette option prend la valeur 1 (sa valeur par défaut), toutes vos questions seront enfermées dans des boîtes (invisibles), de sorte qu'elles ne puissent pas être coupées sur deux pages, ou sur plusieurs colonnes. Avec la valeur 0, les questions pourront être coupées ci besoin, ce qui peut gagner de la place mais perd en lisibilité. L-Question: Cette option sert à remplacer le mot Question dans votre questionnaire si vous utilisez une autre langue que celle indiquée par l'option . L-Name: Cette option sert à remplacer le texte Nom et prénom inscrit dans le cadre où l'étudiant doit inscrire son identité. L-Student: Cette option sert à remplacer le petit texte qui demande de coder son numéro d'étudiant et d'inscrire son nom sur les copies (quand l'option a été utilisée). TitleWidth: Largeur de la zone prévue pour le titre, dans le cas où on n'utilise pas . La valeur par défaut est .47\linewidth. NameFieldWidth: Largeur de la zone destinée à l'écriture du nom et prénom de l'étudiant. On peut utiliser les unités usuelles en LaTeX. La valeur par défaut est 5.8cm si on utilise , et .47\linewidth sinon. NameFieldLines: Nombre de lignes prévues pour l'écriture du nom et prénom de l'étudiant. La valeur par défaut est 2 si on utilise , et 1 sinon. NameFieldLinespace: Interligne dans la zone destinée à l'écriture du nom et prénom de l'étudiant. La valeur par défaut est .5em. Pages: Donne un nombre de pages minimal pour le sujet. Si un sujet comporte moins de pages que cette valeur, des pages blanches seront ajoutées. Dans le cas de l'utilisation d'une feuille de réponses séparée, cette option peut être écrite sous la forme (par exemple ), où s sera le nombre de pages minimal pour la partie sujet et s+r le nombre de pages minimal pour le sujet complet. ManualDuplex: Avec la valeur 1 (ce n'est pas la valeur par défaut), chaque sujet sera constitué d'un nombre pair de pages, de telle sorte que tous les sujets pourront être imprimés manuellement à partir du fichier PDF sujet en mode recto/verso (sans l'utilisation de cette option, le début d'une copie pourraît être sur le verso de la fin de la copie précédente). SingleSided: Avec la valeur 1 (ce n'est pas la valeur par défaut), aucune page blanche ne sera ajoutée entre le sujet et la feuille de réponses séparée, même si le sujet comporte un nombre impair de pages. Ceci peut être utile quand les sujets sont imprimés en recto simple, ou quand il n'est pas nécessaire de séparer physiquement le sujet de la feuille de réponses. BoxColor: Permet de choisir une couleur pour les cases qui peuvent être cochées par les étudiants, afin de perturber le moins possible la saisie automatique à partir des scans (red, pour rouge, est une valeur commune, mais on peut aussi penser à un gris clair). La couleur fournie doit être une couleur valide pour xcolor (voir la documentation du paquet LaTeX xcolor pour plus de détails), comme red, magenta, pink, lightgray, cyan, ou bien sous la forme #RRGGBB, comme #FFBEC8 pour un rouge clair. DefaultScoringS: Donne le barème par défaut pour les questions simples (Reportez-vous à pour la description des barèmes possibles). La valeur par défaut à cette option est le barème qui donne un point à la bonne réponse, et zéro aux autres. DefaultScoringM: Donne le barème par défaut pour les questions multiples (Reportez-vous à pour la description des barèmes possibles). La valeur par défaut de cette option est haut=2, ce qui correspond à un barème donnant deux points pour une réponse parfaitement exacte, et qui enlève un point à chaque erreur (case cochée alors qu'elle ne devrait pas l'être, ou case non-cochée alors qu'elle devrait l'être), sans passer en-dessous de zéro. LaTeX: Si cette option prend la valeur 1, tous les textes de votre questionnaire sont considérés comme étant écrits en TeX (ou LaTeX). Vous pourrez ainsi écrire des formules mathématiques comme $\sqrt{a+b}$. Avec la valeur 0 (valeur par défaut), vos textes seront reproduits sans modification. LaTeX-Preambule: Donne des commandes LaTeX à ajouter dans le préambule (par exemple des \usepackage). LaTeX-BeginDocument: Donne des commandes LaTeX à ajouter au début de l'environnement document (par exemple des définitions de macros). Disable: Donne une liste de convertisseurs à désactiver, séparés par des virgules. Les convertisseurs disponibles sont verbatim (voir ), images (voir ), embf (voir ) et local_latex (voir ). PackageOptions: Donne des options supplémentaires à transmettre au paquet LaTeX automultiplechoice (voir ). Sujet avec feuille de réponses séparée Dans le cas d'un sujet avec feuille de réponses séparée, vous pourrez considérer l'emploi des options suivantes : SeparateAnswerSheet: Donner la valeur 1 à cette option pour obtenir une feuille de réponses séparée. AnswerSheetTitle: Donne le titre à inscrire en tête de la feuille de réponse. AnswerSheetPresentation: Donne le texte de présentation de la feuille de réponse. On pourra, par exemple, y préciser que les réponses doivent uniquement être données sur cette feuille. AnswerSheetColumns: Nombre de colonnes pour la feuille de réponses. AutoMarks: Donner la valeur 1 à cette option pour utiliser l'option (voir ). Questions Les questions simples (qui acceptent une et une seule bonne réponse) commencent par un * en début de ligne, et les questions multiples (celles qui peuvent comporter zéro, une ou plusieures bonnes réponses), commencent par un ** en début de ligne. Vient ensuite le texte de la question, puis les réponses, introduites par un + quand la réponse est correcte ou un - quand elle ne l'est pas. Options pour les questions Des options particulières peuvent être indiquées pour chaque question, entre crochets, juste après l'étoile (ou les deux étoiles pour des questions multiples) qui commence la question (sans espace avant), comme dans l'exemple suivant : *[ordered,horiz,id=addition] Combien font un plus un ? - 0 - 1 + 2 Les options disponibles sont les suivantes : horiz Avec cette option, les réponses se suivront horizontalement plutôt que verticalement une par ligne. columns=n Avec cette option, les réponses seront réparties sur n colonnes. ordered Avec cette option, les réponses ne seront pas mélangées dans chaque copies : elles resteront toujours dans l'ordre indiqué. id=xxxx Avec cette option, le nom xxxx sera donné à la question. Ce nom apparaît dans les fichiers de notes exportés par AMC pour identifier la question plus facilement. Il ne doit comporter que des caractères simples non accentués. a le même rôle que l'option . Cette option est présente pour assurer la compatibilité avec d'anciennes versions, préférez l'utilisation de . indicative Indique que le score affecté à cette question ne sera pas pris en compte pour le score final de l'étudiant. next Avec cette option, la question suivra toujours la question précédente, même lorsque l'on demande de mélanger les questions avec l'option générale . first Avec cette option, la question sera toujours insérée en début de groupe (voir ). last Avec cette option, la question sera toujours insérée en fin de groupe (voir ). Barèmes particuliers Si vous voulez utiliser un barème particulier pour une question ou une réponse, vous pouvez l'indiquer entre accolades, après le signe *, **, +, ou -, et après les éventuelles options, comme dans l'exemple suivant. Reportez-vous à pour la syntaxe de description des barèmes à utiliser. *{b=2,m=-1} Quelle est la capitale de la France ? + Paris - Lille -{-2} Ouagadougou **[ordered,horiz,id=positifs]{haut=1} Parmi les nombres suivants, lesquels sont positifs ? - -2 + 2 + 10 Questions ouvertes Les questions peuvent être transformées en questions ouvertes en indiquant des options (voir ) entre < et >, comme dans l'exemple suivant : *<lines=4> Décrivez la lune. -[O]{0} O -[P]{1} P +[V]{2} V Lors de l'utilisation de questions ouvertes, les options générales suivantes peuvent être intéressantes : L-OpenText: Texte à ajouter après les questions pour demander aux étudiants d'écrire la résponse sur la feuille de réponses séparée (dans le cas où celle-ci est utilisée). L-OpenReserved: Texte (court) à ajouter à côté des cases à cocher des questions ouvertes, indiquant aux étudiants que ces cases sont réservées aux correcteurs. Lignes multiples Tout texte peut se continuer sur la ou les lignes suivantes (même si certaines sont vides), pourvu qu'elles ne puissent pas être interprétées comme un début de définition d'option générale, un début de question ou de réponse. Considérons par exemple l'écriture de question suivante : * Combien font 2 + 2 ? - 0 + 4 - 10 Cette écriture suit bien la syntaxe AMC-TXT, mais ne correspond pas à ce que l'on voulait écrire : ici, la deuxième ligne sera considérée comme une réponse possible, et non comme la suite de la question ! Un problème similaire sera rencontré dans la portion de fichier source suivante, où "Chopin:" sera considéré comme une définition d'option générale : * Vous connaissez sans doute Frédéric Chopin: c'est un compositeur. De quel pays est-il originaire ? + la Pologne - le Vénézuela - la Suisse La version correcte est la suivante : * Vous connaissez sans doute Frédéric Chopin: c'est un compositeur. De quel pays est-il originaire ? + la Pologne - le Vénézuela - la Suisse Notez enfin que pour passer à la ligne suivante, il faut laisser une ligne vide dans le fichier source de l'examen, comme ceci : Description: Titre Description de l'examen sur la ligne suivante. ** Question difficile. Combien y a-t-il d'étoiles dans le ciel ? - une - deux - dix millions Titre Vous pouvez insérer un titre en l'entourant de [== et ==]. Verbatim Pour obtenir un bloc de texte verbatim (par exemple pour un code informatique), entourez-le de [verbatim] et [/verbatim] : * Qu'est-ce que le code suivant écrit ? [verbatim] main( ) { printf("hello, world\n"); } [/verbatim] + [| hello, world |] - [| hello |] - [| world |] Gras, italique, typewriter, souligné Les parties du textes à écrire en gras devront être entourées de [* et *]. Les parties à mettre en italique devront être entourées de [_ et _]. Pour avoir une police façon machine à écrire typewriter, le texte devra être encadré par [| et |]. Pour souligner, encadrer le texte par [/ et /]. ** Choisissez parmi les expressions suivantes celles où le mot en italique est [*un adjectif*]. + Une balle [_bleue_] - Un [_livre_] rose + Quelle [_belle_] histoire ! Inclusion d'images Vous pouvez inclure des images dans votre document suivant la syntaxe suivante : ![height=2cm]images/oiseau.png! Dans cet exemple, l'image images/oiseau.png située dans le répertoire du projet sera insérée avec une hauteur de 2cm. Les options que l'on peut utiliser entre les crochets sont celles de la commande LaTeX \includegraphics (par exemple, width=1cm, ou keepaspectratio). Pour obtenir une image centrée sur une ligne et ayant pour largeur les trois quarts de la ligne, on utilisera de même : !{center}[width=.75\linewidth]images/carte.pdf! Petits morceaux de LaTeX Vous pouvez inclure quelques segments de code LaTeX dans votre description en les incluant entre des double crochets, comme dans l'exemple suivant : Les questions marquées d'un [[\multiSymbole{}]] peuvent avoir zéro, une ou plusieurs bonnes réponses. Groupes de questions Vous pouvez demander à ce que certaines questions restent groupées lors du mélange des questions, et ajouter un texte introductif avant ce groupe de questions (et un autre texte après), en utilisant la syntaxe suivante : *( Les trois questions suivantes concernent Martin Luther King. * En quelle année est-il né ? - 1901 + 1929 - 1968 * En quelle année est-il mort ? - 1945 - 1515 + 1968 - 1999 * Dans quelle ville est-il né ? + Atlanta - Memphis - New York *) Fin des questions sur Martin Luther King. Vous pouvez ajouter des options à l'ouverture du groupe, comme suit : *([shuffle=false,columns=2] Les trois questions suivantes concernent Martin Luther King. Les options suivantes sont acceptées : shuffle=xxx En donnant la valeur true ou false, on demande à mélanger ou non les questions de ce groupe. La valeur par défaut est celle utilisée globalement par l'option . columns=n Donne le nombre de colonnes dans lesquelles seront mises en forme les questions. group=nom Donne un nom au groupe (celui-ci ne sera pas visible sur le sujet, mais uniquement dans le fichier LaTeX généré à partir du fichier source AMC-TXT). numquestions=n Avec cette option, les n premières questions du groupes seront utilisées. Si les questions sont mélangées, cela permettra de sélectionner n questions au hasard. Les questions utilisant l'option ou ne sont pas concernées (et sont toujours insérées). Par ailleurs, les suites de questions regroupées en utilisant l'option ne comptent que pour une seule question. needspace=dim Donne une hauteur (avec l'unité : par exemple 4cm) nécessaire pour commencer l'énoncé de ce groupe. Si la place encore disponible dans la page courante est inférieure à cette valeur, alors l'énoncé du groupe commencera sur la page suivante. En langue arabe La rédaction d'un questionnaire en langue arabe comporte quelques spécificités. Vous utiliserez bien entendu l'option Lang: AR Mais vous devrez également prêter attention aux options suivantes : ArabicFont: C'est la police de caractères qui sera utilisée pour les textes en arabe. Par défaut, AMC utilisera Rasheeq, une police du projet ArabEyes (disponible dans la paquet ttf-arabeyes sur debian et ubuntu par exemple). Pour pouvoir insérer des textes en d'autres caractères dans votre questionnaire, vous devrez utiliser l'option pour passer en mode LaTeX, et englober toutes les portions de texte en caractères non-arabes par la commande LaTeX \textLR comme dans \textLR{la commande xelatex}. En japonais Vous pourrez construire des questionnaires incluant des caractères japonais grâce à l'option Lang: JA AMC fera les ajustements nécessaires pour permettre un bon rendu de ces caractères. Dans ce cas, AMC utilisera pTex comme moteur LaTeX. Une version récente de pTex est nécessaire. La distribution texlive 2009, disponible par exemple sur certaines anciennes versions de distributions linux, n'est pas suffisante. Inclusion de fichiers annexes Vous pouvez inclure le contenu d'autres fichiers à tout moment comme suit : IncludeFile: fichier-a-inclure.txt Faites très attention si le fichier à inclure est utilisé par plusieurs projets ! Supposons par exemple que /home/alexis/questions-a.txt est inclus à la fois dans le projet A et le projet B. Vous avez déjà traité le projet A, et êtes en train de vous occuper du projet B. Vous ajoutez une questions dans le fichier /home/alexis/questions-a.txt, et vous modifier le barème d'une question qui existait déjà. Si vous relancez l'extraction du barème et la notation sur le sujet A, AMC verra apparaître une nouvelle question pour laquelle aucune saisie n'a été effectuée, ce qui posera des problèmes dans toute la notation ! Source au format LaTeX Ce paragraphe détaille la rédaction en LaTeX d'une questionnaire à choix multiples utilisable par AMC. Si vous avez choisi un autre format de fichier source, vous pouvez passer directement au chapitre suivant. Un questionnaire à choix multiples peut être décrit sous la forme d'une fichier LaTeX utilisant le package automultiplechoice. Vous pouvez à tout moment tester le fichier LaTeX que vous êtes en train de concevoir en le compilant avec la commande latex puis en visualisant le fichier dvi qui en résulte. Nous commençons par quelques exemples qui permettent d'appréhender rapidement la construction de fichiers LaTeX de QCM ; les fichiers tex de ces exemples sont fournis avec AMC sous la forme de modèles utilisables en créant un nouveau projet de QCM à partir d'un de ces modèles. Un exemple simple \documentclass[a4paper]{article} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[francais,bloc,completemulti]{automultiplechoice} \begin{document} \exemplaire{10}{ %%% debut de l'en-tête des copies : \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf Test\\ Examen du 01/01/2008\end{minipage} \champnom{\fbox{ \begin{minipage}{.5\linewidth} Nom et prénom : \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }} \begin{center}\em Durée : 10 minutes. Aucun document n'est autorisé. L'usage de la calculatrice est interdit. Les questions faisant apparaître le symbole \multiSymbole{} peuvent présenter zéro, une ou plusieurs bonnes réponses. Les autres ont une unique bonne réponse. Des points négatifs pourront être affectés à de \emph{très mauvaises} réponses. \end{center} \vspace{1ex} %%% fin de l'en-tête \begin{question}{prez} Parmi les personnalités suivantes, laquelle a été présidente de la république française~? \begin{reponses} \bonne{René Coty} \mauvaise{Alain Prost} \mauvaise{Marcel Proust} \mauvaise{Claude Monet} \end{reponses} \end{question} \begin{questionmult}{pref} Parmi les villes suivantes, lesquelles sont des préfectures~? \begin{reponses} \bonne{Poitiers} \mauvaise{Sainte-Menehould} \bonne{Avignon} \end{reponses} \end{questionmult} % \AMCaddpagesto{3} } \end{document} Quelques précisions sur cet exemple : Les deux paquets inputenc et fontenc permettent d'écrire le texte du questionnaire en utilisant l'encodage ISO-8859-1 (latin1). Vous pouvez bien entendu les modifier suivant l'encodage que vous utilisez. Les options utilisées ici pour le paquet LaTeX automultiplechoice permettent d'éviter le changement de page à l'intérieur des questions () et de compléter automatiquement chaque question multiple par une réponse type permettant à l'étudiant d'indiquer qu'il considère qu'aucune des réponses proposées n'est exacte (). La commande exemplaire permet de fabriquer autant d'exemplaires (différents) du questionnaire QCM que l'on souhaite (ici, 10). Voir  pour une syntaxe alternative utilisant un environnement. Les lignes qui commencent ici permettent la mise en forme de l'en-tête de chaque copie. La commande champnom permet d'indiquer la partie du questionnaire dans laquelle chaque étudiant inscrira son nom. Les environnements question et reponses permettent de fabriquer une question à choix multiples pour laquelle une unique réponse est correcte. Il faut indiquer un identifiant unique de la question (ici : prez). Les environnements questionmult et reponses permettent de fabriquer une question pouvant avoir zéro, une ou plusieurs bonnes réponses. L'étudiant est donc invité à cocher toutes les cases correspondant aux réponses qu'il pense correctes, ou la dernière case (ajoutée automatiquement grâce à l'option passée au paquet en ligne 6). Si vous décommentez cette ligne, AMC ajoutera des pages blanches pour atteindre trois pages de sujet (voir ). Cette fermeture d'accolade marque la fin de la commande exemplaire (débutée à la ligne 9). Un exemple avec groupes de questions mélangées Dans cet exemple, on veut que l'ordre dans lequel les questions sont posées soit différent d'une copie à l'autre, tout en laissant ensemble les questions traitant du même sujet. On va donc créer deux groupes de questions, et les mélanger lors de la fabrication de chaque copie. \documentclass[a4paper]{article} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[francais,bloc,completemulti]{automultiplechoice} \begin{document} %%% préparation des groupes \setdefaultgroupmode{withoutreplacement} \element{geographie}{ \begin{question}{Paris} Dans quel continent se situe Paris~? \begin{reponses} \bonne{L'Europe} \mauvaise{L'Afrique} \mauvaise{L'Asie} \mauvaise{La planète Mars} \end{reponses} \end{question} } \element{geographie}{ \begin{question}{Cameroun} Quelle est la capitale du Cameroun~? \begin{reponses} \bonne{Yaoundé} \mauvaise{Douala} \mauvaise{Abou-Dabi} \end{reponses} \end{question} } \element{histoire}{ \begin{question}{Marignan} En quelle année a eu lieu la bataille de Marignan~? \begin{reponseshoriz} \bonne{1515} \mauvaise{1915} \mauvaise{1519} \end{reponseshoriz} \end{question} } \element{histoire}{ \begin{questionmult}{Nantes} Que peut-on dire de l'Édit de Nantes~? \begin{reponses} \bonne{Il a été signé en 1598} \bonne{Il a été définitivement révoqué par Louis XIV} \mauvaise{Il a été signé par Henri II} \end{reponses} \end{questionmult} } %%% fabrication des copies \exemplaire{10}{ %%% debut de l'en-tête des copies : \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf Histoire et géographie\\ Examen du 01/01/2008 \end{minipage} \champnom{\fbox{\begin{minipage}{.5\linewidth} Nom et prénom : \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage}}} %%% fin de l'en-tête \begin{center} \hrule\vspace{2mm} \bf\Large Géographie \vspace{1mm}\hrule \end{center} \restituegroupe{geographie} \begin{center} \hrule\vspace{2mm} \bf\Large Histoire \vspace{2mm}\hrule \end{center} \restituegroupe{histoire} } \end{document} Un exemple avec une feuille de réponses séparée Dans cet exemple, on souhaite que les cases à cocher soient toutes rassemblées sur une feuille à part. De cette manière, la triche entre étudiants est plus difficile, et surtout, il suffira de scanner une seule page par étudiant, ce qui allège la tâche de l'enseignant dans le cas où son matériel ne lui permet de scanner les copies que de manière manuelle. Dans cet exemple, le nombre de questions est réduit : elles tiennent toutes sur une page et il serait donc inutile d'utiliser une telle mise en page dans ce cas précis. À vous de modifier cette base pour utiliser cette mise en page avec de nombreuses questions ! \documentclass[a4paper]{article} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[francais,bloc,completemulti,ensemble]{automultiplechoice} \begin{document} \AMCrandomseed{1237893} \def\AMCformQuestion#1{{\sc Question #1 :}} \setdefaultgroupmode{withoutreplacement} \element{general}{ \begin{question}{prez} Parmi les personnalités suivantes, laquelle a été présidente de la république française~? \begin{reponses} \bonne{René Coty} \mauvaise{Alain Prost} \mauvaise{Marcel Proust} \mauvaise{Claude Monet} \end{reponses} \end{question} } \element{general}{ \begin{questionmult}{pref} Parmi les villes suivantes, lesquelles sont des préfectures~? \begin{reponses} \bonne{Poitiers} \mauvaise{Sainte-Menehould} \bonne{Avignon} \end{reponses} \end{questionmult} } \element{general}{ \begin{question}{nb-ue} Combien d'états sont membres de l'Union Européenne en janvier 2009 ? \begin{reponseshoriz}[o] \mauvaise{15} \mauvaise{21} \mauvaise{25} \bonne{27} \mauvaise{31} \end{reponseshoriz} \end{question} } \exemplaire{5}{ %%% debut de l'en-tête des copies : \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf Test\\ Examen du 01/01/2008 \end{minipage} \begin{center}\em Durée : 10 minutes. Aucun document n'est autorisé. L'usage de la calculatrice est interdit. Les questions faisant apparaître le symbole \multiSymbole{} peuvent présenter zéro, une ou plusieurs bonnes réponses. Les autres ont une unique bonne réponse. Des points négatifs pourront être affectés à de \emph{très mauvaises} réponses. \end{center} \vspace{1ex} %%% fin de l'en-tête \restituegroupe{general} \AMCcleardoublepage % \AMCaddpagesto{3} \AMCdebutFormulaire %%% début de l'en-tête de la feuille de réponses {\large\bf Feuille de réponses :} \hfill \champnom{\fbox{ \begin{minipage}{.5\linewidth} Nom et prénom : \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }} \begin{center} \bf\em Les réponses aux questions sont à donner exclusivement sur cette feuille : les réponses données sur les feuilles précédentes ne seront pas prises en compte. \end{center} %%% fin de l'en-tête de la feuille de réponses \formulaire % \AMCaddpagesto{5} } \end{document}Les remarques suivantes devraient éclaircir cet exemple : C'est l'option qui permet de faire ce que l'on veut faire ici. On peut redéfinir de cette manière la façon dont les questions seront identifiées sur la page des réponses (cette ligne est facultative). Ce saut de page précède la page spéciale où seront regroupées toutes les cases à cocher. Si on imprime en recto-verso, il vaut mieux utiliser \AMCcleardoublepage pour que la page de formulaire soit sur une feuille séparée des autres. Si on imprime en recto simple, on peut utiliser simplement \clearpage. En décommentant cette ligne, AMC ajoutera des pages blanches à la partie sujet afin d'atteindre trois pages (voir ). Cette commande marque le début de la partie formulaire de la copie. Son utilisation est indispensable pour un bon traitement des questions qui n'apparaissent que dans cette partie, comme par exemple celles générées par AMCcodeGrid. La case où écrire son nom doit normalement être située sur la page des réponses ! C'est la commande LaTeX formulaire qui écrit toutes les cases à cocher. En décommentant cette ligne, AMC ajoutera les pages blanches nécessaires afin d'atteindre cinq pages au total (sujet+formulaire), voir . Quand on utilise une page de réponses séparée, des lettres (ou des chiffres, avec l'utilisation de l'option , voir ) sont inscrites dans les cases à cocher. Pour obtenir une bonne détection des cases cochées, il est donc indispensable de demander aux étudiants de remplir totalement les cases voulues (cocher uniquement les cases à l'aide d'une croix ne serait pas suffisant). Il faut par ailleurs fixer le paramètre « seuil de noirceur » (qui définit la proportion de noir dans une case à partir de laquelle cette case est considérée comme étant cochée) à une valeur de l'ordre de 0,5. Description des commandes LaTeX Options du paquet L'utilisation du paquet automultiplechoice se fait grâce à la ligne \usepackage[...]{automultiplechoice}où les pointillés sont remplacés par une liste d'options séparées par des virgules. Les options disponibles sont les suivantes :  : indique que le sujet d'examen est en français. Les quelques mentions éventuellement ajoutées par automultiplechoice seront alors écrites en français (on peut en particulier penser à la phrase « aucune de ces réponses n'est correcte », voir option plus loin).  : indique que le sujet est dans la langue XX. Pour le moment, seules les langues FR (français), DE (allemand), ES (espagnol), IT (Italien), JA (Japonais), NL (Néerlandais), NO (Norvégien) et PT (Portugais) sont disponibles.  : permet de créer un formulaire, remplissable via les lecteurs de fichiers pdf. AMC ne gère pas l'envoi automatique des sujets.  : place chaque question dans un bloc, de telle sorte qu'elle ne puisse pas être coupée par un saut de page. Vous pouvez, ponctuellement, pour une meilleure mise en page, annuler, pour une question, cette option avec la commande \AMCnobloc. {\AMCnobloc% \begin{question}{prez} Parmi les personnalités suivantes, laquelle a été présidente de la république française~? \begin{reponses} \bonne{René Coty} \mauvaise{Alain Prost} \mauvaise{Marcel Proust} \mauvaise{Claude Monet} \end{reponses} \end{question}% }%  : même effet que , mais pour dans la feuille de réponses séparée.  : ajoute de manière automatique une réponse type « aucune de ces réponses n'est correcte » à la fin de chaque question multiple. Ceci permet de différencier, pour ces questions, une absence de réponse et la réponse qui consiste à ne choisir aucune des réponses proposées. Que cette option soit utilisée ou non, on peut demander l'ajout de cette dernière réponse ou l'annuler pour une question particulière en utilisant une des commandes \AMCcompleteMulti et \AMCnoCompleteMulti à l'intérieur de l'environnement questionmult correspondant.  : annule le mélange automatique de l'ordre des réponses dans toutes les questions.  : annule le mélange automatique de l'ordre des groupes. (voir )  : produit la correction du QCM, et non le sujet.  : produit la correction de tous les sujets.  : demande à ce que les cases à cocher soient toutes rassemblées en fin de copie (cette option est en général utilisée quand on ne veut scanner qu'une seule page par étudiant - voir ).  : si on utilise l'option , l'option demande d'identifier les questions avec des chiffres plutôt qu'avec des lettres (ce qui est le comportement par défaut).  : si on utilise l'option , cette option demande à ce que les lettres ou chiffres soient inscrits, sur la feuille de réponses, à l'extérieur des cases à cocher plutôt qu'à l'intérieur.  : initialise le générateur du hasard à partir de l'horloge. Option pour test : ne pas utiliser pour un examen !  : si on n'utilise pas l'option , cette option permet d'inscrire des lettres (ou chiffres) à l'intérieur des cases à cocher (ce n'est pas le cas par défaut).  : option utilisée pour présenter les questions sous forme d'un catalogue dans lequel on piochera pour constituer un examen. Les questions ne sont pas identifiées par des numéros mais par leur nom. En général, on n'utilise pas la commande \exemplaire pour cette présentation.  : option utilisée si on souhaite indiquer les bonnes réponses après l'examen, grâce à une copie remplie par l'enseignant - voir .  : annule le paramètre optionnel de \restituegroup et \copygroup, ainsi chaque groupe est entièrement inséré et copié (voir ).  : Si vous choisissez de modifier la forme des cases à cocher (carrées par défaut voir ) par des ovales ou des cercles, vous pouvez transmettre cette option à automultiplechoice pour qu'il utilise plutôt que pour stocker le dessin des cases.  : en mode , utilisez cette option si vous voulez que les marques de calage ne soient pas imprimées sur les pages de sujet, mais uniquement sur les pages de réponse. Vous pouvez alors personnaliser la façon d'imprimer les numéros de page sur le sujet en redéfinissant la commande \AMCsubjectPageTag : \renewcommand\AMCsubjectPageTag{% \fbox{\texttt{\the\AMCid@etud:\thepage}}% } L'option ne doit pas être utilisée dans le cas ou une quelconque information doit être collectée depuis les pages de sujet, car AMC ne pourra pas traiter ces pages.  : utilisez cette option si vous ne voulez pas utiliser les marges, marques de calage et codes d'identification de page d'AMC. Cette option est donc à utiliser pour produire des documents qui ne seront pas traités par AMC, comme des listes d'exercices par exemple. Description d'une copie Le code LaTeX décrivant le contenu de chaque copie doit être inclus dans un appel à la commande \exemplaire, avec pour premier argument le nombre de copies et pour deuxième argument le code utilisé pour générer une copie. \exemplaire{50}{ ... } Vous disposez d'une syntaxe alternative utilisant l'environnement copieexamen, qui a en option le nombre de copies désiré (5 par défaut). \begin{copieexamen}[50] ... \end{copieexamen} Cette dernière syntaxe utilise le paquet environ, qui n'est pas disponible dans la distribution TeX Live 2007, encore utilisée dans des distributions Ubuntu jusqu'à la version 9.10 (Karmic Koala). Pour différencier les copies, la commande \exemplairepair peut être utile. À utiliser sous la forme d'un test de condition. Le numéro de la copie peut être obtenu par la commande \AMCStudentNumber. Questions et réponses Pour les questions simples (une seule réponse correcte), on utilisera le modèle suivant : \begin{question}{identifiant} Texte de la question... \begin{reponses} \bonne{La bonne réponse} \mauvaise{Une mauvaise réponse} \mauvaise{Une autre mauvaise réponse} \end{reponses} \end{question} Il faut utiliser un identifiant différent pour chaque question. Un identifiant peut être constitué de chiffres, lettres et caractères simples (ne pas utiliser le caractère souligné _, les accolades, crochets, par exemple !). Il ne faut pas utiliser d'identifiants se terminant par un nombre entier entre crochets (comme marine-marchande[2] ou 123[27]), car cette forme d'identifiants est réservée à la saisie de longs codes (par exemple grâce à \AMCcodeGrid - voir ). Le nombre de réponses pour une question est actuellement limité à 199. Il ne faut pas imbriquer deux questions sinon l'export des notes sera incomplet (voir ). Pour demander à garder l'ordre des réponses pour cette question-ci, on peut utiliser l'option de l'environnement , en remplaçant la ligne 3 par \begin{reponses}[o] Pour mettre les réponses sur deux colonnes, on peut utiliser le package multicol en mettant dans le préambule (juste après l'appel au paquet automultiplechoice par exemple) la ligne \usepackage{multicol}et en incluant l'environnement reponses à l'intérieur d'un environnement multicols de la manière suivante : \begin{multicols}{2} \begin{reponses} \bonne{La bonne réponse} \mauvaise{Une mauvaise réponse} \mauvaise{Une autre mauvaise réponse} \end{reponses} \end{multicols} Pour les réponses plus courtes encore, on peut demander à ce que les réponses soient imprimées les unes à la suite des autres, en utilisant l'environnement au lieu de . Les questions multiples (celles pour lesquelles aucune, une ou plusieurs réponses peuvent être correctes) utiliseront l'environnement au lieu de . Dans le cas où la question posée est juste informative et ne doit pas contribuer à la note de l'étudiant, on utilisera la commande \QuestionIndicative, comme dans l'exemple suivant : \begin{question}{facilite}\QuestionIndicative \bareme{auto=0,v=-1,e=-2} Vous êtes-vous sentis à l'aise ou en difficulté dans cet enseignement ? Répondez sur une échelle de 0 (grandes difficultés) à 5 (très à l'aise). \begin{reponseshoriz}[o] \bonne{0} \bonne{1} \bonne{2} \bonne{3} \bonne{4} \bonne{5} \end{reponseshoriz} \end{question} Dernier choix Vous pouvez choisir de toujours laisser une ou plusieurs réponses en dernière position avec la commande \lastchoices. \begin{question}{color} Which color? \begin{choiceshoriz} \wrongchoice{red} \wrongchoice{blue} \wrongchoice{yellow} \lastchoices \correctchoice{transparent} \wrongchoice{can't say} \end{choiceshoriz} \end{question} \begin{questionmult}{number} How many? \begin{choiceshoriz} \wrongchoice{none} \correctchoice{one} \wrongchoice{two} \wrongchoice{three} \lastchoices \correctchoice{not so much} \wrongchoice{a lot} \end{choiceshoriz} \end{questionmult} Numéro de question On peut modifier le numéro de la prochaine question à l'aide de la commande \AMCnumero. Au début de chaque copie, un appel à \AMCnumero{1} est effectué, mais cette commande peut être utilisée à tout moment. Pour cacher le numéro d'une question particulière et conserver dans le sujet une continuité des numéros, ajouter la commande \AMCquestionNumberfalse juste après \AMCbeginQuestion (ou utiliser la commande ci-dessus) : { \AMCquestionNumberfalse \def\AMCbeginQuestion#1#2{} \begin{question} ... \end{question} } Approfondir la réponse Lors de l'impression du corrigé, vous pouvez apporter des précisions grâce à la commande \explain. Cette commande, à insérer dans un environnement (ce qui inclut les environnements , ), affichera le texte écrit. Ne sera pas affiché sur le corrigé individuel. \begin{question}{combustion} Quel gaz apparaît lors de la combustion incomplète du butane~? \begin{reponses} \bonne{Le monoxyde de carbone.} \mauvaise{Le dioxyde de carbone.} \mauvaise{Le dioxygène.} \end{reponses} \explain{Le monoxyde de carbone est un gaz incolore, inodore et toxique.} \end{question} Par défaut, le mot Explication sera affiché. Vous pouvez modifier ce texte pour une ou plusieurs questions avec la commande \AMCtext (Voir ). \begin{question}{elevation} Parmi les montagnes suivantes, laquelle est la plus haute ? \begin{reponses} \bonne{Sagarmatha} \mauvaise{K2} \mauvaise{Mont Blanc} \mauvaise{Aconcagua} \end{reponses} \explain{Sagarmatha qui signifie littéralement `la tête du ciel' est le nom indigène du mont Everest, la montagne la plus haute du monde.} \end{question} \begin{question}{odd} Cochez l'intrus. \begin{reponses} \bonne{Kilimanjaro} \mauvaise{Himalayas} \mauvaise{Alpes} \mauvaise{Andes} \end{reponses} \AMCtext{explain}{\textit{\textbf{Raison :}}} \explain{Le Kilimanjaro est une montagne tandis que les autres sont des chaînes de montagnes.} \end{question} \begin{questionmult}{himalaya} Parmi les montagnes suivantes, lesquelles se trouvent dans l'Himalaya ? \begin{reponses} \bonne{Mount Everest} \bonne{K2} \mauvaise{Mont Blanc} \mauvaise{Aconcagua} \end{reponses} \explain{L'Aconcagua est situé dans la cordillère des Andes tandis que le Mont Blanc se trouve dans les Alpes.} \end{questionmult} Explication : sera affiché avant les explications de la première et troisième réponse, Raison : avant les explications de la deuxième question. Réponses sur plusieurs colonnes Afin de présenter les réponses sur plusieurs colonnes (et gagner de la place), on pourra englober l'environnement dans un environnement , en utilisant le paquet LaTeX multicol. Si de plus les réponses tiennent sur plusieurs lignes, cela pourrait entraîner le passage d'une réponse d'une colonne à l'autre, ce qui est un peu déroutant pour le lecteur. La commande \AMCBoxedAnswers a été définie afin d'éviter ce phénomène, en enveloppant chaque réponse dans une boite. On pourra l'utiliser comme dans l'exemple suivant : \begin{question}{deux colonnes} Qu'est-ce qu'un oiseau ? \begin{multicols}{2}\AMCBoxedAnswers \begin{reponses} \bonne{C'est un animal à ailes et qui pond des \oe{}ufs. Il y en a de toutes les couleurs} \mauvaise{C'est un grand meuble en bois qui sert la plupart du temps à ranger du linge de maison} \mauvaise{C'est une machine à vapeur qui permet de fermer les boîtes de conserve à grande vitesse} \end{reponses} \end{multicols} \end{question} On notera qu'il est aussi possible de paramétrer l'espace vertical séparant deux blocs de réponse grâce à la dimension AMCinterBrep : \AMCinterBrep=.5ex Espacement entre les réponses Il est possible d'augmenter l'espace vertical séparant plusieurs réponses en modifiant la dimension AMCinterIrep : \AMCinterIrep=.75ex Définir la zone de notation Vous pouvez ajouter une option supplémentaire de zone de notation (voir ) avec le package tikz. \usepackage{tikz} Sans l'option <option>ensemble</option> Dans ce mode, le sujet et les réponses sont sur la(es) même(s) feuilles. Taper cette commande, après le \begin{document} et avant la commande \exemplaire : \AMCsetScoreZone{width=1.5em,height=1.5ex,depth=.5ex,position=margins} Les grandeurs width, height, depth définissent les dimensions de la case de notation ainsi que son emplacement sur la feuille de réponses. Cette zone invisible est définie pour toutes les questions. La variable position peut prendre les valeurs : none, question, margin, margins. Avec l'option <option>ensemble</option> Dans ce mode, la feuille de réponses est séparée du sujet. Taper cette commande, après le \begin{document} et avant la commande \exemplaire : \AMCsetScoreZoneAnswerSheet{width=1.5em,height=1.5ex,depth=.5ex,position=question} Les grandeurs width, height, depth définissent les dimensions de la case de notation ainsi que son emplacement sur la feuille de réponses. Cette zone invisible est définie pour toutes les questions. La variable position peut prendre les valeurs : none, question, margin, margins. L'option ne fonctionne pas avec AMC-TXT Vous ne pouvez pas modifier votre sujet a posteriori en rajoutant l'une de ces fonctions après l'impression du sujet. Groupes de questions L'inclusion de questions dans des groupes permet de mélanger les questions à l'intérieur de ces groupes, de manière différente pour chaque copie. Chaque groupe de questions devra avoir un nom formé uniquement de lettres non-accentuées. On peut mettre une à une des questions dans un groupe, comme dans l'exemple suivant : \element{ungroupe}{ \begin{question}{facile} Alors, combien font un plus un~? \begin{reponseshoriz} \bonne{deux} \mauvaise{zéro} \mauvaise{trois} \end{reponseshoriz} \end{question} } La constitution du groupe, par les commandes element, doit être faite une seule fois : ces commandes doivent donc être utilisées avant la commande exemplaire, qui va répéter certaines actions pour chaque copie. Enfin, on restitue les questions du groupe par la commande restituegroupe, comme dans \restituegroupe{ungroupe} La manière dont le groupe est restitué peut être contrôlée par le mode du groupe, défini grâce à la commande setgroupmode  (appelé après la création des groupes et avant \exemplaire): \setgroupmode{mygroup}{XXX} XXX peut prendre les valeurs suivantes : fixed avec ce mode, les éléments du groupe sont pris à partir du début du groupe à chaque restitution. cyclic les éléments sont pris à la suite les uns des autres à chaque restitution, en repartant du début si nécessaire. withreplacement même chose que pour fixed, mais le groupe est mélangé à chaque fois. withoutreplacement comme cyclic, en ajoutant un mélange à chaque fois que l'on reprend au début. Un mode par défaut peut être choisi pour tous les groupes qui seront créés ensuite (un groupe est créé à la première utilisation de element) : \setdefaultgroupmode{XXX} Une fois un groupe constitué, on peut mélanger les questions qui le composent par la commande melangegroupe : par exemple, \melangegroupe{ungroupe} Cependant, cette commande n'a pas à être utilisée si on utilise les modes de groupes comme il faut. Si vous réutilisez des sujets mis en page avec une version antérieure à AMC 1.2.2014.111201 et choisissez un des trois autres modes que celui par défaut (fixed), supprimez la commande \melangegroupe. Si cette commande n'est pas utilisée, c'est le mode fixed qui sera utilisé. On peut manipuler les groupes de questions de manière plus précise grâce aux commandes suivantes : \restituegroupe[n]{ungroupe} (utilisation du paramètre optionnel n) restitue uniquement les n premiers éléments du groupe. \insertgroupfrom[n]{ungroupe}{i} Cette commande fait la même chose que \restituegroupe[n]{ungroupe} mais la sélection débute à l'élément i. Le premier élément a pour valeur d'indice 0. \cleargroup{groupe} efface tout le contenu du groupe. \copygroup{depuis}{vers} copie le contenu du groupe depuis à la fin du groupe vers. Cette commande admet un argument optionnel qui permet de ne copier qu'un certain nombre d'éléments, comme dans \copygroup[n]{depuis}{vers}. \copygroupfrom[n]{depuis}{vers}{i} Cette commande fait la même chose que \copygroup[n]{depuis}{vers} mais la sélection débute à l'élément i. Le premier élément a pour valeur d'indice 0. À l'aide de ces commandes, on peut par exemple composer un sujet en prenant 4 questions au hasard dans le groupe GA, 5 questions au hasard dans le groupe GB, toutes les questions du groupe GO, puis en mélangeant le tout, grâce aux commandes suivantes (à mettre à l'intérieur du texte en argument de la commande exemplaire, et en supposant que les groupes GA, GB et tout sont de mode withreplacement ou withoutreplacement) : \cleargroup{tout} \copygroup[4]{GA}{tout} \copygroup[5]{GB}{tout} \copygroup{GO}{tout} \restituegroupe{tout} Papier, marges Le paquet LaTeX automultiplechoice utilise geometry pour gérer les marges et la mise en page. Vous pouvez modifier ses réglages grâce à l'utilisation de la commande \geometry juste avant le \begin{document} - voir la documentation du paquet geometry pour plus de détails. Les valeurs initialisées par AMC sont les suivantes : \geometry{hmargin=3cm,headheight=2cm,headsep=.3cm,footskip=1cm,top=3.5cm,bottom=2.5cm} Si vous réduisez les marges pour gagner de la place, gardez à l'esprit que : Les quatre marques de coin doivent être imprimées entièrement (elles pourraient disparaître à cause des marges d'impression). Les quatre marques de coin doivent apparaître complètement sur les scans des copies remplies par les étudiants (si elles sont trop près des bords, elles pourraient disparaître lors du scan à la suite d'un décalage ou d'une rotation des feuilles de papier). Vous pouvez également préciser la taille de papier à utiliser en ajoutant l'option correspondante à la liste donnée en argument à \geometry. Parmi les valeurs possibles, on trouvera a4paper, a5paper, a6paper, b4paper, b5paper, ansibpaper, ansicpaper, ansidpaper, letterpaper, executivepaper, legalpaper. Pour des petites tailles de papier, il peut aussi être intéressant de modifier la position de l'identifiant de copie (de la forme +1/1/53+) à côté de son équivalent en cases blanches et noires, en haut de chaque page. Ceci est rendu possible par la commande \AMCidsPosition, sous la forme \AMCidsPosition{pos=p,width=w,height=h} p peut valoir none (ne pas écrire cet identifiant), top (l'écrire au-dessus) et side (à côté), et w et h sont les dimensions de la boîte (invisible) qui entoure l'identifiant. Les valeurs par défaut sont les suivantes : \AMCidsPosition{pos=side,width=4cm,height=3ex} Concluons par un exemple raisonnable au format A5 : \geometry{a5paper,hmargin=1.6cm,top=2.5cm} \AMCidsPosition{pos=top} N'utilisez pas le paquet pgfpages ou toutes autres commandes de mise en page modifiant l'impression du nombre de pages par feuille. Style des cases à cocher La commande \AMCboxStyle (nouveau nom de la commande \AMCboxDimensions qui reste compatible avec les options ci-dessous) permet de modifier une ou plusieurs dimensions relatives aux cases à cocher : Les valeurs par défaut des options sont : \AMCboxStyle{shape=square,size=2.5ex,down=.4ex,rule=.5pt,outsidesep=.1em,color=black} représente la forme des cases à cocher. La valeur square produit des carrés (ou des rectangles si on donne des dimensions différentes pour la hauteur et la largeur). La valeur oval produit des cercles ou des ovales. Si vous voulez utiliser oval, vous devez charger le paquet LaTeX tikz. représente la largeur des cases ; représente la hauteur des cases ; représente la taille (à la fois et ) de ces cases ; représente l'épaisseur du contour des cases ; représente la taille du déplacement vers le bas des cases. représente la distance entre la case et la lettre (ou le chiffre) quand l'option est choisie (voir ). visible uniquement sur la feuille réponse, indique par une croix la bonne réponse au lieu de colorier la case. visible uniquement sur la feuille réponse, représente l'épaisse de la croix précédente. permet d'indiquer la couleur à utiliser pour les cases à cocher. La couleur col doit être reconnue par le paquet LaTeX xcolor. On pourra ainsi utiliser certains noms de couleurs (comme red pour le rouge), ou définir soi-même sa couleur comme dans \definecolor{vertclair}{rgb}{0.67,0.88,0.5} \AMCboxStyle{color=vertclair} Pour obtenir des cases plus petites, on pourra, par exemple, utiliser la commande \AMCboxStyle{size=1.7ex,down=.2ex} Lors de l'utilisation de l'option , il est possible de modifier la manière de nommer les cases à cocher (c'est-à-dire ce qui sera inscrit dans chaque case). Le comportement par défaut est d'écrire des lettres majuscules, ou des chiffres si l'option est utilisée. Pour changer cela, il faut redéfinir la commande \AMCchoiceLabel, qui prend comme unique argument le nom du compteur utilisé pour la numérotation des cases. Ainsi, pour obtenir des lettres minuscules, on utilisera : \def\AMCchoiceLabel#1{\alph{#1}} De même, lors de l'utilisation du paquet LaTeX arabxetex, la commande suivante pourra se révéler utile : \def\AMCchoiceLabel#1{\textLR{\Alph{#1}}} Pour changer le style des lettres inscrites dans les cases, on pourra également redéfinir la commande \AMCchoiceLabelFormat. Par exemple, pour obtenir des lettres grasses, on utilisera : \def\AMCchoiceLabelFormat#1{\textbf{#1}} Pour changer le style des lettres inscrites à l'exterieur des cases, on pourra également redéfinir la commande \AMCoutsideLabelFormat. Par exemple, pour obtenir des lettres grasses, on utilisera : \def\AMCoutsideLabelFormat#1{\textbf{#1}} La commande latex pour basculer en mode corrigé (cases bonnes réponses coloriées) est \AMC@correctrue. Vous pouvez créer une commmande pour indiquer à AMC de basculer en mode corrigé même dans le sujet (DOC-sujet.pdf). Le code si dessous est à inscrire juste après \begin{document}. \makeatletter \def\AMCforcecorrect{\AMC@correctrue} \makeatother Vous pouvez inclure cette commande pour une question particulière qui sera encadrée par des accolades pour en limiter l'effet. Indiquez un barème nul ou utilisez la commande \QuestionIndicative {\AMCforcecorrect\begin{questionmult}{test}\QuestionIndicative ..... \end{questionmult} } Style du questionnaire La façon dont chaque question est présentée peut être modifiée en redéfinissant la commande LaTeX AMCbeginQuestion, dont la définition par défaut est la suivante : \def\AMCbeginQuestion#1#2{\par\noindent{\bf Question #1} #2\hspace*{1em}} Le premier paramètre transmis à cette commande est le numéro de question à afficher. Le second paramètre contient \multiSymbole dans le cas dune question à plusieurs réponses possibles, et est vide dans les autres cas. La commande \multiSymbole peut aussi être modifiée : elle a pour charge de différentier les questions à réponses multiples des autres. Par défaut, elle affiche un trèfle : \def\multiSymbole{$\clubsuit$} Avec le mode copies préremplies (voir ) , cette commande doit être appelée via une macro dans le préambule. \def\jepasse{\def\AMCbeginQuestion##1##2{}\AMCquestionNumberfalse} puis de l'utiliser quand on en a besoin (Ne pas oublier d'insérer des crochets autour pour limiter son effet à une question) : {\jepasse \begin{question}{Calibre600} Quel calibre doit-on choisir pour mesurer une tension inconnue? \begin{reponseshoriz}[o] \mauvaise{200}\mauvaise{2}\mauvaise{20}\mauvaise{200}\bonne{600} \end{reponseshoriz} \end{question} } La présentation des réponses peut être modifiée de la même façon, si on utilise l'environnement au lieu de ou , en redéfinissant les trois macros LaTeX suivantes : \def\AMCbeginAnswer{} \def\AMCendAnswer{} \def\AMCanswer#1#2{#1 #2} Lorsque vous êtes à l'intérieur de la commande \exemplaire, il faut doubler les #. \def\AMCanswer##1##2{##1 ##2} \def\AMCbeginQuestion##1##2{} Certains espacements peuvent également être modifiés : \AMCinterIrep=0pt \AMCinterBrep=.5ex \AMCinterIquest=0pt \AMCinterBquest=3ex \AMCpostOquest=7mm \setlength{\AMChorizAnswerSep}{3em plus 4em} \setlength{\AMChorizBoxSep}{1em} Ces dimensions correspondent aux espaces verticaux ajoutés entre les questions (quest) ou les réponses (rep), en mode boîte (B, obtenu avec \AMCBoxedAnswers ou l'option de package ) ou standard (I), l'espace après une question ouverte. Les deux dernières longueurs sont utilisées pour l’environnement . Mise en page Marges Les marges ont été choisies de telle manière que le document s'imprime correctement sur la majorité des imprimantes. Si votre imprimante permet de les réduire, vous pouvez le faire en utilisant la commande geometry du paquet LaTeX geometry. Par exemple, pour resserrer le haut des copies, on pourra utiliser \geometry{top=3cm} au lieu de la valeur 3.5cm utilisée par défaut, juste avant le \begin{document}. Nombre de pages AMC gère automatiquement le nombre de pages à générer pour chaque sujet. Vous pouvez choisir de fixer un nombre de pages identiques pour chaque sujet avec la commande \AMCaddpagesto{entier} à placer à l'endroit où vous souhaitez atteindre ce nombre de pages (en général à la toute fin de la description de la copie, ou juste avant le formulaire). Style du formulaire séparé Il est aussi possible de modifier la mise en page du formulaire de réponses séparé produit avec l'option (voir ). Si on veut simplement modifier l'espacement horizontal entre deux cases de réponses ou l'espacement vertical entre deux questions, il suffit de redéfinir les dimensions suivantes : \AMCformHSpace=.3em \AMCformVSpace=1.2ex Pour un changement plus profond de la mise en page, on peut aussi redéfinir les commandes utilisées en début de chaque question et pour chaque réponse : \def\AMCformBeforeQuestion{\vspace{\AMCformVSpace}\par} \def\AMCformQuestion#1{\textbf{Question #1 :}} \def\AMCformAnswer#1{\hspace{\AMCformHSpace} #1} Ces définitions sont à insérer juste après la balise \begin{document} dans le document LaTeX. Vous pouvez forcer AMC à ne pas respecter l'ordre des questions et à mémoriser les questions ouvertes afin qu'elles soient restituées ensemble. Cela peut être utile lorsque vous utilisez le package multicols, les réponses écrites à la main des questions ouvertes demandant plus d'espace. La commande \AMCformFilter{!\AMCifcategory{open}} affiche toutes les questions sauf les questions ouvertes puis la commande \AMCformFilter{\AMCifcategory{open}} affiche uniquement les questions ouvertes. Les deux commandes doivent être utilisées ensemble. %Sur deux colonnes, les cases réponses sont affichées %à l'exception des questions ouvertes. \begin{multicols}{2} \AMCformFilter{!\AMCifcategory{open}} \end{multicols} %Toutes les questions ouvertes sont affichées. \AMCformFilter{\AMCifcategory{open}} L'ordre croissant des numéros est toujours respecté. Saisie de codes L'entrée de codes peut être aisément effectuée à l'aide de la commande LaTeX \AMCcodeGridInt[options]{identifiant}{nombre}, par exemple pour que chaque étudiant codifie son numéro d'étudiant lui-même sur sa copie. Les deux arguments de cette commande sont un identifiant de question que vous choississez ainsi que le nombre de chiffres du codage désiré. On pourra, par exemple, utiliser l'en-tête de copie suivant : {\setlength{\parindent}{0pt}\hspace*{\fill}\AMCcodeGridInt{etu}{8}\hspace*{\fill} \begin{minipage}[b]{6.5cm} $\longleftarrow{}$\hspace{0pt plus 1cm} codez votre numéro d'étu\-diant ci-contre, et inscrivez votre nom et prénom ci-dessous. \vspace{3ex} \hfill\champnom{\fbox{ \begin{minipage}{.9\linewidth} Nom et prénom : \vspace*{.5cm}\dotfill \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }}\hfill\vspace{5ex}\end{minipage}\hspace*{\fill} } Ici l'identifiant est etu qui servira à AMC pour attribuer chaque copie à un étudiant et 8 est le nombre de cases pour le code. Vous devrez sélectionner cet identifiant dans le menu déroulant Titre du code pour association automatique de l'onglet notation lors de l'association automatique des copies (voir ). Dans le cas de l'utilisation de l'option , la commande AMCcodeGridInt devra se trouver dans la partie formulaire, c'est-à-dire après la commande AMCdebutFormulaire. La présentation de ces formulaires de saisie de codes peut être légèrement modifiée en changeant la valeur des dimensions \AMCcodeHspace, \AMCcodeVspace qui représentent les espaces horizontaux et verticaux entre les cases. Les valeurs par défaut sont définies de la manière suivante : \AMCcodeHspace=.5em \AMCcodeVspace=.5em Pour la saisie de codes plus complexes, par exemple comportant des lettres, on pourra utiliser la commande \AMCcodeGrid[options]{identifiant}{description}. L'argument description contient une liste d' ensemble de caractères acceptés, séparés par des virgules. Par exemple, pour saisir un code client dont le premier caractère est une lettre entre A et E, suivi de trois chiffres, on utilisera \AMCcodeGrid{client}{ABCDE,0123456789,0123456789,0123456789}. Les deux commandes \AMCcodeGrid et \AMCcodeGridInt acceptent des options, séparées par des virgules, dans l'argument optionnel options : vertical=bool Indique la direction utilisée : donner à bool la valeur true (valeur par défaut) pour construire chaque chiffre en vertival, et false en horizontal. v alias pour vertical=true. h alias pour vertical=false. top permet d'aligner les colonnes en haut en direction verticale. Questions ouvertes On peut ajouter des questions ouvertes (qui ne sont pas à choix multiple) à l'intérieur du sujet. Une manière de procéder consiste à présenter des cases à cocher par le correcteur. Après l'examen, le correcteur lit la réponse fournie par l'étudiant et affecte les points qui correspondent en cochant certaines cases qui lui sont réservées. Il peut ensuite scanner les copies et utiliser AMC pour les corriger, tout en intégrant les résultats des questions ouvertes dans la notation  : \begin{question}{ouverte} Donnez la d\'efinition de l'inflation. \AMCOpen{lines=5}{\wrongchoice[F]{f}\scoring{0}\wrongchoice[P]{p}\scoring{1}\correctchoice[J]{j}\scoring{2}} \end{question} Dans cet exemple, l'enseignant disposera de trois cases. En cochant la première (nommée F pour faux), l'étudiant n'aura aucun point. En cochant la deuxième (appelée P pour partielle), l'étudiant aura 1 point. En cochant la dernière (nommée J pour juste), l'étudiant optiendra 2 points. Le premier argument de la commande \AMCOpen est une liste d'options séparées par des virgules. Les options disponibles sont les suivantes : lineup=bool avec la valeur true, la zone de réponse et les cases de notation sont présentées sur la même ligne. Avec la valeur false (c'est la valeur par défaut), la zone de réponse est présentée dans un cadre placé en-dessous des cases à cocher). lineuptext=texte si lineup=true, le texte et les cases de notation sont présentés sur la même ligne. lines=num fixe le nombre de lignes allouées à la réponse (la valeur par défaut est 1). lineheight=dim fixe la hauteur de chaque ligne (la valeur par défaut est 1cm). dots=bool avec la valeur true (par défaut), chaque ligne sera matérialisée par des pointillés. Donner la valeur false pour les supprimer. contentcommand=cmdname cette option peut être utilisée pour personnaliser le contenu de la zone de réponse. Il faut définir une commande \cmdname qui devra produire le contenu désiré. hspace=dim fixe l'espace à ajouter entre les cases de la zone de notation. backgroundcol=color fixe la couleur de fond de la zone de notation. foregroundcol=color fixe la couleur utilisée dans la zone de notation. scan=bool avec la valeur false, la saisie automatique (à partir des scans) n'est pas effectuée pour cette question (cela peut être utile si vous souhaitez utiliser uniquement la saisie manuelle pour noter la question, et que vous ne voulez pas que les étudiants puissent perturber le processus en cochant ces cases). La valeur par défaut est true. annotate=bool avec la valeur false (par défaut), les cases correspondantes à cette question ne seront pas annotées lors de la fabrication des copies annotées (seule le score à la question sera écrit). question=texte donne un texte court pour que le correcteur identifie facilement la question posée. Ce texte sera écrit juste avant les cases de notation, uniquement dans le cas de l'utilisation d'une feuille de réponses séparée. L'identifiant de la question sera affiché par défaut en inscrivant question dans les options. answer=texte donne un texte court qui sera inscrit dans la zone de réponse sur la correction. Utilisez la commande \savebox, en dehors de la commande exemplaire, pour afficher un texte plus long sur plusieurs lignes. \newsavebox{\correcbox} \savebox{\correcbox}{\parbox{5cm}{\color{red}{Ici\\ou\\l\`a...}}} Puis, appelez le contenu de la boîte à l'endroit voulu : \AMCOpen{lines=4,lineheight=0.15cm, answer= \usebox{\correcbox}}{le bareme} width=dim donne la dimension horizontale du cadre entoutant la zone de réponse dans le cas lineup=false. La valeur par défaut est .95\linewidth. framerule=dim donne l'épaisseur du trait pour le cadre entoutant la zone de réponse. framerulecol=color donne la couleur du cadre entoutant la zone de réponse. boxmargin=dim donne la taille de la marge entourant les cases de la zone de notation. boxframerule=dim donne l'épaisseur du trait pour le cadre entourant la zone de notation. boxframerulecol=color donne la couleur du trait pour le cadre entourant la zone de notation. Vous pouvez modifier la valeur par défaut (pour tout votre questionnaire) de toutes ces options grâce à la commande \AMCopenOpts, comme \AMCopenOpts{boxframerule=2pt,boxframerulecol=red} De plus, on peut ajouter un petit texte dans la zone de notation pour signifier aux étudiants de ne pas cocher ces cases-là en redéfinissant la commande \AMCotextReserved comme suit : \def\AMCotextReserved{\emph{Reservé}} Dans le cas de l'utilisation d'une feuille de réponse séparée, on peut également ajouter un petit texte à chaque question ouverte comme suit : \def\AMCotextGoto{\par{\bf\emph{Répondez sur la feuille de réponses.}}} Si le nombre de cases réponses est important, utilisez l'astuce ci-dessous (\parbox) pour obliger un passage à la ligne. \AMCOpen{lines=6}{ \hbox{\parbox{8.5cm}{ \bonne[1]{1}\scoring{b=1} \bonne[2]{2}\scoring{b=2} \bonne[3]{3}\scoring{b=3} \bonne[4]{4}\scoring{b=4} \bonne[5]{5}\scoring{b=5} \bonne[6]{6}\scoring{b=6} \bonne[7]{7}\scoring{b=7} \bonne[8]{8}\scoring{b=8} \bonne[9]{9}\scoring{b=9} \bonne[10]{10}\scoring{b=10} \mauvaise[F]{F}\scoring{b=0} }} } Réponses en une lettre Dans certains cas, une lettre suffit pour décrire la réponse proposée. Dessiner les cases à cocher à la fois sur le sujet et sur la feuille de réponse séparée est alors redondant. L'utilisation de \AMCBoxOnly à la place d'un environnement reponses peut alors s'avérer judicieuse : \begin{question}{bras} Quelle lettre désigne le \textit{bras} sur le diagramme ? \AMCBoxOnly{ordered=true}{\wrongchoice[A]{}\correctchoice[B]{}% \wrongchoice[C]{}\wrongchoice[D]{}} \end{question} Le premier argument de \AMCBoxOnly est une liste d'options séparées par des virgules. Les options disponibles sont les suivantes : help=texte écrit un petit texte de rappel juste avant les cases sur la feuille de réponse séparée. ordered=bool avec la valeur true (la valeur par défaut est false), les réponses ne seront pas mélangées. Choix du mélange Si le mélange des question et des réponses ne nous convient pas, on peut toujours en changer en modifiant la graine du générateur aléatoire utilisé pour le mélange, grâce à la commande suivante (à utiliser juste au début du document, et en tous cas en-dehors de la commande exemplaire) : \AMCrandomseed{1527384} Si la valeur fournie (à choisir entre 1 et 4194303) est modifiée, alors le mélange sera différent. Bien entendu, une fois les copies d'examen imprimées, il ne faut surtout pas modifier cette valeur ! La valeur est enregistrée dans le fichier xy (sous la forme \rngstate{1}{1515}). La valeur par défaut est 1515. Sections et feuille de réponses séparée Pour que les sections définies dans votre sujet soient reprises dans la feuille de réponses séparées, utiliser \AMCsection et \AMCsubsection à la place de \section et \subsection (les commandes \AMCsection* et \AMCsubsection* sont également définies, pour des titres de section sans numérotation). Références à l'intérieur des copies Dans la description du sujet, les commandes LaTeX \label, \ref et \pageref posent problème car elles seront appelées avec les mêmes arguments pour chaque copie produite, ce qui perturbera la numérotation des références. Pour résoudre ce problème, les commandes \AMClabel, \AMCref et \AMCpageref peuvent leur être substituées : elles ajoutent le numéro de la copie avant leur argument avant de le transmettre à \label, \ref et \pageref. Depuis la version 1.2.2015.102901, la commande \AMCqlabel n'a plus d'utilité. Les questions doivent simplement être référencées avec la commande \AMClabel. Cependant, elle a été conservée pour maintenir la compatibilté avec vos anciens sujets/fichiers tex. Il faudra en outre penser à remettre les compteurs utilisés à zéro au début de chaque copie. Par exemple, si on veut inclure des références à des images regroupées dans une page à part dans certaines questions, on pourra écrire quelque chose comme \element{animaux}{ \begin{figure}[p] \centering \includegraphics[width=.6\linewidth]{tigre} \caption{Un animal} \AMClabel{tigre} \end{figure} \begin{question}{tigre} Quel est l'animal sur la photographie de la figure~\AMCref{tigre} en page \AMCpageref{tigre}~? \begin{reponses} \bonne{Un tigre} \mauvaise{Une girafe} \mauvaise{Un éléphant} \mauvaise{Un chat} \end{reponses} \end{question} } en prenant soin d'ajouter au début de l'appel à \exemplaire (lors de la description de l'en-tête des copies) la ligne \setcounter{figure}{0} afin que les figures soient numérotées à partir de 1 pour chaque copie. Sans cette dernière commande, la numérotation des figures continuerait d'une copie à l'autre, ce qui n'est pas souhaitable. Utilisation du paquet <package>Cleveref</package>. Ce paquet permet d'ordonner les numéros des questions, les pages des questions ou les pages des références par ordre croissant (la documentation http://mirrors.ctan.org/macros/latex/contrib/cleveref/cleveref.pdf) Le paquet doit être déclaré après le paquet automuliplechoice. \usepackage[french]{cleveref} L'utilisation de ce paquet nécessite l'introduction d'une nouvelle commande \AMCstudentlabel{référence de la question}. \cref{\AMCstudentlabel{dipole},\AMCstudentlabel{cours},\AMCstudentlabel{raisonnement}} Avec dipole, cours et raisonnement les références des questions sont indexées, respectivement, avec \AMClabel{dipole}, \AMClabel{cours}, \AMClabel{raisonnement}. Les numéros de ces trois questions seront automatiquement classés lors de la compilation. Personnalisation des textes insérés par AMC L'utilisation de la commande \exemplaire{} remplace automatiquement les textes suivants par leurs valeurs par défaut en français. Si vous voulez les modifier, préférez donc l'utilisation de \onecopy{} à celle de \exemplaire{}. Il est possible de personnaliser certain textes insérés par le paquet automultiplechoice, grâce à la commande \AMCtext : \AMCtext{none}{phrase} remplace le texte par défaut « aucune de ces réponses n'est correcte » (en français) par la phrase fournie lors de l'utilisation de l'option . \AMCtext{corrected}{titre} remplace « Correction » (en français) par le titre fourni sur la correction de l'examen. \AMCtext{catalog}{titre} remplace « Catalogue » (en français) par le titre fourni sur le catalogue de questions fourni avec l'option . \AMCtext{explain}{titre} remplace « Explication » (en français) par le titre avant le texte explicatif fourni avec l'option . L'option par défaut de cette commande est : \AMCtext{explain}{\textit{\textbf{Explanation: }}} Vous pouvez aussi considérer l'utilisation de commandes comme celles-ci (données ici avec comme deuxième argument la valeur par défaut en français) : \AMCtext{draft}{PROJET} \AMCtext{message}{Pour votre examen, imprimez de pr\'ef\'erence les documents compil\'es \`a l'aide de auto-multiple-choice.} \AMCsetFoot{texte} change le texte à afficher en pied de page (on pourra par exemple utiliser \AMCsetFoot{\thepage} pour indiquer le numéro de page). Le code binaire Le code binaire permet à AMC de reconnaître le numéro du sujet et le numéro de la page du sujet. Première ligne : 12 cases (valeur par défaut) : nombre maximal de sujets = 2^12-1 = 4 095. Seconde ligne : 6 premières cases (valeur par défaut) : nombre maximal de pages par sujet = 2^6-1 = 63. Seconde ligne : 6 dernières cases (valeur par défaut) : code de contrôle. Pour augmenter le nombre de sujets ou/et de pages par sujet, modifiez les valeurs par défaut des commandes \AMC@NCBetud, \AMC@NCBpage et \AMC@NCBcheck. Dans le préambule, déclarez les commandes ci-dessous (ici avec les valeurs par défaut). \makeatletter \def\AMC@NCBetud{12} \def\AMC@NCBpage{6} \def\AMC@NCBcheck{6} \makeatother Options pour AMC Certaines options indiquées dans l'en-tête du fichier source au format LaTeX (c'est-à-dire les premières lignes qui commenecnt par un'%') peuvent être transmises à AMC : %%AMC:preprocess_command=commandname demande à AMC d'exécuter la commande commandname avant de compiler le fichier LaTeX. Cette commande sera appelée à l'intérieur du répertoire projet, avec comme argument le nom de la copie du fichier source à traiter. Comme il s'agit d'une copie du fichier source, la commande commandname peut en modifier le contenu. %%AMC:latex_engine=engine demande à AMC d'utiliser le moteur LaTeX engine, sans tenir compte de la valeur fournie par l'utilisateur dans les préférences du projet. Des questions mathématiques à énoncés aléatoires Utilisation du package fp Un mode d'emploi succint se trouve à la fin de la documentation voir ). Grâce au paquet LaTeX fp, dont la documentation se trouve sur http://mirrors.ctan.org/macros/latex/contrib/fp/README et que l'on peut charger grâce à la commande\usepackage{fp}ajoutée avant celle correspondant à automultiplechoice, on peut créer des exercices dont les données sont aléatoires. Commençons par un petit exemple : \begin{question}{addition} \FPeval\VQa{trunc(1+random*8,0)} \FPeval\VQb{trunc(4+random*5,0)} \FPeval\VQsomme{clip(VQa+VQb)} \FPeval\VQnonA{clip(VQa+VQb-1)} \FPeval\VQnonB{clip(VQa*VQb)} \FPeval\VQnonC{clip(VQa-VQb)} Quelle est la somme de \VQa{} et \VQb{} ? \begin{reponseshoriz} \bonne{\VQsomme} \mauvaise{\VQnonA} \mauvaise{\VQnonB} \mauvaise{\VQnonC} \end{reponseshoriz} \end{question} La commande \FPeval sert à faire des calculs : Comme random renvoie un nombre réel de l'intervalle [0,1], cette commande met dans la variable VQa un entier aléatoire entre 1 et 8. La ligne suivante place dans VQb un entier aléatoire entre 4 et 8. On place la bonne réponse dans la variable VQsomme. On place dans les variables VQnonA, VQnonB et VQnonC des mauvaises réponses... Les noms de variables commençant par VQ ont été choisis afin de ne pas interférer avec d'autres commandes LaTeX. Vous pouvez choisir la base de génération des nombres pseudo-aléatoires (obtenus avec random) grâce à la commande \FPseed=entier entier doit être un entier immuable, qui ne changera jamais : ne pas utiliser de valeur liée à la date ! Choix parmi une suite d'intervalles Le paquet automultiplechoice définit en outre une commande \choixIntervalles qui simplifie ce genre de constructions, comme illustré dans l'exemple suivant :\begin{question}{inf-expo-indep} \FPeval\VQa{trunc(2 + random * 4,0)} \FPeval\VQb{trunc(6 + random * 5,0)} \FPeval\VQr{VQa/(VQa+VQb)} Soient $X$ et $Y$ deux variables aléatoires indépendantes, de lois exponentielles de paramètres respectifs \VQa{} et \VQb{}. À quel intervalle appartient la probabilité $\mathbb{P}[X<Y]$ ? \begin{multicols}{5} \begin{reponses}[o] \choixIntervalles{\VQr}{0}{1}{0.1} \end{reponses} \end{multicols} \end{question} Cette ligne insère dix réponses correspondant aux intervalles [0,0.1[ [0.1,0.2[ ... [0.9,1[, tout en indiquant que le bon intervalle est celui qui contient VQr. Les arguments de la commande \choixIntervalle sont les suivants : La bonne réponse, La borne gauche du premier intervalle, La borne droite du dernier intervalle, La longueur de chaque intervalle. La mise en forme des intervalles peut être modifiée en redéfinissant la commande LaTeX \AMCintervalFormat, définie originellement par \def\AMCIntervalFormat#1#2{[#1,\,#2[} pour suivre une convention différente (on rencontra par exemple souvent l'utilisation de [a,b) à la place de [a,b[). Si vous préférez la virgule comme séparateur décimal, il faut utiliser la commande \num du paquet siunitx ( voir ). \def\AMCIntervalFormat#1#2{[\num{#1}-\,\num{#2}[} Codage du résultat Vous pouvez également demander aux étudiants de coder leur réponse numérique, grâce à la commande \AMCnumericChoices, comme dans l'exemple suivant : \begin{questionmultx}{sqrt} \FPeval\VQa{trunc(5+random*15,0)} Calculez $\sqrt{\VQa}$ et arrondissez le résultat avec deux chiffres après la virgule. \AMCnumericChoices{sqrt(\VQa)}{digits=3,decimals=2,sign=true, borderwidth=0pt,backgroundcol=lightgray,approx=5} \end{questionmultx} Notez l'utilisation de l'environnement questionmultx : nous avons besoin ici d'une question multiple car plusieurs cases doivent être cochées, mais pourtant une seule réponse est correcte, et nous ne souhaitons donc pas afficher le symbole des questions multiples normales. Les options disponibles dans le deuxième argument de cette commande sont les suivants : digits=num donne le nombre de chiffres à coder (la valeur par défaut est 3). decimals=num donne le nombre de chiffres après la virgule (la valeur par défaut est 0). Quand num n'est pas nul, le paquet LaTeX fp doit être chargé. base=num donne la base dans laquelle sera écrit le nombre à coder (la valeur par défaut est 10). significant=bool avec la valeur true, les chiffres à renseigner sont les premiers chiffres significatifs du premier argument de \AMCnumericChoices. Par exemple, la bonne réponse à \AMCnumericChoices{56945.23}{digits=2,significant=true} est 57. exponent=num demande une saisie en notation scientifique, avec num chiffres pour la puissance de 10. nozero=bool avec la valeur true, enlève le choix 0 pour tous les chiffres du nombre à saisir. Cette option peut être utile lors de la saisie de petits (<10) nombres non nuls. sign=bool demande (ou non) la saisie d'un signe (la valeur par défaut les true). exposign=bool même chose pour l'exposant. strict=bool avec la valeur true, une case doit être obligatoirement cochée pour le signe et pour chaque chiffre (même pour le chiffre 0). Avec la valeur false (valeur par défaut), si pour certains chiffres aucune case n'est cochée, ces chiffres seront fixés à la valeur 0. vertical=bool avec la valeur true, chaque chiffre sera représenté par une colonne. Avec la valeur false (valeur par défaut), chaque chiffre sera représenté par une ligne. expovertical=bool avec la valeur true, la mantisse et l'exposant seront présentés l'un en-dessous de l'autre. Avec la valeur false (valeur par défaut), ils seront présentés l'un à côté de l'autre. reverse=bool avec la valeur true (valeur par défaut), en mode vertical, les grandes valeurs des chiffres seront placées en haut plutôt qu'en bas. vhead=bool avec la valeur true, en mode vertical, un en-tête sera placé au-dessus de chaque colonne correspondant à un chiffre. Le texte de cet en-tête est donné par la commande \AMCntextVHead, qui est originellement définie par \def\AMCntextVHead#1{\emph{b#1}} Cette définition permet de numéroter les chiffres binaires. La valeur par défaut est false. hspace=space donne l'espace horizontal entre les cases (.5em par défaut). vspace=space donne l'espace vertical entre les cases (1ex par défaut). borderwidth=space donne l'épaisseur du cadre qui entoure toutes les cases (1mm par défaut). bordercol=color donne la couleur du cadre (lightgray par défaut). backgroundcol=color donne la couleur du fond (white par défaut). Tsign=text donne le texte à inscrire au-dessus des deux cases correspondant au signe (vous pouvez obtenir le même résultat grâce à \def\AMCntextSign{text}, le texte par défaut étant vide). Tpoint=text donne le texte correspondant à la virgule (décimale). Il peut également être modifié par \def\AMCdecimalPoint{text}, et la valeur par défaut est \raisebox{1ex}{\bf .}. Texponent=text donne le texte affiché entre la partie mantisse et la partie exposant. Ce texte peut également être modifié par \def\AMCexponent{text}, et sa valeur par defaut est $\times10$\textasciicircum. scoring=bool avec la valeur true (valeur par défaut), un barème sera transmis à AMC. scoreexact=num donne le score à affecter à une réponse exacte (2 par défaut). exact=num donne la distance maximale à la valeur correcte en-dessous de laquelle une réponse sera considérée comme exacte (et sera rétribuée de scoreexact points). La valeur par défaut est 0. scoreapprox=num donne le score à affecter à une réponse approximative (1 par défaut). approx=num donne la distance maximale à la valeur correcte en-dessous de laquelle une réponse sera considérée comme approximative (et sera rétribuée de scoreapprox points). La valeur par défaut est 0. AMC transforme tous les nombres (décimaux inclus) comme des entiers (en enlevant la virgule) avant de faire la différence et de comparer avec approx. Par exemple, si decimals=2, si la bonne valeur est 3,14 et si la valeur saisie est 3,2 alors la différence entière calculée est 320-314=6, de sorte que les points scoreapprox ne sont acquis que si approx vaut 6 ou plus. scorewrong=num donne le score à affecter à une réponse fausse (0 par défaut). Vous pouvez modifier la valeur par défaut (pour tout votre questionnaire) de toutes ces options grâce à la commande \AMCnumericOpts, comme \AMCnumericOpts{scoreexact=3,borderwidth=2pt} Vous pouvez de plus ajouter un texte à la suite des questions, quand la réponse à celle-ci est reléguée à une feuille séparée (par l'utilisation de l'option ensemble), en redéfinissant la commande \AMCntextGoto, comme ceci par exemple : \def\AMCntextGoto{\par{\bf\emph{Codez la réponse sur la feuille de réponses séparée.}}} Utilisation du package pgf/tikz Vous devez déclarer ce paquet, ainsi que les librairies, \usetikzlibrary{arrows,patterns}, après automuliplechoice. Le paquet LaTeX pgf/tikz, dont la documentation se trouve sur http://www.ctan.org/tex-archive/graphics/pgf/base possède notamment une bibliothèque mathématique que l'on peut charger grâce à la commande : \usepackage{tikz} La première précaution à prendre, pour avoir des sujets identiques malgré les recompilations latex est de choisir la base de génération des nombres pseudo-aléatoires. \pgfmathsetseed{2056} Réaliser un calcul simple Voici un exemple d'utilisation avec un calcul simple : \begin{question}{inverse} \pgfmathrandominteger{\x}{1}{50} Quel est l'inverse de $x=\x$ ? \begin{reponses} \bonne{\pgfmathparse{1/\x}\pgfmathresult } \mauvaise{\pgfmathparse{1/(\x +1))}\pgfmathresult} \mauvaise{\pgfmathparse{cos(\x)} \pgfmathresult} \mauvaise{\pgfmathparse{\x^(-0.5)}\pgfmathresult} \end{reponses} \end{question} Les commandes \pgfmathparse et \pgfmathresult permettent respectivement d'effectuer le calcul et d'afficher son résultat. Il est possible de choisir la mise en forme des résultats en utilisant la commande \pgfmathprintnumber, par exemple, ici on choisit une notation avec trois décimales, en utilisant une virgule comme séparateur décimal. \begin{question}{inverse3} \pgfmathrandominteger{\x}{1}{50} \pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=3,use comma} Quel est l'inverse de $x=\pgfmathprintnumber{\x}$ ? \begin{reponses} \bonne{\pgfmathparse{1/\x}\pgfmathprintnumber{\pgfmathresult}} \mauvaise{\pgfmathparse{1/(\x +1))} \pgfmathprintnumber{\pgfmathresult}} \mauvaise{\pgfmathparse{cos(\x)} \pgfmathprintnumber{\pgfmathresult}} \mauvaise{\pgfmathparse{\x^(-0.5)} \pgfmathprintnumber{\pgfmathresult}} \end{reponses} \end{question} Les commandes \AMCIntervals et \AMCnumericChoices peuvent aussi être utilisées dans ce contexte (voir et ) Questions de lecture graphique Il est aussi possible de générer des graphiques aléatoires (ou non) et de poser des questions de lecture graphique. \begin{questionmult}{graphique} On considère trois fonctions f(x) dont les tracés sont représentés ci-dessous dans un repère orthonormé~: \pgfmathrandominteger{\a}{2}{4} \begin{center} \begin{tikzpicture}[domain=0:4] \draw[very thin,color=gray] (-0.1,-4.1) grid (3.9,3.9); \draw[->] (-0.2,0) -- (4.2,0) node[right] {$x$}; \draw[->] (0,-4.2) -- (0,4.2) node[above] {$f(x)$}; \draw[color=red] plot (\x,{(1+\a/4)*\x-\a}) node[right] {$f_{1} (x)$}; \draw[color=blue] plot (\x,{\a*sin(\x r)}) node[right] {$f_{2}(x)$}; \draw[color=orange] plot (\x,{\a*cos(\x r)}) node[right] {$f_{3}(x)$}; \end{tikzpicture} \end{center} Alors : \begin{reponses} \pgfmathrandominteger{\x0}{2}{4} \bonne{$f_{2}(\x0)$=\pgfmathparse{\a*sin(\x0 r)} \pgfmathprintnumber{\pgfmathresult}.} \bonne{$f_{3}(\x0)$=\pgfmathparse{\a*cos(\x0 r)} \pgfmathprintnumber{\pgfmathresult}.} \mauvaise{La fonction $f_{1}(x)$ est une fonction linéaire.} \end{reponses} \end{questionmult} La mise en forme des graphiques peut être facilitée par l'utilisation du package pgfplots. La précision des nombres sous pgfmath étant limitée, certains tracés de graphiques ne sont pas possibles avec cette méthode, la compilation latex adressant alors une erreur du type : "Arithmetic overflow". Les packages tikz et pgfplots permettent de pallier à ce manque de précison en faisant appel au programme gnuplot (voir documentation du package) pour obtenir les points de tracé. Dans ce cas, il faut installer au préalable gnuplot sur votre distribution, puis lancer la compilation latex avec l'option . Pour cela, aller dans les préférences de AMC et choisir pour moteur LaTeX du projet en cours : "" (sans les guillemets). Utilisation de LuaLaTeX Il est possible d'utiliser le langage de programmation LUA au sein de documents latex en compilant le sujet grâce à la commande lualatex. Si vous choisissez cette compilation, votre sujet doit être encodé en UTF-8, et il ne faut pas charger le package inputenc. Pour de plus amples informations, lire l'article de Manuel Pégourié-Gonnard présentant le projet à l'adresse suivante : http://dante.ctan.org/tex-archive/info/luatex/lualatex-doc/lualatex-doc.pdf Pour faire appel au langage LUA, il faut utiliser la commande \directlua. La fonction la plus utile est de pouvoir écrire un résultat calculé par LUA dans le document tex grâce à la commande : tex.print Encore une fois, si vous utilisez des nombres aléatoires, commencer par choisir la base de génération des nombres pseudo-aléatoires. \directlua{math.randomseed (2048)} Voici un exemple très simple, de fichier: \documentclass[a4paper]{article} %\usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[francais,bloc,completemulti]{automultiplechoice} \begin{document} \exemplaire{10}{ %%% debut de l'en-tête des copies : \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf Sujet simpliste \end{minipage} \champnom{\fbox{\begin{minipage}{.5\linewidth} Nom et prénom : \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage}}} %%% fin de l'en-tête \directlua{math.randomseed (2048)} \directlua{a=math.random()} \begin{question}{calcul} Quelle est la racine carrée de \directlua{tex.print(a)}? \begin{reponses} \bonne{\directlua{tex.print(math.sqrt(a))}} \mauvaise{\directlua{tex.print(math.sqrt(2*a))}} \mauvaise{\directlua{tex.print(math.sqrt(a*1.001))}} \end{reponses} \end{question} } \end{document} Il est aussi possible de mettre en forme les résultats donnés par lua soit en écrivant des fonctions lua, soit en utilisant le package siunitx Les commandes \AMCIntervals et \AMCnumericChoices peuvent aussi être utilisées dans ce contexte (voir et ) Utilisation de PSTricks Vous devez déclarer ce paquet après automultiplechoice. Pour utiliser PSTricks, vous devez configurer AMC : Édition Préférences Général Moteur Latex par défaut latex+dvipdf Si vous utilisez Texmaker pour préparer vos documents, il faut également le configurer : Options Configurer Texmaker Compil rapide Latex + dvips + ps2pdf + voir PDF Mise en œuvre - interface graphique Nous décrivons ici un exemple de cheminement avec l'interface graphique depuis la conception du QCM jusqu'à l'édition des notes des élèves. Création du nouveau projet et du sujet Commençons par ouvrir l'interface graphique. On peut normalement le faire en sélectionnant Applications Éducation Auto Multiple Choice du menu général de Gnome (ou son équivalent dans KDE ou autre), mais on peut aussi utiliser la commande auto-multiple-choice. Créons maintenant un nouveau projet, grâce à Projet Nouveau . Une fenêtre s'ouvre qui permet de visualiser les noms des projets déjà existant (si il en existe), et de choisir un nom (composé de caractères simples ; « test » conviendra par exemple à notre petit essai), que nous inscrivons dans le champ Nouveau projet. Nous validons enfin en appuyant sur le bouton Créer un projet. Nous devons maintenant désigner un fichier AMC-TXT ou LaTeX comme source du QCM. Plusieurs possibilités nous sont proposées : modèle : ce choix permet de chercher parmi les modèles fournis avec AMC un sujet que nous pourrons modifier ensuite à loisir. fichier : ce choix permet de choisir un fichier source déjà composé pour l'examen. Il est en effet possible de composer son sujet en dehors d'AMC grâce à un éditeur classique, puis d'utiliser AMC quand celui-ci est au point. vide : ce choix crée un fichier vide qu'il faudra éditer depuis zéro pour créer son sujet. archive : ce choix permet d'utiliser une archive tgz ou zip dans laquelle on a placé le sujet et d'éventuels autres fichiers (images, fichier décrivant les options pour AMC par exemple). Il sera utilisé quand le sujet est fabriqué par un programme extérieur (comme par exemple l'interfaçage avec la plateforme nationale C2i niveau 1 pour les universités françaises) ou pour reprendre un sujet AMC sauvegardé sous forme d'archive. Pour notre exemple, nous choisissons modèle. Dans la fenêtre suivante, sélectionnons par exemple le modèle Exemple simple dans le groupe [FR] Documentation. Une fois le projet créé, nous pouvons modifier ce sujet à loisir grâce au bouton Éditer le fichier source qui lance l'éditeur par défaut. Préparation du sujet La préparation du projet se fait en deux étapes. Il faut tout d'abord fabriquer les documents de référence à partir du fichier source. Ceci se fait en cliquant sur le bouton Mise à jour ou Alt+D de la section Documents de travail. Les documents produits sont les suivants : Le sujet. C'est le fichier qu'il faudra imprimer pour que ses pages soient distribuées aux étudiants (voir plus bas). Le corrigé. On peut y vérifier que les réponses cochées sont les bonnes. Il est aussi destiné à être distribué aux étudiants. Une fois produits, ces documents pourront être visualisés (et éventuellement imprimés) grâce aux boutons correspondants. Nous pouvons maintenant passer à cette dernière étape de préparation : l'analyse du document de calage. Elle se lance à partir du bouton Calculer les mises en page. Cette analyse détecte, dans chaque page du sujet, la position exacte des différents éléments qui devront être analysés sur les copies des étudiants. Pour vérifier que les mises en page ont été correctement détectées, on peut utiliser le bouton Vérifier les mises en page. Un petit coup d'œil permettra de vérifier que les cases à cocher en rouge sont bien positionnées sur les cases du sujet. Impression du sujet Vous pouvez fonctionner de deux manières différentes : Pour la méthode la plus robuste, il est nécessaire de produire un nombre suffisant de copies ayant chacune un numéro de copie différent, et de les imprimer toutes. Chaque page de chaque copie est différenciée par les codes inscrits en haut de la page. Vous pouvez ainsi scanner plusieurs fois la même page sans risque. La deuxième méthode consiste à produire un petit nombre de copies (éventuellement une seule), à les imprimer, puis à les photocopier en grand nombre pour en avoir une par étudiant. Avec cette méthode, le mélange des questions et réponses perd de son efficacité, et si vous fournissez plusieurs fois la même page scannée à AMC, il ne pourra pas s'en rendre compte et la comptera deux fois. Pour cette deuxième méthode utilisant des photocopies, il est nécessaire que les étudiants n'aient à remplir qu'une seule page (ce résultat peut être obtenu en utilisant une feuille de réponses séparée). Dans le cas contraire, vous ne pourriez pas traiter les scans par AMC ensuite ! En effet, il serait impossible pour AMC de faire le lien entre plusieurs pages correspondant à un même étudiant. Une fois la préparation effectuée, nous pouvons imprimer le sujet, et le distribuer aux étudiants... Nous avons pour cela plusieurs possibilités : Il est possible d'imprimer (ou de faire imprimer par un service reprographie) directement le fichier DOC-sujet.pdf du répertoire projet, auquel on peut accéder par le bouton sujet de la liste des documents de travail. Cette méthode peut avoir un léger inconvénient : si votre sujet comporte certaines copies ayant un nombre impair de pages, une impression recto-verso mettra plusieurs sujets sur une même feuille, ce qui les rendra inutilisables. Pour éviter ce problème, vous pouvez utiliser (si ce n'est pas déjà fait), dans le fichier LaTeX du sujet, la commande \AMCcleardoublepage, qui ajoutera les pages blanches nécessaires pour que tous les sujets aient un nombre pair de pages (voir ). Si l'imprimante à utiliser est configurée sur l'ordinateur utilisé par AMC, on utilisera de préférence le bouton Imprimer des copies (après avoir calculé les mises en page), qui permet de sélectionner les copies à imprimer (si on ne souhaite pas toutes les imprimer, ou pour une réimpression dans le cas où une copie aurait été mal imprimée), de choisir les options d'impression (recto-verso, agrafage), et de gérer correctement les copies avec un nombre impair de pages même dans le cas d'une impression recto-verso sans utilisation de \AMCcleardoublepage (en effet, AMC envoie une tâche d'impression par copie). Examen Il ne reste plus qu'à faire passer l'examen aux étudiants... Une fois que le sujet est imprimé et distribué, il ne faut plus modifier les documents de travail car il faut garder la certitude qu'ils sont conformes aux copies distribuées. Il est préférable que les étudiants utilisent un stylo noir ou bleu ou un crayon à papier de type B ou HB. Suivant les situations, on peut demander aux étudiants de cocher ou de noircir complètement les cases. Cases cochées Dans ce cas, les étudiants peuvent effacer la/les case(s) avec la gomme ou la recouvrir de ruban correcteur mais ne doivent pas essayer d'en redessiner les contours. En effet, si ils redessinent les contours de manière approximative, ces traits pourront par erreur se situer à l'intérieur de la case et pourrront ainsi être confondus avec une case cochée. Vous pouvez également permettre aux étudiants de corriger une case cochée par erreur en la noircissant entièrement. Dans ce cas, donnez une valeur inférieure à 1 (qui restera tout de même proche de 1) à la variable seuil de noirceur supérieur (menu Préférences, onglet Projet). Une case dont la proportion de noir est comprise entre le seuil de noirceur et le seuil de noirceur supérieur sera considérée comme cochée. Si cette proportion dépasse le seuil de noirceur supérieur, la case sera considérér comme non-cochée. Cases noircies Dans le cas où les lettres (ou chiffres) référençant les réponses sont inscrites à l'intérieur des cases, vous devez donner la consigne aux étudiants de noircir complètement les cases, car AMC ne sait pas faire la différence entre une lettre écrite dans une case et une case cochée. Les étudiants peuvent effacer la/les case(s) avec la gomme ou la recouvrir de ruban correcteur, mais n'ont pas d'autre possibilité de corriger une case cochée par erreur. Vous devrez bien entendu laisser la valeur du seuil de noirceur supérieur à 1. Lecture des copies Nous allons maintenant passer à la saisie des copies des étudiants, qui peut se faire de manière automatique et/ou manuelle. Pour cela, nous passons sur l'onglet Saisie de l'interface graphique. Saisie automatique Pour une reconnaissance automatisée des cases cochées dans les copies des étudiants, il faut tout d'abord les numériser. J'utilise pour ma part une photocopieuse/scanner qui le fait de manière automatique (toutes les pages à la suite sans intervention de ma part), avec les réglages suivants : 300dpi, mode OCR (prévu pour la reconnaissance de caractères, noir et blanc sans nuances de gris), scan délivré en un fichier TIFF par page. Pour l'analyse des copies, nous devons disposer d'un ou plusieurs fichiers images (TIFF, JPG, PNG, etc.) des scans. Les formats vectoriels (PDF, PS ou EPS) sont également utilisables ; ils seront convertis au format PNG par AMC avant leur analyse. Lors de la première saisie automatique, vous aurez à indiquer à AMC quelle méthode vous avez choisie : sujets différents pour tous les étudiants, ou photocopie de certains sujets (voir ). On sélectionne alors l'ensemble des fichiers obtenus à partir du dialogue ouvert par le bouton Automatique de la section Saisie des copies après examen, puis on valide par le bouton Valider de ce même dialogue. AMC va procéder à une reconnaissance optique de marques (OMR) sur les scans afin de détecter les quatre marques circulaires des coins, en déduire la position des cases à cocher et mesurer la proportion de noir à l'intérieur de chacune d'entre elles. Le résultat de l'analyse de chaque page est indiqué dans les listes de la section Diagnostic : La valeur affiche la date de la page traitée. Elle n'est pas affichée par défaut. Il faut l'activer avec le bouton colonnes. La valeur EQM (écart quadratique moyen) est un indicateur du bon calage sur les marques de calage (les quatre ronds noirs entourant chaque copie). Si il est trop important, il faudra vérifier le calage (un clic droit sur la ligne correspondant à la page puis le choix page permet de visualiser la page scannée et le cadre et les cases tels qu'ils sont détectés). AMC dispose, depuis la version 1.2.1419, d'une option permettant de caler les feuilles avec seulement trois marques. Vous devez configurer AMC : Édition Préférences Scan Contrôle des scans avec 3 angles marqués AMC ne dispose d'aucune fonction de traitement d'image. Pour corriger le calage, vous pouvez redessiner les marques à l'aide d'un éditeur d'image. Notez les scans non reconnus, ne les effacez pas ! Ouvrez-les avec l'éditeur d'image (les fichiers se trouvent dans le dossier scan du projet). Sauvegardez-les (Ctrl+S). Reprenez la correction en ne choisissant que les derniers fichiers modifiés. La valeur sensibilité est un indicateur de la proximité du remplissage des cases avec la valeur seuil. Si elle est trop importante (à partir de 8 et jusqu'à sa valeur maximale 10), il faudra vérifier que les cases reconnues comme étant cochées sont bien les bonnes (un clic droit sur la ligne correspondant à la page puis le choix zoom permet de visualiser l'ensemble des cases de la copie, de voir si la détection s'est bien déroulée, et éventuellement de la corriger par glisser-déposer (drag and drop) ou par un clic (click)). La valeur scan files affiche le nom de la page traitée. Elle n'est pas affichée par défaut. Il faut l'activer avec le bouton colonnes. Saisie manuelle Si nous ne pouvons pas utiliser facilement de scanner, ou si, pour quelques copies, la saisie automatique n'a pas bien fonctionné, nous pouvons effectuer la saisie de manière manuelle. Pour cela, ouvrons la fenêtre adéquate grâce au bouton Manuelle de la section Saisie des copies après examen. Dans cette fenêtre, nous pourrons entrer nous-même les cases qui ont été cochées (en cliquant dessus) sur les pages désirées. Toute saisie manuelle effectuée sur une page prendra la place des résultats éventuels d'une saisie automatique pour cette même page. Visualisation des questions vides ou invalides En cliquant sur les numéros de pages, AMC entoure les cases réponses : en cyan pour les réponses vides ; en jaune pour les réponses invalides. Ces couleurs peuvent être changées dans les préférences d'AMC : Préférences Affichage Scan Il est possible de cibler une question précise (voir ) Sélection d'une question Cette option permet de corriger manuellement à l'écran une question ciblée. Cela évite de chercher la question sur chaque page si les questions sont mélangées. Corriger une question ouverte à l'écran Ouvrez la fenêtre de saisie manuelle et sélectionnez le scan comme fond ; sélectionnez la question que vous voulez corriger (menu déroulant au-dessus de la liste des pages) . Les cases à cocher de la question ouverte se situent en haut de la fenêtre, et quand vous cliquez sur suivant vous passez à l'étudiant suivant, toujours pour cette question. Les questions simples et multiples peuvent aussi être corrigées ainsi. Vérifier à l'écran les pages avec des questions invalides ou vides Vous devez d'abord corriger les copies (voir de la section ) ; ouvrez la fenêtre de saisie manuelle et sélectionnez le scan comme fond ; choisissez si vous voulez étudier toutes les pages (toutes), les pages avec réponses incohérentes seulement (inv), ou les pages avec réponses incohérentes ou vides seulement (i & v). Correction Dans l'onglet Notation de l'interface graphique, la partie Correction nous permet de déduire les notes des étudiants à partir des saisies effectuées, mais aussi de lire les codes renseignés par les étudiants (voir ). Processus Le calcul des notes se lance à l'aide du bouton Corriger, mais nous avons auparavant le choix suivant à effectuer : Si nous cochons la case Mettre à jour le barème, le barème sera tout d'abord extrait du fichier source LaTeX. Ceci permet de tester plusieurs barèmes à la fin du processus de correction. La mise à jour concerne également la liste des bonnes et mauvaises réponses, ce qui permet de corriger facilement après l'examen une erreur d'étourderie effectuée lors de la conception du sujet. La façon de spécifier le barème dans le fichier LaTeX sera expliquée à la section (un barème par défaut est utilisé quand aucune indication n'est donnée). En cliquant sur le bouton Corriger, la correction est alors effectuée (cela peut prendre un peu de temps si on a aussi demandé la lecture du barème). Barème Le barème utilisé pour la notation des copies est indiqué dans le fichier source LaTeX du questionnaire, à l'aide de la commande bareme. Elle peut être utilisée dans un environnement question ou questionmult, pour fixer des paramètres de barème concernant toutes les réponses, mais aussi dans l'environnement reponses, pour donner des indications de barème ne concernant qu'une réponse. L'argument de la commande LaTeX bareme est constitué d'indications du type parametre=valeur, séparés par des virgules. Les paramètres utilisables sont les suivants (le tableau indique aussi dans quels cadres ces paramètres peuvent être utilisés) : paramètre simple multiple valeur Q R Q R e La note affectée en cas d'incohérence des réponses : plusieurs cases cochées pour une question simple, ou, pour une question multiple, case « aucune de ces réponses n'est correcte » cochée en même temps qu'une autre case. v La note affectée en cas de non-réponse (aucune case n'est cochée). d Un décalage, c'est-à-dire une valeur ajoutée à toutes les notes qui ne relèvent pas des cas correspondant aux paramètres e et v. p La note plancher. Si le calcul de la note obtenue à la question donne une valeur inférieure à la valeur plancher, cette note est ramenée à la valeur plancher. b Points à donner pour une bonne réponse à une question. m Points à donner pour une mauvaise réponse à une question. Sans nom de paramètre (syntaxe \bareme{2}), on indique le nombre de points à donner si l'étudiant a coché cette réponse. auto Avec ce paramètre, la valeur de la réponse numéro i sera auto+i-1. Cette option est principalement utilisée avec \QuestionIndicative (voir section ). mz Ce paramètre impose un barème du type "maximum ou zéro" : l'élève doit cocher toutes les bonnes réponses pour avoir la note mz sinon, elle sera nulle. haut En donnant à ce paramètre une valeur n, la note attribuée à une réponse parfaite sera n, et un point sera enlevé par erreur. MAX Donne la valeur maximale attribuée à la question (pour une « question notée sur 5 », on peut mettre MAX=5). À renseigner uniquement si elle ne correspond pas à la note obtenue en mettant toutes les bonnes réponses. formula Donne directement le score de la question, souvent par le biais d'une formule faisant intervenir des variables (voir ), sans tenir compte des valeurs de b et m. set.XXX Donne une valeur particulière à la variable nommée XXX, qui pourra être utilisée par la suite par formula. Dans le contexte d'une réponse, la valeur est attribuée uniquement dans le cas où la case est cochée. Cas particulier : si on donne une valeur non-nulle à la variable INVALID par ce biais, les réponses seront déclarées incohérentes et le score sera celui donné par le paramètre e. setglobal.XXX Donne une valeur à la variable XXX pour toutes les questions qui suivent celle-ci pour l'ordre lexicographique des identifiants. default.XXX Donne une valeur à la variable XXX si aucune case cochée n'en a déjà donnée une par le biais de set.XXX. requires.XXX Signale une saisie incohérente (donc l'application du score donné par la valeur de e) dans la cas où aucune valeur n'a été donnée à la variable XXX. haut=x est réécrit en d=x-N, p=0 Avec le paramètre default, il faut déclarer la valeur de la variable XXX dans le barème de la question, voir l'exemple ci-dessous. \begin{questionmult}{03}\bareme{default.COMP=10,default.PROP=11,formula=(COMP==PROP ? 1 : 0),MAX=1} Cite un gaz important de l'air et son pourcentage. \begin{multicols}{4} \begin{reponses} \mauvaise{vapeur d’eau} \mauvaise{gaz} \bonne{diazote}\bareme{set.COMP=1} \bonne{dioxygène}\bareme{set.COMP=2} \mauvaise{dioxyde de carbone} \bonne{20\%}\bareme{set.PROP=2} \mauvaise{40\%} \mauvaise{60\%} \bonne{80\%}\bareme{set.PROP=1} \end{reponses} \end{multicols} \end{questionmult} Si vous indiquez MAX=3 pour une question pouvant rapporter 4 points, un étudiant pourra avoir un score de 4/3 à cette question (et, si il donne des réponses parfaites aux autres questions, il pourra éventuellement obtenir une note globale supérieure à 20/20). Le barème par défaut pour une question simple est e=0,v=0,b=1,m=0, ce qui donne un point pour une bonne réponse et aucun point dans tous les autres cas. Le barème par défaut pour une question multiple est e=0,v=0,b=1,m=0,p=-100,d=0, ce qui donne un point pour chaque case qui est cochée ou non à bon escient (case d'une bonne réponse cochée, ou case d'une mauvaise réponse non cochée). Vous pouvez affecter à b et m les valeurs de la variable déclarée avec set.XXX. \begin{questionmult}{Q1}\bareme{default.CONF=1,m=-CONF,b=CONF} La commande LaTeX \bareme peut aussi être utilisée hors des définitions des questions, avec les paramètres suivants : SUF=x permet de donner un total de points suffisant pour obtenir la note maximale : si on fixe la note maximale à 20 par exemple, une copie ayant un total de points de 12 avec l'utilisation de SUF=15 se verra attribuer la note de 12/15*20=16, quel que soit le total d'une copie ayant toutes les bonnes réponses. allowempty=x permet à l'étudiant de laisser x questions sans réponse. Parmi les questions laissées sans réponse par l'étudiant, x (ou moins si il n'y en a pas autant) seront annulées (c'est-à-dire qu'elles ne seront pas prises en compte pour le calcul du score total). L'utilisation combinée de tous ces paramètres permet de définir toutes sortes de barèmes, comme dans l'exemple suivant : \documentclass{article} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[francais,bloc,completemulti]{automultiplechoice} \begin{document} % preparation du groupe de questions appelé qqs : \element{qqs}{ \begin{question}{le bon choix} Combien de points voulez-vous à cette question~? \begin{reponses} \bonne{Le maximun : 10}\bareme{10} \mauvaise{Seulement 5}\bareme{5} \mauvaise{Deux me suffiront}\bareme{2} \mauvaise{Aucun, merci}\bareme{0} \end{reponses} \end{question} } \element{qqs}{ \begin{questionmult}{engrange} Engrangez des points gratuitement en cochant les cases ci-dessous~: \begin{reponses} \bonne{2 points}\bareme{b=2} \mauvaise{Un point négatif}\bareme{b=0,m=-1} \bonne{3 points}\bareme{b=3} \bonne{1 point} \bonne{Un demi point}\bareme{b=0.5} \end{reponses} \end{questionmult} } \element{qqs}{ \begin{questionmult}{tout ou rien}\bareme{mz=3} Il faut cocher exactement comme il faut pour avoir trois points, sinon vous n'en aurez aucun. \begin{reponses} \mauvaise{Fausse} \mauvaise{Fausse} \bonne{Juste} \bonne{Juste} \end{reponses} \end{questionmult} } \element{qqs}{ \begin{questionmult}{2 au plus}\bareme{haut=2} Deux points pour tout juste, et un point pour chaque erreur... \begin{reponses} \bonne{Bonne réponse} \bonne{Ceci est juste} \bonne{Exact} \mauvaise{Faux~!} \mauvaise{Ne pas cocher~!} \end{reponses} \end{questionmult} } \element{qqs}{ \begin{question}{attention}\bareme{b=2} Alors là, la réponse très fausse mérite sanction (-2 points), mais viser juste rapporte 2 points. \begin{reponses} \bonne{C'est bon !} \mauvaise{Pas bon} \mauvaise{Pas bon} \mauvaise{Pas bon} \mauvaise{Très faux !}\bareme{-2} \end{reponses} \end{question} } \element{qqs}{ \begin{questionmult}{au choix} Choisissez vos points : \begin{reponses} \bonne{J'en veux 2}\bareme{b=2} \mauvaise{J'en donne trois}\bareme{b=0,m=3} \bonne{J'en veux un (et sinon j'en perds un)}\bareme{m=-1} \end{reponses} \end{questionmult} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \exemplaire{20}{ \noindent{\bf QCM \hfill TEST DE BARÈME} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf Test\\ Examen du 01/01/2008\end{minipage} \champnom{\fbox{\begin{minipage}{.5\linewidth} Nom et prénom : \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage}}} \begin{center}\em Durée : 10 minutes. \end{center} \vspace{1ex} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \melangegroupe{qqs} \restituegroupe{qqs} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% } \end{document} Barèmes généraux Pour utiliser un barème de manière générale pour tout un ensemble de questions, on pourra le définir dans une commande LaTeX, comme dans l'exemple suivant : \def\barQmult{haut=3,p=-1} \begin{questionmult}\bareme{\barQmult} [...] \end{questionmult} Une autre possibilité est offerte par les commandes LaTeX \baremeDefautS et \baremeDefautM, à utiliser en début de document (en dehors de la commande \exemplaire), qui permettent de donner des valeurs par défaut pour les barèmes des questions simples et des questions multiples : \baremeDefautM{haut=3,p=-1} Si vous utilisez formula avec \baremeDefautM ou \baremeDefautS, il faudra l'annuler si vous utilisez un barème particulier pour différentes questions. \begin{questionmult}\bareme{b=1,m=-0.5,formula=} [...] \end{questionmult} Dans certains cas de figure, il peut être intéressant de définir un barème de manière générale en fonction du nombre de réponses proposées. Il suffit pour cela de mettre les valeurs intervenant dans le barème sous la forme de formules utilisant la variable N. Par exemple, pour obtenir un barème qui fixe à 4 la note maximale et tel que l'espérance de la note d'un étudiant cochant au hasard chaque case soit de 1, on peut utiliser le barème d=4,b=0,m=-(4-1)*2/N (qui donne une note de -2 si toutes les réponses sont fausses, c'est-à-dire si on a coché les cases qu'il ne fallait pas cocher et si on n'a pas coché les cases qu'il fallait cocher). Les opérations acceptées dans ces formules sont les quatre opérations simples (+ - * /), l'opérateur de test ( ? : ), les parenthèses et plus généralement toutes celles reconnues par perl. L'opérateur test s'utilise de la manière suivante : ( test ? instruction si vrai : instruction si faux) Le test peut utiliser les opérateurs > (supérieur à), >= (supérieur ou égal à), < (inférieur à), <= (inférieur ou égal à), == (égalité), != (différence), || (ou), && (et). D'autres variables sont aussi utilisables : N est le nombre de réponses proposées, sans compter la réponse automatiquement ajoutée par l'option . NB est le nombre de bonnes réponses à la question (sans tenir compte des cases cochées ou non). NBC est le nombre de bonnes réponses qui ont été cochées. NM est le nombre de mauvaises réponses à la question (sans tenir compte des cases cochées ou non). NMC est le nombre de mauvaises réponses qui ont été cochées. IS vaut 1 si la question est simple et 0 sinon. IMULT vaut 1 si la question est multiple et 0 sinon. Du barème aux notes des étudiants Les notes des étudiants sont calculées de la manière suivante : pour chaque étudiant, Le barème de chaque question est appliqué pour obtenir les scores obtenus aux questions. La somme des scores de toutes les questions (sauf les questions indicatives) est calculée : on obtient le score total de l'étudiant. Si une note maximale non-nulle est donnée en paramètre (dans l'onglet Projet de la fenêtre Édition Préférences ), le score total est divisé par le score maximal (c'est-à-dire le score total calculé pour une copie parfaite), puis multiplié par la différence (note maximale - note minimale), auquel on ajoute enfin la note minimale pour obtenir la note de l'étudiant. De cette façon, un étudiant ayant répondu de manière parfaite se verra attribuer la note maximale et un étudiant ayant obtenu un score nul se verra attribuer la note minimale. Avec une note maximale fixée à 100 et une note minimale fixée à 0, la note de l'étudiant pourra être vue comme un pourcentage de bonnes réponses. En France, on utilise souvent une note maximale égale à 20 et une note minimale égale à 0. La note ainsi obtenue est arrondie en utilisant les options suivantes de Édition Préférences Projet  : Granularité : pour obtenir un arrondi à l'entier, choisir la valeur 1. Pour un arrondi au quart de point, choisir 0,25, etc. Une valeur nulle annulera l'arrondi final. Type d'arrondi : inférieur, normal, supérieur Corriger des erreurs de barème Vous pouvez, même après le passage de l'examen, modifier votre barème. Cependant, vous ne devez jamais mettre à jour le document. Il est préférable d'ouvrir le fichier avec votre éditeur de texte, de faire les modifications et d'enregistrer. Vous pouvez : Transformer des bonnes réponses en mauvaises réponses. Transformer des mauvaises réponses en bonnes réponses. Modifier le barème d'une ou plusieurs questions, le barème par défaut. Vous ne pouvez pas : Transformer une question simple en question multiple. Transformer une question multiple en question simple. Ajouter des réponses, des questions. Enlever des réponses, des questions. Modifier l'ordre des questions et/ou des réponses. Si vous estimez qu'une question doit être annulée, modifiez le barème comme ceci \bareme{b=0,m=0,e=0,v=0} ou notez la question comme indicative \QuestionIndicative. Identification des étudiants Cette étape n'est pas obligatoire. Il s'agit d'associer chaque copie à un étudiant. La lecture du nom d'étudiant n'est pas faite de manière automatique, mais deux possibilités raisonnables sont prévues : Il est possible de demander aux étudiants de s'identifier sur leur copie grâce à leur numéro d'étudiant, qui sera renseigné en cochant une case par chiffre. Une commande LaTeX est prévue pour mettre cette méthode en œuvre sur la copie (voir la partie ). Après l'examen, les copies seront identifiées automatiquement à partir d'une liste mettant en correspondance les numéros d'étudiants et les noms. Sans saisie des numéros d'étudiants, ou dans le cas où l'identification automatique n'a pas parfaitement fonctionné (par exemple en cas d'erreur de saisie des étudiants), l'interface graphique permet une association manuelle assistée. Sélectionnons tout d'abord l'onglet Notation de l'interface graphique. Liste des étudiants Il faut tout d'abord disposer d'une liste d'étudiants. Cette liste pourra bien sûr être utilisée pour plusieurs QCM. Elle devra être préparée au format CSV, avec éventuellement des lignes de commentaires au début préfixées par le caractère `#' :# liste des étudiants de première année nom:prenom:no:email Bienvenüe:Alexis:001:paamc@passoire.fr Boulix:Jojo:002:jojo.boulix@rien.xx Noël:Père:003:pere.noel@pole-nord.xx Dans cet exemple, le numéro d'identification de l'étudiant est contenu dans la colonne d'en-tête no. C'est ce nom de colonne qui devra être sélectionné dans le menu déroulant Identifiant unique dans cette liste de l'onglet Notation lors de l'association automatique des copies (voir ). Les lignes du fichier qui commencent par le caractère `#' sont des commentaires. La première des autres lignes contient, séparés par le caractère `:', les titres des colonnes. Ensuite, en une ligne par étudiant, on place les informations voulues. Il est préférable d'inclure au moins une colonne nommée nom. On peut remplacer le séparateur `:' par une virgule, un point-virgule ou une tabulation. Il faut cependant utiliser le même séparateur partout dans le fichier contenant la liste des étudiants. Le séparateur utilisé sera détecté en prenant le caractère (parmi les quatre possibles) qui apparaît le plus de fois dans la première ligne qui n'est pas un commentaire. Tout fichier au format CSV devrait convenir. L'envoi d'une même copie à plusieurs adresses nécessite quelques précautions dans la création du fichier CSV. point-virgule ou deux-points ou tabulation pour séparer les champs et virgule pour séparer les emails. Avec cette option, il faut déclarer dans le préambule \usepackage[babel=true,kerning=true]{microtype} virgule pour séparer les champs et les emails entre guillemets et séparés par une virgule. nom,prenom,email Boulix,Jojo,"jojo@boulix.fr,parents@boulix.com" La liste des étudiants préparée (que se soit une liste simple ou comprenant plus d'informations), nous la désignons maintenant en la sélectionnant à partir du bouton Choisir de la partie Identification des étudiants. Il faut également désigner l'identifiant unique qui permettra d'identifier les étudiants (en général, on choisit la colonne qui contient des numéros d'étudiants). Enfin, en vue d'une association automatique, il faut encore choisir le nom du code adopté dans la commande LaTeX \AMCcodeGrid. Association Association automatique Pour effectuer une association automatique, il est nécessaire d'avoir choisi un critère numérique (en général un numéro d'étudiant), d'avoir inclus au moins une commande \AMCcodeGrid (voir ) dans le fichier source LaTeX pour que les étudiants puissent coder ce critère numérique et d'avoir une colonne dans le fichier des étudiants qui contient le critère numérique. Pour réaliser l'association automatique des copies aux étudiants, complétez les deux menus déroulants de l'onglet Notation: Identifiant unique dans cette liste : il s’agit du nom de la colonne qui, dans le fichier csv des étudiants, contient le numéro d’étudiants (voir ). Titre du code pour association automatique : il s'agit de l'identifiant choisi dans le fichier source LaTeX pour le code \AMCcodeGrid (voir ). En appuyant sur le bouton Automatique de la partie Identification des étudiants, la recherche parmi la liste des codes renseignés par les étudiants s'opère. On peut ensuite observer ou peaufiner le résultat grâce à une association manuelle. Association manuelle Pour ouvrir la fenêtre de reconnaissance des noms d'étudiants, cliquons sur le bouton Manuelle de la partie Identification des étudiants. Cette fenêtre se compose d'une partie haute présentant successivement les noms inscrits par les étudiants, d'une partie basse comprenant un bouton par étudiant de la liste que nous avons fabriquée, ainsi que d'une partie droite qui permet une navigation aisée parmi les copies à identifier. Nous cliquons sur le bouton correspondant au nom inscrit en partie haute pour chaque page qui nous est présentée (par défaut, seules les copies non ou mal identifiées sont présentées. Ceci peut être changé en cochant la case associés). Quand toutes les pages sont lues, un fond bleu apparaît à la place des noms, et il ne nous reste plus qu'à cliquer sur le bouton Enregistrer de la fenêtre. Export de la liste des notes À ce stade, nous pouvons récupérer la liste des notes sous plusieurs formats (pour l'instant CSV et OpenOffice), grâce au bouton Exporter. Cet export s'accompagnera de l'ouverture du fichier produit par le logiciel approprié (si il est installé). Export ODS (OpenOffice, LibreOffice) Dans le fichier exporté, le codage couleur suivant est adopté : gris correspond aux cases qui ne comportent aucune information. Il s'agit par exemple des scores d'un étudiant absent, ou des scores aux questions qui n'ont pas été présentées à l'étudiant correspondant. jaune utilisé pour repérer les questions où l'étudiant n'a pas fourni de réponse. rouge utilisé pour les questions où l'étudiant a répondu de manière invalide : il a coché plus d'une case pour une question simple, ou il a coché une ou plusieurs cases en plus de la case Aucune de ces réponses n'est correcte. violet utilisé pour les cases correspondant à des questions indicatives (ne comptent pas pour la note finale de l'étudiant). Annotation En appuyant sur le bouton Annoter les copies, l'annotation des pages des étudiants commencera : sur chaque scan, les annotations suivantes sont effectuées (nous détaillons ici les annotations par défaut, qui peuvent être configurées) : les cases cochées à tort par l'étudiant sont entourées en rouge ; les cases non-cochées qui auraient dû l'être sont cochées en rouge ; les cases cochées et qui devaient l'être sont cochées en bleu ; pour chaque question, sont indiquées la note obtenue ainsi que la note maximale pouvant être obtenue ; la note globale de la copie est indiquée en première page de la copie. Le texte inscrit en haut de la première page de chaque copie peut être configuré ( Édition Préférences Annotation En-tête ou Édition Préférences Projet Annotation des copies Texte d'en-tête ). Les substitutions suivantes s'appliquent sur ce texte (voir pour une explication de la signification de ces valeurs) : %S est remplacé par le score total de l'étudiant. %M est remplacé par le score maximal (score obtenu par l'étudiant si il ne fait aucune erreur). %s est remplacé par la note de l'étudiant. %m est remplacé par la note maximale. %(ID) est remplacé par le nom de l'étudiant. %(COL) est remplacé par la valeur de la colonne COL dans la liste des étudiants pour l'étudiant considéré. Cette opération est effectuée page par page, et le résultat est constitué de copies corrigées au format PDF. Le nom du fichier PDF qui contiendra la copie corrigée d'un étudiant donné est formé à partir du modèle indiqué dans le champ Modèle de nom de fichier. Dans ce modèle, les textes du type « (col) » seront remplacés par le contenu de la colonne nommée col dans le fichier listant les étudiants (voir section ). Si on laisse ce champ vide, une valeur par défaut formée du nom et du numéro d'étudiant de l'étudiant sera utilisée. Options proposées en mode <option>ensemble</option> Seulement la feuille de réponses : les feuilles de réponses seront annotées. Sujet avec feuille de réponses : les feuilles de réponses seront annotées et le sujet vierge sera inclus au fichier pdf. Sujet et feuille de réponses : les feuilles de réponses seront annotées et le sujet corrigé sera inclus. Position de la note Vous pouvez choisir la position de la note à l'aide du menu Édition Préférences Projet Position de la note Les choix par défaut sont : (aucune). Dans la marge. Dans les deux marges. A côté des cases. Indiqué dans le fichier source (voir ). Les valeurs par défaut du menu Préférences Vous pouvez modifier les valeurs par défaut pour le traitement des scans dans le menu Édition Préférences Scan Conversion des scans Densité des scans vectoriel (DPI) : 250 Seuil de conversion : 0.60 Effacer le rouge des scans : décoché Forcer la conversion : décoché Paramètres de détection Majoration de la taille des marques : 0.20 Minoration de la taille des marques : 0.20 Seuil de noirceur par défaut : 0.15 Default upper darkness threshold : 1 Proportion des cases à mesurer : 0.80 Contrôle des scans avec 3 angles marqués : décoché Utilisations particulières Photocopie du sujet Comme expliqué dans , il n'est pas toujours possible de photocopier une feuille de réponses pour en donner à plusieurs étudiants. Cependant, dans le cas de l'utilisation de la feuille de réponses séparée, et quand les questions et réponses ne doivent pas être mélangées, il est possible de photocopier le sujet et imprimer les feuilles de réponses séparément. La conduite à suivre pour obtenir un tel résultat est indiquée ici. Utiliser l'option (voir ). Écrire le sujet avant l'utilisation de la commande exemplaire, ou de l'environnement copieexamen. Utiliser la commande \AMCformS pour restituer les cases à cocher sur chaque feuille de réponses, à l'intérieur de exemplaire/copieexamen. Voici un exemple minimal de fichier LaTeX : \documentclass[a4paper]{article} \usepackage[ensemble]{automultiplechoice} \begin{document} \noindent{\bf Sujet} \begin{question}{sum} Combien font un plus un ? \begin{reponses} \mauvaise{1} \bonne{2} \mauvaise{3} \end{reponses} \end{question} \begin{question}{k2} Quelle est l'altitude du K2? \begin{reponses} \mauvaise{around 8000m} \bonne{around 8600m} \mauvaise{around 9000m} \end{reponses} \end{question} \AMCcleardoublepage \exemplaire{5}{ \AMCdebutFormulaire {\large\bf Feuille de r\'eponses :} \hfill \champnom{\fbox{ \begin{minipage}{.5\linewidth} Nom: \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }} \AMCformS } \end{document} Correction a posteriori Supposons que vous souhaitez utiliser une unique feuille de réponses générique pour tous vos examens. Elle contiendra simplement des cases à cocher (par exemple 5 cases par question, et 40 questions). Les sujets des examens seront rédigés à part. Le problème ici est que les bonnes réponses ne sont pas indiquées dans le fichier LaTeX, ce qui fait que AMC ne peut pas les connaître. La solution consiste à demander à l'enseignant de cocher sur une feuille de réponse les bonnes réponses, qui sera transmise à AMC pour qu'il y lise les bonnes réponses. Pour mettre en œuvre ce schéma de fonctionnement, vous devez : utiliser les options , et (voir ) ; utiliser \mauvaise pour toutes les réponses (jamais \bonne). Voici un exemple minimal : \documentclass[a4paper]{article} \usepackage{multicol} \usepackage[insidebox,noshuffle,postcorrect]{automultiplechoice} \begin{document} \exemplaire{5}{ \noindent \begin{tabular}{|l|l|l|} \hline num\'ero d'\'etudiant & classe & sujet\\ \hline \vspace{-0.25cm} & &\\ \AMCcodeGridInt{NumEtud}{10}\hspace*{\fill}& \AMCcodeGridInt{Classe}{2}\hspace*{\fill}& \AMCcodeGridInt{Sujet}{3}\hspace*{\fill} \\ \hline \end{tabular} \hfill\namefield{\fbox{ \begin{minipage}{.25\linewidth} Nom : \vspace*{.5cm}\dotfill \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }}\hfill \vspace{.5cm} \noindent\hrulefill \begin{multicols}{2}\columnseprule=.4pt \begin{question}{01} \begin{reponsesperso} \mauvaise{}% \mauvaise{}% \mauvaise{}% \mauvaise{}% \mauvaise{}% \end{reponsesperso} \end{question} \begin{question}{02} \begin{reponsesperso} \mauvaise{}% \mauvaise{}% \mauvaise{}% \mauvaise{}% \mauvaise{}% \end{reponsesperso} \end{question} % continuez ici pour ajouter autant de questions que souhaité... \end{multicols} } \end{document} Après traitement du fichier LaTeX par AMC, imprimez les feuilles de réponses obtenues, faites passer l'examen et demandez à l'enseignant de remplir une feuille. Scannez ensuite les feuilles de réponses, et lancez la saisie automatique dans AMC (y compris de la feuille remplie par l'enseignant). Quand vous cliquez sur Corriger dans l'onglet Notation, en laissant la case Mettre à jour le barème cochée, AMC vous demandera le numéro de la copie remplie par l'enseignant. La suite des opérations est la même que dans le cas standard. Vous pouvez aussi écrire les lettres des cases à l'extérieur de celles-ci : utilisez pour cela l'option à la place de , et écrivez vos questions de la façon suivante: \begin{question}{01} \begin{reponsesperso} \wrongchoice{A }% \wrongchoice{B }% \wrongchoice{C }% \wrongchoice{D }% \wrongchoice{E }% \end{reponsesperso} \end{question} Pour utiliser cette option uniquement pour le formulaire de réponse (et non pour la saisie du numéro d'étudiant), vous pouvez définir, juste après le \begin{document} \makeatletter \def\setoutsidebox{\AMC@outside@boxtrue} \makeatother Puis utiliser cette nouvelle commande localement (à l'intérieur des accolades) dans le formulaire : {\setoutsidebox\formulaire} Copies préremplies Dans certaines situations, il peut être souhaitable de préparer des copies nominatives pour tous les étudiants, à partir d'une liste d'étudiants. La démarche suivante, basée sur l'utilisation du paquet LaTeX csvsimple, permet d'obtenir ce résultat. La liste des étudiants doit être au format CSV. On suppose dans la suite que le fichier liste.csv, placé dans le répertoire du projet, utilise l'encodage UTF8 et est sous la forme suivante :nom,prenom,id Boulix,Jojo,001 Golin,André,002 Moniuszko,Stanisław,003 ou nom,prenom,id,mail Boulix,Jojo,001,jojo@boulix.fr Golin,André,002,andre@golin.fr Moniuszko,Stanisław,003,Moniuszko@Stanisław.fr ou nom,prenom,id,mail Boulix,Jojo,001,"jojo@boulix.fr,tata@boulix.fr" Golin,André,002,"andre@golin.fr,golin@andre.fr" Moniuszko,Stanisław,003,"Moniuszko@Stanisław.fr,stan@stanislaw.fr" ou nom;prenom;id;mail Boulix;Jojo;001;jojo@boulix.fr,tata@boulix.fr Golin;André;002;andre@golin.fr,golin@andre.fr Moniuszko;Stanisław;003;Moniuszko@Stanisław.fr,stan@stanislaw.fr Ne pas utiliser le symbole _ (underscore) dans le nom ou prénom des étudiants. Une erreur de compilation sera affichée. Le sujet LaTeX doit charger le paquet csvsimple, grâce à une ligne\usepackage{csvsimple} Dans le fichier source, le sujet doit être défini sous la forme d'une commande LaTeX produisant un seul sujet, qui sera appelée (autant de fois qu'il y a d'étudiants) par la commande \csvreader de la façon suivante  : \documentclass[a4paper]{article} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} %\usepackage[french]{babel} %\usepackage[babel=true,kerning=true]{microtype} \usepackage[francais,bloc,completemulti]{automultiplechoice} \usepackage{csvsimple} \newcommand{\sujet}{% \exemplaire{1}{% %\shorthandon{;} %%% debut de l'en-tête des copies : \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf Histoire et géographie\\ Examen du 01/01/2008 \end{minipage} \champnom{\fbox{\begin{minipage}{.5\linewidth} Nom et prénom : \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage}}} %%% fin de l'en-tête \begin{center} \hrule\vspace{2mm} \bf\Large Géographie \vspace{1mm}\hrule \end{center} \restituegroupe{geographie} \begin{center} \hrule\vspace{2mm} \bf\Large Histoire \vspace{2mm}\hrule \end{center} \restituegroupe{histoire} }%fin commande \exemplaire }%fin commande \newcommand \begin{document} %%% préparation des groupes \setdefaultgroupmode{withreplacement} \element{geographie}{ \begin{question}{Paris} Dans quel continent se situe Paris~? \begin{reponses} \bonne{L'Europe} \mauvaise{L'Afrique} \mauvaise{L'Asie} \mauvaise{La planète Mars} \end{reponses} \end{question} } \element{geographie}{ \begin{question}{Cameroun} Quelle est la capitale du Cameroun~? \begin{reponses} \bonne{Yaoundé} \mauvaise{Douala} \mauvaise{Abou-Dabi} \end{reponses} \end{question} } \element{histoire}{ \begin{question}{Marignan} En quelle année a eu lieu la bataille de Marignan~? \begin{reponseshoriz} \bonne{1515} \mauvaise{1915} \mauvaise{1519} \end{reponseshoriz} \end{question} } \element{histoire}{ \begin{questionmult}{Nantes} Que peut-on dire de l'Édit de Nantes~? \begin{reponses} \bonne{Il a été signé en 1598} \bonne{Il a été définitivement révoqué par Louis XIV} \mauvaise{Il a été signé par Henri II} \end{reponses} \end{questionmult} } %%génération des sujets \csvreader[head to column names]{liste.csv}{}{\sujet} %\shorthandoff{;} %\csvreader[head to column names,separator=semicolon]{liste.csv}{}{\sujet} \end{document} Notez l'utilisation de l'option head to column names de \csvreader qui définit des commandes basées sur les en-tête du fichier CSV (ici \nom, \prenom et \id) utilisables dans la production du sujet personnalisé, et l'appel de \AMCassociation qui indique à AMC que la copie produite doit être associée à l'identifiant d'étudiant \id. Si vous utilisez un fichier similaire au 4e exemple avec le paquet \usepackage[french]{babel}, le caractère ";" est activé, ce qui interfère avec la détection de ce caractère en tant que séparateur dans le fichier CSV. Pensez à décommenter cette ligne pour l'activer. L'astuce est de recourir à microtype pour corriger ce problème (et on peut profiter des avantages de microtype). Pensez à décommenter cette ligne pour l'activer. Au lieu d'utiliser \usepackage[babel=true,kerning=true]{microtype}, cette solution est possible pour contourner le problème. Décommentez cette ligne. Utilisez cette commande si le fichier CSV correspond à un des 3 premiers exemples. Utilisez cette commande si le fichier CSV correspond au 4e exemple. Après l'impression, le scan, la saisie automatique et la notation des copies, au moment de l'association des copies avec les étudiants, utiliser la valeur "pré-association" pour le champ Titre du code pour association automatique, et "id" pour le champ Identifiant unique dans cette liste. Manuel des commandes Vous pouvez vous passer de la lecture de cette partie si vous souhaitez utiliser uniquement l'interface graphique. Cependant, toutes les actions effectuées par l'interface graphique peuvent aussi être exécutées par les différentes commandes dont nous décrivons ici la syntaxe. auto-multiple-choice 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ auto-multiple-choice Gestion automatisée de questionnaires QCM auto-multiple-choice action arguments auto-multiple-choice projet Description La commande auto-multiple-choice transmet à la commande AMC-action.pl les arguments qu'on lui donne. La deuxième forme, qui ne mentionne aucune action, appelle l'interface graphique AMC-gui.pl en lui transmettant éventuellement le nom d'un projet à ouvrir. See also Différentes actions possibles : AMC-prepare 1 , AMC-imprime 1 , AMC-analyse 1 , AMC-note 1 , AMC-association-auto 1 , AMC-export 1 , AMC-annote 1 , AMC-regroupe 1 . AMC-prepare 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-prepare prépare le document de travail à partir du fichier source LaTeX auto-multiple-choice prepare --mode s --prefix répertoire-project fichier source AMC auto-multiple-choice prepare --mode b --data répertoire-données-project fichier source AMC Description Voir documentation en anglais. Divers Paramétrer AMC pour l'utilisation de GMAIL Connectez-vous sur votre compte GMAIL puis activez l'option : autoriser les applications non sécurisées. Utilisateurs linux (Ubuntu, Xubuntu, Lubuntu etc.) Tapez dans un terminal : sudo apt-get install msmtp sudo gedit /etc/msmtprc et copiez le texte suivant puis enregistrez le fichier. account gmail host smtp.gmail.com tls on tls_certcheck off port 587 auth login from votre adresse mail du compte gmail user votre adresse mail du compte gmail password votre mot de passe du compte gmail Dans les préférences de AMC : Edition Préférences Courriel Méthode d'envoi , choisir sendmail et mettre le chemin : /usr/bin/msmtp Utilisateurs Macintosh Tapez dans un terminal : sudo port install msmtp sudo pico ~/.msmtprc et copiez le texte suivant puis enregistrez le fichier. account gmail host smtp.gmail.com tls on tls_certcheck off port 587 auth login from votre adresse mail du compte gmail user votre adresse mail du compte gmail password votre mot de passe du compte gmail Dans les préférences de AMC : Edition Préférences Courriel Méthode d'envoi , choisir sendmail et mettre le chemin : /opt/local/bin/msmtp Personnaliser Texmaker pour AMC Si vous utilisez Texmaker, vous pouvez ajouter les raccourcis des environnements question et réponses en allant dans le Menu Utilisateur Personnaliser complétion puis entrez \begin{question}{} puis cliquez sur ajouter. Faites de même avec reponses et reponseshoriz. Le paquet <command>fp</command> par l'exemple La documentation du paquet fp n'est pas très détaillée et compréhensible pour un grand débutant au langage latex. Voici les commandes expliquées par un exemple. La commande \FPprint{\x} permet d'afficher la valeur de x. Cependant, la commande \num{...} du paquet siunitx est préférable car elle affiche une virgule pour les nombres décimaux au lieu d'un point et groupe par trois les chiffres. \usepackage{siunitx} \sisetup{locale = FR,detect-all,quotient-mode=fraction, input-product=*, list-final-separator = { \translate{et} }, list-pair-separator = { \translate{et} },range-phrase = { \translate{à} }, separate-uncertainty = true,group-minimum-digits=3} La fonction \FPrandom{\x} calcul un nombre aléatoire. La fonction \FPseed=12345 permet de modifier le système de génération de nombre aléatoire (choisir un entier fixé à sa convenance). La fonction \FPeval{\x}{...} permet de faire des calculs et d’affecter le résultat à la variable \x. La fonction \FPtrunc{\y}{\x}{a} transfère le nombre \x avec a chiffres après la virgule à la variable \y. On peut cumuler les fonctions \FPeval (avec toutes les fonctions de calcul) et \FPtrunc, comme dans l'exemple suivant qui choisit un réel au hasard entre a et a+b, en gardant c chiffres après la virgule : \FPeval{\x}{trunc(a+random*b,c)} La fonction \FPround{\y}{\x}{a} transfère le nombre \x avec a chiffres après la virgule à la variable \y et arrondi. La fonction \FPclip{\y}{\x} transfère le nombre \x, sans les zéros après la virgule, à la variable \y. Les fonctions \FPadd{\x}{a}{b}, \FPdiv{\x}{a}{b}, \FPmul{\x}{a}{b}, \FPsub{\x}{a}{b} attribue à la variable \x la somme a+b, le quotient a/b, le produit a*b, et la différence a-b La fonction \FPset{\x}{\y} attribue à la variable \x (macro ou chaîne) la valeur \y \FPabs{\x}{a} renvoie la valeur absolue de a, \FPneg{\y}{a} renvoie l'opposé de a La commande \FPiflt{\x}{\y} {instruction 1} \else {instruction 2} \fi vérifie si \x est inférieur à \y dans ce cas l'instruction 1 est lancée sinon c'est l'instruction 2. Même principe les fonctions \FPifeq{\x}{\y}, \FPifgt{\x}{\y}, \FPifneg{\x}, \FPifpos{\x}, \FPifzero{\x}, \FPifint{\x} qui sont respctivement des tests d'égalité, de supériorité, de négativité, de positivité, de nullité ou d'entier. La commande \FPlsolve{\x}{a}{b} cherche la valeur réelle \x pour résoudre l'équationa*\x+b=0. La commande \FPqsolve{\x}{\y}{a}{b}{c} cherche les valeurs réelles \x et \y pour résoudre l'équation a*x^2+b*x+c=0 La commande \FPcsolve{\x}{\y}{\z}{a}{b}{c}{d} cherche les valeurs réelles \x, \y et \z pour résoudre l'équationa*x^3+b*x^2+c*x+d=0 La commande \FPqqsolve{\w}{\x}{\y}{\z}{a}{b}{c}{d}{e} cherche les valeurs réelles \w, \x, \y et \z pour résoudre l'équation a*x^4+b*x^3+c*x^2+d*x+e=0 La commande \FPe renvoie la valeur de e=2.71828182845904523, la commande \FPpi renvoie la valeur de pi. La commande \FPexp{\x}{a} attribue à la variable \x la valeur e^a, la commande \FPln{\x}{a} attribue à la variable \x la valeur ln(a) La commande \FPpow{\x}{a}{b} attribue à la variable \x la valeur a^b, La commande \FProot{\x}{a}{b} attribue à la variable \x la valeur a^(1/b). On peut écrire \FPeval{\x}{root(b,a)} La commande \FPpascal{\x}{a} attribe à \x la ligne a du triangle de pascal. La commande \FPsin{\x}{a} attribue à \x la valeur du sinus de a qui est exprimé en radians (il existe une commande identique pour le cosinus (cos), la tangente (tan), la cotangente (cot), l'arcsinus (arcsin), l'arccosinus (arccos), l'arctangente (arctan), l'arccotangente (arccot)). \FPeval{\x}{sin(30*\FPpi/180)}\FPprint{\x} La commande \FPsincos{\x}{\y}{a} attribue à \x la valeur du sinus de a qui est exprimé en radians et \y la valeur du cosinus de a qui est exprimé en radians. La commande \FPtancot{\x}{\y}{a} attribue à \x la valeur de la tangente de a qui est exprimé en radians et \y la valeur de la cotangente de a. La commande \FParcsincos{\x}{\y}{a} attribue à \x la valeur de l’arc sinus(a), \x sera exprimé en radians, à \y la valeur de l’arc cosinus(a), \y sera exprimé en radians. La commande \FParctancot{\x}{\y}{a} attribue à \x la valeur de l’arc tangente(a), \x sera exprimé en radians, à \y la valeur de l’arc cotangente(a), \y sera exprimé en radians.
    auto-multiple-choice-1.4.0/doc/auto-multiple-choice.ja.in.xml000066400000000000000000011500021341176102400240610ustar00rootroot00000000000000
    Auto Multiple Choice Auto Multiple Choice 自動採点と評定の可能な選択式試験問題のデザイン @/PACKAGE_V_ISODATE/@ AMCは、プレーンテキストあるいはLaTeXで記述されたマークシート方式の選択式試験問題を使用して、答案用紙のスキャン画像からのOMR(光学マーク認識)により自動採点と評定のできるユーティリティ群です。この文書はその使用説明書です。(バージョン@/PACKAGE_V_DEB/@~@/PACKAGE_V_VC/@) AMCのWebサイトはhttps://www.auto-multiple-cho ice.net/にあり、ソースコードはhttps://gitlab .com/jojo_boulix/auto-multiple-choice/にあります。 Alexis
    paamc@passoire.fr
    Bienvenüe 主な著者
    Anirvan Sarkar 著者・編集者 Hiroto Kagotani 編集者 Frédéric Bréal 著者・編集者 2008-2018 Alexis Bienvenüe Bérard Jean フランス語版から英語版への翻訳 Khaznadar Georges フランス語版から英語版への翻訳 Kagotani Hiroto 英語版から日本語版への翻訳 この文書はGNU一般公衆利用許諾書バージョン2またはそれ以降に従って利用することができます。
    ライセンス Auto Multiple Choiceはフリーソフトウェアです。あなたはこれを、フリーソフトウェア財団によって発行されたGNU一般公衆利用許諾書バージョン2か、(希望によっては)それ以降のバージョンのいずれかの定める条件の下で再頒布または改変することができます。 このプログラムは有用であることを願って頒布されますが、*全くの無保証* です。商業可能性の保証や特定の目的への適合性は、言外に示されたものも含め全く存在しません。詳しくはGNU一般公衆利用許諾書をご覧ください。あなたはこのプログラムと共に、GNU一般公衆利用許諾書の複製物を1部受け取ったはずです。もし受け取っていなければ、http://www.gnu.org/licenses/をご覧ください。 必要条件 オペレーティングシステム AMCユーティリティはLinux用に開発されています。MAC OS XにもMacPortsを用いてインストールすることができます。 ソフトウェア AMCをdebあるいはRPMパッケージを用いて(debian、Ubuntuとその派生、Mandriva、openSUSE、Fedora上で)インストールすれば、AMCに必要なソフトウェアはすべて自動的にインストールされます。 AMCを用いるのに不可欠となる主要なパッケージあるいはソフトウェアは次のとおりです。 LaTeX 画像処理ライブラリImageMagickとOpenCV PerlPerl(GUI用にGtk2-PerlとGlade::XMLを含む) AMCで用いるソフトウェアの推奨バージョン AMCで用いるソフトウェアのバージョンが古いと、そのバグにより正常な動作の妨げになるものがあります。 Net::CUPS(debianパッケージlibnet-cups-perl)の古いバージョンを用いると、試験問題用紙の印刷のコマンドによって、AMCのGUIが異常終了してしまいます。このバグはNet::CUPSのバージョン0.61以降で修正されています。 ImageMagickの古いバージョンを用いると、採点記入済の答案を受験者ごとにPDFファイルにまとめる機能が、複数ページの答案の場合に動作しません。このバグはImageMagickのバージョン6.5.5以降で修正されています。 LaTeX AMCのバージョン1.1からは、試験問題をLaTeX言語で記述することは必須ではなくなりました(プレーンテキストでの代替文法についてはを参照)。しかし、LaTeXは試験問題を記述するためのネイティブなAMC言語であり、比べものにならない自由度で試験問題をデザインすることができます。LaTeX形式に抵抗のある人でも、用意されたテンプレートで自分の選択式試験問題をすぐに書き始められます。 利用メモ 数値的な限界 (0.156以降の)現在までのバージョンでは、試験あたりの受験者数は4,095人まで、試験あたりの(受験者ごとの)ページ数は63ページまでに限定されています(これらのデフォルト値は変更可能です。参照)。 設問ごとの選択肢数は199個までに限定されています(このデフォルト値は変更できません)。 LaTeX自体の限界でコンパイルができないことがあり、例えば、「No room for a new \toks」というエラーが出ます。この場合、\usepackage{etex}コマンドによりetexパッケージを試してみてください。 バージョン 問題が出ることは多くはありませんが、あるプロジェクトを実施している間(試験問題用紙を印刷してから採点して成績をつけ終わるまでの期間)はプログラムのバージョンを変更しないことをお勧めします。何らかのプロジェクトを実施している最中に適用してしまうと、AMCの正常な動作に干渉してしまうような修正がいくつかあります。 バージョン0.155以前のAMCでコンパイル・印刷を行った後、バージョン0.156以降でそのプロジェクトを扱う場合、LaTeXファイルのautomultiplechoiceパッケージを読み込んでいる部分で、次のようにオプションを付けてください。 \usepackage[box,completemulti,versionA]{automultiplechoice} バージョン0.262以降、チェックボックスの描画が若干大きくなりました。このせいで試験問題用紙のレイアウトが変わってしまう可能性があります。 バージョン0.267以降、A4版の試験問題用紙を作成したい場合は、LaTeXファイルで次のように明示的に指定する必要があります。 \documentclass[a4paper]{article} バージョン0.394以降、graphicxパッケージが必要な場合は明示的にロードする必要があります(それより前のバージョンでは、AMCによってロードされていました)。 LaTeXの\AMCcodeコマンドはバージョン0.5.18で書き直されました。これによってより堅牢になり設定を柔軟に変更しやすくなりましたが、旧バージョン用に書かれたLaTeXのソースで同じレイアウトを得るためには修正する必要があります。 バージョン1.1.0より、AMCの全データは多数のXMLファイルではなくSQLiteデータベースに格納されます。プロジェクトを最初に開いたときに、古いXMLファイルが新しい形式に変換されます。 インストール debian、Ubuntuあるいはその派生OSでは、debian公式リポジトリとubuntu AMCリポジトリを用いることができます。Mandriva、openSUSE、Fedoraでは、ビルド済のRPMパッケージを用いることができます。インストール手順はAMCウェブサイトで説明されています。 ソースコードのアーカイブは、プロジェクトのダウンロードエリアでダウンロードでき、その場合は端末上で次のコマンドを使ってください。 tar xvzf auto-multiple-choice_xxxx_precomp.tar.gz cd auto-multiple-choice-xxx make sudo make install 起動 インストールが完了したら、Gnomeの一般メニュー(あるいは、KDEなどの対応するメニュー)からアプリケーション教育Auto Multiple Choiceを選ぶことにより、GUIを起動することができます。また、auto-multiple-choiceコマンドを使用することもできます。 AMC-TXT構文 LaTeX語にまだ慣れておらず、勉強する時間もない方のために、AMCにはAMC-TXTという特別な形式の簡単なテキストファイルを処理するフィルターが含まれています。この節では、AMC-TXTファイルの構文を詳しく解説します。LaTeXを用いて試験問題を精密に制御する場合は、この節はスキップしてください。 単純な例から始めましょう: # AMC-TXTソースファイル Title: はじめてのAMC試験問題 Lang: JA Presentation: 以下の設問に最も適切な解答を 選択してください。 * カメルーンの首都はどれですか? + ヤウンデ - ドゥアラ - クリビ ** 以下の数のうち、正の数はどれですか? - -2 + 2 + 10 試験問題を含んだファイルは、UTF-8でエンコードされたプレーンテキストファイルでなければなりません。UTF-8はいくつかのテキストエディタ(geditなど)のデフォルトエンコーディングです。テキストをボールドにしたり、画像が埋め込めたりするような、OpenOffice/LibreOfficeやそれに類するエディタを使用しないでください。これらはテキスト以外に多量のデータを保存し、AMCはそれを読むことができません。 デフォルトとして用いられるフォントはlibertineで、これは多数の言語の文字を含んだオープンソースフォントです。このフォントをインストールするか、そうでなければ他のフォントを選ぶ必要があります(下記オプション参照)。debian/ubuntuパッケージでAMCをインストールすれば、このフォントは推奨パッケージとしていっしょにインストールされます。 AMC-TXTの構造はすでにおわかりのとおりです。最初に全体的なオプションがあり、そして設問が続きます。 コメント AMC-TXTソースファイル内の#文字で始まる行にはコメントを書くことができます。AMCはこれらの行を無視します。 全体オプション 以下のオプションを(任意の順序で)使用することができます: Lang: 試験問題が記述されている言語を指定するのに用います。現時点では、DE(ドイツ語)、ES(スペイン語)、FR(フランス語)、IT(イタリア語)、NL(オランダ語)、NO(ノルウェー語)、PT(ポルトガル語)、JA(日本語、参照)、AR(アラビア語、参照)のみがサポートされています。オプションを指定しないと、英語が選択されます。他の言語用にローカライズ文字列を定義することもできます(形式のオプション参照)。 PaperSize: 用紙サイズを設定します。設定可能な値は、A3A4A5A6B3B4B5B6letterlegalANSIAANSIBANSICANSIDANSIEです。 Title: 試験タイトル。試験問題用紙の上部に印刷されます。 Presentation: 試験の注意事項を記述する文章(時間、規則など)です。 ShuffleQuestions: 1なら(デフォルト)、設問がシャフルされ、用紙ごとに順序が変わります。0なら、ファイルに記述された通りの順序で設問が並びます。 RandomSeed: シャフル用の乱数生成器のシードはこのオプションで変更することができます。設定されている値(1から4194303の範囲で選択できます)が変更されると、シャフル結果が変わります。当然ですが、問題用紙を印刷したあとはこの値を変更してはなりません。 この値はxyファイルに(\rngstate{1}{1527384}のように)記録されます。デフォルト値は1527384です。 Code: 正の整数値nを指定すると、n桁分の受験番号をマークする欄が試験問題用紙に追加されます。 CodeDigitsDirection: 受験番号欄の方向を(virticalまたはhorizontalで)設定します。設定しない場合は桁数により(桁数が少なければ水平、多ければ垂直に)自動選択されます。 Columns: 正の整数値nを指定すると、問題用紙をnカラムで生成します。 CompleteMulti: 1なら(デフォルト)、複数選択問題(正解数が0以上の任意個)において、「該当なし」の選択肢を追加します。これをしないと、「受験者がこの設問に解答しなかった」のと「受験者がこの設問に正解がないと考えた」のが区別できません。この選択肢をつけたくない場合は0に設定してください。 L-None: 該当なし」(上記オプション参照)に代わる文字列を設定します。 QuestionBlocks: 1なら(デフォルト)、各設問は複数のカラムやページにまたがらないように透明な枠で囲まれます。0なら、必要に応じて設問が分割され、読み易さは多少犠牲になりますがページ数が節約できます。 L-Question: 必要なら、試験問題内での「」に代わる文字列を設定します。 L-Name: 受験者の氏名記入欄に表示する「氏名」に代わる文字列を設定します。 L-Student: オプションが使用された場合に、受験者に、受験番号と氏名を記入するよう指示する短い文章です。 TitleWidth: を使用しない場合のタイトル領域の幅。デフォルト値は.47\linewidthです。 NameFieldWidth: 氏名フィールドの幅。LaTeXの通常の長さ単位が使用できます。デフォルト値は、を使用する場合は5.8cmで、使用しない場合は.47\linewidthです。 NameFieldLines: 氏名フィールドボックスの行数。デフォルト値は、を使用する場合は2で、使用しない場合は1です。 NameFieldLinespace: 氏名フィールドボックスの行間。デフォルト値は.5emです。 Pages: 各問題用紙の最小ページ数を指定します。問題がこのページ数より少ない場合は白紙ページが追加されます。別紙答案用紙を使用している場合は、 (例 )のように書くことができ、qは問題用紙自身の最小ページ数、q+aは答案用紙も含めた最小ページ数になります。 ManualDuplex: 1にすると(これはデフォルト値ではありません)、各試験問題用紙のページ数が偶数になり、PDFの試験問題用紙を手動で印刷する際、両面印刷モードで一度に行うことができます。 SingleSided: 1にすると(これはデフォルト値ではありません)、設問のページ数が奇数の場合でも、設問と別紙答案用紙の間に空ページが追加されません。このモードは試験問題用紙を片面印刷するときや、設問と答案用紙を分ける必要がないときに有用です。 BoxColor: 受験者がマークするボックスの色です。これによりボックスは指定した色(例えばredや、薄いグレーもありえます)で印刷され、データ取込み時の誤検出を軽減します。色は、有効なxcolor(詳細はLaTeXのxcolorドキュメント参照)で、redmagentapinklightgraycyanや、#RRGGBBの形式で#FFBEC8(淡い赤)のように指定します。 DefaultScoringS: 単一選択問題(唯一の選択肢のみが正解になる設問)でのデフォルト採点基準です。詳細はを参照してください。デフォルト値は、正解に1点、それ以外に0点です。 DefaultScoringM: 複数選択問題(正解の選択肢が0個、1個あるいは複数個ありうる設問)でのデフォルト採点基準です。詳細はを参照してください。デフォルト値はhaut=2で、完答に2点、1箇所の誤り(マークすべきでないボックスをマークしたり、マークすべきボックスをマークしなかったり)ごとに1点減点します(ただし負にはしない)。 LaTeX: 文章中にLaTeXコマンドを使用したい場合は、このオプションを1にしてください。これにより例えば、$\sqrt{a+b}$のような数式を挿入できます。0なら(デフォルト)、記述した文章がそのまま印刷されます。 LaTeX-Preambule: LaTeXプリアンブルに追加したいコマンド(例えば\usepackageコマンドなど)を設定します。 LaTeX-BeginDocument: LaTeXのdocument環境の先頭に挿入したいコマンド(例えばマクロ定義など)を設定します。 Disable: 無効にする機能のリストをコンマで区切って指定します。現在実装されている機能はverbatim参照)、images参照)、embf参照)、local_latex参照)です。 PackageOptions: LaTeXのautomultiplechoiceパッケージに渡す追加オプションを与えます(参照)。 別紙答案用紙 試験問題に別紙答案用紙を用いる場合は、次のオプションを指定してください: SeparateAnswerSheet: 1なら、別紙答案用紙が追加されます。 AnswerSheetTitle: 別紙答案用紙のタイトルです。 AnswerSheetPresentation: 別紙答案用紙の注意書きです。例えば、解答をこの用紙に記入しなければ無効であることを受験者に伝えます。 AnswerSheetColumns: 別紙答案用紙のカラム数です。 AutoMarks: 1にすると、オプション(参照)を使用します。 設問 単一選択問題(唯一の選択肢のみが正解となる設問)は、行を*で始め、複数選択問題(任意個の正解がある設問)は**で始めます。そのうしろに設問文を続け、以降の行に+で始まる正しい選択肢と、-で始まる誤った選択肢を書きます。 設問オプション 設問にはいくつかオプションが設定できます。それらは次の例のように、***のあとに角括弧で囲み、カンマで区切って並べます: *[ordered,horiz,id=sum] 1足す1は いくつですか? - 0 - 1 + 2 設問に使用できるオプションは以下のとおりです: horiz 選択肢を横に並べていきます。 columns=n 選択肢をnカラムに配置します。 ordered 選択肢をシャフルせず、記述ファイル内と同じ順序を保ちます。 id=xxxx 設問に名前をつけ、出力した採点表の得点がどの設問のものかわかりやすくします。この名前にはアクセントなどを含まずLaTeXの特殊文字(_^%など)でない単純な文字しか使用できません。 旧版との互換性のためのかわりにも使用できますが、を使用してください。 indicative この設問の採点結果を、受験者の最終得点に加えません。 next オプションで設問をシャフルする場合でも、直前の設問の次にこの設問を配置します。 first この設問を常にグループの先頭に配置します(を参照してください)。 last この設問を常にグループの末尾に配置します(を参照してください)。 採点基準 特定の設問や選択肢の開始文字(***+-)とオプションの後に、波括弧で囲んで採点基準を設定することができます。例えば次の例のようになりますが、採点基準の詳細については、を参照してください。 *{b=2,m=-1} フランスの首都はどれですか? + パリ - リール - マルセイユ - ワガドゥグー -{-2} ニューヨーク **[ordered,horiz,id=positive]{haut=1} 以下の数のうち、正の数はどれですか? - -2 + 2 + 10 記述式設問 次の例のように<>で囲むことにより、記述式の設問(参照)を定義することができます: *<lines=4> 月について述べよ。 -[O]{0} 誤り -[P]{1} 部分点 +[V]{2} 正解 以下のグローバルオプションを使用することも検討すべきです: L-OpenText: 別紙答案用紙に記入するよう指示するテキスト(関連する場合のみ)。 L-OpenReserved: 採点用ボックスに記入しないようボックス脇に表示するテキスト。 複数行 文章はどこで切って次の行に続けても(それが空行であっても)、それがオプションや次の設問文や選択肢の開始と混同さえされなければかまいません。例として次の設問を見てください: * 2 + 2はいくつですか? - 0 + 4 - 10 これは正しいAMC-TXTの設問ですが、これは意図したとおりには扱われません。それは、2行目が、1行目の続きと認識されず、この設問の最初の選択肢の形式になっているためです! 同様の問題は次のAMC-TXTの設問でも発生します。ここでは、「Gershwin:」が全体オプションの定義とみなされてしまいます。 * みなさんは、George Gershwin: (作曲家)を知っています。 彼が生まれたのは何年ですか? + 1898年 - 1892年 - 1902年 正しい書き方は次のようになります: * みなさんは、George Gershwin: (作曲家)を知っています。 彼が生まれたのは何年ですか? + 1898年 - 1892年 - 1902年 空行があると改行が挿入されます: Presentation: タイトル 試験の説明。 ** 難問です。 空には星が何個ありますか? - 1個 - 2個 - 何千万個も タイトル タイトルをつけるには、[====]で囲みます。 逐語的コンテント 逐語的なブロック(プログラムのコードのような)を得るには、それを[verbatim][/verbatim]で囲みます: * 次のプログラムは何を出力しますか? [verbatim] main( ) { printf("hello, world\n"); } [/verbatim] + [| hello, world |] - [| hello |] - [| world |] 太字、斜体、タイプライター、アンダーライン 太字のテキストを出力するには、それを[**]で囲みます。斜体のテキストを出力するには、それを[__]で囲みます。タイプライターのテキストを出力するには、それを[||]で囲みます。アンダーラインのテキストを出力するには、それを[//]で囲みます。 * [_フランス_]の[*首都*]はどこですか? + パリ - リール - マルセイユ 画像 次の構文を用いて文書に画像を追加することができます: ![height=2cm]images/bird.png! これにより、プロジェクトディレクトリにある画像images/bird.pngが、2cmの高さで追加されます。角括弧内で使用できるオプションはLaTeXコマンド\includegraphicsのオプションと同じです(例えばwidth=3cmkeepaspectratio)。横幅の3/4の幅で画像をセンタリングしたい場合は、次のようにします。 !{center}[width=.75\linewidth]images/map.pdf! LaTeXコードの断片 文書内に小さなLaTeXコード片を置くには、次のように二重の角括弧内にそれを入れます: [[\multiSymbole{}]]の記号のある設問の正解は1個とは限りません。0個の場合や複数の場合があります。 設問グループ 次の構文により、複数の設問をグループに入れ、シャフルしても離ればなれにならないようにできます: *( マーチン・ルーサー・キングに関する問題 * 生年はいつですか? - 1901年 + 1929年 - 1968年 * 没年はいつですか? - 1945年 - 1515年 + 1968年 - 1999年 * どこで生まれましたか? + アトランタ - メンフィス - ニューヨーク *) マーチン・ルーサー・キングに関する問題はここまで 次のように、グループにオプションを指定することができます: *([shuffle=false,columns=2] マーチン・ルーサー・キングに関する問題 以下のオプションが使用できます: shuffle=xxx グループ内の設問をシャフルするかどうかを、truefalseで示します。デフォルト値はグローバルなオプションから得ます。 columns=n グループの設問のカラム数。 group=nom グループに名前をつけます(内部的な事情)。 numquestions=n このオプションによりグループの先頭のn個の設問だけが使用されます。設問がシャフルされている場合は、グループからn個の設問をランダムに選べるようになります。 のオプションのついた設問には影響しません(必ず挿入されます)。さらに、オプションで結びついた設問どうしは一つの設問としてカウントされます。 needspace=dimen グループを開始するのに必要な高さを(4cm のように単位を付けて)指定します。現在のページの残りの垂直スペースがこれより少なければ、グループを次のページから開始します。 アラビア語 アラビア語で試験問題を作成するのは少し特殊です。もちろん次のオプションを用います。 Lang: AR さらに、以下の全体オプションを使用することができます: ArabicFont: アラビア語テキストに用いるフォントです。デフォルト値はArabEyesプロジェクト(debian/ubuntuではttf-arabeyesパッケージにあります)のフォントRasheeqです。 非アラビア文字を挿入するには、オプションをオンにして、挿入したい文字をLaTeXコマンド\textLRの引数として\textLR{xelatex command}のように指定してください。 日本語 日本語の試験問題は次のオプションを用いて生成することができます。 Lang: JA AMCは、生成されるLaTeXソースにいくらか調整を行い、日本語テキストが処理できるようにします。 この場合、AMCはAMC-TXTソースファイルから作られたLaTeXファイルを処理するのにplatexコマンドを用います。これには、最近のバージョンのplatexが必要です。いくつかの旧版linuxディストリビューションに含まれているtexlive 2009に付属のplatexは、AMCに対応していません 他のファイルのインクルード 次のようにして他のファイルをインクルードできます: IncludeFile: file-to-include.txt 異なるプロジェクトから同じファイルをインクルードするときは十分に注意してください!仮にプロジェクトAとBから/home/alexis/questions-a.txtをインクルードしているとしましょう。プロジェクトAは完了し、現在プロジェクトBが進行中です。/home/alexis/questions-a.txtにある設問の採点基準を更新し、さらに他の設問を追加します。もし、プロジェクトAの採点をこの新しい採点基準で更新する必要が生じたとき、プロジェクトAで使用した設問のほかに新たな設問があることからAMC内で不整合が生じ、Aの採点はすべておかしくなってしまいます。 LaTeXソースファイル この節では、LaTeXソースファイルから試験問題をデザインできるようにするためのLaTeXコマンドを説明します。別の形式をソースファイルにする場合は、この節はスキップしてください。選択式試験問題は、automultiplechoiceパッケージを用いてLaTeXファイルで記述できます。LaTeXファイルは、latexコマンドでコンパイルして生成されたdviファイルを表示することで、いつでも確認することができます。 選択式試験問題用のLaTeXファイルをどのように作ればいいかを簡潔に示すいくつかの例から始めます。それぞれのLaTeXファイルはテンプレートとして用意されているので、これらのテンプレートの一つを用いて選択式試験問題プロジェクトを作ることができます。 簡単な例 \documentclass[a4paper]{article} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[box,completemulti,lang=JA]{automultiplechoice} \begin{document} \onecopy{10}{ %%% 試験問題用紙ヘッダー開始: \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf テスト\\ 試験日 2008年1月1日\end{minipage} \namefield{\fbox{ \begin{minipage}{.5\linewidth} 氏名: \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }} \begin{center} 試験時間 : 10 分。 資料の持込みと電子計算機の使用は禁じます。 \multiSymbole{}の記号のある設問の正解は1個とは限りません。 0個の場合や複数の場合があります。 それ以外の設問には正解が1個だけあります。 \emph{非常に悪い解答}にはマイナス点がつくことがあります。 \end{center} \vspace{1ex} %%% ヘッダー終了 \begin{question}{総理大臣} 次のうち、日本の総理大臣になったことがある人を一人選びなさい。 \begin{choices} \correctchoice{大隈重信} \wrongchoice{湯川秀樹} \wrongchoice{聖徳太子} \wrongchoice{徳川家康} \end{choices} \end{question} \begin{questionmult}{都道府県} 次のうち、日本の都道府県はどれか、すべて選びなさい。 \begin{choices} \correctchoice{石川} \wrongchoice{山田} \correctchoice{宮崎} \end{choices} \end{questionmult} % \AMCaddpagesto{3} } \end{document} この例題の解説: inputencおよびfontencパッケージにより、試験問題の文章にUTF-8エンコーディングを用いることができます。もちろん、使用したいエンコーディングに合わせて変更することもできます。(訳注: 日本語の試験問題において、後述する最近のplatexを使用する場合は、なくてもUTF-8で動作します。) ここで使われているautomultiplechoiceパッケージのオプションは、設問が2ページにまたがるのを防ぎ()、複数選択問題にどの選択肢も該当しないことを示すもう一つの選択肢を自動追加します()。 onecopyコマンドは(異なる)試験問題を必要数(ここでは10)実体化します。LaTeXの環境を用いた代替の構文についてはを参照してください。 この行以降は、試験問題用紙のヘッダーを記述します。 namefieldコマンドは受験者が氏名を記入する欄を指定します。 questionおよびchoices環境は、単一の正解のある選択式問題を作成します。固有の識別名(ここでは総理大臣)を指定する必要があります。 questionmultおよびchoices環境は、任意個数の正解のある選択式問題を作成します。受験者は、正解と思われるすべてのボックスにマークするか、(6行目のパッケージ読込みでのオプションで自動的に追加された)最後のボックスにマークすることになります。 各試験問題のページ数を3ページに固定するには、この行をアンコメントしてください。(参照) (9行目で始まった)onecopyコマンドの終わりを表します。 設問グループとシャフルの例 この例では、設問の順序は試験問題の実体ごとに変えたいけれど、同じ分野の設問どうしはいっしょにまとめておきたい場合を考えます。この目的のためには、設問グループを二つ作成し、各グループ内で設問をランダムにシャフルします。 \documentclass[a4paper]{article} \usepackage[box,completemulti,lang=JA]{automultiplechoice} \begin{document} %%% グループの準備 \setdefaultgroupmode{withoutreplacement} \element{地理}{ \begin{question}{パリ} パリはどの大陸にありますか? \begin{choices} \correctchoice{ヨーロッパ} \wrongchoice{アフリカ} \wrongchoice{アジア} \wrongchoice{火星} \end{choices} \end{question} } \element{地理}{ \begin{question}{カメルーン} カメルーンの首都はどれですか? \begin{choices} \correctchoice{ヤウンデ} \wrongchoice{ドゥアラ} \wrongchoice{アブダビ} \end{choices} \end{question} } \element{歴史}{ \begin{question}{応仁} 応仁の乱はいつ始まりましたか? \begin{choiceshoriz} \correctchoice{1467年} \wrongchoice{1967年} \wrongchoice{1419年} \end{choiceshoriz} \end{question} } \element{歴史}{ \begin{questionmult}{Nantes} \emph{ナントの勅令}について正しいのはどれですか? \begin{choices} \correctchoice{1598年に発布された} \correctchoice{ルイ14世により破棄された} \wrongchoice{ヘンリ2世により発布された} \end{choices} \end{questionmult} } %%% copies \onecopy{10}{ %%% 試験問題用紙ヘッダー開始: \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf 歴史と地理\\ 試験日 2008年1月1日 \end{minipage} \namefield{\fbox{\begin{minipage}{.5\linewidth} 氏名: \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage}}} %%% ヘッダー終了 \begin{center} \hrule\vspace{2mm} \bf\Large 地理 \vspace{1mm}\hrule \end{center} \insertgroup{地理} \begin{center} \hrule\vspace{2mm} \bf\Large 歴史 \vspace{2mm}\hrule \end{center} \insertgroup{歴史} } \end{document} 別紙答案用紙を用いた例 この例では、マーク用のボックスをすべて別紙に集めて配置したい場合を考えます。こうすれば、不正行為はさらに難しくなり、また重要なのは、受験者一人につき用紙を1枚だけスキャンすればいいので、スキャンを手動で行う場合の手間が軽減されます。この例は設問数が少なく1枚に収まるため、このような配置はこの特定の場合ではあまり有用ではないかもしれません。このレイアウトを多数の設問向けに修正するのはおまかせします! \documentclass[a4paper]{article} \usepackage[box,completemulti,separateanswersheet,lang=JA]{automultiplechoice} \begin{document} \AMCrandomseed{1237893} \def\AMCformQuestion#1{{\sc 問 #1:}} \setdefaultgroupmode{withoutreplacement} \element{general}{ \begin{question}{総理大臣} 次のうち、日本の総理大臣になったことがある人を一人選びなさい。 \begin{choices} \correctchoice{大隈重信} \wrongchoice{湯川秀樹} \wrongchoice{聖徳太子} \wrongchoice{徳川家康} \end{choices} \end{question} } \element{general}{ \begin{questionmult}{都道府県} 次のうち、日本の都道府県はどれか、すべて選びなさい。 \begin{choices} \correctchoice{石川} \wrongchoice{山田} \correctchoice{宮崎} \end{choices} \end{questionmult} } \element{general}{ \begin{question}{EU} 欧州連合には2009年1月現在、何ヶ国が加盟していますか? \begin{choiceshoriz}[o] \wrongchoice{15} \wrongchoice{21} \wrongchoice{25} \correctchoice{27} \wrongchoice{31} \end{choiceshoriz} \end{question} } \onecopy{5}{ %%% 試験問題用紙ヘッダー開始: \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf テスト\\ 試験日 2008年1月1日 \end{minipage} \begin{center}\em 試験時間 : 10 分。 資料の持込みと電子計算機の使用は禁じます。 \multiSymbole{}の記号のある設問の正解は1個とは限りません。 0個の場合や複数の場合があります。 それ以外の設問には正解が1個だけあります。 \emph{非常に悪い解答}にはマイナス点がつくことがあります。 \end{center} \vspace{1ex} %%% ヘッダー終了 \insertgroup{general} \AMCcleardoublepage % \AMCaddpagesto{3} \AMCformBegin %%% 答案用紙ヘッダー開始 {\large\bf Answer sheet:} \hfill \namefield{\fbox{ \begin{minipage}{.5\linewidth} 氏名: \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }} \begin{center} \bf\em 解答はこの用紙にのみ行わなければなりません: 他の用紙に行った解答は無視されます。 \end{center} %%% 答案用紙ヘッダー終了 \AMCform % \AMCaddpagesto{5} } \end{document}以下の解説により、上の例がより明確になるでしょう: オプションにより、所望の配置ができるようになります。 別紙答案用紙上での設問番号の表示方法をこのように変更することができます(この行はなくてもかまいません)。 この改ページはマーク用ボックスを集めた答案専用の用紙の前に置きます。両面印刷を行う場合は、このページが次の用紙に印刷されるように\AMCcleardoublepageを使用してください。片面印刷の場合は、単純に\clearpageでもかまいません。 各試験問題の問題ページ数を3ページに固定するには、この行をアンコメントしてください。(参照)(このままではコメントアウトされているので、何も起きません) このコマンドは答案用紙部の開始を示します。答案用紙側にしか現れない設問(例えば\AMCcodeGridで生成される擬似的な設問)を適切に扱うために必要です。 受験者の氏名は答案用紙側に記入しないと意味がありません! AMCformコマンドにより、マーク用ボックスがすべて出力されます。 各試験問題のページ数(問題ページと答案ページの合計)を5ページに固定するには、この行をアンコメントしてください。(参照) 別紙答案用紙を用いる場合、アルファベット(あるいはオプションを使用する場合は数字。参照)がマーク用ボックス内に印刷されます。マーク有無を正確に検出するために、受験者にはボックスをしっかり塗りつぶすように(単純にチェックマークだけでは不十分)指示する必要があります。また、マーク判定閾値(マークのあるボックス内での黒ピクセルの割合で定義)を0.5付近に調整する必要があります。 LaTeXコマンドの説明 パッケージオプション automultiplechoiceパッケージを使用するには、\usepackage[...]{automultiplechoice}という行を用い、部分はカンマで区切ったオプションのリストを指定します。指定できるオプションは以下のとおりです: : 試験問題の言語をXXに設定します。現時点では、DE(ドイツ語)、ES(スペイン語)、FR(フランス語)、IT(イタリア語)、JA(日本語)、NL(オランダ語)、NO(ノルウェー語)、PT(ポルトガル語)のみ指定可能です。automultiplechoiceオプションで挿入する「該当なし」のような数種類の文字列も翻訳されます。 : 記入可能なPDFファイルを生成します。 AMCには作成したPDFの自動送信機能はありません。 : 各設問をボックスに入れ、改ページで分割されないようにします。 状況により、設問ごとに\AMCnoblocを用いてこのオプションをキャンセルすることもできます。{\AMCnobloc% \begin{question}{EU} 欧州連合には2009年1月現在、何ヶ国が加盟していますか? \begin{choiceshoriz}[o] \wrongchoice{15} \wrongchoice{21} \wrongchoice{25} \correctchoice{27} \wrongchoice{31} \end{choiceshoriz} \end{question} }% : 別紙答案用紙内でと同様に働きます。 : 「該当なし」の選択肢を複数選択問題の最後に自動的に付け足します。これにより、複数選択問題において、解答がされない場合とどの選択肢も該当しないという解答とが区別できるようになります。この動作は、個別の設問において、questionmult環境の内部で \AMCcompleteMultiあるいは\AMCnoCompleteMultiコマンドを用いることで、強制あるいはキャンセルすることができます。 : 各設問の選択肢を自動シャフルしないようにします。 : 試験問題の設問グループを自動シャフルしないようにします。(参照) : 試験問題用紙ではなく、模範解答を生成します。 : 各試験問題用の模範解答を生成します。 : マーク用ボックスをすべてまとめて試験問題用紙の最後に配置するようにします(通常このオプションは、受験者一人あたり用紙を1枚だけスキャンしたいときに使用します。使用例はを参照してください)。 : オプションを用いる場合に、オプションにより選択肢を(デフォルトの)アルファベットではなく数字で識別します。 : を用いる場合に、このオプションによりアルファベット(あるいは数字)を答案用紙のボックスの外側に印刷します。 : 時刻を用いて乱数生成を初期化します。 このオプションはテスト用です。実際の試験では使用しないでください! : を用いない場合に、このオプションによりアルファベット(あるいは数字)を受験者がマークするボックス内に印刷します。 : 将来の試験で組み合わせて使えるように設問のカタログを作成します。設問は番号ではなく識別名で区別されます。このレイアウトには\onecopyを使用する必要はありません。 : スキャン画像の解析を終えてから(採点時)、出題者が作成した答案用紙を正解として指定したい場合にこのオプションを用います。詳細はを参照してください。 : \insertgroup\copygroupのオプションパラメータの使用を取り消します。したがって、グループ全体が挿入およびコピーされます。(参照) : ボックスの形状(デフォルトは長方形。参照)を長円や円に変更した場合に、automultiplechoiceがではなく、を使用してボックスの形状を保存するようにします。 : (別紙答案用紙)モードにおいて、試験問題のページに四隅のマーカーを印刷したくない場合に使用してください。マーカーは別紙答案用紙にのみ印刷されます。この場合に試験問題ページ上のページ番号の書式を変更するには、\AMCsubjectPageTagコマンドを次のように再定義してください: \renewcommand\AMCsubjectPageTag{% \fbox{\texttt{\the\AMCid@etud:\thepage}}% } オプションは、AMCが試験問題ページ上のデータを処理できなくなりますので、これを読み取る必要がない場合にのみ使用してください。 : 余白、四隅のマーカー、識別ボックスが必要ない場合、つまり(練習問題などのため)文書をAMCで使用する予定がない場合に使用してください。 試験問題数の記述 試験問題用紙の内容を記述したLaTeXソースコードは\onecopyコマンドの呼出しに含まれている必要があります。これの最初の引数は生成する実体の部数、2番目が実体を生成するコードです。 \onecopy{50}{ ... } 代替の構文としてexamcopy環境も使用可能で、部数はそのオプションで指定します(デフォルトは5)。 \begin{examcopy}[50] ... \end{examcopy} examcopyを使用するにはenvironパッケージをインストールする必要があります。このパッケージは、Ubuntuディストリビューション9.10(Karmic Koala)までで用いられているTeX Live 2007ディストリビューションでは使用できません。 問題用紙番号が奇数か偶数かにより設問内容を変えたい場合には、\exemplairepairコマンドを使用してください。(訳注: 隣の問題と確実に差異を設けるために使用できます。\exemplairepair奇数番号用\else偶数番号用\fiのように使用します。examcopy環境内では直接には記述できません。) \AMCStudentNumber コマンドにより問題用紙番号が表示されます。 設問と選択肢 単一選択問題(正解が1個)では、次のようなモデルを用います: \begin{question}{識別名} ここに問題文... \begin{choices} \correctchoice{正しい選択肢} \wrongchoice{誤った選択肢} \wrongchoice{別の誤った選択肢} \end{choices} \end{question} 各設問には異なる識別名を用いなければなりません。識別名には、数字、アルファベットと、単純な文字が使えます(アンダースコア、波括弧、角括弧などLaTeXで特殊な意味をもつ文字は使えません)。設問識別名は角括弧で数字を囲んだ形式で終わらないようにしてください。この形式は受験番号記入欄用に予約されています。 各設問の選択肢の数は199個までです。 設問を入れ子にしてはいけません。採点表のエクスポートが正しく行われなくなります(参照)。 特定の設問について選択肢をシャフルせず順序を保つには、環境のオプションを使用します。3行目を次のようにしてください:\begin{choices}[o] 選択肢を2カラムに配置するには、multicolパッケージを使用できます。\usepackage{multicol}を用いてプリアンブル部(automultiplechoiceへの参照の直後など)でロードし、以下に示すようにmulticols環境の中にchoices環境を入れてください:\begin{multicols}{2} \begin{choices} \correctchoice{正しい選択肢} \wrongchoice{誤った選択肢} \wrongchoice{別の誤った選択肢} \end{choices} \end{multicols} 選択肢がもっと短い場合、環境のかわりにを用いることで、選択肢を横に並べていくことができます。 (正解が任意個あるような)複数選択問題には、環境のかわりにを使用します。 どの選択肢を選んだかが成績に無関係な設問には、次の例のように\QuestionIndicativeコマンドが使用できます。 \begin{question}{難易度}\QuestionIndicative \scoring{auto=0,v=-1,e=-2} この授業は易しいですか難しいですか?0(非常に難しい)から5(非常に易しい)の範囲で選んでください。 \begin{choiceshoriz}[o] \correctchoice{0} \correctchoice{1} \correctchoice{2} \correctchoice{3} \correctchoice{4} \correctchoice{5} \end{choiceshoriz} \end{question} Last choice \lastchoicesコマンドを使用すると、一部の選択肢をシャフルせず常に末尾に置くことができます。 \begin{question}{color} なに色ですか? \begin{choiceshoriz} \wrongchoice{赤} \wrongchoice{青} \wrongchoice{黄} \lastchoices \correctchoice{透明} \wrongchoice{わからない} \end{choiceshoriz} \end{question} \begin{questionmult}{number} いくつですか? \begin{choiceshoriz} \wrongchoice{なし} \correctchoice{1} \wrongchoice{2} \wrongchoice{3} \lastchoices \correctchoice{あまり多くない} \wrongchoice{たくさん} \end{choiceshoriz} \end{questionmult} 設問番号 次の設問の番号は\AMCnumeroコマンドで変更できます。各試験問題の実体化前に \AMCnumero{1} が呼び出されますが、どこで使用してもかまいません。 特定の設問の番号を非表示にして、番号の増加を抑制するには、次の例のように\AMCquestionNumberfalseを使用します: { \AMCquestionNumberfalse \def\AMCbeginQuestion#1#2{} \begin{question} ... \end{question} } 設問の模範解答解説 設問に対する解答に解説を加えるには、\explainコマンドを使うことができます。解説はオプションであり、模範解答と設問カタログファイルにのみ表示されます。 個別模範解答には表示されません。 単純な例を示します: \begin{question}{解説} 次の中で標高が一番高いのはどれですか? \begin{choices} \correctchoice{サガルマータ} \wrongchoice{K2} \wrongchoice{モンブラン} \wrongchoice{アコンカグア} \end{choices} \explain{サガルマータは文字どおり「世界の頂上」という意味で、世界一の標高をもつエベレスト山の地元名です。} \end{question} explainコマンドは系の環境内でのみ使用できます。これには環境があります。 デフォルトではこのコマンドは解説の前に解説: と表示します。この動作は\AMCtextコマンドで変更できます(参照)。 このデフォルト動作を特定の設問でのみ変更したい場合は、\AMCtextコマンドを次の例のように\explainの前に使用してください: \begin{question}{標高} 次の中で標高が一番高いのはどれですか? \begin{choices} \correctchoice{サガルマータ} \wrongchoice{K2} \wrongchoice{モンブラン} \wrongchoice{アコンカグア} \end{choices} \explain{サガルマータは文字どおり「世界の頂上」という意味で、世界一の標高をもつエベレスト山の地元名です。} \end{question} \begin{question}{仲間はずれ} 次の中から仲間はずれを選びなさい。 \begin{choices} \correctchoice{キリマンジャロ} \wrongchoice{ヒマラヤ} \wrongchoice{アルプス} \wrongchoice{アンデス} \end{choices} \AMCtext{explain}{\textit{\textbf{理由: }}} \explain{キリマンジャロは山ですが、残りは山脈です。} \end{question} \begin{questionmult}{ヒマラヤ} 次の中でヒマラヤにあるのはどれですか?すべて選びなさい。 \begin{choices} \correctchoice{エベレスト山} \correctchoice{K2} \wrongchoice{モンブラン} \wrongchoice{アコンカグア} \end{choices} \explain{アコンカグアはアンデス山脈にあり、モンブランはアルプスにあります。} \end{questionmult} このようにすると、最初と三つめの設問では解説の前に解説: と表示しますが、二つ目の設問の解説の前には理由: と表示されます。 選択肢を複数カラムに配置 (スペースを節約するために)選択肢を複数のカラムに置くには、LaTeXのmulticolパッケージを用いて、環境内に環境を入れることができます。 選択肢がカラムの1行におさまらない場合、その一部が次のカラムに分割されてしまうことがあり、これは受験者を混乱させるかもしれません。この現象を避けるには、\AMCBoxedAnswersコマンドを使用して、各選択肢をボックスに入れてしまうことができます。使用例を示します: \begin{question}{2カラム} 鳥とは何ですか? \begin{multicols}{2}\AMCBoxedAnswers \begin{choices} \correctchoice{翼をもった動物で、卵を産みます。あらゆる種類の色をもった鳥がいます。} \wrongchoice{木製の大きな家具で、多くの場合、家庭用の衣類を保管するのに使われます。} \wrongchoice{蒸気で動く機械で、高速に缶を密封することができます。} \end{choices} \end{multicols} \end{question} 複数カラム等のブロック内の選択肢間の垂直間隔はパラメータ化されており、寸法AMCinterBrepにより変更することができます: \AMCinterBrep=.5ex 選択肢間のスペース 通常の選択肢間の垂直間隔もパラメータ化されており、寸法AMCinterIrepにより変更することができます: \AMCinterIrep=.75ex 得点表記領域の定義 得点表記領域にtikzパッケージを用いてオプションを付加することができます(参照)。 \usepackage{tikz} <option>separateanswersheet</option>オプションを使用しない場合 以下のコマンドを\begin{document}コマンドから\onecopyコマンドまでの間に入力してください: \AMCsetScoreZone{width=1.5em,height=1.5ex,depth=.5ex,position=margins} width, height, depthの各変数は得点表記領域の寸法を表します。 positionの値は、none, question, margin, marginsのいずれかです。 <option>separateanswersheet</option>オプションを使用する場合 以下のコマンドを\begin{document}コマンドから\onecopyコマンドまでの間に入力してください: \AMCsetScoreZoneAnswerSheet{width=1.5em,height=1.5ex,depth=.5ex,position=question} width, height, depthの各変数は得点表記記入領域の寸法を表します。 positionの値は、none, question, margin, marginsのいずれかです。 オプションはAMC-TXTでは動作しません。 これらのコマンドを、試験問題の印刷に入力してはいけません。 設問のグループ 設問をグループに入れることにより、グループ内の設問をシャフルして試験問題の実体ごとに順序を変えることができます。それぞれの設問グループは通常文字によるグループ名をもたなければなりません。 設問を一つ一つグループに入れるには、次の例のようにします。 \element{マイグループ}{ \begin{question}{簡単} では、1足す1はいくつですか? \begin{choiceshoriz} \correctchoice{2} \wrongchoice{0} \wrongchoice{3} \end{choiceshoriz} \end{question} } elementを用いたグループの構築は1回しか行ってはいけません。そのため、これらは、試験問題の実体ごとに内容を繰り返すonecopyコマンドの前に置かなければなりません。 最後に、グループの内容はinsertgroupコマンドを用いて、\insertgroup{mygroup}のようにして試験問題用紙に出力されます。 グループの出力方法はsetgroupmodeコマンド(グループの作成後、onecopyの前に1度だけ実行)で設定するグループモードによって制御されます: \setgroupmode{mygroup}{XXX} XXXは以下のいずれかです: fixed このモードでは、出力のたびに、グループの要素を先頭から取ります。 cyclic そのグループで前回使用した要素の次から要素を取り、必要ならリサイクルします。 withreplacement グループを使用する前にシャフルする以外はfixedと同様です。 withoutreplacement cyclicと同様ですが、リサイクルでグループの先頭に戻るときにシャフルします。 次に作成するグループ(グループは最初のelementで作成されます)のデフォルトのグループモードは、次のコマンドで設定できます: \setdefaultgroupmode{XXX} モードをまったく指定していない場合は、fixedモードが使用されます。 グループを構築すると、shufflegroupコマンドを次のように用いてグループ内の設問をシャフルすることができます:\shufflegroup{マイグループ} しかし、shufflegroupコマンドは、グループモードを適切に使用することでいつでも置き換えられます。 AMC 1.2.2014.111201より前のバージョンでレイアウトした試験問題を再利用し、デフォルト(fixed)以外のモードを選択する場合は、\shufflegroupコマンドを忘れずに削除してください。 設問グループは、次のようなコマンドによって、より細かく操作することができます: \insertgroup[n]{マイグループ}は、(オプションのパラメータnを使用することにより)グループ内の最初のn要素だけ出力します。 \insertgroupfrom[n]{グループ名}{i}\insertgroup[n]{groupname}と同じですが、i番目(先頭は0番目)の要素から開始します。 \cleargroup{マイグループ}は、グループの中身を空にします。 \copygroup{グループA}{グループB}は、グループAの全要素をグループBの最後にコピーします。オプション引数nを用いると、最初のn要素だけコピーされます: \copygroup[n]{グループA}{グループB} これらのコマンドを用いれば、例えば次のコードにより、GAグループからランダムに4個、GBグループからランダムに5個、GOグループから全設問を取り出して、それらをシャフルするということができます(onecopyコマンドの引数内部で使用します。また、GA, GB, allのグループモードはwithoutreplacementまたはwithreplacementとします): \cleargroup{all} \copygroup[4]{GA}{all} \copygroup[5]{GB}{all} \copygroup{GO}{all} \insertgroup{all} \copygroupfrom[n]{groupA}{groupB}{i}\copygroup[n]{groupA}{groupB}と同じですが、i番目(先頭は0番目)の要素から開始します。 用紙サイズと余白 LaTeXのautomultiplechoiceパッケージはgeometryを用いて余白とページレイアウトを設定しています。その設定を上書きするには、\begin{document}の直前で\geometryコマンドを用いてください。詳細はgeometryパッケージのドキュメントを参照してください。AMCが設定する初期値は次のとおりです: \geometry{hmargin=3cm,headheight=2cm,headsep=.3cm,footskip=1cm,top=3.5cm,bottom=2.5cm} スペースを広げるために余白を縮めるときは、以下に注意してください: 四隅のマーカーは完全に印刷されていなければなりません(プリンタの印刷可能範囲により欠けてしまう可能性があります)。 四隅のマーカーはスキャン画像上で完全に見えなければなりません(マーカーが用紙の端ぎりぎりのとき、用紙がずれたり傾いたりすると、画像からはみ出してしまいます)。 \geometryコマンドの引数リストの一つのオプションとして用紙サイズを設定することもできます。可能な値は、a4papera5papera6paperb4paperb5paperansibpaperansicpaperansidpaperletterpaperexecutivepaperlegalpaperなどです。 用紙サイズが小さいときは、(+1/1/53+のような)目視用の用紙IDの位置を変更したい場合があるかもしれません。これは次のような形式で、\AMCidsPositionコマンドを用いることでできます: \AMCidsPosition{pos=p,width=w,height=h} ここで、pnonetopsideのいずれかで、whはIDを含む(見えない)ボックスの寸法です。デフォルト値は次の値です: \AMCidsPosition{pos=side,width=4cm,height=3ex} 最後に、A5用紙のための設定例を示します: \geometry{a5paper,hmargin=1.6cm,top=2.5cm} \AMCidsPosition{pos=top} pgfpagesパッケージや、他のレイアウト用パッケージをロードしないでください。 マーク用ボックスの外見スタイル \AMCboxStyleコマンド(旧称の\AMCboxDimensionsも使用可能です)により、マーク用ボックスの寸法を変えることができます。 デフォルト値: \AMCboxStyle{shape=square,size=2.5ex,down=.4ex,rule=.5pt,outsidesep=.1em,color=black} はボックスの形状です。squareとすれば四角形になり、ovalとすれば円または長円になります。ovalを使用するにはLaTeXのtikzパッケージをロードする必要があることに注意してください。 はボックスの幅です。 はボックスの高さです。 はボックスのサイズ()です。 はボックスの枠の太さです。 はボックスをどれだけ下に下げるかを制御します。 は、オプションを選択したときに、ボックスとその外に印刷する文字との間隔です(参照)。 正答を表すボックス(模範解答用紙で表示されます)を、黒の塗りつぶしではなくクロス記号で示します。 クロス記号の太さです。 はボックスを描画する色を指定します。colxcolorパッケージで認識できる表記でなければなりません。例えばredのような名前も使用できます。また次のように好みの色を定義することもできます。 \definecolor{mylightgreen}{rgb}{0.67,0.88,0.5} \AMCboxStyle{color=mylightgreen} 小さめのボックスを作るには、例えば次のようなコマンドを使ってください: \AMCboxStyle{size=1.7ex,down=.2ex} パッケージのオプションを使用しているときは、ボックスのラベルをカスタマイズすることもできます。デフォルトの動作は大文字アルファベットによるラベルですが、オプションを用いると数字になります。独自のラベルを用いるには、\AMCchoiceLabelコマンドを再定義する必要があります。このコマンドは、選択肢を数えるカウンタ名を引数にとります。例えば以下のコードにより、ボックスのラベルにアルファベットの小文字を用いるようになります: \def\AMCchoiceLabel#1{\alph{#1}} 別の例として、arabxetexパッケージを使用している場合、以下のコードが便利かもしれません: \def\AMCchoiceLabel#1{\textLR{\Alph{#1}}} ボックス内ラベルのスタイルも、次の例のように\AMCchoiceLabelFormatコマンドを再定義して変更することができます(ラベルを太字にしたいとします): \def\AMCchoiceLabelFormat#1{\textbf{#1}} ボックス外ラベルのスタイルも、次の例のように\AMCoutsideLabelFormatコマンドを再定義して変更することができます(ラベルを太字にしたいとします): \def\AMCoutsideLabelFormat#1{\textbf{#1}} 正答のボックスにマークを表示するかどうかのスイッチは\AMC@correcです。\begin{document}の後に、これをtrueに設定するコマンドを定義できます。 \makeatletter \def\AMCforcecorrect{\AMC@correctrue} \makeatother そして、特定の設問で使用します(効果がその設問のみに限定されるよう、波括弧で囲みます): {\AMCforcecorrect\begin{questionmult}{test}\QuestionIndicative ..... \end{questionmult} } AMCがこの設問の得点を計算しないよう(採点基準を0点とするか\QuestionIndicativeを用いて)設定するべきです。 設問の外見スタイル LaTeXのAMCbeginQuestionコマンドを再定義することにより、各設問の外見を変更することができます。デフォルトの定義は次のとおりです: \def\AMCbeginQuestion#1#2{\par\noindent{\bf Question #1} #2\hspace*{1em}} このコマンドに与えられる最初のパラメータは表示する設問の番号です。2番目は複数選択問題の場合に\multiSymboleを含み、それ以外の場合は空です。\multiSymboleコマンドは複数選択問題を他と区別できるようにするためのものであり、これも変更することができます。デフォルトではトランプのクラブ記号です。 \def\multiSymbole{$\clubsuit$} 指名試験問題用紙(参照)を使用する場合は、プリアンブルで次のように新しいコマンドを設定し、 \def\Iswitch{\def\AMCbeginQuestion##1##2{}\AMCquestionNumberfalse} 必要な箇所で使用します(効果の範囲を限定するため、波括弧内に記述することを忘れないでください): {\Iswitch \begin{question}{Number} 大きいものを選びなさい。 \begin{choiceshoriz}[o] \wrongchoice{200}\wrongchoice{2}\wrongchoice{20}\wrongchoice{200}\correctchoice{600} \end{choiceshoriz} \end{question} } 選択肢の外見も、のかわりにを用いれば、次の三つのLaTeXマクロを再定義して同様に変更できます: \def\AMCbeginAnswer{} \def\AMCendAnswer{} \def\AMCanswer#1#2{#1 #2} \onecopyコマンド内では、#は2重にしてください。 \def\AMCanswer##1##2{##1 ##2} \def\AMCbeginQuestion##1##2{} 以下の寸法を再定義すれば間隔を変更することもできます(これはデフォルト値です): \AMCinterIrep=0pt \AMCinterBrep=.5ex \AMCinterIquest=0pt \AMCinterBquest=3ex \AMCpostOquest=7mm \setlength{\AMChorizAnswerSep}{3em plus 4em} \setlength{\AMChorizBoxSep}{1em} これらの寸法は、標準モード用(I)とボックスモード用(B)(\AMCBoxedAnswersの使用時やパッケージオプション使用時)での設問間(quest)と選択肢間(rep)の垂直スペース、および記述式設問後のスペースです。最後の二つの長さは 環境内で使用されます。 レイアウト マージン マージンはほとんどのプリンタで正しく印刷できるように選んであります。変更するには、LaTeXのgeometryパッケージにあるgeometryコマンドを使用することができます。例えば、トップマージンを減らすには、デフォルトの3.5cmの代わりに、\begin{document}の直前で\geometry{top=3cm}とします。 ページ番号 AMCは各試験問題のページ番号を自動的に取り扱います。各試験問題の末尾や問題用紙と答案用紙の区切りなどに\AMCaddpagesto{integer}コマンドを置くと、いくつか空ページが挿入され、その次のページ番号が各試験問題で同一になります。 別紙答案用紙方式 オプション(参照)で生成される別紙答案用紙のレイアウトを変更することも可能です。 マーク用ボックスの水平間隔を変更したり、設問間の垂直間隔を変更したりするだけならば、以下の寸法を再定義するだけです: \AMCformHSpace=.3em \AMCformVSpace=1.2ex 表示設定をもっと細かく変更したい場合は、各設問と選択肢の開始に使われるコマンドを再定義することができます: \def\AMCformBeforeQuestion{\vspace{\AMCformVSpace}\par} \def\AMCformQuestion#1{{\bf 問 #1:} } \def\AMCformAnswer#1{\hspace{\AMCformHSpace} #1} これらの定義は、LaTeXファイルの\begin{document}の直後に挿入しなければなりません。 受験番号取得 受験番号の取得はLaTeXの\AMCcodeGridInt[options]{key}{n}コマンドを使用して、受験者に答案用紙上に自分の受験番号を記入してもらうことで、容易に行うことができます。このコマンドの二つの引数は、設問キー(識別名)と、受験番号に用いる桁数nです。例えば次のようなヘッダーを用いることができます: {\setlength{\parindent}{0pt}\hspace*{\fill}\AMCcodeGridInt{受験番号}{8}\hspace*{\fill} \begin{minipage}[b]{6.5cm} $\longleftarrow{}$\hspace{0pt plus 1cm} 受験番号を以下にマークし、その下に氏名を記入してください。 \vspace{3ex} \hfill\namefield{\fbox{ \begin{minipage}{.9\linewidth} 氏名: \vspace*{.5cm}\dotfill \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }}\hfill\vspace{5ex}\end{minipage}\hspace*{\fill} } オプションを用いている場合は、 \AMCcodeGridIntコマンドは\AMCformBeginコマンドの後に置く必要があります。 記入欄は、長さ \AMCcodeHspace\AMCcodeVspace を変更することにより調整することができます。それぞれ、ボックス間の水平および垂直の間隔です。デフォルト値は次のように設定されています: \AMCcodeHspace=.5em \AMCcodeVspace=.5em \AMCcodeGrid[options]{key}{description} コマンドは、より複雑な構造の受験番号を扱いたいときに使用できます。description はカンマ区切りの候補文字集合のリストです。一例として、AからEの英字1文字の後に3桁の数字で構成されるような受験番号は、\AMCcodeGrid{client}{ABCDE,0123456789,0123456789,0123456789} により扱うことができます。 \AMCcodeGrid\AMCcodeGridInt の二つのコマンドは、以下のオプション(options 引数にカンマ区切りで指定)を認識します: vertical=bool booltruefalse にすると、指定した方向を使用します(デフォルトは true です)。 v vertical=true の別名です。 h vertical=false の別名です。 top は、各カラムの上端を垂直方向に揃えます。 記述式設問 試験問題に記述式設問を加えたい場合があるかもしれません。一つの方法は、そういった設問のマーク用ボックスを採点者用に予約しておくことです。試験実施後、記入された答案を読んで、採点者が評価に該当するボックスにマークをつけます。そして答案をスキャンしてAMCで採点すれば、その点数を得点に組み入れることができます。\begin{question}{記述} \emph{インフレーション}の定義を述べよ。 \AMCOpen{lines=5}{\wrongchoice[W]{誤}\scoring{0}\wrongchoice[P]{部}\scoring{1}\correctchoice[C]{正}\scoring{2}} \end{question} この例では、採点用にボックスが3個作成されます。最初の(誤りの「誤」のラベルのついた)ボックスをマークすると、受験者は0点を獲得します。2番目の(部分点の「部」のラベルのついた)ボックスをマークすると、受験者は1点を獲得します。3番目の(正解の「正」のラベルのついた)ボックスをマークすると、受験者は2点を獲得します。 \AMCOpenの最初の引数はカンマで区切ったオプションです。使用できるオプションは次のとおりです: lineup=bool trueなら、解答欄と採点用ボックスを同じ行に並べます。false(デフォルト)なら、解答欄を枠で囲み、採点用ボックスの下に配置します。 lineuptext=text lineup=trueのとき、このテキストと解答欄を同じ行に並べます。 lines=num 解答の行数を設定します。デフォルト値は1です。 lineheight=dim 各行の高さを設定します。デフォルト値は1cmです。 dots=bool true(デフォルト)なら、各行に点線を引きます。 contentcommand=cmdname 解答領域の内容をカスタマイズするにはこのオプションを使用してください。内容を生成するための\cmdnameコマンドを定義する必要があります。 hspace=dim 採点用ボックスの間隔を設定します。 backgroundcol=color 採点領域の背景色を設定します。 foregroundcol=color 採点用ボックスの枠の色を設定します。 scan=bool falseなら、採点用ボックスをスキャンしません(これは、この設問に限り手動でマーク認識することにして、受験者がボックスに何を記入しても無視したい場合に便利です)。デフォルトはtrueです。 annotate=bool false(デフォルト)なら、答案に採点記入する際、ボックスに記号をつけません(素点のみ記入されます)。 question=text 採点者が設問を識別しやすくするための短いテキストを設定します。このテキストは、別紙答案用紙を用いる場合のみ、採点用ボックスの前に記載されます。 questionのみ指定すると、デフォルトで設問の識別名が表示されます。 answer=text 模範解答用紙の解答欄に記入される短いテキストを設定します。 onecopyコマンドの外\saveboxコマンドを使用すると、改行を含む長いテキストを表示できます。 \newsavebox{\correcbox} \savebox{\correcbox}{\parbox{5cm}{\color{red}{ここで改行\\あるいは\\ここで...}}} ボックスの中身を呼び出すには次のようにします: \AMCOpen{lines=4,lineheight=0.15cm, answer= \usebox{\correcbox}}{問題} width=dim lineup=falseのときの、解答欄を囲む枠の幅を設定します。デフォルト値は.95\linewidthです。 framerule=dim 解答欄を囲む枠の線幅を設定します。 framerulecol=color 解答欄を囲む枠の色を設定します。 boxmargin=dim 採点用ボックスの周囲の余白を設定します。 boxframerule=dim 採点用ボックスの周囲枠の線幅を設定します。 boxframerulecol=color 採点用ボックスの周囲枠の色を設定します。 これらのパラメータの(試験全体での)デフォルト値は、次のようにして\AMCopenOptsコマンドで設定できます \AMCopenOpts{boxframerule=2pt,boxframerulecol=red} さらに、\AMCotextReservedコマンドを次のように再定義すると、受験者にマークしないように指示するテキストを採点領域に書くことができます: \def\AMCotextReserved{\emph{この欄には記入しないこと}} 別紙答案用紙を用いている場合は、各設問に付け加えるテキストを次のように定義できます: \def\AMCotextGoto{\par{\bf\emph{解答は別紙答案用紙に記入してください。}}} ボックス数が多く一定幅で改行させたい場合は、次のヒント(\parbox)が使えます。 \AMCOpen{lines=6}{ \hbox{\parbox{8.5cm}{ \correctchoice[1]{1}\scoring{b=1} \correctchoice[2]{2}\scoring{b=2} \correctchoice[3]{3}\scoring{b=3} \correctchoice[4]{4}\scoring{b=4} \correctchoice[5]{5}\scoring{b=5} \correctchoice[6]{6}\scoring{b=6} \correctchoice[7]{7}\scoring{b=7} \correctchoice[8]{8}\scoring{b=8} \correctchoice[9]{9}\scoring{b=9} \correctchoice[10]{10}\scoring{b=10} \wrongchoice[F]{F}\scoring{b=0} }} } 1文字選択肢 選択肢の記述に長い文章は必要でなく1文字で十分の場合があります。別紙答案用紙を用いる場合、問題用紙と答案用紙の両方にボックスを表示するのはとても面倒です。そのような場合、choices環境のかわりに\AMCBoxOnlyコマンドを使用してください: \begin{question}{arm} 図中の\textbf{腕}を示す文字はどれですか? \AMCBoxOnly{ordered=true}{\wrongchoice[A]{}\correctchoice[B]{}% \wrongchoice[C]{}\wrongchoice[D]{}} \end{question} \AMCBoxOnlyの最初の引数はカンマで区切ったオプションです。使用できるオプションは次のとおりです: help=text 別紙答案用紙のボックスの前にリマインダーのテキストを表示します。 ordered=bool true(デフォルト値はfalse)なら、選択肢はシャフルされません。 シャフルパラメータの選択 シャフルの生成に用いる乱数生成器のシードは、以下のコマンドで変更することができます(documentの最初の方で、少なくともonecopyコマンドの外で使わなければなりません): \AMCrandomseed{1527384} 割り当てた値(1から4194303までの中から選びます)が変更されると、シャフルが変わります。もちろん、試験問題用紙を印刷した後は、この値を変更してはいけません。 値はxyファイルに(\rngstate{1}{1515}のように)記録されます。デフォルト値は1515です。 セクション分けと別紙答案用紙 別紙答案用紙上にもセクション分けが見えるようにするには、\section\subsectionの代わりに、\AMCsection\AMCsubsectionを使用してください。(番号なしセクション用に\AMCsection*\AMCsubsection*も定義されています) 試験問題内での参照 LaTeXのコマンド\label\ref\pagerefコマンドを設問や選択肢で用いると、試験問題の実体化ごとに同じ引数で呼び出され、毎回参照する番号が変わるので、問題が発生します。これを解決するには、それぞれ\AMClabel\AMCref\AMCpagerefを用いてください。これらは、\label\ref\pagerefを呼び出す前に、引数に実体の番号を付加します。 バージョン1.2.2015.102901以降では\AMCqlabelではなく\AMClabelを使ってください。旧コマンドは以前のtexファイルとの互換性のために残しています。 また、各実体化の最初に、カウンタを0にリセットする必要があります。一例として、別の用紙にまとめて配置された図への参照を行いたいとき、次のように書けます: \element{動物}{ \begin{figure}[p] \centering \includegraphics[width=.6\linewidth]{tiger} \caption{とある動物} \AMClabel{虎} \end{figure} \begin{question}{tiger} 図\AMCref{虎}(\AMCpageref{tiger}ページ)の動物は何ですか? \begin{choices} \correctchoice{トラ} \wrongchoice{キリン} \wrongchoice{ゾウ} \wrongchoice{ネコ} \end{choices} \end{question} } そして重要なのは、\onecopyコマンドの直後に \setcounter{figure}{0} を挿入して、図の番号がどの実体でも1から始まるようにすることです。これを行わないと、実体ごとに番号が増加してしまい、意図した動作ではなくなってしまいます。 cleverefパッケージの使用 このパッケージは、設問番号、設問ページ番号、ラベルのページ番号を昇順にソートします(ドキュメントhttp://mirrors.ctan.org/macros/latex/contrib/cleveref/cleveref.pdf)。 このパッケージは、automuliplechoiceパッケージのにロードしなければなりません。 このパッケージを使用するために新しいコマンド\AMCstudentlabelを導入しました。\cref{\AMCstudentlabel{led},\AMCstudentlabel{lamp},\AMCstudentlabel{moter}}led, lamp, moterは、設問を参照するために \AMClabel{led}, \AMClabel{lamp}, \AMClabel{moter} で作成されたラベルです。これらの設問の番号はコンパイル時に自動的にソートされます。 AMCが挿入するテキストのカスタマイズ 以下のカスタマイズには\AMCtextを使用してください: \AMCtext{none}{sentence}は、オプションを使用する場合の「該当なし。」(日本語でのデフォルトテキスト)を、指定したsentenceに置換します。 \AMCtext{corrected}{title}は、模範解答用紙に表示される「模範解答」(日本語でのデフォルトテキスト)を、指定したtitleに置換します。 \AMCtext{catalog}{title}は、オプションで生成される設問カタログに表示される「設問カタログ」(日本語でのデフォルトテキスト)を、指定したtitleに置換します。 \AMCtext{explain}{title}は、explainコマンドのために生成される解説の前に表示する「解説」(日本語でのデフォルトテキスト)を、指定したtitleに置換します。 このコマンドのデフォルトオプションは次のとおりです: \AMCtext{explain}{\textit{\textbf{解説: }}} 同様に、以下のようなコマンドも検討できます(2番目の引数は日本語でのデフォルトテキストです): \AMCtext{draft}{ドラフト} \AMCtext{message}{試験の実施には、auto-multiple-choiceでコンパイルされた文書を印刷してください。} \AMCsetFoot{text}はフッタに表示するテキストを設定します。例えば、ページ番号を表示するには、\AMCsetFoot{\thepage}のように使用します。 バイナリコード AMCは各試験問題とページの番号をバイナリコードを使って識別します。 1行目 : (デフォルトで)12桁 : 試験問題番号の最大値 = 2^12-1 = 4,095 2行目 : (デフォルトで)最初の6桁 : 1試験問題あたりの最大ページ数 = 2^6-1 = 63 2行目 : (デフォルトで)次の6桁 : チェックコード 試験問題やページの数を増やすには、\AMC@NCBetud, \AMC@NCBpage, \AMC@NCBcheckのデフォルト値を変更してください。 プリアンブルに以下のコマンドを記述します(これらはデフォルト値)。 \makeatletter \def\AMC@NCBetud{12} \def\AMC@NCBpage{6} \def\AMC@NCBcheck{6} \makeatother AMC用のオプション ソースファイルのヘッダ(%で始まる先頭行)に、AMCに渡すオプションをいくつか付加することができます: %%AMC:preprocess_command=commandname ソースファイルを処理するLaTeXを呼ぶ前に、commandnameコマンドを実行させます。このコマンドはプロジェクトディレクトリ内で実行され、ソースファイルのコピーの名前が引数として渡されます。これは単なるコピーなので、commandnameがファイルの内容を変更しても問題ありません。 %%AMC:latex_engine=engine ユーザ設定されたLaTeXエンジンにかかわらず、このファイルのコンパイルに用いるエンジンを指定します。 乱数を用いた数学設問 fpパッケージの使用 automultiplechoiceの前に\usepackage{fp}としてfpパッケージを使用すると、乱数データを用いた練習問題を作ることができます。fpパッケージのドキュメントはhttp://mirrors.ctan.org/macros/latex/contrib/fp/READMEにあります。以下では単純な例から見てみます。 \begin{question}{加算} \FPeval\VQa{trunc(1+random*8,0)} \FPeval\VQb{trunc(4+random*5,0)} \FPeval\VQsomme{clip(VQa+VQb)} \FPeval\VQnonA{clip(VQa+VQb-1)} \FPeval\VQnonB{clip(VQa*VQb)} \FPeval\VQnonC{clip(VQa-VQb)} \VQa{} と \VQb{} の和はいくつですか? \begin{choiceshoriz} \correctchoice{\VQsomme} \wrongchoice{\VQnonA} \wrongchoice{\VQnonB} \wrongchoice{\VQnonC} \end{choiceshoriz} \end{question} \FPevalコマンドは計算を実行するのに使います: randomは[0,1]の実数を返すので、このコマンドによりVQaには1から8までの乱数の整数値が設定されます。次の行では、VQbに4から8までの乱数の整数値が設定されます。 正しい値をVQsomme変数に入れています。 誤った値をVQnonA、VQnonB、VQnonCに入れています。 変数名のVQは他のLaTeXコマンドと干渉しないように選んであります。 乱数シードは次のように設定できます: \FPseed=integer integerは固定値でなければなりません。日付や時刻から計算してはいけません。 区間の選択 automultiplechoiceパッケージは、さらに、この種の設問の作成が容易になるように\AMCIntervalsコマンドを定義しています。以下に例を示します:\begin{question}{inf-expo-indep} \FPeval\VQa{trunc(2 + random * 4,0)} \FPeval\VQb{trunc(6 + random * 5,0)} \FPeval\VQr{VQa/(VQa+VQb)} $X$と$Y$を互いに独立な指数分布に従う乱数変数とし、それぞれのパラメータを\VQa{}と\VQb{}とします。確率 $\mathbb{P}[X<Y]$ は、次のどの区間に属しますか? \begin{multicols}{5} \begin{choices}[o] \AMCIntervals{\VQr}{0}{1}{0.1} \end{choices} \end{multicols} \end{question}(訳注: \mathbbを使用するにはamsfontsパッケージが必要です。) この行は、各区間 [0,0.1[ [0.1,0.2[ ... [0.9,1[ に対応した10個の選択肢を挿入し、正解の選択肢は VQr を含んだ区間であることを指示します。\AMCIntervalsの引数は次のとおりです: 正解の値 最初の区間の左端の値 最後の区間の右端の値 各区間の長さ 区間の書式は、ローカルな(例えば、よくあるのは [a,b[ ではなく [a,b) と書くなどの)慣行に合わせて、\AMCIntervalFormatコマンドを再定義して変更できます。オリジナルは \def\AMCIntervalFormat#1#2{[#1,\,#2[} と定義されています。 数値での解答 \AMCnumericChoicesコマンドを用いれば、次の例のように、受験者に数値での解答をマークで記入させることもできます: \begin{questionmultx}{sqrt} \FPeval\VQa{trunc(5+random*15,0)} \FPeval\VQs{VQa^0.5} $\sqrt{\VQa}$ を計算して、小数点以下2桁で丸めよ。 \AMCnumericChoices{\VQs}{digits=3,decimals=2,sign=true, borderwidth=0pt,backgroundcol=lightgray,approx=5} \end{questionmultx} questionmultx環境に注意してください。この設問は複数のボックスをマークする必要があるので複数選択問題にしなければなりませんが、複数の正解があると言うことはできません。なので複数選択問題の記号を表示しません。 \AMCnumericChoicesコマンドの2番目の引数で用いられるオプションは次のとおりです(booltruefalseで、colorxcolorで認識できる色でなければなりません): digits=num は、必要な桁数(デフォルトは3)を指定します。 decimals=num は、小数点以下の桁数(デフォルトは0)を指定します。 base=num は、数字の基数(進法)(デフォルトは10)を指定します。 significant=bool trueなら、\AMCnumericChoicesの最初の引数のうち上位桁のみ解答させます。例えば、\AMCnumericChoices{56945.23}{digits=2,significant=true}の正解は 57 となります。 exponent=num 指数をnum桁とした、科学的記数法モードにします。 nozero=bool 全桁から選択肢0を除去します。\AMCnumericChoicesを用いて小さい正の値(<10)を記入するのに便利かもしれません。 sign=bool は、符号の有無(デフォルトはtrue)を指定します。 exposign=bool 指数の符号を同様に指定します。 strict=bool trueなら、符号とすべての桁のボックスがマークされなければなりません。falseなら、マークしていない桁は0として扱います。デフォルトはfalseです。 vertical=bool trueなら、1桁分のボックスを縦に配置します。false(デフォルト)なら、1桁分のボックスを横に配置します。 expovertical=bool trueなら、仮数を指数のに配置します。falseなら、仮数を指数のに配置します。 reverse=bool trueなら、verticalモードにおいて、大きい数字を上に配置します(デフォルトはtrue)。 vhead=bool trueなら、verticalモードにおいて、各桁の上部に\AMCntextVHeadコマンドを使用して作成されるヘッダーを置きます。\AMCntextVHeadはデフォルトで次のように定義されています。 \def\AMCntextVHead#1{\emph{b#1}} このデフォルト値は、2進数の桁に番号をつけるのに便利です。 デフォルト値はfalseです。 hspace=space は、ボックス間の水平間隔(デフォルトは.5em)を設定します。 vspace=space は、ボックス間の垂直間隔(デフォルトは1ex)を設定します。 borderwidth=space は、全ボックスを囲む枠線の太さ(デフォルトは1mm)を設定します。 bordercol=color は、枠線の色(デフォルトはlightgray)を設定します。 backgroundcol=color は、背景色(デフォルトはwhite)を設定します。 Tsign=text は、符号をマークするボックスの上に表示するテキスト(デフォルトは空で、\def\AMCntextSign{text}で再定義も可能)を設定します。 Tpoint=text は、小数点のテキストを設定します。デフォルトは\raisebox{1ex}{\bf .}で、\def\AMCdecimalPoint{text}で再定義も可能です。 Texponent=text は、仮数と指数を分けるテキストを設定します。デフォルトは$\times10$\textasciicircumで、\def\AMCexponent{text}でも再定義できます。 scoring=bool trueなら、AMCにこの設問の採点基準を指定します。デフォルトはtrueです。 scoreexact=num は、正解に対する素点(デフォルトは2)を指定します。 exact=num は、正解として認めてscoreexactの得点を与える誤差(正解の整数値(小数点を除いた値)との差)(デフォルトは0)を設定します。 scoreapprox=num は、近似解に対する素点(デフォルトは1)を指定します。 approx=num は、近似解として認めてscoreapproxの得点を与える誤差(正解の整数値(小数点を取り除いた値)との差)(デフォルトは0)を設定します。 AMCはapproxとの差分をとり比較する前に、すべての数字を(単純に小数点を取り除いて)整数に変換します。一例として、decimals=2のとき、正答が3.14で答案が3.2の場合、整数の差分は 320-314=6 となるので、approxが6以上のときに限って、受験者はscoreapproxを得ます。 scorewrong=num は、誤答に対する素点(デフォルトは0)を指定します。 \AMCnumericOptsコマンドを使えば、これらのパラメータに対して、(試験全体用の)デフォルト値を別の値に設定することができます: \AMCnumericOpts{scoreexact=3,borderwidth=2pt} さらに、separateanswersheetオプションにより別紙答案用紙を使用する場合、\AMCntextGotoコマンドを再定義することにより、問題用紙側の\AMCnumericChoicesを使用する各設問の最後に付加するテキストを設定することができます: \def\AMCntextGoto{\par{\bf\emph{解答は別紙答案用紙に記入してください。}}} pgf/tikzパッケージの使用 このパッケージは、automuliplechoiceパッケージのにロードしなければなりません。 LaTeXのpgf/tikzパッケージ(http://www.ctan.org/tex-archive/graphics/pgf/baseを参照)は数学用関数などを提供するもので、\usepackage{tikz}でロードされます。 latexを走らせて試験問題をコンパイルするたびに常に同じ結果が得られるよう、最初に乱数シードを設定しなければなりません: \pgfmathsetseed{2056} 単純な計算 これは単純な計算を用いた例です \begin{question}{inverse} \pgfmathrandominteger{\x}{1}{50} $x=\x$ の逆数はいくつですか? \begin{choices} \correctchoice{\pgfmathparse{1/\x}\pgfmathresult } \wrongchoice{\pgfmathparse{1/(\x +1))}\pgfmathresult} \wrongchoice{\pgfmathparse{cos(\x)} \pgfmathresult} \wrongchoice{\pgfmathparse{\x^(-0.5)}\pgfmathresult} \end{choices} \end{question} \pgfmathparseコマンドが計算を行い、\pgfmathresultが結果を出力します。 出力の書式は、次の例(小数点以下3桁、小数点としてカンマを使用)に示すように、\pgfmathprintnumberを用いて調整することができます。 \begin{question}{inverse3} \pgfmathrandominteger{\x}{1}{50} \pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=3,use comma} $x=\pgfmathprintnumber{\x}$ の逆数はいくつですか? \begin{choices} \correctchoice{\pgfmathparse{1/\x}\pgfmathprintnumber{\pgfmathresult}} \wrongchoice{\pgfmathparse{1/(\x +1))} \pgfmathprintnumber{\pgfmathresult}} \wrongchoice{\pgfmathparse{cos(\x)} \pgfmathprintnumber{\pgfmathresult}} \wrongchoice{\pgfmathparse{\x^(-0.5)} \pgfmathprintnumber{\pgfmathresult}} \end{choices} \end{question} \AMCIntervalsコマンドと\AMCnumericChoicesコマンドを使用することもできます(および参照)。 グラフ tikzパッケージはグラフを(ランダムなものもそうでないものも)作成することもできます。 \begin{questionmult}{graph} 以下にグラフが示された三つの関数を考えます: \pgfmathrandominteger{\a}{2}{4} \begin{center} \begin{tikzpicture}[domain=0:4] \draw[very thin,color=gray] (-0.1,-4.1) grid (3.9,3.9); \draw[->] (-0.2,0) -- (4.2,0) node[right] {$x$}; \draw[->] (0,-4.2) -- (0,4.2) node[above] {$f(x)$}; \draw[color=red] plot (\x,{(1+\a/4)*\x-\a}) node[right] {$f_{1} (x)$}; \draw[color=blue] plot (\x,{\a*sin(\x r)}) node[right] {$f_{2}(x)$}; \draw[color=orange] plot (\x,{\a*cos(\x r)}) node[right] {$f_{3}(x)$}; \end{tikzpicture} \end{center} 以下のうち正しいものはどれですか? \begin{choices} \pgfmathrandominteger{\x0}{2}{4} \correctchoice{$f_{2}(\x0)$=\pgfmathparse{\a*sin(\x0 r)} \pgfmathprintnumber{\pgfmathresult}.} \correctchoice{$f_{3}(\x0)$=\pgfmathparse{\a*cos(\x0 r)} \pgfmathprintnumber{\pgfmathresult}.} \wrongchoice{関数 $f_{1}(x)$ は線形関数である。} \end{choices} \end{questionmult} きれいなグラフを作成するには、pgfplotsも有用です。 pgfmathでは精度が有限なので、算術オーバーフローを考慮に入れる必要があるかもしれません。tikzpgfplotsは、バックエンドにgnuplotを用いることで、この問題を克服しています。これには、gnuplotをシステムにインストールし、LaTeXのオプションを用いる必要があります。このためには、AMCの設定ウィンドウで、プロジェクト用のLaTeXエンジンとしてを設定してください。 LuaLaTeXの使用 lualatexコマンドを用いれば、LaTeX文書内でLUA言語を使用できます。これを用いる場合は、文書はUTF-8でエンコードされている必要があり、inputencパッケージはロードできません。これに関する情報はhttp://www.luatex.org/documentation.htmlを参照してください。 LUAのコマンドは、\directluaの引数として与えます。最も便利なLUA関数はtex.printで、結果をLaTeXに戻して出力します。 これも同じように、乱数を用いる場合は、コンパイルごとに同じ結果が得られるように常に乱数シードを固定してください: \directlua{math.randomseed (2048)} これはとても単純なソースファイルです: \documentclass[a4paper]{article} %\usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[box,completemulti,lang=JA]{automultiplechoice} \begin{document} \onecopy{10}{ %%% head \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf LuaLaTeXサンプル試験 \end{minipage} \namefield{\fbox{\begin{minipage}{.5\linewidth} Name : \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage}}} %%% \directlua{math.randomseed (2048)} \directlua{a=math.random()} \begin{question}{平方根} \directlua{tex.print(a)}の平方根はいくつですか? \begin{choices} \correctchoice{\directlua{tex.print(math.sqrt(a))}} \wrongchoice{\directlua{tex.print(math.sqrt(2*a))}} \wrongchoice{\directlua{tex.print(math.sqrt(a*1.001))}} \end{choices} \end{question} } \end{document} 出力の書式調整はluaの関数で行うか、siunitxで行うことができます。 \AMCIntervalsコマンドと\AMCnumericChoicesコマンドを使用することもできます(および参照)。 PSTricksの使用 このパッケージはautomultiplechoiceafterにロードしてください。 PSTricksを使用するには、AMCを次のように設定する必要があります: 編集 設定 メイン デフォルトLaTeXエンジン latex+dvipdf GUIの使用方法 ここでは、選択式試験問題の作成から受験者の得点の編集まで、GUIによる使用例を解説します。 プロジェクトの新規作成 GUIを開きましょう。通常は、Gnomeの一般メニュー(あるいは、KDEなどの対応するメニュー)からアプリケーション教育Auto Multiple Choiceを選んで開きます。auto-multiple-choiceコマンドを直接使うこともできます。 プロジェクト 新規 を選んで、プロジェクトを作成しましょう。ウィンドウが開いて、既存のプロジェクトがあればその一覧が表示され、これから作成するプロジェクトの名前(単純な文字で。今回のテスト用に「test」でもOKです)をプロジェクト名欄に記入することができます。そして、新規プロジェクトボタンを押します。 ここで、選択式試験問題用のAMC-TXTファイルあるいはLaTeXソースファイルを選ばなければなりません。オプションがいくつか示されます: テンプレート: これを選択すると、AMCに付属するいくつかのテンプレートの中から一つを選び、後から試験問題をカスタマイズしていくことができます。 ファイル: これを選択すると、この試験用に既に準備されたLaTeXファイルを選ぶことができます。誰か他の人が既に準備してくれたか、AMCの外で好みのエディタを使ってあなたが準備したものかもしれません。 : これを選択すると、空のLaTeXファイルが作成されます。ゼロから試験問題を作成しなければいけません。 アーカイブ: 試験問題の記述(LaTeXソースファイル、画像ファイル、パラメータファイルなど)を含んだzipあるいはtgzのアーカイブがある場合は、これを選択してください。このアーカイブは外部のソフトウェアによって作成することができます。既存のAMCプロジェクトのバックアップかもしれません。 ここでは、テンプレートを選択します。次のウィンドウがテンプレートを示します。例えば、[JA] ドキュメントグループから、単純な例を選びます。これで、ソースファイル編集ボタンによりデフォルトのエディタが起動し、編集してレイアウトや設問を変更できるようになります。 試験問題の作成 試験問題の作成は二つのステップからなります。最初にLaTeXソースファイルから、参照用の文書を作成しなければなりません。これは文書更新をクリックすることにより行われ、以下の文書が生成されます 試験問題: このファイルはそのまま印刷して受験者に配布することができます(下記参照)。 模範解答: 試験問題に間違いがないかどうかチェックすることができます。受験者に配布することもできます。 これらの文書が作成されると、対応するボタンをクリックして表示(そして必要なら印刷)することができます。 以上で、試験問題作成の最後のステップを始められます。レイアウトの解析です。これは、レイアウト検出ボタンをクリックすることにより起動されます。この解析処理は、試験問題の各ページにおいて、受験者の答案用紙で解析しなければならない全要素の正確な位置を検出します。 レイアウトが正しく検出されているか検証するには、レイアウト確認ボタンを使います。結果をさっと見て、試験問題の各ボックス上に赤いチェックボックスが正しく乗っているかを調べます。 印刷と試験実施 2種類のワークフローが検討可能です: 最も堅牢なモードでは、受験者全員分の試験問題用紙を別々の試験問題番号で作成し、全部印刷します。各ページはその番号と上部にあるボックスで完全に識別でき、同じ答案用紙を特に注意せず何度もマーク認識させてかまいません。 2番目のモードでは、少数の試験問題だけ(あるいは希望なら1部のみ)を印刷し、受験者全員分はコピーで作成することができます。設問のシャフル効果は若干低下します。誤って、同じページを何度かマーク認識させてしまうと、AMCはそれを検知できないので望まない重複を作成してしまいます。 2番目のコピーを用いたワークフローを使うには、受験者が記入するページは1枚だけでなければなりません(場合によっては別紙答案方式が役に立ちます)。でなければ、AMCでこの先を続けることはできません!AMCは、同じ受験者が記入した二つのページを結びつけることができないのです。 試験問題の作成が完了すれば、試験問題を印刷して受験者に配布することができます... 単純な場合には、(作業文書の問題ボタンをクリックしたあと)ビューアから直接印刷できます。用紙を別々に(それぞれ複数ページからなり、それらをステープルできるようなプリンタを使う場合など)印刷する場合、レイアウト検出後に試験問題印刷ボタンを使うといいでしょう。 試験問題を印刷し配布したら、それらと完全に同一にしておく必要があるので作業文書を修正してはいけません。 試験 受験者に合格してもらいましょう。 試験問題を印刷して配布したら、作業文書を変更してはいけません。配布物と同一でなければならないためです。 受験者には、黒または青のペンか、BまたはHBの鉛筆を使用させるべきです。 ボックスをチェックするか塗りつぶすかは、状況に合わせて受験者に指示することができます。 ボックスにチェック 選択したボックスにチェックをつけるよう指示する場合、チェックを修正するときに消しゴムや修正液を使用することができます。しかし、(例えば修正範囲が広すぎたりしても)ボックスそのものを書き直そうとしてはいけません。これをしようとすると、ボックスの内側に線がはみ出してしまい、チェックされていると認識されてしまうことがあります。 チェックしたボックスを訂正するために、ボックスを完全に塗りつぶさせることもできます。この方式を選択する場合、マーク判定上限閾値設定メニュー, プロジェクトタブ)を1より小さい(小さすぎない)値に設定する必要があります。黒ピクセル比率がマーク判定閾値マーク判定上限閾値の間にあれば、ボックスはチェックされていると認識されます。黒ピクセル比率がマーク判定上限閾値より大きければ、ボックスはチェックされていないと認識されます。 ボックスを塗りつぶし 文字や数字をボックス内に印字してある場合、AMCには文字のあるボックスとチックされているボックスの区別がつかないため、受験者にボックスを塗りつぶすよう指示する必要があります。 塗りつぶしを修正するには消しゴムや修正液を使用することができますが、それ以外の方法はありません。マーク判定上限閾値は1に設定しなければなりません。 答案のスキャン ここでは、受験者の答案の入力方法を説明します。これは、自動あるいは手動で行うことができます。 GUIのマーク認識タブに行きます。 自動入力 受験者が記入したマークを自動認識するには、事前に答案をデジタル化しておかなければなりません。私の場合は、その作業を(私の操作なしに束にした全ページに対して)自動でやってくれるコピー機/スキャナを使い、300dpi、OCRモード(文字認識向き、グレースケールでないモノクロモードのことで、文字認識をしてくれるわけではありません)の設定で行って、各ページが一つのTIFFファイルとしてスキャン画像が得られます。(訳注: 訳者の場合、300dpi、グレースケールを使用しています。) スキャン画像を解析するには、それらを一つあるいは複数の画像ファイル(TIFF、JPG、PNG等)として持つ必要があります。ベクターグラフィックス形式(PDF、PS、EPS)でもかまいません。この場合はスキャン画像は解析前にPNGに変換されます(訳注: 多数のページを含むファイルを変換すると、ImageMagickが /var/tmp を多量に消費するので、ファイルを適度に分けた方がいいでしょう)。 スキャン画像を使って最初に自動マーク認識を行う際は、個別答案用紙かコピー答案用紙のどちらの方法を使うかAMCに通知します(参照)。 そして、「試験実施後のマーク認識」セクションの自動ボタンで開いたダイアログから、スキャン画像ファイルをすべて選択したのち、このダイアログのOKボタンで開始します。AMCは光学マーク認識を開始して、四隅のマーカー位置を検出し、ボックスの位置を決定して、各ボックスの黒ピクセルの量を検出します。 各ページの解析結果は診断セクションのリストに表示されます: の値はページが最後に更新された日付を表します。デフォルトでは表示されません。カラムボタンを押して表示してください。 用紙ゆがみの値はマーカー(各用紙の四隅の黒い点)位置の認識の妥当性を表します。これが大きすぎるときは、認識結果をチェックする必要があります(ページリストの行の上で右クリックして、四隅マーカー確認を選ぶと、スキャンしたページと検出したボックスが表示されます)。 白黒閾値近接度の値は、ボックスの黒ピクセル比率と閾値との近さを表します。これが大きすぎる(8から最大値10まで)場合、ボックスのマーク有無判定が正しいかどうかチェックする必要があります(ページリストの行の上で右クリックしてボックス拡大を選ぶと、用紙上の全ボックスが表示され、判定結果が正しいか確認し、必要ならボックス画像のドラッグアンドドロップで修正できます)。 The value スキャン画像ファイルの値はページ画像のファイル名を表します。デフォルトでは表示されません。カラムボタンを押して表示してください。 手動入力 スキャナの使用が困難な場合や、いくつかの用紙で自動入力が期待どおりに動作しなかった場合に、手動で入力を行うことができます。このためには、試験実施後のマーク認識のセクションにある手動ボタンによりウィンドウを開きます。このウィンドウでは、目的のページのマークされたボックスを自分で(クリックして)入力することができます。 手動入力を行うと、そのページの自動入力の結果は、以前のものだけでなく以降も含めて上書きされます。 採点 GUIの採点タブでは、採点セクションでスキャン画像から受験者の得点を計算するとともに、受験者が記入したコードを読み取ります(参照)。 採点処理 得点の計算は採点ボタンで起動しますが、以下の選択をしておく必要があります: 採点基準を更新のボックスにチェックすると、採点基準は最初にLaTeXソースファイルから取り出されます。これにより、採点処理において、いろいろな採点基準を試してみることができます。また同時に、どの解答が正解でどれが誤りかも更新されます。したがって、試験実施後でも、問題作成時の正解の誤りを修正することができます。LaTeXファイルで採点基準を設定する方法はの節で説明されます(何も指示しなければデフォルトの採点基準が使用されます)。 採点ボタンをクリックすると、採点が実行されます(採点基準の更新もする場合は少し時間がかかります)。 採点基準 採点基準はLaTeXソースファイル内でscoringコマンドによって指定します。これはquestion環境かquestionmult環境で全選択肢の採点基準を設定するのに用いますが、choices環境においても、各選択肢個別の増減を指定するのに用いることができます。LaTeXのscoringコマンドの引数は、カンマで区切られたparameter=valueのような形式から成っています。使用できるパラメータは次のとおりです(各パラメータがどんな文脈で使用できるかも示しています): parameter simple multiple value Q A Q A e 解答に矛盾があるときに与える素点。単一選択問題で複数のボックスにマークされていたり、複数選択問題で「該当なし」と他のボックスに同時にマークされている場合です。 v 解答されていない(どのボックスもマークされていない)ときに与える素点。 d オフセット。eやvのパラメータにかかわらず、素点に加算される値。 p 素点の下限。この設問の素点を計算してこの下限を下回ってしまった場合、素点をこの下限値に設定します。 b 正解に与える素点。 m 誤りに与える素点。 パラメータはなく(構文: \scoring{2})、この選択肢にマークした場合に与える素点を示します。 auto このパラメータを用いると、i番目の選択肢の値がauto+i-1になります。このオプションは主に\QuestionIndicativeで用います(参照)。 mz このパラメータは満点かゼロか方式の採点基準に用いられます。選択がすべて正しければ素点はmzになり、そうでなければ0点です。 haut このパラメータにnという値を指定すると、満点がnになり、誤り一つにつき1点減点されます。 MAX この設問の満点を指定します(5点の設問には、MAX=5と書きます)。完答した場合の点数が目的の満点と異なる場合にのみ用います。 formula bmの値を考慮せず、変数を用いた式(参照)などによって、設問に与えられた素点を指定します。 set.XXX XXXという変数に特定の値を指定し、formulaで使用できるようにします。選択肢に指定すると、そのボックスがマークされたときだけ値が設定されます。特殊な場合として、INVALIDという変数にnullでない値を設定すると、解答に矛盾があることを示すことができ、e変数で指定した値が素点になります。 setglobal.XXX (設問IDの辞書順で)以降のすべての設問に対して、XXXという変数の値を指定します。 default.XXX 選択肢によってXXXという変数に値が設定されなかった場合のXXXの値を指定します。 requires.XXX 解答に矛盾があって設問の得点がeの値に設定される場合を除いて、XXX変数が定義されなければならないことを通知します。 haut=x は d=x-N, p=0 と書けます。 変数のデフォルト値は、defaultパラメータを使用して設問の採点基準として設定する必要があります。 \begin{questionmult}{03}\scoring{default.COMP=10,default.PROP=11,formula=(COMP==PROP ? 1 : 0),MAX=1} 空気中の主要な気体を一つ選び、その割合を示しなさい。 \begin{multicols}{4} \begin{choices} \wrongchoice{水蒸気} \wrongchoice{ガス} \correctchoice{窒素}\scoring{set.COMP=1} \correctchoice{酸素}\scoring{set.COMP=2} \wrongchoice{二酸化炭素} \correctchoice{20\%}\scoring{set.PROP=2} \wrongchoice{40\%} \wrongchoice{60\%} \correctchoice{80\%}\scoring{set.PROP=1} \end{choices} \end{multicols} \end{questionmult} 4点まで得られる設問にMAX = 3と設定すると、満点の受験者の得点が3点に切り捨てられます。 単一選択問題でのデフォルトの採点基準はe=0,v=0,b=1,m=0で、正解には1点、そうでなければ0点を与えます。複数選択問題でのデフォルトの採点基準はe=0,v=0,b=1,m=0,p=-100,d=0で、マーク有無の正しい(マークすべきボックスをマークして、マークすべきでないボックスをマークしなかった)選択肢ごとに1点を与えます。 set.XXXで宣言された変数の値をbやmに設定することができます。 LaTeXの\scoringコマンドは、設問定義の外側で用いて、試験全体のパラメータを変更することもできます。 SUF=xは、満点を得るのに十分な素点を定めます。例えば満点を10点とし、SUF=8と設定すると、完答での素点合計にかかわらず、素点合計が6点の受験者は得点として6/8*10=7.5点を得ます。 allowempty=xは、 x個の設問に解答する必要がないことを示します。素点を加算する際、解答のない設問x個分はキャンセルされます。 これらのパラメータを組み合わせれば、以下の例のように、様々な種類の採点基準を定義することができます: \documentclass{article} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[box,completemulti,lang=JA]{automultiplechoice} \begin{document} \element{qqs}{ \begin{question}{good choice} この設問に何点欲しいですか? \begin{choices} \correctchoice{満点: 10}\scoring{10} \wrongchoice{5点だけ欲しい}\scoring{5} \wrongchoice{2点でよい}\scoring{2} \wrongchoice{いらない}\scoring{0} \end{choices} \end{question} } \element{qqs}{ \begin{questionmult}{added} 次のボックスをマークしてポイントをゲット: \begin{choices} \correctchoice{2点}\scoring{b=2} \wrongchoice{マイナス1点!}\scoring{b=0,m=-1} \correctchoice{3点}\scoring{b=3} \correctchoice{1点} \correctchoice{0.5点}\scoring{b=0.5} \end{choices} \end{questionmult} } \element{qqs}{ \begin{questionmult}{3 or zero}\scoring{mz=3} 完答なら3点、そうでなければ0点。 \begin{choices} \wrongchoice{誤り} \wrongchoice{誤り} \correctchoice{正しい} \correctchoice{正しい} \end{choices} \end{questionmult} } \element{qqs}{ \begin{questionmult}{all for 2}\scoring{haut=2} 完答なら2点、ミス1件ごとに-1点... \begin{choices} \correctchoice{正解} \correctchoice{これも可} \correctchoice{そのとおり!} \wrongchoice{ダメ!} \wrongchoice{マークするな!} \end{choices} \end{questionmult} } \element{qqs}{ \begin{question}{attention}\scoring{b=2} ひどい誤りにはマイナス点(-2点)がつきますが、正解なら2点が得られます。 \begin{choices} \correctchoice{正しい!} \wrongchoice{正しくない} \wrongchoice{正しくない} \wrongchoice{正しくない} \wrongchoice{ひどい誤り!}\scoring{-2} \end{choices} \end{question} } \element{qqs}{ \begin{questionmult}{as you like} 必要な点数を選んでください: \begin{choices} \correctchoice{ここなら2点得られます}\scoring{b=2} \wrongchoice{マークすると3点あげます}\scoring{b=0,m=3} \correctchoice{マークすると1点得ますが、マークしないと1点失います}\scoring{m=-1} \end{choices} \end{questionmult} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \onecopy{20}{ \noindent{\bf QCM \hfill 採点基準テスト} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf Test\\ Jan. 2008\end{minipage} \namefield{\fbox{\begin{minipage}{.5\linewidth} Name: \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \shufflegroup{qqs} \insertgroup{qqs} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% } \end{document} 全体採点基準 一つの採点基準をいくつかの設問にまとめて適用したい場合、次の例のようにそれをLaTeXのコマンドに定義することができます: \def\barQmult{haut=3,p=-1} \begin{questionmult}\scoring{\barQmult} [...] \end{questionmult} もう一つの方法はLaTeXの\scoringDefaultSコマンドと\scoringDefaultMコマンドを使うことです。これは文書の先頭で(\onecopyの外側で)用い、それぞれ単一選択問題と複数選択問題のデフォルトの採点基準を指定することができます: \scoringDefaultM{haut=3,p=-1} \scoringDefautMあるいは\scoringDefautSformulaを用いる場合は、独自の採点基準を設定する設問ではformulaをキャンセルしなければなりません。 \begin{questionmult}\scoring{b=1,m=-0.5,formula=} [...] \end{questionmult} 場合によっては、用意した選択肢の個数に依存して全体採点基準が定義できれば、より便利かもしれません。これを行うには、Nという値を用いるだけでできます。例えば、満点を4点とし、ランダムにマークした場合の平均点を1点としたい場合、d=4,b=0,m=-(4-1)*2/Nという基準が使えます(すべての選択肢を誤った場合は-2点となります)。これらの式に使用できる演算は、通常の四則演算(+ - * /)、条件付演算( ? : )、括弧と、任意のperlの演算子です。 条件演算子は次のように書きます:( test ? if true: if false) 条件式には次のような演算子が使用できます: >(より大きい), >=(より大きいまたは等しい), <(より小さい), <=(より小さいまたは等しい), ==(等しい), !=(等しくない), ||(または), &&(かつ)。 他にも次の変数が使用できます: Nは選択肢の個数です。オプションによる追加分は数えません。 NBはマークすべき選択肢の個数です。 NBCは正しくマークした選択肢の個数です。 NMはマークすべきでない選択肢の個数です。 NMCは誤ってマークした選択肢の個数です。 ISは、単一選択問題なら1でそうでなければ0です。 IMULTは、複数選択問題なら1でそうでなければ0です。 採点基準を用いた得点計算 ここでは受験者の得点の計算方法を説明します。各受験者について: 各設問に順番に採点基準を適用し、設問別素点を求めます。 (採点対象外設問を除いて)すべての設問の素点を足し、その受験者の素点合計を求めます。 編集設定ウィンドウのプロジェクトタブで)正の満点がパラメータとして設定されている場合、受験者の素点合計を素点合計の満点(完答での素点合計)で割り、満点 - 下駄の差を掛けて下駄を加えることにより、受験者の得点を求めます。これにより、受験者が全問正解していれば満点を、まったく正解できなければ下駄の得点を得ることになります。満点を100点、下駄を0点に設定した場合、受験者の得点は正解のパーセンテージとみなすことができます。 得点は、 編集 設定 プロジェクト にある以下の設定を用いて丸められます: 最小単位: 整数値が必要なら1に設定します。1/4単位で丸めるときは0.25に設定するなどできます。丸めを行わないときは0に設定してください。 丸めタイプ: 切捨て, 丸め, 切上げ 採点誤りの修正 試験の後でも、採点基準を変更することができます。しかし、文書をけして更新してはいけません。テキストエディタでソースファイルを開き、変更して保存する方がよいでしょう。 しても構わないこと: 正答を誤答に変更する。 誤答を正答に変更する。 設問ごとのあるいはデフォルトの採点基準を修正する。 してはいけないこと: 単一選択問題を複数選択問題に変更する。 複数選択問題を単一選択問題に変更する。 設問や選択肢を追加する。 設問や選択肢を削除する。 設問や選択肢の順序を変更する。 設問を取り消したいときは、\scoring{b=0,m=0,e=0,v=0}という採点基準を使うか、\QuestionIndicativeを使ってください。 受験者の識別 このステージは必須ではありません。ここでは、各答案の受験者を識別します。受験者の氏名は自動的には読み込まれませんが、現実的な策が2通りあります: 受験番号を一桁ごとにボックスにマークする方式で、受験者自身に答案用紙に記入してもらうことが可能です。答案用紙にこの方式を用いるためのLaTeXのコマンドが用意されています(参照)。試験の実施後、受験番号と受験者名を対応づけるリストを用いて、自動的に答案の識別が行われます。 受験番号を記入させない場合や、自動識別が(記入ミスなどで)完全にはうまくいかなかった場合には、GUIの補助により手動で答案の受験者を識別することができます。 まず、GUIの採点タブに行きます。 受験者名簿 事前に受験者名簿を準備しておかなければなりません。この名簿は、いくつもの試験で再利用することができます。このリストは#で始まるコメント行をオプションとしてもつ、次の例のようなCSVファイルです:# STUDENTS / 1ST YEAR surname:name:id:email Bienvenüe:Alexis:001:paamc@passoire.fr Boulix:Jojo:002:jojo.boulix@rien.xx Noël:Père:003:pere.noel@pole-nord.xx ファイルの冒頭にある#で始まる行はコメントです。コメントでない最初の行は(:で区切った)カラム名を格納します。その行以降は、受験者1名につき1行で、対応する情報を記入します。必ずnameあるいはsurnameという名前のカラムに受験者名を格納しないと、下で説明する手動識別でボタン表示ができなくなります。 セパレータの:は、カンマ、セミコロン、タブのいずれかに置き換えることができます。しかし、名簿ファイルのすべての箇所で同じセパレータを使わなければなりません。どの文字をセパレータとして(この4種から)選ぶかは、コメントでない最初の行の中でどの文字が最も多く出現するかで決定されます。 CSVファイルであれば適合するはずです。 同一の採点結果を複数の宛先に送付する場合はCSVを注意して作成してください。 セミコロン、コロン、タブでフィールドを区切り、カンマでメールアドレスを区切る。 カンマでフィールドを区切り、引用符内のカンマでメールアドレスを区切る。 name,forenama,email Boulix,Jojo,"jojo@boulix.fr,parents@boulix.com" 準備した受験者名簿は受験者識別セクションのファイル登録ボタンにより選択します。そして受験者名簿の中でユニークなカラム(一般には、受験番号を格納するカラム)を一つ選ばなければなりません。最後に、自動識別の準備として、(使用した場合には)LaTeXの\AMCcodeコマンドで使用した関連するコード名を選びます。 受験者識別 自動識別 受験者識別セクションの自動ボタンを押すと、受験者が記入したコードの対応づけが開始します。その結果は、後から(半)手動識別により確認したり改善したりできます。 自動識別を行うためには、LaTeXソースファイル中にAMCcodeコマンド(参照)が少なくとも一つ必要です。また、受験者名簿には、AMCcodeが生成したボックスに記入されるはずの参照(一般には受験番号)を格納したカラムが必要です。 手動識別 受験者の氏名を読み取るためのウィンドウを開くには、受験者識別セクションの手動ボタンをクリックします。このウィンドウは、上部に受験者が記入した氏名の画像が順番に表示され、下部に名簿にある受験者ごとにボタンが並び、さらに右側には答案用紙の一覧で区別できるようになっています。各ページについて、上部に提示された氏名に対応したボタンをクリックします(デフォルトでは識別できなかった答案だけが表示されますが、「識別済も表示」ボックスにチェックすれば変更できます)。すべてのページを読み取れたら、氏名の画像のかわりに青い背景が表示されるので、最後に保存ボタンをクリックして受験者識別を終了するだけです。 採点表のエクスポート このステージでは、エクスポートボタンを使って、採点表をさまざまな形式(現在のところ、CSVとOpenOffice)で取り出せます。エクスポートすると、それに引き続いて、(可能なら)エクスポートされたファイルが適切なソフトウェアで開かれます。 ODS(OpenOffice、LibreOffice)へのエクスポート エクスポートされたファイルでは、以下の色が使われています: 灰色 は、適用外に使われます。これは例えば、欠席者の得点や、その受験者には表示されなかった設問の素点です。 黄色 は、受験者が無記入のままにした設問に使われます。 赤色 は、選択が矛盾だった設問に使われます。単一選択問題に複数のマークをした場合や、該当なしボックスそれ以外のボックスをマークした場合です。 紫色 は、採点対象外の設問に使われます。 採点記入 採点記入ボタンを押すと、答案への採点記入が始まります。各スキャン画像に、次のように記入されます(これらはデフォルトの記入書式で、設定で変更できます): 受験者が誤ってマークしたボックスには、赤い円が記入されます。 マークすべきボックスにマークされていない場合は、赤いチェック印が記入されます。 マークすべきボックスにマークされている場合は、青いチェック印が記入されます。 各設問について、取得した素点と満点が記入されます。 答案全体の得点が答案の最初のページに記入されます。 答案の最初のページに記入されるテキストは設定で変更可能です( 編集 設定 採点記入 ヘッダー 、または、 編集 設定 プロジェクト 答案の採点記入 ヘッダーテキスト )。設定されたテキストに対して、次のように置換が行われます(これらの値の意味についてはをご覧ください): %S は受験者の素点合計に置換されます。 %M 素点合計の満点に置換されます。 %s は受験者の得点に置換されます。 %m 満点に置換されます。 %(ID) は受験者名に置換されます。 %(COL) は受験者名簿内のCOLの値に置換されます。 この処理は各ページに行われ、PDF形式の採点記入済の答案用紙が得られます。受験者の答案を格納するPDFファイル名は、ファイル名テンプレートフィールドで指示したテンプレートによって決められます。テンプレートでは、「(col)」は受験者名簿内のCOLの値に置換されます(参照)。このフィールドを空にすると、試験問題番号と受験者名からなるデフォルト値が使用されます。 <option>separateanswersheet</option>(別紙答案用紙)使用時のオプション 答案ページのみ: 答案用紙に採点が記入されます。 設問ページを問題用紙からコピー: 答案用紙に採点が記入され、試験問題用紙の設問ページがPDFに含まれます。 設問ページを採点済用紙からコピー: 答案用紙に採点が記入され、スキャンした採点済用紙の設問ページがPDFに含まれます。 得点表記位置 得点表記位置をメニューで選ぶことができます 編集 設定 プロジェクト 得点表記位置 選択肢 (なし) 片方のマージン いずれかのマージン ボックス付近 ソースファイルで指定(参照) デフォルト値の設定 編集 設定 スキャン スキャン画像の変換 ベクトル形式解像度(DPI): 250 黒&白ピクセル判別閾値: 0.60 スキャン画像から赤色を除去: オフ 変換を強制: オフ 検出パラメータ 四隅マーカーの最大拡大率: 0.20 四隅マーカーの最大縮小率: 0.20 デフォルトのマーク判定閾値: 0.15 デフォルトのマーク判定上限閾値: 1 判定領域比率: 0.80 認識できた四隅マーカーが3個でも処理: オフ 標準外の使用方法 問題用紙コピー方式 で説明したように、複数の受験者に同一の答案用紙をコピーして配るのは常に可能とは限りません。しかし、別紙答案用紙方式で、設問と選択肢がシャフルされていなければ、問題用紙はコピーで用意して、答案用紙だけ全員分個別に印刷することができます。ここではその方法を詳しく説明します。 オプションを使用します(参照)。 onecopyコマンドを呼ぶ前か、examcopy環境の外側に試験問題を記述します。 onecopy/examcopyの内側で\AMCformSコマンドを用いて、マーク用のボックスを各答案用紙に出力します。 最小限の例を示します: \documentclass[a4paper]{article} \usepackage[separateanswersheet,lang=JA]{automultiplechoice} \begin{document} \noindent{\bf 試験問題} \begin{question}{和} 1足す1はいくつですか? \begin{choices} \wrongchoice{1} \correctchoice{2} \wrongchoice{3} \end{choices} \end{question} \begin{question}{k2} K2の標高はいくらですか? \begin{choices} \wrongchoice{約8000m} \correctchoice{約8600m} \wrongchoice{約9000m} \end{choices} \end{question} \AMCcleardoublepage \onecopy{5}{ \AMCformBegin {\large\bf 答案用紙:} \hfill \namefield{\fbox{ \begin{minipage}{.5\linewidth} 氏名: \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }} \AMCformS } \end{document} このLaTeXファイルから、印刷してから受験者全員分をコピーする(試験問題番号0の)試験問題用紙1部と、(各受験者に1部の)複数の答案用紙が得られます。 採点時正解提示 単一の汎用答案用紙を毎回の試験で使いたい場合を想定します。答案用紙には単純にマーク用ボックスだけを(例えば40問、各設問に5個)印刷し、問題は別のどこかに書いて受験者に提示します。ここでのポイントは、正しい選択肢はLaTeXファイルに明示されておらず、そのためAMCはそれがどれかわかりません。この解決方法は、出題者に答案用紙を渡して正しい選択肢をマークしてもらうことです。そうすれば、スキャンをしてAMCでマーク認識をしたあと、AMCにどれが出題者の記入した答案用紙かを教えるだけです。 このアイデアを実施するには、次のルールに従ってください: オプションを使用します(参照)。 選択肢には\wrongchoiceのみを使ってください(\correctchoiceは一切使わないでください)。 最小限の例を示します: \documentclass[a4paper]{article} \usepackage{multicol} \usepackage[insidebox,noshuffle,postcorrect,lang=JA]{automultiplechoice} \begin{document} \onecopy{5}{ \noindent \begin{tabular}{|l|l|l|} \hline 受験番号 & クラス & 科目\\ \hline \vspace{-0.25cm} & &\\ \AMCcode{StudentNum}{10}& \AMCcode{class}{2}& \AMCcode{subject}{3} \\ \hline \end{tabular} \hfill\namefield{\fbox{ \begin{minipage}{.25\linewidth} 氏名: \vspace*{.5cm}\dotfill \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }}\hfill \vspace{.5cm} \noindent\hrulefill \begin{multicols}{2}\columnseprule=.4pt \begin{question}{01} \begin{choicescustom} \wrongchoice{}% \wrongchoice{}% \wrongchoice{}% \wrongchoice{}% \wrongchoice{}% \end{choicescustom} \end{question} \begin{question}{02} \begin{choicescustom} \wrongchoice{}% \wrongchoice{}% \wrongchoice{}% \wrongchoice{}% \wrongchoice{}% \end{choicescustom} \end{question} % これを必要な設問数の分だけ続ける... \end{multicols} } \end{document} そしてこのLaTeXファイルをAMCで処理し、用紙を印刷し、試験実施後に(模範解答の用紙も含めて)スキャンして、AMCの自動マーク認識を開始させます。採点タブで採点基準を更新にチェックを入れて採点ボタンをクリックすると、出題者が記入した模範解答用紙の番号を入力するよう求められます。そのあとは通常どおりに続けることができます。 アルファベット(あるいは数字)をボックスの外に印刷することもできます。オプションをに置き換え、次のように設問を記述してください: \begin{question}{01} \begin{choicescustom} \wrongchoice{A }% \wrongchoice{B }% \wrongchoice{C }% \wrongchoice{D }% \wrongchoice{E }% \end{choicescustom} \end{question} この方式を(受験番号以外の)設問の選択肢のみに使用するには、\begin{document}の後に次のように記述します。\makeatletter \def\setoutsidebox{\AMC@outside@boxtrue} \makeatother そして用紙内でローカルに(波括弧の内側で)このコマンドを使用します: {\setoutsidebox\AMCform} 指名試験問題用紙 状況によっては、受験者名簿をもとに各受験者を個別に指名した試験問題用紙を準備すると有用かもしれません。これをどのように行うか見てみます。 受験者名簿はCSVリストでなければなりません。以下では、students.csvファイルが、プロジェクトディレクトリにあり、UTF8でエンコードされ、中身が次のようになっているものとします: surname,name,id Boulix,Jojo,001 Golin,André,002 Moniuszko,Stanisław,003 受験者の氏名に_(アンダースコア)を使用しないでください。コンパイル時にエラーが発生します。 LaTeXソースファイルで、次のようにcsvsimpleパッケージをロードします: \usepackage{csvsimple} LaTeXソースファイルで、試験問題を生成するコマンドを定義します。このコマンドは、各受験者ごとに一回、\csvreaderが呼び出します(ここでは、設問がgeneralというグループに入っているものとします): \newcommand{\subject}{ \onecopy{1}{ \noindent{\bf AutoMultipleChoice \hfill TEST} \vspace*{.5cm} \begin{center}\em Pre-filled test. \end{center} \hfill \namefield{\fbox{ \begin{minipage}{.5\linewidth} Name: \Large\bf \name{} \surname{} \vspace*{1mm} \end{minipage} }} \noindent\hrulefill \vspace{1ex} \shufflegroup{general} \insertgroup{general} \AMCassociation{\id} } } \csvreader[head to column names]{students.csv}{}{\subject} %\csvreader[head to column names,separator=semicolon]{liste.csv}{}{\subject} \csvreaderオプションは、\subject内で使えるように(CSVのヘッダーから)\surname\name\idコマンドを定義します。\AMCassociationの呼出しにより、AMCは現在の試験問題用紙を\idというidをもつ受験者のものとして識別します。 受験者ごとにメールアドレスが一つだけあるCSVファイルの場合にこのコマンドを使用してください。 受験者ごとにメールアドレスが複数あるCSVファイルの場合にこのコマンドを使用してください。 印刷、スキャン、マーク認識、採点が終わった後、答案用紙の受験者を識別する際、「答案内の受験者識別用コード名」フィールドに「印刷時識別済」、「名簿内の受験者識別用カラム名」フィールドに「id」を選択してください。 コマンドマニュアル GUIのみを使用する場合は(たいていはそうですが)、この節はスキップしてかまいません。しかし、GUIで実行される各動作は、以下に解説する構文に従って様々なコマンドを用いることによっても実行することができます。 auto-multiple-choice 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ auto-multiple-choice 選択式試験問題の自動処理 auto-multiple-choice action arguments auto-multiple-choice project 解説 auto-multiple-choiceコマンドは、引数をAMC-action.plコマンドに渡して起動します。 動作を指定しない2番目の形式では、GUIであるAMC-gui.plが(プロジェクト名が指定されていればそれとともに)呼び出されます。 関連項目 AMCの各動作: AMC-prepare 1 , AMC-imprime 1 , AMC-analyse 1 , AMC-note 1 , AMC-association-auto 1 , AMC-export 1 , AMC-annotate 1 , AMC-regroupe 1 AMC-prepare 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-prepare LaTeXソースファイルから作業文書を作成する auto-multiple-choice prepare --mode s --prefix project-dir mcq-source-file auto-multiple-choice prepare --mode b --data project-data-dir mcq-source-file 解説 AMC-prepare.plコマンドは、選択式試験問題を記述したソースファイルから作業文書を生成します。抽出される情報は引数の値によります。どちらのモードでもソースファイル名は引数として指定しなければなりません。 を用いると、AMC-prepare.plは、試験問題ファイル(印刷して受験者に配布する試験問題用紙)、模範解答ファイル(正解をマークした答案用紙1部)、位置情報ファイル(ページ上のボックスの位置に関する情報を含んだファイル)を作成します。以下の引数が使用可能です: 作成する試験問題ファイル名を設定します。 作成する模範解答ファイル名を設定します。 作成する位置情報ファイル名を設定します。 上の三つのオプションで使用されていないものがあるときは、このディレクトリが必要になります。そしてそれらのデフォルト値はdirectory/sujet.pdfdirectory/corrige.pdfdirectory/calage.xyとなります。 を用いると、AMC-prepare.plは、ソースファイルから採点基準を抽出します。このモードでは、オプション(下記参照)を使用しなければなりません。 以下のオプション引数はどのモードでも使用できます: 使用するLaTeXエンジン(コマンド)を指定します。latex-engineは例えばpdflatexxelatexとなります。 選択式試験問題のソースファイルをLaTeXファイルに変換するフィルター名を設定します。組込みのフィルターはlatex(何も変換しない)とplain(AMC-TXTソース)です。 指定したフィルターを用いてソースファイルから作成するLaTeXファイル名を指定します。省略した場合、mcq-source-file_filtered.texを付け足して得られたファイル名が使用されます。 生成する試験問題の部数を設定し、LaTeXソースファイル(\onecopyの最初の引数)で指定した部数を上書きします。 デバッグ情報を記録するファイルを指定します。 日付(1970年1月1日以降の秒数)を指定して、PDFを何度生成しても同一結果になるようにします。 SQLiteデータファイルを格納するディレクトリを設定します。 AMC-meptex 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-meptex 作業文書からレイアウト情報を取得しレイアウトデータベースに格納する auto-multiple-choice meptex --src calage.xy --data directory 解説 AMC-meptex.plコマンドは作業文書calage.xyからレイアウト情報(全ページのボックス、マーカー、氏名領域の正確な位置)を取り出し、データディレクトリdirectoryのレイアウトデータベース(SQLiteファイル)に格納します。 AMC-imprime 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-imprime AMC試験問題用紙を受験者に配布できるように印刷する auto-multiple-choice imprime --sujet subject.pdf --fich-nums numbers-file.txt --data data-dir --methode method where-to-print-arguments Description AMC-imprime.plコマンドは選択した試験問題用紙を印刷します。 印刷内容の指定 以下の引数により、印刷対象を指定します: AMC-prepare 1 で作成された)試験問題ファイルを設定します。 印刷する試験問題番号が(各行に一つ)書かれたファイルを指定します。この引数が指定されなければ、すべての試験問題が印刷されます。 データファイルがあるディレクトリを指定します( AMC-meptex 1 などを参照してください)。データディレクトリのレイアウトデータベースは一つの試験問題が何ページ目から何ページ目まであるかを知るのに使われます。 別紙答案用紙を別に印刷します。 別紙答案用紙が最初に来るようにソートします。 印刷方法の指定 いくつかの印刷方法が定義されています: を用いると、 AMC-imprime.plはCUPSプリンタに印刷します。試験問題ごとに自動ステープルなどができるように1部につきプリントジョブを1件送ります。この方法では、以下のオプションを使用してください: 印刷するCUPSプリンタ名を設定します。 CUPSオプションをの形式で指定します。 を用いると、AMC-imprime.plは試験問題用紙をファイルに(1部につき1個)出力します。 出力するファイル名を設定します。%eというシーケンスがあれば4桁の試験問題番号に置換されます。filename%eを含んでいない場合、-%e.pdfという文字列が付け足されます。 を用いると、AMC-imprime.plは試験問題1部ごとに指定したコマンドを使用します。 印刷に使用するコマンドを指定します。commandの文字列は(引用符を使用していても)空白文字の場所で区切られます。%fというシーケンスは(印刷する試験問題を含んだ)PDFファイル名に置換され、%eは試験問題番号に置換されます。 その他のオプション 他に次のオプションが使用可能です: --extract-with command 試験問題PDFからページを抽出するためのコマンドを指定します。現在、pdftkgsまたはqpdfが指定可能です。デフォルトはpdftkですが、インストールされていなければqpdfgsの順に使用されます。 AMC-getimages 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-getimages 自動マーク認識用に AMC-analyse 1 に送るためのスキャン画像を用意する。 auto-multiple-choice getimages --copy-to project-scans-dir --vector-density density --list list-file scan-files 解説 AMC-getimages.plコマンドは AMC-analyse 1 に送る前にスキャン画像を用意します: 複数画像からなるファイルはページごとのファイルに分割されます。 ベクター画像(PDF、EPSなど)はビットマップ画像に変換されます。 入力画像は、AMC-getimages.plへの引数としても、スキャンファイルのパスをすべて含むファイル名としても指定することができます。 スキャンファイルのパスを(1行に一つ)含むファイルの名前を指定します。処理後にこのファイル内容は消去され、同じパスをAMC-analyse.plオプションに渡せるように、スキャンファイルのパスが書き込まれます。 スキャンファイルを指定したディレクトリにすべてコピーします。 ベクター画像をビットマップ画像に変換する際の解像度を設定します。デフォルトは300です。 AMC-analyse 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-analyse AMC選択式試験問題のスキャン画像から自動マーク認識する auto-multiple-choice analyse --projet project-dir --seuil-coche threshold --tol-marque tol --list-fichiers files-list.txt scan-files 解説 AMC-analyse.plコマンドは、AMC選択式試験問題の答案用紙のスキャン画像から自動マーク認識を実行します。AMC-analyse.plを呼び出す前に、 AMC-prepare 1 を呼び出して、作業文書()とMEPファイル()を作成し、 AMC-meptex 1 を用いてレイアウトを処理しておかなければなりません。 データファイルがあるディレクトリを指定します( AMC-meptex 1 などを参照してください)。デフォルトはproject-dir/dataです。 マーク認識に使用する画像を作成するディレクトリを指定します(ボックスの拡大画像はzoomsサブディレクトリに、氏名記入欄の画像はname-*.jpgファイルに、レイアウト結果の画像はpage-*.jpgファイルに格納されます)。 が使用されていない場合、このオプションを使用すると、project-cr-dirproject-dir/crに設定されます。 処理するスキャンファイルの名前の指定方法には2通りあります: ファイル名を引数により指定する。 ファイル名をプレーンファイルに(各行に1ファイル名の形式で)列挙して、でこのファイルを指定する。 マーク認識用のパラメータは以下のオプションを用いて設定できます: 各ボックスのマーク有無を判定する領域の比率を設定します。デフォルト値は0.8です。 このパラメータはグレースケールのスキャン画像を白黒に変換する際に使用されます。値を大きくするとより多くのピクセルが黒とみなされ、値を小さくするとより多くのピクセルが白とみなされます。閾値は0と1の間でなければなりません。デフォルト値は0.6です。 このオプションを用いると、カラースキャン画像の赤チャネルのみ使用されます。これにより、スキャン画像上の赤色で記入されたものはすべて無視されます。ボックスが赤で印刷されている場合に有用です。 スキャン画像の四隅にあるマーカーを検出する際の許容度を定義します。マーカーの検出には、目標サイズtarget(印刷とスキャンが完璧であった場合のマーカーの正確なサイズ)に近いサイズの、黒い連結領域を探します。tolが単純な実数の場合、サイズが近いと判断されるのは(1-tol)*targetから(1+tol)*targetまでの範囲です。toltinf,tsupの形式(tinftsupは実数)の場合は(1-tinf)*targetから(1+tsup)*targetまでの範囲です。標準値は0.2です。 このオプションは、試験問題をコピーした(つまり複数の受験者が同じ試験問題に解答しうる)場合に使用します。この場合、同じ試験問題番号をもつ答案用紙が区別できるように、答案用紙に複製番号が割り当てられます。 このオプションはと共に使用されます。スキャンごとの複製番号がcopy_idから開始し、引数で指定したスキャン画像と同じ順序で割り当てられます。 --try-three | --no-try-three 四隅のマーカーのうち三つしか認識できない場合も処理をするかどうかを示します。 デバッグ情報を記録するファイルを指定します。 AMC-note 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-note AMC選択式試験問題の採点をする auto-multiple-choice note --data project-data-dir --seuil threshold --grain granularity --arrondi rounding --notemin min --notemax max --no-plafond --plafond 解説 AMC-note.plコマンドは AMC-prepare 1 によってLaTeXソースファイルから取り出した採点基準と AMC-analyse 1 によって作成されたマーク認識データとから、各答案の得点を計算します。 データファイルがあるディレクトリを指定します( AMC-meptex 1 などを参照してください)。 ボックスがマークされているかどうかを判定するための黒ピクセル比率の閾値を指定します。ボックスがマークされているかどうか判定する際、AMC-note.plは黒ピクセル比率(全ピクセル数に対する黒ピクセル数の割合)をthreshold(閾値)と比較します。黒ピクセル比率がthresholdよりも大きい場合、このボックスはマークされていると宣言されます。標準的な値は通常レイアウトで0.15、別紙答案用紙レイアウト(ボックス内に文字が記入されており、受験者にはボックスを完全に塗りつぶすよう指示する)で0.5程度です。 これ以上黒ピクセル比率が上がるとボックスがマークされていないと判定する上限の閾値を指定します。この値を(例えば)0.6に設定すると、受験者はボックスを完全に塗りつぶすことで、マークをキャンセルすることができます。つまり、黒ピクセル比率がthresholdupper_thresholdの間にあればボックスはマークされているとみなされ、(完全に塗りつぶして)upper_thresholdを越えればマークされていないとみなされます。デフォルト値は1.0で、したがってこの機能は無効になっています。 得点がgranularityの倍数になるように丸めます。roundingiなら、( floor 3 がするように)切り捨てます。roundingnなら、近い方に丸めます。roundingsなら、( ceil 3 がするように)切り上げます。例えば、というオプションを指定したとき、6.285という得点は6.5に丸められます。 このオプションを用いると、min未満の得点はすべてminに置換されます。 全問正解の答案に与える満点を指定します。これを用いなければ、得点は素点のままです。 このオプションを用いると、maxを越える得点はすべてmaxに置換されます。 デバッグ情報を記録するファイルを指定します。 受験番号と試験問題番号で指定された答案を用いて採点時正解提示を指示します。採点時正解提示モードでは、LaTeXソースファイルからではなく、この答案で指定された解答から正解を取り出します。 AMC-association-auto 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-association-auto AMC選択式試験問題の受験者と答案を自動識別する auto-multiple-choice association-auto --data project-data-dir --notes-id id --liste students-list.csv --encodage-liste list-encoding --liste-key key 解説 AMC-association-auto.plコマンドは、答案用紙の受験者を識別します(受験者が受験番号を正しく記入し、マーク認識に誤りがない場合)。詳細はユーザードキュメントのを参照してください。 データファイルがあるディレクトリを指定します( AMC-meptex 1 などを参照してください)。 受験番号マーク欄の(LaTeXソースファイルで\AMCcodeに指定された)識別名を指定します。 使用された場合、オプションを無視し、印刷時識別データ(LaTeXソースファイルの\AMCassociationコマンド)から自動識別を行います。 受験者名簿ファイル名を指定します。 受験者名簿ファイルのエンコーディング(デフォルトはutf-8)を指定します。 受験者名簿内の受験番号のカラム名を指定します。 デバッグ情報を記録するファイルを指定します。 AMC-association 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-association AMC選択式試験問題の受験者と答案用紙を手動識別する。 auto-multiple-choice association --data project-data-dir --list auto-multiple-choice association --data project-data-dir --set --student student-sheet-number --copy copy-number --id student-id 解説 AMC-association.plコマンドは、答案用紙の受験者識別データを扱います。 データファイルがあるディレクトリを指定します( AMC-prepare 1 などを参照してください)。 オプションは、受験者識別データをすべて出力します。 オプションは、手動識別を更新します。 AMC-export 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-export AMC選択式試験問題の採点結果をエクスポートする auto-multiple-choice export --data project-data-dir --module module --fich-noms students-list.csv --noms-encodage list-encoding --o output-file 解説 AMC-export.plコマンドは、AMC選択式試験から採点結果をエクスポートします。 データファイルがあるディレクトリを指定します( AMC-meptex 1 などを参照してください)。 エクスポート用のモジュールを選択します。AMCの標準ディストリビューションに付属しているモジュールは下記を参照してください。 受験者名簿ファイル名を設定します。 students-list.csvのエンコーディング(デフォルトはutf-8)を選択します。 出力ファイル名を指定します。 選択したモジュールのオプションをkey=valueの形式で指定します(各モジュールで使用できるオプションは下記を参照してください)。複数のオプションを指定する場合は、を複数回使用してください。 受験者名をsort-typeに従って並べ替えます。sort-typelなら、並べ替えに受験者名簿の行番号を用います。sort-typemなら、並べ替えに得点(得点が等しければ受験者名)を用います。sort-typeiなら、並べ替えに受験番号を用います。sort-typenなら、並べ替えに受験者名(等しければ名簿の行番号)を用います。 all0か空なら、スキャンした答案のある受験者のみが出力されます。all1なら、受験者名簿にある全受験者が出力されます。 モジュール OpenDocument とすると、OpenDocument(OpenOfficeやLibreOfficeなどで用いられる形式)が生成されます。以下のオプションが認識されます: nom シートの先頭に表示される試験の名称を指定します。 code タブ名に使用される試験の略称を指定します。 columns 受験者ごとに追加するカラムのリストを設定します。デフォルト値はstudent.key,student.nameです。 stats trueなら、設問の統計表が追加されます。 statsindic trueなら、採点対象外設問の統計表が追加されます。 CSV とすると、CSVファイルが生成されます。以下のオプションが認識されます: columns 受験者ごとに追加するカラムのリストを設定します。デフォルト値はstudent.copy,student.key,student.nameです。 decimal 小数点(デフォルトはピリオド)を設定します。 encodage 出力に用いるエンコーディング(デフォルトはutf-8)を設定します。 separateur カラム間の区切文字(デフォルトはカンマ)を設定します。 entoure 文字列を囲む文字(デフォルトは二重引用符)を指定します。 ticked 空でなければ、CHECKED:で始まる名前のカラムが追加され、各答案でどのボックスがマークされているか表示されます。これは、採点をもっと柔軟に行いたい場合に、外部プログラムがマークされたボックスの情報を得るのに使うことができます。ボックス3と4がマークされている場合、01という値を指定すれば0;0;1;1;0となり、ABという値を指定すればCDとなります。 List とすると、受験者ごとの得点の一覧がPDFファイルで生成されます。以下のオプションが認識されます: pagesize ページサイズです。デフォルト値はa4です。 nom ページの先頭に表示する試験の名称を指定します。 ncols カラム数です。デフォルト値は2です。 decimal 小数点(デフォルトはピリオド)を設定します。 AMC-annotate 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-annotate AMC選択式試験問題の答案に採点結果を記入する auto-multiple-choice annotate --project project-dir --names-file students.csv annotation options 解説 AMC-annotate.plコマンドは、答案に各設問の採点と全体の採点を記入し、PDFファイル(受験者別の複数ファイルか全体の単一ファイル)を出力します。 全般オプション プロジェクト名かディレクトリを設定します。 データファイルがあるディレクトリ(デフォルト値はproject-dir/data)を指定します。 プロジェクトのpdfディレクトリ(デフォルト値はproject-dir/cr/corrections/pdf)を設定します。 受験者名簿ファイル名を設定します。 students-list.csvのエンコーディング(デフォルトはutf-8)を選択します。 受験者識別に使用するカラム(受験者名簿ファイル内のカラム名)を設定します。識別時に実際に使用した値がデータベースに格納され、これがデフォルト値となるので、このオプションは使用すべきでありません。 試験問題ファイル(デフォルト値はproject-dir/DOC-sujet.pdf)のパスを設定します。 マークするボックスのないページ(例えば答案用紙より前にある問題のみのページなど)を問題用紙からもってくる場合にこのオプションを使用します。modeが1のときは、問題用紙からページを取得し、受験者の答案と同じようにマークを記入し、同じ採点記号を答案用紙に記入します。modeが2のときは、採点済の答案用紙からページを取得し、(重複するので)採点記号は記入しません。 PDFの模範解答のパス(デフォルトはproject-dir/DOC-corrected.pdf。ファイルが存在しなければ、, , , の各オプションの値を用いて作成されます)を設定します。 黒ピクセル比率の閾値を設定します。採点時に実際に使用した値がデータベースに格納され、これがデフォルト値となるので、このオプションは使用すべきでありません。 黒ピクセル比率の上限の閾値を設定します。採点時に実際に使用した値がデータベースに格納され、これがデフォルト値となるので、このオプションは使用すべきでありません。 受験者名簿ファイルから受験者名を構成するためのモデルを設定します。デフォルト値は(nom|surname) (prenom|name)で、この場合、氏名はnomカラム(なければsurnameカラム)の内容の後にprenomカラム(なければnameカラム)の内容を続けたものになり、したがって、フランス語か英語の単純なCSVファイルでたいていうまくいきます。 採点を記入する答案用紙のID一覧ファイル(個別答案用紙モードなら受験番号、コピー答案用紙モードならstudent:copyを各行に一つ)を指定します。ファイルが指定されない場合は、すべての答案用紙に採点が記入されます。 デバッグ情報を記録するファイルを指定します。 PDF出力オプション 採点済答案を単一のPDFファイルにまとめるにはこのオプションを使用してください。デフォルトの動作は受験者一人につき一つのPDFファイルを作成します。 以下のソートキーを設定します(を使用する場合のみ有効): l 受験者名簿ファイル順。 m 成績順。 i 試験問題ID順。 n 氏名順。 採点記入済PDF用のファイル名モデルを設定します。このモデルでは特定のシーケンスが以下のように置換されます: (N) は受験者名(参照)に置換されます。 (ID) は受験番号に置換されます。 (COL) は受験者名簿内のCOLカラムの値に置換されます。 デフォルト値は(N)-(ID).pdfです。 ソースファイルオプション 以下のオプションはで指定したファイルが存在せず、そのファイルを再構築するときに使用されます。 AMC-prepare 1 を参照してください。 スキャン画像埋込み用オプション スキャン画像が存在する場合、採点記入済PDFファイルに埋め込まれます。以下のオプションは埋め込むスキャン画像の品質を制御し、ファイルサイズを縮小できるようにします。 スキャン画像の最大サイズをピクセル単位で(widthxheightの形式で)設定します。デフォルト値は空で、この場合は上限はありません。指定したサイズより大きいスキャン画像は採点記入済ファイルに埋め込む前に縮小されます。 埋込み形式をjpegpngで設定します。 JPEGで埋め込む場合のJPEG品質を(1から100で)設定します。 採点記入オプション 以下のオプションはどのような採点が記入されるかを制御します。 フォントサイズをポイント値で設定します。 文字の色を設定します。デフォルト値はredです。 各受験者の答案用紙の先頭ページに表示するテキストヘッダを設定します。このテキストは複数行のヘッダ用に改行文字を含むことができます。以下の特定のシーケンスが置換されます: %S は受験者の素点合計に置換されます。 %M は素点合計の満点に置換されます。 %s は受験者の得点に置換されます。 %m は満点に置換されます。 %(ID) は受験者名に置換されます。 %(COL) は受験者名簿内のCOLカラムの値に置換されます。 各設問の採点記入位置を設定します: marge 左マージンに記入 marges (左右いずれかの)近い方のマージンに記入 case マーク用ボックスの近くに記入 none 採点を記入しない --verdict-question perl-expression 各設問の隣に印刷されるテキストをperlで評価される式として設定します(単純なテキストが必要なら"で囲んでください)。いくつかのシーケンスは評価の前に置換されます: %S はこの設問の素点に置換されます。 %M はこの設問の満点に置換されます。 %s %Sと同じですが、nc桁(オプション参照)に丸められます。 %m %Mと同じですが、nc桁(オプション参照)に丸められます。 このオプションのデフォルト値は"%s/%m"です。条件式を(( TEST ? IF-YES : IF-NO )というperlの構文を用いて)書くこともできます。満点なら合格、そうでなければ不合格と書くには、次のようにします。 --verdict-question "(%S==%M ? \"合格\" : \"不合格\")" --verdict-question-cancelled perl-expression と同じですが、キャンセルした設問(allowempty採点基準を参照)に適用されます。デフォルト値は"X"です。 採点対象外の設問にも採点を記入するにはこのオプションを使用します。(これらの設問の素点は全体の素点を計算する際にはカウントされません。正誤の状態はこれらの設問にたいてい無関係なので、対応するボックスへの正誤マークは記入しません) 採点時に記入する記号の線幅(ピクセル数)を設定します。デフォルト値は2です。 はボックスにどのように記号をつけるかを定義します。symbols-definitionは、H-A:shape:colorの形式をカンマで区切ったリストで、H01でボックスがマークすべきでないかすべきかを表し、A01でボックスがマークされていないかされているかを表し、shapenonecirclemarkboxのどれか一つであり、colorは色(名前または#RGBで、詳細はImageMagickかGraphicsMagickのドキュメントを参照)を表します。デフォルト値は0-0:none,0-1:circle:red,1-0:mark:red,1-1:mark:blueです。 長さ 以下の長さには単位を指定することができます(in, ft, pt, cm, mm)。 を使用する場合に、記入位置のボックスからの距離を設定します。デフォルトは1cmです。 マージンのサイズを設定します。デフォルトは5mmです。 ヘッダーのマージンサイズを設定します。デフォルトは3mmです。 AMC-mailing 1 Auto Multiple Choice @/PACKAGE_V_DEB/@ AMC-mailing 採点記入済答案のPDFを受験者にメールする auto-multiple-choice mailing --xmlargs args.xml --project project-dir --students-list students-list.csv --list-encoding encoding --email-column col --sender sender-email --subject subject --text email-body --text-content-type content-type --debug file.log transport arguments 解説 AMC-mailing.plコマンドは、採点記入済答案のPDFを受験者にメールで送付します。メールアドレスは受験者名簿ファイルから取り出されます。 プロジェクトディレクトリを指定します。 受験者名簿ファイル名を設定します。 students-list.csvのエンコーディング(デフォルトはutf-8)を選択します。 受験者名簿ファイル内で、受験者のメールアドレスに該当するカラム名を設定します。 差出人アドレスを設定します。 Ccアドレスを設定します。 Bccアドレスを設定します。 送付するメールの件名を設定します。 送付するメールの本文を設定します。 メール本文のcontent-typeを設定します。content-typeは、text/plaintext/htmlです。 送付する各メールにファイルfilenameを添付します。このオプションを複数回使用すれば、複数のファイルを添付できます。 転送方法を設定します。有効なtransportは、sendmailSMTPのいずれかです。 デバッグ情報を記録するファイルを指定します。 各送信間にtime秒の遅延を設定します。 転送方法別の引数 transport引数の値により、以下の引数が追加されます: sendmail転送 sendmailコマンドのパス(デフォルトは/usr/sbin/sendmail)を設定します。 SMTP転送 SMTPホスト名(デフォルトはsmtp)を設定します。 使用するポート(デフォルト値は25)を設定します。 SMTP接続のセキュリティモードを設定します。modeオプションはsslstarttls0(暗号なし)のいずれかです。 SMTP認証のためのユーザ名を設定します。 SMTP認証のためのパスワードを(1行目に)含んだファイルのパスを指定します。 XMLファイルによる引数 エンコーディング問題を避けるため、XMLファイルに引数を置いて、をコマンドの最初の引数とすることができます。そのようなファイルの例を示します: <?xml version="1.0" encoding="UTF-8"?> <arguments> <arg>--sender</arg><arg>Bienvenüe &lt;paamc@passoire.fr&gt;</arg> <arg>--text</arg><arg>Voilà votre copie corrigée</arg> <arg>--subject</arg><arg>QCM</arg> </arguments> その他 AMCでGMAILを使用するための設定 Gmailアカウントにログインし、「安全性の低いアプリの許可」を有効にします。(訳注: Googleの「アカウント情報」から「ログインとセキュリティ」を開くと、最下部にあります。) Linuxユーザ(Ubuntu、Xubuntu、Lubuntu等) 端末で以下を入力します: sudo apt-get install msmtp sudo gedit /etc/msmtprc msmtprcファイルに以下の内容を追加して保存します。 account gmail host smtp.gmail.com tls on tls_certcheck off port 587 auth login from your_user_name@gmail.com user your_user_name@gmail.com password your_password AMCを設定します: 編集 設定 メール メール配信方法 sendmailを選択し、sendmailのパスを/usr/bin/msmtpに設定します。 Macintoshユーザ 端末で以下を入力します: sudo port install msmtp sudo pico ~/.msmtprc msmtprcファイルに以下の内容を追加して保存します。 account gmail host smtp.gmail.com tls on tls_certcheck off port 587 auth login from your_user_name@gmail.com user your_user_name@gmail.com password your_password AMCを設定します: 編集 設定 メール メール配信方法 sendmailを選択し、sendmailのパスを/opt/local/bin/msmtpに設定します。
    auto-multiple-choice-1.4.0/doc/check_xml000077500000000000000000000005661341176102400202030ustar00rootroot00000000000000#! /bin/bash RESULT_FILE=/tmp/amc-check-xml.log FAILS=0 echo "Checks validity of XML files from documentation..." for x in *.in.xml do if xmllint --valid --noout $x >$RESULT_FILE 2>&1 then echo -e "[ \e[0;32mOK\e[0m ] $x" else echo -e "[\e[0;31mFAIL\e[0m] $x" sed ' s/^/ /;' $RESULT_FILE FAILS=1 fi done exit $FAILS auto-multiple-choice-1.4.0/doc/custom.xsl000066400000000000000000000005601341176102400203540ustar00rootroot00000000000000 important note auto-multiple-choice-1.4.0/doc/customl10n.xml000066400000000000000000000010661341176102400210430ustar00rootroot00000000000000 auto-multiple-choice-1.4.0/doc/doc-xhtml-site.en.xsl.in000066400000000000000000000262261341176102400227200ustar00rootroot00000000000000 .shtml #set var="PARTIE" value="" #set var="LANG" value="doc-en" #include virtual="../track"

    AMC

    Multiple Choice sheets automated marking

    {$conum} Don't know how to generate Unicode callouts when $callout.unicode.start.character is ( ) ( )

    Note Warning Caution Tip Important Note
    :
    [{$alt}]
    auto-multiple-choice-1.4.0/doc/doc-xhtml-site.fr.xsl.in000066400000000000000000000262501341176102400227220ustar00rootroot00000000000000 .shtml #set var="PARTIE" value="" #set var="LANG" value="doc-fr" #include virtual="../track"

    AMC

    Correction automatisée de formulaires QCM

    {$conum} Don't know how to generate Unicode callouts when $callout.unicode.start.character is ( ) ( )

    Note Warning Caution Tip Important Note
    :
    [{$alt}]
    auto-multiple-choice-1.4.0/doc/doc-xhtml-site.ja.xsl.in000066400000000000000000000262651341176102400227130ustar00rootroot00000000000000 .shtml #set var="PARTIE" value="" #set var="LANG" value="doc-ja" #include virtual="../track"

    AMC

    選択式試験問題マークシート自動採点

    {$conum} Don't know how to generate Unicode callouts when $callout.unicode.start.character is ( ) ( )

    Note Warning Caution Tip Important Note
    :
    [{$alt}]
    auto-multiple-choice-1.4.0/doc/doc-xhtml.xsl.in000066400000000000000000000012371341176102400213500ustar00rootroot00000000000000 auto-multiple-choice-1.4.0/doc/extrait-fichiers.pl000077500000000000000000000065401341176102400221300ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2008-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . use Getopt::Long; use XML::LibXML; use Encode; use Archive::Tar; my $liste=''; GetOptions("liste=s"=>\$liste, ); my $tar_opts={uid=>0,gid=>0,uname=>'root',gname=>'root',mtime=>1420066800}; my $can_chmod=1; if(!defined(&{Archive::Tar::chmod})) { $can_chmod=0; print "! Archive::Tar::chmod not available\n"; } my @fichiers=@ARGV; open(LOG,">$liste") if($liste); for my $f (@fichiers) { print "*** File $f\n"; my $parser = XML::LibXML->new(); my $xp=$parser->parse_file($f); my $lang=''; my @articles= $xp->findnodes('/article')->get_nodelist; if($articles[0] && $articles[0]->findvalue('@lang')) { $lang=$articles[0]->findvalue('@lang'); $lang =~ s/[.-].*//; print " I lang=$lang\n"; } my $nodeset = $xp->findnodes('//programlisting'); foreach my $node ($nodeset->get_nodelist) { my $id=$node->findvalue('@id'); my $ex=$node->textContent(); if($id =~ /^(modeles)-(.*)\.(tex|txt)$/) { my $rep=$1; $rep.="/$lang" if($lang); my $name=$2; my $ext=$3; my $code_name=$name; print " * extracting $rep/$code_name\n"; my $desc='Doc / sample LaTeX file'; my $parent=$node->parentNode(); foreach my $fr ($parent->childNodes()) { if($fr->nodeName() == '#comment') { my $c=$fr->toString(); if($c =~ /^$/) { $name=$1; $desc=$2; print " embedded description / N=$name\n"; } } } my $tar = Archive::Tar->new; $tar->add_data("$code_name.$ext",encode_utf8($ex),$tar_opts); $tar->chmod("$code_name.$ext",'0644') if($can_chmod); $tar->add_data("description.xml", encode_utf8(' '.$name.' '.$desc.' '),$tar_opts ); $tar->chmod("description.xml",'0644') if($can_chmod); my $opts=' %PROJET/'.$code_name.'.'.$ext.' '; if($ext eq 'tex') { my $engine='pdflatex'; $engine='platex+dvipdf' if($lang eq 'ja'); $opts .= ' '.$engine.' '; } else { $opts .= ' plain '; } $opts .= ' '; $tar->add_data("options.xml", encode_utf8($opts),$tar_opts); $tar->chmod("options.xml",'0644') if($can_chmod); $tar->write("$rep/$code_name.tgz", COMPRESS_GZIP); print LOG "$rep/$code_name.tgz\n" if($liste); } } } close(LOG) if($liste); auto-multiple-choice-1.4.0/doc/html/000077500000000000000000000000001341176102400172555ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/html/auto-multiple-choice.en/000077500000000000000000000000001341176102400237075ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/html/auto-multiple-choice.en/flag.svg000066400000000000000000000224711341176102400253470ustar00rootroot00000000000000 flag united_states Daniel McRae Dbenbenn Zscout370 Pumbaa80 jacobolus image/svg+xml I think the above two lines give the simplest way to make the diagonals auto-multiple-choice-1.4.0/doc/html/auto-multiple-choice.fr/000077500000000000000000000000001341176102400237145ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/html/auto-multiple-choice.fr/flag.svg000066400000000000000000000005711341176102400253510ustar00rootroot00000000000000 auto-multiple-choice-1.4.0/doc/html/auto-multiple-choice.ja/000077500000000000000000000000001341176102400236775ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/html/auto-multiple-choice.ja/flag.svg000066400000000000000000000003171341176102400253320ustar00rootroot00000000000000 auto-multiple-choice-1.4.0/doc/html/images/000077500000000000000000000000001341176102400205225ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/html/images/callouts/000077500000000000000000000000001341176102400223505ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/html/images/callouts/.hgempty000066400000000000000000000005601341176102400240270ustar00rootroot00000000000000Mercurial keeps track of files and not directories. The presence of this file will ensure that its parent directory remains non-empty and thus is part of version control. The directory is required to prevent errors while building. Ideally the creation of this directory should be part of build process and not version control and hence it should be removed in future. auto-multiple-choice-1.4.0/doc/html/index.html000066400000000000000000000011201341176102400212440ustar00rootroot00000000000000 Auto Multiple Choice Documentation

    Auto Multiple Choice Documentation

    Available languages: EN FR JA

    auto-multiple-choice-1.4.0/doc/html/style.css000066400000000000000000000022421341176102400211270ustar00rootroot00000000000000 a { color: #000; text-decoration: none; border-bottom: 1px dotted #000; } a:hover { background-color: #024782; color: #fff; } .screen { font-family: monospace; font-size: medium; display: block; padding: 10px; border: 1px solid #bbb; background-color: #eee; color: #000; overflow: auto; border-radius: 2.5px; -moz-border-radius: 2.5px; margin: 0.5em 2em; } .programlisting { font-family: monospace; font-size: medium; display: block; padding: 10px; border: 1px solid #bbb; background-color: #ddd; color: #000; overflow: auto; border-radius: 2.5px; -moz-border-radius: 2.5px; margin: 0.5em 2em; } .note, .caution, .warning, .important { border: 1px solid #024782; border-radius: .5em; -moz-border-radius: .5em; margin: 10px; padding: 3px; } .title { color: #024782; } .guimenu, .guimenuitem, .guisubmenu, .guilabel { color: #9B0000; } .guibutton { background-color: #FFCFCF; border: 1px solid #9B0000; border-radius: .3em; -moz-border-radius: .3em; } auto-multiple-choice-1.4.0/doc/img_pdf/000077500000000000000000000000001341176102400177165ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/img_pdf/.hgkeep000066400000000000000000000000001341176102400211500ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/img_src/000077500000000000000000000000001341176102400177345ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/img_src/callouts/000077500000000000000000000000001341176102400215625ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/img_src/callouts/1.svg000066400000000000000000000060021341176102400224410ustar00rootroot00000000000000 image/svg+xml 1 auto-multiple-choice-1.4.0/doc/img_src/callouts/10.svg000066400000000000000000000060161341176102400225260ustar00rootroot00000000000000 image/svg+xml 10 auto-multiple-choice-1.4.0/doc/img_src/callouts/11.svg000066400000000000000000000060201341176102400225220ustar00rootroot00000000000000 image/svg+xml 11 auto-multiple-choice-1.4.0/doc/img_src/callouts/12.svg000066400000000000000000000060161341176102400225300ustar00rootroot00000000000000 image/svg+xml 12 auto-multiple-choice-1.4.0/doc/img_src/callouts/13.svg000066400000000000000000000057361341176102400225410ustar00rootroot00000000000000 image/svg+xml 13 auto-multiple-choice-1.4.0/doc/img_src/callouts/14.svg000066400000000000000000000057361341176102400225420ustar00rootroot00000000000000 image/svg+xml 14 auto-multiple-choice-1.4.0/doc/img_src/callouts/15.svg000066400000000000000000000057361341176102400225430ustar00rootroot00000000000000 image/svg+xml 15 auto-multiple-choice-1.4.0/doc/img_src/callouts/2.svg000066400000000000000000000060021341176102400224420ustar00rootroot00000000000000 image/svg+xml 2 auto-multiple-choice-1.4.0/doc/img_src/callouts/3.svg000066400000000000000000000057211341176102400224520ustar00rootroot00000000000000 image/svg+xml 3 auto-multiple-choice-1.4.0/doc/img_src/callouts/4.svg000066400000000000000000000057211341176102400224530ustar00rootroot00000000000000 image/svg+xml 4 auto-multiple-choice-1.4.0/doc/img_src/callouts/5.svg000066400000000000000000000057211341176102400224540ustar00rootroot00000000000000 image/svg+xml 5 auto-multiple-choice-1.4.0/doc/img_src/callouts/6.svg000066400000000000000000000057211341176102400224550ustar00rootroot00000000000000 image/svg+xml 6 auto-multiple-choice-1.4.0/doc/img_src/callouts/7.svg000066400000000000000000000057211341176102400224560ustar00rootroot00000000000000 image/svg+xml 7 auto-multiple-choice-1.4.0/doc/img_src/callouts/8.svg000066400000000000000000000057211341176102400224570ustar00rootroot00000000000000 image/svg+xml 8 auto-multiple-choice-1.4.0/doc/img_src/callouts/9.svg000066400000000000000000000057211341176102400224600ustar00rootroot00000000000000 image/svg+xml 9 auto-multiple-choice-1.4.0/doc/img_src/important.svg000066400000000000000000000064501341176102400224770ustar00rootroot00000000000000 image/svg+xml auto-multiple-choice-1.4.0/doc/img_src/note.svg000066400000000000000000000056741341176102400214360ustar00rootroot00000000000000 image/svg+xml auto-multiple-choice-1.4.0/doc/img_src/warning.svg000066400000000000000000000063231341176102400221260ustar00rootroot00000000000000 image/svg+xml auto-multiple-choice-1.4.0/doc/index.pl000077500000000000000000000026371341176102400177700ustar00rootroot00000000000000#! /usr/bin/perl # # Copyright (C) 2012-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . my @dirs=@ARGV; print q$ Auto Multiple Choice Documentation

    Auto Multiple Choice Documentation

    Available languages:$; for my $d (sort { $a cmp $b } @dirs) { my $rel=$d; $rel =~ s/.*\///; my $lang=$rel; $lang =~ s/.*\.//; print " ".uc($lang).""; } print q$

    $; auto-multiple-choice-1.4.0/doc/modeles/000077500000000000000000000000001341176102400177415ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/modeles/ar/000077500000000000000000000000001341176102400203435ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/modeles/ar/directory.xml000066400000000000000000000003561341176102400230750ustar00rootroot00000000000000 [AR] Documentation This group contains LaTeX files given as examples in AMC English documentation, translated to arabic. auto-multiple-choice-1.4.0/doc/modeles/ar/groups.d/000077500000000000000000000000001341176102400221045ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/modeles/ar/groups.d/description.xml000066400000000000000000000003361341176102400251530ustar00rootroot00000000000000 Groupsنموذج لتوضيح طريقة تقسيم الاختبار حسب المادة أو الفصل أو الموضوع... auto-multiple-choice-1.4.0/doc/modeles/ar/groups.d/groups.tex000066400000000000000000000051761341176102400241560ustar00rootroot00000000000000\documentclass[a4paper]{article} \usepackage[box,completemulti]{automultiplechoice} %% XeLaTeX with arabic texts, using Rasheeq font from arabeyes: \usepackage{arabxetex} \newfontfamily{\arabicfont}[Script=Arabic,Scale=1]{Rasheeq} %% \begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% some commands to turn texts into arabic : \Arabic \def\AMCchoiceLabel#1{\textLR{\Alph{#1}}} \def\AMCbeginQuestion#1#2{\par\noindent{‫السؤال #1 #2 :}} \def\AMCformQuestion#1{\vspace{\AMCformVSpace}\par{\large ‫السؤال #1 :}} \AMCtext{none}{لا شيء من الإجابات أعلاه صحيحة} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% preparation of the groups \element{geographie}{ \begin{question}{Paris} في أي قارة توجد باريس؟ \begin{choices} \correctchoice{اوروبا} \wrongchoice{افريقيا} \wrongchoice{اسيا} \wrongchoice{كوكب المشتري} \end{choices} \end{question} } \element{geographie}{ \begin{question}{Riyad} ما هي عاصمة السعودية؟ \begin{choices} \correctchoice{الرياض} \wrongchoice{كولالمبور} \wrongchoice{أبوظبي} \end{choices} \end{question} } \element{histoire}{ \begin{question}{ww1} في أي عام انتهت الحرب العالمية الاولى؟ \begin{choiceshoriz} \correctchoice{1918} \wrongchoice{1919} \wrongchoice{1519} \end{choiceshoriz} \end{question} } \element{histoire}{ \begin{questionmult}{ONU} يمكن القول عن \emph{هيئة الامم المتحدة}؟ \begin{choices} \correctchoice{انها تأسست عام 1946} \correctchoice{انها توجد في نيويورك} \wrongchoice{انها نادي استعماري للدول الكبرى} \end{choices} \end{questionmult} } %%% copies \onecopy{10}{ %%% beginning of the test sheet header: \noindent{\textLR{\bf AutoMultipleChoice} \hfill \textLR{TEST}} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large التاريخ والجغرافيا\\ اختبار الفصل الاول يناير 2011 \end{minipage} \namefield{\fbox{\begin{minipage}{.5\linewidth} الاسم الكامل: \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage}}} %%% end of the header \begin{center} \hrule\vspace{2mm} \Large الجغرافيا \vspace{1mm}\hrule \end{center} \shufflegroup{geographie} \insertgroup{geographie} \begin{center} \hrule\vspace{2mm} \Large التاريخ \vspace{2mm}\hrule \end{center} \shufflegroup{histoire} \insertgroup{histoire} \clearpage } \end{document} auto-multiple-choice-1.4.0/doc/modeles/ar/groups.d/options.xml000066400000000000000000000003431341176102400243210ustar00rootroot00000000000000 1 groups xelatex %PROJET/groups.tex auto-multiple-choice-1.4.0/doc/modeles/ar/scoring.d/000077500000000000000000000000001341176102400222315ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/modeles/ar/scoring.d/description.xml000066400000000000000000000003131341176102400252730ustar00rootroot00000000000000 Scoring strategyنموذج يوضح طريقة التحكم بتوزيع الدرجات على كل فقرة auto-multiple-choice-1.4.0/doc/modeles/ar/scoring.d/options.xml000066400000000000000000000003451341176102400244500ustar00rootroot00000000000000 1 scoring xelatex %PROJET/scoring.tex auto-multiple-choice-1.4.0/doc/modeles/ar/scoring.d/scoring.tex000066400000000000000000000070421341176102400244220ustar00rootroot00000000000000\documentclass{article} \usepackage[bloc,completemulti]{automultiplechoice} %% XeLaTeX with arabic texts, using Rasheeq font from arabeyes: \usepackage{arabxetex} \newfontfamily{\arabicfont}[Script=Arabic,Scale=1]{Rasheeq} %% \begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% some commands to turn texts into arabic : \Arabic \def\AMCchoiceLabel#1{\textLR{\Alph{#1}}} \def\AMCbeginQuestion#1#2{\par\noindent{‫السؤال #1 #2 :}} \def\AMCformQuestion#1{\vspace{\AMCformVSpace}\par{\large ‫السؤال #1 :}} \AMCtext{none}{لا شيء من الإجابات أعلاه صحيحة} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \element{qqs}{ \begin{question}{good choice} كم نقطة تريد لهذا السؤال؟ \begin{choices} \correctchoice{الاعلى: 10}\scoring{10} \wrongchoice{فقط 5}\scoring{5} \wrongchoice{نقطتين تكفي}\scoring{2} \wrongchoice{لا شئ، شكرا}\scoring{0} \end{choices} \end{question} } \element{qqs}{ \begin{questionmult}{added} وضع درجة مختلفة لكل اجابة: \begin{choices} \correctchoice{2 نقطة}\scoring{b=2} \wrongchoice{نقطة سالبة واحدة!}\scoring{b=0,m=-1} \correctchoice{3 نقاط}\scoring{b=3} \correctchoice{1 نقطة} \correctchoice{نصف نقطة}\scoring{b=0.5} \end{choices} \end{questionmult} } \element{qqs}{ \begin{questionmult}{3 or zero}\scoring{mz=3} الاجابة الصحيحة الكاملة فقط تحصل على 3 نقاط، اما غير ذلك فتحصل على صفر. \begin{choices} \wrongchoice{خطأ} \wrongchoice{خطأ} \correctchoice{صح} \correctchoice{صح} \end{choices} \end{questionmult} } \element{qqs}{ \begin{questionmult}{all for 2}\scoring{haut=2} الاجابة الصحيحة الكاملة تحصل على نقطتين، وكل اجابة خاطئة تخصم نقطة... \begin{choices} \correctchoice{صح} \correctchoice{هذه الاجابة صحيحة} \correctchoice{نعم!} \wrongchoice{خطأ!} \wrongchoice{لا تختر هذه!} \end{choices} \end{questionmult} } \element{qqs}{ \begin{question}{attention}\scoring{b=2} الاجابة الصحيحة تحصل على نقطتين، وكذلك الاجابة السيئة جدا تخصم نقطتين. \begin{choices} \correctchoice{جيد!} \wrongchoice{غير صحيحة} \wrongchoice{غير صحيحة} \wrongchoice{غير صحيحة} \wrongchoice{اجابة سيئة جدا!}\scoring{-2} \end{choices} \end{question} } \element{qqs}{ \begin{questionmult}{as you like} اختر النقاط التي تريد: \begin{choices} \correctchoice{ستحصل على نقطتين}\scoring{b=2} \wrongchoice{ستحصل على 3 نقاط}\scoring{b=0,m=3} \correctchoice{ستحصل على نقطة اذا علمتها، وستخسر نقطة اذا تركتها}\scoring{m=-1} \end{choices} \end{questionmult} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \onecopy{20}{ \noindent{\bf اختبار \hfill توزيع النقاط بشكل تفصيلي} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large اختبار\\ يناير 2011\end{minipage} \namefield{\fbox{\begin{minipage}{.5\linewidth} الاسم: \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage}}} \vspace{1cm} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \shufflegroup{qqs} \insertgroup{qqs} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \clearpage } \end{document} auto-multiple-choice-1.4.0/doc/modeles/ar/separate.d/000077500000000000000000000000001341176102400223715ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/modeles/ar/separate.d/description.xml000066400000000000000000000003371341176102400254410ustar00rootroot00000000000000 Separate answer sheetنموذج مكون من صفحة للاسئلة وصفحة مسودة فارغة وصفحة الاجابة auto-multiple-choice-1.4.0/doc/modeles/ar/separate.d/options.xml000066400000000000000000000003471341176102400246120ustar00rootroot00000000000000 1 separate xelatex %PROJET/separate.tex auto-multiple-choice-1.4.0/doc/modeles/ar/separate.d/separate.tex000066400000000000000000000057011341176102400247220ustar00rootroot00000000000000\documentclass[a4paper]{article} \usepackage[box,completemulti,separateanswersheet]{automultiplechoice} %% XeLaTeX with arabic texts, using Rasheeq font from arabeyes: \usepackage{arabxetex} \newfontfamily{\arabicfont}[Script=Arabic,Scale=1]{Rasheeq} %% \begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% some commands to turn texts into arabic : \Arabic \def\AMCchoiceLabel#1{\textLR{\Alph{#1}}} \def\AMCbeginQuestion#1#2{\par\noindent{‫السؤال #1 #2 :}} \def\AMCformQuestion#1{\vspace{\AMCformVSpace}\par{\large ‫السؤال #1 :}} \AMCtext{none}{لا شيء من الإجابات أعلاه صحيحة} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \AMCrandomseed{1237893} \element{general}{ \begin{question}{Medina} توجد المدينة المنورة في أي دولة ؟ \begin{choices} \correctchoice{السعودية} \wrongchoice{الجزائر} \wrongchoice{تركيا} \wrongchoice{العراق} \end{choices} \end{question} } \element{general}{ \begin{questionmult}{qual} أي من الصفات التالية جيد ؟ \begin{choices} \correctchoice{التسامح} \wrongchoice{الكذب} \correctchoice{الكرم} \end{choices} \end{questionmult} } \element{general}{ \begin{question}{colors} كم عدد الوان الطيف الضوئي؟ \begin{choiceshoriz}[o] \wrongchoice{4} \wrongchoice{5} \wrongchoice{6} \correctchoice{7} \wrongchoice{8} \end{choiceshoriz} \end{question} } \onecopy{5}{ %%% beginning of the test sheet header: \noindent{\bf النهائي \hfill الاختبار} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large الاختبار\\ اختبار النصف الاول 2011 \end{minipage} \begin{center}\em المدة : 10 دقائق. لا يسمح باستخدام المذكرات والكتب، يسمح باستخدام الحاسبة. السؤال الذي توجد امامه العلامة \multiSymbole{} قد يكون عدد اجاباته الصحيحة صفر أو واحد أو اثنين أو اكثر، اما بقية الاسئلة فلها اجابة صحيحة واحدة. يمكن وضع درجة سالبة للاجابات \emph{السيئة جدا} answers. \end{center} \vspace{1ex} %%% end of the header \shufflegroup{general} \insertgroup{general} \AMCcleardoublepage \AMCformBegin %%% beginning of the answer sheet header {\large ورقة الاجابة} \hfill \namefield{\fbox{ \begin{minipage}{.5\linewidth} الاسم الكامل: \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }} \begin{center} \large يجب أن توضع الاجابات في هذه الورقة: سيتم تجاهل الاجابات في الاوراق الاخرى. \end{center} %%% end of the answer sheet header \AMCform \clearpage } \end{document} auto-multiple-choice-1.4.0/doc/modeles/ar/simple.d/000077500000000000000000000000001341176102400220565ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/modeles/ar/simple.d/description.xml000066400000000000000000000003331341176102400251220ustar00rootroot00000000000000 Simple exampleنموذج بسيط يحتوي على سؤال باجابة وحيدة وسؤال باجابات متعددة. auto-multiple-choice-1.4.0/doc/modeles/ar/simple.d/options.xml000066400000000000000000000003431341176102400242730ustar00rootroot00000000000000 1 simple xelatex %PROJET/simple.tex auto-multiple-choice-1.4.0/doc/modeles/ar/simple.d/simple.tex000066400000000000000000000043401341176102400240720ustar00rootroot00000000000000\documentclass[a4paper]{article} \usepackage[box,completemulti]{automultiplechoice} %% XeLaTeX with arabic texts, using Rasheeq font from arabeyes: \usepackage{arabxetex} \newfontfamily{\arabicfont}[Script=Arabic,Scale=1]{Rasheeq} %% \begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% some commands to turn texts into arabic : \Arabic \def\AMCchoiceLabel#1{\textLR{\Alph{#1}}} \def\AMCbeginQuestion#1#2{\par\noindent{‫السؤال #1 #2 :}} \def\AMCformQuestion#1{\vspace{\AMCformVSpace}\par{\large ‫السؤال #1 :}} \AMCtext{none}{لا شيء من الإجابات أعلاه صحيحة} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \onecopy{10}{ %%% beginning of the test sheet header: \noindent{\textLR{\bf AutoMultipleChoice} \hfill \textLR{TEST}} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large اختبار\\ الفصل الاول 2011\end{minipage} \namefield{\fbox{ \begin{minipage}{.5\linewidth} الاسم الكامل: \vspace*{.5cm}\dotfill \vspace*{1mm} \end{minipage} }} \begin{center}\em مدة الاختبار : 10 دقائق. لا يسمح باستخدام المذكرات أو الكتب، يسمح باستخدام الحاسبة. وجود هذا الرمز \multiSymbole{} يعني أن عدد الاجابات الصحيحة للسؤال صفر، أو واحد أو اثنين أو اكثر. بقية الاسئلة لها اجابة صحيحة واحدة فقط. يمكن وضع درجة سالبة للاجابة \emph{السيئة جدا}. \end{center} \vspace{1ex} %%% end of the header %%% questions \begin{question}{mecca} مدينة مكة المكرمة توجد في ؟ \begin{choices} \correctchoice{السعودية} \wrongchoice{الكويت} \wrongchoice{سوريا} \wrongchoice{المغرب} \end{choices} \end{question} \begin{questionmult}{energy} من مصادر الطاقة النظيفة ؟ \begin{choices} \correctchoice{الرياح} \wrongchoice{الطاقة النووية} \correctchoice{الشمس} \end{choices} \end{questionmult} %%% end of questions } \end{document} auto-multiple-choice-1.4.0/doc/modeles/en/000077500000000000000000000000001341176102400203435ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/modeles/en/Nominative-sheets-separateanswersheet.d/000077500000000000000000000000001341176102400302425ustar00rootroot00000000000000Nominative-sheets-separateanswers.tex000066400000000000000000000050441341176102400375170ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/modeles/en/Nominative-sheets-separateanswersheet.d\documentclass[12pt,a4paper]{article} \usepackage{csvsimple}% \usepackage[bloc,separateanswersheet,completemulti]{automultiplechoice} %%%%%%%%%%%%command \newcommand{\Test}{% % \onecopy{1}{% %%%beginning of the header \begin{center} \noindent{}\fbox{\vspace*{3mm} \Large\bf\name{}~\forename{}\normalsize{}% \vspace*{3mm} } \end{center} \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf Test\\ Examination on Jan. 1st, 2008 \end{minipage} \begin{center}\em Duration : 10 minutes. No documents allowed. The use of electronic calculators is forbidden. Questions using the sign \multiSymbole{} may have zero, one or several correct answers. Other questions have a single correct answer. Negative points may be attributed to \emph{very bad} answers. \end{center} \vspace{1ex} %%% end of the header \restituegroupe{general} \clearpage %\AMCcleardoublepage % \AMCaddpagesto{3} %%% beginning of the test sheet header: \begin{center} {\large\bf Answer sheet:} \noindent{}\champnom{\fbox{% \Large\bf\name{}~\forename{}\normalsize{} \vspace*{1mm} }} \end{center} \begin{center} \bf\em Answers must be given exclusively on this sheet: answers given on the other sheets will be ignored. \end{center} \AMCassociation{\id} \formulaire %\AMCaddpagesto{3} }%onecopy }%Test \begin{document} %%%Options \AMCrandomseed{1237893} \def\AMCformQuestion#1{{\sc Question #1 :}} \setdefaultgroupmode{withoutreplacement} %%% end of Options %%% groups \element{general}{ \begin{question}{prez} Among the following persons, which one has ever been a President of the French Republic? \begin{choices} \correctchoice{René Coty} \wrongchoice{Alain Prost} \wrongchoice{Marcel Proust} \wrongchoice{Claude Monet} \end{choices} \end{question} } \element{general}{ \begin{questionmult}{pref} Among the following cities, which ones are French prefectures? \begin{choices} \correctchoice{Poitiers} \wrongchoice{Sainte-Menehould} \correctchoice{Avignon} \end{choices} \end{questionmult} } \element{general}{ \begin{question}{nb-ue} How many different states were members of the European Union in Jan. 2009? \begin{choiceshoriz}[o] \wrongchoice{15} \wrongchoice{21} \wrongchoice{25} \correctchoice{27} \wrongchoice{31} \end{choiceshoriz} \end{question} } %%% end of groups \csvreader[head to column names]{list.csv}{}{\Test} \end{document} auto-multiple-choice-1.4.0/doc/modeles/en/Nominative-sheets-separateanswersheet.d/description.xml000066400000000000000000000003571341176102400333140ustar00rootroot00000000000000 Nominative sheets and separate answers exampleAn example where all check-boxes are put together on a separate nominative sheet for each student. auto-multiple-choice-1.4.0/doc/modeles/en/Nominative-sheets-separateanswersheet.d/list.csv000066400000000000000000000001411341176102400317260ustar00rootroot00000000000000name,forename,id Avogadro,Amedeo,1776 Bohr,Niels,1885 Copernic,Nicolas,1473 Einstein,Albert,1879 auto-multiple-choice-1.4.0/doc/modeles/en/Nominative-sheets-separateanswersheet.d/options.xml000066400000000000000000000003211341176102400324530ustar00rootroot00000000000000 Nominative-sheets-separateanswers %PROJET/Nominative-sheets-separateanswers.tex auto-multiple-choice-1.4.0/doc/modeles/en/Nominative-sheets.d/000077500000000000000000000000001341176102400241675ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/modeles/en/Nominative-sheets.d/Nominative-sheets.tex000066400000000000000000000042341341176102400303160ustar00rootroot00000000000000\documentclass[12pt,a4paper]{article} \usepackage{csvsimple}% \usepackage[bloc,completemulti]{automultiplechoice} \newcommand{\Test}{ \onecopy{1}{% %%% debut de l'en-tête des copies : \begin{center} \noindent{}\fbox{\vspace*{3mm} \Large\bf\name{}~\forename{}\normalsize{}% \vspace*{3mm} } \end{center} \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf Test\\ Examination on Jan. 1st, 2008 \end{minipage} \begin{center}\em Duration : 10 minutes. No documents allowed. The use of electronic calculators is forbidden. Questions using the sign \multiSymbole{} may have zero, one or several correct answers. Other questions have a single correct answer. Negative points may be attributed to \emph{very bad} answers. \end{center} \vspace{1ex} %%% end of the header \restituegroupe{general} \AMCassociation{\id} %\AMCaddpagesto{3} }%onecopy }%test %%%%§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§ \begin{document} %%%Options \AMCrandomseed{1237893} \def\AMCformQuestion#1{{\sc Question #1 :}} \setdefaultgroupmode{withoutreplacement} %%% end of Options %%% groups \element{general}{ \begin{question}{prez} Among the following persons, which one has ever been a President of the French Republic? \begin{choices} \correctchoice{René Coty} \wrongchoice{Alain Prost} \wrongchoice{Marcel Proust} \wrongchoice{Claude Monet} \end{choices} \end{question} } \element{general}{ \begin{questionmult}{pref} Among the following cities, which ones are French prefectures? \begin{choices} \correctchoice{Poitiers} \wrongchoice{Sainte-Menehould} \correctchoice{Avignon} \end{choices} \end{questionmult} } \element{general}{ \begin{question}{nb-ue} How many different states were members of the European Union in Jan. 2009? \begin{choiceshoriz}[o] \wrongchoice{15} \wrongchoice{21} \wrongchoice{25} \correctchoice{27} \wrongchoice{31} \end{choiceshoriz} \end{question} } %%% end of groups \csvreader[head to column names]{list.csv}{}{\Test} \end{document} auto-multiple-choice-1.4.0/doc/modeles/en/Nominative-sheets.d/description.xml000066400000000000000000000002441341176102400272340ustar00rootroot00000000000000 Nominative sheetsAn example with a nominative sheet for each student. auto-multiple-choice-1.4.0/doc/modeles/en/Nominative-sheets.d/list.csv000066400000000000000000000001411341176102400256530ustar00rootroot00000000000000name,forename,id Avogadro,Amedeo,1776 Bohr,Niels,1885 Copernic,Nicolas,1473 Einstein,Albert,1879 auto-multiple-choice-1.4.0/doc/modeles/en/Nominative-sheets.d/options.xml000066400000000000000000000002631341176102400264050ustar00rootroot00000000000000 Nominative-sheets %PROJET/Nominative-sheets.tex auto-multiple-choice-1.4.0/doc/modeles/en/directory.xml000066400000000000000000000003301341176102400230650ustar00rootroot00000000000000 [EN] Documentation This group contains LaTeX files given as examples in AMC English documentation. auto-multiple-choice-1.4.0/doc/modeles/fr/000077500000000000000000000000001341176102400203505ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/modeles/fr/Pre-remplies-ensemble.d/000077500000000000000000000000001341176102400247265ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/modeles/fr/Pre-remplies-ensemble.d/Preremplies-ensemble.tex000066400000000000000000000052121341176102400315270ustar00rootroot00000000000000\documentclass[12pt,a4paper]{article} \usepackage{csvsimple}% \usepackage[francais,bloc,ensemble,completemulti]{automultiplechoice} %%%%commande création sujet \newcommand{\sujet}{% % \exemplaire{1}{% %%% debut de l'en-tête des copies : \begin{center} \noindent{}\fbox{\vspace*{3mm} \Large\bf\nom{}~\prenom{}\normalsize{}% \vspace*{3mm} } \end{center} \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf Test\\ Examen du 01/01/2008 \end{minipage} \begin{center}\em Durée : 10 minutes. Aucun document n'est autorisé. L'usage de la calculatrice est interdit. Les questions faisant apparaître le symbole \multiSymbole{} peuvent présenter zéro, une ou plusieurs bonnes réponses. Les autres ont une unique bonne réponse. Des points négatifs pourront être affectés à de \emph{très mauvaises} réponses. \end{center} \vspace{1ex} %%% fin de l'en-tête \restituegroupe{general} \clearpage %\AMCcleardoublepage % \AMCaddpagesto{3} %%% début de l'en-tête de la feuille de réponses \begin{center} {\large\bf Feuille de réponses :} \noindent{}\champnom{\fbox{% \Large\bf\nom{}~\prenom{}\normalsize{} \vspace*{1mm} }} \end{center} \begin{center} \bf\em Les réponses aux questions sont à donner exclusivement sur cette feuille : les réponses données sur les feuilles précédentes ne seront pas prises en compte. \end{center} \AMCassociation{\id} \formulaire %\AMCaddpagesto{2} }%exempalire }%sujet \begin{document} %%%Options \AMCrandomseed{1237893} \def\AMCformQuestion#1{{\sc Question #1 :}} \setdefaultgroupmode{withoutreplacement} %%% Fin Options %%% groupes \element{general}{ \begin{question}{prez} Parmi les personnalités suivantes, laquelle a été présidente de la république française~? \begin{reponses} \bonne{René Coty} \mauvaise{Alain Prost} \mauvaise{Marcel Proust} \mauvaise{Claude Monet} \end{reponses} \end{question} } \element{general}{ \begin{questionmult}{pref} Parmi les villes suivantes, lesquelles sont des préfectures~? \begin{reponses} \bonne{Poitiers} \mauvaise{Sainte-Menehould} \bonne{Avignon} \end{reponses} \end{questionmult} } \element{general}{ \begin{question}{nb-ue} Combien d'états sont membres de l'Union Européenne en janvier 2009~? \begin{reponseshoriz}[o] \mauvaise{15} \mauvaise{21} \mauvaise{25} \bonne{27} \mauvaise{31} \end{reponseshoriz} \end{question} } %%%% fin des groupes \csvreader[head to column names]{liste.csv}{}{\sujet} \end{document} auto-multiple-choice-1.4.0/doc/modeles/fr/Pre-remplies-ensemble.d/description.xml000066400000000000000000000003721341176102400277750ustar00rootroot00000000000000 Copies préremplies / réponses séparéesUn exemple où toutes les cases à cocher sont regroupées sur une page nominative à part pour chaque étudiant. auto-multiple-choice-1.4.0/doc/modeles/fr/Pre-remplies-ensemble.d/liste.csv000066400000000000000000000001361341176102400265630ustar00rootroot00000000000000nom,prenom,id Avogadro,Amedeo,1776 Bohr,Niels,1885 Copernic,Nicolas,1473 Einstein,Albert,1879 auto-multiple-choice-1.4.0/doc/modeles/fr/Pre-remplies-ensemble.d/options.xml000066400000000000000000000002701341176102400271420ustar00rootroot00000000000000 Préremplies-ensemble %PROJET/Preremplies-ensemble.tex auto-multiple-choice-1.4.0/doc/modeles/fr/Pre-remplies.d/000077500000000000000000000000001341176102400231365ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/modeles/fr/Pre-remplies.d/Preremplies.tex000066400000000000000000000042211341176102400261460ustar00rootroot00000000000000\documentclass[12pt,a4paper]{article} \usepackage{csvsimple}% \usepackage[francais,bloc]{automultiplechoice} \newcommand{\sujet}{ \exemplaire{1}{% %%% debut de l'en-tête des copies : \begin{center} \noindent{}\fbox{\vspace*{3mm} \Large\bf\nom{}~\prenom{}\normalsize{}% \vspace*{3mm} } \end{center} \noindent{\bf QCM \hfill TEST} \vspace*{.5cm} \begin{minipage}{.4\linewidth} \centering\large\bf Test\\ Examen du 01/01/2008 \end{minipage} \begin{center}\em Durée : 10 minutes. Aucun document n'est autorisé. L'usage de la calculatrice est interdit. Les questions faisant apparaître le symbole \multiSymbole{} peuvent présenter zéro, une ou plusieurs bonnes réponses. Les autres ont une unique bonne réponse. Des points négatifs pourront être affectés à de \emph{très mauvaises} réponses. \end{center} \vspace{1ex} %%% fin de l'en-tête \restituegroupe{general} \AMCassociation{\id} %\AMCaddpagesto{3} } } %%%%§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§ \begin{document} %%%Options \AMCrandomseed{1237893} \def\AMCformQuestion#1{{\sc Question #1 :}} \setdefaultgroupmode{withoutreplacement} %%% Fin Options %%% groupes \element{general}{ \begin{question}{prez} Parmi les personnalités suivantes, laquelle a été présidente de la république française~? \begin{reponses} \bonne{René Coty} \mauvaise{Alain Prost} \mauvaise{Marcel Proust} \mauvaise{Claude Monet} \end{reponses} \end{question} } \element{general}{ \begin{questionmult}{pref} Parmi les villes suivantes, lesquelles sont des préfectures~? \begin{reponses} \bonne{Poitiers} \mauvaise{Sainte-Menehould} \bonne{Avignon} \end{reponses} \end{questionmult} } \element{general}{ \begin{question}{nb-ue} Combien d'états sont membres de l'Union Européenne en janvier 2009~? \begin{reponseshoriz}[o] \mauvaise{15} \mauvaise{21} \mauvaise{25} \bonne{27} \mauvaise{31} \end{reponseshoriz} \end{question} } %%%% fin des groupes \csvreader[head to column names]{liste.csv}{}{\sujet} \end{document} auto-multiple-choice-1.4.0/doc/modeles/fr/Pre-remplies.d/description.xml000066400000000000000000000002571341176102400262070ustar00rootroot00000000000000 Copies prérempliesUn exemple avec des copies nominatives pour chaque étudiant. auto-multiple-choice-1.4.0/doc/modeles/fr/Pre-remplies.d/liste.csv000066400000000000000000000001361341176102400247730ustar00rootroot00000000000000nom,prenom,id Avogadro,Amedeo,1776 Bohr,Niels,1885 Copernic,Nicolas,1473 Einstein,Albert,1879 auto-multiple-choice-1.4.0/doc/modeles/fr/Pre-remplies.d/options.xml000066400000000000000000000002461341176102400253550ustar00rootroot00000000000000 Préremplies %PROJET/Preremplies.tex auto-multiple-choice-1.4.0/doc/modeles/fr/directory.xml000066400000000000000000000003521341176102400230760ustar00rootroot00000000000000 [FR] Documentation Ce groupe contient les fichiers LaTeX donnés en exemple dans la documentation française de AMC. auto-multiple-choice-1.4.0/doc/modeles/ja/000077500000000000000000000000001341176102400203335ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/modeles/ja/directory.xml000066400000000000000000000004021341176102400230550ustar00rootroot00000000000000 [JA] ドキュメント このグループには、AMCの日本語ドキュメントから抜粋したLaTeXファイルが含まれます。 auto-multiple-choice-1.4.0/doc/sty/000077500000000000000000000000001341176102400171305ustar00rootroot00000000000000auto-multiple-choice-1.4.0/doc/sty/Makefile000066400000000000000000000036351341176102400205770ustar00rootroot00000000000000# # Copyright (C) 2011-2017 Alexis Bienvenue # # This file is part of Auto-Multiple-Choice # # Auto-Multiple-Choice is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 2 of # the License, or (at your option) any later version. # # Auto-Multiple-Choice is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Auto-Multiple-Choice. If not, see # . SHELL=/bin/sh include ../../Makefile-all.conf PACK=automultiplechoice SAMPLES=$(wildcard sample-*.tex) all %.pdf: export SOURCE_DATE_EPOCH=$(PACKAGE_V_EPOCH) all %.pdf: export SOURCE_DATE_EPOCH_TEX_PRIMITIVES=1 all %.pdf: export FORCE_SOURCE_DATE=1 PDFLATEX=pdflatex -halt-on-error -interaction=nonstopmode all: FORCE $(PDFLATEX) $(PACK).dtx $(MAKE) $(SAMPLES:.tex=.pdf) $(PDFLATEX) $(PACK).dtx makeindex -s gglo.ist -o $(PACK).gls $(PACK).glo makeindex -s gind.ist -o $(PACK).ind $(PACK).idx $(PDFLATEX) $(PACK).dtx $(PDFLATEX) $(PACK).dtx $(MAKE) postclean styonly: $(PACK).dtx $(PDFLATEX) $< $(MAKE) postclean sample-%.datetex.in: sample-%.tex $(PERLPATH) -pe 's!\\begin\{document\}!\\begin{document}\\pdfinfo{/CreationDate (D:@/PACKAGE_V_PDFDATE/@) /ModDate (D:@/PACKAGE_V_PDFDATE/@)}!;' < $< > $@ sample-%.datetex: sample-%.datetex.in $(MAKE) -C ../.. doc/sty/$@ sample-%.pdf: sample-%.datetex pdflatex -jobname sample-$* $< postclean: -rm -f pexa-* -rm -f $(foreach ext,amc aux dvi glo gls idx ilg ind log out toc xy xy1 xy2 xy3,*.$(ext)) clean: postclean rm -f *~ rm -f $(PACK).sty rm -f *.pdf FORCE: ; .PHONY: all clean postclean FORCE auto-multiple-choice-1.4.0/doc/sty/automultiplechoice.dtx.in000066400000000000000000005460731341176102400241740ustar00rootroot00000000000000% \iffalse meta-comment % % Copyright (C) 2008-2017 Alexis Bienvenue % % This file is part of Auto-Multiple-Choice % % Auto-Multiple-Choice is free software: you can redistribute it % and/or modify it under the terms of the GNU General Public License % as published by the Free Software Foundation, either version 2 of % the License, or (at your option) any later version. % % Auto-Multiple-Choice is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details. % % You should have received a copy of the GNU General Public License % along with Auto-Multiple-Choice. If not, see % . % % \fi % \iffalse %\NeedsTeXFormat{LaTeX2e} %\def\AMC@VERSION{@/PACKAGE_V_STY_TEX/@} %\typeout{AMC version: \AMC@VERSION} %\ProvidesPackage{automultiplechoice}[\AMC@VERSION] % %<*batchfile> \begingroup \ifcsname UseRawInputEncoding\endcsname\UseRawInputEncoding\fi \input docstrip.tex \keepsilent \preamble Copyright (C) 2008-2018 Alexis Bienvenue This file is part of Auto-Multiple-Choice Auto-Multiple-Choice is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. Auto-Multiple-Choice is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Auto-Multiple-Choice. If not, see . \endpreamble \askforoverwritefalse \generate{\file{automultiplechoice.sty}{\from{automultiplechoice.dtx}{package}}} \endgroup % % %<*driver> \documentclass{ltxdoc} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage[nopage,calibration]{automultiplechoice} \usepackage{verbatim} \usepackage{fp} \usepackage{multicol} \usepackage[linenumberformat={{}}]{examplep} \usepackage{codep} \usepackage[hyperindex=false]{hyperref} \usepackage{ifpdf} \usepackage{pdfpages} \usepackage[USenglish]{isodate} \EnableCrossrefs \CodelineIndex \RecordChanges \begin{document} % PDF \ifpdf\pdfinfo{ /Title (automultiplechoice.sty) /CreationDate (D:@/PACKAGE_V_PDFDATE/@) /ModDate (D:@/PACKAGE_V_PDFDATE/@) /Subject (AMC automultiplechoice LaTeX style file) /Keywords (AMC;Auto Multiple Choice;automultiplechoice) }\fi % UTF8 unkonwn characters are replaced by diamonds \makeatletter\def\UTFviii@defined#1{% \ifx#1\relax% \(\diamond\)% \else\expandafter #1% \fi }\makeatother \DocInput{automultiplechoice.dtx} \end{document} % % \fi % % \CheckSum{0} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z % Digits \0\1\2\3\4\5\6\7\8\9 % Exclamation \! Double quote \" Hash (number) \# % Dollar \$ Percent \% Ampersand \& % Acute accent \' Left paren \( Right paren \) % Asterisk \* Plus \+ Comma \, % Minus \- Point \. Solidus \/ % Colon \: Semicolon \; Less than \< % Equals \= Greater than \> Question mark \? % Commercial at \@ Left bracket \[ Backslash \\ % Right bracket \] Circumflex \^ Underscore \_ % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % % % \changes{v0.376}{2011/01/11}{Old color using mechanism} % \changes{v0.426}{2011/02/08}{Using now savepos for layout detection} % % \DoNotIndex{\',\\,\`,\,,\@empty,\@expandtwoargs} % \DoNotIndex{\bgroup,\egroup,\clearpage,\closeout,\PackageInfo,\parindent} % \DoNotIndex{\@ifpackageloaded,\z@,\@ne,\tw@,\m@ne,\@undefined} % \DoNotIndex{\@unexpandable@protect,\@whilenum,\addtocounter,\advance,\Alph,\@Alph} % \DoNotIndex{\arabic,\AtBeginDocument,\IfFileExists} % \DoNotIndex{\AtBeginPage,\begin,\end,\begingroup,\endgroup,\textbf,\BODY} % \DoNotIndex{\box,\circle,\clubsuit,\csname,\DeclareFontShape} % \DoNotIndex{\DeclareOptionX,\def,\define@key,\divide,\do,\dp,\edef,\else} % \DoNotIndex{\emph,\endcsname,\eTeXversion,\expandafter,\fancyfoot} % \DoNotIndex{\fancyhead,\fancyhf,\fancyhfoffset,\fboxrule,\fboxsep} % \DoNotIndex{\fcolorbox,\fi,\fill,\fontencoding,\fontfamily,\fontseries} % \DoNotIndex{\fontshape,\fontsize,\FPeval,\FPiflt,\FPset,\geometry,\global} % \DoNotIndex{\hbox,\headrulewidth,\hfill,\hspace,\hss,\ifFileExists,\ifnum} % \DoNotIndex{\ifodd,\ifx,\ignorespaces,\immediate,\index,\item,\itemsep} % \DoNotIndex{\jobname,\label,\let,\leavevmode,\linewidth,\loop,\lower,\LR,\makebox,\mbox} % \DoNotIndex{\message,\multiply,\newcommand,\newcount,\newcounter,\newdimen} % \DoNotIndex{\NewEnviron,\newenvironment,\newif,\newlength,\newtoks} % \DoNotIndex{\newwrite,\noexpand,\noindent,\number,\openout,\PackageWarning} % \DoNotIndex{\page,\pagestyle,\paperheight,\paperwidth,\par,\pdflastxpos} % \DoNotIndex{\pdflastypos,\pdfsavepos,\ProcessOptionsX,\protect} % \DoNotIndex{\protected@write,\providecommand,\put,\ref,\relax} % \DoNotIndex{\renewcommand,\repeat,\RequirePackage,\romannumeral,\rotatebox} % \DoNotIndex{\sc,\selectfont,\setbox,\setcounter,\setkeys,\setlength} % \DoNotIndex{\string,\strip@pt,\subsection,\textcolor,\the,\thepage} % \DoNotIndex{\thinlines,\time,\texttt,\undefined,\unitlength,\usepackage,\vbox} % \DoNotIndex{\vfill,\vspace,\vss,\write} % \DoNotIndex{\AMC@affichekeysfalse} % \DoNotIndex{\AMC@affichekeystrue} % \DoNotIndex{\AMC@calibrationfalse} % \DoNotIndex{\AMC@calibrationtrue} % \DoNotIndex{\AMC@catalogfalse} % \DoNotIndex{\AMC@catalogtrue} % \DoNotIndex{\AMC@correcfalse} % \DoNotIndex{\AMC@correctrue} % \DoNotIndex{\AMC@correcheadfalse} % \DoNotIndex{\AMC@correcheadtrue} % \DoNotIndex{\AMC@ensemblefalse} % \DoNotIndex{\AMC@ensembletrue} % \DoNotIndex{\AMX@fullGroupsfalse} % \DoNotIndex{\AMX@fullGroupstrue} % \DoNotIndex{\AMC@inside@boxfalse} % \DoNotIndex{\AMC@inside@boxtrue} % \DoNotIndex{\AMC@inside@digitfalse} % \DoNotIndex{\AMC@inside@digittrue} % \DoNotIndex{\AMC@invisiblefalse} % \DoNotIndex{\AMC@invisibletrue} % \DoNotIndex{\AMC@ordrefalse} % \DoNotIndex{\AMC@ordretrue} % \DoNotIndex{\AMC@outside@boxfalse} % \DoNotIndex{\AMC@outside@boxtrue} % \DoNotIndex{\AMC@pagelayoutfalse} % \DoNotIndex{\AMC@pagelayouttrue} % \DoNotIndex{\AMC@plainfalse} % \DoNotIndex{\AMC@plaintrue} % \DoNotIndex{\AMC@pdfformfalse} % \DoNotIndex{\AMC@pdfformtrue} % \DoNotIndex{\AMC@automarksfalse} % \DoNotIndex{\AMC@automarkstrue} % \DoNotIndex{\AMC@postcorrectfalse} % \DoNotIndex{\AMC@postcorrecttrue} % \DoNotIndex{\AMC@qblocfalse} % \DoNotIndex{\AMC@qbloctrue} % \DoNotIndex{\AMC@asqblocfalse} % \DoNotIndex{\AMC@asqbloctrue} % \DoNotIndex{\AMC@rblocfalse} % \DoNotIndex{\AMC@rbloctrue} % \DoNotIndex{\AMC@shuffleGfalse} % \DoNotIndex{\AMC@shuffleGtrue} % \DoNotIndex{\AMC@watermarkfalse} % \DoNotIndex{\AMC@watermarktrue} % \DoNotIndex{\AMC@zoneformulairefalse} % \DoNotIndex{\AMC@zoneformulairetrue} % \DoNotIndex{\AMCcomplete@multifalse} % \DoNotIndex{\AMCcomplete@multitrue} % \DoNotIndex{\AMCformulaire@dedansfalse} % \DoNotIndex{\AMCformulaire@dedanstrue} % \DoNotIndex{\AMCtype@multifalse} % \DoNotIndex{\AMCtype@multitrue} % \DoNotIndex{\AMCune@bonnefalse} % \DoNotIndex{\AMCune@bonnetrue} % % \makeatletter % \def\SpecialOptIndex#1{\@bsphack % \index{#1\actualchar{\protect\ttfamily#1} % (option)\encapchar usage}% % \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar % usage}\@esphack} % \makeatother % \def\amccode{\vspace{.8ex}\par} % \begingroup\catcode`\|=11\gdef\Vbar{|}\endgroup % % \title{The \textsf{automultiplechoice} package\thanks{This document % corresponds to version revision: \texttt{@/PACKAGE_V_VC/@} from AMC \texttt{@/PACKAGE_V_DEB_TEX/@}}} % \date{\printdate{@/PACKAGE_V_ISODATE/@}} % \author{Alexis Bienven\"ue \\ \texttt{paamc@passoire.fr}} % % \maketitle % % \begin{abstract} % This package helps designing multiple choice exams ready for automated % marking from papers scans. % % Answers and questions are optionaly shuffled, creating different sheets % for every student. % \end{abstract} % % \section{Introduction} % % The package \textsf{automultiplechoice} helps formatting multiple % choice questionnaries with automated marking from papers scans in % mind: % \begin{itemize} % \item The package can produce different copies of the question sheet % for each student, optionaly shuffling answers and questions for % each student. % \item Markers can be printed on each sheet, so as to be able to % analyse scans after examination. All the needed information about % the position of the markers and the boxes to be checked by the % students is given in an auxiliary file during \LaTeX{} run. % \end{itemize} % % See Auto Multiple Choice (AMC) software % (\url{https://www.auto-multiple-choice.net/}) for an integration of this % package, with user interface for automated marking. % % % \section{Samples}\label{d:samples} % % We begin with several samples to see what can be done with the % \textsf{automultiplechoice} package. All \textsf{automultiplechoice} commands % and options will be detailed further. % % For all these samples, two sets of questions are used: a group of % geography questions, and a group of history questions. These are % defined in a common \LaTeX{} file named |questions.tex|: % \verbatiminput{questions.tex} % % We will ask \textsf{automultiplechoice} package to include two % geography questions and two history questions at random for each % student, shuffling questions and answers, with the following code: %\iffalse %<*doc> %\fi \begin{verbatim} \cleargroup{all} \shufflegroup{geography} \copygroup[2]{geography}{all} \shufflegroup{history} \copygroup[2]{history}{all} \shufflegroup{all} \insertgroup{all} \end{verbatim} %\iffalse % %\fi % You can read these commands as ``clear group |all|, shuffle % questions inside group |geography| and copy the first two to group % |all|, do the same for group |history|, shuffle the four questions % copied into |all| and print them''. % % % \subsection{Standard layout}\label{s:amc} % % A set of 30 students sheets can be produced from the following % \LaTeX{} source named \texttt{sample-amc.tex}: % \verbatiminput{sample-amc.tex} producing a 30-pages document (every % page has number 1), from which we show the first pages on % page~\pageref{p:amc}. % % Note that ``DRAFT'' indications can be cancelled using option {\tt % nowatermark}\SpecialOptIndex{nowatermark}, or using AMC software. % % You can see on each page markers that can be used for automated % completed answer sheets scans analysis: % \begin{itemize} % \item Four circles \makeatletter\m@rqueCalage\makeatother{} are % printed in the corners, to be able to analyse any rotation or % scaling of the scans. % \item Binary boxes are printed in the header area, so as to be able % to read student sheet number and page number. On page~2 for % example, you can see that these binary boxes are coding |2/1/59|: % \makeatletter % \begin{center} % \begin{minipage}[b]{\AMC@CBtaille} % \AMCbin@begin{1}\noindent% % \AMC@binaryBoxes[\AMC@NCBetud]{2}\\ % \AMCbin@begin{2}\noindent% % \AMC@binaryBoxes[\AMC@NCBpage]{1}\ignorespaces% % \AMCbin@begin{3}\AMC@binaryBoxes[\AMC@NCBcheck]{59}% % \end{minipage} % \hbox to 4cm{\hspace*{\fill}% % \texttt{+2/1/59+}} % \end{center} % \makeatother % Here, |2| is the student sheet number, |1| is the page % number for this student, and |59| is a checking value that can be % used for checking correct identification from a scan. % \end{itemize} % % If you also use |calibration| option\SpecialOptIndex{calibration}, % \textsf{automultiplechoice} will produce a |.xy| file with informations % about the exact position in the page of all the markers, and all the % boxes. This option is automatically set by AMC software, which then % use the information in the |.xy| file for automated marking. % % \subsection{Separate answer sheet}\label{s:separate} % % In some situations, you may need a separate answer sheet: % \begin{itemize} % \item this makes cheating even more dificult; % \item this can reduce the number of pages to scan. % \end{itemize} % % This is done using |separateanswersheet| % option\SpecialOptIndex{separateanswersheet} of % \textsf{automultiplechoice} package. You also have to use commands % |\AMCformBegin| to indicate the beginning of this separate answer % sheet (usually after a |\clearpage| or |\AMCcleardoublepage| % command), and |\AMCform| to insert the form to be completed by the % students, as in the following example (|sample-separate.tex|): % \verbatiminput{sample-separate.tex} % % First pages of the result are shown on % page~\pageref{p:separate}. There are now 2 pages per student: the % first with questions, and the second for answers. Only the second % will be completed by the students, and scanned for analysis. % % \subsection{Without markers}\label{s:plain} % % With the |nopage| option\SpecialOptIndex{nopage}, package % \textsf{automultiplechoice} does not include any page markers for scan % processing. I'm afraid you can't use any automated marking software % with this layout, but you can still use answer sheet and corrected % answer sheet (option |indivanswers|\SpecialOptIndex{indivanswers}, % added here) for a manual marking... % % The \LaTeX{} source \texttt{sample-plain.tex} that only differs from % \texttt{sample-amc.tex} by its options passed to % \textsf{automultiplechoice}: %\iffalse %<*doc> %\fi \begin{verbatim} \usepackage[nopage,indivanswers]{automultiplechoice} \end{verbatim} %\iffalse % %\fi % produces a 30-pages document, from which we show the first pages on % page~\pageref{p:plain}. % % \newcommand{\isample}[1]{\IfFileExists{sample-#1.pdf}{\includepdf[pages={1-4},nup=2x2,frame=true,delta=.3cm .3cm,pagecommand={\textbf{First pages from \LaTeX{} source detailed in section~\ref{s:#1} -- see \texttt{sample-#1.pdf}}\label{p:#1}},scale=.6]{sample-#1.pdf}}{}} % \isample{amc} % \isample{separate} % \isample{plain} % % % \section{Usage} % % \subsection{Package options}\label{d:options} % The following options are available for package \textsf{automultiplechoice}: % \def\ioption#1{\item[\texttt{#1}]\SpecialOptIndex{#1}} % \begin{itemize} % \ioption{noshuffle} cancels answers shuffling for all questions. % % \ioption{noshufflegroups} cancels groups shuffling. % % \ioption{answers} produces a common corrected answers sheet. % % \ioption{indivanswers} shows the boxes that corresponds to correct % choices on the question sheet. % % \ioption{box} includes every question in a \LaTeX{} box, so that % they can't be cutted on two different pages. % % \ioption{asbox} does the same for questions in the separate answer sheet. % % \ioption{separateanswersheet} asks for a separate answer sheet (see % section~\ref{s:separate} for an example). Commands |\AMCformBegin| % and |\AMCform| must be used to describe the separate answer sheet % (see section~\ref{d:separate}). % % \ioption{digits} puts digits instead of letters in the boxes, when % |separateanswersheet| (or |insidebox|) is used. % % \ioption{outsidebox} prints boxes labels outside the boxes on the % answersheet when |separateanswersheet| is set. % % \ioption{init} initializes the random generator from % time. \emph{This option is only for testing: don't use it for a real % exam!} % % \ioption{completemulti} adds an answer % ``\makeatletter\AMC@loc@none\makeatother'' at the end of each % multiple question (question with no, one or several correct % answers), so as to make the difference between ``I don't know'' and % ``I think none of the answers are correct''. % % \ioption{insidebox} puts a letter (or a digit if |digits| option is % used) inside the boxes, even if |separateanswersheet| is not % used. The |insidebox| option is implicitely called when using % |separateanswersheet|: no need to call it then. % % \ioption{calibration} asks for logging positions of boxes and % markers in the |.xy| file. Without this option, a \LaTeX{} run % updates the document but not the |.xy| file. % % \ioption{nowatermark} calcels the ``DRAFT'' indications above pages. % % \ioption{catalog} is used for formatting a catalog of questions, not % an exam. Then the questions identifiers will be printed. % % \ioption{francais} asks for french localisation. % % \ioption{lang=XX} asks for localisation in |XX| language. At % present, only |DE| (German), |ES| (Spanish), |FR| (French), |IT| % (Italian), |JA| (Japanese), |NO| (Norwegian) and |NL| (Dutch) are available. % % \ioption{plain} cancels \textsf{environ} and \textsf{etex} automatic % loading. The default behaviour is to load \textsf{environ} and % \textsf{etex} packages if available, as they improve % \textsf{automultiplechoice}. This is not done when |plain| option is set. % % \ioption{nopage} cancels markers print and page layout definition % (see sample in section~\ref{s:plain}). % % \ioption{automarks}, when used with |separateanswersheet|, cancels % markers print on the subject page (they are only shown on the answer % sheet pages). % % \ioption{postcorrect} tells that correct answers won't be given in % the LaTeX source. The teacher will fill one answer sheet for AMC to % analyse the scan and set correct answers from it. % % \ioption{fullgroups} cancels the use of the optional parameter of % |\insertgroup| and |\copygroup|, so that each group is always fully % inserted and fully copied. % % \ioption{storebox} asks to use |\storebox| instead of |\savebox| to % handle ovals (when using oval shape). The package |storebox| will be % loaded. % % \ioption{pdfform} use this option to produce PDF forms. The PDF % sheet won't be printed, but filled by each student with a PDF % reader. The completed PDF will then be sent to the teacher, and % given to AMC for data capture. % \end{itemize} % % See also section~\ref{d:french} for a french version of some of % these options. % % \subsection{Questions and answers} % % We make a difference between two kind of multiple choice questions: % \begin{itemize} % \item \textbf{Simple questions}: there is one and only one correct % choices among the proposed choices, \emph{and this is announced to % the student}. Thus, the student is asked to check one answer if he % thinks this is the good one, and to check none if he has no idea. % \item \textbf{Multiple questions}: there can be zero, one or several % correct choices among the proposed choices. This is also announced % to the student (using the |\multiSymbole| sign, with % default~\multiSymbole{}), so that the student is asked to check all % the boxes corresponding to correct choices, and to let unchecked % all boxes corresponding to wrong choices. % \end{itemize} % % \DescribeEnv{question}\DescribeEnv{questionmult} % Simple questions are enclosed in a |{question}|\marg{id} % environment, and multiple questions are enclosed in a % |{questionmult}|\marg{id} environment. These environments contain % the question text, and the proposed choices inside a |choices|-like % environment (see next). The \meta{id} argument is a question % identifier. Each question must have a unique identifier, different % from the other questions identifiers. % % \vspace{2ex} % \begin{code} % \begin{question}{everest} % What is the elevation of Mount Everest? % \begin{choices} % \correctchoice{8,848\,m} % \wrongchoice{8,253\,m} % \wrongchoice{8,810\,m} % \end{choices} % \end{question} % % \begin{questionmult}{americas} % Which contries are in the Americas? % \begin{choices} % \correctchoice{Guatemala} % \correctchoice{Canada} % \wrongchoice{Switzerland} % \wrongchoice{Cambodia} % \end{choices} % \end{questionmult} % \end{code} % \vspace{2ex} % % \DescribeMacro{\AMCcompleteMulti}\DescribeMacro{\AMCnoCompleteMulti} % For multiple questions, it is sometimes useful to make the % difference between a student who thinks that none of he choices are % correct, and a student who did not answer the question. The use of % package option |completemulti| can be used in this case: it % adds a choice to all multiple questions. Commands |\AMCcompleteMulti| and % |\AMCnoCompleteMulti| can also be used to change this behaviour for a % single question. % % \vspace{2ex} % \begin{code} % \begin{questionmult}{americas} % \AMCcompleteMulti % Which contries are in the Americas? % \begin{choices} % \correctchoice{Guatemala} % \correctchoice{Canada} % \wrongchoice{Switzerland} % \wrongchoice{Cambodia} % \end{choices} % \end{questionmult} % \end{code} % \vspace{2ex} % % \DescribeEnv{choices}\DescribeEnv{choiceshoriz}\DescribeEnv{choicescustom} % Depending on the formatting style for answers, one can choose one of % the following ones: % \begin{itemize} % \item Environment |choices| is usualy chosen for long answers: % \amccode % \begin{code} % \begin{questionmult}{latex} % What are the possible uses of latex? % \begin{choices} % \correctchoice{Natural rubber is % the most important product % obtained from latex.} % \correctchoice{Latex from the chicle % and jelutong trees is used in % chewing gum.} % \wrongchoice{Latex is used as a fuel % for some space launch vehicles.} % \end{choices} % \end{questionmult} % \end{code} % \item environment |choiceshoriz| is chosen for short answers: % \amccode % \begin{code} % \begin{question}{insect} % From those animals, which % is an insect? % \begin{choiceshoriz} % \correctchoice{Ant} % \wrongchoice{Horse} % \wrongchoice{Turtle} % \end{choiceshoriz} % \end{question} % \end{code} % % \item environment |choicescustom| is provided to customize answers % formatting. See~\ref{c:answers} for details. % \end{itemize} % % \DescribeMacro{\correctchoice}\DescribeMacro{\wrongchoice} As you % have seen in these examples, the |choices|-like environments contain % |\correctchoice|\marg{text} and |\wrongchoice|\marg{text} commands, % with the text of the proposed choice as argument. % % \subsection{Scoring} % % \DescribeMacro{\scoring}\DescribeMacro{\scoringDefaultM} % \DescribeMacro{\scoringDefaultS}\DescribeMacro{\QuestionIndicative} % Scoring strategies can be given in the \LaTeX{} source. They don't % have any impact on the question sheet: they are only transmitted to % the analysis software through the |.amc| file. See AMC documentation % to write proper commands for your needs. |\scoring|\marg{score} can % be used inside a |question| or |questionmult| environment to % describe the scoring strategy for the question, or after a % |\correctchoice| or |\wrongchoice| command to describe score % associated to a particular choice. |\scoringDefaultM|\marg{score} % and |\scoringDefaultS|\marg{score} define default scoring strategies % for multiple and simple questions. |\QuestionIndicative| tags a % question that is not taken into account to compute the mark -- for % example, it can be used for a question about the way students have % enjoyed the course. % % \subsection{Groups of questions}\label{d:groups} % % Several commands are available that allows shuffling questions for % each question sheet. They handle groups of questions. These groups % will usualy contain questions, but can be made of any \LaTeX{} content. % % \DescribeMacro{\element}\DescribeMacro{\shufflegroup}\DescribeMacro{\insertgroup}\DescribeMacro{\insertgroupfrom} % The command |\element|\marg{groupname}\marg{content} adds element % with content \meta{content} to the group named \meta{groupname}. % The command |\shufflegroup|\marg{groupname} shuffles elements of % group named \meta{groupname}. The command % |\insertgroup|\oarg{n}\marg{groupname} inserts elements of group % \meta{groupname} one after one. If optional parameter \meta{n} is % given, only the first \meta{n} elements of the group are inserted in % the document. The command % |\insertgroupfrom|\oarg{n}\marg{groupname}\marg{i} does the same, % starting from element at index \meta{i} (the first element has index % 0). % % As an example without questions in groups elements, consider the % following code: % %\iffalse %<*doc> %\fi \begin{verbatim} \element{serie}{ one} \element{serie}{ two} \element{serie}{ three} \element{serie}{ four} \element{serie}{ five} Numbers:\insertgroup{serie}. Three numbers from the second (index=1) one:\insertgroupfrom[3]{serie}{1}. \shufflegroup{serie} Two of them:\insertgroup[2]{serie}. \end{verbatim} %\iffalse % %\fi % which produces: % \AMCrandomseed{1237893} % \element{serie}{ one} % \element{serie}{ two} % \element{serie}{ three} % \element{serie}{ four} % \element{serie}{ five} % \begin{center}\fbox{\begin{minipage}{.7\linewidth} % Numbers:\insertgroup{serie}. % % Three numbers from the second (index=1) one:\insertgroupfrom[3]{serie}{1}. % % \shufflegroup{serie} % Two of them:\insertgroup[2]{serie}. % \end{minipage}}\end{center} % % \DescribeMacro{\cleargroup}\DescribeMacro{\copygroup}\DescribeMacro{\copygroupfrom} % The command |\cleargroup|\marg{groupname} clears all the elements of % group \meta{groupname}, making an empty group. The command % |\copygroup|\oarg{n}\marg{from}\marg{to} copies the elements of % group \meta{from} to grou \meta{to} -- if optional parameter % \meta{n} is given, only the \meta{n} first elements are copied. The % command |\copygroupfrom|\oarg{n}\marg{from}\marg{to}\marg{i} does the % same, starting from element at index \meta{i} (the first element has % index 0). % % As an example again without questions, consider the following % code: %\iffalse %<*doc> %\fi \begin{verbatim} \element{digits}{ 1}\element{digits}{ 2}\element{digits}{ 3} \element{digits}{ 4}\element{digits}{ 5}\element{digits}{ 6} \element{digits}{ 7}\element{digits}{ 8}\element{digits}{ 9} \element{letters}{ A}\element{letters}{ B}\element{letters}{ C} \element{letters}{ D}\element{letters}{ E}\element{letters}{ F} \shufflegroup{letters} \cleargroup{mixed} \copygroupfrom[3]{digits}{mixed}{1}\copygroup[2]{letters}{mixed} \shufflegroup{mixed} Three digits from 2 to 4 and two letters:\insertgroup{mixed}. \shufflegroup{digits}\shufflegroup{letters} \cleargroup{mixed} \copygroup[3]{digits}{mixed}\copygroup[2]{letters}{mixed} \shufflegroup{mixed} Three digits and two letters:\insertgroup{mixed}. \shufflegroup{digits}\shufflegroup{letters} \cleargroup{mixed} \copygroup[3]{digits}{mixed}\copygroup[2]{letters}{mixed} \shufflegroup{mixed} Three digits and two letters:\insertgroup{mixed}. \end{verbatim} %\iffalse % %\fi % which produces: % \AMCrandomseed{1237899} % \element{digits}{ 1} % \element{digits}{ 2} % \element{digits}{ 3} % \element{digits}{ 4} % \element{digits}{ 5} % \element{digits}{ 6} % \element{digits}{ 7} % \element{digits}{ 8} % \element{digits}{ 9} % \element{letters}{ A} % \element{letters}{ B} % \element{letters}{ C} % \element{letters}{ D} % \element{letters}{ E} % \element{letters}{ F} % \begin{center}\fbox{\begin{minipage}{.7\linewidth} % \shufflegroup{letters} % \cleargroup{mixed} % \copygroupfrom[3]{digits}{mixed}{1}\copygroup[2]{letters}{mixed} % \shufflegroup{mixed} % Three digits from 2 to 4 and two letters:\insertgroup{mixed}. % % \shufflegroup{digits}\shufflegroup{letters} % \cleargroup{mixed} % \copygroup[3]{digits}{mixed}\copygroup[2]{letters}{mixed} % \shufflegroup{mixed} % Three digits and two letters:\insertgroup{mixed}. % % \shufflegroup{digits}\shufflegroup{letters} % \cleargroup{mixed} % \copygroup[3]{digits}{mixed}\copygroup[2]{letters}{mixed} % \shufflegroup{mixed} % Three digits and two letters:\insertgroup{mixed}. % \end{minipage}}\end{center} % % % You can find an example involving questions in % section~\ref{d:samples}. % % \subsection{Students identification} % % \DescribeMacro{\namefield}\DescribeMacro{\AMCcodeGrid}\DescribeMacro{\AMCcodeGridInt} % There are two ways to associate students to their sheets. % \begin{itemize} % \item Always add to one page of each copy some place for the student % to write down his name. If you want AMC software to be able to cut % the scan arount this area to present it to you and ask you to read % the written name (this is called manual association), you must use % the |\namefield|\marg{descr} command. The \meta{descr} argument % contains the \LaTeX{} code used to format the name field on the % page. For example: % \vspace{2ex} % \begin{code} % \namefield{\fbox{ % \begin{minipage}{15em} % Name and surname:\vspace*{3ex}\par % \noindent\dotfill\vspace{2mm} % \end{minipage} % }} % \end{code} % \vspace{2ex} % You can see that the |\namefield| command has no effect on the % produced document. In fact, its only purpose is to log in the % |.xy| file information about the position of the name field on the % page, to be used by the software analysing the scans. % \item For automated student identification, if for example students % have a 6-digits student number, you can ask them to code it % somewhere on the question sheet. This can be done using the % |\AMCcodeGridInt|\oarg{opts}\marg{key}\marg{ndigits} command, % where \meta{key} is the key identifier, that can be used to % retrieve coded student numbers from the scans, and \meta{ndigits} % is the number of digits for numbers to be coded. \vspace{2ex} % \begin{code} % \AMCcodeGridInt{student}{6} % % \end{code} % % For smaller number of digits, the ``horizontal'' form can be preferred: % {\PexaDefaults{samplewidth=.7\PexaWidth} % \vspace{2ex} % \begin{code} % \AMCcodeGridInt[h]{student}{3} % \end{code} % } % \end{itemize} % % \subsection{Separate answer sheet}\label{d:separate} % % \DescribeMacro{\AMCformBegin}\DescribeMacro{\AMCform} % \DescribeMacro{\AMCcleardoublepage} % To produce separate answer sheets as seen in section~\ref{s:separate}, % \begin{enumerate} % \item use the % \SpecialOptIndex{separateanswersheet}|separateanswersheet| package % option. % \item use the |\AMCformBegin| command at the beginning of the answer % sheet description. This command usualy follows a command to get a % new page. This command can be the classical |\clearpage| for % single-sided question sheets, or the |\AMCcleardoublepage| % command, that go to the next odd numbered page, so that the answer % sheet is on a separate sheet even when printing in duplex mode. % \item use the |\AMCform| command to insert all boxes for all % questions. % \end{enumerate} % % See section~\ref{s:separate} for an example. % % \subsection{Random computation questions} % % One can use the \LaTeX{} package \textsf{fp} to make random computation % questions, as can be seen in the following example (don't forget to % load package \textsf{fp}): % \amccode % {\makeatletter\AMC@correctrue\makeatother % \begin{code} % \begin{question}{simplesum} % \FPeval\VQa{trunc(1+random*8,0)} % \FPeval\VQb{trunc(4+random*5,0)} % \FPeval\VQsum{clip(VQa+VQb)} % \FPeval\VQnoA{clip(VQa+VQb-1)} % \FPeval\VQnoB{clip(VQa*VQb)} % \FPeval\VQnoC{clip(VQa-VQb)} % How much are \VQa{} plus \VQb{}? % \begin{choiceshoriz} % \correctchoice{\VQsum} % \wrongchoice{\VQnoA} % \wrongchoice{\VQnoB} % \wrongchoice{\VQnoC} % \end{choiceshoriz} % \end{question} % \end{code} % } % In this example, |\VQa| and |\VQb| are used to store two random % integers (the first between 1 and 8, and the second between 4 and % 8). Then |\VQsum| stores the sum of these two integers, and % |\VQnoA|, |\VQnoB| and |\VQnoC| are other values that will be used % as distractors in the multiple choice question. % % \DescribeMacro{\AMCIntervals}In some cases, command % |\AMCIntervals|\marg{x}\marg{x0}\marg{x1}\marg{delta} from % \textsf{automultiplechoice} can be useful. It adds a sequence of choices % made of intervals $[x_i,x_i+\delta[$ of length \meta{delta} covering % the interval $[\meta{x0},\meta{x1}[$, using |\correctchoice| when % \meta{x} lies in the interval, and |\wrongchoice| otherwise. % %\iffalse %<*doc> %\fi \begin{verbatim} \begin{question}{inf-expo-indep} \FPeval\VQa{trunc(2 + random * 4,0)} \FPeval\VQb{trunc(6 + random * 5,0)} \FPeval\VQr{VQa/(VQa+VQb)} Let $X$ and $Y$ be two independent random variables, following exponential laws with respective parameters \VQa{} and \VQb{}. In which interval lies the probability $\textrm{P}[X %\fi % {\makeatletter\AMC@correctrue\makeatother % \fbox{ % \begin{minipage}{.9\linewidth} % \begin{question}{inf-expo-indep} % \FPeval\VQa{trunc(2 + random * 4,0)} % \FPeval\VQb{trunc(6 + random * 5,0)} % \FPeval\VQr{VQa/(VQa+VQb)} % % Let $X$ and $Y$ be two independent random variables, following % exponential laws with respective parameters \VQa{} and \VQb{}. % In which interval lies the probability $\textrm{P}[X %\fi \begin{verbatim} \begin{questionmultx}{sqrt} \FPeval\VQa{trunc(5+random*15,0)} \FPeval\VQs{VQa^0.5} Compute $\sqrt{\VQa}$ and round it with two digits after period. \AMCnumericChoices{\VQs}{digits=3,decimals=2,sign=true, borderwidth=0pt,backgroundcol=lightgray,approx=5} \end{questionmultx} \end{verbatim} %\iffalse % %\fi % \begin{center} % {\makeatletter\AMC@correctrue\AMC@outside@boxtrue\makeatother % \fbox{ % \begin{minipage}{.7\linewidth} % \begin{questionmultx}{sqrt} % \FPeval\VQa{trunc(5+random*15,0)} % \FPeval\VQs{VQa^0.5} % % Compute $\sqrt{\VQa}$ and round it up to two digits after period. % % \AMCnumericChoices{\VQs}{digits=3,decimals=2,sign=true, % borderwidth=0pt,backgroundcol=lightgray,approx=5} % \end{questionmultx} % \end{minipage} % }} % \end{center} % % Note the use of |questionmultx| environment: we need this question % to be \emph{multiple} as several boxes has to be ticked, but we % can't say that \emph{several answers are correct}, so we don't show % the \multiSymbole. % % Available options that can be used in the second argument of the % |\AMCnumericChoices| command are the following (\meta{bool} can % be |true| or |false|, and \meta{color} must be a color known by the |xcolor| package): % \begin{itemize}\setlength{\itemindent}{5em} % \item[|digits=|\meta{num}] gives the number of digits to request % (defaults to 3). % \item[|decimals=|\meta{num}] gives the number of digits after % period to request (defaults to 0). Note that when |decimals| is % positive, the LaTeX package |fp| must be loaded. % \item[|base=|\meta{num}] gives the base for digits and decimals (defaults to 10). % \item[|significant=|\meta{bool}] if |true|, the numbers to code % are the first \emph{significant} digits from the first argument % of |\AMCnumericChoices|. For example, the right answer to % |\AMCnumericChoices|\linebreak[2]|{56945.23}|\linebreak[2]|{digits=2,significant=true}| % is 57. % \item[|exponent=|\meta{num}] gives the number of digits for the % exponent, when requesting to enter the result in scientific % notation. % \item[|nozero=|\meta{bool}] if |true|, the choice 0 is removed for % all digits. May be useful when |\AMCnumericChoices| is used to % get a small ($<10$) positive value. % \item[|sign=|\meta{bool}] requests (or not) a signed value (default to true). % \item[|exposign=|\meta{bool}] requests (or not) a signed value of % the exponent (default to true). % \item[|strict=|\meta{bool}] if |true|, a box has to be ticked for % every digit and for the sign. If |false|, if some digits has no % ticked box, they will be set to zero. Defaults to |false|. % \item[|vertical=|\meta{bool}] if |true|, each digit is represented % on one raw. If |false| (default), each digit is represented on one % line. % \item[|expovertical=|\meta{bool}] if |true|, the mantissa is above % the exponent. If |false| (default), the mantissa is beside the % exponent. % \item[|reverse=|\meta{bool}] if |true|, place higher values of the % digits on the top in vertical mode (defaults to |true|). % \item[|vhead=|\meta{bool}] if |true|, in vertical mode, a header % is placed over all digits rows, made using the command % |\AMCntextVHead| that is originally defined as % |\def\AMCntextVHead#1{\emph{b#1}}|. This default value is % useful to number the binary digits. Default value is |false|. % \item[|hspace=|\meta{space}] sets the horizontal space between % boxes (defaults to |.5em|). % \item[|vspace=|\meta{space}] sets the certical space between % boxes (defaults to |1ex|). % \item[|borderwidth=|\meta{space}] sets the width of the frame % around all the boxes (defaults to |1mm|). % \item[|bordercol=|\meta{color}] sets the color of the frame % (defaults to |lightgray|). % \item[|backgroundcol=|\meta{color}] sets the background color % (defaults to |white|). % \item[|Tsign=|\meta{text}] sets the text to print at the top of the % boxes to set the sign (Can also be redefined by % |\def\AMCntextSign|\marg{text}, and defaults to be empty). % \item[|Tpoint=|\meta{text}] sets the text for the period. Can also % be redefined by |\def\AMCdecimalPoint|\marg{text}, and defaults % to |\raisebox{1ex}{\bf .}|. % \item[|Texponent=|\meta{text}] sets the text before the exponent. Can also % be redefined by |\def\AMCexponent|\marg{text}, and defaults % to |$\times10$\textasciicircum|. % \item[|scoring=|\meta{bool}] if |true|, a scoring strategy is given % to AMC for this question. Defaults to |true|. % \item[|scoreexact=|\meta{num}] gives the score for an exact answer (defaults to 2). % \item[|exact=|\meta{num}] sets the maximal distance to the % correct integer value (value without the decimal point) for an % answer to be said \emph{exact} and be rewarded to % |scoreexact| points (defaults to 0). % \item[|scoreapprox=|\meta{num}] gives the score for an approximative answer (defaults to 1). % \item[|approx=|\meta{num}] sets the maximal distance to the % correct integer value (value without the decimal point) for an % answer to be said \emph{approximative} and be rewarded to % |scoreapprox| points (defaults to 0). % \item[|scorewrong=|\meta{num}] gives the score for a wrong answer (defaults to 0). % \end{itemize} % % The text added at the end of the questions using % |\AMCnumericChoices| when not in the separate answer sheet (and % when a separate answer sheet is requested by the % |separateanswersheet| package option) can also be set redefining % the |\AMCntextGoto| command, as: % %\iffalse %<*doc> %\fi \begin{verbatim} \def\AMCntextGoto{\par{\bf\emph{Please code the answer on the separate answer sheet.}}} \end{verbatim} %\iffalse % %\fi % % \subsection{French command names}\label{d:french} % For backward compatibility, some of \textsf{automultiplechoice} % commands, environments and package option have their French % counterpart. You can always use either the English command or the % French equivalent. See table~\ref{t:french} for details. % % \begin{table}[htb]\centering % \SpecialUsageIndex{\champnom} % \SpecialUsageIndex{\bonne} % \SpecialUsageIndex{\mauvaise} % \SpecialUsageIndex{\alafin} % \SpecialUsageIndex{\choixIntervalles} % \SpecialUsageIndex{\bareme} % \SpecialUsageIndex{\baremeDefautM} % \SpecialUsageIndex{\baremeDefautS} % \SpecialUsageIndex{\exemplaire} % \SpecialUsageIndex{\melangegroupe} % \SpecialUsageIndex{\restituegroupe} % \SpecialUsageIndex{\formulaire} % \SpecialUsageIndex{\AMCdebutFormulaire} % \SpecialEnvIndex{reponses} % \SpecialEnvIndex{reponseshoriz} % \SpecialEnvIndex{reponsesperso} % \SpecialEnvIndex{copieexamen} % \SpecialOptIndex{ordre} % \SpecialOptIndex{correc} % \SpecialOptIndex{correcindiv} % \SpecialOptIndex{bloc} % \SpecialOptIndex{ensemble} % \SpecialOptIndex{chiffres} % \begin{tabular}{\Vbar c\Vbar c\Vbar c\Vbar } % \hline % type & English & French \\ % \hline % command & |\namefield| & |\champnom| \\ % environment & |choices| & |reponses| \\ % environment & |choiceshoriz| & |reponseshoriz| \\ % environment & |choicescustom| & |reponsesperso| \\ % command & |\correctchoice| & |\bonne| \\ % command & |\wrongchoice| & |\mauvaise| \\ % command & |\lastchoices| & |\alafin| \\ % command & |\AMCIntervals| & |\choixIntervalles| \\ % \hline % command & |\scoring| & |\bareme| \\ % command & |\scoringDefaultM| & |\baremeDefautM| \\ % command & |\scoringDefaultS| & |\baremeDefautS| \\ % \hline % command & |\onecopy| & |\exemplaire| \\ % environment & |examcopy| & |copieexamen| \\ % \hline % command & |\shufflegroup| & |\melangegroupe| \\ % command & |\insertgroup| & |\restituegroupe| \\ % \hline % command & |\AMCform| & |\formulaire| \\ % command & |\AMCformBegin| & |\AMCdebutFormulaire| \\ % \hline % option & |noshuffle| & |ordre| \\ % option & |answers| & |correc| \\ % option & |indivanswers| & |correcindiv| \\ % option & |box| & |bloc| \\ % option & |separateanswersheet| & |ensemble| \\ % option & |digits| & |chiffres| \\ % \hline % \end{tabular} % \caption{French equivalent commands}\label{t:french} % \end{table} % % \subsection{Customisation} % % \subsubsection{Boxes} % \DescribeMacro{\AMCboxStyle} The command |\AMCboxStyle|\marg{style} % can be used to specify the shape, color and dimensions of the boxes % to be ticked. The argument \meta{style} is a coma-separated list of % \meta{key}|=|\meta{value} pairs, with the following possible % \meta{key}s: % \begin{itemize} % \item[|shape|] for the shape to be used: either |square| or % |oval|. Note that if |oval| is used, the \LaTeX{} package |tikz| % must be loaded. % \item[|width|] for the width of the boxes. % \item[|height|] for the height of the boxes. % \item[|size|] for the size of the boxes (sets |width| and |height|). % \item[|down|] for the length the boxes are to be moved down. % \item[|rule|] for the rule width. % \item[|outsidesep|] for the distance between the box and the letter % when printed outside the box. % \item[|color|] for the color (only the box that are to be filled by % the students and will be used for data capture). Use something % that will be understood by the |xcolor| package. % \end{itemize} % Default values are |\AMCboxStyle{shape=square,size=2.5ex,down=.4ex,rule=.5pt,outsidesep=.1em,color=black}| % % {\makeatletter\AMC@inside@boxtrue\makeatother % Setting the box color allows to print the boxes with some color that % won't disturb too much the data capture (for example red, but some % light grey can also be considered).\amccode % \begin{code} % \AMCboxStyle{shape=oval,color=red} % \begin{question}{sum}$2+2={}$ % \begin{choiceshoriz}[o] % \wrongchoice{1}\correctchoice{4}\wrongchoice{10} % \end{choiceshoriz} % \end{question} % \end{code} % } % % \subsubsection{Codes} % One may adapt the codes rendering from |\AMCcodeGrid| to one's needs % modifying the following lengths: % \begin{itemize} % \item |\AMCcodeHspace| is the amount of horizontal space between two % columns of digits, % \item |\AMCcodeVspace| is the amount of vertical space between two % rows of digits, % \end{itemize} % Default values are |\AMCcodeHspace=.5em| % |\AMCcodeVspace=.5em| % % \subsubsection{Answers}\label{c:answers} % Environment |choicescustom| will make use of the three commands % |\AMCbeginAnswer| (before the first answer), |\AMCendAnswer| % (after the last answer) and |\AMCanswer|\marg{box}\marg{text} (for % each answer) to format the answers. Redefining them properly, some % different answers formatting can be achieved. However, this does % not seem to work with non-trivial settings... \amccode % \begin{code} % \begin{question}{add} % \def\AMCbeginAnswer{$\Big($} % \def\AMCendAnswer{$\Big)$} % \def\AMCanswer#1#2{#1 #2\hfill} % 2+2= % \begin{choicescustom} % \correctchoice{4} % \wrongchoice{2} % \wrongchoice{3} % \end{choicescustom} % \end{question} % \end{code} % % \section{Implementation} % % This package uses the following other packages: % \begin{macrocode} \RequirePackage{xcolor} % \fcolorbox to fill (or not) a box \RequirePackage{fancyhdr} % \pagestyle{empty} \RequirePackage{bophook} % \AtBeginPage \RequirePackage{xkeyval} % \setkeys \RequirePackage{rotating} % \rotatebox \RequirePackage{fancybox} % \boxput \RequirePackage{expl3} % \end{macrocode} % \begin{macro}{\AMC@amclog}\begin{macro}{\AMCmessage} % Informations about questions and choices will be logged to a file % with extension |amc|, to be parsed later. Macro |\AMC@amclog| % writes to this file. % \begin{macrocode} \newwrite\AMC@logfile \immediate\openout\AMC@logfile=\jobname.amc \def\AMC@amclog#1{\immediate\write\AMC@logfile{#1}} \def\AMCmessage#1{\AMC@amclog{AUTOQCM[#1]^^J}} % \end{macrocode}\end{macro}\end{macro} % % \begin{macro}{\AMC@LR} % Colours management can be faulty in right-to-left mode: in these % situations, we will make use of |\LR| from package \textsf{bidi} to % get back to left-to-right mode. |\AMC@LR| is |\LR| if \textsf{bidi} % is loaded. % \begin{macrocode} \AtBeginDocument{\@ifpackageloaded{bidi}{% \PackageInfo{automultiplechoice}{Package bidi loaded: using LR for boxes.}% \let\AMC@LR=\LR}% {\let\AMC@LR=\relax}}% % \end{macrocode} % \end{macro} % % \subsection{Variables} % % Counters and boolean variables defined here are internal and should % not be modified by the user. % % The package defines the following counters: % \begin{description} % \item |\AMCload@counter| number of choices already loaded for % current question. % \item |\AMCid@quest| current question ID number (see section~\ref{s:keyid}). % \item |\AMCid@etud| current student sheet number. % \item |\AMCid@etudstart| starting student sheet number of the % current |onecopy| bloc. % \item |\AMCid@check| current page checking number. % \item |\AMCid@etudfin| last student sheet number for the exam. % \item |\AMCnum@copies| number of exam sheets to produce. % \end{description} % % It also defines the following switches: % \begin{description} % \item |\ifAMC@ordre| if choices are never to be shuffled. % \item |\ifAMC@shuffleG| if groups shuffling is allowed. % \item |\ifAMC@fullGroups| if groups are always fully inserted by % |\insertgroup| and fully copied by |\copygroup|, irrespective to % the optional parameter. % \item |\ifAMC@correchead| if some correction header is to be printed % at the beginning. % \item |\ifAMC@affichekeys| if questions keys are to be printed. % \item |\ifAMC@correc| if correct choices are to be checked on the % produced document. % \item |\ifAMC@qbloc| if questions are to be included in \LaTeX{} % boxes (so that they can't be splitted on two different pages). % \item |\ifAMC@asqbloc| if questions are to be included in \LaTeX{} % boxes in the answer sheet (so that they can't be splitted on two % different pages). % \item |\ifAMC@rbloc| if answers are to be included in \LaTeX{} boxes % (so that they can't be splitted on two different columns for % example). % \item |\ifAMCcomplete@multi| if a choice % ``\makeatletter\AMC@loc@none\makeatother'' is to be added to every % multiple question. % \item |\ifAMCquestionNumber| if AMC should step up the question % number for each new question. % \item |\ifAMC@calibration| if this \LaTeX{} run is used to get page layouts. % \item |\ifAMC@plain| if \textsf{automultiplechoice} won't try to load % useful packages (\textsf{etex}, \textsf{environ}) that extend % \textsf{automultiplechoice} capabilities. % \item |\ifAMCune@bonne| if there is at least one correct answer for the current question. % \item |\ifAMCtype@multi| if the current question is a multiple question. % \item |\ifAMC@watermark| if the document is a draft, not to be used for exam. % \item |\ifAMC@ensemble| if answers are to be given on a separate % answers sheet. % \item |\ifAMC@inside@box| if a letter or digit is to be printed % inside all boxes. % \item |\ifAMC@inside@digit| if digits are to be written inside % boxes instead of letters (when using a separate answer sheet for % example). % \item |\ifAMC@outside@box| if labels for boxes are to be printed outside % the box on the answer sheet. % \item |\ifAMCformulaire@dedans| is true for questions inside % separate answer sheet. % \item |\ifAMC@zoneformulaire| is true for codes (made by |\AMCcodeGrid|) % inside separate answer sheet. % \item |\ifAMC@pagelayout| is true if the AMC page layout, with signs % for scan analysis, is to be used. % \item |\ifAMC@postcorrect| corresponds to the use of the % |postcorrect| package option. % \item |\ifAMC@automarks| corresponds to the use of the % |automarks| package option. % \item |\ifAMC@invisible| is true is the DVI/PDF output is not % important (used for example for scoring strategy extraction). % \item |\ifAMC@pdfform| is true if the output is a PDF form. This PDF % will not be printed but will be filled by the students with a PDF % reader and sent back to the teacher. % \end{description} % \begin{macrocode} \newcount\AMCload@counter \newcount\AMCid@quest\AMCid@quest=-1 \newcount\AMCid@check \newcount\AMCid@etud\AMCid@etud=0 \newcount\AMCid@etudstart\AMCid@etudstart=0 \newcount\AMCid@etudfin \newcount\AMCnum@copies % \end{macrocode} % \begin{macrocode} \newif\ifAMC@ordre\AMC@ordrefalse \newif\ifAMC@shuffleG\AMC@shuffleGtrue \newif\ifAMC@fullGroups\AMC@fullGroupsfalse \newif\ifAMC@correchead\AMC@correcheadfalse \newif\ifAMC@affichekeys\AMC@affichekeysfalse \newif\ifAMC@correc\AMC@correcfalse \newif\ifAMC@qbloc\AMC@qblocfalse \newif\ifAMC@asqbloc\AMC@asqblocfalse \newif\ifAMC@rbloc\AMC@rblocfalse \newif\ifAMCcomplete@multi\AMCcomplete@multifalse \newif\ifAMCquestionNumber\AMCquestionNumbertrue \newif\ifAMC@calibration\AMC@calibrationfalse \newif\ifAMC@catalog\AMC@catalogfalse \newif\ifAMC@plain\AMC@plainfalse \newif\ifAMCune@bonne \newif\ifAMCtype@multi \newif\ifAMC@watermark\AMC@watermarktrue \newif\ifAMC@inside@box\AMC@inside@boxfalse \newif\ifAMC@outside@box\AMC@outside@boxfalse \newif\ifAMC@ensemble\AMC@ensemblefalse \newif\ifAMC@inside@digit\AMC@inside@digitfalse \newif\ifAMCformulaire@dedans\AMCformulaire@dedansfalse \newif\ifAMC@zoneformulaire \newif\ifAMC@pagelayout\AMC@pagelayouttrue \newif\ifAMC@postcorrect\AMC@postcorrectfalse \newif\ifAMC@automarks\AMC@automarksfalse \newif\ifAMC@invisible\AMC@invisiblefalse \newif\ifAMC@pdfform\AMC@pdfformfalse \let\AMCcompleteMulti=\AMCcomplete@multitrue \let\AMCnoCompleteMulti=\AMCcomplete@multifalse % \end{macrocode} % % \begin{macro}{\AMCid@name} % The package also defines command |\AMCid@name| to be the current % question identifier key. % \begin{macrocode} \def\AMCid@name{} % \end{macrocode}\end{macro} % % \subsection{Dimensions} % % \begin{macro}{\AMCformVSpace}\begin{macro}{\AMCformHSpace} % \begin{macro}{\AMCinterIrep}\begin{macro}{\AMCinterBrep} % The following dimensions can be modified by the user to adjust % questions formatting: % \begin{description} % \item |\AMCformVSpace| is the amount of vertical space between two % questions in a separate answer sheet. % \item |\AMCformHSpace| is the amount of horizontal space between two % answers boxes in a separate answer sheet. % \item |\AMCinterIrep| is the amount of vertical space to be added % between two answers. % \item |\AMCinterBrep| is the amount of vertical space between two % boxed answers (see |\AMCBoxedAnswers| and |\ifAMC@rbloc|). % \item |\AMCinterIquest| is the amount of vertical space left after a % question, in standard mode (without package option |box|). % \item |\AMCinterBquest| is the amount of vertical space left after a % question, in 'boxed' mode (with package option |box|). % \item |\AMCpostOquest| is the amount of vertical space left after an % open question. % \end{description} % \begin{macrocode} \newdimen\AMCformVSpace\AMCformVSpace=1.2ex \newdimen\AMCformHSpace\AMCformHSpace=.3em \newdimen\AMCinterIrep\AMCinterIrep=\z@ \newdimen\AMCinterBrep\AMCinterBrep=.5ex \newdimen\AMCinterIquest\AMCinterIquest=\z@ \newdimen\AMCinterBquest\AMCinterBquest=3ex \newdimen\AMCpostOquest\AMCpostOquest=7mm % \end{macrocode}\end{macro}\end{macro}\end{macro}\end{macro} % % \subsection{Human readable sheet ID position} % % \begin{macro}{\AMCidsPosition} % The position of the human readable sheet ID, near the corresponding % binary boxes, is set with the |\AMCidsPosition| command, in the form % |\AMCidsPosition{pos=|\meta{position}|,width=|\meta{width}|,height=|\meta{height}|}|, % where \meta{position} is one of |side| (default), |top| and |none|, % \meta{width} is the width of the box enclosing the ID (default value is % |4cm|), and \meta{height} is the height of the box enclosing the ID % (default value is |3ex|). % % \begin{macrocode} \newif\ifAMCids@top \newif\ifAMCids@side \newdimen\AMCids@width \newdimen\AMCids@height \define@choicekey*{AMCids}{pos}[\AMCidsVar\AMCidsVarN]{none,top,side}{% \ifcase\AMCidsVarN\relax \AMCids@topfalse\AMCids@sidefalse \or \AMCids@toptrue\AMCids@sidefalse \or \AMCids@topfalse\AMCids@sidetrue \fi } \define@key{AMCids}{width}{\AMCids@width=#1} \define@key{AMCids}{height}{\AMCids@height=#1} \def\AMCidsPosition#1{\setkeys{AMCids}{#1}} \AMCidsPosition{pos=side,width=4cm,height=3ex} % \end{macrocode}\end{macro} % % \subsection{Localisation} % % In this section, some localised strings or commands are defined, for % English, French ans Spanish languages. % \begin{macro}{\AMCtext} % To modify these texts, you can use command |\AMCtext|. For % example, |\AMCtext{draft}|\marg{text} sets the text to be printed % behind each page of a draft exam. % \begin{macrocode} \def\AMCtext#1#2{\expandafter\def\csname AMC@loc@#1\endcsname{#2}} \def\AMClocalized#1{\csname AMC@loc@#1\endcsname} % \end{macrocode}\end{macro} % \subsubsection{English} % Text indicating draft exams: % \begin{macrocode} \def\AMC@loc@draft{DRAFT} % \end{macrocode} % Message at page bottom when compiled out of AMC gui: % \begin{macrocode} \def\AMC@loc@message{For your examination, preferably print documents compiled from auto-multiple-choice.} % \end{macrocode} % Annoucing a question in a separate sheet (parameter |#1| is the % question number): % \begin{macrocode} \def\AMC@loc@qf#1{\textbf{Question #1:}} % \end{macrocode} % Annoucing a question (parameter |#1| is the question number and % pamareter |#2| can be the multiple question symbol, or be empty): % \begin{macrocode} \def\AMC@loc@q#1#2{\textbf{Question #1} #2} % \end{macrocode} % Headers for corrected version and catalog: % \begin{macrocode} \def\AMC@loc@corrected{Corrected} \def\AMC@loc@catalog{Catalog} % \end{macrocode} % Localization text for Explanation % \begin{macrocode} \def\AMC@loc@explain{\textit{\textbf{Explanation: }}} % \end{macrocode} % Last choice added at the end for multiple questions when option % |completemulti| is used: % \begin{macrocode} \def\AMC@loc@none{None of these answers are correct.} % \end{macrocode} % Word for 'question', singular and plural forms: % \begin{macrocode} \def\AMC@loc@question{question} \def\AMC@loc@questions{questions} % \end{macrocode} % Default text to write in the students' name box: % \begin{macrocode} \def\AMC@loc@namesurname{Name and surname:} % \end{macrocode} % % \subsubsection{Dutch} % % Dutch localisation is called with option |lang=NL|. % \begin{macrocode} \def\AMC@loc@NL{ \def\AMC@loc@draft{Ontwerp} \def\AMC@loc@message{Gebruik bij uw proefwerk bij voorkeur die documenten welke door auto-multiple-choice zijn aangemaakt.} \def\AMC@loc@qf##1{\textbf{Vraag ##1 :}} \def\AMC@loc@q##1##2{\textbf{Vraag ##1} ##2} \def\AMC@loc@corrected{Correctie} \def\AMC@loc@catalog{Catalogus} \def\AMC@loc@none{Geen van de antwoorden is juist.} \def\AMC@loc@question{vraag} \def\AMC@loc@questions{vragen} } % \end{macrocode} % % \subsubsection{French} % % French localisation is called with option |francais|, or |lang=FR|. % \begin{macrocode} \def\AMC@loc@FR{ \def\AMC@loc@draft{PROJET} \def\AMC@loc@message{Pour votre examen, imprimez de pr\'ef\'erence les documents compil\'es \`a l'aide de auto-multiple-choice.} \def\AMC@loc@qf##1{\textbf{Question ##1 :}} \def\AMC@loc@q##1##2{\textbf{Question ##1} ##2} \def\AMC@loc@corrected{Correction} \def\AMC@loc@catalog{Catalogue} \def\AMC@loc@explain{\textit{\textbf{Explication : }}} \def\AMC@loc@none{Aucune de ces r\'eponses n'est correcte.} \def\AMC@loc@question{question} \def\AMC@loc@questions{questions} \def\AMC@loc@namesurname{Nom et pr\'enom :} } % \end{macrocode} % % \subsubsection{German} % % German localisation is called with option |lang=DE|. % \begin{macrocode} \def\AMC@loc@DE{ \def\AMC@loc@draft{ENTWURF} \def\AMC@loc@message{Benutzen Sie f\"ur Ihre Pr\"ufung bevorzugt Dokumente die mit auto-multiple-choice erstellt wurden.} \def\AMC@loc@qf##1{\textbf{Frage ##1 :}} \def\AMC@loc@q##1##2{\textbf{Frage ##1} ##2} \def\AMC@loc@corrected{Korrektur} \def\AMC@loc@catalog{Katalog} \def\AMC@loc@explain{\textit{\textbf{Erkl\"arung : }}} \def\AMC@loc@none{Keine dieser Antworten ist korrekt.} \def\AMC@loc@question{Frage} \def\AMC@loc@questions{Fragen} } % \end{macrocode} % % \subsubsection{Italian} % % Italian localisation is called with option |lang=IT|. % \begin{macrocode} \def\AMC@loc@IT{ \def\AMC@loc@draft{BOZZA} \def\AMC@loc@message{Per l'esame, \`e preferibile stampare i documenti a partire da auto-multiple-choice.} \def\AMC@loc@qf##1{\textbf{Domanda ##1:}} \def\AMC@loc@q##1##2{\textbf{Domanda ##1} ##2} \def\AMC@loc@corrected{Correzione} \def\AMC@loc@catalog{Catalogo} \def\AMC@loc@none{Nessuna risposta \`e giusta.} \def\AMC@loc@question{domanda} \def\AMC@loc@questions{domande} } % \end{macrocode} % % \subsubsection{Norwegian} % % Norwegian localisation is called with option |lang=NO|. % \begin{macrocode} \def\AMC@loc@NO{ \def\AMC@loc@draft{UTKAST} \def\AMC@loc@message{Det anbefales {\aa} skrive ut dokumentet for gjennomgang \\direkte fra auto-multiple-choice.} \def\AMC@loc@qf##1{\textbf{Oppgave ##1 :}} \def\AMC@loc@q##1##2{\textbf{Oppgave ##1} ##2} \def\AMC@loc@corrected{Rettet} \def\AMC@loc@catalog{Katalog} \def\AMC@loc@none{Ingen svar er riktige.} \def\AMC@loc@question{oppgave} \def\AMC@loc@questions{oppgave} } % \end{macrocode} % % \subsubsection{Portuguese} % % Portuguese localisation is called with option |lang=PT|. % \begin{macrocode} \def\AMC@loc@PT{ \def\AMC@loc@draft{RASCUNHO} \def\AMC@loc@message{Para o seu exame, use preferencialmente documentos compilados do auto-multiple-choice.} \def\AMC@loc@qf##1{\textbf{Quest\~ao ##1:}} \def\AMC@loc@q##1##2{\textbf{Quest\~ao ##1} ##2} \def\AMC@loc@corrected{Corrigido} \def\AMC@loc@catalog{Cat\'alogo} \def\AMC@loc@explain{\textit{\textbf{Justifique: }}} \def\AMC@loc@none{Nenhuma das respostas apresentadas est\'a correta.} \def\AMC@loc@question{Quest\~ao} \def\AMC@loc@questions{Quest\~oes} } % \end{macrocode} % % \subsubsection{Spanish} % % Spanish localisation is called with option |lang=ES|. % \begin{macrocode} \def\AMC@loc@ES{ \def\AMC@loc@draft{BORRADOR} \def\AMC@loc@message{Para revisi\'on, preferentemente imprimir documentos compilados desde auto-multiple-choice.} \def\AMC@loc@qf##1{\textbf{Pregunta ##1 :}} \def\AMC@loc@q##1##2{\textbf{Pregunta ##1} ##2} \def\AMC@loc@corrected{Correcci\'on} \def\AMC@loc@catalog{Cat\'alogo} \def\AMC@loc@none{Ninguna de estas preguntas son correctas.} \def\AMC@loc@question{pregunta} \def\AMC@loc@questions{preguntas} } % \end{macrocode} % % \subsubsection{Japanese} % % Japanese localisation is called with option |lang=JA|. It includes UTF8 encoded % Japanese characters which are shown as $\diamond$ here (look at the |.sty| file to see them). % \begin{macrocode} \def\AMC@loc@JA{ \def\AMC@loc@draft{ドラフト} \def\AMC@loc@message{試験の実施には、auto-multiple-choiceでコンパイルされた文書を印刷してください。} \def\AMC@loc@qf##1{\textbf{問##1:}} \def\AMC@loc@q##1##2{\textbf{問##1} ##2} \def\AMC@loc@corrected{模範解答} \def\AMC@loc@catalog{問題カタログ} \def\AMC@loc@explain{\textit{\textbf{解説: }}} \def\AMC@loc@none{該当なし。} \def\AMC@loc@question{問} \def\AMC@loc@questions{問} } % \end{macrocode} % % \subsubsection{Other languages} % % Other languages can be integrated to \textsf{automultiplechoice} % package upon request to the author. % % \subsection{Interaction with other packages} % \subsubsection{cleveref} % % For references to questions: % \begin{macrocode} \AtBeginDocument{\@ifpackageloaded{cleveref}{% \message{AMC/cleveref integration loaded^^J}% \crefalias{AMCquestionaff}{question}% \crefname{question}{\AMC@loc@question}{\AMC@loc@questions}% }{}}% % \end{macrocode} % % \subsection{Random} % \subsubsection{Random pseudo-generator} % The package uses the pseudo-random bit generator from % \emph{TuGBoat} 1994, vol~15:1: % \begin{macrocode} \ifx\AMC@SR\undefined\newcount\AMC@SR\fi \providecommand\AMC@SRconst{2097152} \providecommand\AMC@SRset[1]{\global\AMC@SR#1 \ignorespaces} \providecommand\AMC@SRadvance{% \begingroup% \ifnum\AMC@SR<\AMC@SRconst\relax\AMC@SR@count\z@\else\AMC@SR@count\@ne\fi% \ifodd\AMC@SR\advance\AMC@SR@count\@ne\fi% \global\divide\AMC@SR\tw@% \ifodd\AMC@SR@count\global\advance\AMC@SR\AMC@SRconst\relax\fi% \endgroup} \providecommand\AMC@SRbit{\AMC@SRadvance\ifodd\AMC@SR1\else0\fi} \providecommand\AMC@SRtest[2]{\AMC@SRadvance% \ifodd\AMC@SR#2\else#1\fi\ignorespaces} \providecommand\AMC@SRvalue{\number\AMC@SR} % \end{macrocode} % \begin{macro}{\AMCrandomseed} % The seed of this generator is set to 1515, but another value can % be given using the command |\AMCrandomseed|\marg{seed}. % \begin{macrocode} \AMC@SRset{1515} \def\AMCrandomseed#1{\AMC@SRset{#1}} % \end{macrocode}\end{macro} % \subsubsection{Uniform random deviates} % \begin{macro}{\AMC@SRnextByte}\begin{macro}{\AMC@SRmax} % This generator is used to build first a 20-bit uniform integer % generator (macro |\AMC@SRnextByte|). Then, using modulo, a % (nearly) uniform generator on $\{0,\ldots,n-1\}$ is built: % command |\AMC@SRmax{|$n$|}| puts in |\AMC@SR@count| the random % deviate. % \begin{macrocode} \newcount\AMC@SR@count \def\AMC@SR@time{\AMC@SRset{\time}} \newcount\AMC@SRnum \def\AMC@SRnextByte{\AMC@SRnum=\z@% \AMC@SR@count=20% \loop\multiply\AMC@SRnum\tw@% \AMC@SRtest{\advance\AMC@SRnum\@ne}{}% \ifnum\AMC@SR@count>\@ne\advance\AMC@SR@count\m@ne\repeat% } \newcommand\AMC@SRmax[1]{\AMC@SRnextByte% \AMC@SR@count=\AMC@SRnum% \divide\AMC@SR@count by #1\relax% \multiply\AMC@SR@count by #1\relax% \advance\AMC@SRnum by -\AMC@SR@count% } % \end{macrocode}\end{macro}\end{macro} % \subsubsection{Tokens shuffling} % \begin{macro}{\AMCsw@p}\begin{macro}{\AMC@shuffletoks} % The package defines the macro |\AMCsw@p| to swap the values of % two token registers given as parameters. % % After defining $n$ token registers |\foo@i|, |\foo@ii|, % |\foo@iii|, |\foo@iv| and so on, you can shuffle them using % |\AMC@shuffletoks|\oarg{a}\marg{n}\marg{foo}. With optional % argument \meta{a}, registers are shuffled from number \meta{a} % to \meta{n} (default value for \meta{a} is 1). % \begin{macrocode} \newcount\AMC@sti \newcount\AMC@stil \newtoks\AMCsw@p@ \newcommand\AMCsw@p[2]{% \global\AMCsw@p@=#1% \global#1=#2% \global#2=\AMCsw@p@} \newcommand{\AMC@shuffletoks}[3][\@ne]{% \AMC@sti=#2\relax% \AMC@stil=#2\relax% \advance\AMC@stil\@ne% \advance\AMC@stil -#1\relax% \@whilenum\AMC@sti>#1\do{% \AMC@SRmax{\AMC@stil}\advance\AMC@SRnum #1\relax% \AMCsw@p{\csname #3\romannumeral\AMC@SRnum\endcsname}% {\csname #3\romannumeral\AMC@sti\endcsname}% \advance\AMC@sti\m@ne\relax% \advance\AMC@stil\m@ne\relax% }} % \end{macrocode}\end{macro}\end{macro} % % \subsection{Keys numbering}\label{s:keyid} % % \begin{macro}{\AMC@unnumero}\begin{macro}{\AMC@affecte} % This package allocates a unique integer ID to each question key % from the questionnary. The counter |\AMC@numerotation| keeps track % of the number of keys which already had an ID. Command % |\AMC@definitnumero{|$n$|}{key}| allocates ID $n$ to the key % |key|. Command |\AMC@prepare{key}| looks if an ID had already % been associated to |key|, and, if not, makes a new ID allocation % for |key|. Command |\AMC@unnumero{key}| returns the ID associated % with |key| (creating one if necessary). Command % |\AMC@affecte{key}{\cnt}| give to counter |\cnt| the value of the % ID associated to |key| (creating one if necessary). % \begin{macrocode} \newcount\AMC@numerotation\AMC@numerotation=\z@% \def\AMC@definitnumero#1#2{\AMC@amclog{AUTOQCM[NUM=#1=#2]^^J}% \expandafter\global\expandafter\def\csname AMC@numtab@#2\endcsname{#1}} \def\AMC@prepare#1{\expandafter\ifx\csname AMC@numtab@#1\endcsname\relax% \global\advance\AMC@numerotation\@ne% \expandafter\AMC@definitnumero\expandafter{\the\AMC@numerotation}{#1}\fi} \def\AMC@unnumero#1{\AMC@prepare{#1}\csname AMC@numtab@#1\endcsname} \def\AMC@affecte#1#2{\AMC@prepare{#1}\global#2=\csname AMC@numtab@#1\endcsname} % \end{macrocode}\end{macro}\end{macro} % % \subsection{Boxes} % \subsubsection{Character logging} % % \begin{macro}{\AMC@logchar} % The command |\AMC@logchar|\marg{char}\marg{key} logs the % character written in the box referenced as \meta{key} in the |.cs| % file. This is used in catalog mode, to get understandable % references to answers from the statistics tables of the ODS % export. % % \begin{macrocode} \def\AMC@logchar#1#2{% \protected@write\AMC@CSFILE{}{% \string\answer% {\the\AMCid@etud/\thepage:#2}% {#1}}% } % \end{macrocode} % \end{macro} % % \subsubsection{Position logging} % % \begin{macro}{\AMC@tracebox}\begin{macro}{\AMC@pagepos} % Command |\AMC@tracebox|\marg{trace}\marg{key}\marg{content} makes a % \LaTeX{} box around \meta{content}, and, if \meta{trace} is not % empty, logs to the |.xy| file informations to be able to compute % exact location of this box on the page, attached to the box % identification \meta{key}. % % Command |\AMC@pagepos| logs page and page size informations at the % beginning of each page. % % \begin{macrocode} \def\AMC@shapename@{\ifAMC@invisible none\else\AMC@shapename\fi} \def\AMC@tracepos#1#2{% \ifAMC@calibration\ifx\@empty#1\@empty\else% \pdfsavepos\protected@write\AMC@XYFILE{}{% \string\tracepos% {\the\AMCid@etud/\thepage:#2}% {\noexpand\number\pdflastxpos sp}% {\noexpand\number\pdflastypos sp}% {\AMC@shapename}}% \fi\fi} \def\AMC@traceposx#1#2{% \ifAMC@calibration\ifx\@empty#1\@empty\else% \pdfsavepos\protected@write\AMC@XYFILE{}{% \string\tracepos% {\the\AMCid@etud/\thepage:#2}% {\noexpand\number\pdflastxpos sp}% {0sp}% {\AMC@shapename}}% \fi\fi} \def\AMC@traceposy#1#2{% \ifAMC@calibration\ifx\@empty#1\@empty\else% \pdfsavepos\protected@write\AMC@XYFILE{}{% \string\tracepos% {\the\AMCid@etud/\thepage:#2}% {0sp}% {\noexpand\number\pdflastypos sp}% {\AMC@shapename}}% \fi\fi} \newcommand\AMC@tracebox[3]{% \vbox{\AMC@traceposy{#1}{#2}% \hbox{\AMC@traceposx{#1}{#2}#3\AMC@traceposx{#1}{#2}}% \AMC@traceposy{#1}{#2}}} \def\AMC@pagepos{% \ifAMC@calibration\protected@write\AMC@XYFILE{}{% \string\page% {\the\AMCid@etud/\thepage/\the\AMCid@check}% {\the\paperwidth}{\the\paperheight}}\fi} % \end{macrocode}\end{macro}\end{macro} % % \begin{macro}{\AMCdontScan}\begin{macro}{\AMCdontAnnotate} % The commands |\AMCdontScan| and |\AMCdontAnnotate| write % into the |xy| file instructions related to the current question. % \begin{macrocode} \newcommand{\AMCdontScan}{\ifAMC@calibration\immediate\write\AMC@XYFILE{\string\dontscan{\the\AMCid@etud,\the\AMCid@quest}}\fi} \newcommand{\AMCdontAnnotate}{\ifAMC@calibration\immediate\write\AMC@XYFILE{\string\dontannotate{\the\AMCid@etud,\the\AMCid@quest}}\fi} %% \end{macrocode} % \end{macro} % \end{macro} % % \begin{macro}{\AMC@tracechar} % The macro % |\AMC@tracechar|\marg{char}\marg{unused}\marg{trace}\marg{key} is % used to log (for further processing with AMC), into to |.xy| file, % the character used to identify the box. % % \begin{macrocode} \newcommand\AMC@tracechar[4]{% \ifAMC@calibration\ifx\@empty#3\@empty\else% \protected@write\AMC@XYFILE{}{% \string\boxchar{\the\AMCid@etud/\thepage:#4}{#1}% }% \fi\fi% } % \end{macrocode} % \end{macro} % % \begin{environment}{amcxyfile} % The following lines defines an environment to use a particular file % for positions outputs. This is used mainly for documentation or testing. % % \begin{macrocode} \newwrite\AMC@XYspecial \newwrite\AMC@tmpXY \newenvironment{amcxyfile}[1]{% \openout\AMC@XYspecial#1% \let\AMC@tmpXY=\AMC@XYFILE% \let\AMC@XYFILE=\AMC@XYspecial% }{\let\AMC@XYFILE=\AMC@tmpXY\closeout\AMC@XYspecial} % \end{macrocode}\end{environment} % % \begin{macro}{\namefield} % The |\namefield|\marg{name field content} is a simple call to |\AMC@tracebox|: % \begin{macrocode} \newcommand{\namefield}[1]{\AMC@tracebox{1}{nom}{#1}} % \end{macrocode}\end{macro} % It is used to enclose the page region where students are to write % their names, so as te retreive it easily from the scans. % % \begin{macro}{\namefielddots} % The command |\namefielddots| can be used to fill a line with dots % (printed sheets) or use a text field in PDF forms: % \begin{macrocode} \newcommand{\namefielddots}{% \noindent% \ifAMC@pdfform% \hspace*{\fill}% \TextField[name={\the\AMCid@etud:namefield},width=.95\linewidth,bordercolor=0 0 0]{}% \hspace*{\fill} \else% \dotfill \fi% } % \end{macrocode}\end{macro} % % As an example, %\iffalse %<*doc> %\fi \begin{verbatim} \namefield{\fbox{% \begin{minipage}{5cm} Name: \vspace*{.5cm} \namefielddots \vspace{2mm} \end{minipage}}} \end{verbatim} %\iffalse % %\fi % produces the following box: % \begin{amcxyfile}{automultiplechoice.xy2} % \begin{center} % \namefield{\fbox{% % \begin{minipage}{5cm} % Name: % % \vspace*{.5cm}\noindent\dotfill % \vspace{2mm} % \end{minipage}}} % \end{center} % \end{amcxyfile} % and outputs information about the position of the box in the |.xy| % file, as seen in section~\ref{a:name}. % % \subsubsection{Boxes to be checked by students} % % \begin{macro}{\AMC@answerBox@} % There are two styles for boxes to be checked by the students. The % first one is an empty box, printed beside the answer. The sencond % is a box with a character in it. It is mainly used when answers % are to be given on a separate answer sheet. % % These boxes can be drawn using command % |\AMC@answerBox@|\marg{char}\marg{answer}\marg{trace}\marg{key}: % \meta{char} is the character to print inside the box, \meta{trace} % is non-empty if you want to log the box position in the |.xy| % file, \meta{key} is the box identification, and \meta{answer} is % an answer to be written in the box (or |\AMC@checkedbox| for % filling the box). % % Depending onthe required shape for the boxes, the corresponding % \begin{center} % |\AMC@shape@xxx|\marg{char}\marg{answer}\marg{trace}\marg{key} % \end{center} % \noindent command is used. % % \begin{itemize} % \item % \begin{amcxyfile}{automultiplechoice.xy1} % |\AMC@answerBox@{K}{}{1}{test}| produce the box % \makeatletter\AMC@answerBox{K}{}{1}{test}\makeatother, writing the % lines in the |.xy| file shown in section~\ref{a:boxed}. % \end{amcxyfile} % \item |\AMC@answerBox@{K}{\AMC@checkedbox}{}{}| produces {\makeatletter\AMC@answerBox@{K}{\AMC@checkedbox}{}{}\makeatother} % \item |\AMC@answerBox@{}{8}{}{}| produces {\makeatletter\AMC@answerBox@{}{8}{}{}\makeatother} % \item |\AMC@answerBox@{K}{8}{1}{testb}| produces {\makeatletter\AMCboxStyle{shape=oval,color=red}\AMC@answerBox@{K}{8}{1}{testb}\makeatother} with |\AMCboxStyle{shape=oval,color=red}| % \end{itemize} % \begin{macrocode} \def\AMC@checkedbox{} \let\AMC@new@savebox=\newsavebox \let\AMC@save@box=\savebox \let\AMC@use@box=\usebox \newif\ifAMC@draw@cross % \end{macrocode} % The |\AMC@smashcentered|\marg{text} command shows the \meta{text} % centered at point. % \begin{macrocode} \newbox\AMC@smashbox \newdimen\AMC@smashboxheight \newcommand{\AMC@smashcentered}[1]{{% \setbox\AMC@smashbox\hbox{#1}% \AMC@smashboxheight=\ht\AMC@smashbox% \advance\AMC@smashboxheight by \dp\AMC@smashbox% \vfuzz=\AMC@smashboxheight\hfuzz=\wd\AMC@smashbox% \hspace*{-.5\wd\AMC@smashbox}\hbox to .5\wd\AMC@smashbox{% \vbox to 0pt{% \vspace*{-.5\AMC@smashboxheight}\vbox to .5\AMC@smashboxheight{% \box\AMC@smashbox}}}% }} % \end{macrocode} % |\AMC@setcolors@|\marg{trace}\marg{answer} sets colours % |\AMC@boxcolor@| and |\AMC@fillcolor@| according to its % arguments. It also sets the |\ifAMC@draw@cross| switch if AMC should % draw a cross instead of filling the box. % \begin{macrocode} \newcommand\AMC@setcolors@[2]{% \def\AMC@boxcolor@{\AMC@boxcolor}% \ifx\@empty#1\@empty \def\AMC@boxcolor@{black}\fi% \ifAMC@correc\def\AMC@boxcolor@{black}\fi% \def\AMC@fillcolor@{\ifx #2\AMC@checkedbox% \AMC@boxcolor@\else white\fi}% \AMC@draw@crossfalse% \ifKV@AMCdim@cross\ifx #2\AMC@checkedbox% \AMC@draw@crosstrue\fi\fi% } \newcommand\AMC@answerBox@[4]{% \ifAMC@catalog% \AMC@logchar{#1}{#4}% \fi% \AMC@LR{\hspace{0pt}% \lower\AMC@boxeddown\hbox{\csname AMC@shape@\AMC@shapename@\endcsname% {\AMCchoiceLabelFormat{#1}}{#2}{#3}{#4}}}% } \newcommand\AMC@shapeprepare@square{} \newcommand\AMC@shape@square[4]{% \fboxsep=\z@\fboxrule=\AMC@boxedrule% \AMC@setcolors@{#3}{#2}% \ifKV@AMCdim@cross\def\AMC@fillcolor@{white}\fi% \fcolorbox{\AMC@boxcolor@}{\AMC@fillcolor@}% {% \boxput*(0,0){% \ifAMC@draw@cross\AMC@crosschar\fi% }{% \vbox to \AMC@boxedheight{% \AMC@tracepos{#3}{#4}% \vfill% \hbox to \AMC@boxedwidth{\hfill% \AMC@smashcentered{\textcolor{\AMC@boxcolor@}{#1}}% \AMC@smashcentered{#2}% \hfill}\vfill}}% \AMC@tracepos{#3}{#4}}% } % \end{macrocode} % |\AMC@makeovalbox|\marg{trace}\marg{answer}\marg{box} prepares an % oval frame in the \LaTeX{} box \meta{box}. % \begin{macrocode} \newcommand\AMC@makeovalbox[3]{% \AMC@setcolors@{#1}{#2}% \ifKV@AMCdim@cross\def\AMC@fillcolor@{white}\fi% \AMC@save@box{#3}{% \begin{tikzpicture}% \useasboundingbox (-0.5\AMC@boxedwidth-0.5\AMC@boxedrule,0.5\AMC@boxedheight+0.5\AMC@boxedrule) rectangle (0.5\AMC@boxedwidth+0.5\AMC@boxedrule,-0.5\AMC@boxedheight-0.5\AMC@boxedrule); \draw[\AMC@boxcolor@,fill=\AMC@fillcolor@,line width=\AMC@boxedrule,rounded corners=\AMC@oval@radius] (-0.5\AMC@boxedwidth,0.5\AMC@boxedheight) rectangle (0.5\AMC@boxedwidth,-0.5\AMC@boxedheight); \ifAMC@draw@cross \draw[\AMC@boxcolor@,line width=\AMC@crossrule] (-0.5\AMC@boxedwidth,0.5\AMC@boxedheight) -- (0.5\AMC@boxedwidth,-0.5\AMC@boxedheight) (0.5\AMC@boxedwidth,0.5\AMC@boxedheight) -- (-0.5\AMC@boxedwidth,-0.5\AMC@boxedheight); \fi \end{tikzpicture}}% } \newcommand\AMC@shapeprepare@oval{% \ifx\AMC@ovalbox@R\@undefined\else% \AMC@makeovalbox{1}{}{\AMC@ovalbox@R}% \AMC@makeovalbox{1}{\AMC@checkedbox}{\AMC@ovalbox@RF}% \AMC@makeovalbox{}{}{\AMC@ovalbox@}% \AMC@makeovalbox{}{\AMC@checkedbox}{\AMC@ovalbox@F}% \fi% } \newcommand\AMC@shape@oval[4]{% \AMC@setcolors@{#3}{#2}% \AMC@tracebox{#3}{#4}{\boxput*(0,0){% \AMC@smashcentered{\textcolor{\AMC@boxcolor@}{#1}}% \AMC@smashcentered{#2}% }{% \ifx\@empty#3\@empty% \ifx #2\AMC@checkedbox% \AMC@use@box{\AMC@ovalbox@F}% \else% \AMC@use@box{\AMC@ovalbox@}% \fi% \else% \ifx #2\AMC@checkedbox% \AMC@use@box{\AMC@ovalbox@RF}% \else% \AMC@use@box{\AMC@ovalbox@R}% \fi% \fi% }}% } \newcommand\AMC@shapeprepare@form{} \newcommand\AMC@shape@form@base[5]{% \ifx #2\AMC@checkedbox% \def\AMC@shape@form@ticked{true}% \else% \def\AMC@shape@form@ticked{false}% \fi% \AMC@tracebox{#3}{#4}{% \CheckBox[checked=\AMC@shape@form@ticked,% checkboxsymbol=\ding{110},name={#5},% bordercolor=0 0 0, width=\AMC@boxedwidth,height=\AMC@boxedheight]{}{}% }% } \newcommand\AMC@shape@form[4]{% \AMC@shape@form@base{#1}{#2}{#3}{#4}{\the\AMCid@etud:#4}% } \newcommand\AMC@shapeprepare@none{} \newcommand\AMC@shape@none[4]{ #1 } % \end{macrocode}\end{macro} % % \begin{macro}{\AMC@answerBox}\begin{macro}{\AMCchoiceLabel}\begin{macro}{\AMCchoiceLabelFormat} % Command |\AMC@answerBox| is the same as |\AMC@answerBox@|, but if % \meta{char} is empty, it is replaced by an arabic or alphabetical % counter, depending on the use of the |digits| package option. % % To use another way to label the choices boxes, the user can redefine % the |\AMCchoiceLabel| macro, which takes as argument the name of the % counter used to number the choices. One can for example use % |\def\AMCchoiceLabel#1{\alph{#1}}| to ask for lowercase letters. % % To write these labels with another font, size, or so, the user can % redefine the |\AMCchoiceLabelFormat| macro, which takes as argument % the label. One can for example get sans serif bold labels with % |\def\AMCchoiceLabelFormat#1{{\textsf{\textsf{#1}}}}|. % \begin{macrocode} \def\AMCchoiceLabel#1{% \ifAMC@inside@digit\arabic{#1}% \else\Alph{#1}\fi% } \def\AMCchoiceLabelFormat#1{#1} \newcounter{AMC@ncase} \setcounter{AMC@ncase}{0} \newcommand\AMC@answerBox[4]{% \AMC@answerBox@{\ifx\@empty#1\@empty% \AMCchoiceLabel{AMC@ncase}% \else #1\fi}{#2}{#3}{#4}} % \end{macrocode}\end{macro}\end{macro}\end{macro} % % \begin{macro}{\AMCboxStyle} % The dimensions of these box are managed by % |\AMCboxDimensions|\marg{sizes}, where \meta{sizes} is a coma % separated list of \meta{name}|=|\meta{dimension} constructs. Here, % \meta{name} can be |size| for the box size, |rule| for the box % rule width, |down| for moving the box down, |color| for the box % color and |outsidesep| for the distance between the box and the % letter (when outside the box). % % The \meta{color} value given to |color| is a color that should be % defined for the |xcolor| package. This color is used only in the % case the box will be used for data capture: it is not used on the % corrected answer sheet (|answers| or |indivanswers| package % option), and not used on the subject part of an exam with a % separate answer sheet (|separateanswersheet| package option). % % The |\AMCboxColor|\marg{color} command is defined as an alias to % |\AMCboxStyle{color=|\meta{color}|}|, and |\AMCboxDimensions| as % an alias to |\AMCboxStyle|, for backward compatibility. % % \begin{macrocode} \newlength\AMC@boxedrule \newlength\AMC@crossrule \newlength\AMC@boxeddown \newlength\AMC@boxedwidth \newlength\AMC@boxedheight \newlength\AMC@oval@radius \newlength\AMC@outside@sep \define@choicekey{AMCdim}{shape}{square,oval,form,none}{\def\AMC@shapename{#1}} \define@key{AMCdim}{size}{\AMC@boxedwidth=#1\AMC@boxedheight=#1} \define@key{AMCdim}{height}{\AMC@boxedheight=#1} \define@key{AMCdim}{width}{\AMC@boxedwidth=#1} \define@key{AMCdim}{rule}{\AMC@boxedrule=#1} \define@key{AMCdim}{outsidesep}{\AMC@outside@sep=#1} \define@key{AMCdim}{down}{\AMC@boxeddown=#1} \define@key{AMCdim}{color}{\def\AMC@boxcolor{#1}} \define@boolkey{AMCdim}{cross}[false]{} \define@key{AMCdim}{crosschar}[\textbf{\textsf{X}}]{\def\AMC@crosschar{#1}} \define@key{AMCdim}{crossrule}[1.5pt]{\AMC@crossrule=#1} \def\AMC@shapeprepare{\csname AMC@shapeprepare@\AMC@shapename@ \endcsname} \def\AMCboxStyle#1{% \setkeys{AMCdim}{#1}% \ifnum\AMC@boxedwidth<\AMC@boxedheight% \AMC@oval@radius=\AMC@boxedwidth\divide\AMC@oval@radius\tw@% \else% \AMC@oval@radius=\AMC@boxedheight\divide\AMC@oval@radius\tw@% \fi% \AMC@shapeprepare% } \AMCboxStyle{shape=square,size=2.5ex,down=.4ex,rule=.5pt,outsidesep=.1em,color=black,cross,crosschar,crossrule} \newcommand\AMCboxColor[1]{\AMCboxStyle{color=#1}} \let\AMCboxDimensions=\AMCboxStyle % \end{macrocode}\end{macro} % % \begin{macro}{\AMCboxOutsideLetter}\begin{macro}{\AMC@box}\begin{macro}{\AMC@formBox@}\begin{macro}{\AMC@formBox}\begin{macro}{\AMCoutsideLabelFormat} % Command |\AMC@box|\marg{char}\marg{answer} prints a box % with character \meta{char} inside, showing answer % \meta{answer} (|\AMC@checkedbox| to get a filled box), % using global variables to identify the box (question and % choice). % % It calls % |\AMC@formBox@|\marg{char}\marg{answer}\marg{trace}\marg{key} to % actually render the box. % % Command |\AMC@formBox| simply sets the first argument when empty % before calling |\AMC@formBox@|. % % The command |\AMCboxOutsideLetter|\marg{box}\marg{char} is called % to print the box \textit{and} the character \meta{char} outside % (and next to) it. The character is formatted using % |\AMCoutsideLabelFormat| first: if you need bold characters, % redifine it with |\def\AMCoutsideLabelFormat#1{\textbf{#1}}| % % |\AMC@keyBox@| is used instead of |\AMCformBox@| when the text % that corresponds to the answer is the letter/character inside the % box itself (see |\AMCcodeGrid| and |\AMCnumericChoices|. % % \begin{macrocode} \def\AMCoutsideLabelFormat#1{#1} \newcommand\AMCboxOutsideLetter[2]{#1\nobreak\hspace{.1em}\AMCoutsideLabelFormat{#2}} \newif\ifAMC@printformoutside@% \newcommand\ifAMC@printformoutside{% \AMC@printformoutside@false% \ifAMC@ensemble\ifAMC@outside@box% \ifAMCformulaire@dedans\AMC@printformoutside@true\fi% \ifAMC@zoneformulaire\AMC@printformoutside@true\fi% \fi\fi% \ifAMC@printformoutside@% } \newcommand\AMC@formBox@[4]{% \ifAMC@printformoutside% letter to be written outside the box \AMCboxOutsideLetter{\AMC@answerBox@{}{#2}{#3}{#4}}{#1}% \else% \AMC@answerBox@{#1}{#2}{#3}{#4}% \fi% \AMC@tracechar{#1}{#2}{#3}{#4}% } \newif\ifAMC@printkeyoutside@% \newcommand\ifAMC@printkeyoutside{% \AMC@printkeyoutside@false% \ifAMC@ensemble% \ifAMC@outside@box\AMC@printkeyoutside@true\fi% \else% \ifAMC@inside@box\else\AMC@printkeyoutside@true\fi% \fi% \ifAMC@printkeyoutside@% } \newcommand\AMC@keyBox@[4]{% \ifAMC@printkeyoutside% \AMCboxOutsideLetter{\AMC@answerBox@{}{#2}{#3}{#4}}{#1}% \else% \AMC@answerBox@{#1}{#2}{#3}{#4}% \fi% \AMC@tracechar{#1}{#2}{#3}{#4}% } \newcommand\AMC@formBox[4]{% \AMC@formBox@{\ifx\@empty#1\@empty% \AMCchoiceLabel{AMC@ncase}% \else #1\fi}{#2}{#3}{#4}% } \newcommand{\AMC@box}[2]{% \ifAMC@ensemble% \ifAMC@zoneformulaire% for codes inside form sheet \protect\AMC@formBox{#1}{#2}{1}{case:\AMCid@name:\the\AMCid@quest,\the\AMCrep@count}% \else% \ifAMCformulaire@dedans% for answer boxes inside form sheet \protect\AMC@formBox{#1}{#2}{1}{case:\AMCid@name:\the\AMCid@quest,\the\AMCrep@count}% \else% outside form sheet: not to be read during data capture \AMC@formBox{#1}{#2}{1}{casequestion:\AMCid@name:\the\AMCid@quest,\the\AMCrep@count}% \fi\fi% \else% no separate sheet for answers: always read \ifAMC@inside@box% \AMC@formBox{#1}{#2}{1}{case:\AMCid@name:\the\AMCid@quest,\the\AMCrep@count}% \else% \AMC@formBox@{}{#2}{1}{case:\AMCid@name:\the\AMCid@quest,\the\AMCrep@count}% \fi% \fi% } % \end{macrocode}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro} % % \subsubsection{Scoring zones} % % \begin{macro}{\AMCscoreZone} % The source file can define zones that will be used to print scores % when annotating the completed answer sheets. The command % |\AMCscoreZone|\marg{zone} logs these zones positions on the page. % \begin{macrocode} \newif\ifAMCsz@logged\AMCsz@loggedfalse \newcommand{\AMCscoreZone}[1]{% \ifAMC@ensemble% \ifAMCformulaire@dedans% \AMC@tracebox{1}{score::\the\AMCid@quest,-1}{#1}% \else% \AMC@tracebox{1}{scorequestion::\the\AMCid@quest,-1}{#1}% \fi% \else% \AMC@tracebox{1}{score::\the\AMCid@quest,-1}{#1}% \fi% \ifAMCsz@logged\else% \AMC@amclog{AUTOQCM[VAR:scorezones=1]^^J}% \global\AMCsz@loggedtrue% \fi% } % \end{macrocode} % \end{macro} % % \subsubsection{Binary boxes} % % The package prints on each page some boxes that code (like binary % digits) student sheet number, page number and a check number, so as % to be read easily from scans after exam. % % \begin{macro}{\AMCid@checkmax}\begin{macro}{\AMC@NCBetud} % \begin{macro}{\AMC@NCBpage}\begin{macro}{\AMC@NCBcheck} % The check number is just decreased each page. Its maximum value % is |\AMCid@checkmax|. The number of binary digits used to print % student sheet number, page and check number are |\AMC@NCBetud|, % |\AMC@NCBpage| and |\AMC@NCBcheck|. The number of the first page % is |\AMC@premierecopie|. % % The length of zone reserved for binary boxes is |\AMC@CBtaille|. % \begin{macrocode} \def\AMCid@checkmax{60} \def\AMC@NCBetud{12} \def\AMC@NCBpage{6} \def\AMC@NCBcheck{6} \newlength{\AMC@CBtaille}\setlength{\AMC@CBtaille}{5cm} \def\AMC@premierecopie{1} % \end{macrocode} % \end{macro}\end{macro}\end{macro}\end{macro} % % \begin{macro}{\AMC@binaryBoxes} % Command |\AMC@binaryBoxes|\oarg{ndigits}\marg{n} prints \meta{ndigits} % boxes to represent number \meta{n} in its binary % form. |\AMCbin@one| and |\AMCbin@zero| print individual % digit-boxes. % % For example, |\AMC@binaryBoxes[12]{367}| shows $367=000101101111_2$ % using 12 boxes: % \begin{center} % \makeatletter\AMC@binaryBoxes[12]{367}\makeatother % \end{center} % % \begin{macrocode} \newtoks\AMCbin@sequence \newcount\AMCbin@number \newcount\AMCbin@ndigits \newcount\AMCbin@id \newcount\AMCbin@digit \def\AMCbin@one{\advance\AMCbin@digit\@ne% \AMC@answerBox@{}{\AMC@checkedbox}{1}{chiffre:\the\AMCbin@id,\the\AMCbin@digit}} \def\AMCbin@zero{\advance\AMCbin@digit\@ne% \AMC@answerBox@{}{}{1}{chiffre:\the\AMCbin@id,\the\AMCbin@digit}} \def\AMCbin@begin#1{\AMCbin@id=#1\AMCbin@digit=\z@} \newcommand{\AMC@binaryBoxes}[2][1]{% {\AMCboxDimensions{shape=square,size=.32cm,down=0pt,rule=.2pt,cross=false}\AMCbin@sequence={}\AMCbin@number=#2\relax% \AMCbin@ndigits=\z@% \loop% \ifnum\AMCbin@number>\z@% \advance\AMCbin@ndigits\@ne% \ifodd\AMCbin@number\AMCbin@sequence=\expandafter{\expandafter\AMCbin@one\the\AMCbin@sequence}% \else\AMCbin@sequence=\expandafter{\expandafter\AMCbin@zero\the\AMCbin@sequence}\fi% \divide\AMCbin@number\tw@% \repeat% \loop\relax% \ifnum\AMCbin@ndigits<#1\advance\AMCbin@ndigits\@ne% \AMCbin@sequence=\expandafter{\expandafter\AMCbin@zero\the\AMCbin@sequence}\repeat% \the\AMCbin@sequence% \ifnum\AMCbin@ndigits>#1\PackageError{automultiplechoice}{Too low AMC@NCB value (got #1 but needs \the\AMCbin@ndigits)}{Number of available digits is #1, but needs \the\AMCbin@ndigits}\fi% }} % \end{macrocode}\end{macro} % % \subsection{Checking Environment} % % \begin{macro}{\AMCcurrentenv} % Sets the current environment as document. % \begin{macrocode} \def\AMCcurrentenv{document} % \end{macrocode} % \end{macro} % \begin{macro}{\AMCif@env} % Checks for the current environment. % \begin{macrocode} \def\AMCif@env#1{ \def\AMC@tempenv{#1}% \ifx\AMC@tempenv\AMCcurrentenv \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi } % \end{macrocode} % \end{macro} % % \subsection{Handling groups of questions} % % The package allows to handle groups of questions, so as to be able % to shuffle them before printing them to the sheets. % % \begin{macro}{\nouveaugroupe}\begin{macro}{\element} % Command |\nouveaugroupe|\marg{group-name}\marg{n} creates a new % (empty) group with name \meta{group-name} (argument \meta{n} is % present only for compatibility reasons and is ignored). Command % |\element|\marg{group-name}\marg{text} adds to group % \meta{group-name} a new element that contains % \meta{text}. \meta{text} can be a |question| environment, ore % two successive |question|s to be kept together, or % anything else. Calling command |\nouveaugroupe| is not % compulsory, as |\element| calls it if necessary. % \begin{macrocode} \newcount\AMCtok@k \newcount\AMCtok@max \newcount\AMCtok@size \newcommand{\nouveaugroupe}[2]{% \expandafter\ifx\csname #1@k\endcsname\relax% \expandafter\newcount\csname #1@k\endcsname% \expandafter\newcount\csname AMC#1@j\endcsname% \csname #1@k\endcsname=\z@\relax% \csname AMC#1@j\endcsname=\z@\relax% \setgroupmode{#1}{\AMCdefault@groupmode}% \fi% } \newcommand\AMC@prepare@element[1]{% \nouveaugroupe{#1}{}% \global\advance\csname #1@k\endcsname\@ne\relax% \AMCtok@k=\csname #1@k\endcsname% \expandafter\ifx\csname #1@\romannumeral\AMCtok@k\endcsname\relax% \expandafter\newtoks\csname #1@\romannumeral\AMCtok@k\endcsname\fi% } \newcommand{\element}[2]{% \AMC@prepare@element{#1}% \csname #1@\romannumeral\AMCtok@k\endcsname={#2}% } % \end{macrocode}\end{macro}\end{macro} % \begin{macro}{\setgroupmode}\begin{macro}{\setdefaultgroupmode} % Command |\setgroupmode|\marg{group-name}\marg{mode} sets the group % mode to \meta{mode} for group \meta{group-name}. This mode setup % the behaviour of |\insertgroup| and |\copygroup| for this group: % \begin{enumerate} % \item With mode |fixed|, group's % elements will be taken from the beginning. % \item With mode |cyclic|, the elements will be taken from the % group following the last call group's use, recycling if % necessary. % \item Mode |withreplacement| is the same as |fixed|, but the group % is shuffled before each use. % \item Mode |withoutreplacement| is like |cyclic|, adding some % shuffling when comming back to the beginning of the group. % \end{enumerate} % The command |\setdefaultgroupmode|\marg{mode} sets the group mode % to be used for the following created groups (a group is created at % the first |\element|\marg{group} call). When no % |\setdefaultgroupmode| is used, |fixed| is the default mode. % \begin{macrocode} \def\AMCdefault@groupmode{fixed} \newcommand{\setdefaultgroupmode}[1]{\def\AMCdefault@groupmode{#1}} \newcommand{\setgroupmode}[2]{% \expandafter\ifx\csname AMCgrouppre@#2\endcsname\relax% \PackageError{automultiplechoice}{Unknown group mode for #1 : #2}% {You asked to set group '#1' mode to '#2', but '#2' is not a valid group mode}% \else% \expandafter\global\expandafter\def\csname AMC#1@mode\endcsname{#2}% \fi% } % \end{macrocode} % The functions |\AMCgrouppre@|xxx\marg{group-name}\marg{n}\marg{i} % are called before using \meta{n} elements from group % \meta{group-name} starting from index \meta{i} (negative value for % \meta{i} stands for the current value of the group index), either % with |\insertgroup| or |\copygroup|. % % For mode \textbf{fixed}, the group index is set to \meta{i}, or 0 if % \meta{i} is negative (take elements from the beginning). % \begin{macrocode} \newcommand{\AMCgrouppre@fixed}[3]{% \ifnum#3<\z@% \csname AMC#1@j\endcsname=\z@% \else% \csname AMC#1@j\endcsname=#3% \fi% } % \end{macrocode} % For mode \textbf{withreplacement}, the group is shuffled and the % group index is set to \meta{i} or 0 (take elements from the % beginning) if negative. % \begin{macrocode} \newcommand{\AMCgrouppre@withreplacement}[3]{% \ifnum#3<\z@% \csname AMC#1@j\endcsname=\z@% \else% \csname AMC#1@j\endcsname=#3% \fi% \shufflegroup{#1}% } % \end{macrocode} % For mode \textbf{withoutreplacement}, the group index is set to % \meta{i}, or left unchanged if \meta{i} is negative. If there is not % enough elements left in the group, the elements before the index and % the elements after the index are shuffled. % \begin{macrocode} \newcount\AMC@imax \newcommand{\AMCgrouppre@withoutreplacement}[3]{% \ifnum#3<\z@% \else% \csname AMC#1@j\endcsname=#3% \fi% \ifnum\AMCtok@ik=\AMCloop@k% \AMCtok@ik=\z@% \fi% \ifnum\AMCtok@ik=\z@% \shufflegroup{#1}% \else% \AMC@imax=\AMCloop@k% \advance\AMC@imax -#2\relax% \ifnum\AMCtok@ik>\AMC@imax% \shufflegroupslice{#1}{\@ne}{\AMCtok@ik}% \ifnum\AMCtok@ik<\AMCloop@k% \advance\AMCtok@ik\@ne% \shufflegroupslice{#1}{\AMCtok@ik}{\AMCloop@k}% \fi% \fi% \fi% } % \end{macrocode} % For mode \textbf{cyclic}, nothing has to be done, except setting the % group index if non-negative. % \begin{macrocode} \newcommand{\AMCgrouppre@cyclic}[3]{% \ifnum#3<\z@% \else% \csname AMC#1@j\endcsname=#3% \fi% } % \end{macrocode} % The function % |\AMCgroup@pre|\marg{mode}\marg{group-name}\marg{n}\marg{i} calls % the right |\AMCgrouppre@|xxx command. % \begin{macrocode} \newcommand{\AMCgroup@pre}[4]{% \csname AMCgrouppre@#1\endcsname{#2}{#3}{#4}% } % \end{macrocode} % \end{macro}\end{macro} % \begin{macro}{\shufflegroup}\begin{macro}{\insertgroup}\begin{macro}{\insertgroupfrom} % Command |\shufflegroup|\marg{group-name} shuffles the elements % of group \meta{group-name}, and % |\shufflegroupslice|\marg{group-name}\marg{a}\marg{b} shuffles % elements \meta{a} to \meta{b} from group \meta{group-name}. It % can be called at each student sheet in order to get different % student sheets and avoid cheating. % % Command % |\insertgroup|\oarg{n}\marg{groupname} inserts all the elements % of group \meta{groupname}, or only the first \meta{n} elements % if \meta{n} is given. % |\insertgroupfrom|\oarg{n}\marg{groupname}\marg{i} inserts all % the elements of group \meta{groupname} starting from index % \meta{i} (the index of the first element is 0), or only the % first \meta{n} elements if \meta{n} is given. % \begin{macrocode} \newcommand{\shufflegroup}[1]{% \ifAMC@shuffleG{\AMC@shuffletoks{\number\csname #1@k\endcsname}{#1@}}\fi% } \newcommand{\shufflegroupslice}[3]{% \ifAMC@shuffleG{\AMC@shuffletoks[#2]{#3}{#1@}}\fi% } \newcount\AMCtok@ik \newcount\AMCloop@k \newcommand{\AMCgrouploop@prep}[3]{% \AMCtok@size=#1\relax% \ifAMC@fullGroups\AMCtok@size=\z@\fi% \ifnum\AMCtok@size<\@ne% \AMCtok@size=\csname #2@k\endcsname% \fi% \AMCtok@ik=\csname AMC#2@j\endcsname% \AMCloop@k=\csname #2@k\endcsname% \expandafter\ifx\csname AMC#2@mode\endcsname\relax% \PackageError{automultiplechoice}{No group mode for #2}% {No mode has been defined for group '#2'. This should not occur...}% \fi% \AMCgroup@pre{\csname AMC#2@mode\endcsname}{#2}{\the\AMCtok@size}{#3}% } \newcommand{\AMCgrouploop@next}[1]{% \global\advance\csname AMC#1@j\endcsname\@ne\relax% \expandafter\ifnum\csname AMC#1@j\endcsname>\AMCloop@k\relax% \global\csname AMC#1@j\endcsname=\@ne% \fi% \AMCtok@ik=\csname AMC#1@j\endcsname% \advance\AMCtok@size\m@ne% } \newcommand{\insertgroupfrom}[3][0]{% \AMCgrouploop@prep{#1}{#2}{#3}% {\loop% \AMCgrouploop@next{#2}% {\the\csname #2@\romannumeral\AMCtok@ik\endcsname}% \ifnum\AMCtok@size>\z@\repeat}% } \newcommand{\insertgroup}[2][0]{% \insertgroupfrom[#1]{#2}{-1}% } % \end{macrocode}\end{macro}\end{macro}\end{macro} % % \begin{macro}{\cleargroup}\begin{macro}{\copygroup}\begin{macro}{\copygroupfrom} % The commands |\cleargroup| and |\copygroup| can also be used to % make more complex questions combinations in the exams, allowing % for example to ask the package to shuffle 3 questions taken at % random from group |groupa| and 5 questions taken at random from % group |groupb|. % % |\cleargroup|\marg{group} clears the group \meta{group}, % ereasing all of its elements. % % |\copygroup|\oarg{n}\marg{from}\marg{to} copies \meta{n} % elements from group \meta{from} to group \meta{to}. If optional % parameter \meta{n} is not given, all the questions from group % \meta{from} are copied. % |\copygroupfrom|\oarg{n}\marg{from}\marg{to}\marg{i} copies % \meta{n} elements from group \meta{from} to group \meta{to}, % starting from element at index \meta{i} (the index of the first % element is 0). If optional parameter \meta{n} is not given, all % the questions from group \meta{from} are copied. % % See section~\ref{d:groups} for an illustration for these commands. % % \begin{macrocode} \newcommand{\cleargroup}[1]{% \nouveaugroupe{#1}{}% \csname #1@k\endcsname=\z@\relax% \csname AMC#1@j\endcsname=\z@\relax% } \newcommand{\copygroupfrom}[4][0]{% \AMCgrouploop@prep{#1}{#2}{#4}% {\loop% \AMCgrouploop@next{#2}% \AMC@prepare@element{#3}% \global\csname #3@\romannumeral\AMCtok@k\endcsname=\csname #2@\romannumeral\AMCtok@ik\endcsname% \ifnum\AMCtok@size>\z@\repeat}% } \newcommand{\copygroup}[3][0]{% \copygroupfrom[#1]{#2}{#3}{-1}% } % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % % \subsection{Questions} % % To manage multiple choice questions, first set some counters and % token registers to handle answers. Token registers |\reponse@i|, % |\reponse@ii| and so on will be used for answers -- we restrict the % number of answers of a single questions to % |\AMCload@counter|${}=199$. % \begin{macrocode} \newcount\AMCrep@count \AMCload@counter=199 \@whilenum\AMCload@counter>0\do{% \expandafter\newtoks\csname reponse@\romannumeral\AMCload@counter\endcsname% \advance\AMCload@counter\m@ne% } % \end{macrocode} % \begin{macro}{\AMCload@reponse}\begin{macro}{\AMCrien@deux} % Command |\AMCload@reponse|\marg{n}\marg{text} will be used to % add answer number \meta{n} with text \meta{text} (\meta{text} % will include the box to be ticked and all the layout commands) % to the set of answers (in a token register |\reponse@|\emph{xxx} % -- counter |\AMCload@counter| keeps track of the number of % answers), in order to shuffle them when all answers will be % loaded. % % When answers are not to be shuffled, command % |\AMCrien@deux|\marg{n}\marg{text} will be used instead, only % printing \meta{text}. % \begin{macrocode} \newcommand\AMCload@reponse[2]{% \advance\AMCload@counter\@ne\relax% \csname reponse@\romannumeral\AMCload@counter\endcsname% =\expandafter{\expandafter\AMCrep@count\expandafter=#2 #1}% } \newcommand\AMCrien@deux[2]{#1} % \end{macrocode}\end{macro}\end{macro} % \begin{macro}{\shuffle@it}\begin{macro}{\AMCdump@reponses} % After loading all answers, commands |\shuffle@it| will be used to % shuffle them, and |\AMCdump@reponses| to print them. % \begin{macrocode} \def\shuffle@it{\AMC@shuffletoks{\number\AMCload@counter}{reponse@}} \newcount\AMCnum@questions \newcommand\AMCdump@reponses{% \global\AMCnum@questions=\AMCload@counter% \@whilenum\AMCload@counter>0\do{% \the\csname reponse@\romannumeral\AMCload@counter\endcsname% \advance\AMCload@counter\m@ne}} % \end{macrocode}\end{macro}\end{macro} % % \subsubsection{Managing answers} % % \begin{macro}{\lastchoices}\begin{macro}{\AMCrep@init}\begin{macro}{\AMC@fin@rep} % Command |\AMCrep@init|\marg{mode} is called for each question % before reading answers. \meta{mode} is |r| for suffled % answers, and |o| if answers are not to be shuffled. It sets % the number of answers counter to zero, and calls |\AMCrep@o| % or |\AMCrep@r| depending on \meta{mode}. These commands sets % |\AMCload@@reponse| and |\AMCrep@fini| that will be called for % each answer and after the last answer respectively, depending % on \meta{mode}: % \begin{itemize} % \item If \meta{mode}=|r|, |\AMCload@@reponse| is % |\AMCload@reponse| (loads answer to token register) and % |\AMCrep@fini| calls |\shuffle@it| and |\AMCdump@reponses|; % \item If \meta{mode}=|o|, |\AMCload@@reponse| is % |\AMCrien@deux| (prints answer directly) and |\AMCrep@fini| % does nothing. % \end{itemize} % % Command |\lastchoices| is called before giving answers that % are to be printed at the end (even when shuffling answers). It % closes the answers list calling |\AMCrep@fini| and opens % another one in ordered mode. Note that it also saves the value % of |\AMCrep@count|, which is the number of the current answer % among all answers given in the subject source for the current % question. % % Command |\AMC@fin@rep| is to be called after the last answer: % it adds a ``\makeatletter\AMC@loc@none\makeatother'' answer if % necessary (package option |completemulti|) with answer number % zero, and calls |\AMCrep@fini|. % \begin{macrocode} \newcommand\AMCrep@init[1]{% \ifAMC@ordre\AMCrep@o\else% \csname AMCrep@#1\endcsname\fi\AMCload@counter=\z@} \newcommand\AMCrep@o{% \def\AMCload@@reponse{\AMCrien@deux}\def\AMCrep@fini{}} \newcommand\AMCrep@r{% \def\AMCload@@reponse{\AMCload@reponse}% \def\AMCrep@fini{\shuffle@it\AMCdump@reponses}} \newcount\AMCrep@@count \newcommand\lastchoices{% \AMCrep@@count=\AMCrep@count% \AMCrep@fini\AMCrep@init{o}% \AMCrep@count=\AMCrep@@count} \newcommand\@aucune{\emph{\AMC@loc@none}} \newcommand\AMC@fin@rep{% \ifAMCcomplete@multi\ifAMCtype@multi% \lastchoices\AMCrep@count=-1% \ifAMCune@bonne\wrongchoice{\@aucune}\else% \ifAMC@postcorrect\wrongchoice{\@aucune}\else\correctchoice{\@aucune}\fi% \fi\fi\fi\AMCrep@fini} % \end{macrocode}\end{macro}\end{macro}\end{macro} % % \subsubsection{Separate answer sheet} % % This package needs some memory to print questions/answers boxes % again on a separate answer sheet. % % \begin{macro}{\AMCformQuestion}\begin{macro}{\AMCformAnswer} % First define commands that will announce questions and answers % on the separate answer sheet (these commands can be modified by % the user): |\AMCformQuestion|\marg{number} is responsible for % announcing question, and % |\AMCformAnswer|\marg{box} is responsible for printing the box % to be ticked, given as argument \meta{box}. % % Commands |\AMCformQuestionA| and |\AMCformAnswerA| set up % counter |\AMC@ncase| value before calling their counterparts. % % \begin{macrocode} \def\AMCformBeforeQuestion{\vspace{\AMCformVSpace}\par} \def\AMCformAfterQuestion{\ifAMC@asqbloc\egroup\fi} \def\AMCformQuestion#1{\AMC@loc@qf{#1}} \def\AMCformQuestionN{\AMCformQuestion{\AMC@qaff}} \def\AMCformQuestionA{% \setcounter{AMC@ncase}{0}% \AMCformBeforeQuestion% \ifAMC@asqbloc\vbox\bgroup\fi% \ifx\@empty\AMC@sza@callout\@empty\else% \csname\AMC@sza@callout\endcsname% \fi% \AMCformQuestionN% \ifx\@empty\AMC@sza@callin\@empty\else% \csname\AMC@sza@callin\endcsname% \fi% } \def\AMCformAnswer#1{\hspace{\AMCformHSpace} #1} \def\AMCformAnswerA#1{\addtocounter{AMC@ncase}{1}\AMCformAnswer{#1}} % \end{macrocode}\end{macro}\end{macro}\ % % \begin{macro}{\AMC@mem@add@ifneeded}\begin{macro}{\AMCformBegin}\begin{macro}{\AMCform}\begin{macro}{\AMCformS} % These are commands to manage memory for separate answer % sheet. |\AMC@mem@add@ifneeded|\marg{code} adds \meta{code} to this % memory. |\AMC@mem@answer|\marg{code} adds to memory answer % code \meta{code}, and |\AMC@mem@openQuestion| adds to memory question % code to announce current question. % % The command |\AMCformBegin| defines the beginning of the % separate answer sheet for the current student sheet, and % |\AMCform| prints the whole memory: questions and answers % boxes. % % |\AMCformS| is a |\AMCform| variant that does not clear the % list of answer boxes. It can be used to make the same exact % subject for all students, displaying the questions before % (outside) |onecopy|, so that |onecopy| contains only the % answer sheet. % % \begin{macrocode} \ExplSyntaxOn \prg_set_conditional:Nnn \amc_if_separate_question: { p , T } { \ifAMC@ensemble \ifAMC@zoneformulaire \prg_return_false: \else \prg_return_true: \fi \else \prg_return_false: \fi } \cs_new_eq:NN \AMC@if@separate@question \amc_if_separate_question:T \int_new:N \amc_memory_elts_count \cs_new:Nn \amc_clear_memory: { \int_gzero:N \amc_memory_elts_count } \cs_new_eq:NN \AMC@mem@clear \amc_clear_memory: \cs_new:Npn \amc_memory_elt_i:n #1 { amc_memory_elts_ \int_to_alph:n { #1 } } \cs_new:Nn \amc_memory_current_elt: { \amc_memory_elt_i:n \amc_memory_elts_count } \cs_new:Npn \amc_memory_vars_i:n #1 { amc_memory_vars_ \int_to_alph:n { #1 } } \cs_new:Nn \amc_memory_current_vars: { \amc_memory_vars_i:n \amc_memory_elts_count } \cs_new:Nn \amc_add_memory_elt: { \int_gincr:N \amc_memory_elts_count \tl_gclear_new:c { \amc_memory_current_elt: } \tl_gclear_new:c { \amc_memory_current_vars: } } \cs_new_eq:NN \AMC@mem@next \amc_add_memory_elt: \cs_new:Npn \amc_add_to_memory:n #1 { \tl_gput_right:cn { \amc_memory_current_elt: } { #1 } } \cs_new_eq:NN \AMC@mem@add \amc_add_to_memory:n \cs_new:Npn \amc_add_to_vars:n #1 { \tl_gput_right:cn { \amc_memory_current_vars: } { #1 } } \cs_new_eq:NN \AMC@mem@addvar \amc_add_to_vars:n \cs_new:Npn \amc_add_qidaffname:nnn #1#2#3 { \amc_add_to_vars:n {\AMCid@quest=#1\setcounter{AMCquestionaff}{#2}% \global\def\AMCid@name{#3}} } \cs_generate_variant:Nn \amc_add_qidaffname:nnn { xxx } \cs_new_eq:NN \AMC@mem@qidaffname \amc_add_qidaffname:xxx \cs_new:Npn \amc_mem_elt_cat:n #1 { \amc_add_to_vars:n { \def\AMCmem@elt@cat{ #1 } } } \cs_generate_variant:Nn \amc_mem_elt_cat:n { x } \cs_new_eq:NN \AMC@mem@category \amc_mem_elt_cat:x \cs_new:Npn \amc_add_aid:n #1 { \amc_add_to_memory:n {\AMCrep@count=#1} } \cs_generate_variant:Nn \amc_add_aid:n { x } \cs_new_eq:NN \AMC@mem@aid \amc_add_aid:x \cs_new:Npn \amc_if_category_is_p:n #1 { \str_if_eq_p:on { \AMCmem@elt@cat } { #1 } } \cs_new:Npn \amc_use_memory:n #1 { \int_step_inline:nnnn { 1 } { 1 } \amc_memory_elts_count { \def\AMCmem@elt@cat{ plain } \tl_use:c { \amc_memory_vars_i:n { ##1 } } \bool_if:nTF { #1 } { \tl_use:c { \amc_memory_elt_i:n { ##1 } } } { } } } \cs_new:Nn \amc_use_memory: { \amc_use_memory:n { \c_true_bool } } \cs_new_eq:NN \AMC@mem@show \amc_use_memory: \cs_new_eq:NN \AMC@mem@show@filter \amc_use_memory:n \cs_new_eq:NN \AMCifcategory \amc_if_category_is_p:n \ExplSyntaxOff \newcommand\AMC@mem@add@ifneeded[1]{% \AMC@if@separate@question{% \AMC@mem@add{#1}% }% } \newcommand\AMC@mem@addsingle@ifneeded[2]{% \AMC@if@separate@question{% \AMC@mem@next% \AMC@mem@category{#2}% \AMC@mem@add{#1}% }% } \newcommand\AMC@mem@answer[1]{% \addtocounter{AMC@ncase}{1}% \AMC@if@separate@question{% \AMC@mem@aid{\the\AMCrep@count}% \AMC@mem@add{\AMCformAnswerA{#1}}% }% } \newcommand\AMC@mem@openQuestion{% \AMC@if@separate@question{% \AMC@mem@next% \AMC@mem@qidaffname{\the\AMCid@quest}{\arabic{AMCquestionaff}}{\AMCid@name}% \AMC@mem@add{\AMCformQuestionA}% }% } \def\AMCformBegin{% \AMC@zoneformulairetrue\setcounter{section}{0}% \ifAMC@ensemble\ifAMC@automarks\pagestyle{AMCpageFull}\fi\fi% } \newcommand\AMCform{% \ifAMC@ensemble\AMCformulaire@dedanstrue% \AMC@mem@show% \fi} \newcommand\AMCformFilter[1]{% \ifAMC@ensemble\AMCformulaire@dedanstrue% \AMC@mem@show@filter{#1}% \fi} \newif\ifAMC@keepmemory \newcommand\AMCformS{% \ifAMC@ensemble\AMCformulaire@dedanstrue% \AMC@amclog{AUTOQCM[BR=0]^^J}\AMC@mem@show% \AMC@keepmemorytrue% \fi} % \end{macrocode}\end{macro}\end{macro}\end{macro}\end{macro} % % \begin{macro}{\AMCsection}\begin{macro}{\AMCsubsection} % The |\AMCsection| and |\AMCsubsection| commands issue their % standard counterparts (|\section| and |\subsection| with the % same argument, both in the subject \emph{and} in the separate % answer sheet. % \begin{macrocode} \newcommand{\AMCsectionNumbered}[1]{% \section{#1}\AMC@mem@addsingle@ifneeded{\section{#1}}{section}} \newcommand{\AMCsubsectionNumbered}[1]{% \subsection{#1}\AMC@mem@addsingle@ifneeded{\subsection{#1}}{subsection}} \newcommand{\AMCsectionStar}[1]{% \section*{#1}\AMC@mem@addsingle@ifneeded{\section*{#1}}{section}} \newcommand{\AMCsubsectionStar}[1]{% \subsection*{#1}\AMC@mem@addsingle@ifneeded{\subsection*{#1}}{subsection}} \def\AMCsection{\@ifstar\AMCsectionStar\AMCsectionNumbered} \def\AMCsubsection{\@ifstar\AMCsubsectionStar\AMCsubsectionNumbered} % \end{macrocode} % \end{macro}\end{macro} % % \subsubsection{Formatting answers} % % \begin{environment}{choices}\begin{environment}{choiceshoriz}\begin{environment}{choicescustom}\begin{macro}{\AMCBoxedAnswers} % Answers have to be included in an environment |choices| % (standard), |choiceshoriz| (answers on one line) or % |choicescustom| (user defined) depending on the desired % formatting. % % Use |\AMCBoxedAnswers| to request all answers to be included % in \LaTeX{} boxes; this can be useful for example when using % multicolumn answers formatting. % \begin{macrocode} \def\AMCBoxedAnswers{\AMC@rbloctrue} \newenvironment{choices}[1][r]{% \AMCrep@count=\z@\def\une@rep{\AMCrep@itemize}% \ifAMC@rbloc\def\une@rep{\AMCrep@bloc}% \else\begin{itemize}\setlength{\itemsep}{\AMCinterIrep}\fi% \AMCrep@init{#1}}% {\AMC@fin@rep\ifAMC@rbloc\else\end{itemize}\fi} \newenvironment{choiceshoriz}[1][r]{% \AMCrep@count=\z@\def\une@rep{\AMCrep@ligne}\AMCrep@init{#1}% \par\begin{center}}% {\AMC@fin@rep\end{center}} \newenvironment{choicescustom}[1][r]{% \AMCrep@count=\z@\def\une@rep{\AMCrep@perso}\AMCrep@init{#1}% \AMCbeginAnswer\ignorespaces}% {\AMC@fin@rep\AMCendAnswer} % \end{macrocode}\end{macro}\end{environment}\end{environment}\end{environment} % % \begin{macro}{\AMCrep@bloc}\begin{macro}{\AMCrep@itemize} % \begin{macro}{\AMCrep@ligne}\begin{macro}{\AMCrep@perso} % For each of these styles, a corresponding % |\AMCrep@|$xxx$\marg{box}\marg{text} is defined, which will % format the answer with a box given in \meta{box} and text % \meta{text}. |\AMCrep@bloc| is also defined and used in standard % formatting when the user wants to put answers inside a \LaTeX{} % box. % \begin{macrocode} \newcommand\AMCrep@bloc[2]{\AMC@mem@answer{#1}% \par\noindent\begin{minipage}{\linewidth}% \begin{itemize}\item[#1] #2\end{itemize}\end{minipage}% \vspace{\AMCinterBrep}} \newcommand\AMCrep@itemize[2]{\AMC@mem@answer{#1}\item[#1] #2} \newlength\AMChorizAnswerSep \setlength{\AMChorizAnswerSep}{3em plus 4em} \newlength\AMChorizBoxSep \setlength{\AMChorizBoxSep}{1em} \newcommand\AMCrep@ligne[2]{\AMC@mem@answer{#1}% \mbox{#1\hspace*{\AMChorizBoxSep}#2}\hspace{\AMChorizAnswerSep}} \newcommand\AMCrep@perso[2]{\AMC@mem@answer{#1}\AMCanswer{#1}{#2}} % \end{macrocode}\end{macro}\end{macro}\end{macro}\end{macro} % % \begin{macro}{\AMCbeginAnswer}\begin{macro}{\AMCendAnswer}\begin{macro}{\AMCanswer} % The |custom| style will use user-defined commands to format % answers: |\AMCbeginAnswer| is called once before answers, % |\AMCanswer|\marg{box}\marg{text} is called for each answer % (\meta{box} beeing the box to be ticked and \meta{text} the % text associated with the proposed answer), and |\AMCendAnswer| % is called after all answers. % \begin{macrocode} \def\AMCbeginAnswer{} \def\AMCanswer#1#2{#1 #2} \def\AMCendAnswer{} % \end{macrocode}\end{macro}\end{macro}\end{macro} % % \begin{macro}{\correctchoice}\begin{macro}{\wrongchoice} % The commands |\correctchoice| and |\wrongchoice| are used inside % |choices|-like environments to give the proposed answers and % specify if they are to be tocked by the students or not. % % \begin{macrocode} \newcommand{\correctchoice}[2][]{\global\advance\AMCrep@count\@ne\relax% \ifAMC@calibration\AMC@amclog{AUTOQCM[REP=\the\AMCrep@count:B]^^J}\fi% \global\AMCune@bonnetrue% \AMCload@@reponse{\une@rep{\ifAMC@correc\AMC@box{#1}{\AMC@checkedbox}% \else\AMC@box{#1}{}\fi}{#2}}{\the\AMCrep@count}\ignorespaces} \newcommand{\wrongchoice}[2][]{\global\advance\AMCrep@count\@ne\relax% \ifAMC@calibration\AMC@amclog{AUTOQCM[REP=\the\AMCrep@count:M]^^J}\fi% \AMCload@@reponse{\une@rep{\AMC@box{#1}{}}{#2}}{\the\AMCrep@count}% \ignorespaces} % \end{macrocode}\end{macro}\end{macro} % % \subsubsection{Score zones} % \begin{macro}{\AMCscoreZone}\begin{macro}{\AMCscoreZoneAnswerSheet} % The position of the scores on the annotated answer sheets can be % defined in the \LaTeX{} source file using % |\AMCsetScoreZone|\marg{options} (or % |\AMCsetScoreZoneAnswerSheet|\marg{options} for the answer sheets when % the separate answer sheet option is used). % % First begin with some helpers: % |\AMCemptybox|\marg{width}\marg{height}\marg{depth} draws an empty % box with specified dimensions, and |\AMCmarginNote|\marg{note} (code % from one of |sgmoye|'s comments on |tex.stackexchange.com|) prints a % marginal note in the left or right margin, depending on current the % position (usefull in |multicols| environment). % % \begin{macrocode} \newcommand{\AMCemptybox}[3]{{% \sbox0{}\wd0=#1\ht0=#2\dp0=#3\relax\box0}} \newlength\AMC@mn@test \newlength\AMC@mn@sep\AMC@mn@sep=4mm \newlength\AMC@mn@leftmargin \newlength\AMC@mn@rightmargin \newcommand\AMCmarginNote[1]{% \begin{tikzpicture}[remember picture,overlay]% \coordinate (here) at (0,0);% \pgfextractx{\AMC@mn@test}{\pgfpointdiff{\pgfpointorigin}% {\pgfpointanchor{current page}{center}}}% \ifodd\thepage% \AMC@mn@leftmargin=\oddsidemargin% \AMC@mn@rightmargin=\evensidemargin% \else \AMC@mn@leftmargin=\evensidemargin% \AMC@mn@rightmargin=\oddsidemargin% \fi \ifdim\AMC@mn@test < 1cm% \draw (current page.east |- here)+(-\AMC@mn@rightmargin-1in+\AMC@mn@sep,0pt) node[anchor=text,align=left,text width=\AMC@mn@rightmargin+1in-\AMC@mn@sep]{\strut #1};% \else% \draw (current page.west |- here)+(0cm,0pt) node[anchor=text,align=right,text width=\AMC@mn@leftmargin+1in-\AMC@mn@sep]{\strut #1};% \fi% \end{tikzpicture}% } % \end{macrocode} % % Define now different ways to place the score zone: % \begin{itemize} % \item[|none|] nowhere % \item[|question|] right after the question heading % \item[|margin|] in the margin, using |marginpar| (this does not work % with |multicols| environment) % \item[|margins|] in the left or right margin, depending on the % current position (needs |tikz| package) % \end{itemize} % % \begin{macrocode} \newcommand{\AMC@sz@box}{\AMCemptybox{\AMC@sz@width}{\AMC@sz@height}{\AMC@sz@depth}} % \newcommand{\AMC@sz@callin@question}{\AMCscoreZone{\AMC@sz@box}} % \newcommand{\AMC@sz@callout@margin}{\hspace{0pt}\marginpar{\AMCscoreZone{\AMC@sz@box}}} % \newcommand{\AMC@sz@init@margins}{\PackageWarning{automultiplechoice}{Please run twice to get proper margin notes position.}} \newcommand{\AMC@sz@callout@margins}{\hspace{0pt}\AMCmarginNote{\AMCscoreZone{\AMC@sz@box}}} % \end{macrocode} % % Let us now set up options handling. % % \begin{macrocode} \newlength\AMC@sz@width \newlength\AMC@sz@height \newlength\AMC@sz@depth \def\AMC@sz@callout{} \def\AMC@sz@callin{} \define@key{AMCsz}{width}{\AMC@sz@width=#1} \define@key{AMCsz}{height}{\AMC@sz@height=#1} \define@key{AMCsz}{depth}{\AMC@sz@depth=#1} \define@key{AMCsz}{calloutside}{\def\AMC@sz@callout{#1}} \define@key{AMCsz}{callinside}{\def\AMC@sz@callin{#1}} \define@choicekey{AMCsz}{position}{none,question,margin,margins}{% \ifcsname AMC@sz@callout@#1\endcsname% \def\AMC@sz@callout{AMC@sz@callout@#1}% \else% \def\AMC@sz@callout{}% \fi% \ifcsname AMC@sz@callin@#1\endcsname% \def\AMC@sz@callin{AMC@sz@callin@#1}% \else% \def\AMC@sz@callin{}% \fi% \ifcsname AMC@sz@init@#1\endcsname% \csname AMC@sz@init@#1\endcsname% \fi% } \newcommand{\AMCsetScoreZone}[1]{\setkeys{AMCsz}{#1}} \AMCsetScoreZone{width=1.5em,height=1.5ex,depth=.5ex,position=none} % \end{macrocode} % % And do the same for |\AMCsetScoreZoneAnswerSheet|... % % \begin{macrocode} \newcommand{\AMC@sza@box}{\AMCemptybox{\AMC@sza@width}{\AMC@sza@height}{\AMC@sza@depth}} % \newcommand{\AMC@sza@init@none}{} \newcommand{\AMC@sza@callout@none}{} \newcommand{\AMC@sza@callin@none}{} % \newcommand{\AMC@sza@init@question}{} \newcommand{\AMC@sza@callout@question}{} \newcommand{\AMC@sza@callin@question}{\AMCscoreZone{\AMC@sza@box}} % \newcommand{\AMC@sza@init@margin}{} \newcommand{\AMC@sza@callout@margin}{\hspace{0pt}\marginpar{\AMCscoreZone{\AMC@sza@box}}} \newcommand{\AMC@sza@callin@margin}{} % \newcommand{\AMC@sza@init@margins}{\PackageWarning{automultiplechoice}{Please run twice to get proper margin notes position.}} \newcommand{\AMC@sza@callout@margins}{\hspace{0pt}\AMCmarginNote{\AMCscoreZone{\AMC@sz@box}}} \newcommand{\AMC@sza@callin@margins}{} % \newlength\AMC@sza@width \newlength\AMC@sza@height \newlength\AMC@sza@depth \def\AMC@sza@callout{} \def\AMC@sza@callin{} \define@key{AMCsza}{width}{\AMC@sza@width=#1} \define@key{AMCsza}{height}{\AMC@sza@height=#1} \define@key{AMCsza}{depth}{\AMC@sza@depth=#1} \define@key{AMCsza}{calloutside}{\def\AMC@sza@callout{#1}} \define@key{AMCsza}{callinside}{\def\AMC@sza@callin{#1}} \define@choicekey{AMCsza}{position}{none,question,margin,margins}{% \ifcsname AMC@sza@callout@#1\endcsname% \def\AMC@sza@callout{AMC@sza@callout@#1}% \else% \def\AMC@sza@callout{}% \fi% \ifcsname AMC@sza@callin@#1\endcsname% \def\AMC@sza@callin{AMC@sza@callin@#1}% \else% \def\AMC@sza@callin{}% \fi% \ifcsname AMC@sza@init@#1\endcsname% \csname AMC@sza@init@#1\endcsname% \fi% } \newcommand{\AMCsetScoreZoneAnswerSheet}[1]{\setkeys{AMCsza}{#1}} \AMCsetScoreZoneAnswerSheet{width=1.5em,height=1.5ex,depth=.5ex,position=none} \newcommand{\AMCnoScoreZone}{\AMCsetScoreZone{position=none}\AMCsetScoreZoneAnswerSheet{position=none}} % \end{macrocode} % % \end{macro}\end{macro} % % \subsubsection{Formatting questions} % % \begin{macro}{\AMCquestionaff}\begin{macro}{\AMC@stepQuestion}\begin{macro}{\AMC@qaff} % The counter |\AMCquestionaff| keeps track of the current question % number. It can be redefined by the user, for example to print % several questions without a number, and then print questions with a % number starting at one. % % |\AMC@stepQuestion| will increase this counter and |\AMC@qaff| will % format the question number out. % \begin{macrocode} \newcounter{AMCquestionaff} \newcommand{\AMCnumero}[1]{\setcounter{AMCquestionaff}{#1}\addtocounter{AMCquestionaff}{-1}} \AtBeginDocument{% \ifx\@skiphyperreftrue\@undefined% \expandafter\newif\csname if@skiphyperref\endcsname% \fi% } \newcommand\AMC@stepQuestion{\ifAMCquestionNumber\@skiphyperreftrue\refstepcounter{AMCquestionaff}\@skiphyperreffalse\fi} \newcommand\AMC@qaff{\arabic{AMCquestionaff}} % \end{macrocode}\end{macro}\end{macro}\end{macro} % % \begin{macro}{\AMCbeforeQuestion} % \begin{macro}{\AMCbeginQuestion}\begin{macro}{\multiSymbole} % The command |\AMCbeforeQuestion| opens a new question. The % command |\AMCbeginQuestion|\marg{n}\marg{sign} will format the % question header, where \meta{n} is the question number and % \meta{sign} beeing |\multiSymbole| in case of a multiple % question, and empty in case of a simple % one. |\AMCbeforeQuestion|, |\AMCbeginQuestion| and % |\multiSymbole| can be user-redifined. % \begin{macrocode} \def\AMCbeforeQuestion{\ifAMC@qbloc\else\par\noindent\fi} \def\AMCbeginQuestion#1#2{\noindent\AMC@loc@q{#1}{#2}% \ifx\@empty\AMC@sz@callin\@empty\hspace*{1em}\fi% } \def\multiSymbole{$\clubsuit$} % \end{macrocode}\end{macro}\end{macro}\end{macro} % % \begin{environment}{question}\begin{environment}{questionmult}\begin{environment}{questionouverte}\begin{macro}{\ouverte@vs} % Environment |{question}|\marg{key} encloses a simple question % (with one and only one correct choice) with associated % unique key \meta{key} and the proposed answers. % % Environment |{questionmult}|\marg{key} is the same for % multiple questions (with none, one or several correct % choices). % % Environment |{questionmultx}|\marg{key} is the same as % |questionmult|, but with no use of |\multiSymbole|. % % Environment |{questionouverte}|\oarg{width} is used for open % questions (that won't be marked automatically!), with width % given as an optional argument (defaults to 3\,cm). % \begin{macrocode} \ifx\question\undefined\else\let\question\undefined\fi \def\AMCnobloc{\AMC@qblocfalse} \def\AMCbloc{\AMC@qbloctrue} \newenvironment{question}[2][]{% \def\AMCcurrentenv{question}% \AMC@stepQuestion% \global\def\AMCid@name{#2}\AMC@affecte{#2}{\AMCid@quest}% \ifAMC@calibration\AMCmessage{Q=\the\AMCid@quest}\fi% \AMCbeforeQuestion% \ifx\@empty\AMC@sz@callout\@empty\else% \csname\AMC@sz@callout\endcsname% \fi% \AMCtype@multifalse\ifAMC@qbloc\noindent\begin{minipage}{\linewidth}\fi% \ifAMC@affichekeys\index{\texttt{#2}}\fi% \AMCbeginQuestion{\ifAMC@affichekeys\ifAMC@ensemble\AMC@qaff\ \fi[\texttt{#2}]\else\AMC@qaff\fi}{#1}% \ifx\@empty\AMC@sz@callin\@empty\else% \csname\AMC@sz@callin\endcsname% \fi% \AMCformulaire@dedansfalse\setcounter{AMC@ncase}{0}% \AMC@mem@openQuestion}% {\ifAMC@qbloc\end{minipage}\vspace{\AMCinterBquest}\else\vspace{\AMCinterIquest}\fi\AMCmessage{FQ}\AMC@mem@add@ifneeded{\AMCformAfterQuestion}} \newenvironment{questionmult}[1]{% \AMCune@bonnefalse\begin{question}[{{\multiSymbole}}]{#1}% \AMCtype@multitrue\ifAMC@calibration% \AMC@amclog{AUTOQCM[MULT]^^J}\fi}% {\end{question}} \newenvironment{questionmultx}[1]{% \begingroup\def\multiSymbole{}\begin{questionmult}{#1}}% {\end{questionmult}\endgroup} \newdimen\ouverte@vs \newenvironment{questionouverte}[1][3cm]{% \AMC@stepQuestion% \AMCtype@multifalse\ouverte@vs=#1% \ifAMC@qbloc\noindent\begin{minipage}{\linewidth}\fi% \AMCbeginQuestion{\AMC@qaff}{}}% {\vspace*{\ouverte@vs}\ifAMC@qbloc\end{minipage}\vspace{3ex}\fi} % \end{macrocode}\end{macro}\end{environment}\end{environment}\end{environment} % % \subsubsection{Explanations} % % \begin{macro}{\explain} % The command |\explain| is used inside |question|-like environments % to give the explanation for the answers of a question. % \begin{macrocode} \newcommand{\explain}[1]{% \ifAMC@correchead% \AMCif@env{question}{\par\noindent{\AMC@loc@explain #1}}{\AMC@error@explain}\vspace{1ex}% \else% \AMCif@env{question}{}{\AMC@error@explain}% \fi% } % \end{macrocode} % \end{macro} % % \subsection{Scoring} % % \begin{macro}{\scoring}\begin{macro}{\scoringDefaultS}\begin{macro}{\scoringDefaultM}\begin{macro}{\QuestionIndicative} % Scoring strategies are simply transmitted to the |.amc| file % for later analysis. % % |\scoring|\marg{scrore} details the scoring strategy for % current question or current answer, % |\scoringDefaultS|\marg{score} and % |\scoringDefaultM|\marg{score} gives default scoring % strategy for simple and multiple questions, and % |\QuestionIndicative| tells that the current question is not % no be taken into account in the global mark. % \begin{macrocode} \def\scoring#1{\ifAMC@calibration\AMC@amclog{AUTOQCM[B=#1]^^J}\fi} \def\scoringDefaultS#1{\ifAMC@calibration\AMC@amclog{AUTOQCM[BDS=#1]^^J}\fi} \def\scoringDefaultM#1{\ifAMC@calibration\AMC@amclog{AUTOQCM[BDM=#1]^^J}\fi} \def\QuestionIndicative{\ifAMC@calibration\AMC@amclog{AUTOQCM[INDIC]^^J}\fi} % \end{macrocode}\end{macro}\end{macro}\end{macro}\end{macro} % % \subsection{Numerical data} % % \subsubsection{Codes} % % \begin{macro}{\AMCcodeGrid}\begin{macro}{\AMCcodeGridInt} % \noindent\begin{minipage}[t]{.65\linewidth} % Students can code some numerical information (such as student % number) through special questions, which can be formatted easily % with the command |\AMCcodeGrid|\oarg{opts}\marg{key}\marg{descr}, % where \meta{key} is a key prefix and \meta{descr} is a % coma-separated list of character pools to offer. The characters % entered by the student will be available through the questions % \meta{key}|[1]|$,\ldots,$\meta{key}|[|\meta{length(descr)}|]|. % % As an example, % % |\AMCcodeGrid{code}{ABCD,012345,012345,012345,012345}| % produces the opposite boxes (two results are show here: without or % with |separateanswersheet| option), and trace positions of all the % boxes in the |.xy| file with the |code| identifier: the first % digit is represented by question with key |code[6]|, the second by % question with key |code[5]|, and so on. % % Positions of the boxes are logged in the |.xy| file, as shown in % section~\ref{a:code} for the first set of boxes (without % |separateanswersheet|, with digits outside boxes). % \end{minipage}\hfill % \begin{minipage}[t]{.3\linewidth} % \begin{amcxyfile}{automultiplechoice.xy3}\AMCcodeGrid{code}{ABCD,012345,012345,012345,012345}\end{amcxyfile} % % \vspace{4mm} % \makeatletter\AMC@ensembletrue\makeatother % \AMCcodeGrid{code}{ABCD,012345,012345,012345,012345} % \end{minipage} % \vspace{4mm} % % \noindent\begin{minipage}[t]{.35\linewidth} % The ``horizontal'' version can also be considered using option |h|, % especially with a small number of digits. See opposite for the % result of |\AMCcodeGrid[h]{code}{ABCDEF,0123456789,0123456789}|. % \end{minipage}\hfill % \begin{minipage}[t]{.6\linewidth} % \AMCcodeGrid[h]{code}{ABCDEF,0123456789,0123456789} % \end{minipage} % % The |\AMCcodeGridInt|\oarg{opts}\marg{key}\marg{n} is a shorcut for % calling |\AMCcodeGrid| with \meta{n} digits from 0 to 9. This allows % to create grids for \meta{n}-digits integers easily. % % These two commands supports the following options (given as a % comma-separated list optional argument \meta{opts}): % \begin{itemize} % \item |vertical|=|true| or |false| to indicate the direction to be used (default is |true|); % \item |h| is a shortcut for |vertical=false|; % \item |v| is a shortcut for |vertical=true|; % \item |top| to request top-aligned columns in vertical direction. % \end{itemize} % % \begin{macrocode} \newcount\AMC@chiffres \newdimen\AMCcodeHspace\AMCcodeHspace=.5em \newdimen\AMCcodeVspace\AMCcodeVspace=.5em \ExplSyntaxOn \clist_new:N \amc_code_descr_clist \seq_new:N \amc_code_digits_seq \int_new:N \amc_code_digit_n_int \bool_new:N \amc_code_vertical_bool \bool_new:N \amc_code_top_bool \cs_new:Npn \amc_code_init:N #1 { \def\AMCbeginQuestion##1##2{} \def\AMCbeforeQuestion{} \AMCnoScoreZone \AMCquestionNumberfalse \setlength{\parindent}{0pt} \AMCnobloc \int_set:Nn \amc_code_digit_n_int { \clist_count:N #1 } } \cs_new:Nn \amc_code_digit_init: { \QuestionIndicative \global\AMCrep@count=\z@ } \cs_new:Npn \amc_code_digit:n #1 { \global\advance\AMCrep@count\@ne\relax \ifAMC@calibration\AMC@amclog{AUTOQCM[ REP = \the\AMCrep@count : M ]^^J}\fi \hbox{\AMC@keyBox@{#1}{}{1}{case : \AMCid@name : \the\AMCid@quest , \the\AMCrep@count}} \bool_if:NTF \amc_code_vertical_bool { \vspace{\AMCcodeVspace} }{ \hspace{\AMCcodeHspace} } } \keys_define:nn { amccode } { vertical .bool_set:N = \amc_code_vertical_bool, vertical .initial:n = { true }, vertical .default:n = { true }, v .code:n = { \bool_set_true:N \amc_code_vertical_bool }, h .code:n = { \bool_set_false:N \amc_code_vertical_bool }, top .bool_set:N = \amc_code_top_bool, top .initial:n = { false }, top .default:n = { true } } \cs_new:Npn \amc_code_generate:nNn #1#2#3 { { \keys_set:nn { amccode } { #3 } \amc_code_init:N #2 \clist_map_inline:Nn #2 { % iterates over 'digits' \begin{question}{#1[ \int_use:N \amc_code_digit_n_int ]} \amc_code_digit_init: \seq_set_split:Nnn \amc_code_digits_seq {} { ##1 } \bool_if:NTF \amc_code_vertical_bool { \hspace{0pt} \bool_if:NTF \amc_code_top_bool { \vtop } { \vbox } \bgroup }{ \hbox\bgroup } \seq_map_inline:Nn \amc_code_digits_seq { % iterates over available characters for 'digit' \amc_code_digit:n { ####1 } } \bool_if:NTF \amc_code_vertical_bool { \vspace{-\AMCcodeVspace}\egroup \hspace{\AMCcodeHspace} }{ \egroup\vspace{\AMCcodeVspace} \par } \end{question} \int_decr:N \amc_code_digit_n_int } } } \cs_new:Npn \amc_code_generate:nnn #1#2#3 { \clist_set:Nn \amc_code_descr_clist { #2 } \amc_code_generate:nNn { #1 } \amc_code_descr_clist { #3 } } \cs_generate_variant:Nn \amc_code_generate:nnn { xxx } \newcommand{\AMCcodeGrid}[3][]{ \amc_code_generate:xxx { #2 } { #3 } { #1 } } \cs_new:Npn \amc_code_generate_integer:nnn #1#2#3 { \clist_clear:N \amc_code_descr_clist \prg_replicate:nn { #2 } { \clist_put_right:Nn \amc_code_descr_clist { 0123456789 } } \amc_code_generate:nNn { #1 } \amc_code_descr_clist { #3 } } \cs_generate_variant:Nn \amc_code_generate_integer:nnn { xxx } \newcommand{\AMCcodeGridInt}[3][]{ \amc_code_generate_integer:xxx { #2 } { #3 } { #1 } } \cs_new:Npn \amc_code_generate_integer_v:nn #1#2 { \amc_code_generate_integer:nnn { #1 } { #2 } { v } } \cs_new:Npn \amc_code_generate_integer_h:nn #1#2 { \amc_code_generate_integer:nnn { #1 } { #2 } { h } } \cs_generate_variant:Nn \amc_code_generate_integer_v:nn { xx } \cs_generate_variant:Nn \amc_code_generate_integer_h:nn { xx } \cs_new_eq:NN \AMCcode \amc_code_generate_integer_v:xx \cs_new_eq:NN \AMCcodeH \amc_code_generate_integer_h:xx \ExplSyntaxOff % \end{macrocode}\end{macro}\end{macro} % % \subsubsection{Numerical questions} % % \begin{macro}{\AMCnumericChoices} % The command |\AMCnumericChoices|\marg{correct}\marg{options} can be % used as a replacement for the |choices| environment when the % questions asks for a numeric value to code on the answer sheet. % % As an example, %\iffalse %<*doc> %\fi \begin{verbatim} \begin{question}{product} What is the value of $7\times 5$? \AMCnumericChoices{35}{digits=2,sign=false} \end{question} \end{verbatim} %\iffalse % %\fi % produces (in correction mode): % % \begin{center} % {\makeatletter\AMC@correctrue\makeatother % \fbox{ % \begin{minipage}{.7\linewidth} % \begin{question}{product} % What is the value of $7\times 5$? % \AMCnumericChoices{35}{digits=2,sign=false} % \end{question} % \end{minipage}}} % \end{center} % % \noindent and these boxes are only shown on the separate answer sheet if the % |separateanswersheet| option is used. % % This command uses the % |\AMCformatChoices|\marg{showcommand}\marg{hidecommand}\marg{arg1}\marg{arg2} % command, that calls either \meta{hidecommand}\marg{arg1}\marg{arg2} % if the |separateanswersheet| option is used and if we are currently % in the question part (not in the answer sheet), or % \meta{showcommand}\marg{arg1}\marg{arg2} when all the boxes are to % be produced. % % \begin{macrocode} \newcommand\AMCformatChoices[4]{% \global\AMCrep@count=\z@% \AMC@if@separate@question{% \AMC@mem@add{\global\AMCrep@count=\z@% #1{#3}{#4}}% }% \ifAMC@ensemble% #2{#3}{#4}% \AMC@amclog{AUTOQCM[QPART]^^J}% \else% #1{#3}{#4}% \fi% } % \end{macrocode} % % Some computation commands are now defined. The command % |\amc_fp_decompose:NNn|\marg{fp var}\marg{int var}\marg{x} sets % \meta{fp var} to be the \emph{mantissa} and \meta{int var} the % \emph{exponent} of the flaoting point number \meta{x}. For example, % |\amc_fp_decompose:NNn\mant_fp\expo_int{123.456}| give the value % |1.23456| to |\mant_fp| and |2| to |\expo_int| (because % $123.456=1.23456\times 10^{2}$). % % The command |\amc_fp_to_digits:Nnnn|\marg{clist}\meta{x}\meta{n % digits}\meta{base} rounds the floating point number \meta{x} and % populates the comma separated list \meta{clist} with its \meta{n % digits} digits in base \meta{base}. An error is issued if \meta{x} % would have required more digits. % \begin{macrocode} \ExplSyntaxOn \cs_generate_variant:Nn \tl_replace_once:Nnn { Nxn } \tl_new:N \amc_ee_tl \seq_new:N \amc_ee_seq % \end{macrocode} % Note that with some versions of |l3fp-convert| (prior to % 2017-09-18), |\fp_to_scientific| leads to a `e' with catcode 12 % (\emph{other}). We convert it to catcode \emph{letter} before % splitting. % \begin{macrocode} \group_begin: \char_set_catcode_other:N E \tex_lowercase:D { \cs_new:Npn \amc_read_scientific:NNn #1 #2 #3 { \tl_set:Nn \amc_ee_tl { #3 } \tl_replace_once:Nxn \amc_ee_tl { E } { e } \seq_set_split:NnV \amc_ee_seq e \amc_ee_tl \fp_set:Nn #1 { \seq_item:Nn \amc_ee_seq 1 } \int_set:Nn #2 { \seq_item:Nn \amc_ee_seq 2 } } } \group_end: \cs_generate_variant:Nn \amc_read_scientific:NNn { NNf, NNx } \fp_new:N \amc_fulls_fp \cs_new:Npn \amc_fp_decompose:NNn #1 #2 #3 { \fp_set:Nn \amc_fulls_fp { #3 } % \end{macrocode} % Note that with some versions of |l3fp-convert|, the exponent part is % omited for some values, so that we add |e 0|. % \begin{macrocode} \amc_read_scientific:NNx #1 #2 { \fp_to_scientific:N \amc_fulls_fp e 0 } } \cs_generate_variant:Nn \amc_fp_decompose:NNn { NNx } \fp_new:N \amc_num_mantissa_fp \int_new:N \amc_num_exponent_int \cs_new:Npn \amc_fp_n_significant_digits:Nnn #1 #2 #3 { \amc_fp_decompose:NNn \amc_num_mantissa_fp \amc_num_exponent_int { #2 } \fp_set:Nn #1 { round(\amc_num_mantissa_fp * 10^((#3)-1)) } \fp_compare:nTF { abs(#1) >= 10^(#3) } { \fp_set:Nn #1 { #1 / 10 } } { } } \fp_new:N \amc_num_nsig_fp \cs_new:Npn \amc_fp_show_n_significant_digits:nn #1 #2 { \amc_fp_n_significant_digits:Nnn \amc_num_nsig_fp { #1 } { #2 } } \cs_new_eq:NN \AMCsignificantDigits \amc_fp_show_n_significant_digits:nn \cs_new:Npn \amc_fp_show_significant_digits: { \fp_use:N \amc_num_nsig_fp } \cs_new_eq:NN \AMCshowSignificantDigits \amc_fp_show_significant_digits: \cs_new:Npn \amc_fp_n_digits:Nnn #1 #2 #3 { \fp_set:Nn #1 { round((#2) * 10^(#3)) } } \int_new:N \amc_todigits_int \cs_new:Npn \amc_fp_to_digits:Nnnn #1 #2 #3 #4 { \clist_clear:N #1 \int_set:Nn \amc_todigits_int { \fp_eval:n { abs(round(#2)) } } \prg_replicate:nn { #3 } { \clist_put_left:Nx #1 { \int_mod:nn \amc_todigits_int { #4 } } \int_set:Nn \amc_todigits_int { \int_div_truncate:nn \amc_todigits_int { #4 } } } \int_compare:nNnTF \amc_todigits_int = 0 { } { \message{^^J!~Error:~number~too~large, ~some~digits~will~be~discarded^^J} } } \ExplSyntaxOff % \end{macrocode} % % The command % |\AMCnumericShow|\marg{value}\marg{opts} is % called to draw all necessary boxes to code a numerical value % \meta{value} with options given as a comma separated list % \meta{opts}. |\AMCnumericOpts|\marg{opts} can be used to set some % default values for these options. % % Begin with the available options: % \begin{macrocode} \def\AMCntextGoto{} \def\AMCntextVHead#1{\emph{b#1}} \newdimen\AMCnumeric@Hspace\AMCnumeric@Hspace=.5em \newdimen\AMCnumeric@Vspace\AMCnumeric@Vspace=1ex \ExplSyntaxOn \keys_define:nn { amcnumeric } { Tsign .code:n = {\def\AMCntextSign{#1}}, Tsign .initial:n = {}, Tpoint .code:n = {\def\AMCdecimalPoint{#1}}, Tpoint .initial:n = { \raisebox{1ex}{\bf .} }, Texponent .code:n = {\def\AMCexponent{#1}}, Texponent .initial:n = { $\times10$\textasciicircum }, vspace .code:n = {\AMCnumeric@Vspace=#1}, hspace .code:n = {\AMCnumeric@Hspace=#1}, bordercol .code:n = {\def\AMCncol@Border{#1}}, bordercol .initial:n = { lightgray }, borderwidth .code:n = {\def\AMCncol@BorderWidth{#1}}, borderwidth .initial:n = { 1mm }, backgroundcol .code:n = {\def\AMCncol@Background{#1}}, backgroundcol .initial:n = { white }, digits .int_set:N = \amc_num_ndigits_int, digits .initial:n = { 3 }, decimals .int_set:N = \amc_num_decd_int, decimals .initial:n = { 0 }, exponent .int_set:N = \amc_num_expo_int, exponent .initial:n = { 0 }, base .int_set:N = \amc_num_base_int, base .initial:n = { 10 }, sign .bool_set:N = \amc_num_sign_bool, sign .initial:n = { true }, sign .default:n = { true }, exposign .bool_set:N = \amc_num_exposign_bool, exposign .initial:n = { true }, exposign .default:n = { true }, strict .bool_set:N = \amc_num_strict_bool, strict .initial:n = { false }, strict .default:n = { true }, scoring .bool_set:N = \amc_num_scoring_bool, scoring .initial:n = { true }, scoring .default:n = { true }, vertical .bool_set:N = \amc_num_vertical_bool, vertical .initial:n = { false }, vertical .default:n = { true }, expovertical .bool_set:N = \amc_num_expovertical_bool, expovertical .initial:n = { false }, expovertical .default:n = { true }, reverse .bool_set:N = \amc_num_reverse_bool, reverse .initial:n = { false }, reverse .default:n = { true }, vhead .bool_set:N = \amc_num_vhead_bool, vhead .initial:n = { false }, vhead .default:n = { true }, nozero .bool_set:N = \amc_num_nozero_bool, nozero .initial:n = { false }, nozero .default:n = { true }, significant .bool_set:N = \amc_num_significant_bool, significant .initial:n = { false }, significant .default:n = { true }, scoreexact .code:n = {\def\AMC@numeric@scoreexact{#1}}, scoreexact .initial:n = { 2 }, scoreapprox .code:n = {\def\AMC@numeric@scoreapprox{#1}}, scoreapprox .initial:n = { 1 }, scorewrong .code:n = {\def\AMC@numeric@scorewrong{#1}}, scorewrong .initial:n = { 0 }, exact .int_set:N = \amc_num_exact_int, exact .initial:n = { 0 }, approx .int_set:N = \amc_num_approx_int, approx .initial:n = { 0 } } \cs_new:Npn \amc_num_setopts #1 { \keys_set:nn { amcnumeric } { #1 } } \cs_new_eq:NN \AMCnumericOpts \amc_num_setopts % \end{macrocode} % % The command |\amc_num_char:nn|\marg{inside}\marg{answer} draw a box % with content \meta{inside} (only if needed), where \meta{answer} is % |\AMC@checkedbox| if the corresponding choice is correct and empty % if not. % % \begin{macrocode} \cs_new:Npn \amc_num_char:nn #1 #2 { \global\advance\AMCrep@count\@ne\relax \AMC@amclog{AUTOQCM[REP= \the\AMCrep@count : \ifx#2\AMC@checkedbox B\else M\fi ]^^J} \ifAMC@correc \protect\AMC@keyBox@{#1}{#2}{1}{case : \AMCid@name : \the\AMCid@quest , \the\AMCrep@count} \else \protect\AMC@keyBox@{#1}{}{1}{case : \AMCid@name : \the\AMCid@quest , \the\AMCrep@count} \fi } % \end{macrocode} % The command |\amc_num_digit_box:nn|\marg{i}\marg{j} draws a box for % current digit value \meta{i}, where \meta{j} is the correct value % for the current digit. % \begin{macrocode} \cs_new:Npn \amc_num_digit_box:nn #1 #2 { \int_compare:nNnTF { #1 } = { #2 } { \amc_num_char:nn{ #1 }{\AMC@checkedbox} } { \amc_num_char:nn{ #1 }{} } } % \end{macrocode} % The command |\amc_num_sign_boxes:Nn|\marg{negative}\marg{prefix} % draws two boxes for the students to code the sign (with a right % value given by the boolean \meta{negative}). % \begin{macrocode} \cs_new:Npn \amc_num_sign_boxes:N #1 #2 { \bool_if:nTF { #1 } { \hbox{\amc_num_char:nn{$+$}{}} \vspace{\AMCnumeric@Vspace} \AMC@amclog{AUTOQCM[B=set. sign #2 =1]^^J} \hbox{\amc_num_char:nn{$-$}{\AMC@checkedbox}} \AMC@amclog{AUTOQCM[B=set. sign #2 =-1]^^J} } { \hbox{\amc_num_char:nn{$+$}{\AMC@checkedbox}} \vspace{\AMCnumeric@Vspace} \AMC@amclog{AUTOQCM[B=set. sign #2 =1]^^J} \hbox{\amc_num_char:nn{$-$}{}} \AMC@amclog{AUTOQCM[B=set. sign #2 =-1]^^J} } } % \end{macrocode} % The command % |\amc_num_digit_boxes_h:nnn|\marg{varname}\marg{correct}\marg{maxdigit} % draws a serie of boxes for all possible values of a digit (from 0 to % \meta{maxdigit}), where the correct value is \meta{correct}, % transmitting scoring data to AMC so that the vaiable \meta{varname} % will be set to the value chosen by the student. % \begin{macrocode} \cs_new:Npn \amc_num_digit_boxes_h:nnn #1 #2 #3 { \int_step_inline:nnnn { \bool_if:NTF \amc_num_nozero_bool { 1 } { 0 } } { 1 } { #3 - 1 } { \amc_num_digit_box:nn { ##1 }{ #2 } \AMC@amclog{AUTOQCM[B= set. #1 = ##1 ]^^J} \hspace{\AMCnumeric@Hspace} } \hspace{-\AMCnumeric@Hspace} } \cs_new:Npn \amc_num_digit_boxes_v:nnn #1 #2 #3 { \int_step_inline:nnnn { \bool_if:NTF \amc_num_nozero_bool { 1 } { 0 } } { 1 } { #3 - 1 } { \vbox{\hbox{ \amc_num_digit_box:nn { ##1 }{ #2 } }} \AMC@amclog{AUTOQCM[B= set. #1 = ##1 ]^^J} \int_compare:nNnTF { ##1 } < { #3 - 1 } { \vspace{\AMCnumeric@Vspace} } {} } } \int_new:N \amc_num_first_digit_int \cs_new:Npn \amc_num_digit_boxes_vr:nnn #1 #2 #3 { \int_set:Nn \amc_num_first_digit_int { \bool_if:NTF \amc_num_nozero_bool { 1 } { 0 } } \int_step_inline:nnnn { #3 - 1 } { -1 } \amc_num_first_digit_int { \vbox{\hbox{ \amc_num_digit_box:nn { ##1 }{ #2 } }} \AMC@amclog{AUTOQCM[B= set. #1 = ##1 ]^^J} \int_compare:nNnTF { ##1 } > \amc_num_first_digit_int { \vspace{\AMCnumeric@Vspace} } {} } } % \end{macrocode} % The command |\amc_num_integer_boxes_v:Nnn|\marg{correct % digits}\marg{prefix}\meta{decimals} draws boxes for integer entry, % without the sign. % \begin{macrocode} \cs_new:Npn \amc_num_integer_boxes_v:Nnn #1 #2 #3 { % \end{macrocode} % begin a loop over all digits, % \begin{macrocode} \int_set_eq:NN \amc_num_digit_int { \clist_count:N #1 } \clist_map_inline:Nn #1 { % \end{macrocode} % place the decimal point if necessary, % \begin{macrocode} \int_compare:nNnTF \amc_num_digit_int = { #3 } { \hbox{ \AMCdecimalPoint }\hspace{\AMCnumeric@Hspace} } { } % \end{macrocode} % draw the box for this digit, % \begin{macrocode} \hbox{\vbox{ \bool_if:NTF \amc_num_vhead_bool { \vbox{\hbox{\AMCntextVHead{ \int_eval:n { \amc_num_digit_int - 1 } }}} \vspace{\AMCnumeric@Vspace} } { } \bool_if:NTF \amc_num_reverse_bool { \amc_num_digit_boxes_vr:nnn { #2 \int_to_Alph:n \amc_num_digit_int } { ##1 } { \amc_num_base_int } } { \amc_num_digit_boxes_v:nnn { #2 \int_to_Alph:n \amc_num_digit_int } { ##1 } { \amc_num_base_int } } }} % \end{macrocode} % and end the loop over digits, adding space if this is not the last % one. % \begin{macrocode} \int_compare:nNnTF \amc_num_digit_int > 1 { \hspace{\AMCnumeric@Hspace} } { } \int_decr:N \amc_num_digit_int } } % \end{macrocode} % The command |\amc_num_integer_boxes_h:Nnn|\marg{correct % digits}\marg{prefix}\meta{decimals} does the same, in horizontal mode. % \begin{macrocode} \cs_new:Npn \amc_num_integer_boxes_h:Nnn #1 #2 #3 { \vbox{ \int_set_eq:NN \amc_num_digit_int { \clist_count:N #1 } \clist_map_inline:Nn #1 { \int_compare:nNnTF \amc_num_digit_int = { #3 } { \hbox{ \AMCdecimalPoint } } { } \hbox{ \amc_num_digit_boxes_h:nnn { #2 \int_to_Alph:n \amc_num_digit_int } { ##1 } \amc_num_base_int } \int_compare:nNnTF \amc_num_digit_int > 1 { \vspace{\AMCnumeric@Vspace} } { } \int_decr:N \amc_num_digit_int }} } % \end{macrocode} % Finally, |\amc_num_integer_boxes:NnnNn|\marg{correct % digits}\marg{prefix}\marg{decimals}\marg{sign bool}\marg{positive} draws % boxes for integer entry, including the sign if \meta{sign bool} is % true. % \begin{macrocode} \cs_new:Npn \amc_num_integer_boxes:NnnNn #1 #2 #3 #4 #5 { \hbox{ \bool_if:NTF { #4 } { \vbox{ \ifx\AMCntextSign\@empty\@empty\else \hbox{\AMCntextSign}\vspace{\AMCnumeric@Vspace}\fi \amc_num_sign_boxes:N { #5 } { #2 } } \hspace{.5em} \vrule \hspace{.5em} } { } \hbox{ \bool_if:NTF \amc_num_vertical_bool \amc_num_integer_boxes_v:Nnn \amc_num_integer_boxes_h:Nnn #1 { #2 } { #3 } } } } % \end{macrocode} % The command |\amc_num_build_integer_scoring:Nnnn|\marg{tl % var}\marg{sign bool}\marg{prefix}\marg{n} builds a scoring to % compute an integer from a serie of \meta{n}-digits boxes, with name % prefix \meta{prefix}, using a sign variable if \meta{sign bool} is % true. % \begin{macrocode} \cs_new:Npn \amc_num_build_integer_scoring:Nnnn #1 #2 #3 #4 { \tl_clear:N #1 \int_set_eq:NN \amc_num_digit_int { #4 } \int_while_do:nNnn \amc_num_digit_int > 0 { \bool_if:NTF \amc_num_strict_bool { \AMC@amclog{AUTOQCM[B=requires. #3 \int_to_Alph:n \amc_num_digit_int = 1]^^J} } { \AMC@amclog{AUTOQCM[B=default. #3 \int_to_Alph:n \amc_num_digit_int = 0]^^J} } \int_compare:nNnTF \amc_num_digit_int = #4 { } { \tl_put_left:Nn #1 { ( } \tl_put_right:Nx #1 { ) * \int_use:N \amc_num_base_int + } } \tl_put_right:Nx #1 { #3 \int_to_Alph:n \amc_num_digit_int } \int_decr:N \amc_num_digit_int } \tl_put_left:Nn #1 { ( } \tl_put_right:Nn #1 { ) } \bool_if:NTF { #2 } { \bool_if:NTF \amc_num_strict_bool { \AMC@amclog{AUTOQCM[B=requires. sign #3 =1]^^J} } { \AMC@amclog{AUTOQCM[B=default. sign #3 =1]^^J} } \tl_put_right:Nx #1 { * ( sign #3 ) } } { } } % \end{macrocode} % Then the command |\AMCnumericShow|\marg{x}\marg{options} itself: % \begin{macrocode} \fp_new:N \amc_num_correct_fp \clist_new:N \amc_num_digits_clist \clist_new:N \amc_num_expo_digits_clist \int_new:N \amc_num_digit_int \tl_new:N \amc_num_compute_tl \tl_new:N \amc_num_expo_tl \int_new:N \amc_num_correct_expo_int \cs_new:Npn \amc_numeric_show:nn #1 #2 { % \end{macrocode} % We have to tell AMC that the scoring we will give concerns this % question: % \begin{macrocode} \ifAMC@ensemble\ifAMCformulaire@dedans \AMC@amclog{AUTOQCM[Q=\the\AMCid@quest]^^J} \fi\fi % \end{macrocode} % Then we parse the options from \meta{opts}: % \begin{macrocode} {\keys_set:nn { amcnumeric } { #2 } \bool_if:nTF { \bool_if_p:N\amc_num_significant_bool && \int_compare_p:n { \amc_num_base_int != 10 } } { \message{^^J!~AMCnumeric~Error:~significant=true~can't~be~used~with~base!=10.^^J} } {} \bool_if:nTF { \int_compare_p:n { \amc_num_expo_int != 0 } && \int_compare_p:n { \amc_num_base_int != 10 } } { \message{^^J!~AMCnumeric~Error:~scientific~notation~can't~be~used~with~base!=10.^^J} } {} % \end{macrocode} % Convert the floating point correct value to integer, taking into % account the parameters |significant|, |exponent| and |decimals|: % \begin{macrocode} \bool_if:NTF \amc_num_significant_bool { \amc_fp_n_significant_digits:Nnn \amc_num_correct_fp { #1 } \amc_num_ndigits_int } { \int_compare:nNnTF \amc_num_expo_int > 0 { \amc_fp_decompose:NNn \amc_num_mantissa_fp \amc_num_correct_expo_int { #1 } \int_compare:nNnTF { \amc_num_ndigits_int - \amc_num_decd_int } > 1 { \fp_set:Nn \amc_num_mantissa_fp { \amc_num_mantissa_fp * 10^( \amc_num_ndigits_int - \amc_num_decd_int - 1 ) } \int_set:Nn \amc_num_correct_expo_int { \amc_num_correct_expo_int - ( \amc_num_ndigits_int - \amc_num_decd_int - 1 ) } } {} \amc_fp_n_digits:Nnn \amc_num_correct_fp \amc_num_mantissa_fp \amc_num_decd_int } { \amc_fp_n_digits:Nnn \amc_num_correct_fp { #1 } \amc_num_decd_int } } % \end{macrocode} % Now extracts the required digits: % \begin{macrocode} \amc_fp_to_digits:Nnnn \amc_num_digits_clist \amc_num_correct_fp \amc_num_ndigits_int \amc_num_base_int \int_compare:nNnTF \amc_num_expo_int > 0 { \amc_fp_to_digits:Nnnn \amc_num_expo_digits_clist \amc_num_correct_expo_int \amc_num_expo_int \amc_num_base_int } {} % \end{macrocode} % The question scoring is given to AMC (if requested by the % |scoring=true| option). Note that the variable |intV| refers to the % correct value, and |intX| to the value entered by the student. % \begin{macrocode} \bool_if:NTF \amc_num_scoring_bool { \AMC@amclog{AUTOQCM[B=haut=,mz=, formula=(Vdifference <= \int_use:N \amc_num_exact_int ? \AMC@numeric@scoreexact : \int_compare:nNnTF \amc_num_approx_int = 0 { \AMC@numeric@scorewrong } { (Vdifference <= \int_use:N\amc_num_approx_int ? \AMC@numeric@scoreapprox : \AMC@numeric@scorewrong) } )]^^J} } {} \amc_num_build_integer_scoring:Nnnn \amc_num_compute_tl \amc_num_sign_bool { digit } \amc_num_ndigits_int \int_compare:nNnTF \amc_num_expo_int > 0 { \amc_num_build_integer_scoring:Nnnn \amc_num_expo_tl \amc_num_exposign_bool { expo } \amc_num_expo_int \AMC@amclog{AUTOQCM[B= set. intE = \amc_num_expo_tl ]^^J} \tl_put_right:Nx \amc_num_compute_tl { * \int_use:N\amc_num_base_int **( intE - (\int_use:N\amc_num_correct_expo_int) ) } } {} \AMC@amclog{AUTOQCM[B= set.intV = \fp_to_int:N\amc_num_correct_fp , set.intX = \amc_num_compute_tl ]^^J} \bool_if:NTF \amc_num_significant_bool { \AMC@amclog{AUTOQCM[B=set.Vdifference="min( abs((intV)-(intX)) , abs(\int_use:N\amc_num_base_int * (intV) - (intX)) , abs((intV) - \int_use:N\amc_num_base_int * (intX)) )"]^^J} } { \AMC@amclog{AUTOQCM[B=set.Vdifference=abs((intV)-(intX))]^^J} } % \end{macrocode} % Begin now with the frame around all the boxes: % \begin{macrocode} \vspace{1.5ex}\par{ \fboxrule=\AMCncol@BorderWidth \fcolorbox{\AMCncol@Border}{\AMCncol@Background}{ \bool_if:NTF \amc_num_expovertical_bool { \hbox{\vbox{ \vbox{\amc_num_integer_boxes:NnnNn \amc_num_digits_clist { digit } \amc_num_decd_int \amc_num_sign_bool { \fp_compare_p:nNn \amc_num_correct_fp < 0}} \int_compare:nNnTF \amc_num_expo_int > 0 { \vspace{\AMCnumeric@Vspace} \vbox{\hbox{\AMCexponent}} \vspace{\AMCnumeric@Vspace} \vbox{\amc_num_integer_boxes:NnnNn \amc_num_expo_digits_clist { expo } { 0 } \amc_num_exposign_bool { \int_compare_p:nNn \amc_num_correct_expo_int < 0 }} } {} }} } { \amc_num_integer_boxes:NnnNn \amc_num_digits_clist { digit } \amc_num_decd_int \amc_num_sign_bool { \fp_compare_p:nNn \amc_num_correct_fp < 0} \int_compare:nNnTF \amc_num_expo_int > 0 { \hspace{\AMCnumeric@Hspace}\AMCexponent\hspace{\AMCnumeric@Hspace} \amc_num_integer_boxes:NnnNn \amc_num_expo_digits_clist { expo } { 0 } \amc_num_exposign_bool { \int_compare_p:nNn \amc_num_correct_expo_int < 0 } } {} } } } % \end{macrocode} % And tell AMC that we finished with this question: % \begin{macrocode} \ifAMC@ensemble\else\vspace{1.5ex}\par\fi \ifAMC@ensemble\ifAMCformulaire@dedans \AMC@amclog{AUTOQCM[FQ]^^J} \fi\fi } } \cs_new_eq:NN \AMCnumericShow \amc_numeric_show:nn % \end{macrocode} % % |\AMCnumericHide| is called when the boxes are not to be drawn (in % the question sheets for separate answer sheet layout), and % |\AMCnumericChoices|\marg{value}\marg{options} is the function to be % used in the LaTeX source code of the exam. % % \begin{macrocode} \cs_new:Npn \amc_numeric_hide:nn #1 #2 { \keys_set:nn { amcnumeric } { #2 } \AMCntextGoto \ifAMC@qbloc\else\vspace{1.5ex}\par\fi } \cs_new_eq:NN \AMCnumericHide \amc_numeric_hide:nn \ExplSyntaxOff \def\AMCnumericChoicesPlain{% \AMC@if@separate@question{\AMC@mem@category{numeric}}% \AMCformatChoices{\AMCnumericShow}{\AMCnumericHide}% } % \end{macrocode} % The \marg{value} argument is often given as a macro, that is to be % expanded before calling |\AMCnumericChoicesPlain|, so that its value % will be the same in the separate answer sheet... % \begin{macrocode} \ExplSyntaxOn \cs_new:Npn \amc_numeric_choices:nn #1#2 { \AMCnumericChoicesPlain{#1}{#2} } \cs_generate_variant:Nn \amc_numeric_choices:nn { xn } \cs_new_eq:NN \AMCnumericChoices \amc_numeric_choices:xn \ExplSyntaxOff % \end{macrocode} % \end{macro} % % \subsubsection{Intervals} % % \begin{macro}{\AMCIntervals} % The command |\AMCIntervals|\marg{x}\marg{x0}\marg{x1}\marg{delta} % can be used to present answers as intervals $[x_i,x_i+\delta[$ % covering $[\meta{x0},\meta{x1}[$, such that the only interval % containing \meta{x} is declared as |\correctchoice|, and the other % as |\wrongchoice|. % % For this command to work, one has to load package \textsf{fp}. % % As an example, %\iffalse %<*doc> %\fi \begin{verbatim} \begin{question}{quarter} In which interval falls $1/4$? \begin{multicols}{5} \begin{choices}[o] \AMCIntervals{0.25}{0}{1}{0.1} \end{choices} \end{multicols} \end{question} \end{verbatim} %\iffalse % %\fi % produces (in correction mode): % \begin{question}{quarter} % \makeatletter\AMC@correctrue\makeatother % In which interval falls $1/4$? % \begin{multicols}{5} % \begin{choices}[o] % \AMCIntervals{0.25}{0}{1}{0.1} % \end{choices} % \end{multicols} % \end{question} % % Note that the interval formatting can be changed redefining the % |\AMCintervalFormat| command, which is originally defined as % \begin{macrocode} \def\AMCIntervalFormat#1#2{[#1,\,#2[} % \end{macrocode} % to follow local conventions (writting $[a,b)$ instead of $[a,b[$ is % for example a common usage). % \begin{macrocode} \ExplSyntaxOn \fp_new:N \amc_interv_a \fp_new:N \amc_interv_b \cs_new:Npn \amc_intervals:nnnn #1 #2 #3 #4 { \fp_set:Nn \amc_interv_a { #2 } \fp_do_while:nn { \amc_interv_a < #3 } { \fp_set:Nn \amc_interv_b { \amc_interv_a + #4 } \fp_compare:nTF { \amc_interv_a <= #1 < \amc_interv_b } \correctchoice \wrongchoice {\AMCIntervalFormat{\fp_use:N \amc_interv_a}{\fp_use:N \amc_interv_b}} \fp_set:Nn \amc_interv_a \amc_interv_b } } \cs_new_eq:NN \AMCIntervals \amc_intervals:nnnn \ExplSyntaxOff % \end{macrocode}\end{macro} % % \subsection{Open questions} % % \begin{macro}{\AMCOpen} % The command |\AMCOpen|\marg{options}\marg{choices} can be used as % a replacement for the |choices| environment when asking the % student to write some answer by hand. The teacher will correct and % mark this answer either on the paper before scanning, or with % manual data capture, thanks to the scoring boxes. % % As an example, %\iffalse %<*doc> %\fi \begin{verbatim} \begin{question}{Linux} What is the first name of the person who started working on the Linux kernel? \AMCOpen{}{\wrongchoice[w]{w}\scoring{0}\correctchoice[c]{c}\scoring{2}} \end{question} \end{verbatim} % \iffalse % %\fi % shows: % % \begin{center} % {\makeatletter\AMC@inside@boxfalse\AMC@ensemblefalse\makeatother % \fbox{ % \begin{minipage}{.7\linewidth} % \begin{question}{Linux} % What is the first name of the person who started working on the Linux kernel? % \AMCOpen{}{\wrongchoice[w]{w}\scoring{0}\correctchoice[c]{c}\scoring{2}}% % \end{question}% % \end{minipage}}} % \end{center} % The teacher will have to tick the `w' box for wrong answers, and the % `c' box for correct answers. % % Begin with the options definitions: % \begin{macrocode} \def\AMCotextGoto{} \def\AMCotextReserved{} \def\AMCocol@Background{lightgray} \def\AMCocol@BoxFrameRule{white} \def\AMCocol@FrameRule{black} \def\AMCocol@Foreground{} \def\AMCopen@answer{} \def\AMCopen@question{} \def\AMCopen@lineuptext{} \define@key{AMCOpen}{backgroundcol}{\def\AMCocol@Background{#1}} \define@key{AMCOpen}{foregroundcol}{\def\AMCocol@Foreground{#1}} \define@key{AMCOpen}{Treserved}{\def\AMCotextReserved{#1}} \define@key{AMCOpen}{question}[\AMCid@name]{\def\AMCopen@question{#1}} \define@key{AMCOpen}{answer}{\def\AMCopen@answer{#1}} \define@key{AMCOpen}{contentcommand}[AMCopen@lines]{\def\AMCopen@contentcommand{#1}} \newdimen\AMCopen@Hspace\AMCopen@Hspace=.5em \define@key{AMCOpen}{hspace}{\AMCopen@Hspace=#1} \def\AMCopen@Width{.95\linewidth} \define@key{AMCOpen}{width}{\def\AMCopen@Width{#1}} \newdimen\AMCopen@LineHeight\AMCopen@LineHeight=1cm \define@key{AMCOpen}{lineheight}{\AMCopen@LineHeight=#1} \newcount\AMCopen@Lines\AMCopen@Lines=1 \define@key{AMCOpen}{lines}{\AMCopen@Lines=#1} \newdimen\AMCopen@boxmargin\AMCopen@boxmargin=3pt \define@key{AMCOpen}{boxmargin}{\AMCopen@boxmargin=#1} \newdimen\AMCopen@boxframerule\AMCopen@boxframerule=1pt \define@key{AMCOpen}{boxframerule}{\AMCopen@boxframerule=#1} \define@key{AMCOpen}{boxframerulecol}{\def\AMCocol@BoxFrameRule{#1}} \define@key{AMCOpen}{framerulecol}{\def\AMCocol@FrameRule{#1}} \newdimen\AMCopen@framerule\AMCopen@framerule=1pt \define@key{AMCOpen}{framerule}{\AMCopen@framerule=#1} \define@key{AMCOpen}{lineuptext}{\def\AMCopen@lineuptext{#1}} \define@boolkey{AMCOpen}{dots}[true]{} \define@boolkey{AMCOpen}{scan}[true]{} \define@boolkey{AMCOpen}{annotate}[false]{} \define@boolkey{AMCOpen}{lineup}[false]{} \setkeys{AMCOpen}{dots,scan,annotate,lineup,contentcommand} \newcommand\AMCopenOpts[1]{\setkeys{AMCOpen}{#1}} % \end{macrocode} % % The command |\AMCOpen| is similar to |\AMCnumericChoices|, calling % either |\AMCopenShow| or |\AMCopenHide|. % \begin{macrocode} \newcommand\AMCopen@lines{% \begin{minipage}{\AMCopen@Width}% \loop\vspace{\AMCopen@LineHeight} \hspace*{.5em}\ifAMC@correc\smash{\AMCopen@answer}\def\AMCopen@answer{}\fi% \ifKV@AMCOpen@dots% \dotfill\hspace*{.5em} \fi \ifnum\AMCopen@Lines>\@ne\par\advance\AMCopen@Lines\m@ne\repeat% \end{minipage} } \newcommand\AMCopenShow[2]{ \ifAMC@ensemble\ifAMCformulaire@dedans% \AMC@amclog{AUTOQCM[Q=\the\AMCid@quest]^^J}% \fi\fi% {\setkeys{AMCOpen}{#1}% \ifKV@AMCOpen@lineup% \ifAMC@ensemble\else% \ifx\@empty\AMCopen@lineuptext\@empty\fi% \fi% \ifAMC@correc\smash{\AMCopen@answer}\fi% \ifx\@empty\AMCopen@lineuptext\@empty% \dotfill% \else% \AMCopen@lineuptext\hfill% \fi% \else% \hspace*{.5em}\linebreak[1]\hspace*{\fill}% \fi% {\AMCnoCompleteMulti% \def\AMCbeginAnswer{}\def\AMCendAnswer{}% \def\AMCanswer##1##2{\ifAMC@ensemble ##1\else% \ifAMC@inside@box ##1\else{\AMCboxOutsideLetter{##1}{##2}}\fi\fi% \hspace{\AMCopen@Hspace}}% \fboxsep=\AMCopen@boxmargin% \fboxrule=\AMCopen@boxframerule% \fcolorbox{\AMCocol@BoxFrameRule}{\AMCocol@Background}{% \ifAMC@ensemble\AMCopen@question% \ifx\@empty\AMCopen@question\@empty\else\hspace{\AMCopen@Hspace}\fi% \fi% \begin{choicescustom}[o]% \ifx\AMCocol@Foreground\@empty\@empty\else% \def\AMC@boxcolor{\AMCocol@Foreground}% \fi% #2% \ifKV@AMCOpen@scan\else\AMCdontScan\fi% \ifKV@AMCOpen@annotate\else\AMCdontAnnotate\fi% \end{choicescustom}% \ifx\@empty\AMCotextReserved\@empty% \hspace{-\AMCopen@Hspace}% \else% \ifx\AMCocol@Foreground\@empty\@empty% \AMCotextReserved% \else% \textcolor{\AMCocol@Foreground}{\AMCotextReserved}% \fi% \fi% }}% \ifKV@AMCOpen@lineup\else% \par\nobreak\noindent% \hspace*{\fill}{% \fboxrule=\AMCopen@framerule% \fcolorbox{\AMCocol@FrameRule}{white}{% \csname\AMCopen@contentcommand\endcsname }}% \vspace{\AMCpostOquest}\par% \fi% }% \ifAMC@ensemble\ifAMCformulaire@dedans% \AMC@amclog{AUTOQCM[FQ]^^J}% \fi\fi% } \newcommand\AMCopenHide[2]{% \AMCotextGoto% \ifAMC@qbloc\else\vspace{1.5ex}\par\fi% } \def\AMCOpen{% \AMC@if@separate@question{\AMC@mem@category{open}}% \AMCformatChoices{\AMCopenShow}{\AMCopenHide}% } % \end{macrocode} % \end{macro} % % \subsection{Boxes with letters only} % % \begin{macro}{\AMCBoxOnly} % Sometimes the letters printed in the boxes (or just after them) % are enough to describe the answers. In such cases, printing the % boxes both on the question and on the answer sheet is not % necessary. The |\AMCBoxOnly|\marg{options}\marg{choices} can be % used as a replacement for the |choices| environment: \iffalse %<*doc> %\fi \begin{verbatim} \begin{question}{arm} Which letter shows the \textit{arm} on the diagram? \AMCBoxOnly{ordered=true}{\wrongchoice[A]{}\correctchoice[B]{}% \wrongchoice[C]{}\wrongchoice[D]{}} \end{question} \end{verbatim} %\iffalse % %\fi % \begin{macrocode} \def\AMCbotextGoto{} \def\AMCbo@help{} \define@key{AMCBoxOnly}{help}{\def\AMCbo@help{#1}} \define@boolkey{AMCBoxOnly}{ordered}[false]{} \setkeys{AMCBoxOnly}{ordered} \newcommand\AMCboOpts[1]{\setkeys{AMCBoxOnly}{#1}} \newcommand\AMCboShow[2]{% \ifAMC@ensemble\ifAMCformulaire@dedans% \AMC@amclog{AUTOQCM[Q=\the\AMCid@quest]^^J}% \fi\fi% {\setkeys{AMCBoxOnly}{#1}% \def\AMCbeginAnswer{}\def\AMCendAnswer{}% \def\AMCanswer##1##2{\hspace{\AMCformHSpace} \ifAMC@ensemble ##1\else% \ifAMC@inside@box ##1\else{\AMCboxOutsideLetter{##1}{##2}}\fi\fi% }% \ifAMC@ensemble\AMCbo@help\fi% \ifKV@AMCBoxOnly@ordered% \begin{choicescustom}[o]% \else% \begin{choicescustom}% \fi% #2 \end{choicescustom}% }% \ifAMC@ensemble\ifAMCformulaire@dedans% \AMC@amclog{AUTOQCM[FQ]^^J}% \fi\fi% } \newcommand\AMCboHide[2]{ \AMCbotextGoto% \ifAMC@qbloc\else\vspace{1.5ex}\par\fi% } \def\AMCBoxOnly{% \AMC@if@separate@question{\AMC@mem@category{box}}% \AMCformatChoices{\AMCboShow}{\AMCboHide}% } % \end{macrocode} % \end{macro} % % \subsection{Page formatting} % % \subsubsection{Watermark} % % \begin{macro}{\AMCw@termark}\begin{macro}{\AMCw@terprint} % These commands are used to print a grey ``DRAFT'' under each % page, so as to prevent from printing old versions of the % subject. % \begin{macrocode} \DeclareFontShape{OT1}{cmr}{b}{n}{<35->cmr17}{} \def\AMC@watertext{\AMC@loc@draft} \newcommand\AMCw@termark{% \setlength{\@tempdimb}{.5\paperwidth}% \setlength{\@tempdimc}{-.5\paperheight}% \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){% \makebox(0,0){\rotatebox{45}{\AMC@LR{% \textcolor[gray]{0.8}{ \fontencoding{OT1}\fontfamily{cmr} \fontseries{b}\fontshape{n} \fontsize{90pt}{120pt} \selectfont \AMC@watertext}}}}}} \newcommand\AMCw@terprint[1]{% \setbox\@tempboxa\vbox to \z@{% \vbox{% \hbox to \z@{% #1\hss}}\vss} \dp\@tempboxa\z@ \box\@tempboxa} % \end{macrocode}\end{macro}\end{macro} % % \subsubsection{Signs for scan analysis} % % The following code sets up all the signs to be printed on the pages % so as to be able to recognize the position of the boxes on the % scans. Four circles \makeatletter\m@rqueCalage\makeatother{} are % printed on the corners (see |\m@rqueCalage|), and binary boxes show % the student sheet number (see |\AMCIDBoxesA|), the page (see % |\AMCIDBoxesB|) and a checking number (see |\AMCIDBoxesC|). % % |\AMC@intituleHead| is the title to be printed at the beginning % (used for corrected sheet, and empty on subject). |\AMC@note| is % printed at the bottom of each page. You can change its value using % |\AMCsetFoot|\marg{foot}. % % \begin{macrocode} \def\AMCcercle#1#2{% {\setlength{\unitlength}{1mm}% \begin{picture}(#1,#1)(-#2,-#2)\thinlines\circle*{#1}\end{picture}}} \def\m@rqueCalage{\AMCcercle{3.6}{1.8}} \def\m@rque#1{\AMC@tracebox{1}{#1}{\m@rqueCalage}} \def\he@dtaille#1{\vbox to 1cm{#1}} \def\he@dbas#1{\he@dtaille{\vspace*{\fill}#1}} \def\he@dhaut#1{\he@dtaille{#1\vspace*{\fill}}} \def\AMC@intituleHead{\AMC@loc@corrected} \def\AMC@note{} \def\AMCsetFoot#1{\def\AMC@note{#1}} \newcommand\AMCStudentNumber{\the\AMCid@etud} \newcommand\AMCIDBoxesA{\AMCbin@begin{1}\AMC@binaryBoxes[\AMC@NCBetud]{\the\AMCid@etud}} \newcommand\AMCIDBoxesB{\AMCbin@begin{2}\AMC@binaryBoxes[\AMC@NCBpage]{\thepage}} \newcommand\AMCIDBoxesC{\AMCbin@begin{3}\AMC@binaryBoxes[\AMC@NCBcheck]{\the\AMCid@check}} \newcommand\AMCIDBoxesABC{% \hbox{\vbox{\noindent\AMCIDBoxesA\\ \noindent\AMCIDBoxesB\AMCIDBoxesC}}% } \AtBeginPage{\ifAMC@pagelayout\global\advance\AMCid@check\m@ne% \ifnum\AMCid@check<1\global\AMCid@check=\AMCid@checkmax\fi% \AMC@pagepos% \ifAMC@watermark\ifAMC@correchead\else\AMCw@terprint{\AMCw@termark}% \fi\fi\fi} \fancypagestyle{AMCpageHeadOnly}{% \fancyhf{}\fancyhead[C]{\textsc{\AMC@intituleHead}}% \renewcommand{\headrulewidth}{0pt}% \renewcommand{\footrulewidth}{0pt}% } \fancypagestyle{AMCpageFull}{% \fancyhf{}% \fancyhead[L]{\AMC@LR{\he@dbas{\leavevmode\m@rque{positionHG}}}}% \fancyhead[R]{\AMC@LR{\he@dbas{\leavevmode\m@rque{positionHD}}}}% \fancyfoot[L]{\AMC@LR{\leavevmode\m@rque{positionBG}}}% \fancyfoot[R]{\AMC@LR{\leavevmode\m@rque{positionBD}}}% \fancyhead[C]{\AMC@LR{\he@dhaut{% \begin{minipage}[b]{\AMC@CBtaille}\AMCboxColor{black}% \ifAMCids@top\vbox to \AMCids@height{\texttt{+\the\AMCid@etud/\thepage/\the\AMCid@check+}}\fi% \AMCIDBoxesABC \end{minipage}% \ifAMCids@side\hbox to \AMCids@width{\hspace*{\fill}% \texttt{+\the\AMCid@etud/\thepage/\the\AMCid@check+}}\fi% }}}% \fancyhfoffset[EOLR]{5mm}% \fancyfoot[C]{\AMC@note}% \renewcommand{\headrulewidth}{0pt}% \renewcommand{\footrulewidth}{0pt}% } \newcommand\AMCsubjectPageTag{% \fbox{\texttt{\the\AMCid@etud:\thepage}}% } \fancypagestyle{AMCpageNoMarks}{% \fancyhf{}% \fancyhead[R]{\AMCsubjectPageTag}% \fancyfoot[C]{\AMC@note}% \renewcommand{\headrulewidth}{0pt}% \renewcommand{\footrulewidth}{0pt}% } \fancypagestyle{AMCpageEmpty}{% \fancyhf{}% \renewcommand{\headrulewidth}{0pt}% \renewcommand{\footrulewidth}{0pt}% } \AtBeginDocument{% \ifAMC@pagelayout% \ifAMC@correchead \pagestyle{AMCpageHeadOnly} \else \pagestyle{AMCpageFull} \fi \fi } % \end{macrocode} % % \subsection{Defining a single exam copy content} % % \begin{macro}{\onecopy} % The command |\onecopy|\oarg{n}\marg{code} generates \meta{n} % copies of the subject that is described in \meta{code}. The \LaTeX % code \meta{code} that generates a single copy can be a little % long, so that the environment |examcopy| is often prefered. % % \begin{macrocode} \newcommand{\onecopy}[2]{% \ifx\AMCNombreCopies\undefined\AMCnum@copies=#1% \else\AMCnum@copies=\AMCNombreCopies\fi% \AMC@amclog{AUTOQCM[TOTAL=\the\AMCnum@copies]^^J}% \AMCid@etud=\AMCid@etudstart% \ifnum\AMCid@etud=0\AMCid@etud=\AMC@premierecopie\fi% \AMCid@etudfin=\AMCnum@copies% \advance\AMCid@etudfin\AMCid@etud\relax% \ifAMC@correchead\AMCid@etudfin=\AMC@premierecopie\fi \ifAMC@pdfform\begin{Form}\fi% \loop{% \ifAMC@calibration\protected@write\AMC@XYFILE{}{% \string\rngstate{\the\AMCid@etud}{\the\AMC@SR}% }\fi% \AMC@zoneformulairefalse\setcounter{page}{1}\setcounter{section}{0}% \ifAMC@ensemble\ifAMC@automarks\pagestyle{AMCpageNoMarks}\fi\fi% \AMCnumero{1}% \ifAMC@calibration\AMC@amclog{AUTOQCM[ETU=\the\AMCid@etud]^^J}\fi% \AMC@keepmemoryfalse% #2% \ifAMC@keepmemory\else\AMC@mem@clear\fi% \clearpage}% \advance\AMCid@etud\@ne\ifnum\AMCid@etud<\AMCid@etudfin\repeat% \global\AMCid@etudstart=\AMCid@etud% \ifAMC@pdfform\end{Form}\fi% } % \end{macrocode}\end{macro} % % \begin{macro}{\AMCaddpagesto} % In some situations, one needs all question sheets to have the same % number of pages. The command |\AMCaddpagesto|\marg{n} adds enough % (white) pages to get at least \meta{n} pages in the current % question sheet. % \begin{macrocode} \newcount\AMC@addpages \newcommand{\AMCaddpagesto}[1]{% \AMC@addpages=#1\advance\AMC@addpages\@ne% \clearpage% \@whilenum\thepage<\AMC@addpages\do{% \ifAMC@automarks\pagestyle{AMCpageEmpty}\fi% \hbox{}\clearpage% }% } % \end{macrocode}\end{macro} % % \begin{macro}{\AMCcleardoublepage} % If you want to print the subject all at one time in duplex mode, % it is necessary to end each subject with an even number of % pages. This can be achieved using |\AMCcleardoublepage| at the end % of the copy definition. This command is also useful inserted % before the separate answer sheet (if any). % % \begin{macrocode} \def\AMCcleardoublepage{% \clearpage% \ifodd\thepage\else% \ifAMC@automarks\pagestyle{AMCpageEmpty}\fi% \hbox{}\clearpage% \fi% } % \end{macrocode}\end{macro} % % \begin{macro}{\exemplairepair} % To make some differences in the copies, checking if the student % sheet number is odd, with |\exemplairepair| construct, can be % useful. % \begin{macrocode} \def\exemplairepair{\ifodd\AMCid@etud} % \end{macrocode}\end{macro} % % \begin{macro}{\AMClabel}\begin{macro}{\AMCref}\begin{macro}{\AMCref} % Commands |\AMClabel|, |\AMCref| and |\AMCpageref| replaces % \LaTeX's |\label|, |\ref| and |\pageref| to be able to use different % labels for different sheets. % % \begin{macrocode} \newcommand\AMCstudentlabel[1]{\the\AMCid@etud-#1} \def\AMClabel#1{\expandafter\label{\AMCstudentlabel{#1}}} \def\AMCref#1{\expandafter\ref{\AMCstudentlabel{#1}}} \def\AMCpageref#1{\expandafter\pageref{\AMCstudentlabel{#1}}} % \end{macrocode}\end{macro}\end{macro}\end{macro} % % \begin{macro}{\AMCqlabel} % A label can be created for current question with % |\AMCqlabel|\marg{label}. This label can be used with |\AMCref| % and |\AMCpageref|. This command is defined for backward % compatibility only, since |\AMClabel| can also be used. % \begin{macrocode} \newcommand{\AMCqlabel}[1]{% \AMClabel{#1}% } % \end{macrocode} % \end{macro} % % \subsection{Pre-association} % % \begin{macro}{\AMCassociation} % Association between sheets and students can be made before the % exam with the |\AMCassociation|\marg{id} command. % \begin{macrocode} \newcommand{\AMCassociation}[1]{% \ifAMC@calibration\protected@write\AMC@XYFILE{}{% \string\association{\the\AMCid@etud}{#1}% }\fi% } % \end{macrocode} % \end{macro} % % \subsection{Package options} % % See section~\ref{d:options} for the options descriptions. % % \begin{macrocode} \def\AMC@lang@code{} \DeclareOptionX{noshuffle}{\AMC@ordretrue} \DeclareOptionX{noshufflegroups}{\AMC@shuffleGfalse} \DeclareOptionX{fullgroups}{\AMC@fullGroupstrue} \DeclareOptionX{answers}{\AMC@correcheadtrue\AMC@correctrue} \DeclareOptionX{indivanswers}{\AMC@correctrue} \DeclareOptionX{box}{\AMC@qbloctrue} \DeclareOptionX{asbox}{\AMC@asqbloctrue} \DeclareOptionX{separateanswersheet}{\AMC@ensembletrue} \DeclareOptionX{digits}{\AMC@inside@digittrue} \DeclareOptionX{ordre}{\AMC@ordretrue} \DeclareOptionX{correc}{\AMC@correcheadtrue\AMC@correctrue} \DeclareOptionX{modele}{\AMC@correcheadtrue\AMC@correcfalse\AMC@ordretrue} \DeclareOptionX{correcindiv}{\AMC@correctrue} \DeclareOptionX{init}{\AMC@SR@time} \DeclareOptionX{bloc}{\AMC@qbloctrue} \DeclareOptionX{completemulti}{\AMCcomplete@multitrue} \DeclareOptionX{insidebox}{\AMC@inside@boxtrue} \DeclareOptionX{ensemble}{\AMC@ensembletrue} \DeclareOptionX{chiffres}{\AMC@inside@digittrue} \DeclareOptionX{outsidebox}{\AMC@outside@boxtrue} \DeclareOptionX{calibration}{\AMC@calibrationtrue} \DeclareOptionX{nowatermark}{\AMC@watermarkfalse} \newcommand\AMC@catalogMode{% \AMC@catalogtrue% \AMC@watermarkfalse\AMC@correcheadtrue% \AMC@correctrue\AMC@ordretrue\AMC@shuffleGfalse% \AMC@fullGroupstrue% \def\AMC@intituleHead{\AMC@loc@catalog}\AMC@affichekeystrue} \DeclareOptionX{catalog}{\AMC@catalogMode} \DeclareOptionX{francais}{\def\AMC@lang@code{FR}\AMC@loc@FR} \DeclareOptionX{lang}{\def\AMC@lang@code{#1}\csname AMC@loc@#1\endcsname} \DeclareOptionX{versionA}{% \def\AMCid@checkmax{31}\def\AMC@NCBetud{9}\def\AMC@NCBpage{4}% \def\AMC@NCBcheck{5}\setlength{\AMC@CBtaille}{4cm}% \def\AMC@premierecopie{100}} \DeclareOptionX{plain}{\AMC@plaintrue} \DeclareOptionX{nopage}{\AMC@pagelayoutfalse} \DeclareOptionX{postcorrect}{\AMC@postcorrecttrue} \DeclareOptionX{automarks}{\AMC@automarkstrue} \newif\ifAMCneeds@storebox\AMCneeds@storeboxfalse \DeclareOptionX{storebox}{\AMCneeds@storeboxtrue} \DeclareOptionX{pdfform}{\AMC@pdfformtrue} \ProcessOptionsX \ifAMCneeds@storebox \RequirePackage{storebox}\AtBeginDocument{{}}% \fi \ifAMC@pdfform \AMC@amclog{AUTOQCM[VAR:project:pdfform=1]^^J}% \AMCboxStyle{shape=form}% \RequirePackage[pageanchor=false]{hyperref}% \else% \AMC@amclog{AUTOQCM[VAR:project:pdfform=0]^^J}% \fi \AtBeginDocument{% \ifAMCneeds@storebox% \let\AMC@new@savebox=\newstorebox% \let\AMC@save@box=\storebox% \let\AMC@use@box=\usestorebox% \fi% \AMC@new@savebox{\AMC@ovalbox@R}% \AMC@new@savebox{\AMC@ovalbox@RF}% \AMC@new@savebox{\AMC@ovalbox@}% \AMC@new@savebox{\AMC@ovalbox@F}% \AMC@shapeprepare% } % \end{macrocode} % % \subsection{Package Errors} % % \begin{macro}{\AMC@error@explain} % Error to display if |\explain| command is used outside question like environments % \begin{macrocode} \def\AMC@error@explain{\PackageError{automultiplechoice}{ Command \protect\explain\space can only be used inside\MessageBreak question like environments}{Something's gone wrong.\MessageBreak \space \space Try typing \space \space to proceed, ignoring \protect\explain. }} % \end{macrocode} % \end{macro} % % \subsection{Optional features} % % This package tries to see if optional packages \textsf{environ} and % \textsf{etex} are loadable, and load them if possible. This behaviour % can be cancelled by using |plain| option. % % \begin{macrocode} \ifAMC@plain \else \IfFileExists{environ.sty}{\RequirePackage{environ}}{} \ifx\eTeXversion\@undefined \else \RequirePackage{etex} \fi \fi % \end{macrocode} % % \begin{environment}{examcopy} % Then, if \textsf{environ} package is loaded and defines command % |\NewEnviron|, environment |examcopy| is defined. % % Environment |{examcopy}|\oarg{n} does the same as command % |onecopy|: it encloses \LaTeX{} code which makes \emph{one} exam % copy. Optional argument \meta{n} gives the number of desired % copies -- this can also be modified redefinig |\AMCNombreCopies|. % % \begin{macrocode} \@ifpackageloaded{environ}{% \ifx\NewEnviron\undefined\PackageWarning{automultiplechoice}% {Package environ loaded but too old version: environnement examcopy/copieexamen will NOT be defined.}% \else\NewEnviron{examcopy}[1][5]{\onecopy{#1}{\BODY}}\fi}% {\PackageWarning{automultiplechoice}% {Package environ not loaded: environnement examcopy/copieexamen will NOT be defined.}} % \end{macrocode}\end{environment} % % \subsection{Use with recent LuaTeX versions} % % In recent LuaTeX versions, the commands |pdfsavepos|, |pdflastxpos| % and |pdflastypos| has been renamed, stripping the |pdf| part. The % following code tries to detect this situation and make the bindings % between the old and new command names. % % \begin{macrocode} \ExplSyntaxOn \cs_if_exist:NTF \pdfsavepos { } { \cs_if_exist:NTF \savepos { \cs_new_eq:NN \pdfsavepos \savepos } { } } \cs_if_exist:NTF \pdflastxpos { } { \cs_if_exist:NTF \lastxpos { \cs_new_eq:NN \pdflastxpos \lastxpos } { } } \cs_if_exist:NTF \pdflastypos { } { \cs_if_exist:NTF \lastypos { \cs_new_eq:NN \pdflastypos \lastypos } { } } \ExplSyntaxOff % \end{macrocode} % \subsection{External control} % % \begin{macro}{\SujetExterne}\begin{macro}{\ScoringExterne} % \begin{macro}{\CorrigeExterne}\begin{macro}{\CorrigeIndivExterne} % \begin{macro}{\NoWatermarkExterne} % Some of the package options can be controlled defining % |\|$xxx$|Externe| commands. For example, the following command will % format the subject document, whatever options are used in the % \LaTeX{} file: %\iffalse %<*doc> %\fi \begin{verbatim} pdflatex '\nonstopmode\def\SujetExterne{1}\def\NoWatermarkExterne{1}\input{mcq.tex}' \end{verbatim} %\iffalse % %\fi % % \begin{macrocode} \ifx\SujetExterne\undefined\else \message{***SUJET***^^J} \AMC@calibrationtrue\AMC@correcfalse\AMC@correcheadfalse\AMC@watermarkfalse \fi \ifx\ScoringExterne\undefined\else \message{***SCORING***^^J} \AMC@calibrationtrue\AMC@correcfalse\AMC@correcheadfalse\AMC@watermarkfalse\AMC@invisibletrue \fi \ifx\CorrigeExterne\undefined\else \message{***CORRIGE***^^J} \AMC@calibrationfalse\AMC@correcheadtrue\AMC@correctrue\AMC@watermarkfalse \fi \ifx\CorrigeIndivExterne\undefined\else \message{***CORRIGE***^^J} \AMC@calibrationfalse\AMC@correcheadfalse\AMC@correctrue\AMC@watermarkfalse \fi \ifx\CatalogExterne\undefined\else \message{***CATALOG***^^J} \AMC@catalogMode \fi \ifx\NoWatermarkExterne\undefined\else \AMC@watermarkfalse \fi % \end{macrocode} % \end{macro}\end{macro}\end{macro}\end{macro}\end{macro} % % \subsection{Page layout} % % The following code sets the correct page layout to have room for % signs for scan analysis, and prepares watermark printing: % \begin{macrocode} \@ifpackageloaded{geometry}{}{\usepackage{geometry}} \ifAMC@pagelayout \ifAMC@correchead \geometry{hmargin=3cm,vmargin={1cm,1cm},includeheadfoot,headheight=1cm,footskip=1cm} \else \geometry{hmargin=3cm,headheight=2cm,headsep=.3cm,footskip=1cm,top=3.5cm,bottom=2.5cm} \fi \ifAMC@watermark \ifAMC@correchead\else \def\AMC@note{\begin{minipage}{0.65\linewidth} \AMC@LR{\textcolor{blue}{\AMC@loc@message}} \end{minipage} } \fi \fi \fi % \end{macrocode} % % \subsection{Initialisation} % % Initialisation of the check counter: % \begin{macrocode} \AMCid@check=\AMCid@checkmax\advance\AMCid@check\@ne % \end{macrocode} % % Telling outside if separate answer sheet, and boxes labelling, are requested: % \begin{macrocode} \ifAMC@ensemble\AMC@amclog{AUTOQCM[VAR:ensemble=1]^^J}\fi \ifAMC@inside@box\AMC@amclog{AUTOQCM[VAR:insidebox=1]^^J}\fi \ifAMC@outside@box\AMC@amclog{AUTOQCM[VAR:outsidebox=1]^^J}\fi \ifAMC@postcorrect\AMC@amclog{AUTOQCM[VAR:postcorrect=1]^^J}\fi % \end{macrocode} % % Preparing writing to |.xy| file : % \begin{macrocode} \ifAMC@calibration \newwrite\AMC@XYFILE% \immediate\openout\AMC@XYFILE\jobname.xy% \immediate\write\AMC@XYFILE{\string\version{\AMC@VERSION}} \immediate\write\AMC@XYFILE{\string\with{codedigit=squarebrackets}} \immediate\write\AMC@XYFILE{\string\with{version=\AMC@VERSION}} \immediate\write\AMC@XYFILE{\string\with{ensemble=\ifAMC@ensemble yes\else no\fi}} \immediate\write\AMC@XYFILE{\string\with{insidebox=\ifAMC@inside@box yes\else no\fi}} \immediate\write\AMC@XYFILE{\string\with{outsidebox=\ifAMC@outside@box yes\else no\fi}} \immediate\write\AMC@XYFILE{\string\with{postcorrect=\ifAMC@postcorrect yes\else no\fi}} \immediate\write\AMC@XYFILE{\string\with{lang=\AMC@lang@code}} \ifx\AMCNombreCopies\undefined% \immediate\write\AMC@XYFILE{\string\with{ncopies=default}}% \else% \immediate\write\AMC@XYFILE{\string\with{ncopies=\AMCNombreCopies}}% \fi% \fi % \end{macrocode} % % Preparing writing to |.cs| file : % \begin{macrocode} \ifAMC@catalog% \newwrite\AMC@CSFILE% \immediate\openout\AMC@CSFILE\jobname.cs% \fi% % \end{macrocode} % % \subsection{French command names} % % For backward compatibility, a lot of commands have their french % counterpart: % \begin{macrocode} \let\reponses=\choices\let\endreponses=\endchoices \let\reponseshoriz=\choiceshoriz\let\endreponseshoriz=\endchoiceshoriz \let\reponsesperso=\choicescustom\let\endreponsesperso=\endchoicescustom \let\bonne=\correctchoice \let\mauvaise=\wrongchoice \let\bareme=\scoring \let\baremeDefautM=\scoringDefaultM \let\baremeDefautS=\scoringDefaultS \def\exemplaire{\AMC@loc@FR\onecopy} \@ifpackageloaded{environ}{% \let\copieexamen=\examcopy\let\endcopieexamen=\endexamcopy}{} \let\melangegroupe=\shufflegroup \let\restituegroupe=\insertgroup \let\alafin=\lastchoices \let\formulaire=\AMCform \let\AMCdebutFormulaire=\AMCformBegin \let\champnom=\namefield \let\choixIntervalles=\AMCIntervals % \end{macrocode} % % \section{Outputs} % % In the |.xy| file, |1/|\meta{n} means % student sheet number~1 (there is only one ``student sheet'' for this % document as we did not use |\onecopy|) and page number~\meta{n} inside this % student sheet. Then, each instance of the |\tracepos| command shows % $x$ and $y$ positions as arguments \#2 and \#3 (unit is |sp|, such % that $65536\times 72.27\,|sp|$ is one inch). One has to take min and % max of the $x$-values to determine the left and right position of % the box, and min and max values of $y$-values to determine top and bottom % position of the box. % % \subsection{\texttt{namefield} command} % \label{a:name} % Lines in the |.xy| file from a |\namefield| command: % \verbatiminput{automultiplechoice.xy2} % % \subsection{\texttt{AMCboxedchar} command} % \label{a:boxed} % Lines in the |.xy| file from a |\AMCboxedchar| command: % \verbatiminput{automultiplechoice.xy1} % % \subsection{\texttt{AMCcode} command} % \label{a:code} % Lines in the |.xy| file from a |\AMCcode| command. Here, % |code.|\meta{n}|:|\meta{q}|,|\meta{v} relates to digit number % \meta{n} from the right (\meta{n}=1 for units, \meta{n}=2 for tens, % \meta{n}=3 for hundreds and so on), question number \meta{q} % (|\AMCcode| uses a fake question; this number can be ignored), and % value \meta{v}-1 (box number \meta{v} for the digit). % \verbatiminput{automultiplechoice.xy3} % % \clearpage % \tableofcontents % % \clearpage % \PrintIndex % % \end{document} auto-multiple-choice-1.4.0/doc/sty/questions.tex000066400000000000000000000047361341176102400217160ustar00rootroot00000000000000 \element{geography}{ \begin{question}{Ghana} What is the capital of Ghana? \begin{choiceshoriz} \correctchoice{Accra} \wrongchoice{Addis Abeba} \wrongchoice{Ankara} \wrongchoice{Apia} \end{choiceshoriz} \end{question} } \element{geography}{ \begin{question}{Thailand} What is the capital of Thailand? \begin{choiceshoriz} \correctchoice{Bangkok} \wrongchoice{Banjul} \wrongchoice{Beijing} \wrongchoice{Beirut} \wrongchoice{Berlin} \end{choiceshoriz} \end{question} } \element{geography}{ \begin{question}{Egypt} What is the capital of Egypt? \begin{choices} \correctchoice{Cairo} \wrongchoice{Caracas} \wrongchoice{Cayenne} \wrongchoice{Chisinau} \wrongchoice{Conakry} \end{choices} \end{question} } \element{geography}{ \begin{question}{Ireland} What is the capital of Ireland? \begin{multicols}{3} \begin{choices} \correctchoice{Dublin} \wrongchoice{Dili} \wrongchoice{Djibouti} \wrongchoice{Doha} \wrongchoice{Dakar} \wrongchoice{Dhaka} \end{choices} \end{multicols} \end{question} } \element{history}{ \begin{questionmult}{1901} Which of the following events are taking place during the year 1901? \begin{choices} \correctchoice{Funeral of Queen Victoria in London} \correctchoice{Official end of the Caste War of Yucat\'an} \wrongchoice{King George of Greece becomes absolute monarch of Crete} \wrongchoice{The first line of the Paris M\'etro is opened} \end{choices} \end{questionmult} } \element{history}{ \begin{questionmult}{1850} Which of the following events are taking place during the year 1850? \begin{choices} \correctchoice{American Express is founded by Henry Wells \& William Fargo} \wrongchoice{Napoleon Bonaparte crosses the Alps and invades Italy} \wrongchoice{Kwang-su becomes emperor of China} \wrongchoice{First horse-drawn omnibuses established in London} \end{choices} \end{questionmult} } \element{history}{ \begin{questionmult}{1971} Which of the following events are taking place during the year 1971? \begin{choices} \correctchoice{Apollo 14 lands on the Moon} \correctchoice{The Soviet Union launches Salyut 1} \correctchoice{Death of Louis Armstrong} \wrongchoice{The first commercial Concorde flight takes off} \end{choices} \end{questionmult} } auto-multiple-choice-1.4.0/doc/sty/sample-amc.tex000066400000000000000000000014101341176102400216650ustar00rootroot00000000000000\documentclass{article} \usepackage{automultiplechoice} \usepackage{multicol} \begin{document} \input{questions.tex} \onecopy{30}{ \noindent{\bf AMC \hfill SAMPLE TEST} \vspace{3ex} For this test, package {\sf automultiplechoice} is used without any option. Page markers are printed in view of an automated marking from papers scans. DRAFT indications can be cancelled using {\tt nowatermark} option. Commands from {\sf automultiplechoice} are used to print, for each student, two geography questions and two history questions, at random. Questions and answers are shuffled. \vspace{3ex} \cleargroup{all} \shufflegroup{geography} \copygroup[2]{geography}{all} \shufflegroup{history} \copygroup[2]{history}{all} \shufflegroup{all} \insertgroup{all} } \end{document} auto-multiple-choice-1.4.0/doc/sty/sample-plain.tex000066400000000000000000000017131341176102400222360ustar00rootroot00000000000000\documentclass{article} \usepackage[nopage,indivanswers]{automultiplechoice} \usepackage{multicol} \begin{document} \input{questions.tex} \onecopy{30}{ \noindent{\bf AMC \hfill SAMPLE TEST} \vspace{3ex} For this test, package {\sf automultiplechoice} is used with the following options: \begin{itemize} \item {\tt nopage}, so that no page markers are printed: nothing is planed for future automated marking from papers scans. \item {\tt indivanswers}, so that correct answers are indicated (this is the corrected answer sheet. Without this option, you get the question sheet). \end{itemize} Commands from {\sf automultiplechoice} are used to print, for each student, two geography questions and two history questions, at random. Questions and answers are shuffled. \vspace{3ex} \cleargroup{all} \shufflegroup{geography} \copygroup[2]{geography}{all} \shufflegroup{history} \copygroup[2]{history}{all} \shufflegroup{all} \insertgroup{all} } \end{document} auto-multiple-choice-1.4.0/doc/sty/sample-separate.tex000066400000000000000000000020121341176102400227300ustar00rootroot00000000000000\documentclass{article} \usepackage[separateanswersheet]{automultiplechoice} \usepackage{multicol} \begin{document} \input{questions.tex} \onecopy{30}{ \noindent{\bf AMC \hfill SAMPLE TEST} \vspace{3ex} For this test, package {\sf automultiplechoice} is used with {\tt separateanswersheet} option, so that all answers are to be filled on a separate sheet by students. Page markers are printed in view of an automated marking from papers scans. DRAFT indications can be cancelled using {\tt nowatermark} option. Commands from {\sf automultiplechoice} are used to print, for each student, two geography questions and two history questions, at random. Questions and answers are shuffled. \vspace{3ex} \cleargroup{all} \shufflegroup{geography} \copygroup[2]{geography}{all} \shufflegroup{history} \copygroup[2]{history}{all} \shufflegroup{all} \insertgroup{all} \clearpage \AMCformBegin This is the answer sheet: all answers are to be ticked on this page to be taken into account. \vspace{2ex} \AMCform } \end{document} auto-multiple-choice-1.4.0/doc/traductions000066400000000000000000000017571341176102400206050ustar00rootroot00000000000000Correspondance FR/EN des noms de commandes LaTeX type = cmd : commande envir : environnement opt : option du package -------------------------------------------- type FR EN -------------------------------------------- cmd champnom namefield cmd question question cmd questionmult questionmult envir reponses choices envir reponseshoriz choiceshoriz envir reponsesperso choicescustom cmd bonne correctchoice cmd mauvaise wrongchoice cmd bareme scoring cmd baremeDefautM scoringDefaultM cmd baremeDefautS scoringDefaultS cmd exemplaire onecopy envir copieexamen examcopy cmd melangegroupe shufflegroup cmd restituegroupe insertgroup cmd alafin lastchoices cmd formulaire AMCform cmd AMCcode AMCcode cmd AMCformQuestion cmd AMCformAnswer cmd AMCdebutFormulaire --> AMCformBegin opt ordre noshuffle opt correc answers opt correcindiv indivanswers opt bloc box opt completemulti completemulti opt ensemble separateanswersheet opt chiffres digits -------------------------------------------- auto-multiple-choice-1.4.0/icons/000077500000000000000000000000001341176102400166575ustar00rootroot00000000000000auto-multiple-choice-1.4.0/icons/amc-annotate.svg000066400000000000000000000105001341176102400217430ustar00rootroot00000000000000 image/svg+xml auto-multiple-choice-1.4.0/icons/amc-auto-assoc.svg000066400000000000000000000250401341176102400222150ustar00rootroot00000000000000 image/svg+xmlauto-multiple-choice-1.4.0/icons/amc-auto-capture.svg000066400000000000000000001035741341176102400225610ustar00rootroot00000000000000 image/svg+xml auto-multiple-choice-1.4.0/icons/amc-group.svg000066400000000000000000000110161341176102400212710ustar00rootroot00000000000000 image/svg+xml PDF auto-multiple-choice-1.4.0/icons/amc-manual-assoc.svg000066400000000000000000000234471341176102400225330ustar00rootroot00000000000000 image/svg+xml auto-multiple-choice-1.4.0/icons/amc-manual-capture.svg000066400000000000000000000055431341176102400230630ustar00rootroot00000000000000 image/svg+xml auto-multiple-choice-1.4.0/icons/amc-mark.svg000066400000000000000000000210021341176102400210630ustar00rootroot00000000000000 image/svg+xml auto-multiple-choice-1.4.0/icons/amc-send.svg000066400000000000000000000054101341176102400210670ustar00rootroot00000000000000 image/svg+xml auto-multiple-choice-1.4.0/icons/auto-multiple-choice.svg000066400000000000000000000061601341176102400234340ustar00rootroot00000000000000 image/svg+xml auto-multiple-choice-1.4.0/interfaces/000077500000000000000000000000001341176102400176675ustar00rootroot00000000000000auto-multiple-choice-1.4.0/interfaces/amc-txt.lang000066400000000000000000000124371341176102400221160ustar00rootroot00000000000000 text/x-amc-txt