[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Thu, 14 Aug 2003 14:25:54 -0000
sakharuk Thu Aug 14 10:25:54 2003 EDT
Modified files:
/loncom/homework structuretags.pm
Log:
Corrections neccessary to print valid table of contents for the case when each problem "lives" in it's own box (minipage). This is the case where people want to prevent split of the problem between pages.
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.205 loncom/homework/structuretags.pm:1.206
--- loncom/homework/structuretags.pm:1.205 Wed Aug 13 14:49:41 2003
+++ loncom/homework/structuretags.pm Thu Aug 14 10:25:54 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.205 2003/08/13 18:49:41 albertel Exp $
+# $Id: structuretags.pm,v 1.206 2003/08/14 14:25:54 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -471,9 +471,9 @@
print $temp_file "$duedate\n";
if (not $ENV{'request.symb'} =~ m/\.page_/) {
if(not $duedate=~m/1969/ and $Apache::lonhomework::type ne 'exam') {
- $result .= '\begin{document} \typeout{STAMPOFPASSEDRESOURCESTART Resource <h2>"'.$name_of_resourse.'"</h2> located in <br /><small><b>'.$ENV{'request.uri'}.'</b></small><br /> STAMPOFPASSEDRESOURCEEND}\addcontentsline{toc}{subsection}{'.$name_of_resourse.'} \noindent\textit{Due date: '.$duedate.'} \vskip 1 mm\noindent '.$startminipage;
+ $result .= '\begin{document} \typeout{STAMPOFPASSEDRESOURCESTART Resource <h2>"'.$name_of_resourse.'"</h2> located in <br /><small><b>'.$ENV{'request.uri'}.'</b></small><br /> STAMPOFPASSEDRESOURCEEND} \noindent\textit{Due date: '.$duedate.'} \vskip 1 mm\noindent '.$startminipage.'\addcontentsline{toc}{subsection}{'.$name_of_resourse.'}';
} else {
- $result .= '\begin{document} \typeout{STAMPOFPASSEDRESOURCESTART Resource <h2>"'.$name_of_resourse.'"</h2> located in <br /><small><b>'.$ENV{'request.uri'}.'</b></small><br /> STAMPOFPASSEDRESOURCEEND}\addcontentsline{toc}{subsection}{'.$name_of_resourse.'} \noindent \vskip 1 mm \noindent'.$startminipage;
+ $result .= '\begin{document} \typeout{STAMPOFPASSEDRESOURCESTART Resource <h2>"'.$name_of_resourse.'"</h2> located in <br /><small><b>'.$ENV{'request.uri'}.'</b></small><br /> STAMPOFPASSEDRESOURCEEND} \noindent \vskip 1 mm \noindent'.$startminipage.'\addcontentsline{toc}{subsection}{'.$name_of_resourse.'}';
if ($Apache::lonhomework::type eq 'exam' and $allow_print_points==1) { $result .= '\fbox{\textit{'.$weight.' pt}}';}
}
} else {
@@ -481,7 +481,7 @@
}
} else {
if (not $ENV{'request.symb'} =~ m/\.page_/) {
- $result .= '\begin{document} \typeout{STAMPOFPASSEDRESOURCESTART Resource <h2>"'.$name_of_resourse.'"</h2> located in <br /><small><b>'.$ENV{'request.uri'}.'</b></small><br /> STAMPOFPASSEDRESOURCEEND}\addcontentsline{toc}{subsection}{'.$name_of_resourse.'} \noindent \vskip 1 mm\noindent'.$startminipage;
+ $result .= '\begin{document} \typeout{STAMPOFPASSEDRESOURCESTART Resource <h2>"'.$name_of_resourse.'"</h2> located in <br /><small><b>'.$ENV{'request.uri'}.'</b></small><br /> STAMPOFPASSEDRESOURCEEND} \noindent \vskip 1 mm\noindent'.$startminipage.'\addcontentsline{toc}{subsection}{'.$name_of_resourse.'}';
if (($Apache::lonhomework::type eq 'exam') and ($allow_print_points==1)) { $result .= '\fbox{\textit{'.$weight.' pt}}';}
} else {
$result .= '\vskip 1mm \\\\\\\\';