version 1.57, 2009/12/22 06:32:04
|
version 1.63, 2011/05/02 18:32:30
|
Line 184 sub handler {
|
Line 184 sub handler {
|
if (($group ne '') && ($env{'form.group'} eq $group)) { |
if (($group ne '') && ($env{'form.group'} eq $group)) { |
$query_str.='&group='.$group.'&'.$refarg; |
$query_str.='&group='.$group.'&'.$refarg; |
} |
} |
|
if ($env{'form.register'}) { |
|
$query_str .= '&register='.$env{'form.register'}; |
|
} |
#Function Box for Edit Mode. |
#Function Box for Edit Mode. |
my $functionbox = &Apache::lonhtmlcommon::start_funclist(); |
my $functionbox = &Apache::lonhtmlcommon::start_funclist(); |
$functionbox .= &Apache::lonhtmlcommon::add_item_funclist( |
$functionbox .= &Apache::lonhtmlcommon::add_item_funclist( |
Line 196 sub handler {
|
Line 199 sub handler {
|
if (($group ne '') && ($env{'form.group'} eq $group)) { |
if (($group ne '') && ($env{'form.group'} eq $group)) { |
$query_str.='&group='.$group.'&'.$refarg; |
$query_str.='&group='.$group.'&'.$refarg; |
} |
} |
|
if ($env{'form.register'}) { |
|
$query_str .= '&register='.$env{'form.register'}; |
|
} |
#Functionbox for Student view. |
#Functionbox for Student view. |
my $functionbox = &Apache::lonhtmlcommon::start_funclist(); |
my $functionbox = &Apache::lonhtmlcommon::start_funclist(); |
$functionbox .= &Apache::lonhtmlcommon::add_item_funclist( |
$functionbox .= &Apache::lonhtmlcommon::add_item_funclist( |
Line 212 sub handler {
|
Line 218 sub handler {
|
} |
} |
if ($group ne '') { |
if ($group ne '') { |
$syllabus{'uploaded.photourl'}= |
$syllabus{'uploaded.photourl'}= |
&Apache::lonnet::userfileupload('uploaddoc',1, |
&Apache::lonnet::userfileupload('uploaddoc','coursedoc', |
'bulletin/'.$group.'/'.$marker); |
'bulletin/'.$group.'/'.$marker); |
} else { |
} else { |
$syllabus{'uploaded.photourl'}= |
$syllabus{'uploaded.photourl'}= |
&Apache::lonnet::userfileupload('uploaddoc',1, |
&Apache::lonnet::userfileupload('uploaddoc','coursedoc', |
'bulletin/'.$marker); |
'bulletin/'.$marker); |
} |
} |
} |
} |
Line 259 sub handler {
|
Line 265 sub handler {
|
&Apache::lonnet::allowuploaded('/adm/syllabus', |
&Apache::lonnet::allowuploaded('/adm/syllabus', |
$syllabus{'uploaded.photourl'}); |
$syllabus{'uploaded.photourl'}); |
} |
} |
my @htmlids=(); |
|
#Outputbox and Inputbox for Image upload |
#Outputbox and Inputbox for Image upload |
if ($allowed) { |
if ($allowed) { |
my $message = '<img src="'.$syllabus{'uploaded.photourl'}.'" alt="'.&mt('Image').'"/>'; |
my $message = '<img src="'.$syllabus{'uploaded.photourl'}.'" alt="'.&mt('Image').'"/>'; |
Line 277 sub handler {
|
Line 282 sub handler {
|
elsif($syllabus{'uploaded.photourl'} && $target ne 'tex'){ |
elsif($syllabus{'uploaded.photourl'} && $target ne 'tex'){ |
$r->print('<img src="'.$syllabus{'uploaded.photourl'}.'" alt="'.&mt('Image').'"/>'); |
$r->print('<img src="'.$syllabus{'uploaded.photourl'}.'" alt="'.&mt('Image').'"/>'); |
} |
} |
foreach my $field (sort(keys(%syllabusfields))) { |
|
if (($syllabus{$field}) || ($allowed)) { |
my %custom_handlers = ( 'aaa_title' => sub {} ); |
my $message=$syllabus{$field}; |
&Apache::lontemplate::print_template_fields($r, \%syllabus, \%syllabusfields, |
if (!&Apache::lonfeedback::contains_block_html($message)) { |
$target, $allowed, Apache::lontemplate->RICH_TEXT_DETECT_HTML, \%custom_handlers); |
&Apache::lonfeedback::newline_to_br(\$message); |
|
} else { |
|
$message = &Apache::lonfeedback::tidy_html($message); |
|
} |
|
$message=&Apache::lonhtmlcommon::raw_href_to_link($message); |
|
if ($allowed) { |
|
$message=&Apache::lonspeller::markeduptext($message); |
|
} |
|
$message=&Apache::lontexconvert::msgtexconverted($message); |
|
unless ($field eq 'aaa_title') { |
|
if ($target ne 'tex') { |
|
#output of syllabusfields will be generated here. |
|
&Apache::lontemplate::print_start_template($r,$syllabusfields{$field},'LC_Box'); |
|
$r->print($message); |
|
if ($allowed) { |
|
$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); |
|
push(@htmlids,$field); |
|
} else { |
|
$r->print('\\\\\textbf{'.$syllabusfields{$field}.'}\\\\'.&Apache::lonxml::xmlparse($r,'tex',$message)); |
|
} |
|
} |
|
} |
|
} |
|
if ($allowed) { |
if ($allowed) { |
$r->print('</form>'. |
$r->print('</form>'); |
&Apache::lonhtmlcommon::htmlareaselectactive(@htmlids)); |
|
} |
} |
if ($target ne 'tex'){ |
if ($target ne 'tex'){ |
$r->print('<br/><br/><hr/><br/>'); |
$r->print('<br/><br/><hr/><br/>'); |
Line 321 sub handler {
|
Line 296 sub handler {
|
$r->print(&Apache::lonxml::xmlparse($r,'tex','<br/><br/><hr/><br/>')); |
$r->print(&Apache::lonxml::xmlparse($r,'tex','<br/><br/><hr/><br/>')); |
} |
} |
} else { |
} else { |
$r->print('<p>'.&mt('No page information provided.').'</p>'); |
if ($target ne 'tex') { |
|
$r->print('<p>'.&mt('No page information provided.').'</p>'); |
|
} |
} |
} |
#Lists discussion posts and box for a new discussion post. |
#Lists discussion posts and box for a new discussion post. |
if ($target ne 'tex') { |
if ($target ne 'tex') { |