version 1.470, 2010/07/29 18:00:06
|
version 1.475, 2010/08/30 14:06:16
|
Line 177 sub page_start {
|
Line 177 sub page_start {
|
$parstack,$parser,$safeeval); |
$parstack,$parser,$safeeval); |
} |
} |
|
|
$extra_head .= &homework_js(); |
$extra_head .= &homework_js(). |
|
&Apache::lonhtmlcommon::dragmath_js("EditMathPopup"); |
if ($env{'environment.wysiwygeditor'} eq 'on') { |
if (&Apache::lonhtmlcommon::htmlareabrowser()) { |
$extra_head .= &Apache::lonhtmlcommon::dragmath_js("FCKEditMathPopup"); |
my %textarea_args = ( |
} else { |
dragmath => 'math', |
$extra_head .= &Apache::lonhtmlcommon::dragmath_js("EditMathPopup"); |
); |
|
$extra_head .= &Apache::lonhtmlcommon::htmlareaselectactive(\%textarea_args); |
} |
} |
|
|
my %body_args; |
my %body_args; |
Line 401 sub problem_edit_footer {
|
Line 402 sub problem_edit_footer {
|
<hr style="clear:both;" /> |
<hr style="clear:both;" /> |
</div> |
</div> |
'. |
'. |
|
|
&Apache::lonhtmlcommon::htmlareaselectactive(&Apache::lonhtmlcommon::get_htmlareafields()). |
|
"\n</form>\n".&Apache::loncommon::end_page(); |
"\n</form>\n".&Apache::loncommon::end_page(); |
} |
} |
|
|
Line 649 item store_aggregates()
|
Line 648 item store_aggregates()
|
|
|
sub store_aggregates { |
sub store_aggregates { |
my ($symb,$courseid) = @_; |
my ($symb,$courseid) = @_; |
my %aggregate; |
my (%aggregate,%anoncounter); |
my @parts; |
my @parts; |
my $cdomain = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cdomain = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cname = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my $cname = $env{'course.'.$env{'request.course.id'}.'.num'}; |
Line 680 sub store_aggregates {
|
Line 679 sub store_aggregates {
|
} |
} |
if (($Apache::lonhomework::results{'resource.'.$part.'.type'} eq 'anonsurvey') || |
if (($Apache::lonhomework::results{'resource.'.$part.'.type'} eq 'anonsurvey') || |
($Apache::lonhomework::results{'resource.'.$part.'.type'} eq 'anonsurveycred')) { |
($Apache::lonhomework::results{'resource.'.$part.'.type'} eq 'anonsurveycred')) { |
$aggregate{$symb."\0".$part."\0anonymous"} = 1; |
$anoncounter{$symb."\0".$part} = 1; |
my $needsrelease = $Apache::lonnet::needsrelease{'parameter:type:'.$Apache::lonhomework::results{'resource.'.$part.'.type'}}; |
my $needsrelease = $Apache::lonnet::needsrelease{'parameter:type:'.$Apache::lonhomework::results{'resource.'.$part.'.type'}}; |
if ($needsrelease) { |
if ($needsrelease) { |
my $curr_required = $env{'course.'.$env{'request.course.id'}.'.internal.releaserequired'}; |
my $curr_required = $env{'course.'.$env{'request.course.id'}.'.internal.releaserequired'}; |
if ($curr_required eq '') { |
if ($curr_required eq '') { |
&update_courseenv($needsrelease,$cdomain,$cname); |
&Apache::lonnet::update_released_required($needsrelease); |
} else { |
} else { |
my ($currmajor,$currminor) = split(/\./,$curr_required); |
my ($currmajor,$currminor) = split(/\./,$curr_required); |
my ($needsmajor,$needsminor) = split(/\./,$needsrelease); |
my ($needsmajor,$needsminor) = split(/\./,$needsrelease); |
if (($currmajor < $needsmajor) || ($currmajor == $needsmajor && $currminor < $needsminor)) { |
if (($currmajor < $needsmajor) || ($currmajor == $needsmajor && $currminor < $needsminor)) { |
&update_courseenv($needsrelease,$cdomain,$cname); |
&Apache::lonnet::update_released_required($needsrelease); |
} |
} |
} |
} |
} |
} |
Line 700 sub store_aggregates {
|
Line 699 sub store_aggregates {
|
&Apache::lonnet::cinc('nohist_resourcetracker',\%aggregate, |
&Apache::lonnet::cinc('nohist_resourcetracker',\%aggregate, |
$cdomain,$cname); |
$cdomain,$cname); |
} |
} |
} |
if (keys(%anoncounter) > 0) { |
|
&Apache::lonnet::cinc('nohist_anonsurveys',\%anoncounter, |
sub update_courseenv { |
$cdomain,$cname); |
my ($needsrelease,$cdom,$cnum) = @_; |
|
my $chome = $env{'course.'.$env{'request.course.id'}.'.home'}; |
|
my %needshash = ( |
|
'internal.releaserequired' => $needsrelease, |
|
); |
|
my $putresult = &put('environment',\%needshash,$cdom,$cnum); |
|
if ($putresult eq 'ok') { |
|
&appenv({'course.'.$env{'request.course.id'}.'.internal.releaserequired' => $needsrelease}); |
|
my %crsinfo = |
|
&Apache::lonnet::courseiddump($cdom,'.',1,'.','.',$cnum,undef,undef,'.'); |
|
if (ref($crsinfo{$env{'request.course.id'}}) eq 'HASH') { |
|
$crsinfo{$env{'request.course.id'}}{'releaserequired'} = $needsrelease; |
|
} |
|
&Apache::lonnet::courseidput($cdom,\%crsinfo,$chome,'notime'); |
|
} |
} |
} |
} |
|
|
Line 1197 sub end_problem {
|
Line 1182 sub end_problem {
|
if ($target ne 'tex' && |
if ($target ne 'tex' && |
$env{'form.answer_output_mode'} ne 'tex') { |
$env{'form.answer_output_mode'} ne 'tex') { |
$result.="</form>"; |
$result.="</form>"; |
$result.= &Apache::lonhtmlcommon::htmlareaselectactive(&Apache::lonhtmlcommon::get_htmlareafields()); |
|
} |
} |
if ($target eq 'web') { |
if ($target eq 'web') { |
$result.= &Apache::loncommon::end_page({'discussion' => 1}); |
$result.= &Apache::loncommon::end_page({'discussion' => 1}); |
Line 1851 sub start_part {
|
Line 1835 sub start_part {
|
|
|
} |
} |
} elsif ($target eq 'web') { |
} elsif ($target eq 'web') { |
$result.='<a name="'.&escape($Apache::inputtags::part).'" />'; |
$result.='<a name="'.&escape($Apache::inputtags::part).'" ></a>'; |
} |
} |
} |
} |
} |
} |
Line 2061 sub end_startouttext {
|
Line 2045 sub end_startouttext {
|
$result.=&Apache::edit::start_table($token)."<tr><td>".&mt('Text Block')."</td>" |
$result.=&Apache::edit::start_table($token)."<tr><td>".&mt('Text Block')."</td>" |
.'<td><span class="LC_nobreak">'.&mt('Delete?').' ' |
.'<td><span class="LC_nobreak">'.&mt('Delete?').' ' |
.&Apache::edit::deletelist($target,$token) |
.&Apache::edit::deletelist($target,$token) |
.'</span></td>'; |
.'</span></td>' |
unless ($env{'environment.wysiwygeditor'} eq 'on') { |
.'<td align="left"><span id="math_'.$areaid.'" />' |
$result .= '<td align="left">' |
.&Apache::lonhtmlcommon::dragmath_button($areaid,1) |
.&Apache::lonhtmlcommon::dragmath_button($areaid,1) |
.'<span></td>' |
.'</td>' |
.'<td>' |
.'<td>' |
.&Apache::edit::insertlist($target,$token) |
.&Apache::edit::insertlist($target,$token) |
.'</td>' |
.'</td>'; |
.'<td align="right" valign="top">' . |
} |
&Apache::loncommon::helpLatexCheatsheet(). |
$result.='<td align="right" valign="top">' . |
|
&Apache::loncommon::helpLatexCheatsheet(). |
|
&Apache::edit::end_row(). |
&Apache::edit::end_row(). |
&Apache::edit::start_spanning_row()."\n". |
&Apache::edit::start_spanning_row()."\n". |
&Apache::edit::editfield($token->[1],$text,"",80,8,1); |
&Apache::edit::editfield($token->[1],$text,"",80,8,1); |