Skip to content

Commit

Permalink
SAK-29000 create sakai.property to show/hide authorization fields whe…
Browse files Browse the repository at this point in the history
…n adding roster(s) to a course site

missed some spacing inconsistencies

updated per Sam's comments
  • Loading branch information
bjones86 committed Jan 20, 2015
1 parent 75ccb6a commit 2d93af0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2660,6 +2660,11 @@
# DEFAULT: 10
#site.adminperms.sitesuntilpause=10

### SAK-29000
# Determines if the authorization fields are presented to the user in Site Info -> Edit Rosters -> Add Roster
# DEFAULT: true
# site.addroster.authorizationrequired=false

# Allow instructors to create and manage sections by themselves while also
# having some types of sections locked (read only). With this configuration
# (and MANUAL type set) an Instructor can create and manage sections except
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,9 @@ public class SiteAction extends PagedResourceActionII {
// SAK-28990 - enable/disable continue with no roster
private static final String VM_CONT_NO_ROSTER_ENABLED = "contNoRosterEnabled";
private static final String SAK_PROP_CONT_NO_ROSTER_ENABLED = "sitemanage.continueWithNoRoster";

private static final String SAK_PROP_ADD_ROSTER_AUTH_REQUIRED = "site.addroster.authorizationrequired";
private static final String VM_ADD_ROSTER_AUTH_REQUIRED = "authorizationRequired";

/**
* what are the tool ids within Home page?
Expand Down Expand Up @@ -3215,6 +3218,10 @@ public int compare(String s1, String s2) {
context.put("termCourseList", state
.getAttribute(STATE_TERM_COURSE_LIST));

// SAK-29000
Boolean isAuthorizationRequired = ServerConfigurationService.getBoolean( SAK_PROP_ADD_ROSTER_AUTH_REQUIRED, Boolean.TRUE );
context.put( VM_ADD_ROSTER_AUTH_REQUIRED, isAuthorizationRequired );

// added for 2.4 -daisyf
context.put("campusDirectory", getCampusDirectory());
context.put("userId", state.getAttribute(STATE_INSTRUCTOR_SELECTED) != null ? (String) state.getAttribute(STATE_INSTRUCTOR_SELECTED) : UserDirectoryService.getCurrentUser().getId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ function redirectBasedOnSelection(){



#if ($termCourseList && $currentUserId != $userId)
## SAK-29000
#if ($authorizationRequired)
#if ($termCourseList && $currentUserId != $userId)
<div class="shorttext required">
<span class="reqStar">*</span>
<label for="uniqname">
Expand All @@ -329,6 +331,7 @@ function redirectBasedOnSelection(){
<p class="instruction labelindnt">
$tlang.getString("man.please")
</p>
#end
#end
<p/>
<input type="hidden" name="back" value="$!backIndex" />
Expand Down Expand Up @@ -389,8 +392,11 @@ function redirectBasedOnSelection(){
</p>
#else
#if( !$skipCourseSectionSelection || !$skipManualCourseCreation)
<!-- Add Not Listed Courses -->
<a href="#" onclick="javascript:submitFindCourse();">$tlang.getString('nscourse.add_course_not_listed')</a>
## SAK-29000
#if( $authorizationRequired )
<!-- Add Not Listed Courses -->
<a href="#" onclick="javascript:submitFindCourse();">$tlang.getString('nscourse.add_course_not_listed')</a>
#end
#end
<p class="act">
<input type="hidden" name="option" id="option" value="x" />
Expand Down

0 comments on commit 2d93af0

Please sign in to comment.