[prev in list] [next in list] [prev in thread] [next in thread]
List: lon-capa-cvs
Subject: [LON-CAPA-cvs] cvs: loncom(GCI_3) /interface lonfeedback.pm
From: raeburn <raeburn () source ! lon-capa ! org>
Date: 2010-06-19 19:06:42
Message-ID: cvsraeburn1276974402 () cvsserver
[Download RAW message or body]
raeburn Sat Jun 19 19:06:42 2010 EDT
Modified files: (Branch: GCI_3)
/loncom/interface lonfeedback.pm
Log:
- Backport 1.294 for GCI_3.
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.282 loncom/interface/lonfeedback.pm:1.282.2.1
--- loncom/interface/lonfeedback.pm:1.282 Tue Dec 8 13:33:12 2009
+++ loncom/interface/lonfeedback.pm Sat Jun 19 19:06:42 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.282 2009/12/08 13:33:12 wenzelju Exp $
+# $Id: lonfeedback.pm,v 1.282.2.1 2010/06/19 19:06:42 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -48,15 +48,24 @@
sub discussion_open {
my ($status,$symb)=@_;
+# Advanced roles can always discuss
if ($env{'request.role.adv'}) { return 1; }
+# Get discussion closing date
+ my $close=&Apache::lonnet::EXT('resource.0.discussend',$symb);
+# If it is defined and in the future, the instructor wants this discussion to be open
+ if (defined($close) && $close ne '' && $close > time) {
+ return 1;
+ }
+# It was not explicitly open, check if the problem is available.
+# If the problem is not available, close the discussion
if (defined($status) &&
- !($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER'
- || $status eq 'OPEN')) {
- return 0;
+ !($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER'
+ || $status eq 'OPEN')) {
+ return 0;
}
- my $close=&Apache::lonnet::EXT('resource.0.discussend',$symb);
+# The problem is available, but check if the instructor explictly closed discussion
if (defined($close) && $close ne '' && $close < time) {
- return 0;
+ return 0;
}
return 1;
}
_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic