Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsEventsEventsWhere is 04.00.01 enhancement #1? (enroll link for unauthenticated users)Where is 04.00.01 enhancement #1? (enroll link for unauthenticated users)
Previous
 
Next
New Post
10/26/2008 5:17 AM
Accepted Answer 

Hi Adrián,

Good place for DNN development is - http://www.adefwebserver.com/DotNetNukeHELP/.

And several code changes, in eventdetails.ascx.vb. You will also need to add an entry to EventDetails.ascx.resx. Shout if it isn't obvious.

                    ' See if the User is Logged on and if they already are signed up
                    ' And that Signup is Authorized
                    ' And also that the Date/Time has not passed
                    If (Context.Request.IsAuthenticated) And _
                       (startdate.Date >= Now().Date) And _
                       (objEvent.Signups) Then
                        If (objEvent.EnrollRoleID.Length = 0 Or objEvent.EnrollRoleID = "0") Then
                            UserEnrollment(objEvent, startdate)
                        ElseIf objEvent.EnrollRoleID <> "" Then
                            If IsNumeric(objEvent.EnrollRoleID) Then
                                If IsEnrollRole(CInt(objEvent.EnrollRoleID)) Then
                                    UserEnrollment(objEvent, startdate)
                                End If
                            End If
                        End If
                    End If
                    'Are You Sure You Want To Enroll?'
                    cmdSignup.Attributes.Add("onClick", " return confirm('" + Localization.GetString("SureYouWantToEnroll", LocalResourceFile) + "');")

Changed to

                    ' See if user already are signed up
                    ' And that Signup is Authorized
                    ' And also that the Date/Time has not passed
                    If (startdate.Date >= Now().Date) And _
                       (objEvent.Signups) Then
                        If (objEvent.EnrollRoleID.Length = 0 Or objEvent.EnrollRoleID = "0") Then
                            UserEnrollment(objEvent, startdate)
                        ElseIf objEvent.EnrollRoleID <> "" Then
                            If IsNumeric(objEvent.EnrollRoleID) Then
                                If IsEnrollRole(CInt(objEvent.EnrollRoleID)) Then
                                    UserEnrollment(objEvent, startdate)
                                End If
                            End If
                        End If
                    End If
                    'Are You Sure You Want To Enroll?'
                    If Request.IsAuthenticated Then
                        cmdSignup.Attributes.Add("onClick", " return confirm('" + Localization.GetString("SureYouWantToEnroll", LocalResourceFile) + "');")
                    End If

And....

        ' Display User Enrollment Info on Page
        Private Sub UserEnrollment(ByVal objEvent As EventInfo, ByVal EventDate As DateTime)
            If CType(Settings("eventsignup"), Boolean) Then
                ' If not already enrolled, allow the user to signup (if enabled)
                objEventSignups = objCtlEventSignups.EventsSignupsGetUser(objEvent.EventID, UserId, EventDate, ModuleId)
                If (objEventSignups Is Nothing) Then
                    If (objEvent.Enrolled < objEvent.MaxEnrollment) Or _
                    (objEvent.MaxEnrollment = 0) Then
                        ' User is not enrolled for this event...press the link to enroll!
                        cmdSignup.Visible = True
                    End If
                Else
                    lblSignup.Visible = True
                    If objEventSignups.Approved Then
                        ' User is enrolled and approved for this event!
                        lblSignup.Text = Localization.GetString("YouAreEnrolledForThisEvent", LocalResourceFile)
                    Else
                        ' User is enrolled for this event, but not yet approved!
                        lblSignup.Text = Localization.GetString("EnrolledButNotApproved", LocalResourceFile)
                    End If
                End If
                If Request.Params("Status") = "enrolled" Then
                    ' User has been successfully enrolled for this event (paid enrollment)
                    Me.lblSignup.Text = Localization.GetString("StatusPPSuccess", LocalResourceFile)
                    lblSignup.Visible = True
                ElseIf Request.Params("Status") = "cancelled" Then
                    ' User has been cancelled paid enrollment
                    Me.lblSignup.Text = Localization.GetString("StatusPPCancelled", LocalResourceFile)
                    lblSignup.Visible = True
                End If
            End If
        End Sub
 

