');
+#-------------------------------
+# display_threshold_config
+#
+# Display the threshold setting screen
+#
+#-------------------------------
+
+sub display_threshold_config {
+ my ($r,$refpage,$tabbg,$threshold_titles,$cdom,$crs) = @_;
+ my $uname = $env{'user.name'};
+ my $udom = $env{'user.dom'};
+ my $cid = $env{'request.course.id'};
+ my %threshold = ();
+ my $rowColor1 = "#ffffff";
+ my $rowColor2 = "#eeeeee";
+ my $rowColor;
-## MESSAGES ##
- $r->print(<
+ my @thresholditems = ("av_attempts","degdiff","numstudents");
+ foreach my $item (@thresholditems) {
+ $threshold{$item} = '';
+ }
+ my %threshold_titles = &Apache::lonlocal::texthash(
+ av_attempts => 'Average number of attempts',
+ degdiff => 'Degree of difficulty',
+ numstudents => 'Total number of students with submissions',
+ );
+ &get_curr_thresholds(\%threshold,$uname,$udom,$cid,$cdom,$crs);
+
+ $r->print(' ');
+ return;
+}
- $r->print(<
-
-
-
-
-
New critical messages in course
-
-
-
+#----------------------------------------------
+# 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}.