+
+
-
-
- Problems with errors |
-
-
+
+
-
+
+
+ Threshold Name |
+ Current value |
+ Change? |
+ ');
+ my $rowNum =0;
+ foreach my $type (@thresholditems) {
+ my $parameter = $env{'request.course.id'}.':threshold_'.$type;
+# onchange is javascript to automatically check the 'Set' button.
+ my $onchange = 'onFocus="javascript:window.document.forms'.
+ "['thresholdform'].elements['".$parameter."_setparmval']".
+ '.checked=true;"';
+ if ($rowNum %2 == 1) {
+ $rowColor = $rowColor1;
+ } else {
+ $rowColor = $rowColor2;
+ }
+ $r->print('
+
+ '.$threshold_titles{$type}.' |
+ '.&Apache::lonhtmlcommon::textbox($parameter.'_value',
+ $threshold{$type},
+ 10,$onchange).' |
+ '
+ .&Apache::lonhtmlcommon::checkbox($parameter.'_setparmval').
+ ' |
+ ');
+ $rowNum ++;
+ }
+ $r->print(' |
+
+
+
+ ');
+}
+
+#-------------------------------
+# display_interval_config
+#
+# Display the interval setting screen
+#
+#-------------------------------
+
+sub display_interval_config {
+ my ($r,$refpage,$interval_titles) = @_;
+ my $current = &get_current($env{'user.name'},$env{'user.domain'},
+ $env{'request.course.id'},'interval');
+ $r->print(' '.&mt('Choose the time window to use for display of version changes for resources in the course.'));
+ unless ($current eq '') {
+ $r->print(' '.&mt('Current value is [_1]',''.
+ $$interval_titles{$current}.'.'));
+ }
+ $r->print('
+');
+ return;
+}
+
+#----------------------------------------------
+# display_discussion_config
+#
+# Display the discussion display setting screen
+#
+#----------------------------------------------
+
+sub display_discussion_config {
+ my ($r,$refpage) = @_;
+ my $current = &get_current($env{'user.name'},$env{'user.domain'},
+ $env{'request.course.id'},'countunread');
+ if ($current eq '') {
+ $current = 'on';
+ }
+ my %status = (
+ on => 'checked="checked"',
+ off => 'checked="checked"',
+ );
+ $status{$current} = '';
+ $r->print(' '.&mt('Choose whether or not to display a count of the number of new posts for each resource or bulletin board which has unread posts.').' '.&mt('This can increase the time taken to gather data for the [_1] page by a few seconds.',"What's New?").' '.&mt('Currently set to [_1] .'),"$current.");
+ $r->print('
+');
+ return;
+}
+
+#---------------------------------------------------
+# courseinit_config
+#
+# Set page displayed when course loads after
+# selecting a role in the course from the roles page.
+#
+#---------------------------------------------------
+
+sub courseinit_config {
+ my ($r,$refpage,$initpage) = @_;
+ my ($control,$current) = &curr_courseinit();
+ my @chgstate = ('userpref','coursespecific');
+ my @chgentry = ('firstres','whatsnew');
+ my %lt = &Apache::lonlocal::texthash(
+ 'chwp' => 'Choose which page will be displayed when you enter this course after selecting a role.',
+ 'cuva' => 'Current value is determined by',
+ 'anis' => 'and is set to display',
+ 'padc' => 'Page display controlled by',
+ 'chce' => 'Choose course entry',
+ 'moce' => 'Modify course entry',
+ );
+ $r->print(<<"END");
+ $lt{'chwp'}
+ $lt{'cuva'}:
+$$initpage{$control} $lt{'anis'}
+$$initpage{$current}.
+');
+ return;
+}
+
+sub curr_courseinit {
+ my $current = &get_current($env{'user.name'},$env{'user.domain'},
+ $env{'request.course.id'},'courseinit');
+ my $control;
+ if ($current) {
+ $control = 'coursespecific';
+ } else {
+ $control = 'userpref';
+ my %userenv = &Apache::lonnet::get('environment',
+ ['course_init_display']);
+ if (exists($userenv{'course_init_display'})) {
+ $current = $userenv{'course_init_display'};
+ }
+ unless ($current) {
+ $current = 'whatsnew';
+ }
+ }
+ return ($control,$current);
+}
+
+sub display_launcher {
+ my ($r,$action,$refpage,$checkallowed,$tabbg,$rowColor1,$rowColor2,$show,
+ $headings,$res_title,$tograde,$ungraded,$bombs,$bombed,$changed,
+ $warnings,$triggered,$newdiscussions,$unread,$msgcount,$newmsgs,
+ $critmsgcount,$critmsgs,$interval,$countunread) = @_;
+
+ if ($$checkallowed{$action}) {
+ &start_box($r,$tabbg,$show,$headings,$action,$refpage);
+ if ($$show{$action}) {
+ if ($action eq 'handgrading') { # UNGRADED ITEMS
+ &display_handgrade($r,$tograde,$rowColor1,$rowColor2,
+ $ungraded);
+ } elsif ($action eq 'haserrors') { # BOMBS
+ &display_haserrors($r,$bombs,$rowColor1,$rowColor2,$bombed,
+ $res_title);
+ } elsif ($action eq 'versionchanges') { # VERSION CHANGES
+ &display_versionchanges($r,$changed,$res_title,$rowColor1,
+ $rowColor2,$interval);
+
+ } elsif ($action eq 'abovethreshold') { # DEGDIFF/AV. TRIES TRIGGERS
+ &display_abovethreshold($r,$refpage,$warnings,$triggered,
+ $res_title,$rowColor1,$rowColor2);
+ } elsif ($action eq 'coursediscussion') { # UNREAD COURSE DISCUSSION
+ &display_coursediscussion($r,$newdiscussions,$unread,
+ $countunread,$res_title,$rowColor1,$rowColor2);
+ } elsif ($action eq 'coursenormalmail') { # NORMAL MESSAGES
+ &display_coursenormalmail($r,$msgcount,$newmsgs,$rowColor1,
+ $rowColor2);
+ } elsif ($action eq 'coursecritmail') { # CRITICAL MESSAGES
+ &display_coursecritmail($r,$critmsgcount,$critmsgs,$rowColor1,
+ $rowColor2);
}
- $r->print(' '.$bombed{$bomb}{errorlink}.' | ');
- $bombnum ++;
}
- } else {
- $r->print(' No problems with errors
| ');
+ &end_box($r);
}
- $r->print(' | ');
- $r->print('
- |