Permalink
Browse files

MDL-33414: The setting $showviewlink needs to be passed by reference

This was preventing the view full submission/feedback link from appearing
everywhere in the assignment when the submission/feedback content had been
truncated in the summary because it was too long (or too many files)
  • Loading branch information...
Damyon Wiese
Damyon Wiese committed May 30, 2012
1 parent 4631e39 commit 7ee1548acbf5ffa4431ced434e2bdc93937178f7
@@ -344,7 +344,7 @@ public function view(stdClass $submissionorgrade) {
* @param bool $showviewlink Modifed to return whether or not to show a link to the full submission/feedback
* @return string - return a string representation of the submission in full
*/
- public function view_summary(stdClass $submissionorgrade, $showviewlink) {
+ public function view_summary(stdClass $submissionorgrade, & $showviewlink) {
return '';
}
@@ -105,7 +105,7 @@ public function save(stdClass $grade, stdClass $data) {
* @param bool $showviewlink Set to true to show a link to view the full feedback
* @return string
*/
- public function view_summary(stdClass $grade, $showviewlink) {
+ public function view_summary(stdClass $grade, & $showviewlink) {
$feedbackcomments = $this->get_feedback_comments($grade->id);
if ($feedbackcomments) {
$text = format_text($feedbackcomments->commenttext, $feedbackcomments->commentformat, array('context' => $this->assignment->get_context()));
@@ -146,7 +146,7 @@ public function save(stdClass $grade, stdClass $data) {
* @param bool $showviewlink - Set to true to show a link to see the full list of files
* @return string
*/
- public function view_summary(stdClass $grade, $showviewlink) {
+ public function view_summary(stdClass $grade, & $showviewlink) {
$count = $this->count_files($grade->id, ASSIGNFEEDBACK_FILE_FILEAREA);
// show a view all link if the number of files is over this limit
$showviewlink = $count > ASSIGNFEEDBACK_FILE_MAXSUMMARYFILES;
@@ -53,7 +53,7 @@ public function get_name() {
* @param bool $showviewlink - If the comments are long this is set to true so they can be shown in a separate page
* @return string
*/
- public function view_summary(stdClass $submission, $showviewlink) {
+ public function view_summary(stdClass $submission, & $showviewlink) {
// never show a link to view full submission
$showviewlink = false;
@@ -244,7 +244,7 @@ public function get_files(stdClass $submission) {
* @param bool $showviewlink Set this to true if the list of files is long
* @return string
*/
- public function view_summary(stdClass $submission, $showviewlink) {
+ public function view_summary(stdClass $submission, & $showviewlink) {
$count = $this->count_files($submission->id, ASSIGNSUBMISSION_FILE_FILEAREA);
// show we show a link to view all files for this plugin?
@@ -192,7 +192,7 @@ public function get_editor_format($name, $submissionid) {
* @param bool $showviewlink - If the summary has been truncated set this to true
* @return string
*/
- public function view_summary(stdClass $submission, $showviewlink) {
+ public function view_summary(stdClass $submission, & $showviewlink) {
$onlinetextsubmission = $this->get_onlinetext_submission($submission->id);
// always show the view link

0 comments on commit 7ee1548

Please sign in to comment.