version 1.948.2.7, 2010/08/14 04:32:03
|
version 1.948.2.11, 2010/09/27 01:16:22
|
Line 3422 sub get_previous_attempt {
|
Line 3422 sub get_previous_attempt {
|
} |
} |
$prevattempts=&start_data_table().&start_data_table_header_row(); |
$prevattempts=&start_data_table().&start_data_table_header_row(); |
$prevattempts.='<th>'.&mt('History').'</th>'; |
$prevattempts.='<th>'.&mt('History').'</th>'; |
my %typeparts; |
my (%typeparts,%lasthidden); |
my $showsurv=&Apache::lonnet::allowed('vas',$env{'request.course.id'}); |
my $showsurv=&Apache::lonnet::allowed('vas',$env{'request.course.id'}); |
foreach my $key (sort(keys(%lasthash))) { |
foreach my $key (sort(keys(%lasthash))) { |
my ($ign,@parts) = split(/\./,$key); |
my ($ign,@parts) = split(/\./,$key); |
Line 3433 sub get_previous_attempt {
|
Line 3433 sub get_previous_attempt {
|
unless ($showsurv) { |
unless ($showsurv) { |
my $id = join(',',@parts); |
my $id = join(',',@parts); |
$typeparts{$ign.'.'.$id} = $lasthash{$key}; |
$typeparts{$ign.'.'.$id} = $lasthash{$key}; |
|
if (($lasthash{$key} eq 'anonsurvey') || ($lasthash{$key} eq 'anonsurveycred')) { |
|
$lasthidden{$ign.'.'.$id} = 1; |
|
} |
} |
} |
delete($lasthash{$key}); |
delete($lasthash{$key}); |
} else { |
} else { |
Line 3447 sub get_previous_attempt {
|
Line 3450 sub get_previous_attempt {
|
} |
} |
} |
} |
$prevattempts.=&end_data_table_header_row(); |
$prevattempts.=&end_data_table_header_row(); |
my %lasthidden; |
|
if ($getattempt eq '') { |
if ($getattempt eq '') { |
for ($version=1;$version<=$returnhash{'version'};$version++) { |
for ($version=1;$version<=$returnhash{'version'};$version++) { |
my @hidden; |
my @hidden; |
Line 3455 sub get_previous_attempt {
|
Line 3457 sub get_previous_attempt {
|
foreach my $id (keys(%typeparts)) { |
foreach my $id (keys(%typeparts)) { |
if (($returnhash{$version.':'.$id.'.type'} eq 'anonsurvey') || ($returnhash{$version.':'.$id.'.type'} eq 'anonsurveycred')) { |
if (($returnhash{$version.':'.$id.'.type'} eq 'anonsurvey') || ($returnhash{$version.':'.$id.'.type'} eq 'anonsurveycred')) { |
push(@hidden,$id); |
push(@hidden,$id); |
$lasthidden{$id} = 1; |
|
} elsif ($lasthidden{$id}) { |
|
if (exists($returnhash{$version.':'.$id.'.award'})) { |
|
delete($lasthidden{$id}); |
|
} |
|
} |
} |
} |
} |
} |
} |
Line 3839 sub findallcourses {
|
Line 3836 sub findallcourses {
|
$udom = $env{'user.domain'}; |
$udom = $env{'user.domain'}; |
} |
} |
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) { |
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) { |
my %roleshash = &Apache::lonnet::dump('roles',$udom,$uname); |
my $extra = &Apache::lonnet::freeze_escape({'skipcheck' => 1}); |
|
my %roleshash = &Apache::lonnet::dump('roles',$udom,$uname,'.',undef, |
|
$extra); |
if (!%roles) { |
if (!%roles) { |
%roles = ( |
%roles = ( |
cc => 1, |
cc => 1, |
Line 4754 ENDBODY
|
Line 4753 ENDBODY
|
|
|
sub dc_courseid_toggle { |
sub dc_courseid_toggle { |
my ($dc_info) = @_; |
my ($dc_info) = @_; |
return ' <span id="dccidtext" class="LC_cusr_subheading">'. |
return ' <span id="dccidtext" class="LC_cusr_subheading LC_nobreak">'. |
'<a href="javascript:showCourseID();">'. |
'<a href="javascript:showCourseID();">'. |
&mt('(More ...)').'</a></span>'. |
&mt('(More ...)').'</a></span>'. |
'<div id="dccid" class="LC_dccid">'.$dc_info.'</div>'; |
'<div id="dccid" class="LC_dccid">'.$dc_info.'</div>'; |
Line 4910 body {
|
Line 4909 body {
|
color:$font; |
color:$font; |
} |
} |
|
|
+a:focus, |
a:focus, |
+a:focus img { |
a:focus img { |
color: red; |
color: red; |
background: yellow; |
background: yellow; |
} |
} |
Line 5503 span.LC_parm_symb {
|
Line 5502 span.LC_parm_symb {
|
color: #AAAAAA; |
color: #AAAAAA; |
} |
} |
|
|
|
ul.LC_parm_parmlist li { |
|
display: inline-block; |
|
padding: 0.3em 0.8em; |
|
vertical-align: top; |
|
width: 150px; |
|
border-top:1px solid $lg_border_color; |
|
} |
|
|
td.LC_parm_overview_level_menu, |
td.LC_parm_overview_level_menu, |
td.LC_parm_overview_map_menu, |
td.LC_parm_overview_map_menu, |
td.LC_parm_overview_parm_selectors, |
td.LC_parm_overview_parm_selectors, |
Line 7195 role status: active, previous or future.
|
Line 7202 role status: active, previous or future.
|
|
|
sub check_user_status { |
sub check_user_status { |
my ($udom,$uname,$cdom,$crs,$role,$sec) = @_; |
my ($udom,$uname,$cdom,$crs,$role,$sec) = @_; |
my %userinfo = &Apache::lonnet::dump('roles',$udom,$uname); |
my $extra = &Apache::lonnet::freeze_escape({'skipcheck' => 1}); |
|
my %userinfo = &Apache::lonnet::dump('roles',$udom,$uname,'.',undef,$extra); |
my @uroles = keys %userinfo; |
my @uroles = keys %userinfo; |
my $srchstr; |
my $srchstr; |
my $active_chk = 'none'; |
my $active_chk = 'none'; |
Line 10788 sub init_user_environment {
|
Line 10796 sub init_user_environment {
|
$initial_env{"browser.interface"} = $form->{'interface'}; |
$initial_env{"browser.interface"} = $form->{'interface'}; |
$env{'browser.interface'}=$form->{'interface'}; |
$env{'browser.interface'}=$form->{'interface'}; |
} |
} |
|
my %is_adv = ( is_adv => $env{'user.adv'} ); |
|
my %domdef = &Apache::lonnet::get_domain_defaults($domain); |
|
|
foreach my $tool ('aboutme','blog','portfolio') { |
foreach my $tool ('aboutme','blog','portfolio') { |
$userenv{'availabletools.'.$tool} = |
$userenv{'availabletools.'.$tool} = |
&Apache::lonnet::usertools_access($username,$domain,$tool,'reload'); |
&Apache::lonnet::usertools_access($username,$domain,$tool,'reload', |
|
undef,\%userenv,\%domdef,\%is_adv); |
} |
} |
|
|
foreach my $crstype ('official','unofficial','community') { |
foreach my $crstype ('official','unofficial','community') { |
$userenv{'canrequest.'.$crstype} = |
$userenv{'canrequest.'.$crstype} = |
&Apache::lonnet::usertools_access($username,$domain,$crstype, |
&Apache::lonnet::usertools_access($username,$domain,$crstype, |
'reload','requestcourses'); |
'reload','requestcourses', |
|
\%userenv,\%domdef,\%is_adv); |
} |
} |
|
|
$env{'user.environment'} = "$lonids/$cookie.id"; |
$env{'user.environment'} = "$lonids/$cookie.id"; |