version 1.92, 2010/01/07 14:45:08
|
version 1.93, 2010/01/31 06:03:55
|
Line 361 sub handler {
|
Line 361 sub handler {
|
else { |
else { |
$r->print($image); |
$r->print($image); |
} |
} |
|
|
foreach my $field (sort(keys(%syllabusfields))) { |
my $links_handler = sub { |
if (($syllabus{$field}) || ($allowed) || |
my ($r, $field, $message, $group, $data_ref, $fields_ref, $target, $allowed) = @_; |
($field eq 'abb_links' && $group ne '')) { |
if ($group ne '') { |
my $message=$syllabus{$field}; |
my %data = %{$data_ref}; |
if (!&Apache::lonfeedback::contains_block_html($message)) { |
my %fields = %{$fields_ref}; |
&Apache::lonfeedback::newline_to_br(\$message); |
$r->print('<br /><input type="hidden" name="'.$field. |
} |
'" value="'.$data{$field}.'" />'); |
$message=~s/(https*\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g; |
&display_group_links($r, $target, $group, 'edit', $refarg, %groupinfo); |
if ($allowed) { |
$r->print('<br />'); |
$message=&Apache::lonspeller::markeduptext($message); |
} |
} |
}; |
if ($target ne 'tex') { |
my $title_handler = sub {}; |
$message=&Apache::lontexconvert::msgtexconverted($message); |
my %custom_handlers = ( |
} |
'abb_links' => $links_handler, |
if ($field eq 'abb_links' && $group ne '') { |
'aaa_title' => $title_handler |
$r->print('<br /><input type="hidden" name="'.$field. |
); |
'" value="'.$syllabus{$field}.'" />'); |
&Apache::lontemplate::print_template_fields($r, \%syllabus, \%syllabusfields, |
&display_group_links($r,$target,$group,'edit',$refarg, |
$target, $allowed, Apache::lontemplate->RICH_TEXT_DETECT_HTML, \%custom_handlers, $group); |
%groupinfo); |
|
$r->print('<br />'); |
|
} elsif ($field eq 'aaa_title') { |
|
next; |
|
} else { |
|
if ($target ne 'tex') { |
|
if ($allowed) { |
|
} else { |
|
&Apache::lontemplate::print_template($r,$syllabusfields{$field},$message,$allowed,'LC_Box'); |
|
} |
|
} else { |
|
my $safeinit; |
|
$r->print(&Apache::lonxml::xmlparse($r,'tex','<h3>'.$syllabusfields{$field}.'</h3>')); |
|
$r->print(&Apache::lonxml::xmlparse($r,'tex',$message)); |
|
} |
|
if ($allowed) { |
|
if ($target ne 'tex') { |
|
#output of syllabusfields will be generated here. |
|
&Apache::lontemplate::print_start_template($r,$syllabusfields{$field},'LC_Box'); |
|
$r->print($message); |
|
$r->print("<br /><div>"); |
|
&Apache::lontemplate::print_textarea_template($r, $syllabus{$field}, |
|
$field, Apache::lontemplate->RICH_TEXT_DETECT_HTML); |
|
&Apache::lontemplate::print_saveall_template($r); |
|
$r->print("</div>"); |
|
&Apache::lontemplate::print_end_template($r); |
|
} else { |
|
my $safeinit; |
|
$r->print(&Apache::lonxml::xmlparse($r,'tex',$syllabus{$field},$safeinit)); |
|
} |
|
} |
|
} |
|
} |
|
} |
|
if ($allowed && ($env{'form.grade_target'} ne 'tex')) { |
if ($allowed && ($env{'form.grade_target'} ne 'tex')) { |
$r->print(&Apache::lonhtmlcommon::htmlareaselectactive |
$r->print(&Apache::lonhtmlcommon::htmlareaselectactive |
('bbb_content').'</form>'); |
('bbb_content').'</form>'); |