Commit e105d8aa authored by Gold's avatar Gold
Browse files

Bug 1895066

Draft peer assessment needs additional indicator besides colour

Added a 'draft' string to "view" and used that in the template.
Updated the 'draft' string in "blocktype.peerassessment/peerassessment"
to 'savedraft' to prevent confusion.
Added 'pubstatus' to the item if it is private and set this to Draft.
Added pubstatus to the template if set to private. Style for this
replicates the private status on Bug 1912414.

Change-Id: I9cb0b20f9e00536e3162c3f83583b4877a6913a9
parent b6fae32d
......@@ -17,7 +17,7 @@ $string['blockcontent'] = 'Instructions';
$string['nopeerassessment'] = 'No assessment feedback';
$string['addpeerassessment'] = 'Add peer assessment';
$string['instructions'] = 'Instructions';
$string['draft'] = 'Save draft';
$string['savedraft'] = 'Save draft';
$string['publish'] = 'Publish';
$string['savepublishhelp'] = '<p><strong>Save draft:</strong> Only you can view it. While your assessment is in draft status, you can make changes.</p>
<p><strong>Publish:</strong> The person for whom you are giving the peer assessment can see your assessment. Everybody else who has access to the portfolio can view it as well, unless the portfolio also contains the sign-off block and is not signed off by the portfolio owner. You cannot revert a published assessment to draft status.</p>';
......@@ -650,6 +650,7 @@ class ArtefactTypePeerassessment extends ArtefactType {
if ($item->private) {
$item->pubmessage = get_string('thisassessmentisprivate', 'artefact.peerassessment');
$item->pubstatus = get_string('draft', 'view');
}
if (isset($data->showcomment) && $data->showcomment == $item->id) {
......@@ -793,7 +794,7 @@ class ArtefactTypePeerassessment extends ArtefactType {
'classes' => array('draftsubmit' => 'btn-secondary',
'submit' => 'btn-secondary',
'cancel' => 'btn-secondary submitcancel'),
'value' => array('draftsubmit' => get_string('draft', 'blocktype.peerassessment/peerassessment'),
'value' => array('draftsubmit' => get_string('savedraft', 'blocktype.peerassessment/peerassessment'),
'submit' => get_string('publish', 'blocktype.peerassessment/peerassessment'),
'cancel' => get_string('cancel'))
);
......
......@@ -369,6 +369,7 @@ $string['blocktypecategorydesc.general'] = 'Click for general options';
$string['blocktypecategorydesc.internal'] = 'Click for personal info options';
$string['blocktypecategorydesc.blog'] = 'Click for journal options';
$string['draft'] = 'Draft';
$string['drafttextblockdescription'] = 'Save the block as draft if you don\'t want the text to be visible to anybody. Once the text is published, it can\'t be set to draft again.';
$string['notitle'] = 'No title';
......
......@@ -48,6 +48,11 @@
{/if}
</div>
</div>
{if $item->private}
<div class="comment-privacy metadata">
<em class="privatemessage"> {$item->pubstatus} </em>
</div>
{/if}
</div>
{/foreach}
</div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment