version 1.40, 2006/08/28 13:02:24
|
version 1.46, 2008/03/03 11:25:59
|
Line 181 sub handler {
|
Line 181 sub handler {
|
} |
} |
$r->print( |
$r->print( |
'<p>'. |
'<p>'. |
&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').'<br /><a href="'.$r->uri.'?'.$query_str.'"><font size="+1">'.&mt('Show Student View').'</font></a>'. |
&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')).'<br /><a href="'.$r->uri.'?'.$query_str.'"><font size="+1">'.&mt('Show Student View').'</font></a>'. |
&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'</p>'); |
&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'</p>'); |
} elsif ($privileged and $target ne 'tex') { |
} elsif ($privileged and $target ne 'tex') { |
my $query_str = 'forceedit=edit'; |
my $query_str = 'forceedit=edit'; |
Line 212 sub handler {
|
Line 212 sub handler {
|
&Apache::lonnet::put('bulletinpage_'.$marker,\%syllabus,$dom,$crs); |
&Apache::lonnet::put('bulletinpage_'.$marker,\%syllabus,$dom,$crs); |
} |
} |
if (($allowed) && ($env{'form.storesyl'})) { |
if (($allowed) && ($env{'form.storesyl'})) { |
foreach (keys %syllabusfields) { |
foreach my $syl_field (keys(%syllabusfields)) { |
my $field=$env{'form.'.$_}; |
my $field=$env{'form.'.$syl_field}; |
$field=~s/\s+$//s; |
$field=~s/\s+$//s; |
$field=&Apache::lonfeedback::clear_out_html($field,1); |
$field=&Apache::lonfeedback::clear_out_html($field,1); |
$syllabus{$_}=$field; |
$syllabus{$syl_field}=$field; |
} |
} |
$syllabus{'uploaded.lastmodified'}=time; |
$syllabus{'uploaded.lastmodified'}=time; |
&Apache::lonnet::put('bulletinpage_'.$marker,\%syllabus,$dom,$crs); |
&Apache::lonnet::put('bulletinpage_'.$marker,\%syllabus,$dom,$crs); |
Line 237 sub handler {
|
Line 237 sub handler {
|
'<h3>'.&mt('Upload a Photo').'</h3>'. |
'<h3>'.&mt('Upload a Photo').'</h3>'. |
'<input type="file" name="uploaddoc" size="50">'. |
'<input type="file" name="uploaddoc" size="50">'. |
'<input type="submit" name="storeupl" value="'.&mt('Upload').'">'. |
'<input type="submit" name="storeupl" value="'.&mt('Upload').'">'. |
'</form><form method="post">'); |
'</form><form method="post">'. |
|
'<input type="hidden" name="forceedit" value="edit" />'); |
} |
} |
foreach (sort keys %syllabusfields) { |
foreach my $field (sort(keys(%syllabusfields))) { |
if (($syllabus{$_}) || ($allowed)) { |
if (($syllabus{$field}) || ($allowed)) { |
my $message=$syllabus{$_}; |
my $message=$syllabus{$field}; |
&Apache::lonfeedback::newline_to_br(\$message); |
&Apache::lonfeedback::newline_to_br(\$message); |
$message |
$message |
=~s/(https*\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g; |
=~s/(https*\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g; |
Line 249 sub handler {
|
Line 250 sub handler {
|
$message=&Apache::lonspeller::markeduptext($message); |
$message=&Apache::lonspeller::markeduptext($message); |
} |
} |
$message=&Apache::lontexconvert::msgtexconverted($message); |
$message=&Apache::lontexconvert::msgtexconverted($message); |
unless ($_ eq 'aaa_title') { |
unless ($field eq 'aaa_title') { |
if (($_ ne 'bbb_content') || ($allowed)) { |
if (($field ne 'bbb_content') || ($allowed)) { |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
$r->print('<h3>'.$syllabusfields{$_}.'</h3>'); |
$r->print('<h3>'.$syllabusfields{$field}.'</h3>'); |
} else { |
} else { |
$r->print('\\\\\textbf{'.$syllabusfields{$_}.'}\\\\'); |
$r->print('\\\\\textbf{'.$syllabusfields{$field}.'}\\\\'); |
} |
} |
} |
} |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
Line 264 sub handler {
|
Line 265 sub handler {
|
$r->print(' '.&Apache::lonxml::xmlparse($r,'tex',$message).' '); |
$r->print(' '.&Apache::lonxml::xmlparse($r,'tex',$message).' '); |
} |
} |
if ($allowed) { |
if ($allowed) { |
$r->print('<br /><textarea cols="80" rows="10" name="'.$_.'">'. |
$r->print('<br /><textarea cols="80" rows="10" name="'.$field.'">'. |
&HTML::Entites::encode($syllabus{$_},'&"<>'). |
&HTML::Entities::encode($syllabus{$field},'&"<>'). |
'</textarea><input type="submit" name="storesyl" value="'.&mt('Store').'" />'); |
'</textarea><input type="submit" name="storesyl" value="'.&mt('Save').'" />'); |
} |
} |
} else { |
} else { |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
Line 276 sub handler {
|
Line 277 sub handler {
|
} |
} |
if ($allowed) { |
if ($allowed) { |
$r->print( |
$r->print( |
'<br />'.&mt('Topic').'<br /><textarea cols="80" rows="2" name="'.$_.'">'. |
'<br />'.&mt('Topic').'<br /><textarea cols="80" rows="2" name="'.$field.'">'. |
&HTML::Entites::encode($syllabus{$_},'&"<>'). |
&HTML::Entities::encode($syllabus{$field},'&"<>'). |
'</textarea><input type="submit" name="storesyl" value="'.&mt('Store').'" />'); |
'</textarea><input type="submit" name="storesyl" value="'.&mt('Save').'" />'); |
} |
} |
} |
} |
} |
} |