form to
allow a user to select the domain to preform an operation in.
@@ -1798,16 +1884,15 @@ selected");
If the $showdomdesc flag is set, the domain name is followed by the domain description.
-If the $autosubmit flag is set, the form containing the domain selector will be auto-submitted by an onchange action.
+The optional $onchange argumnet specifies what should occur if the domain selector is changed, e.g., 'this.form.submit()' if the form is to be automatically submitted.
=cut
#-------------------------------------------
sub select_dom_form {
- my ($defdom,$name,$includeempty,$showdomdesc,$autosubmit) = @_;
- my $onchange;
- if ($autosubmit) {
- $onchange = ' onchange="this.form.submit()"';
+ my ($defdom,$name,$includeempty,$showdomdesc,$onchange) = @_;
+ if ($onchange) {
+ $onchange = ' onchange="'.$onchange.'"';
}
my @domains = sort {lc($a) cmp lc($b)} (&Apache::lonnet::all_domains());
if ($includeempty) { @domains=('',@domains); }
@@ -3766,7 +3851,7 @@ sub blockcheck {
($env{'request.role'} !~ m{^st\./\Q$cdom\E/\Q$cnum\E}));
next if ($no_userblock);
- # Retrieve blocking times and identity of blocker for course
+ # Retrieve blocking times and identity of locker for course
# of specified user, unless user has 'evb' privilege.
my ($start,$end)=&get_blocks($setters,$activity,$cdom,$cnum);
@@ -3831,60 +3916,20 @@ sub parse_block_record {
return ($setuname,$setudom,$title,$blocks);
}
-sub build_block_table {
- my ($startblock,$endblock,$setters) = @_;
- my %lt = &Apache::lonlocal::texthash(
- 'cacb' => 'Currently active communication blocks',
- 'cour' => 'Course',
- 'dura' => 'Duration',
- 'blse' => 'Block set by'
- );
- my $output;
- $output = ' '.$lt{'cacb'}.': ';
- $output .= &start_data_table();
- $output .= '
-
- '.$lt{'cour'}.'
- '.$lt{'dura'}.'
- '.$lt{'blse'}.'
-
-';
- foreach my $course (keys(%{$setters})) {
- my %courseinfo=&Apache::lonnet::coursedescription($course);
- for (my $i=0; $i<@{$$setters{$course}{staff}}; $i++) {
- my ($uname,$udom) = @{$$setters{$course}{staff}[$i]};
- my $fullname = &plainname($uname,$udom);
- if (defined($env{'user.name'}) && defined($env{'user.domain'})
- && $env{'user.name'} ne 'public'
- && $env{'user.domain'} ne 'public') {
- $fullname = &aboutmewrapper($fullname,$uname,$udom);
- }
- my ($openblock,$closeblock) = @{$$setters{$course}{times}[$i]};
- $openblock = &Apache::lonlocal::locallocaltime($openblock);
- $closeblock= &Apache::lonlocal::locallocaltime($closeblock);
- $output .= &Apache::loncommon::start_data_table_row().
- ''.$courseinfo{'description'}.' '.
- ''.$openblock.' to '.$closeblock.' '.
- ''.$fullname.' '.
- &Apache::loncommon::end_data_table_row();
- }
- }
- $output .= &end_data_table();
-}
sub blocking_status {
- my $blocked = blocking_status_print(@_);
+ my $blocked;
my ($activity,$uname,$udom) = @_;
+ my %setters;
+ my ($startblock,$endblock)=&blockcheck(\%setters,$activity,$uname,$udom);
+ if ($startblock && $endblock) {
+ $blocked = 1;
+ }
if(!wantarray) {
return $blocked;
}
my $output;
my $querystring;
$querystring = "?activity=$activity";
- if(defined($uname)) {
- $querystring .= "&uname=$uname";
- }if(defined($udom)) {
- $querystring .= "&udom=$udom";
- }
$output .= <<"END_MYBLOCK";
END_MYBLOCK
my $popupUrl = "/adm/blockingstatus/$querystring";
- $output.="\nBlocking Table ";
+ $output .= <<"END_BLOCK";
+
+
+END_BLOCK
return ($blocked, $output);
}
-sub blocking_status_print {
- my ($activity,$uname,$udom) = @_;
- my %setters;
- my ($blocked,$output,$ownitem,$is_course);
- my ($startblock,$endblock)=&blockcheck(\%setters,$activity,$uname,$udom);
- if ($startblock && $endblock) {
- $blocked = 1;
- if (wantarray) {
- my $category;
- if ($activity eq 'boards') {
- $category = 'Discussion posts in this course';
- } elsif ($activity eq 'blogs') {
- $category = 'Blogs';
- } elsif ($activity eq 'port') {
- if (defined($uname) && defined($udom)) {
- if ($uname eq $env{'user.name'} &&
- $udom eq $env{'user.domain'}) {
- $ownitem = 1;
- }
- }
- $is_course = &Apache::lonnet::is_course($udom,$uname);
- if ($ownitem) {
- $category = 'Your portfolio files';
- } elsif ($is_course) {
- my $coursedesc;
- foreach my $course (keys(%setters)) {
- my %courseinfo =
- &Apache::lonnet::coursedescription($course);
- $coursedesc = $courseinfo{'description'};
- }
- $category = "Group portfolio in the course '$coursedesc'";
- } else {
- $category = 'Portfolio files belonging to ';
- if ($env{'user.name'} eq 'public' &&
- $env{'user.domain'} eq 'public') {
- $category .= &plainname($uname,$udom);
- } else {
- $category .= &aboutmewrapper(&plainname($uname,$udom),$uname,$udom);
- }
- }
- } elsif ($activity eq 'groups') {
- $category = 'Groups in this course';
- }
- my $showstart = &Apache::lonlocal::locallocaltime($startblock);
- my $showend = &Apache::lonlocal::locallocaltime($endblock);
- $output = ' '.&mt('[_1] will be inaccessible between [_2] and [_3] because communication is being blocked.',$category,$showstart,$showend).' ';
- if (!($activity eq 'port' && !($ownitem) && !($is_course))) {
- $output .= &build_block_table($startblock,$endblock,\%setters);
- }
- }
- }
- if (wantarray) {
- return ($blocked,$output);
- } else {
- return $blocked;
- }
-}
###############################################
@@ -4918,10 +4915,6 @@ td.LC_menubuttons_text {
font-weight: bold;
}
-.LC_roleslog_note {
- font-size: small;
-}
-
table.LC_data_table,
table.LC_mail_list {
border: 1px solid #000000;
@@ -4941,6 +4934,7 @@ table.LC_nested_outer {
width: 100%;
}
+table.LC_innerpickbox,
table.LC_nested {
border: none;
border-collapse: collapse;
@@ -4951,13 +4945,19 @@ table.LC_nested {
table.LC_data_table tr th,
table.LC_calendar tr th,
table.LC_mail_list tr th,
-table.LC_prior_tries tr th {
+table.LC_prior_tries tr th,
+table.LC_innerpickbox tr th {
font-weight: bold;
background-color: $data_table_head;
color:$fontmenu;
font-size:90%;
}
+table.LC_innerpickbox tr th,
+table.LC_innerpickbox tr td {
+ vertical-align: top;
+}
+
table.LC_data_table tr.LC_info_row > td {
background-color: #CCCCCC;
font-weight: bold;
@@ -5441,12 +5441,27 @@ div.LC_feedback_link {
div.LC_feedback_link img {
height: 22px;
+ vertical-align:middle;
}
div.LC_feedback_link a{
text-decoration: none;
}
+div.LC_comblock {
+ display:inline;
+ color:$font;
+ font-size:90%;
+}
+
+div.LC_feedback_link div.LC_comblock {
+ padding-left:5px;
+}
+
+div.LC_feedback_link div.LC_comblock a {
+ color:$font;
+}
+
span.LC_feedback_link {
/* background: $feedback_link_bg; */
font-size: larger;
@@ -5636,10 +5651,6 @@ table.LC_double_column tr td.LC_right_co
vertical-align: top;
}
-span.LC_role_level {
- font-weight: bold;
-}
-
div.LC_left_float {
float: left;
padding-right: 5%;
@@ -5923,24 +5934,13 @@ ul.LC_TabContent {
background: $sidebg;
border-bottom: solid 1px $lg_border_color;
list-style:none;
- margin: -10px -10px 0 -10px;
+ margin: 0 -10px;
padding: 0;
}
-ul.LC_TabContentBigger {
- display:block;
- list-style:none;
- padding: 0;
-}
-
-
ul.LC_TabContent li,
ul.LC_TabContentBigger li {
- display: inline;
- border-right: solid 1px $lg_border_color;
float:left;
- line-height:140%;
- white-space:nowrap;
}
ul#LC_TabMainMenuContent li a {
@@ -5977,32 +5977,57 @@ ul.LC_TabContent li:hover, ul.LC_TabCont
padding-right: 16px;
}
+#maincoursedoc {
+ clear:both;
+}
+
+ul.LC_TabContentBigger {
+ display:block;
+ list-style:none;
+ padding: 0;
+}
+
ul.LC_TabContentBigger li {
- vertical-align:bottom;
- border-top:solid 1px $lg_border_color;
- border-left:solid 1px $lg_border_color;
- padding:5px 10px 5px 10px;
- margin-left:2px;
- background: #d9d9d9;
+ vertical-align:bottom;
+ height: 30px;
+ font-size:110%;
+ font-weight:bold;
+ color: #737373;
}
-#maincoursedoc {
- clear:both;
+
+ul.LC_TabContentBigger li a {
+ background:url('/adm/lonIcons/tabbgleft.gif') left bottom no-repeat;
+ height: 30px;
+ line-height: 30px;
+ text-align: center;
+ display: block;
+ text-decoration: none;
}
-ul.LC_TabContentBigger li:hover,
-ul.LC_TabContentBigger li.active {
- background: #ffffff;
+ul.LC_TabContentBigger li:hover a,
+ul.LC_TabContentBigger li.active a {
+ background:url('/adm/lonIcons/tabbgleft.gif') left top no-repeat;
color:$font;
+ text-decoration: underline;
}
-ul.LC_TabContentBigger li,
-ul.LC_TabContentBigger li a {
- font-size:110%;
- font-weight:bold;
- color: #737373;
+
+ul.LC_TabContentBigger li b {
+ background: url('/adm/lonIcons/tabbgright.gif') no-repeat right bottom;
+ display: block;
+ float: left;
+ padding: 0 30px;
}
+ul.LC_TabContentBigger li:hover b,
+ul.LC_TabContentBigger li.active b {
+ background:url('/adm/lonIcons/tabbgright.gif') right top no-repeat;
+ color:$font;
+ border-bottom: 1px solid #FFFFFF;
+}
+
+
ul.LC_CourseBreadcrumbs {
background: $sidebg;
line-height: 32px;
@@ -6500,6 +6525,8 @@ $args - additional optional args support
inherit_jsmath -> when creating popup window in a page,
should it have jsmath forced on by the
current page
+ bread_crumbs -> Array containing breadcrumbs
+ bread_crumbs_components -> if exists show it as headline else show only the breadcrumbs
=back
@@ -7508,6 +7535,7 @@ sub user_picker {
# loncreateuser::print_user_query_page()
# has been completed.
next if ($option eq 'alc');
+ next if (($option eq 'crs') && ($env{'form.form'} eq 'requestcrs'));
next if ($option eq 'crs' && !$env{'request.course.id'});
if ($curr_selected{'srchin'} eq $option) {
$srchinsel .= '
@@ -7672,24 +7700,20 @@ $newuserscript
$new_user_create
-
-
END_BLOCK
+ $output .= &Apache::lonhtmlcommon::start_pick_box().
+ &Apache::lonhtmlcommon::row_title($lt{'doma'}).
+ $domform.
+ &Apache::lonhtmlcommon::row_closure().
+ &Apache::lonhtmlcommon::row_title($lt{'usr'}).
+ $srchbysel.
+ $srchtypesel.
+ ' '.
+ $srchinsel.
+ &Apache::lonhtmlcommon::row_closure(1).
+ &Apache::lonhtmlcommon::end_pick_box().
+ ' ';
return $output;
}
@@ -8606,7 +8630,7 @@ sub csv_print_select_table {
my ($value,$display,$defaultcol)=@{ $array_ref };
$r->print(&start_data_table_row().''.$display.' ');
- $r->print('print('');
$r->print(' ');
foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) {
@@ -9836,7 +9860,8 @@ sub check_clone {
$clonemsg = &mt('No new course created.').$linefeed.&mt('A new course could not be cloned from the specified original - [_1] - because it is a non-existent course.',$args->{'clonecourse'}.':'.$args->{'clonedomain'});
} else {
my %clonedesc = &Apache::lonnet::coursedescription($cloneid,{'one_time' => 1});
- if ($env{'request.role.domain'} eq $args->{'clonedomain'}) {
+ if (($env{'request.role.domain'} eq $args->{'clonedomain'}) &&
+ (&Apache::lonnet::allowed('ccc',$env{'request.role.domain'}))) {
$can_clone = 1;
} else {
my %clonehash = &Apache::lonnet::get('environment',['cloners'],
@@ -9864,7 +9889,7 @@ sub check_clone {
}
sub construct_course {
- my ($args,$logmsg,$courseid,$crsudom,$crsunum,$udom,$uname,$context) = @_;
+ my ($args,$logmsg,$courseid,$crsudom,$crsunum,$udom,$uname,$context,$cnum) = @_;
my $outcome;
my $linefeed = ' '."\n";
if ($context eq 'auto') {
@@ -9902,7 +9927,8 @@ sub construct_course {
$args->{'crscode'},
$args->{'ccuname'}.':'.
$args->{'ccdomain'},
- $args->{'crstype'});
+ $args->{'crstype'},
+ $cnum);
# Note: The testing routines depend on this being output; see
# Utils::Course. This needs to at least be output as a comment
@@ -10211,7 +10237,7 @@ sub group_term {
my $crstype = &course_type();
my %names = (
'Course' => 'group',
- 'Group' => 'team',
+ 'Community' => 'group',
);
return $names{$crstype};
}
@@ -10404,7 +10430,7 @@ sub init_user_environment {
&Apache::lonnet::usertools_access($username,$domain,$tool,'reload');
}
- foreach my $crstype ('official','unofficial') {
+ foreach my $crstype ('official','unofficial','community') {
$userenv{'canrequest.'.$crstype} =
&Apache::lonnet::usertools_access($username,$domain,$crstype,
'reload','requestcourses');