--- loncom/homework/structuretags.pm 2004/02/06 22:38:24 1.227.2.2
+++ loncom/homework/structuretags.pm 2004/02/13 23:59:24 1.235
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.227.2.2 2004/02/06 22:38:24 albertel Exp $
+# $Id: structuretags.pm,v 1.235 2004/02/13 23:59:24 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -37,6 +37,7 @@ use Apache::lonnet;
use Apache::File();
use Apache::lonmenu;
use Apache::lonlocal;
+use Apache::lonxml;
BEGIN {
&Apache::lonxml::register('Apache::structuretags',('block','languageblock','instructorcomment','while','randomlist','problem','library','web','tex','part','preduedate','postanswerdate','solved','notsolved','startouttext','endouttext',
@@ -186,8 +187,12 @@ sub problem_edit_header {
-
- ';
+ '.
+ &Apache::loncommon::help_open_topic('Problem_Editor_XML_Index',
+ 'Problem Editing Help').' '.
+ &Apache::loncommon::help_open_faq(5).
+ &Apache::loncommon::help_open_bug('Authoring').'
'.
+ '';
}
sub problem_edit_footer {
@@ -195,6 +200,16 @@ sub problem_edit_footer {
';
}
+sub option {
+ my ($value,$name) = @_;
+ my $result ="';
+ return $result;
+}
+
sub problem_web_to_edit_header {
my ($rndseed)=@_;
my $result.='
@@ -208,8 +223,40 @@ sub problem_web_to_edit_header {
onChange="javascript:document.lonhomework.changerandseed.click()" />
'.&mt(' Show All Foils').'
- ';
+ $result.= ' />'.&mt(' Show All Foils').
+ &Apache::loncommon::help_open_topic('Problem_Editor_Testing_Area','Testing Problems').
+ ' ';
+ $result.="
+
+Problem Status:
+
+
+ ".&option('CLOSED' ,'problemstate').&mt("Closed")."
+ ".&option('CAN_ANSWER' ,'problemstate').&mt("Answerable")."
+ ".&option('CANNOT_ANSWER_tries' ,'problemstate').&mt("Open with full tries")."
+ ".&option('CANNOT_ANSWER_correct','problemstate').&mt("Open and correct")."
+ ".&option('SHOW_ANSWER' ,'problemstate').&mt("Show Answer")."
+
+
+
+Problem Type:
+
+
+ ".&option('exam' ,'problemtype')."Exam Problem
+ ".&option('problem','problemtype')."Homework problem
+ ".&option('survey' ,'problemtype')."Survey Question
+
+
+
+Feedback Mode:
+
+
+ ".&option('yes','problemstatus')."Show Feedback
+ ".&option('no', 'problemstatus')."Don\'t Show Feedback
+
+
+
+ ";
my $numtoanalyze=$ENV{'form.numtoanalyze'};
if (!$numtoanalyze) { $numtoanalyze=20; }
$result.= ' ;
my $due_file_content = $due_file_content[$#due_file_content];
chomp $due_file_content;
- my $name_of_resourse= &get_resource_name($parstack,$safeeval);
+ my $name_of_resourse= &Apache::lonxml::latex_special_symbols(&get_resource_name($parstack,$safeeval));
if ($due_file_content ne $duedate) {
$temp_file = Apache::File->new('>'.$filename);
print $temp_file "$duedate\n";
@@ -978,6 +1031,8 @@ sub start_part {
}
}
if (($Apache::lonhomework::type eq 'exam') && ($allow_print_points)) { $result .= '\fbox{\textit{'.$weight.' pt}}';}
+ } elsif ($target eq 'web') {
+ $result.=' ';
}
}
}
@@ -1046,12 +1101,12 @@ sub end_preduedate {
sub start_postanswerdate {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
- if ($target eq 'web' || $target eq 'grade' || $target eq 'tex') {
+ if ($target eq 'web' || $target eq 'grade') {
if ($Apache::inputtags::status['-1'] ne 'SHOW_ANSWER') {
&Apache::lonxml::get_all_text("/postanswerdate",$parser);
}
} elsif ($target eq 'tex') {
- return '\vskip 0 mm \noindent';
+ &Apache::lonxml::get_all_text("/postanswerdate",$parser);
}
return '';
}