--- loncom/homework/edit.pm 2003/11/05 21:53:48 1.71
+++ loncom/homework/edit.pm 2004/01/15 03:24:52 1.78
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# edit mode helpers
#
-# $Id: edit.pm,v 1.71 2003/11/05 21:53:48 www Exp $
+# $Id: edit.pm,v 1.78 2004/01/15 03:24:52 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -289,8 +289,7 @@ sub insert_formularesponse {
-
-
+
';
}
@@ -300,8 +299,7 @@ sub insert_numericalresponse {
-
-
+
';
}
@@ -311,8 +309,7 @@ sub insert_stringresponse {
-
-
+
';
}
@@ -330,8 +327,7 @@ sub insert_imageresponse {
-
-
+
';
}
@@ -342,32 +338,55 @@ sub insert_optionresponse {
-
-
+
';
}
+sub insert_organicresponse {
+ return '
+
+
+
+
+
+';
+}
+
+sub insert_organicstructure {
+ return '
+
+';
+}
+
sub insert_radiobuttonresponse {
return '
-
-
+
';
}
+sub insert_reactionresponse {
+ return '
+
+
+
+
+
+';
+}
+
sub insert_rankresponse {
return '
-
-
+
';
}
@@ -380,8 +399,7 @@ sub insert_matchresponse {
-
-
+
';
}
@@ -399,8 +417,7 @@ sub insert_hintpart {
sub insert_hintgroup {
return '
-
-
+
';
}
@@ -435,11 +452,11 @@ sub insert_optionhint {
}
sub insert_startouttext {
- return "\n";
+ return "";
}
sub insert_script {
- return "\n";
+ return "\n";
}
sub textarea_sizes {
@@ -649,7 +666,7 @@ sub select_or_text_arg {
}
$optionlist.="\n";
+ ">".&mt('Type-in value')."\n";
#
my $element=&html_element_name($name);
my $selectelement='select_list_'.$element;
@@ -668,7 +685,7 @@ sub select_or_text_arg {
$description
...
$element = &Apache::lonnet::escape('homework_edit_'.
$Apache::lonxml::curdepth);
}
- my $formheight='';
+ my $id=$Apache::lonxml::curdepth;
+ my %data=("imagechoice.$id.type" =>$type,
+ "imagechoice.$id.formname" =>$form,
+ "imagechoice.$id.file" =>$bgfile,
+ "imagechoice.$id.formcoord" =>$element);
if ($height) {
- $formheight='&formheight='.$height.'_'.$Apache::edit::bgimgsrccurdepth;
+ $data{"imagechoice.$id.formheight"}=$height.'_'.
+ $Apache::edit::bgimgsrccurdepth;
}
- my $formwidth='';
if ($width) {
- $formwidth='&formwidth='.$width.'_'.$Apache::edit::bgimgsrccurdepth;
+ $data{"imagechoice.$id.formwidth"}=$width.'_'.
+ $Apache::edit::bgimgsrccurdepth;
}
- my $result = <<"ENDBUTTON";
-Click Coordinate Pair
-ENDBUTTON
+ &Apache::lonnet::appenv(%data);
+ my $text="Enter Coordinates";
+ if ($type eq 'polygon') { $text='Create Polygon Data'; }
+ my $result=''.$text.'';
return $result;
}
+
+sub deletecoorddata {
+ &Apache::lonnet::delenv("imagechoice\\.");
+}
+
#----------------------------------------------------- browse
sub browse {
# insert a link to call up the filesystem browser (lonindexer)