Skip to content

Commit

Permalink
SAK-47170 Assignments > Students see stack trace on assignments and s…
Browse files Browse the repository at this point in the history
…ubmissions with attachments if read resources permission is removed (sakaiproject#10433)
  • Loading branch information
plukasew authored Apr 22, 2022
1 parent afb98ae commit c59d7c1
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@
#if ($reference)
#set ($props = false)
#set ($props = $reference.Properties)
#if ($!props)
#if ($!props && !$!props.isEmpty())
<li>
#if ($props.getBooleanProperty($props.NamePropIsCollection))
<img src = "#imageLink($contentTypeImageService.getContentTypeImage("folder"))" border="0" alt="$tlang.getString("gen.folatt")" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
#if ($reference)
#set ($props = false)
#set ($props = $reference.Properties)
#if ($!props)
#if ($!props && !$!props.isEmpty())
<li>
#if ($props.getBooleanProperty($props.NamePropIsCollection))
<img src = "#imageLink($contentTypeImageService.getContentTypeImage("folder"))" border="0" alt="$tlang.getString("gen.folatt")" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
#if ($reference)
#set ($props = false)
#set ($props = $reference.Properties)
#if ($!props)
#if ($!props && !$!props.isEmpty())
<li>
#if ($props.getBooleanProperty($props.NamePropIsCollection))
<img src = "#imageLink($contentTypeImageService.getContentTypeImage("folder"))" border="0" alt="$tlang.getString("gen.folatt")" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#if ($reference)
#set ($props = false)
#set ($props = $reference.Properties)
#if ($!props)
#if ($!props && !$!props.isEmpty())
<li>
#if ($props.getBooleanProperty($props.NamePropIsCollection))
<img src = "#imageLink($contentTypeImageService.getContentTypeImage("folder"))" border="0" alt="$tlang.getString("gen.folatt")" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
#if ($reference)
#set ($props = false)
#set ($props = $reference.Properties)
#if ($!props)
#if ($!props && !$!props.isEmpty())
<li>
#if ($props.getBooleanProperty($props.NamePropIsCollection))
<img src = "#imageLink($contentTypeImageService.getContentTypeImage("folder"))" border="0" alt="$tlang.getString("gen.folatt")" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ $(document).ready(function(){
#foreach ($attachment in $attachments)
#set ($props = false)
#set ($props = $attachment.Properties)
#if ($!props)
#if ($!props && !$!props.isEmpty())
<tr>
<td>
#if ($props.getBooleanProperty($props.NamePropIsCollection))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
#if ($reference)
#set ($props = false)
#set ($props = $reference.Properties)
#if ($!props)
#if ($!props && !$!props.isEmpty())
<li>$formattedText.escapeHtml($props.getPropertyFormatted($props.NamePropDisplayName))
#propertyDetails($props)
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,20 @@ public interface ResourceProperties extends Serializable
*/
Iterator<String> getPropertyNames();

/**
* Returns the number of defined properties
*
* @return the number of defined properties
*/
int size();

/**
* Returns true if there are no defined properties
*
* @return true if there are no defined properties
*/
boolean isEmpty();

/**
* Access a named property as a string (won't find multi-valued ones.)
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,18 @@ public Iterator<String> getPropertyNames()
return new EnumerationIterator(m_props.keys());
}

@Override
public int size()
{
return m_props.size();
}

@Override
public boolean isEmpty()
{
return m_props.isEmpty();
}

/**
* Access a named property as a string (won't find multi-valued ones.)
*
Expand Down

0 comments on commit c59d7c1

Please sign in to comment.