[LON-CAPA-cvs] cvs: doc /loncapafiles loncapafiles.lpml loncom/homework insertlist.tab lonhomework.pm structuretags.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Sun, 10 Nov 2002 15:39:37 -0000
albertel Sun Nov 10 10:39:37 2002 EDT
Modified files:
/loncom/homework insertlist.tab lonhomework.pm structuretags.pm
/doc/loncapafiles loncapafiles.lpml
Log:
- part ids are now editable thorugh normal edit interface
- added help message to describe limitations on the id
Index: loncom/homework/insertlist.tab
diff -u loncom/homework/insertlist.tab:1.31 loncom/homework/insertlist.tab:1.32
--- loncom/homework/insertlist.tab:1.31 Wed Nov 6 17:58:36 2002
+++ loncom/homework/insertlist.tab Sun Nov 10 10:39:36 2002
@@ -41,7 +41,7 @@
block,Conditional Block,#FF3311,default
library,Start of Library,#FFFFFF,default
notsolved,Block For When Not Solved,#FFFFFF,default
-part,New problem part,#FFFFFF,default
+part,Problem Part,#F0F0F0,default
postanswerdate,After Answer Date Block,#FFFFFF,default
preduedate,Before Due Date Block,#FFFFFF,default
problem,Start of Homework,#FFFFFF,default
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.99 loncom/homework/lonhomework.pm:1.100
--- loncom/homework/lonhomework.pm:1.99 Fri Nov 8 09:39:40 2002
+++ loncom/homework/lonhomework.pm Sun Nov 10 10:39:37 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Homework handler
#
-# $Id: lonhomework.pm,v 1.99 2002/11/08 14:39:40 albertel Exp $
+# $Id: lonhomework.pm,v 1.100 2002/11/10 15:39:37 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -382,17 +382,6 @@
&Apache::outputtags::initialize_outputtags();
&Apache::edit::initialize_edit();
if ($target eq 'analyze') { %Apache::lonhomework::anaylze=(); }
- if ($target eq 'web') {
- my ($symb)=&Apache::lonxml::whichuser();
- if ($symb eq '') {
- if ($ENV{'request.state'} eq "construct") {
- } else {
- my $help = Apache::loncommon::help_open_topic("Ambiguous_Reference");
- $request->print("Browsing or <a href=\"/adm/ambiguous\">ambiguous</a> reference, submissions ignored $help<br />");
- }
- }
- #if ($Apache::lonhomework::viewgrades eq 'F') {&createmenu('grade',$request); }
- }
if ($target eq 'answer') { &showhash(%Apache::lonhomework::history); }
if ($target eq 'web') {&Apache::lonhomework::showhashsubset(\%ENV,'^form');}
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.133 loncom/homework/structuretags.pm:1.134
--- loncom/homework/structuretags.pm:1.133 Thu Nov 7 11:10:47 2002
+++ loncom/homework/structuretags.pm Sun Nov 10 10:39:37 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.133 2002/11/07 16:10:47 sakharuk Exp $
+# $Id: structuretags.pm,v 1.134 2002/11/10 15:39:37 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -101,6 +101,14 @@
}
}
$body_tag_start.='>';
+ if ($target eq 'web' && $ENV{'request.state'} ne 'construct') {
+ my ($symb)=&Apache::lonxml::whichuser();
+ if ($symb eq '') {
+ my $help = &Apache::loncommon::help_open_topic("Ambiguous_Reference");
+ $help="Browsing or <a href=\"/adm/ambiguous\">ambiguous</a> reference, submissions ignored $help<br />";
+ $body_tag_start.=$help;
+ }
+ }
}
my $form_tag_start;
if (!defined($found{'form'})) {
@@ -657,6 +665,19 @@
}
}
}
+ } elsif ($target eq 'edit') {
+ $result.=&Apache::edit::tag_start($target,$token);
+ $result.=&Apache::edit::text_arg('Part ID:','id',$token).
+ &Apache::loncommon::help_open_topic("Part_Tag_Edit_Help").
+ &Apache::edit::end_row().&Apache::edit::start_spanning_row();
+
+ } elsif ($target eq 'modified') {
+ my $constructtag=&Apache::edit::get_new_args($token,$parstack,$safeeval,
+ 'id');
+ if ($constructtag) {
+ $result = &Apache::edit::rebuild_tag($token);
+ $result.=&Apache::edit::handle_insert();
+ }
}
return $result;
}
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.185 doc/loncapafiles/loncapafiles.lpml:1.186
--- doc/loncapafiles/loncapafiles.lpml:1.185 Fri Nov 8 09:44:00 2002
+++ doc/loncapafiles/loncapafiles.lpml Sun Nov 10 10:39:37 2002
@@ -3,7 +3,7 @@
<!-- loncapafiles.lpml -->
<!-- Scott Harrison -->
-<!-- $Id: loncapafiles.lpml,v 1.185 2002/11/08 14:44:00 albertel Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.186 2002/11/10 15:39:37 albertel Exp $ -->
<!--
@@ -1757,6 +1757,7 @@
Option_Response_Problem_Parts.tex;
Option_Response_Problems.tex;
Option_Response_Simple.tex;
+Part_Tag_Edit_Help;
Problem_Editor_Testing_Area.tex;
Problem_Editor_XML_Index.tex;
Problem_Types.tex;