--- loncom/homework/structuretags.pm 2008/08/13 16:56:15 1.427
+++ loncom/homework/structuretags.pm 2008/08/26 03:18:29 1.429
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.427 2008/08/13 16:56:15 bisitz Exp $
+# $Id: structuretags.pm,v 1.429 2008/08/26 03:18:29 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -416,8 +416,9 @@ sub problem_web_to_edit_header {
$show_all
@@ -865,8 +866,7 @@ sub start_problem {
'';
}
if ($Apache::lonhomework::type eq 'practice') {
- $form_tag_start.=''.&mt('Practice Problem').'
'.
- ''.&mt('Submissions are not permanently recorded').'';
+ $form_tag_start.=&practice_problem_header();
}
$form_tag_start.='
';
}
@@ -940,6 +940,11 @@ sub start_problem {
# create a page header and exit
if ($env{'request.state'} eq "construct") {
$result.= &problem_web_to_edit_header($env{'form.rndseed'});
+ if ($Apache::lonhomework::type eq 'practice') {
+ $result.= ''.
+ &practice_problem_header().'
';
+ }
}
# if we are viewing someone else preserve that info
if (defined $env{'form.grade_symb'}) {
@@ -1175,6 +1180,11 @@ sub start_library {
$result.=" \n $form_tag_start".
'';
$result.=&problem_web_to_edit_header($rndseed);
+ if ($Apache::lonhomework::type eq 'practice') {
+ $result.= ''.
+ &practice_problem_header().'
';
+ }
}
return $result;
}
@@ -1843,7 +1853,8 @@ sub start_problemtype {
$result .=&Apache::edit::checked_arg('When used as type(s):','for',
[ ['exam','Exam/Quiz Problem'],
['survey','Survey'],
- ['problem','Homework Problem'] ]
+ ['problem','Homework Problem'],
+ ['practice','Practice Problem'] ]
,$token);
$result .=&Apache::edit::end_row().&Apache::edit::start_spanning_row();
} elsif ($target eq 'modified') {
@@ -1876,7 +1887,6 @@ sub end_startouttext {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
my $result='';
my $text='';
-
if ($target eq 'edit') {
my $areaid = 'homework_edit_'.$Apache::lonxml::curdepth;
$text=&Apache::lonxml::get_all_text("endouttext",$parser,$style);
@@ -1887,7 +1897,10 @@ sub end_startouttext {
unless ($env{'environment.wysiwygeditor'} eq 'on') {
$result.=''
.&Apache::lonhtmlcommon::dragmath_button($areaid,1)
- .' | ';
+ .''
+ .''
+ .&Apache::edit::insertlist($target,$token)
+ .' | ';
}
$result.='' .
&Apache::loncommon::helpLatexCheatsheet().
@@ -1964,5 +1977,11 @@ sub end_simpleeditbutton {
return '';
}
+sub practice_problem_header {
+ return ''.&mt('Practice Problem').''.
+ ''.&mt('Submissions are not permanently recorded').
+ '';
+}
+
1;
__END__
|