version 1.147, 2013/01/23 17:48:37
|
version 1.149, 2013/02/19 17:30:35
|
Line 237 sub domain_roles_select {
|
Line 237 sub domain_roles_select {
|
# Role types |
# Role types |
my @roletypes = ('domain','author','course','community'); |
my @roletypes = ('domain','author','course','community'); |
my %lt = &role_type_names(); |
my %lt = &role_type_names(); |
|
my $onchangefirst = "updateCols('showrole')"; |
|
my $onchangesecond = "updateCols('showrole')"; |
# |
# |
# build up the menu information to be passed to |
# build up the menu information to be passed to |
# &Apache::loncommon::linked_select_forms |
# &Apache::loncommon::linked_select_forms |
Line 283 sub domain_roles_select {
|
Line 285 sub domain_roles_select {
|
my $result = &Apache::loncommon::linked_select_forms |
my $result = &Apache::loncommon::linked_select_forms |
('studentform',(' 'x3).&mt('Role: '),$env{'form.roletype'}, |
('studentform',(' 'x3).&mt('Role: '),$env{'form.roletype'}, |
'roletype','showrole',\%select_menus, |
'roletype','showrole',\%select_menus, |
['domain','author','course','community']); |
['domain','author','course','community'],$onchangefirst, |
|
$onchangesecond); |
return $result; |
return $result; |
} |
} |
|
|
Line 1527 sub print_userlist {
|
Line 1530 sub print_userlist {
|
} |
} |
$r->print('</div><div class="LC_left_float">'. |
$r->print('</div><div class="LC_left_float">'. |
&column_checkboxes($context,$mode,$formname). |
&column_checkboxes($context,$mode,$formname). |
'</div><br clear="all" />'); |
'</div>'); |
if ($env{'form.phase'} eq '') { |
if ($env{'form.phase'} eq '') { |
$r->print(&list_submit_button(&mt('Display List of Users'))."\n". |
$r->print('<br clear="all" />'. |
|
&list_submit_button(&mt('Display List of Users'))."\n". |
'<input type="hidden" name="phase" value="" /></form>'); |
'<input type="hidden" name="phase" value="" /></form>'); |
return; |
return; |
} |
} |
if (!(($context eq 'domain') && |
if (!(($context eq 'domain') && |
(($env{'form.roletype'} eq 'course') || ($env{'form.roletype'} eq 'community')))) { |
(($env{'form.roletype'} eq 'course') || ($env{'form.roletype'} eq 'community')))) { |
$r->print(&list_submit_button(&mt('Update Display'))."\n"); |
$r->print('<br clear="all" />'. |
|
&list_submit_button(&mt('Update Display'))."\n"); |
} |
} |
|
|
my @cols = &infocolumns($context,$mode); |
my @cols = &infocolumns($context,$mode); |
if (!@cols) { |
if (!@cols) { |
$r->print('<hr /><span class="LC_warning">'. |
$r->print('<hr clear="all" /><span class="LC_warning">'. |
&mt('No user information selected for display.').'</span>'. |
&mt('No user information selected for display.').'</span>'. |
'<input type="hidden" name="phase" value="display" /></form>'."\n"); |
'<input type="hidden" name="phase" value="display" /></form>'."\n"); |
return; |
return; |
Line 1567 sub print_userlist {
|
Line 1572 sub print_userlist {
|
&Apache::lonhtmlcommon::course_selection($formname,$numcodes, |
&Apache::lonhtmlcommon::course_selection($formname,$numcodes, |
$codetitles,$idlist,$idlist_titles,$crstype, |
$codetitles,$idlist,$idlist_titles,$crstype, |
\@standardnames); |
\@standardnames); |
$r->print('<p>'.&Apache::lonhtmlcommon::start_pick_box()."\n". |
$r->print('<div class="LC_left_float">'. |
&Apache::lonhtmlcommon::start_pick_box()."\n". |
'<fieldset><legend>'.$title.'</legend>'."\n". |
&Apache::lonhtmlcommon::row_title($title,'LC_oddrow_value')."\n". |
|
$courseform."\n". |
$courseform."\n". |
&Apache::lonhtmlcommon::row_closure(1). |
'</fieldset></div><br clear="all" />'. |
&Apache::lonhtmlcommon::end_pick_box().'</p>'. |
|
'<p><input type="hidden" name="origroletype" value="'.$env{'form.roletype'}.'" />'. |
'<p><input type="hidden" name="origroletype" value="'.$env{'form.roletype'}.'" />'. |
&list_submit_button(&mt('Update Display')). |
&list_submit_button(&mt('Update Display')). |
"\n".'</p><span class="LC_warning">'.$warning.'</span>'."\n"); |
"\n".'</p><span class="LC_warning">'.$warning.'</span>'."\n"); |
Line 1585 sub print_userlist {
|
Line 1588 sub print_userlist {
|
$r->print('<hr />'.&mt('Searching ...').'<br /> <br />'); |
$r->print('<hr />'.&mt('Searching ...').'<br /> <br />'); |
} |
} |
} else { |
} else { |
$r->print('<hr /><div id="searching">'.&mt('Searching ...').'</div>'); |
$r->print('<hr clear="all" /><div id="searching">'.&mt('Searching ...').'</div>'); |
} |
} |
$r->rflush(); |
$r->rflush(); |
if ($context eq 'course') { |
if ($context eq 'course') { |
Line 1721 sub print_userlist {
|
Line 1724 sub print_userlist {
|
} elsif ($context eq 'course') { |
} elsif ($context eq 'course') { |
$r->print(&mt('There are no course users to display.')."\n"); |
$r->print(&mt('There are no course users to display.')."\n"); |
} |
} |
$r->print('<p class="LC_info"'.$msg.'</p>'."\n") if $msg; |
$r->print('<p class="LC_info">'.$msg.'</p>'."\n") if $msg; |
} else { |
} else { |
# Print out the available choices |
# Print out the available choices |
my $usercount; |
my $usercount; |
Line 1882 sub get_cols_array {
|
Line 1885 sub get_cols_array {
|
push(@cols,'section'); |
push(@cols,'section'); |
} |
} |
push(@cols,('start','end','role')); |
push(@cols,('start','end','role')); |
if ($context eq 'domain') { |
|
push (@cols,'extent'); |
|
} |
|
unless (($mode eq 'autoenroll') && ($env{'form.Status'} ne 'Any')) { |
unless (($mode eq 'autoenroll') && ($env{'form.Status'} ne 'Any')) { |
push(@cols,'status'); |
push(@cols,'status'); |
} |
} |
Line 1899 sub get_cols_array {
|
Line 1899 sub get_cols_array {
|
($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'})) { |
($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'})) { |
push(@cols,'photos'); |
push(@cols,'photos'); |
} |
} |
|
if ($context eq 'domain') { |
|
push (@cols,'extent'); |
|
} |
} |
} |
return @cols; |
return @cols; |
} |
} |
Line 1913 sub column_checkboxes {
|
Line 1916 sub column_checkboxes {
|
if ($context eq 'course') { |
if ($context eq 'course') { |
$disabledchk{'role'} = 1; |
$disabledchk{'role'} = 1; |
$unchecked{'photo'} = 1; |
$unchecked{'photo'} = 1; |
|
$unchecked{'clicker'} = 1; |
|
} elsif ($context eq 'domain') { |
|
$unchecked{'extent'} = 1; |
} |
} |
$unchecked{'clicker'} = 1; |
|
$unchecked{'start'} = 1; |
$unchecked{'start'} = 1; |
$unchecked{'end'} = 1; |
$unchecked{'end'} = 1; |
} else { |
} else { |
Line 1924 sub column_checkboxes {
|
Line 1929 sub column_checkboxes {
|
if (($env{'form.showrole'} ne 'Any') && ($env{'form.showrole'} ne 'cr')) { |
if (($env{'form.showrole'} ne 'Any') && ($env{'form.showrole'} ne 'cr')) { |
$disabledchk{'role'} = 1; |
$disabledchk{'role'} = 1; |
} |
} |
|
if ($context eq 'domain') { |
|
if (($env{'form.roletype'} eq 'course') || |
|
($env{'form.roletype'} eq 'community')) { |
|
$disabledchk{'status'} = 1; |
|
} elsif ($env{'form.roletype'} eq 'domain') { |
|
$disabledchk{'extent'} = 1; |
|
} |
|
} |
} |
} |
my $numposs = scalar(@cols); |
my $numposs = scalar(@cols); |
my $numinrow = 8; |
my $numinrow = 7; |
my %lt = &get_column_names($context); |
my %lt = &get_column_names($context); |
my $output = '<fieldset><legend>'.&mt('Information to show').'</legend>'."\n".'<span class="LC_nobreak">'. |
my $output = '<fieldset><legend>'.&mt('Information to show').'</legend>'."\n".'<span class="LC_nobreak">'. |
'<input type="button" onclick="javascript:checkAll(document.'.$formname.'.showcol);" value="'.&mt('check all').'" />'. |
'<input type="button" onclick="javascript:checkAll(document.'.$formname.'.showcol);" value="'.&mt('check all').'" />'. |
Line 1966 sub column_checkboxes {
|
Line 1979 sub column_checkboxes {
|
} else { |
} else { |
$output .= '<td>'; |
$output .= '<td>'; |
} |
} |
$output .= '<label><input id="showcol'.$cols[$i].'" type="checkbox" name="showcol" value="'.$cols[$i].'"'.$checked.' />'. |
my $style; |
$lt{$cols[$i]}.'</label></td>'; |
if ($cols[$i] eq 'extent') { |
|
if (($env{'form.roletype'} eq 'domain') || ($env{'form.roletype'} eq '')) { |
|
$style = ' style="display: none;"'; |
|
} |
|
} |
|
$output .= '<span id="show'.$cols[$i].'"'.$style.'><label>'. |
|
'<input id="showcol'.$cols[$i].'" type="checkbox" name="showcol" value="'.$cols[$i].'"'.$checked.' /><span id="showcoltext'.$cols[$i].'">'. |
|
$lt{$cols[$i]}.'</span>'. |
|
'</label></span></td>'; |
} |
} |
$output .= '</tr></table></fieldset>'; |
$output .= '</tr></table></fieldset>'; |
return $output; |
return $output; |
Line 2002 sub get_column_names {
|
Line 2022 sub get_column_names {
|
'clicker' => "clicker-ID", |
'clicker' => "clicker-ID", |
); |
); |
if ($context eq 'domain' && $env{'form.roletype'} eq 'course') { |
if ($context eq 'domain' && $env{'form.roletype'} eq 'course') { |
$lt{'extent'} = &mt('Course(s): description, section(s), status'); |
$lt{'extent'} = &mt('course(s): description, section(s), status'); |
} elsif ($context eq 'domain' && $env{'form.roletype'} eq 'community') { |
} elsif ($context eq 'domain' && $env{'form.roletype'} eq 'community') { |
$lt{'extent'} = &mt('Communities: description, section(s), status'); |
$lt{'extent'} = &mt('communities: description, section(s), status'); |
} elsif ($context eq 'author') { |
} elsif (($context eq 'author') || |
$lt{'extent'} = &mt('Author'); |
($context eq 'domain' && $env{'form.roletype'} eq 'author')) { |
|
$lt{'extent'} = &mt('author'); |
} |
} |
return %lt; |
return %lt; |
} |
} |
Line 2937 END
|
Line 2958 END
|
} else { |
} else { |
$r->print('<td> </td>'."\n"); |
$r->print('<td> </td>'."\n"); |
} |
} |
} |
} |
} else { |
} else { |
$r->print('<td>'.$in{$item}.'</td>'."\n"); |
$r->print('<td>'.$in{$item}.'</td>'."\n"); |
} |
} |
Line 3431 sub section_picker {
|
Line 3452 sub section_picker {
|
'<input type="hidden" name="sections" value="" />'."\n". |
'<input type="hidden" name="sections" value="" />'."\n". |
'</td></tr></table>'."\n"; |
'</td></tr></table>'."\n"; |
} else { |
} else { |
$secbox .= '<input type="hidden" name="sections" value="'. |
$secbox .= '<input type="hidden" name="sections" value="'. |
$env{'request.course.sec'}.'" />'. |
$env{'request.course.sec'}.'" />'. |
$env{'request.course.sec'}; |
$env{'request.course.sec'}; |
} |
} |
Line 3991 sub upfile_drop_add {
|
Line 4012 sub upfile_drop_add {
|
} elsif ($setting eq 'course') { |
} elsif ($setting eq 'course') { |
$defaultrole = $env{'form.courserole'}; |
$defaultrole = $env{'form.courserole'}; |
$defaultsec = $env{'form.sections'}; |
$defaultsec = $env{'form.sections'}; |
} |
} |
} elsif ($context eq 'author') { |
} elsif ($context eq 'author') { |
$defaultrole = $env{'form.defaultrole'}; |
$defaultrole = $env{'form.defaultrole'}; |
} elsif ($context eq 'course') { |
} elsif ($context eq 'course') { |