diff --git a/vpl.class.php b/vpl.class.php
index 23b172f6..268847db 100644
--- a/vpl.class.php
+++ b/vpl.class.php
@@ -1775,11 +1775,6 @@ public function str_restriction($str, $value = null, $raw = false, $comp = 'mod_
if ($value === null) {
$value = $this->instance->$str;
}
- if ($str == 'password') {
- $infohs = new mod_vpl\util\hide_show();
- $value .= $infohs->generate();
- $value .= $infohs->content_in_span(s($this->get_instance()->password));
- }
$html .= $value;
return $html;
}
@@ -1902,8 +1897,13 @@ public function str_submission_restriction($userid = null) {
}
$html .= $this->str_gradereduction($userid);
if ($grader) {
- if (trim( $instance->password ) > '') {
- $html .= $this->str_restriction_with_icon( 'password', $stryes, false, true, 'moodle' );
+ $password = trim($this->get_effective_setting('password'));
+ if ($password) {
+ $html .= $this->str_restriction_with_icon( 'password', $stryes, false, false, 'moodle');
+ $infohs = new mod_vpl\util\hide_show();
+ $html .= $infohs->generate();
+ $html .= $infohs->content_in_span(s($password));
+ $html .= "
\n";
}
if (trim( $instance->requirednet ) > '') {
$html .= $this->str_restriction_with_icon( 'requirednet', s( $instance->requirednet ));
@@ -1912,7 +1912,11 @@ public function str_submission_restriction($userid = null) {
$html .= $this->str_restriction_with_icon('sebrequired', $stryes );
}
if (trim( $instance->sebkeys ) > '') {
- $html .= $this->str_restriction_with_icon('sebkeys', $stryes );
+ $html .= $this->str_restriction_with_icon('sebkeys', $stryes, false, false);
+ $infohs = new mod_vpl\util\hide_show();
+ $html .= $infohs->generate();
+ $html .= $infohs->content_in_div(nl2br(s($instance->sebkeys)));
+ $html .= "
\n";
}
if ($instance->restrictededitor) {
$html .= $this->str_restriction_with_icon( 'restrictededitor', $stryes );