Commit 11c5bc57 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Gerrit Code Review
Browse files

Merge "Bug 1795268: Altering name of lti submission"

parents 80ac04f9 77cc6eff
...@@ -95,8 +95,10 @@ $string['portfolios'] = 'portfolios'; ...@@ -95,8 +95,10 @@ $string['portfolios'] = 'portfolios';
$string['Viewscollections'] = 'Pages and collections'; $string['Viewscollections'] = 'Pages and collections';
$string['viewsubmittedtogroup'] = 'This page has been submitted to <a href="%s">%s</a>.'; $string['viewsubmittedtogroup'] = 'This page has been submitted to <a href="%s">%s</a>.';
$string['viewsubmittedtogroupon'] = 'This page was submitted to <a href="%s">%s</a> on %s.'; $string['viewsubmittedtogroupon'] = 'This page was submitted to <a href="%s">%s</a> on %s.';
$string['viewsubmittedtogroupgrade'] = 'This portfolio was submitted to the assignment <a href="%s">"%s"</a> in "%s" on %s.';
$string['collectionsubmittedtogroup'] = 'This collection has been submitted to <a href="%s">%s</a>.'; $string['collectionsubmittedtogroup'] = 'This collection has been submitted to <a href="%s">%s</a>.';
$string['collectionsubmittedtogroupon'] = 'This collection was submitted to <a href="%s">%s</a> on %s.'; $string['collectionsubmittedtogroupon'] = 'This collection was submitted to <a href="%s">%s</a> on %s.';
$string['collectionsubmittedtogroupgrade'] = 'This collection was submitted to the assignment <a href="%s">"%s"</a> in "%s" on %s.';
$string['submittedpendingrelease'] = 'Pending release after archiving.'; $string['submittedpendingrelease'] = 'Pending release after archiving.';
$string['nobodycanseethisview2'] = 'Only you can see this page.'; $string['nobodycanseethisview2'] = 'Only you can see this page.';
$string['noviews1'] = 'No pages or collections.'; $string['noviews1'] = 'No pages or collections.';
......
<!-- @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later --> <!-- @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later -->
<!-- @copyright For copyright information on Mahara, please see the README file distributed with this software. --> <!-- @copyright For copyright information on Mahara, please see the README file distributed with this software. -->
<h3>Grade</h3> <h3>Grade</h3>
<p>Please select a grade from 0 - 100.</p> <p>Please select a grade between 0 and 100.</p>
<p>Once you submit the grade, you cannot change it anymore. It will be transferred to the grade book in your learning management system.</p>
...@@ -31,7 +31,7 @@ $string['gradedby'] = 'Graded by'; ...@@ -31,7 +31,7 @@ $string['gradedby'] = 'Graded by';
$string['gradereceived'] = 'You were awarded a grade of %s out of 100 by %s at %s'; $string['gradereceived'] = 'You were awarded a grade of %s out of 100 by %s at %s';
$string['gradesubmissions'] = 'Submissions for grading'; $string['gradesubmissions'] = 'Submissions for grading';
$string['gradesubmitted'] = 'Grade successfully submitted'; $string['gradesubmitted'] = 'Grade successfully submitted';
$string['groupname'] = 'Assessment submissions for "%s" - "%s"'; $string['groupname'] = '"%s" - "%s"';
$string['institutiondenied'] = 'Access to "%s" is denied. Please contact your institution administrator.'; $string['institutiondenied'] = 'Access to "%s" is denied. Please contact your institution administrator.';
$string['lock'] = 'Keep portfolio locked after grading'; $string['lock'] = 'Keep portfolio locked after grading';
$string['lockdescription'] = 'Users make changes to their portfolio after it has been graded.'; $string['lockdescription'] = 'Users make changes to their portfolio after it has been graded.';
......
...@@ -146,7 +146,13 @@ if ($USER->is_logged_in() && $submittedgroup && group_user_can_assess_submitted_ ...@@ -146,7 +146,13 @@ if ($USER->is_logged_in() && $submittedgroup && group_user_can_assess_submitted_
$releasecollection = !empty($collection) && $collection->get('submittedgroup') == $submittedgroup->id && empty($ltigradeform); $releasecollection = !empty($collection) && $collection->get('submittedgroup') == $submittedgroup->id && empty($ltigradeform);
if ($releasecollection) { if ($releasecollection) {
if ($ctime = $collection->get('submittedtime')) { if ($ltigradeform && $ctime = $collection->get('submittedtime')) {
preg_match("/^.*?\"(.*?)\" - \"(.*?)\"/", $submittedgroup->name, $matches);
$lticoursename = hsc($matches[1]);
$ltiassignmentname = hsc($matches[2]);
$text = get_string('collectionsubmittedtogroupgrade', 'view', group_homepage_url($submittedgroup), $ltiassignmentname, $lticoursename, format_date(strtotime($ctime)));
}
else if ($ctime = $collection->get('submittedtime')) {
$text = get_string( $text = get_string(
'collectionsubmittedtogroupon', 'view', group_homepage_url($submittedgroup), hsc($submittedgroup->name), 'collectionsubmittedtogroupon', 'view', group_homepage_url($submittedgroup), hsc($submittedgroup->name),
format_date(strtotime($ctime)) format_date(strtotime($ctime))
...@@ -156,6 +162,12 @@ if ($USER->is_logged_in() && $submittedgroup && group_user_can_assess_submitted_ ...@@ -156,6 +162,12 @@ if ($USER->is_logged_in() && $submittedgroup && group_user_can_assess_submitted_
$text = get_string('collectionsubmittedtogroup', 'view', group_homepage_url($submittedgroup), hsc($submittedgroup->name)); $text = get_string('collectionsubmittedtogroup', 'view', group_homepage_url($submittedgroup), hsc($submittedgroup->name));
} }
} }
else if ($ltigradeform && $view->get('submittedtime')) {
preg_match("/^.*?\"(.*?)\" - \"(.*?)\"/", $submittedgroup->name, $matches);
$lticoursename = hsc($matches[1]);
$ltiassignmentname = hsc($matches[2]);
$text = get_string('viewsubmittedtogroupgrade', 'view', group_homepage_url($submittedgroup), $ltiassignmentname, $lticoursename, format_date(strtotime($view->get('submittedtime'))));
}
else if ($view->get('submittedtime')) { else if ($view->get('submittedtime')) {
$text = get_string('viewsubmittedtogroupon', 'view', group_homepage_url($submittedgroup), hsc($submittedgroup->name), format_date(strtotime($view->get('submittedtime')))); $text = get_string('viewsubmittedtogroupon', 'view', group_homepage_url($submittedgroup), hsc($submittedgroup->name), format_date(strtotime($view->get('submittedtime'))));
} }
...@@ -184,6 +196,9 @@ if ($USER->is_logged_in() && $submittedgroup && group_user_can_assess_submitted_ ...@@ -184,6 +196,9 @@ if ($USER->is_logged_in() && $submittedgroup && group_user_can_assess_submitted_
), ),
)); ));
} }
else if ($ltigradeform) {
$releaseform = $text;
}
else { else {
$releaseform = $text . ' ' . get_string('submittedpendingrelease', 'view'); $releaseform = $text . ' ' . get_string('submittedpendingrelease', 'view');
} }
......
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