From ebce7362d8045fe0d0e6fc28de8c7d9fcd0c74b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Rodr=C3=ADguez?= Date: Sat, 11 Aug 2018 17:27:00 +0100 Subject: [PATCH] Fixes error when showing example setting --- vpl.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vpl.class.php b/vpl.class.php index c446e116..10d824d6 100644 --- a/vpl.class.php +++ b/vpl.class.php @@ -1796,13 +1796,13 @@ public function print_submission_restriction() { } else { $this->print_restriction( 'worktype', $values [$worktype] ); } + $stryes = get_string( 'yes' ); + $strno = get_string( 'no' ); if ($instance->example) { - $this->print_restriction( 'isexample', $stryes ); + $this->print_restriction( 'isexample', $stryes); } $grader = $this->has_capability( VPL_GRADE_CAPABILITY ); if ($grader) { - $stryes = get_string( 'yes' ); - $strno = get_string( 'no' ); require_once($CFG->libdir . '/gradelib.php'); if ($gie = $this->get_grade_info()) { if ($gie->scaleid == 0) {