Changed to

        ' Display User Enrollment Info on Page
        Private Sub UserEnrollment(ByVal objEvent As EventInfo, ByVal EventDate As DateTime)
            If CType(Settings("eventsignup"), Boolean) Then
                If Not Request.IsAuthenticated Then
                    cmdSignup.Visible = True
                    cmdSignup.Text = Localization.GetString("LoginToEnroll", LocalResourceFile)
                Else
                    ' If not already enrolled, allow the user to signup (if enabled)
                    objEventSignups = objCtlEventSignups.EventsSignupsGetUser(objEvent.EventID, UserId, EventDate, ModuleId)
                    If (objEventSignups Is Nothing) Then
                        If (objEvent.Enrolled < objEvent.MaxEnrollment) Or _
                        (objEvent.MaxEnrollment = 0) Then
                            ' User is not enrolled for this event...press the link to enroll!
                            cmdSignup.Visible = True
                            cmdSignup.Text = Localization.GetString("EnrollForEvent", LocalResourceFile)
                        End If
                    Else
                        lblSignup.Visible = True
                        If objEventSignups.Approved Then
                            ' User is enrolled and approved for this event!
                            lblSignup.Text = Localization.GetString("YouAreEnrolledForThisEvent", LocalResourceFile)
                        Else
                            ' User is enrolled for this event, but not yet approved!
                            lblSignup.Text = Localization.GetString("EnrolledButNotApproved", LocalResourceFile)
                        End If
                    End If
                    If Request.Params("Status") = "enrolled" Then
                        ' User has been successfully enrolled for this event (paid enrollment)
                        Me.lblSignup.Text = Localization.GetString("StatusPPSuccess", LocalResourceFile)
                        lblSignup.Visible = True
                    ElseIf Request.Params("Status") = "cancelled" Then
                        ' User has been cancelled paid enrollment
                        Me.lblSignup.Text = Localization.GetString("StatusPPCancelled", LocalResourceFile)
                        lblSignup.Visible = True
                    End If
                End If
            End If
        End Sub
 

and....

        Private Sub cmdSignup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSignup.Click
            Dim objEvent As New EventInfo
            Try
                objEvent = Me.objCtlEvent.EventsGet(itemID, ModuleId)
                If objEvent.EnrollType = "PAID" Then
                    Try
                        Response.Redirect(NavigateURL(TabId, "PPEnroll", "Mid=" & ModuleId, "ItemID=" & itemID))
                    Catch exc As Exception 'Module failed to load
                        ProcessModuleLoadException(Me, exc)
                    End Try
                Else
 

Changed to

        Private Sub cmdSignup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSignup.Click
            If Not Request.IsAuthenticated Then
                RedirectToLogin()
            End If

            Dim objEvent As New EventInfo
            Try
                objEvent = Me.objCtlEvent.EventsGet(itemID, ModuleId)
                If objEvent.EnrollType = "PAID" Then
                    Try
                        Response.Redirect(NavigateURL(TabId, "PPEnroll", "Mid=" & ModuleId, "ItemID=" & itemID))
                    Catch exc As Exception 'Module failed to load
                        ProcessModuleLoadException(Me, exc)
                    End Try
                Else
 

Cheers
Roger


DNN MVP
Events - Get the latest version - Upgrade now!!
Feedback 6.4.2 - Now available - Give it a go!
Find us on Codeplex - DNN Events, DNN Feedback
Requirements/Bugs - Please submit them on Codeplex
 
New Post
10/28/2008 3:27 PM
 

Wow Roger!

That's an answer! I'll try to let you know about the outcome of all this... :-)

Regards,

                      Adrián

 
New Post
11/20/2008 3:58 PM
 

I echo Adrián's response:  that's an answer!  Thanks for leaking a solution to my question prior to the next release of EVENTS.  We've been coding around this item but I always prefer to leverage core functionality when possible (assuming the next version of EVENTS will have this or very similar enhancement code added).

Thanks for the ongoing attention to this item!

-mamlin


esmamlin atxgeek.me
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsEventsEventsWhere is 04.00.01 enhancement #1? (enroll link for unauthenticated users)Where is 04.00.01 enhancement #1? (enroll link for unauthenticated users)


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out