version 1.205, 2005/06/03 19:16:25
|
version 1.206, 2005/06/03 21:19:04
|
Line 1888 ENDOVER
|
Line 1888 ENDOVER
|
} |
} |
&Apache::lonnet::devalidatecourseresdata($crs,$dom); |
&Apache::lonnet::devalidatecourseresdata($crs,$dom); |
} |
} |
# Read and display |
# Read coursedata |
my %resourcedata=&Apache::lonnet::dump('resourcedata',$dom,$crs); |
my $resourcedata=&Apache::lonnet::get_courseresdata($crs,$dom); |
|
# Read userdata |
|
|
|
my $classlist=&Apache::loncoursedata::get_classlist(); |
|
foreach (keys %$classlist) { |
|
# the following undefs are for 'domain', and 'username' respectively. |
|
if ($_=~/^(\w+)\:(\w+)$/) { |
|
my ($tuname,$tudom)=($1,$2); |
|
my $useropt=&Apache::lonnet::get_userresdata($tuname,$tudom); |
|
foreach my $userkey (keys %{$useropt}) { |
|
if ($userkey=~/^$env{'request.course.id'}/) { |
|
my $newkey=$userkey; |
|
$newkey=~s/^($env{'request.course.id'}\.)/$1\[useropt\:$tuname\:$tudom\]\./; |
|
$$resourcedata{$newkey}=$$useropt{$userkey}; |
|
} |
|
} |
|
} |
|
} |
|
|
my $oldsection=''; |
my $oldsection=''; |
my $oldrealm=''; |
my $oldrealm=''; |
my $oldpart=''; |
my $oldpart=''; |
my $pointer=0; |
my $pointer=0; |
$tableopen=0; |
$tableopen=0; |
my $foundkeys=0; |
my $foundkeys=0; |
foreach my $thiskey (sort keys %resourcedata) { |
foreach my $thiskey (sort keys %{$resourcedata}) { |
if ($resourcedata{$thiskey.'.type'}) { |
if ($$resourcedata{$thiskey.'.type'}) { |
|
$r->print($thiskey); |
my ($course,$middle,$part,$name)= |
my ($course,$middle,$part,$name)= |
($thiskey=~/^(\w+)\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/); |
($thiskey=~/^(\w+)\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/); |
my $section=&mt('All Students'); |
my $section=&mt('All Students'); |
if ($middle=~/^\[(.*)\]\./) { |
if ($middle=~/^\[(.*)\]\./) { |
$section=&mt('Group/Section').': '.$1; |
my $issection=$1; |
|
if ($issection=~/^useropt\:(\w+)\:(\w+)/) { |
|
$section=&mt('User').": ".&Apache::loncommon::plainname($1,$2); |
|
} else { |
|
$section=&mt('Group/Section').': '.$issection; |
|
} |
$middle=~s/^\[(.*)\]\.//; |
$middle=~s/^\[(.*)\]\.//; |
} |
} |
$middle=~s/\.$//; |
$middle=~s/\.$//; |
Line 1935 ENDOVER
|
Line 1959 ENDOVER
|
':</b></td><td><input type="checkbox" name="del_'. |
':</b></td><td><input type="checkbox" name="del_'. |
$thiskey.'" /></td><td>'); |
$thiskey.'" /></td><td>'); |
$foundkeys++; |
$foundkeys++; |
if ($resourcedata{$thiskey.'.type'}=~/^date/) { |
if ($$resourcedata{$thiskey.'.type'}=~/^date/) { |
my $jskey='key_'.$pointer; |
my $jskey='key_'.$pointer; |
$pointer++; |
$pointer++; |
$r->print( |
$r->print( |
&Apache::lonhtmlcommon::date_setter('overviewform', |
&Apache::lonhtmlcommon::date_setter('overviewform', |
$jskey, |
$jskey, |
$resourcedata{$thiskey}). |
$$resourcedata{$thiskey}). |
'<input type="hidden" name="datepointer_'.$thiskey.'" value="'.$jskey.'" />' |
'<input type="hidden" name="datepointer_'.$thiskey.'" value="'.$jskey.'" />' |
); |
); |
} else { |
} else { |
$r->print( |
$r->print( |
'<input type="text" name="set_'.$thiskey.'" value="'. |
'<input type="text" name="set_'.$thiskey.'" value="'. |
$resourcedata{$thiskey}.'">'); |
$$resourcedata{$thiskey}.'">'); |
} |
} |
$r->print('</td></tr>'); |
$r->print('</td></tr>'); |
} |
} |
Line 2154 sub handler {
|
Line 2178 sub handler {
|
['action','state', |
['action','state', |
'pres_marker', |
'pres_marker', |
'pres_value', |
'pres_value', |
'pres_type']); |
'pres_type', |
|
'udom','uname']); |
|
|
|
|
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |