[LON-CAPA-cvs] cvs: loncom /homework edit.pm insertlist.tab response.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 15 Nov 2005 15:57:45 -0000
albertel Tue Nov 15 10:57:45 2005 EDT
Modified files:
/loncom/homework edit.pm insertlist.tab response.pm
Log:
- algorithmic -> custom
Index: loncom/homework/edit.pm
diff -u loncom/homework/edit.pm:1.95 loncom/homework/edit.pm:1.96
--- loncom/homework/edit.pm:1.95 Thu Nov 10 17:19:27 2005
+++ loncom/homework/edit.pm Tue Nov 15 10:57:45 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# edit mode helpers
#
-# $Id: edit.pm,v 1.95 2005/11/10 22:19:27 albertel Exp $
+# $Id: edit.pm,v 1.96 2005/11/15 15:57:45 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -311,19 +311,19 @@
</numericalresponse>';
}
-sub insert_algorithmicresponse {
+sub insert_customresponse {
return '
-<algorithmicresponse>
+<customresponse>
<answer type="loncapa/perl">
</answer>
<textline />
<hintgroup>
<startouttext /><endouttext />
</hintgroup>
-</algorithmicresponse>';
+</customresponse>';
}
-sub insert_algorithmicresponse_answer {
+sub insert_customresponse_answer {
return '
<answer type="loncapa/perl">
</answer>
Index: loncom/homework/insertlist.tab
diff -u loncom/homework/insertlist.tab:1.55 loncom/homework/insertlist.tab:1.56
--- loncom/homework/insertlist.tab:1.55 Thu Nov 10 17:19:27 2005
+++ loncom/homework/insertlist.tab Tue Nov 15 10:57:45 2005
@@ -22,8 +22,8 @@
imageresponse::polygon,Polygonal area in image,#ccFFdd,default
imageresponse::text,Text to describe option,#ddFFee,default
datasubmission,Stored Entry Field,#1144dd,default,no
-algorithmicresponse,Response: Algorithmic,#44cc55,insert_algorithmicresponse
-algorithmicresponse::answer,Answer algorithm,#ccccaa,insert_algorithmicresponse_answer
+customresponse,Response: Custom,#44cc55,insert_customresponse
+customresponse::answer,Answer algorithm,#ccccaa,insert_customresponse_answer
textfield,Large Text Entry Area,#1144dd,default
textline,Single Line Text Entry Area,#1144dd,default
optionresponse::conceptgroup,Collection of similar foils,#EEEE00,Apache::optionresponse::insert_conceptgroup
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.128 loncom/homework/response.pm:1.129
--- loncom/homework/response.pm:1.128 Thu Nov 10 17:19:27 2005
+++ loncom/homework/response.pm Tue Nov 15 10:57:45 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# various response type definitons response definition
#
-# $Id: response.pm,v 1.128 2005/11/10 22:19:27 albertel Exp $
+# $Id: response.pm,v 1.129 2005/11/15 15:57:45 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -32,7 +32,7 @@
use Apache::lonnet;
BEGIN {
- &Apache::lonxml::register('Apache::response',('responseparam','parameter','dataresponse','algorithmicresponse'));
+ &Apache::lonxml::register('Apache::response',('responseparam','parameter','dataresponse','customresponse'));
}
sub start_response {
@@ -362,12 +362,12 @@
return $result;
}
-sub start_algorithmicresponse {
+sub start_customresponse {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
my $id = &Apache::response::start_response($parstack,$safeeval);
- push(@Apache::lonxml::namespace,'algorithmicresponse');
+ push(@Apache::lonxml::namespace,'customresponse');
my $result;
- undef($Apache::response::algorithmic_answer);
+ undef($Apache::response::custom_answer);
&Apache::lonxml::register('Apache::response',('answer'));
if ($target eq 'web') {
if ( &Apache::response::show_answer() ) {
@@ -391,12 +391,12 @@
} elsif ($target eq 'answer' || $target eq 'grade') {
&Apache::response::reset_params();
} elsif ($target eq 'meta') {
- $result .= &Apache::response::meta_package_write('algorithmicresponse');
+ $result .= &Apache::response::meta_package_write('customresponse');
}
return $result;
}
-sub end_algorithmicresponse {
+sub end_customresponse {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
my $result;
my $part=$Apache::inputtags::part;
@@ -404,7 +404,7 @@
if ( $target eq 'grade' && &Apache::response::submitted() ) {
my $response = &Apache::response::getresponse();
if ( $response =~ /[^\s]/ &&
- $Apache::response::algorithmic_answer_type eq 'loncapa/perl') {
+ $Apache::response::custom_answer_type eq 'loncapa/perl') {
if (!$Apache::lonxml::default_homework_loaded) {
&Apache::lonxml::default_homework_load($safeeval);
}
@@ -413,10 +413,10 @@
$Apache::lonhomework::results{"resource.$part.$id.submission"}=
$response;
my $error;
- ${$safeeval->varglob('LONCAPA::algorithmicresponse_submission')}=
+ ${$safeeval->varglob('LONCAPA::customresponse_submission')}=
$response;
- my $award = &Apache::run::run('{ my $submission=$LONCAPA::algorithmicresponse_submission;'.$Apache::response::algorithmic_answer.'}',$safeeval);
+ my $award = &Apache::run::run('{ my $submission=$LONCAPA::customresponse_submission;'.$Apache::response::custom_answer.'}',$safeeval);
if (!&Apache::inputtags::valid_award($award)) {
$error = $award;
$award = 'ERROR';
@@ -439,15 +439,15 @@
sub start_answer {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
my $result;
- $Apache::response::algorithmic_answer=
+ $Apache::response::custom_answer=
&Apache::lonxml::get_all_text_unbalanced("/answer",$parser);
- $Apache::response::algorithmic_answer_type=
+ $Apache::response::custom_answer_type=
lc(&Apache::lonxml::get_param('type',$parstack,$safeeval));
- $Apache::response::algorithmic_answer_type =~ s/\s+//g;
+ $Apache::response::custom_answer_type =~ s/\s+//g;
if ($target eq "edit" ) {
$result=&Apache::edit::tag_start($target,$token,'Answer algorithm');
$result.=&Apache::edit::editfield($token->[1],
- $Apache::response::algorithmic_answer,
+ $Apache::response::custom_answer,
'',80,4);
} elsif ( $target eq "modified" ) {
$result=$token->[4].&Apache::edit::modifiedfield('/answer',$parser);