-
-
-
-
-
-
-
-
-
-
-
- |
-
-
- |
-
-
-
- 
- |
-
-
-
-
-
- E-mail address:
- |
-
-
- |
-
-
- |
-
-
-
- 
- |
-
-
-
-
-
- username/domain:
- |
-
-
- |
-
-
-
-
-END
- my $udom_input = '';
- my $uname_input = '';
- if (defined($uname) && defined($udom)) {
- $r->print('username: '.$uname.' domain: '.$udom.$udom_input.$uname_input);
- } else {
- my $udomform = '';
- my $unameform = '';
- if (defined($udom)) {
- $udomform = 'domain: '.$udom.$udom_input;
- } elsif (defined($uname)) {
- $unameform = 'username: '.$uname.' '.$uname_input;
- }
- if ($udomform eq '') {
- $udomform = 'domain: ';
- $udomform .= &Apache::loncommon::select_dom_form($codedom,'udom');
- }
- if ($unameform eq '') {
- $unameform= 'username: ';
+ $output .= &Apache::lonhtmlcommon::row_closure();
+ $num ++;
+ $i = $num%2;
+ if ($knownuser) {
+ if ($homeserver) {
+ my $ip = &Apache::lonnet::get_requestor_ip($r);
+ my %setters;
+ my ($startblock,$endblock,$triggerblock,$by_ip,$blockdom) =
+ &Apache::loncommon::blockcheck(\%setters,'com',$ip);
+ unless (($helpform{'cc'} eq 'no') || ($by_ip)) {
+ $output .= &Apache::lonhtmlcommon::row_title('',
+ undef,$css[$i]).
+ ' '."\n".
+ &Apache::lonhtmlcommon::row_closure();
+ $num ++;
+ $i = $num%2;
+ }
}
- $r->print($unameform.$udomform.' Enter the username you use to log-in to your LON-CAPA system, and choose your domain.');
}
- $r->print(<
- |
-
- |
-
-
-
- 
- |
-
-
-
-
- |
-
-
- |
-
-
-
- 
- |
-
-
-
-
- |
-
-
- |
-
-
-
- 
- |
-
-
-
-
-
- Course Details:$details_title
- |
-
-
- |
-
-
-
-
-END
- if ($cnum) {
- if ($coursecodes{$cnum}) {
- foreach (@codetitles) {
- $r->print(''.$_.': '.$codes{$cnum}{$_}.'; ');
- }
- $r->print(' ');
+ unless (($helpform{'user'} eq 'no') || ($env{'request.lti.login'})) {
+ $output .= &Apache::lonhtmlcommon::row_title("$html_lt{'unme'}/$html_lt{'doma'}",undef,$css[$i]);
+ my $udom_input = '&').'" />'."\n";
+ my $uname_input = '&').'" />'."\n";
+ if ($knownuser) {
+ $output .= ''.$html_lt{'unme'}
+ .': '.$uname.' '
+ .$html_lt{'doma'}.': '.$udom.$udom_input.$uname_input.'';
} else {
- $r->print('Enter institutional course code:
- ');
+ my $udomform = '';
+ my $unameform = '';
+ if (($env{'user.domain'} =~ /^$match_domain$/) && (!$public)) {
+ $output .= $html_lt{'entu'};
+ } elsif (($env{'user.name'} =~ /^$match_username$/) && (!$public)) {
+ $output .= $html_lt{'chdo'};
+ } else {
+ $output .= $html_lt{'entr'};
+ }
+ $output .= ' '."\n";
+ if (!$public) {
+ if ($env{'user.domain'} =~ /^$match_domain$/) {
+ $udomform = ''.$html_lt{'doma'}.': '.$udom.$udom_input;
+ } elsif ($env{'user.name'} =~ /^$match_username$/) {
+ $unameform = ''.$html_lt{'unme'}.': '.$uname.' '.$uname_input;
+ }
+ }
+ if ($udomform eq '') {
+ $udomform = ': '
+ .&Apache::loncommon::select_dom_form($codedom,'udom','','','','','','','udom')."\n";
+ }
+ if ($unameform eq '') {
+ $unameform= ': '
+ .''
+ .' ';
+ }
+ $output .= $unameform.$udomform;
}
- } else {
+ $output .= &Apache::lonhtmlcommon::row_closure();
+ $num ++;
+ $i = $num%2;
+ }
+ unless ($env{'request.lti.login'}) {
+ $output .= &Apache::lonhtmlcommon::row_title("$html_lt{'urlp'}",undef,$css[$i]).
+ $server."\n".'&').'" />'."\n".
+ &Apache::lonhtmlcommon::row_closure();
+ }
+ unless ($helpform{'phone'} eq 'no') {
+ my ($reqd,$aria_reqd);
+ if ($helpform{'phone'} eq 'req') {
+ $reqd = '*';
+ $aria_reqd = 'aria-required="true" ';
+ }
+ $output .= &Apache::lonhtmlcommon::row_title(''.$reqd,undef,'LC_evenrow_value').
+ ' '."\n".
+ &Apache::lonhtmlcommon::row_closure();
+ $num ++;
+ $i = $num%2;
+ }
+ unless (($helpform{'course'} eq 'no') || ($env{'request.lti.login'})) {
+ $output .= &Apache::lonhtmlcommon::row_title("$html_lt{'crsd'}$details_title",undef,$css[$i]);
if ($totcodes > 0) {
my $numtitles = @codetitles;
if ($numtitles == 0) {
- $r->print('Enter institutional course code:
- ');
+ $output .= ''."\n";
} else {
+ my @standardnames = &Apache::loncommon::get_standard_codeitems();
my $lasttitle = $numtitles;
if ($numtitles > 4) {
$lasttitle = 4;
- }
- $r->print(''.$codetitles[0].' '."\n".
- ' | ';
if ($numtitles > 4) {
- $r->print('
'.$codetitles[$numtitles].' '."\n".
- ''."\n".
- ''."\n".
- ''."\n");
+ $output .= '
'."\n";
}
}
} else {
- $r->print('Enter institutional course code:
- ');
+ $output .= ''."\n";
}
- }
- if ($ctitle) {
- $r->print(' Title: '.$ctitle.'');
- } else {
- $r->print(' Enter course title:
- ');
- }
- $r->print(<
- |
-
- |
-
-
-
- 
- |
-
-
-
-
-
- Section Number:
- |
-
-
- |
-
-
-
-
-END
- if ($sectionlist) {
- $r->print("".
- " \n");
- foreach (sort keys %groupid) {
- if ($_ eq $groupid{$_} || $groupid{$_} eq '') {
- $r->print(" \n");
- } else {
- $r->print(" \n");
+ my ($reqd,$aria_reqd);
+ if ($helpform{'course'} eq 'req') {
+ $reqd = '*';
+ $aria_reqd = 'aria-required="true" ';
+ }
+ $output .= ' '."\n";
+ $output .= &Apache::lonhtmlcommon::row_closure();
+ $num ++;
+ $i = $num%2;
+ }
+ unless (($helpform{'section'} eq 'no') || ($env{'request.lti.login'})) {
+ $output .= &Apache::lonhtmlcommon::row_title('',
+ undef,$css[$i]);
+ if ($sectionlist) {
+ $output .= "\n".
+ "\n".
+ " \n";
+ foreach my $id (sort(keys(%groupid))) {
+ if ($id eq $groupid{$id} || $groupid{$id} eq '') {
+ $output .= " \n";
+ } else {
+ $output .= " \n";
+ }
+ }
+ $output .= ' '."\n".
+ ''.
+ ' '."\n";
+ } else {
+ $output .= ''."\n";
+ }
+ $output .= &Apache::lonhtmlcommon::row_closure();
+ $num ++;
+ $i = $num%2;
+ }
+ $output .= &Apache::lonhtmlcommon::row_title(
+ ''.
+ ''.
+ '*'
+ ,undef,'LC_oddrow_value').
+ ''."\n".
+ &Apache::lonhtmlcommon::row_closure().
+ &Apache::lonhtmlcommon::row_title(
+ ''.
+ ''.
+ '*'
+ ,undef,'LC_evenrow_value').
+ ''."\n".
+ &Apache::lonhtmlcommon::row_closure();
+ $num ++;
+ $i = $num%2;
+ if ($knownuser) {
+ if ($homeserver) {
+ unless ($helpform{'screenshot'} eq 'no') {
+ my $max = 1048576;
+ my $showmax = 1.00;
+ if ($helpform{'maxsize'} =~ /^\d+\.\d*$/) {
+ $max *= $helpform{'maxsize'};
+ $showmax = $helpform{'maxsize'};
+ }
+ $showmax = ' ('.sprintf("%.2f",$showmax).' '.&mt('MB max.').')';
+ $output .= &Apache::lonhtmlcommon::row_title($html_lt{'opfi'},undef,$css[$i])
+ .''
+ .''
+ .' '."\n".''.$showmax."\n"
+ .&Apache::lonhtmlcommon::row_closure();
+ $num ++;
+ $i = $num%2;
}
}
- $r->print("");
} else {
- $r->print("");
- }
- $r->print(<
- |
-
- |
-
-
-
- 
- |
-
-
-
-
- |
-
-
- |
-
-
-
- 
- |
-
-
-
-
-
- Detailed description:
- |
-
-
- |
-
-
- |
-
-
-
- 
- |
-
-END
- if (defined($env{'user.name'})) {
- $r->print(<
-
-
-
- Optional file upload:
- |
-
-
- |
-
-
- |
-
-
-
- 
- |
-
+ if ($captcha_form) {
+ $output .= &Apache::lonhtmlcommon::row_title(
+ ''.
+ &mt('Validation').
+ '*'
+ ,undef,$css[$i]).
+ $captcha_form."\n".
+ &Apache::lonhtmlcommon::row_closure();
+ $num ++;
+ $i = $num%2;
+ }
+ }
+ $output .= &Apache::lonhtmlcommon::row_title($html_lt{'fini'},undef,$css[$i]);
+ $output .= <
+
+
+
+
+
+
+
+
+
END
- }
+ $output .= &Apache::lonhtmlcommon::row_closure(1);
+ $output .= &Apache::lonhtmlcommon::end_pick_box();
$r->print(<
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-