You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update permissions for viewing info on ProblemSet page.
Rework when a user is able to see set information on the ProblemSet
page. This includes being able to see the set description and
information header before a set is open.
The goal is to make the ProblemSet page friendlier when a student
accesses it from an LMS before the open date or if the set is not
currently visible. In addition the set headers can be used to
provide information to students before the set opens.
This is done by adding a new permission `view_unoppend_set_info`
which defaults to `guest` (this allows instructors to change this to
`ta` to get the old behavior). Users with this permission will be
shown a ProblemSet page that includes when the set opens along with
the set information header and a button to email the instructor
before the open date. In addition users with this permission
will be shown a warning alert instead of a danger alert if they
try to access a hidden set (the set header will not be included
in this case).
Note, that the permission `view_unoppend_sets` description in
the course configuration is just being able to view problems
on sets which are not open, so this new permission is consistent
with the previous description, it just separates seeing set info
from seeing set problems.
Care is taken to ensure that students can view (thus access)
any existing test versions for tests that have ip restrictions,
or if the template open date was changed.
Only show the right info panel div on the ProblemSet page when
the set header exists and the user has permissions to see it.
Translations were added to messages about IP restrictions.
# If LTI grade passback is enabled and set to 'homework' mode then we need to make sure that there is a sourcedid
480
486
# for this set before students access it.
@@ -530,7 +536,9 @@ sub invalidIPAddress {
530
536
# if there are no addresses in the locations, return an error that
531
537
# says this
532
538
return$c->maketext(
533
-
"Client ip address [_1] is not allowed to work this assignment, because the assignment has ip address restrictions and there are no allowed locations associated with the restriction. Contact your professor to have this problem resolved.",
539
+
'Client ip address [_1] is not allowed to work this assignment, because the assignment has ip address '
540
+
. 'restrictions and there are no allowed locations associated with the restriction. Contact your '
541
+
. 'professor to have this problem resolved.',
534
542
$clientIP->ip()
535
543
) if (!@restrictAddresses);
536
544
@@ -552,17 +560,13 @@ sub invalidIPAddress {
552
560
# this is slightly complicated by having to check relax_restrict_ip
553
561
my$badIP = '';
554
562
if ($restrictTypeeq'RestrictTo' && !$inRestrict) {
555
-
$badIP =
556
-
"Client ip address "
557
-
. $clientIP->ip()
558
-
. " is not in the list of addresses from "
559
-
. "which this assignment may be worked.";
563
+
$badIP = $c->maketext(
564
+
'Client ip address [_1] is not in the list of addresses from which this assignment may be worked.',
0 commit comments